diff --git a/packages/next/compiled/webpack/bundle5.js b/packages/next/compiled/webpack/bundle5.js index 40e80b75aa352cc..e22381705b5c161 100644 --- a/packages/next/compiled/webpack/bundle5.js +++ b/packages/next/compiled/webpack/bundle5.js @@ -1,144281 +1,28 @@ -/******/ (function() { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 96381: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.cloneNode = cloneNode; - -function cloneNode(n) { - return Object.assign({}, n); -} - -/***/ }), - -/***/ 44977: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var _exportNames = { - numberLiteralFromRaw: true, - withLoc: true, - withRaw: true, - funcParam: true, - indexLiteral: true, - memIndexLiteral: true, - instruction: true, - objectInstruction: true, - traverse: true, - signatures: true, - cloneNode: true, - moduleContextFromModuleAST: true -}; -Object.defineProperty(exports, "numberLiteralFromRaw", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.numberLiteralFromRaw; - } -})); -Object.defineProperty(exports, "withLoc", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.withLoc; - } -})); -Object.defineProperty(exports, "withRaw", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.withRaw; - } -})); -Object.defineProperty(exports, "funcParam", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.funcParam; - } -})); -Object.defineProperty(exports, "indexLiteral", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.indexLiteral; - } -})); -Object.defineProperty(exports, "memIndexLiteral", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.memIndexLiteral; - } -})); -Object.defineProperty(exports, "instruction", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.instruction; - } -})); -Object.defineProperty(exports, "objectInstruction", ({ - enumerable: true, - get: function get() { - return _nodeHelpers.objectInstruction; - } -})); -Object.defineProperty(exports, "traverse", ({ - enumerable: true, - get: function get() { - return _traverse.traverse; - } -})); -Object.defineProperty(exports, "signatures", ({ - enumerable: true, - get: function get() { - return _signatures.signatures; - } -})); -Object.defineProperty(exports, "cloneNode", ({ - enumerable: true, - get: function get() { - return _clone.cloneNode; - } -})); -Object.defineProperty(exports, "moduleContextFromModuleAST", ({ - enumerable: true, - get: function get() { - return _astModuleToModuleContext.moduleContextFromModuleAST; - } -})); - -var _nodes = __webpack_require__(23033); - -Object.keys(_nodes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _nodes[key]; - } - }); -}); - -var _nodeHelpers = __webpack_require__(82498); - -var _traverse = __webpack_require__(31109); - -var _signatures = __webpack_require__(63427); - -var _utils = __webpack_require__(32727); - -Object.keys(_utils).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _utils[key]; - } - }); -}); - -var _clone = __webpack_require__(96381); - -var _astModuleToModuleContext = __webpack_require__(19741); - -/***/ }), - -/***/ 82498: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.numberLiteralFromRaw = numberLiteralFromRaw; -exports.instruction = instruction; -exports.objectInstruction = objectInstruction; -exports.withLoc = withLoc; -exports.withRaw = withRaw; -exports.funcParam = funcParam; -exports.indexLiteral = indexLiteral; -exports.memIndexLiteral = memIndexLiteral; - -var _helperNumbers = __webpack_require__(3189); - -var _nodes = __webpack_require__(23033); - -function numberLiteralFromRaw(rawValue) { - var instructionType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "i32"; - var original = rawValue; // Remove numeric separators _ - - if (typeof rawValue === "string") { - rawValue = rawValue.replace(/_/g, ""); - } - - if (typeof rawValue === "number") { - return (0, _nodes.numberLiteral)(rawValue, String(original)); - } else { - switch (instructionType) { - case "i32": - { - return (0, _nodes.numberLiteral)((0, _helperNumbers.parse32I)(rawValue), String(original)); - } - - case "u32": - { - return (0, _nodes.numberLiteral)((0, _helperNumbers.parseU32)(rawValue), String(original)); - } - - case "i64": - { - return (0, _nodes.longNumberLiteral)((0, _helperNumbers.parse64I)(rawValue), String(original)); - } - - case "f32": - { - return (0, _nodes.floatLiteral)((0, _helperNumbers.parse32F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original)); - } - // f64 - - default: - { - return (0, _nodes.floatLiteral)((0, _helperNumbers.parse64F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original)); - } - } - } -} - -function instruction(id) { - var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var namedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - return (0, _nodes.instr)(id, undefined, args, namedArgs); -} - -function objectInstruction(id, object) { - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - var namedArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - return (0, _nodes.instr)(id, object, args, namedArgs); -} -/** - * Decorators - */ - - -function withLoc(n, end, start) { - var loc = { - start: start, - end: end - }; - n.loc = loc; - return n; -} - -function withRaw(n, raw) { - n.raw = raw; - return n; -} - -function funcParam(valtype, id) { - return { - id: id, - valtype: valtype - }; -} - -function indexLiteral(value) { - // $FlowIgnore - var x = numberLiteralFromRaw(value, "u32"); - return x; -} - -function memIndexLiteral(value) { - // $FlowIgnore - var x = numberLiteralFromRaw(value, "u32"); - return x; -} - -/***/ }), - -/***/ 33301: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.createPath = createPath; - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - -function findParent(_ref, cb) { - var parentPath = _ref.parentPath; - - if (parentPath == null) { - throw new Error("node is root"); - } - - var currentPath = parentPath; - - while (cb(currentPath) !== false) { - // Hit the root node, stop - // $FlowIgnore - if (currentPath.parentPath == null) { - return null; - } // $FlowIgnore - - - currentPath = currentPath.parentPath; - } - - return currentPath.node; -} - -function insertBefore(context, newNode) { - return insert(context, newNode); -} - -function insertAfter(context, newNode) { - return insert(context, newNode, 1); -} - -function insert(_ref2, newNode) { - var node = _ref2.node, - inList = _ref2.inList, - parentPath = _ref2.parentPath, - parentKey = _ref2.parentKey; - var indexOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - - if (!inList) { - throw new Error('inList' + " error: " + ("insert can only be used for nodes that are within lists" || 0)); - } - - if (!(parentPath != null)) { - throw new Error('parentPath != null' + " error: " + ("Can not remove root node" || 0)); - } - - // $FlowIgnore - var parentList = parentPath.node[parentKey]; - var indexInList = parentList.findIndex(function (n) { - return n === node; - }); - parentList.splice(indexInList + indexOffset, 0, newNode); -} - -function remove(_ref3) { - var node = _ref3.node, - parentKey = _ref3.parentKey, - parentPath = _ref3.parentPath; - - if (!(parentPath != null)) { - throw new Error('parentPath != null' + " error: " + ("Can not remove root node" || 0)); - } - - // $FlowIgnore - var parentNode = parentPath.node; // $FlowIgnore - - var parentProperty = parentNode[parentKey]; - - if (Array.isArray(parentProperty)) { - // $FlowIgnore - parentNode[parentKey] = parentProperty.filter(function (n) { - return n !== node; - }); - } else { - // $FlowIgnore - delete parentNode[parentKey]; - } - - node._deleted = true; -} - -function stop(context) { - context.shouldStop = true; -} - -function replaceWith(context, newNode) { - // $FlowIgnore - var parentNode = context.parentPath.node; // $FlowIgnore - - var parentProperty = parentNode[context.parentKey]; - - if (Array.isArray(parentProperty)) { - var indexInList = parentProperty.findIndex(function (n) { - return n === context.node; - }); - parentProperty.splice(indexInList, 1, newNode); - } else { - // $FlowIgnore - parentNode[context.parentKey] = newNode; - } - - context.node._deleted = true; - context.node = newNode; -} // bind the context to the first argument of node operations - - -function bindNodeOperations(operations, context) { - var keys = Object.keys(operations); - var boundOperations = {}; - keys.forEach(function (key) { - boundOperations[key] = operations[key].bind(null, context); - }); - return boundOperations; -} - -function createPathOperations(context) { - // $FlowIgnore - return bindNodeOperations({ - findParent: findParent, - replaceWith: replaceWith, - remove: remove, - insertBefore: insertBefore, - insertAfter: insertAfter, - stop: stop - }, context); -} - -function createPath(context) { - var path = _extends({}, context); // $FlowIgnore - - - Object.assign(path, createPathOperations(path)); // $FlowIgnore - - return path; -} - -/***/ }), - -/***/ 23033: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.module = _module; -exports.moduleMetadata = moduleMetadata; -exports.moduleNameMetadata = moduleNameMetadata; -exports.functionNameMetadata = functionNameMetadata; -exports.localNameMetadata = localNameMetadata; -exports.binaryModule = binaryModule; -exports.quoteModule = quoteModule; -exports.sectionMetadata = sectionMetadata; -exports.producersSectionMetadata = producersSectionMetadata; -exports.producerMetadata = producerMetadata; -exports.producerMetadataVersionedName = producerMetadataVersionedName; -exports.loopInstruction = loopInstruction; -exports.instr = instr; -exports.ifInstruction = ifInstruction; -exports.stringLiteral = stringLiteral; -exports.numberLiteral = numberLiteral; -exports.longNumberLiteral = longNumberLiteral; -exports.floatLiteral = floatLiteral; -exports.elem = elem; -exports.indexInFuncSection = indexInFuncSection; -exports.valtypeLiteral = valtypeLiteral; -exports.typeInstruction = typeInstruction; -exports.start = start; -exports.globalType = globalType; -exports.leadingComment = leadingComment; -exports.blockComment = blockComment; -exports.data = data; -exports.global = global; -exports.table = table; -exports.memory = memory; -exports.funcImportDescr = funcImportDescr; -exports.moduleImport = moduleImport; -exports.moduleExportDescr = moduleExportDescr; -exports.moduleExport = moduleExport; -exports.limit = limit; -exports.signature = signature; -exports.program = program; -exports.identifier = identifier; -exports.blockInstruction = blockInstruction; -exports.callInstruction = callInstruction; -exports.callIndirectInstruction = callIndirectInstruction; -exports.byteArray = byteArray; -exports.func = func; -exports.internalBrUnless = internalBrUnless; -exports.internalGoto = internalGoto; -exports.internalCallExtern = internalCallExtern; -exports.internalEndAndReturn = internalEndAndReturn; -exports.assertInternalCallExtern = exports.assertInternalGoto = exports.assertInternalBrUnless = exports.assertFunc = exports.assertByteArray = exports.assertCallIndirectInstruction = exports.assertCallInstruction = exports.assertBlockInstruction = exports.assertIdentifier = exports.assertProgram = exports.assertSignature = exports.assertLimit = exports.assertModuleExport = exports.assertModuleExportDescr = exports.assertModuleImport = exports.assertFuncImportDescr = exports.assertMemory = exports.assertTable = exports.assertGlobal = exports.assertData = exports.assertBlockComment = exports.assertLeadingComment = exports.assertGlobalType = exports.assertStart = exports.assertTypeInstruction = exports.assertValtypeLiteral = exports.assertIndexInFuncSection = exports.assertElem = exports.assertFloatLiteral = exports.assertLongNumberLiteral = exports.assertNumberLiteral = exports.assertStringLiteral = exports.assertIfInstruction = exports.assertInstr = exports.assertLoopInstruction = exports.assertProducerMetadataVersionedName = exports.assertProducerMetadata = exports.assertProducersSectionMetadata = exports.assertSectionMetadata = exports.assertQuoteModule = exports.assertBinaryModule = exports.assertLocalNameMetadata = exports.assertFunctionNameMetadata = exports.assertModuleNameMetadata = exports.assertModuleMetadata = exports.assertModule = exports.isIntrinsic = exports.isImportDescr = exports.isNumericLiteral = exports.isExpression = exports.isInstruction = exports.isBlock = exports.isNode = exports.isInternalEndAndReturn = exports.isInternalCallExtern = exports.isInternalGoto = exports.isInternalBrUnless = exports.isFunc = exports.isByteArray = exports.isCallIndirectInstruction = exports.isCallInstruction = exports.isBlockInstruction = exports.isIdentifier = exports.isProgram = exports.isSignature = exports.isLimit = exports.isModuleExport = exports.isModuleExportDescr = exports.isModuleImport = exports.isFuncImportDescr = exports.isMemory = exports.isTable = exports.isGlobal = exports.isData = exports.isBlockComment = exports.isLeadingComment = exports.isGlobalType = exports.isStart = exports.isTypeInstruction = exports.isValtypeLiteral = exports.isIndexInFuncSection = exports.isElem = exports.isFloatLiteral = exports.isLongNumberLiteral = exports.isNumberLiteral = exports.isStringLiteral = exports.isIfInstruction = exports.isInstr = exports.isLoopInstruction = exports.isProducerMetadataVersionedName = exports.isProducerMetadata = exports.isProducersSectionMetadata = exports.isSectionMetadata = exports.isQuoteModule = exports.isBinaryModule = exports.isLocalNameMetadata = exports.isFunctionNameMetadata = exports.isModuleNameMetadata = exports.isModuleMetadata = exports.isModule = void 0; -exports.nodeAndUnionTypes = exports.unionTypesMap = exports.assertInternalEndAndReturn = void 0; - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -// THIS FILE IS AUTOGENERATED -// see scripts/generateNodeUtils.js -function isTypeOf(t) { - return function (n) { - return n.type === t; - }; -} - -function assertTypeOf(t) { - return function (n) { - return function () { - if (!(n.type === t)) { - throw new Error('n.type === t' + " error: " + (undefined || "unknown")); - } - }(); - }; -} - -function _module(id, fields, metadata) { - if (id !== null && id !== undefined) { - if (!(typeof id === "string")) { - throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); - } - } - - if (!(_typeof(fields) === "object" && typeof fields.length !== "undefined")) { - throw new Error('typeof fields === "object" && typeof fields.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Module", - id: id, - fields: fields - }; - - if (typeof metadata !== "undefined") { - node.metadata = metadata; - } - - return node; -} - -function moduleMetadata(sections, functionNames, localNames, producers) { - if (!(_typeof(sections) === "object" && typeof sections.length !== "undefined")) { - throw new Error('typeof sections === "object" && typeof sections.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (functionNames !== null && functionNames !== undefined) { - if (!(_typeof(functionNames) === "object" && typeof functionNames.length !== "undefined")) { - throw new Error('typeof functionNames === "object" && typeof functionNames.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - if (localNames !== null && localNames !== undefined) { - if (!(_typeof(localNames) === "object" && typeof localNames.length !== "undefined")) { - throw new Error('typeof localNames === "object" && typeof localNames.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - if (producers !== null && producers !== undefined) { - if (!(_typeof(producers) === "object" && typeof producers.length !== "undefined")) { - throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - var node = { - type: "ModuleMetadata", - sections: sections - }; - - if (typeof functionNames !== "undefined" && functionNames.length > 0) { - node.functionNames = functionNames; - } - - if (typeof localNames !== "undefined" && localNames.length > 0) { - node.localNames = localNames; - } - - if (typeof producers !== "undefined" && producers.length > 0) { - node.producers = producers; - } - - return node; -} - -function moduleNameMetadata(value) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - var node = { - type: "ModuleNameMetadata", - value: value - }; - return node; -} - -function functionNameMetadata(value, index) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - if (!(typeof index === "number")) { - throw new Error('typeof index === "number"' + " error: " + ("Argument index must be of type number, given: " + _typeof(index) || 0)); - } - - var node = { - type: "FunctionNameMetadata", - value: value, - index: index - }; - return node; -} - -function localNameMetadata(value, localIndex, functionIndex) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - if (!(typeof localIndex === "number")) { - throw new Error('typeof localIndex === "number"' + " error: " + ("Argument localIndex must be of type number, given: " + _typeof(localIndex) || 0)); - } - - if (!(typeof functionIndex === "number")) { - throw new Error('typeof functionIndex === "number"' + " error: " + ("Argument functionIndex must be of type number, given: " + _typeof(functionIndex) || 0)); - } - - var node = { - type: "LocalNameMetadata", - value: value, - localIndex: localIndex, - functionIndex: functionIndex - }; - return node; -} - -function binaryModule(id, blob) { - if (id !== null && id !== undefined) { - if (!(typeof id === "string")) { - throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); - } - } - - if (!(_typeof(blob) === "object" && typeof blob.length !== "undefined")) { - throw new Error('typeof blob === "object" && typeof blob.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "BinaryModule", - id: id, - blob: blob - }; - return node; -} - -function quoteModule(id, string) { - if (id !== null && id !== undefined) { - if (!(typeof id === "string")) { - throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); - } - } - - if (!(_typeof(string) === "object" && typeof string.length !== "undefined")) { - throw new Error('typeof string === "object" && typeof string.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "QuoteModule", - id: id, - string: string - }; - return node; -} - -function sectionMetadata(section, startOffset, size, vectorOfSize) { - if (!(typeof startOffset === "number")) { - throw new Error('typeof startOffset === "number"' + " error: " + ("Argument startOffset must be of type number, given: " + _typeof(startOffset) || 0)); - } - - var node = { - type: "SectionMetadata", - section: section, - startOffset: startOffset, - size: size, - vectorOfSize: vectorOfSize - }; - return node; -} - -function producersSectionMetadata(producers) { - if (!(_typeof(producers) === "object" && typeof producers.length !== "undefined")) { - throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "ProducersSectionMetadata", - producers: producers - }; - return node; -} - -function producerMetadata(language, processedBy, sdk) { - if (!(_typeof(language) === "object" && typeof language.length !== "undefined")) { - throw new Error('typeof language === "object" && typeof language.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(processedBy) === "object" && typeof processedBy.length !== "undefined")) { - throw new Error('typeof processedBy === "object" && typeof processedBy.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(sdk) === "object" && typeof sdk.length !== "undefined")) { - throw new Error('typeof sdk === "object" && typeof sdk.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "ProducerMetadata", - language: language, - processedBy: processedBy, - sdk: sdk - }; - return node; -} - -function producerMetadataVersionedName(name, version) { - if (!(typeof name === "string")) { - throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); - } - - if (!(typeof version === "string")) { - throw new Error('typeof version === "string"' + " error: " + ("Argument version must be of type string, given: " + _typeof(version) || 0)); - } - - var node = { - type: "ProducerMetadataVersionedName", - name: name, - version: version - }; - return node; -} - -function loopInstruction(label, resulttype, instr) { - if (!(_typeof(instr) === "object" && typeof instr.length !== "undefined")) { - throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "LoopInstruction", - id: "loop", - label: label, - resulttype: resulttype, - instr: instr - }; - return node; -} - -function instr(id, object, args, namedArgs) { - if (!(typeof id === "string")) { - throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); - } - - if (!(_typeof(args) === "object" && typeof args.length !== "undefined")) { - throw new Error('typeof args === "object" && typeof args.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Instr", - id: id, - args: args - }; - - if (typeof object !== "undefined") { - node.object = object; - } - - if (typeof namedArgs !== "undefined" && Object.keys(namedArgs).length !== 0) { - node.namedArgs = namedArgs; - } - - return node; -} - -function ifInstruction(testLabel, test, result, consequent, alternate) { - if (!(_typeof(test) === "object" && typeof test.length !== "undefined")) { - throw new Error('typeof test === "object" && typeof test.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(consequent) === "object" && typeof consequent.length !== "undefined")) { - throw new Error('typeof consequent === "object" && typeof consequent.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(alternate) === "object" && typeof alternate.length !== "undefined")) { - throw new Error('typeof alternate === "object" && typeof alternate.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "IfInstruction", - id: "if", - testLabel: testLabel, - test: test, - result: result, - consequent: consequent, - alternate: alternate - }; - return node; -} - -function stringLiteral(value) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - var node = { - type: "StringLiteral", - value: value - }; - return node; -} - -function numberLiteral(value, raw) { - if (!(typeof value === "number")) { - throw new Error('typeof value === "number"' + " error: " + ("Argument value must be of type number, given: " + _typeof(value) || 0)); - } - - if (!(typeof raw === "string")) { - throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); - } - - var node = { - type: "NumberLiteral", - value: value, - raw: raw - }; - return node; -} - -function longNumberLiteral(value, raw) { - if (!(typeof raw === "string")) { - throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); - } - - var node = { - type: "LongNumberLiteral", - value: value, - raw: raw - }; - return node; -} - -function floatLiteral(value, nan, inf, raw) { - if (!(typeof value === "number")) { - throw new Error('typeof value === "number"' + " error: " + ("Argument value must be of type number, given: " + _typeof(value) || 0)); - } - - if (nan !== null && nan !== undefined) { - if (!(typeof nan === "boolean")) { - throw new Error('typeof nan === "boolean"' + " error: " + ("Argument nan must be of type boolean, given: " + _typeof(nan) || 0)); - } - } - - if (inf !== null && inf !== undefined) { - if (!(typeof inf === "boolean")) { - throw new Error('typeof inf === "boolean"' + " error: " + ("Argument inf must be of type boolean, given: " + _typeof(inf) || 0)); - } - } - - if (!(typeof raw === "string")) { - throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); - } - - var node = { - type: "FloatLiteral", - value: value, - raw: raw - }; - - if (nan === true) { - node.nan = true; - } - - if (inf === true) { - node.inf = true; - } - - return node; -} - -function elem(table, offset, funcs) { - if (!(_typeof(offset) === "object" && typeof offset.length !== "undefined")) { - throw new Error('typeof offset === "object" && typeof offset.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(funcs) === "object" && typeof funcs.length !== "undefined")) { - throw new Error('typeof funcs === "object" && typeof funcs.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Elem", - table: table, - offset: offset, - funcs: funcs - }; - return node; -} - -function indexInFuncSection(index) { - var node = { - type: "IndexInFuncSection", - index: index - }; - return node; -} - -function valtypeLiteral(name) { - var node = { - type: "ValtypeLiteral", - name: name - }; - return node; -} - -function typeInstruction(id, functype) { - var node = { - type: "TypeInstruction", - id: id, - functype: functype - }; - return node; -} - -function start(index) { - var node = { - type: "Start", - index: index - }; - return node; -} - -function globalType(valtype, mutability) { - var node = { - type: "GlobalType", - valtype: valtype, - mutability: mutability - }; - return node; -} - -function leadingComment(value) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - var node = { - type: "LeadingComment", - value: value - }; - return node; -} - -function blockComment(value) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - var node = { - type: "BlockComment", - value: value - }; - return node; -} - -function data(memoryIndex, offset, init) { - var node = { - type: "Data", - memoryIndex: memoryIndex, - offset: offset, - init: init - }; - return node; -} - -function global(globalType, init, name) { - if (!(_typeof(init) === "object" && typeof init.length !== "undefined")) { - throw new Error('typeof init === "object" && typeof init.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Global", - globalType: globalType, - init: init, - name: name - }; - return node; -} - -function table(elementType, limits, name, elements) { - if (!(limits.type === "Limit")) { - throw new Error('limits.type === "Limit"' + " error: " + ("Argument limits must be of type Limit, given: " + limits.type || 0)); - } - - if (elements !== null && elements !== undefined) { - if (!(_typeof(elements) === "object" && typeof elements.length !== "undefined")) { - throw new Error('typeof elements === "object" && typeof elements.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - var node = { - type: "Table", - elementType: elementType, - limits: limits, - name: name - }; - - if (typeof elements !== "undefined" && elements.length > 0) { - node.elements = elements; - } - - return node; -} - -function memory(limits, id) { - var node = { - type: "Memory", - limits: limits, - id: id - }; - return node; -} - -function funcImportDescr(id, signature) { - var node = { - type: "FuncImportDescr", - id: id, - signature: signature - }; - return node; -} - -function moduleImport(module, name, descr) { - if (!(typeof module === "string")) { - throw new Error('typeof module === "string"' + " error: " + ("Argument module must be of type string, given: " + _typeof(module) || 0)); - } - - if (!(typeof name === "string")) { - throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); - } - - var node = { - type: "ModuleImport", - module: module, - name: name, - descr: descr - }; - return node; -} - -function moduleExportDescr(exportType, id) { - var node = { - type: "ModuleExportDescr", - exportType: exportType, - id: id - }; - return node; -} - -function moduleExport(name, descr) { - if (!(typeof name === "string")) { - throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); - } - - var node = { - type: "ModuleExport", - name: name, - descr: descr - }; - return node; -} - -function limit(min, max, shared) { - if (!(typeof min === "number")) { - throw new Error('typeof min === "number"' + " error: " + ("Argument min must be of type number, given: " + _typeof(min) || 0)); - } - - if (max !== null && max !== undefined) { - if (!(typeof max === "number")) { - throw new Error('typeof max === "number"' + " error: " + ("Argument max must be of type number, given: " + _typeof(max) || 0)); - } - } - - if (shared !== null && shared !== undefined) { - if (!(typeof shared === "boolean")) { - throw new Error('typeof shared === "boolean"' + " error: " + ("Argument shared must be of type boolean, given: " + _typeof(shared) || 0)); - } - } - - var node = { - type: "Limit", - min: min - }; - - if (typeof max !== "undefined") { - node.max = max; - } - - if (shared === true) { - node.shared = true; - } - - return node; -} - -function signature(params, results) { - if (!(_typeof(params) === "object" && typeof params.length !== "undefined")) { - throw new Error('typeof params === "object" && typeof params.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (!(_typeof(results) === "object" && typeof results.length !== "undefined")) { - throw new Error('typeof results === "object" && typeof results.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Signature", - params: params, - results: results - }; - return node; -} - -function program(body) { - if (!(_typeof(body) === "object" && typeof body.length !== "undefined")) { - throw new Error('typeof body === "object" && typeof body.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "Program", - body: body - }; - return node; -} - -function identifier(value, raw) { - if (!(typeof value === "string")) { - throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); - } - - if (raw !== null && raw !== undefined) { - if (!(typeof raw === "string")) { - throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); - } - } - - var node = { - type: "Identifier", - value: value - }; - - if (typeof raw !== "undefined") { - node.raw = raw; - } - - return node; -} - -function blockInstruction(label, instr, result) { - if (!(_typeof(instr) === "object" && typeof instr.length !== "undefined")) { - throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "BlockInstruction", - id: "block", - label: label, - instr: instr, - result: result - }; - return node; -} - -function callInstruction(index, instrArgs, numeric) { - if (instrArgs !== null && instrArgs !== undefined) { - if (!(_typeof(instrArgs) === "object" && typeof instrArgs.length !== "undefined")) { - throw new Error('typeof instrArgs === "object" && typeof instrArgs.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - var node = { - type: "CallInstruction", - id: "call", - index: index - }; - - if (typeof instrArgs !== "undefined" && instrArgs.length > 0) { - node.instrArgs = instrArgs; - } - - if (typeof numeric !== "undefined") { - node.numeric = numeric; - } - - return node; -} - -function callIndirectInstruction(signature, intrs) { - if (intrs !== null && intrs !== undefined) { - if (!(_typeof(intrs) === "object" && typeof intrs.length !== "undefined")) { - throw new Error('typeof intrs === "object" && typeof intrs.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - } - - var node = { - type: "CallIndirectInstruction", - id: "call_indirect", - signature: signature - }; - - if (typeof intrs !== "undefined" && intrs.length > 0) { - node.intrs = intrs; - } - - return node; -} - -function byteArray(values) { - if (!(_typeof(values) === "object" && typeof values.length !== "undefined")) { - throw new Error('typeof values === "object" && typeof values.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - var node = { - type: "ByteArray", - values: values - }; - return node; -} - -function func(name, signature, body, isExternal, metadata) { - if (!(_typeof(body) === "object" && typeof body.length !== "undefined")) { - throw new Error('typeof body === "object" && typeof body.length !== "undefined"' + " error: " + (undefined || "unknown")); - } - - if (isExternal !== null && isExternal !== undefined) { - if (!(typeof isExternal === "boolean")) { - throw new Error('typeof isExternal === "boolean"' + " error: " + ("Argument isExternal must be of type boolean, given: " + _typeof(isExternal) || 0)); - } - } - - var node = { - type: "Func", - name: name, - signature: signature, - body: body - }; - - if (isExternal === true) { - node.isExternal = true; - } - - if (typeof metadata !== "undefined") { - node.metadata = metadata; - } - - return node; -} - -function internalBrUnless(target) { - if (!(typeof target === "number")) { - throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); - } - - var node = { - type: "InternalBrUnless", - target: target - }; - return node; -} - -function internalGoto(target) { - if (!(typeof target === "number")) { - throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); - } - - var node = { - type: "InternalGoto", - target: target - }; - return node; -} - -function internalCallExtern(target) { - if (!(typeof target === "number")) { - throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); - } - - var node = { - type: "InternalCallExtern", - target: target - }; - return node; -} - -function internalEndAndReturn() { - var node = { - type: "InternalEndAndReturn" - }; - return node; -} - -var isModule = isTypeOf("Module"); -exports.isModule = isModule; -var isModuleMetadata = isTypeOf("ModuleMetadata"); -exports.isModuleMetadata = isModuleMetadata; -var isModuleNameMetadata = isTypeOf("ModuleNameMetadata"); -exports.isModuleNameMetadata = isModuleNameMetadata; -var isFunctionNameMetadata = isTypeOf("FunctionNameMetadata"); -exports.isFunctionNameMetadata = isFunctionNameMetadata; -var isLocalNameMetadata = isTypeOf("LocalNameMetadata"); -exports.isLocalNameMetadata = isLocalNameMetadata; -var isBinaryModule = isTypeOf("BinaryModule"); -exports.isBinaryModule = isBinaryModule; -var isQuoteModule = isTypeOf("QuoteModule"); -exports.isQuoteModule = isQuoteModule; -var isSectionMetadata = isTypeOf("SectionMetadata"); -exports.isSectionMetadata = isSectionMetadata; -var isProducersSectionMetadata = isTypeOf("ProducersSectionMetadata"); -exports.isProducersSectionMetadata = isProducersSectionMetadata; -var isProducerMetadata = isTypeOf("ProducerMetadata"); -exports.isProducerMetadata = isProducerMetadata; -var isProducerMetadataVersionedName = isTypeOf("ProducerMetadataVersionedName"); -exports.isProducerMetadataVersionedName = isProducerMetadataVersionedName; -var isLoopInstruction = isTypeOf("LoopInstruction"); -exports.isLoopInstruction = isLoopInstruction; -var isInstr = isTypeOf("Instr"); -exports.isInstr = isInstr; -var isIfInstruction = isTypeOf("IfInstruction"); -exports.isIfInstruction = isIfInstruction; -var isStringLiteral = isTypeOf("StringLiteral"); -exports.isStringLiteral = isStringLiteral; -var isNumberLiteral = isTypeOf("NumberLiteral"); -exports.isNumberLiteral = isNumberLiteral; -var isLongNumberLiteral = isTypeOf("LongNumberLiteral"); -exports.isLongNumberLiteral = isLongNumberLiteral; -var isFloatLiteral = isTypeOf("FloatLiteral"); -exports.isFloatLiteral = isFloatLiteral; -var isElem = isTypeOf("Elem"); -exports.isElem = isElem; -var isIndexInFuncSection = isTypeOf("IndexInFuncSection"); -exports.isIndexInFuncSection = isIndexInFuncSection; -var isValtypeLiteral = isTypeOf("ValtypeLiteral"); -exports.isValtypeLiteral = isValtypeLiteral; -var isTypeInstruction = isTypeOf("TypeInstruction"); -exports.isTypeInstruction = isTypeInstruction; -var isStart = isTypeOf("Start"); -exports.isStart = isStart; -var isGlobalType = isTypeOf("GlobalType"); -exports.isGlobalType = isGlobalType; -var isLeadingComment = isTypeOf("LeadingComment"); -exports.isLeadingComment = isLeadingComment; -var isBlockComment = isTypeOf("BlockComment"); -exports.isBlockComment = isBlockComment; -var isData = isTypeOf("Data"); -exports.isData = isData; -var isGlobal = isTypeOf("Global"); -exports.isGlobal = isGlobal; -var isTable = isTypeOf("Table"); -exports.isTable = isTable; -var isMemory = isTypeOf("Memory"); -exports.isMemory = isMemory; -var isFuncImportDescr = isTypeOf("FuncImportDescr"); -exports.isFuncImportDescr = isFuncImportDescr; -var isModuleImport = isTypeOf("ModuleImport"); -exports.isModuleImport = isModuleImport; -var isModuleExportDescr = isTypeOf("ModuleExportDescr"); -exports.isModuleExportDescr = isModuleExportDescr; -var isModuleExport = isTypeOf("ModuleExport"); -exports.isModuleExport = isModuleExport; -var isLimit = isTypeOf("Limit"); -exports.isLimit = isLimit; -var isSignature = isTypeOf("Signature"); -exports.isSignature = isSignature; -var isProgram = isTypeOf("Program"); -exports.isProgram = isProgram; -var isIdentifier = isTypeOf("Identifier"); -exports.isIdentifier = isIdentifier; -var isBlockInstruction = isTypeOf("BlockInstruction"); -exports.isBlockInstruction = isBlockInstruction; -var isCallInstruction = isTypeOf("CallInstruction"); -exports.isCallInstruction = isCallInstruction; -var isCallIndirectInstruction = isTypeOf("CallIndirectInstruction"); -exports.isCallIndirectInstruction = isCallIndirectInstruction; -var isByteArray = isTypeOf("ByteArray"); -exports.isByteArray = isByteArray; -var isFunc = isTypeOf("Func"); -exports.isFunc = isFunc; -var isInternalBrUnless = isTypeOf("InternalBrUnless"); -exports.isInternalBrUnless = isInternalBrUnless; -var isInternalGoto = isTypeOf("InternalGoto"); -exports.isInternalGoto = isInternalGoto; -var isInternalCallExtern = isTypeOf("InternalCallExtern"); -exports.isInternalCallExtern = isInternalCallExtern; -var isInternalEndAndReturn = isTypeOf("InternalEndAndReturn"); -exports.isInternalEndAndReturn = isInternalEndAndReturn; - -var isNode = function isNode(node) { - return isModule(node) || isModuleMetadata(node) || isModuleNameMetadata(node) || isFunctionNameMetadata(node) || isLocalNameMetadata(node) || isBinaryModule(node) || isQuoteModule(node) || isSectionMetadata(node) || isProducersSectionMetadata(node) || isProducerMetadata(node) || isProducerMetadataVersionedName(node) || isLoopInstruction(node) || isInstr(node) || isIfInstruction(node) || isStringLiteral(node) || isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node) || isElem(node) || isIndexInFuncSection(node) || isValtypeLiteral(node) || isTypeInstruction(node) || isStart(node) || isGlobalType(node) || isLeadingComment(node) || isBlockComment(node) || isData(node) || isGlobal(node) || isTable(node) || isMemory(node) || isFuncImportDescr(node) || isModuleImport(node) || isModuleExportDescr(node) || isModuleExport(node) || isLimit(node) || isSignature(node) || isProgram(node) || isIdentifier(node) || isBlockInstruction(node) || isCallInstruction(node) || isCallIndirectInstruction(node) || isByteArray(node) || isFunc(node) || isInternalBrUnless(node) || isInternalGoto(node) || isInternalCallExtern(node) || isInternalEndAndReturn(node); -}; - -exports.isNode = isNode; - -var isBlock = function isBlock(node) { - return isLoopInstruction(node) || isBlockInstruction(node) || isFunc(node); -}; - -exports.isBlock = isBlock; - -var isInstruction = function isInstruction(node) { - return isLoopInstruction(node) || isInstr(node) || isIfInstruction(node) || isTypeInstruction(node) || isBlockInstruction(node) || isCallInstruction(node) || isCallIndirectInstruction(node); -}; - -exports.isInstruction = isInstruction; - -var isExpression = function isExpression(node) { - return isInstr(node) || isStringLiteral(node) || isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node) || isValtypeLiteral(node) || isIdentifier(node); -}; - -exports.isExpression = isExpression; - -var isNumericLiteral = function isNumericLiteral(node) { - return isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node); -}; - -exports.isNumericLiteral = isNumericLiteral; - -var isImportDescr = function isImportDescr(node) { - return isGlobalType(node) || isTable(node) || isMemory(node) || isFuncImportDescr(node); -}; - -exports.isImportDescr = isImportDescr; - -var isIntrinsic = function isIntrinsic(node) { - return isInternalBrUnless(node) || isInternalGoto(node) || isInternalCallExtern(node) || isInternalEndAndReturn(node); -}; - -exports.isIntrinsic = isIntrinsic; -var assertModule = assertTypeOf("Module"); -exports.assertModule = assertModule; -var assertModuleMetadata = assertTypeOf("ModuleMetadata"); -exports.assertModuleMetadata = assertModuleMetadata; -var assertModuleNameMetadata = assertTypeOf("ModuleNameMetadata"); -exports.assertModuleNameMetadata = assertModuleNameMetadata; -var assertFunctionNameMetadata = assertTypeOf("FunctionNameMetadata"); -exports.assertFunctionNameMetadata = assertFunctionNameMetadata; -var assertLocalNameMetadata = assertTypeOf("LocalNameMetadata"); -exports.assertLocalNameMetadata = assertLocalNameMetadata; -var assertBinaryModule = assertTypeOf("BinaryModule"); -exports.assertBinaryModule = assertBinaryModule; -var assertQuoteModule = assertTypeOf("QuoteModule"); -exports.assertQuoteModule = assertQuoteModule; -var assertSectionMetadata = assertTypeOf("SectionMetadata"); -exports.assertSectionMetadata = assertSectionMetadata; -var assertProducersSectionMetadata = assertTypeOf("ProducersSectionMetadata"); -exports.assertProducersSectionMetadata = assertProducersSectionMetadata; -var assertProducerMetadata = assertTypeOf("ProducerMetadata"); -exports.assertProducerMetadata = assertProducerMetadata; -var assertProducerMetadataVersionedName = assertTypeOf("ProducerMetadataVersionedName"); -exports.assertProducerMetadataVersionedName = assertProducerMetadataVersionedName; -var assertLoopInstruction = assertTypeOf("LoopInstruction"); -exports.assertLoopInstruction = assertLoopInstruction; -var assertInstr = assertTypeOf("Instr"); -exports.assertInstr = assertInstr; -var assertIfInstruction = assertTypeOf("IfInstruction"); -exports.assertIfInstruction = assertIfInstruction; -var assertStringLiteral = assertTypeOf("StringLiteral"); -exports.assertStringLiteral = assertStringLiteral; -var assertNumberLiteral = assertTypeOf("NumberLiteral"); -exports.assertNumberLiteral = assertNumberLiteral; -var assertLongNumberLiteral = assertTypeOf("LongNumberLiteral"); -exports.assertLongNumberLiteral = assertLongNumberLiteral; -var assertFloatLiteral = assertTypeOf("FloatLiteral"); -exports.assertFloatLiteral = assertFloatLiteral; -var assertElem = assertTypeOf("Elem"); -exports.assertElem = assertElem; -var assertIndexInFuncSection = assertTypeOf("IndexInFuncSection"); -exports.assertIndexInFuncSection = assertIndexInFuncSection; -var assertValtypeLiteral = assertTypeOf("ValtypeLiteral"); -exports.assertValtypeLiteral = assertValtypeLiteral; -var assertTypeInstruction = assertTypeOf("TypeInstruction"); -exports.assertTypeInstruction = assertTypeInstruction; -var assertStart = assertTypeOf("Start"); -exports.assertStart = assertStart; -var assertGlobalType = assertTypeOf("GlobalType"); -exports.assertGlobalType = assertGlobalType; -var assertLeadingComment = assertTypeOf("LeadingComment"); -exports.assertLeadingComment = assertLeadingComment; -var assertBlockComment = assertTypeOf("BlockComment"); -exports.assertBlockComment = assertBlockComment; -var assertData = assertTypeOf("Data"); -exports.assertData = assertData; -var assertGlobal = assertTypeOf("Global"); -exports.assertGlobal = assertGlobal; -var assertTable = assertTypeOf("Table"); -exports.assertTable = assertTable; -var assertMemory = assertTypeOf("Memory"); -exports.assertMemory = assertMemory; -var assertFuncImportDescr = assertTypeOf("FuncImportDescr"); -exports.assertFuncImportDescr = assertFuncImportDescr; -var assertModuleImport = assertTypeOf("ModuleImport"); -exports.assertModuleImport = assertModuleImport; -var assertModuleExportDescr = assertTypeOf("ModuleExportDescr"); -exports.assertModuleExportDescr = assertModuleExportDescr; -var assertModuleExport = assertTypeOf("ModuleExport"); -exports.assertModuleExport = assertModuleExport; -var assertLimit = assertTypeOf("Limit"); -exports.assertLimit = assertLimit; -var assertSignature = assertTypeOf("Signature"); -exports.assertSignature = assertSignature; -var assertProgram = assertTypeOf("Program"); -exports.assertProgram = assertProgram; -var assertIdentifier = assertTypeOf("Identifier"); -exports.assertIdentifier = assertIdentifier; -var assertBlockInstruction = assertTypeOf("BlockInstruction"); -exports.assertBlockInstruction = assertBlockInstruction; -var assertCallInstruction = assertTypeOf("CallInstruction"); -exports.assertCallInstruction = assertCallInstruction; -var assertCallIndirectInstruction = assertTypeOf("CallIndirectInstruction"); -exports.assertCallIndirectInstruction = assertCallIndirectInstruction; -var assertByteArray = assertTypeOf("ByteArray"); -exports.assertByteArray = assertByteArray; -var assertFunc = assertTypeOf("Func"); -exports.assertFunc = assertFunc; -var assertInternalBrUnless = assertTypeOf("InternalBrUnless"); -exports.assertInternalBrUnless = assertInternalBrUnless; -var assertInternalGoto = assertTypeOf("InternalGoto"); -exports.assertInternalGoto = assertInternalGoto; -var assertInternalCallExtern = assertTypeOf("InternalCallExtern"); -exports.assertInternalCallExtern = assertInternalCallExtern; -var assertInternalEndAndReturn = assertTypeOf("InternalEndAndReturn"); -exports.assertInternalEndAndReturn = assertInternalEndAndReturn; -var unionTypesMap = { - Module: ["Node"], - ModuleMetadata: ["Node"], - ModuleNameMetadata: ["Node"], - FunctionNameMetadata: ["Node"], - LocalNameMetadata: ["Node"], - BinaryModule: ["Node"], - QuoteModule: ["Node"], - SectionMetadata: ["Node"], - ProducersSectionMetadata: ["Node"], - ProducerMetadata: ["Node"], - ProducerMetadataVersionedName: ["Node"], - LoopInstruction: ["Node", "Block", "Instruction"], - Instr: ["Node", "Expression", "Instruction"], - IfInstruction: ["Node", "Instruction"], - StringLiteral: ["Node", "Expression"], - NumberLiteral: ["Node", "NumericLiteral", "Expression"], - LongNumberLiteral: ["Node", "NumericLiteral", "Expression"], - FloatLiteral: ["Node", "NumericLiteral", "Expression"], - Elem: ["Node"], - IndexInFuncSection: ["Node"], - ValtypeLiteral: ["Node", "Expression"], - TypeInstruction: ["Node", "Instruction"], - Start: ["Node"], - GlobalType: ["Node", "ImportDescr"], - LeadingComment: ["Node"], - BlockComment: ["Node"], - Data: ["Node"], - Global: ["Node"], - Table: ["Node", "ImportDescr"], - Memory: ["Node", "ImportDescr"], - FuncImportDescr: ["Node", "ImportDescr"], - ModuleImport: ["Node"], - ModuleExportDescr: ["Node"], - ModuleExport: ["Node"], - Limit: ["Node"], - Signature: ["Node"], - Program: ["Node"], - Identifier: ["Node", "Expression"], - BlockInstruction: ["Node", "Block", "Instruction"], - CallInstruction: ["Node", "Instruction"], - CallIndirectInstruction: ["Node", "Instruction"], - ByteArray: ["Node"], - Func: ["Node", "Block"], - InternalBrUnless: ["Node", "Intrinsic"], - InternalGoto: ["Node", "Intrinsic"], - InternalCallExtern: ["Node", "Intrinsic"], - InternalEndAndReturn: ["Node", "Intrinsic"] -}; -exports.unionTypesMap = unionTypesMap; -var nodeAndUnionTypes = ["Module", "ModuleMetadata", "ModuleNameMetadata", "FunctionNameMetadata", "LocalNameMetadata", "BinaryModule", "QuoteModule", "SectionMetadata", "ProducersSectionMetadata", "ProducerMetadata", "ProducerMetadataVersionedName", "LoopInstruction", "Instr", "IfInstruction", "StringLiteral", "NumberLiteral", "LongNumberLiteral", "FloatLiteral", "Elem", "IndexInFuncSection", "ValtypeLiteral", "TypeInstruction", "Start", "GlobalType", "LeadingComment", "BlockComment", "Data", "Global", "Table", "Memory", "FuncImportDescr", "ModuleImport", "ModuleExportDescr", "ModuleExport", "Limit", "Signature", "Program", "Identifier", "BlockInstruction", "CallInstruction", "CallIndirectInstruction", "ByteArray", "Func", "InternalBrUnless", "InternalGoto", "InternalCallExtern", "InternalEndAndReturn", "Node", "Block", "Instruction", "Expression", "NumericLiteral", "ImportDescr", "Intrinsic"]; -exports.nodeAndUnionTypes = nodeAndUnionTypes; - -/***/ }), - -/***/ 63427: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.signatures = void 0; - -function sign(input, output) { - return [input, output]; -} - -var u32 = "u32"; -var i32 = "i32"; -var i64 = "i64"; -var f32 = "f32"; -var f64 = "f64"; - -var vector = function vector(t) { - var vecType = [t]; // $FlowIgnore - - vecType.vector = true; - return vecType; -}; - -var controlInstructions = { - unreachable: sign([], []), - nop: sign([], []), - // block ? - // loop ? - // if ? - // if else ? - br: sign([u32], []), - br_if: sign([u32], []), - br_table: sign(vector(u32), []), - return: sign([], []), - call: sign([u32], []), - call_indirect: sign([u32], []) -}; -var parametricInstructions = { - drop: sign([], []), - select: sign([], []) -}; -var variableInstructions = { - get_local: sign([u32], []), - set_local: sign([u32], []), - tee_local: sign([u32], []), - get_global: sign([u32], []), - set_global: sign([u32], []) -}; -var memoryInstructions = { - "i32.load": sign([u32, u32], [i32]), - "i64.load": sign([u32, u32], []), - "f32.load": sign([u32, u32], []), - "f64.load": sign([u32, u32], []), - "i32.load8_s": sign([u32, u32], [i32]), - "i32.load8_u": sign([u32, u32], [i32]), - "i32.load16_s": sign([u32, u32], [i32]), - "i32.load16_u": sign([u32, u32], [i32]), - "i64.load8_s": sign([u32, u32], [i64]), - "i64.load8_u": sign([u32, u32], [i64]), - "i64.load16_s": sign([u32, u32], [i64]), - "i64.load16_u": sign([u32, u32], [i64]), - "i64.load32_s": sign([u32, u32], [i64]), - "i64.load32_u": sign([u32, u32], [i64]), - "i32.store": sign([u32, u32], []), - "i64.store": sign([u32, u32], []), - "f32.store": sign([u32, u32], []), - "f64.store": sign([u32, u32], []), - "i32.store8": sign([u32, u32], []), - "i32.store16": sign([u32, u32], []), - "i64.store8": sign([u32, u32], []), - "i64.store16": sign([u32, u32], []), - "i64.store32": sign([u32, u32], []), - current_memory: sign([], []), - grow_memory: sign([], []) -}; -var numericInstructions = { - "i32.const": sign([i32], [i32]), - "i64.const": sign([i64], [i64]), - "f32.const": sign([f32], [f32]), - "f64.const": sign([f64], [f64]), - "i32.eqz": sign([i32], [i32]), - "i32.eq": sign([i32, i32], [i32]), - "i32.ne": sign([i32, i32], [i32]), - "i32.lt_s": sign([i32, i32], [i32]), - "i32.lt_u": sign([i32, i32], [i32]), - "i32.gt_s": sign([i32, i32], [i32]), - "i32.gt_u": sign([i32, i32], [i32]), - "i32.le_s": sign([i32, i32], [i32]), - "i32.le_u": sign([i32, i32], [i32]), - "i32.ge_s": sign([i32, i32], [i32]), - "i32.ge_u": sign([i32, i32], [i32]), - "i64.eqz": sign([i64], [i64]), - "i64.eq": sign([i64, i64], [i32]), - "i64.ne": sign([i64, i64], [i32]), - "i64.lt_s": sign([i64, i64], [i32]), - "i64.lt_u": sign([i64, i64], [i32]), - "i64.gt_s": sign([i64, i64], [i32]), - "i64.gt_u": sign([i64, i64], [i32]), - "i64.le_s": sign([i64, i64], [i32]), - "i64.le_u": sign([i64, i64], [i32]), - "i64.ge_s": sign([i64, i64], [i32]), - "i64.ge_u": sign([i64, i64], [i32]), - "f32.eq": sign([f32, f32], [i32]), - "f32.ne": sign([f32, f32], [i32]), - "f32.lt": sign([f32, f32], [i32]), - "f32.gt": sign([f32, f32], [i32]), - "f32.le": sign([f32, f32], [i32]), - "f32.ge": sign([f32, f32], [i32]), - "f64.eq": sign([f64, f64], [i32]), - "f64.ne": sign([f64, f64], [i32]), - "f64.lt": sign([f64, f64], [i32]), - "f64.gt": sign([f64, f64], [i32]), - "f64.le": sign([f64, f64], [i32]), - "f64.ge": sign([f64, f64], [i32]), - "i32.clz": sign([i32], [i32]), - "i32.ctz": sign([i32], [i32]), - "i32.popcnt": sign([i32], [i32]), - "i32.add": sign([i32, i32], [i32]), - "i32.sub": sign([i32, i32], [i32]), - "i32.mul": sign([i32, i32], [i32]), - "i32.div_s": sign([i32, i32], [i32]), - "i32.div_u": sign([i32, i32], [i32]), - "i32.rem_s": sign([i32, i32], [i32]), - "i32.rem_u": sign([i32, i32], [i32]), - "i32.and": sign([i32, i32], [i32]), - "i32.or": sign([i32, i32], [i32]), - "i32.xor": sign([i32, i32], [i32]), - "i32.shl": sign([i32, i32], [i32]), - "i32.shr_s": sign([i32, i32], [i32]), - "i32.shr_u": sign([i32, i32], [i32]), - "i32.rotl": sign([i32, i32], [i32]), - "i32.rotr": sign([i32, i32], [i32]), - "i64.clz": sign([i64], [i64]), - "i64.ctz": sign([i64], [i64]), - "i64.popcnt": sign([i64], [i64]), - "i64.add": sign([i64, i64], [i64]), - "i64.sub": sign([i64, i64], [i64]), - "i64.mul": sign([i64, i64], [i64]), - "i64.div_s": sign([i64, i64], [i64]), - "i64.div_u": sign([i64, i64], [i64]), - "i64.rem_s": sign([i64, i64], [i64]), - "i64.rem_u": sign([i64, i64], [i64]), - "i64.and": sign([i64, i64], [i64]), - "i64.or": sign([i64, i64], [i64]), - "i64.xor": sign([i64, i64], [i64]), - "i64.shl": sign([i64, i64], [i64]), - "i64.shr_s": sign([i64, i64], [i64]), - "i64.shr_u": sign([i64, i64], [i64]), - "i64.rotl": sign([i64, i64], [i64]), - "i64.rotr": sign([i64, i64], [i64]), - "f32.abs": sign([f32], [f32]), - "f32.neg": sign([f32], [f32]), - "f32.ceil": sign([f32], [f32]), - "f32.floor": sign([f32], [f32]), - "f32.trunc": sign([f32], [f32]), - "f32.nearest": sign([f32], [f32]), - "f32.sqrt": sign([f32], [f32]), - "f32.add": sign([f32, f32], [f32]), - "f32.sub": sign([f32, f32], [f32]), - "f32.mul": sign([f32, f32], [f32]), - "f32.div": sign([f32, f32], [f32]), - "f32.min": sign([f32, f32], [f32]), - "f32.max": sign([f32, f32], [f32]), - "f32.copysign": sign([f32, f32], [f32]), - "f64.abs": sign([f64], [f64]), - "f64.neg": sign([f64], [f64]), - "f64.ceil": sign([f64], [f64]), - "f64.floor": sign([f64], [f64]), - "f64.trunc": sign([f64], [f64]), - "f64.nearest": sign([f64], [f64]), - "f64.sqrt": sign([f64], [f64]), - "f64.add": sign([f64, f64], [f64]), - "f64.sub": sign([f64, f64], [f64]), - "f64.mul": sign([f64, f64], [f64]), - "f64.div": sign([f64, f64], [f64]), - "f64.min": sign([f64, f64], [f64]), - "f64.max": sign([f64, f64], [f64]), - "f64.copysign": sign([f64, f64], [f64]), - "i32.wrap/i64": sign([i64], [i32]), - "i32.trunc_s/f32": sign([f32], [i32]), - "i32.trunc_u/f32": sign([f32], [i32]), - "i32.trunc_s/f64": sign([f32], [i32]), - "i32.trunc_u/f64": sign([f64], [i32]), - "i64.extend_s/i32": sign([i32], [i64]), - "i64.extend_u/i32": sign([i32], [i64]), - "i64.trunc_s/f32": sign([f32], [i64]), - "i64.trunc_u/f32": sign([f32], [i64]), - "i64.trunc_s/f64": sign([f64], [i64]), - "i64.trunc_u/f64": sign([f64], [i64]), - "f32.convert_s/i32": sign([i32], [f32]), - "f32.convert_u/i32": sign([i32], [f32]), - "f32.convert_s/i64": sign([i64], [f32]), - "f32.convert_u/i64": sign([i64], [f32]), - "f32.demote/f64": sign([f64], [f32]), - "f64.convert_s/i32": sign([i32], [f64]), - "f64.convert_u/i32": sign([i32], [f64]), - "f64.convert_s/i64": sign([i64], [f64]), - "f64.convert_u/i64": sign([i64], [f64]), - "f64.promote/f32": sign([f32], [f64]), - "i32.reinterpret/f32": sign([f32], [i32]), - "i64.reinterpret/f64": sign([f64], [i64]), - "f32.reinterpret/i32": sign([i32], [f32]), - "f64.reinterpret/i64": sign([i64], [f64]) -}; -var signatures = Object.assign({}, controlInstructions, parametricInstructions, variableInstructions, memoryInstructions, numericInstructions); -exports.signatures = signatures; - -/***/ }), - -/***/ 19741: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.moduleContextFromModuleAST = moduleContextFromModuleAST; -exports.ModuleContext = void 0; - -var _nodes = __webpack_require__(23033); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function moduleContextFromModuleAST(m) { - var moduleContext = new ModuleContext(); - - if (!(m.type === "Module")) { - throw new Error('m.type === "Module"' + " error: " + (undefined || "unknown")); - } - - m.fields.forEach(function (field) { - switch (field.type) { - case "Start": - { - moduleContext.setStart(field.index); - break; - } - - case "TypeInstruction": - { - moduleContext.addType(field); - break; - } - - case "Func": - { - moduleContext.addFunction(field); - break; - } - - case "Global": - { - moduleContext.defineGlobal(field); - break; - } - - case "ModuleImport": - { - switch (field.descr.type) { - case "GlobalType": - { - moduleContext.importGlobal(field.descr.valtype, field.descr.mutability); - break; - } - - case "Memory": - { - moduleContext.addMemory(field.descr.limits.min, field.descr.limits.max); - break; - } - - case "FuncImportDescr": - { - moduleContext.importFunction(field.descr); - break; - } - - case "Table": - { - // FIXME(sven): not implemented yet - break; - } - - default: - throw new Error("Unsupported ModuleImport of type " + JSON.stringify(field.descr.type)); - } - - break; - } - - case "Memory": - { - moduleContext.addMemory(field.limits.min, field.limits.max); - break; - } - } - }); - return moduleContext; -} -/** - * Module context for type checking - */ - - -var ModuleContext = -/*#__PURE__*/ -function () { - function ModuleContext() { - _classCallCheck(this, ModuleContext); - - this.funcs = []; - this.funcsOffsetByIdentifier = []; - this.types = []; - this.globals = []; - this.globalsOffsetByIdentifier = []; - this.mems = []; // Current stack frame - - this.locals = []; - this.labels = []; - this.return = []; - this.debugName = "unknown"; - this.start = null; - } - /** - * Set start segment - */ - - - _createClass(ModuleContext, [{ - key: "setStart", - value: function setStart(index) { - this.start = index.value; - } - /** - * Get start function - */ - - }, { - key: "getStart", - value: function getStart() { - return this.start; - } - /** - * Reset the active stack frame - */ - - }, { - key: "newContext", - value: function newContext(debugName, expectedResult) { - this.locals = []; - this.labels = [expectedResult]; - this.return = expectedResult; - this.debugName = debugName; - } - /** - * Functions - */ - - }, { - key: "addFunction", - value: function addFunction(func - /*: Func*/ - ) { - // eslint-disable-next-line prefer-const - var _ref = func.signature || {}, - _ref$params = _ref.params, - args = _ref$params === void 0 ? [] : _ref$params, - _ref$results = _ref.results, - result = _ref$results === void 0 ? [] : _ref$results; - - args = args.map(function (arg) { - return arg.valtype; - }); - this.funcs.push({ - args: args, - result: result - }); - - if (typeof func.name !== "undefined") { - this.funcsOffsetByIdentifier[func.name.value] = this.funcs.length - 1; - } - } - }, { - key: "importFunction", - value: function importFunction(funcimport) { - if ((0, _nodes.isSignature)(funcimport.signature)) { - // eslint-disable-next-line prefer-const - var _funcimport$signature = funcimport.signature, - args = _funcimport$signature.params, - result = _funcimport$signature.results; - args = args.map(function (arg) { - return arg.valtype; - }); - this.funcs.push({ - args: args, - result: result - }); - } else { - if (!(0, _nodes.isNumberLiteral)(funcimport.signature)) { - throw new Error('isNumberLiteral(funcimport.signature)' + " error: " + (undefined || "unknown")); - } - - var typeId = funcimport.signature.value; - - if (!this.hasType(typeId)) { - throw new Error('this.hasType(typeId)' + " error: " + (undefined || "unknown")); - } - - var signature = this.getType(typeId); - this.funcs.push({ - args: signature.params.map(function (arg) { - return arg.valtype; - }), - result: signature.results - }); - } - - if (typeof funcimport.id !== "undefined") { - // imports are first, we can assume their index in the array - this.funcsOffsetByIdentifier[funcimport.id.value] = this.funcs.length - 1; - } - } - }, { - key: "hasFunction", - value: function hasFunction(index) { - return typeof this.getFunction(index) !== "undefined"; - } - }, { - key: "getFunction", - value: function getFunction(index) { - if (typeof index !== "number") { - throw new Error("getFunction only supported for number index"); - } - - return this.funcs[index]; - } - }, { - key: "getFunctionOffsetByIdentifier", - value: function getFunctionOffsetByIdentifier(name) { - if (!(typeof name === "string")) { - throw new Error('typeof name === "string"' + " error: " + (undefined || "unknown")); - } - - return this.funcsOffsetByIdentifier[name]; - } - /** - * Labels - */ - - }, { - key: "addLabel", - value: function addLabel(result) { - this.labels.unshift(result); - } - }, { - key: "hasLabel", - value: function hasLabel(index) { - return this.labels.length > index && index >= 0; - } - }, { - key: "getLabel", - value: function getLabel(index) { - return this.labels[index]; - } - }, { - key: "popLabel", - value: function popLabel() { - this.labels.shift(); - } - /** - * Locals - */ - - }, { - key: "hasLocal", - value: function hasLocal(index) { - return typeof this.getLocal(index) !== "undefined"; - } - }, { - key: "getLocal", - value: function getLocal(index) { - return this.locals[index]; - } - }, { - key: "addLocal", - value: function addLocal(type) { - this.locals.push(type); - } - /** - * Types - */ - - }, { - key: "addType", - value: function addType(type) { - if (!(type.functype.type === "Signature")) { - throw new Error('type.functype.type === "Signature"' + " error: " + (undefined || "unknown")); - } - - this.types.push(type.functype); - } - }, { - key: "hasType", - value: function hasType(index) { - return this.types[index] !== undefined; - } - }, { - key: "getType", - value: function getType(index) { - return this.types[index]; - } - /** - * Globals - */ - - }, { - key: "hasGlobal", - value: function hasGlobal(index) { - return this.globals.length > index && index >= 0; - } - }, { - key: "getGlobal", - value: function getGlobal(index) { - return this.globals[index].type; - } - }, { - key: "getGlobalOffsetByIdentifier", - value: function getGlobalOffsetByIdentifier(name) { - if (!(typeof name === "string")) { - throw new Error('typeof name === "string"' + " error: " + (undefined || "unknown")); - } - - return this.globalsOffsetByIdentifier[name]; - } - }, { - key: "defineGlobal", - value: function defineGlobal(global - /*: Global*/ - ) { - var type = global.globalType.valtype; - var mutability = global.globalType.mutability; - this.globals.push({ - type: type, - mutability: mutability - }); - - if (typeof global.name !== "undefined") { - this.globalsOffsetByIdentifier[global.name.value] = this.globals.length - 1; - } - } - }, { - key: "importGlobal", - value: function importGlobal(type, mutability) { - this.globals.push({ - type: type, - mutability: mutability - }); - } - }, { - key: "isMutableGlobal", - value: function isMutableGlobal(index) { - return this.globals[index].mutability === "var"; - } - }, { - key: "isImmutableGlobal", - value: function isImmutableGlobal(index) { - return this.globals[index].mutability === "const"; - } - /** - * Memories - */ - - }, { - key: "hasMemory", - value: function hasMemory(index) { - return this.mems.length > index && index >= 0; - } - }, { - key: "addMemory", - value: function addMemory(min, max) { - this.mems.push({ - min: min, - max: max - }); - } - }, { - key: "getMemory", - value: function getMemory(index) { - return this.mems[index]; - } - }]); - - return ModuleContext; -}(); - -exports.ModuleContext = ModuleContext; - -/***/ }), - -/***/ 31109: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.traverse = traverse; - -var _nodePath = __webpack_require__(33301); - -var _nodes = __webpack_require__(23033); - -// recursively walks the AST starting at the given node. The callback is invoked for -// and object that has a 'type' property. -function walk(context, callback) { - var stop = false; - - function innerWalk(context, callback) { - if (stop) { - return; - } - - var node = context.node; - - if (node === undefined) { - console.warn("traversing with an empty context"); - return; - } - - if (node._deleted === true) { - return; - } - - var path = (0, _nodePath.createPath)(context); - callback(node.type, path); - - if (path.shouldStop) { - stop = true; - return; - } - - Object.keys(node).forEach(function (prop) { - var value = node[prop]; - - if (value === null || value === undefined) { - return; - } - - var valueAsArray = Array.isArray(value) ? value : [value]; - valueAsArray.forEach(function (childNode) { - if (typeof childNode.type === "string") { - var childContext = { - node: childNode, - parentKey: prop, - parentPath: path, - shouldStop: false, - inList: Array.isArray(value) - }; - innerWalk(childContext, callback); - } - }); - }); - } - - innerWalk(context, callback); -} - -var noop = function noop() {}; - -function traverse(node, visitors) { - var before = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; - var after = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; - Object.keys(visitors).forEach(function (visitor) { - if (!_nodes.nodeAndUnionTypes.includes(visitor)) { - throw new Error("Unexpected visitor ".concat(visitor)); - } - }); - var context = { - node: node, - inList: false, - shouldStop: false, - parentPath: null, - parentKey: null - }; - walk(context, function (type, path) { - if (typeof visitors[type] === "function") { - before(type, path); - visitors[type](path); - after(type, path); - } - - var unionTypes = _nodes.unionTypesMap[type]; - - if (!unionTypes) { - throw new Error("Unexpected node type ".concat(type)); - } - - unionTypes.forEach(function (unionType) { - if (typeof visitors[unionType] === "function") { - before(unionType, path); - visitors[unionType](path); - after(unionType, path); - } - }); - }); -} - -/***/ }), - -/***/ 32727: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isAnonymous = isAnonymous; -exports.getSectionMetadata = getSectionMetadata; -exports.getSectionMetadatas = getSectionMetadatas; -exports.sortSectionMetadata = sortSectionMetadata; -exports.orderedInsertNode = orderedInsertNode; -exports.assertHasLoc = assertHasLoc; -exports.getEndOfSection = getEndOfSection; -exports.shiftLoc = shiftLoc; -exports.shiftSection = shiftSection; -exports.signatureForOpcode = signatureForOpcode; -exports.getUniqueNameGenerator = getUniqueNameGenerator; -exports.getStartByteOffset = getStartByteOffset; -exports.getEndByteOffset = getEndByteOffset; -exports.getFunctionBeginingByteOffset = getFunctionBeginingByteOffset; -exports.getEndBlockByteOffset = getEndBlockByteOffset; -exports.getStartBlockByteOffset = getStartBlockByteOffset; - -var _signatures = __webpack_require__(63427); - -var _traverse = __webpack_require__(31109); - -var _helperWasmBytecode = _interopRequireWildcard(__webpack_require__(67658)); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function isAnonymous(ident) { - return ident.raw === ""; -} - -function getSectionMetadata(ast, name) { - var section; - (0, _traverse.traverse)(ast, { - SectionMetadata: function (_SectionMetadata) { - function SectionMetadata(_x) { - return _SectionMetadata.apply(this, arguments); - } - - SectionMetadata.toString = function () { - return _SectionMetadata.toString(); - }; - - return SectionMetadata; - }(function (_ref) { - var node = _ref.node; - - if (node.section === name) { - section = node; - } - }) - }); - return section; -} - -function getSectionMetadatas(ast, name) { - var sections = []; - (0, _traverse.traverse)(ast, { - SectionMetadata: function (_SectionMetadata2) { - function SectionMetadata(_x2) { - return _SectionMetadata2.apply(this, arguments); - } - - SectionMetadata.toString = function () { - return _SectionMetadata2.toString(); - }; - - return SectionMetadata; - }(function (_ref2) { - var node = _ref2.node; - - if (node.section === name) { - sections.push(node); - } - }) - }); - return sections; -} - -function sortSectionMetadata(m) { - if (m.metadata == null) { - console.warn("sortSectionMetadata: no metadata to sort"); - return; - } // $FlowIgnore - - - m.metadata.sections.sort(function (a, b) { - var aId = _helperWasmBytecode.default.sections[a.section]; - var bId = _helperWasmBytecode.default.sections[b.section]; - - if (typeof aId !== "number" || typeof bId !== "number") { - throw new Error("Section id not found"); - } - - return aId - bId; - }); -} - -function orderedInsertNode(m, n) { - assertHasLoc(n); - var didInsert = false; - - if (n.type === "ModuleExport") { - m.fields.push(n); - return; - } - - m.fields = m.fields.reduce(function (acc, field) { - var fieldEndCol = Infinity; - - if (field.loc != null) { - // $FlowIgnore - fieldEndCol = field.loc.end.column; - } // $FlowIgnore: assertHasLoc ensures that - - - if (didInsert === false && n.loc.start.column < fieldEndCol) { - didInsert = true; - acc.push(n); - } - - acc.push(field); - return acc; - }, []); // Handles empty modules or n is the last element - - if (didInsert === false) { - m.fields.push(n); - } -} - -function assertHasLoc(n) { - if (n.loc == null || n.loc.start == null || n.loc.end == null) { - throw new Error("Internal failure: node (".concat(JSON.stringify(n.type), ") has no location information")); - } -} - -function getEndOfSection(s) { - assertHasLoc(s.size); - return s.startOffset + s.size.value + ( // $FlowIgnore - s.size.loc.end.column - s.size.loc.start.column); -} - -function shiftLoc(node, delta) { - // $FlowIgnore - node.loc.start.column += delta; // $FlowIgnore - - node.loc.end.column += delta; -} - -function shiftSection(ast, node, delta) { - if (node.type !== "SectionMetadata") { - throw new Error("Can not shift node " + JSON.stringify(node.type)); - } - - node.startOffset += delta; - - if (_typeof(node.size.loc) === "object") { - shiftLoc(node.size, delta); - } // Custom sections doesn't have vectorOfSize - - - if (_typeof(node.vectorOfSize) === "object" && _typeof(node.vectorOfSize.loc) === "object") { - shiftLoc(node.vectorOfSize, delta); - } - - var sectionName = node.section; // shift node locations within that section - - (0, _traverse.traverse)(ast, { - Node: function Node(_ref3) { - var node = _ref3.node; - var section = (0, _helperWasmBytecode.getSectionForNode)(node); - - if (section === sectionName && _typeof(node.loc) === "object") { - shiftLoc(node, delta); - } - } - }); -} - -function signatureForOpcode(object, name) { - var opcodeName = name; - - if (object !== undefined && object !== "") { - opcodeName = object + "." + name; - } - - var sign = _signatures.signatures[opcodeName]; - - if (sign == undefined) { - // TODO: Uncomment this when br_table and others has been done - //throw new Error("Invalid opcode: "+opcodeName); - return [object, object]; - } - - return sign[0]; -} - -function getUniqueNameGenerator() { - var inc = {}; - return function () { - var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - if (!(prefix in inc)) { - inc[prefix] = 0; - } else { - inc[prefix] = inc[prefix] + 1; - } - - return prefix + "_" + inc[prefix]; - }; -} - -function getStartByteOffset(n) { - // $FlowIgnore - if (typeof n.loc === "undefined" || typeof n.loc.start === "undefined") { - throw new Error( // $FlowIgnore - "Can not get byte offset without loc informations, node: " + String(n.id)); - } - - return n.loc.start.column; -} - -function getEndByteOffset(n) { - // $FlowIgnore - if (typeof n.loc === "undefined" || typeof n.loc.end === "undefined") { - throw new Error("Can not get byte offset without loc informations, node: " + n.type); - } - - return n.loc.end.column; -} - -function getFunctionBeginingByteOffset(n) { - if (!(n.body.length > 0)) { - throw new Error('n.body.length > 0' + " error: " + (undefined || "unknown")); - } - - var _n$body = _slicedToArray(n.body, 1), - firstInstruction = _n$body[0]; - - return getStartByteOffset(firstInstruction); -} - -function getEndBlockByteOffset(n) { - // $FlowIgnore - if (!(n.instr.length > 0 || n.body.length > 0)) { - throw new Error('n.instr.length > 0 || n.body.length > 0' + " error: " + (undefined || "unknown")); - } - - var lastInstruction; - - if (n.instr) { - // $FlowIgnore - lastInstruction = n.instr[n.instr.length - 1]; - } - - if (n.body) { - // $FlowIgnore - lastInstruction = n.body[n.body.length - 1]; - } - - if (!(_typeof(lastInstruction) === "object")) { - throw new Error('typeof lastInstruction === "object"' + " error: " + (undefined || "unknown")); - } - - // $FlowIgnore - return getStartByteOffset(lastInstruction); -} - -function getStartBlockByteOffset(n) { - // $FlowIgnore - if (!(n.instr.length > 0 || n.body.length > 0)) { - throw new Error('n.instr.length > 0 || n.body.length > 0' + " error: " + (undefined || "unknown")); - } - - var fistInstruction; - - if (n.instr) { - // $FlowIgnore - var _n$instr = _slicedToArray(n.instr, 1); - - fistInstruction = _n$instr[0]; - } - - if (n.body) { - // $FlowIgnore - var _n$body2 = _slicedToArray(n.body, 1); - - fistInstruction = _n$body2[0]; - } - - if (!(_typeof(fistInstruction) === "object")) { - throw new Error('typeof fistInstruction === "object"' + " error: " + (undefined || "unknown")); - } - - // $FlowIgnore - return getStartByteOffset(fistInstruction); -} - -/***/ }), - -/***/ 92495: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = parse; - -function parse(input) { - input = input.toUpperCase(); - var splitIndex = input.indexOf("P"); - var mantissa, exponent; - - if (splitIndex !== -1) { - mantissa = input.substring(0, splitIndex); - exponent = parseInt(input.substring(splitIndex + 1)); - } else { - mantissa = input; - exponent = 0; - } - - var dotIndex = mantissa.indexOf("."); - - if (dotIndex !== -1) { - var integerPart = parseInt(mantissa.substring(0, dotIndex), 16); - var sign = Math.sign(integerPart); - integerPart = sign * integerPart; - var fractionLength = mantissa.length - dotIndex - 1; - var fractionalPart = parseInt(mantissa.substring(dotIndex + 1), 16); - var fraction = fractionLength > 0 ? fractionalPart / Math.pow(16, fractionLength) : 0; - - if (sign === 0) { - if (fraction === 0) { - mantissa = sign; - } else { - if (Object.is(sign, -0)) { - mantissa = -fraction; - } else { - mantissa = fraction; - } - } - } else { - mantissa = sign * (integerPart + fraction); - } - } else { - mantissa = parseInt(mantissa, 16); - } - - return mantissa * (splitIndex !== -1 ? Math.pow(2, exponent) : 1); -} - -/***/ }), - -/***/ 73261: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.LinkError = exports.CompileError = exports.RuntimeError = void 0; - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var RuntimeError = -/*#__PURE__*/ -function (_Error) { - _inherits(RuntimeError, _Error); - - function RuntimeError() { - _classCallCheck(this, RuntimeError); - - return _possibleConstructorReturn(this, (RuntimeError.__proto__ || Object.getPrototypeOf(RuntimeError)).apply(this, arguments)); - } - - return RuntimeError; -}(Error); - -exports.RuntimeError = RuntimeError; - -var CompileError = -/*#__PURE__*/ -function (_Error2) { - _inherits(CompileError, _Error2); - - function CompileError() { - _classCallCheck(this, CompileError); - - return _possibleConstructorReturn(this, (CompileError.__proto__ || Object.getPrototypeOf(CompileError)).apply(this, arguments)); - } - - return CompileError; -}(Error); - -exports.CompileError = CompileError; - -var LinkError = -/*#__PURE__*/ -function (_Error3) { - _inherits(LinkError, _Error3); - - function LinkError() { - _classCallCheck(this, LinkError); - - return _possibleConstructorReturn(this, (LinkError.__proto__ || Object.getPrototypeOf(LinkError)).apply(this, arguments)); - } - - return LinkError; -}(Error); - -exports.LinkError = LinkError; - -/***/ }), - -/***/ 623: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.overrideBytesInBuffer = overrideBytesInBuffer; -exports.makeBuffer = makeBuffer; -exports.fromHexdump = fromHexdump; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function concatUint8Arrays() { - for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) { - arrays[_key] = arguments[_key]; - } - - var totalLength = arrays.reduce(function (a, b) { - return a + b.length; - }, 0); - var result = new Uint8Array(totalLength); - var offset = 0; - - for (var _i = 0; _i < arrays.length; _i++) { - var arr = arrays[_i]; - - if (arr instanceof Uint8Array === false) { - throw new Error("arr must be of type Uint8Array"); - } - - result.set(arr, offset); - offset += arr.length; - } - - return result; -} - -function overrideBytesInBuffer(buffer, startLoc, endLoc, newBytes) { - var beforeBytes = buffer.slice(0, startLoc); - var afterBytes = buffer.slice(endLoc, buffer.length); // replacement is empty, we can omit it - - if (newBytes.length === 0) { - return concatUint8Arrays(beforeBytes, afterBytes); - } - - var replacement = Uint8Array.from(newBytes); - return concatUint8Arrays(beforeBytes, replacement, afterBytes); -} - -function makeBuffer() { - for (var _len2 = arguments.length, splitedBytes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - splitedBytes[_key2] = arguments[_key2]; - } - - var bytes = [].concat.apply([], splitedBytes); - return new Uint8Array(bytes).buffer; -} - -function fromHexdump(str) { - var lines = str.split("\n"); // remove any leading left whitespace - - lines = lines.map(function (line) { - return line.trim(); - }); - var bytes = lines.reduce(function (acc, line) { - var cols = line.split(" "); // remove the offset, left column - - cols.shift(); - cols = cols.filter(function (x) { - return x !== ""; - }); - var bytes = cols.map(function (x) { - return parseInt(x, 16); - }); - acc.push.apply(acc, _toConsumableArray(bytes)); - return acc; - }, []); - return Buffer.from(bytes); -} - -/***/ }), - -/***/ 3189: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.parse32F = parse32F; -exports.parse64F = parse64F; -exports.parse32I = parse32I; -exports.parseU32 = parseU32; -exports.parse64I = parse64I; -exports.isInfLiteral = isInfLiteral; -exports.isNanLiteral = isNanLiteral; - -var _long = _interopRequireDefault(__webpack_require__(68396)); - -var _floatingPointHexParser = _interopRequireDefault(__webpack_require__(92495)); - -var _helperApiError = __webpack_require__(73261); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse32F(sourceString) { - if (isHexLiteral(sourceString)) { - return (0, _floatingPointHexParser.default)(sourceString); - } - - if (isInfLiteral(sourceString)) { - return sourceString[0] === "-" ? -1 : 1; - } - - if (isNanLiteral(sourceString)) { - return (sourceString[0] === "-" ? -1 : 1) * (sourceString.includes(":") ? parseInt(sourceString.substring(sourceString.indexOf(":") + 1), 16) : 0x400000); - } - - return parseFloat(sourceString); -} - -function parse64F(sourceString) { - if (isHexLiteral(sourceString)) { - return (0, _floatingPointHexParser.default)(sourceString); - } - - if (isInfLiteral(sourceString)) { - return sourceString[0] === "-" ? -1 : 1; - } - - if (isNanLiteral(sourceString)) { - return (sourceString[0] === "-" ? -1 : 1) * (sourceString.includes(":") ? parseInt(sourceString.substring(sourceString.indexOf(":") + 1), 16) : 0x8000000000000); - } - - if (isHexLiteral(sourceString)) { - return (0, _floatingPointHexParser.default)(sourceString); - } - - return parseFloat(sourceString); -} - -function parse32I(sourceString) { - var value = 0; - - if (isHexLiteral(sourceString)) { - value = ~~parseInt(sourceString, 16); - } else if (isDecimalExponentLiteral(sourceString)) { - throw new Error("This number literal format is yet to be implemented."); - } else { - value = parseInt(sourceString, 10); - } - - return value; -} - -function parseU32(sourceString) { - var value = parse32I(sourceString); - - if (value < 0) { - throw new _helperApiError.CompileError("Illegal value for u32: " + sourceString); - } - - return value; -} - -function parse64I(sourceString) { - var long; - - if (isHexLiteral(sourceString)) { - long = _long.default.fromString(sourceString, false, 16); - } else if (isDecimalExponentLiteral(sourceString)) { - throw new Error("This number literal format is yet to be implemented."); - } else { - long = _long.default.fromString(sourceString); - } - - return { - high: long.high, - low: long.low - }; -} - -var NAN_WORD = /^\+?-?nan/; -var INF_WORD = /^\+?-?inf/; - -function isInfLiteral(sourceString) { - return INF_WORD.test(sourceString.toLowerCase()); -} - -function isNanLiteral(sourceString) { - return NAN_WORD.test(sourceString.toLowerCase()); -} - -function isDecimalExponentLiteral(sourceString) { - return !isHexLiteral(sourceString) && sourceString.toUpperCase().includes("E"); -} - -function isHexLiteral(sourceString) { - return sourceString.substring(0, 2).toUpperCase() === "0X" || sourceString.substring(0, 3).toUpperCase() === "-0X"; -} - -/***/ }), - -/***/ 67658: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "getSectionForNode", ({ - enumerable: true, - get: function get() { - return _section.getSectionForNode; - } -})); -exports["default"] = void 0; - -var _section = __webpack_require__(19280); - -var illegalop = "illegal"; -var magicModuleHeader = [0x00, 0x61, 0x73, 0x6d]; -var moduleVersion = [0x01, 0x00, 0x00, 0x00]; - -function invertMap(obj) { - var keyModifierFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (k) { - return k; - }; - var result = {}; - var keys = Object.keys(obj); - - for (var i = 0, length = keys.length; i < length; i++) { - result[keyModifierFn(obj[keys[i]])] = keys[i]; - } - - return result; -} - -function createSymbolObject(name -/*: string */ -, object -/*: string */ -) -/*: Symbol*/ -{ - var numberOfArgs - /*: number*/ - = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - return { - name: name, - object: object, - numberOfArgs: numberOfArgs - }; -} - -function createSymbol(name -/*: string */ -) -/*: Symbol*/ -{ - var numberOfArgs - /*: number*/ - = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - return { - name: name, - numberOfArgs: numberOfArgs - }; -} - -var types = { - func: 0x60, - result: 0x40 -}; -var exportTypes = { - 0x00: "Func", - 0x01: "Table", - 0x02: "Mem", - 0x03: "Global" -}; -var exportTypesByName = invertMap(exportTypes); -var valtypes = { - 0x7f: "i32", - 0x7e: "i64", - 0x7d: "f32", - 0x7c: "f64", - 0x7b: "v128" -}; -var valtypesByString = invertMap(valtypes); -var tableTypes = { - 0x70: "anyfunc" -}; -var blockTypes = Object.assign({}, valtypes, { - // https://webassembly.github.io/spec/core/binary/types.html#binary-blocktype - 0x40: null, - // https://webassembly.github.io/spec/core/binary/types.html#binary-valtype - 0x7f: "i32", - 0x7e: "i64", - 0x7d: "f32", - 0x7c: "f64" -}); -var globalTypes = { - 0x00: "const", - 0x01: "var" -}; -var globalTypesByString = invertMap(globalTypes); -var importTypes = { - 0x00: "func", - 0x01: "table", - 0x02: "mem", - 0x03: "global" -}; -var sections = { - custom: 0, - type: 1, - import: 2, - func: 3, - table: 4, - memory: 5, - global: 6, - export: 7, - start: 8, - element: 9, - code: 10, - data: 11 -}; -var symbolsByByte = { - 0x00: createSymbol("unreachable"), - 0x01: createSymbol("nop"), - 0x02: createSymbol("block"), - 0x03: createSymbol("loop"), - 0x04: createSymbol("if"), - 0x05: createSymbol("else"), - 0x06: illegalop, - 0x07: illegalop, - 0x08: illegalop, - 0x09: illegalop, - 0x0a: illegalop, - 0x0b: createSymbol("end"), - 0x0c: createSymbol("br", 1), - 0x0d: createSymbol("br_if", 1), - 0x0e: createSymbol("br_table"), - 0x0f: createSymbol("return"), - 0x10: createSymbol("call", 1), - 0x11: createSymbol("call_indirect", 2), - 0x12: illegalop, - 0x13: illegalop, - 0x14: illegalop, - 0x15: illegalop, - 0x16: illegalop, - 0x17: illegalop, - 0x18: illegalop, - 0x19: illegalop, - 0x1a: createSymbol("drop"), - 0x1b: createSymbol("select"), - 0x1c: illegalop, - 0x1d: illegalop, - 0x1e: illegalop, - 0x1f: illegalop, - 0x20: createSymbol("get_local", 1), - 0x21: createSymbol("set_local", 1), - 0x22: createSymbol("tee_local", 1), - 0x23: createSymbol("get_global", 1), - 0x24: createSymbol("set_global", 1), - 0x25: illegalop, - 0x26: illegalop, - 0x27: illegalop, - 0x28: createSymbolObject("load", "u32", 1), - 0x29: createSymbolObject("load", "u64", 1), - 0x2a: createSymbolObject("load", "f32", 1), - 0x2b: createSymbolObject("load", "f64", 1), - 0x2c: createSymbolObject("load8_s", "u32", 1), - 0x2d: createSymbolObject("load8_u", "u32", 1), - 0x2e: createSymbolObject("load16_s", "u32", 1), - 0x2f: createSymbolObject("load16_u", "u32", 1), - 0x30: createSymbolObject("load8_s", "u64", 1), - 0x31: createSymbolObject("load8_u", "u64", 1), - 0x32: createSymbolObject("load16_s", "u64", 1), - 0x33: createSymbolObject("load16_u", "u64", 1), - 0x34: createSymbolObject("load32_s", "u64", 1), - 0x35: createSymbolObject("load32_u", "u64", 1), - 0x36: createSymbolObject("store", "u32", 1), - 0x37: createSymbolObject("store", "u64", 1), - 0x38: createSymbolObject("store", "f32", 1), - 0x39: createSymbolObject("store", "f64", 1), - 0x3a: createSymbolObject("store8", "u32", 1), - 0x3b: createSymbolObject("store16", "u32", 1), - 0x3c: createSymbolObject("store8", "u64", 1), - 0x3d: createSymbolObject("store16", "u64", 1), - 0x3e: createSymbolObject("store32", "u64", 1), - 0x3f: createSymbolObject("current_memory"), - 0x40: createSymbolObject("grow_memory"), - 0x41: createSymbolObject("const", "i32", 1), - 0x42: createSymbolObject("const", "i64", 1), - 0x43: createSymbolObject("const", "f32", 1), - 0x44: createSymbolObject("const", "f64", 1), - 0x45: createSymbolObject("eqz", "i32"), - 0x46: createSymbolObject("eq", "i32"), - 0x47: createSymbolObject("ne", "i32"), - 0x48: createSymbolObject("lt_s", "i32"), - 0x49: createSymbolObject("lt_u", "i32"), - 0x4a: createSymbolObject("gt_s", "i32"), - 0x4b: createSymbolObject("gt_u", "i32"), - 0x4c: createSymbolObject("le_s", "i32"), - 0x4d: createSymbolObject("le_u", "i32"), - 0x4e: createSymbolObject("ge_s", "i32"), - 0x4f: createSymbolObject("ge_u", "i32"), - 0x50: createSymbolObject("eqz", "i64"), - 0x51: createSymbolObject("eq", "i64"), - 0x52: createSymbolObject("ne", "i64"), - 0x53: createSymbolObject("lt_s", "i64"), - 0x54: createSymbolObject("lt_u", "i64"), - 0x55: createSymbolObject("gt_s", "i64"), - 0x56: createSymbolObject("gt_u", "i64"), - 0x57: createSymbolObject("le_s", "i64"), - 0x58: createSymbolObject("le_u", "i64"), - 0x59: createSymbolObject("ge_s", "i64"), - 0x5a: createSymbolObject("ge_u", "i64"), - 0x5b: createSymbolObject("eq", "f32"), - 0x5c: createSymbolObject("ne", "f32"), - 0x5d: createSymbolObject("lt", "f32"), - 0x5e: createSymbolObject("gt", "f32"), - 0x5f: createSymbolObject("le", "f32"), - 0x60: createSymbolObject("ge", "f32"), - 0x61: createSymbolObject("eq", "f64"), - 0x62: createSymbolObject("ne", "f64"), - 0x63: createSymbolObject("lt", "f64"), - 0x64: createSymbolObject("gt", "f64"), - 0x65: createSymbolObject("le", "f64"), - 0x66: createSymbolObject("ge", "f64"), - 0x67: createSymbolObject("clz", "i32"), - 0x68: createSymbolObject("ctz", "i32"), - 0x69: createSymbolObject("popcnt", "i32"), - 0x6a: createSymbolObject("add", "i32"), - 0x6b: createSymbolObject("sub", "i32"), - 0x6c: createSymbolObject("mul", "i32"), - 0x6d: createSymbolObject("div_s", "i32"), - 0x6e: createSymbolObject("div_u", "i32"), - 0x6f: createSymbolObject("rem_s", "i32"), - 0x70: createSymbolObject("rem_u", "i32"), - 0x71: createSymbolObject("and", "i32"), - 0x72: createSymbolObject("or", "i32"), - 0x73: createSymbolObject("xor", "i32"), - 0x74: createSymbolObject("shl", "i32"), - 0x75: createSymbolObject("shr_s", "i32"), - 0x76: createSymbolObject("shr_u", "i32"), - 0x77: createSymbolObject("rotl", "i32"), - 0x78: createSymbolObject("rotr", "i32"), - 0x79: createSymbolObject("clz", "i64"), - 0x7a: createSymbolObject("ctz", "i64"), - 0x7b: createSymbolObject("popcnt", "i64"), - 0x7c: createSymbolObject("add", "i64"), - 0x7d: createSymbolObject("sub", "i64"), - 0x7e: createSymbolObject("mul", "i64"), - 0x7f: createSymbolObject("div_s", "i64"), - 0x80: createSymbolObject("div_u", "i64"), - 0x81: createSymbolObject("rem_s", "i64"), - 0x82: createSymbolObject("rem_u", "i64"), - 0x83: createSymbolObject("and", "i64"), - 0x84: createSymbolObject("or", "i64"), - 0x85: createSymbolObject("xor", "i64"), - 0x86: createSymbolObject("shl", "i64"), - 0x87: createSymbolObject("shr_s", "i64"), - 0x88: createSymbolObject("shr_u", "i64"), - 0x89: createSymbolObject("rotl", "i64"), - 0x8a: createSymbolObject("rotr", "i64"), - 0x8b: createSymbolObject("abs", "f32"), - 0x8c: createSymbolObject("neg", "f32"), - 0x8d: createSymbolObject("ceil", "f32"), - 0x8e: createSymbolObject("floor", "f32"), - 0x8f: createSymbolObject("trunc", "f32"), - 0x90: createSymbolObject("nearest", "f32"), - 0x91: createSymbolObject("sqrt", "f32"), - 0x92: createSymbolObject("add", "f32"), - 0x93: createSymbolObject("sub", "f32"), - 0x94: createSymbolObject("mul", "f32"), - 0x95: createSymbolObject("div", "f32"), - 0x96: createSymbolObject("min", "f32"), - 0x97: createSymbolObject("max", "f32"), - 0x98: createSymbolObject("copysign", "f32"), - 0x99: createSymbolObject("abs", "f64"), - 0x9a: createSymbolObject("neg", "f64"), - 0x9b: createSymbolObject("ceil", "f64"), - 0x9c: createSymbolObject("floor", "f64"), - 0x9d: createSymbolObject("trunc", "f64"), - 0x9e: createSymbolObject("nearest", "f64"), - 0x9f: createSymbolObject("sqrt", "f64"), - 0xa0: createSymbolObject("add", "f64"), - 0xa1: createSymbolObject("sub", "f64"), - 0xa2: createSymbolObject("mul", "f64"), - 0xa3: createSymbolObject("div", "f64"), - 0xa4: createSymbolObject("min", "f64"), - 0xa5: createSymbolObject("max", "f64"), - 0xa6: createSymbolObject("copysign", "f64"), - 0xa7: createSymbolObject("wrap/i64", "i32"), - 0xa8: createSymbolObject("trunc_s/f32", "i32"), - 0xa9: createSymbolObject("trunc_u/f32", "i32"), - 0xaa: createSymbolObject("trunc_s/f64", "i32"), - 0xab: createSymbolObject("trunc_u/f64", "i32"), - 0xac: createSymbolObject("extend_s/i32", "i64"), - 0xad: createSymbolObject("extend_u/i32", "i64"), - 0xae: createSymbolObject("trunc_s/f32", "i64"), - 0xaf: createSymbolObject("trunc_u/f32", "i64"), - 0xb0: createSymbolObject("trunc_s/f64", "i64"), - 0xb1: createSymbolObject("trunc_u/f64", "i64"), - 0xb2: createSymbolObject("convert_s/i32", "f32"), - 0xb3: createSymbolObject("convert_u/i32", "f32"), - 0xb4: createSymbolObject("convert_s/i64", "f32"), - 0xb5: createSymbolObject("convert_u/i64", "f32"), - 0xb6: createSymbolObject("demote/f64", "f32"), - 0xb7: createSymbolObject("convert_s/i32", "f64"), - 0xb8: createSymbolObject("convert_u/i32", "f64"), - 0xb9: createSymbolObject("convert_s/i64", "f64"), - 0xba: createSymbolObject("convert_u/i64", "f64"), - 0xbb: createSymbolObject("promote/f32", "f64"), - 0xbc: createSymbolObject("reinterpret/f32", "i32"), - 0xbd: createSymbolObject("reinterpret/f64", "i64"), - 0xbe: createSymbolObject("reinterpret/i32", "f32"), - 0xbf: createSymbolObject("reinterpret/i64", "f64"), - // Atomic Memory Instructions - 0xfe00: createSymbol("memory.atomic.notify", 1), - 0xfe01: createSymbol("memory.atomic.wait32", 1), - 0xfe02: createSymbol("memory.atomic.wait64", 1), - 0xfe10: createSymbolObject("atomic.load", "i32", 1), - 0xfe11: createSymbolObject("atomic.load", "i64", 1), - 0xfe12: createSymbolObject("atomic.load8_u", "i32", 1), - 0xfe13: createSymbolObject("atomic.load16_u", "i32", 1), - 0xfe14: createSymbolObject("atomic.load8_u", "i64", 1), - 0xfe15: createSymbolObject("atomic.load16_u", "i64", 1), - 0xfe16: createSymbolObject("atomic.load32_u", "i64", 1), - 0xfe17: createSymbolObject("atomic.store", "i32", 1), - 0xfe18: createSymbolObject("atomic.store", "i64", 1), - 0xfe19: createSymbolObject("atomic.store8_u", "i32", 1), - 0xfe1a: createSymbolObject("atomic.store16_u", "i32", 1), - 0xfe1b: createSymbolObject("atomic.store8_u", "i64", 1), - 0xfe1c: createSymbolObject("atomic.store16_u", "i64", 1), - 0xfe1d: createSymbolObject("atomic.store32_u", "i64", 1), - 0xfe1e: createSymbolObject("atomic.rmw.add", "i32", 1), - 0xfe1f: createSymbolObject("atomic.rmw.add", "i64", 1), - 0xfe20: createSymbolObject("atomic.rmw8_u.add_u", "i32", 1), - 0xfe21: createSymbolObject("atomic.rmw16_u.add_u", "i32", 1), - 0xfe22: createSymbolObject("atomic.rmw8_u.add_u", "i64", 1), - 0xfe23: createSymbolObject("atomic.rmw16_u.add_u", "i64", 1), - 0xfe24: createSymbolObject("atomic.rmw32_u.add_u", "i64", 1), - 0xfe25: createSymbolObject("atomic.rmw.sub", "i32", 1), - 0xfe26: createSymbolObject("atomic.rmw.sub", "i64", 1), - 0xfe27: createSymbolObject("atomic.rmw8_u.sub_u", "i32", 1), - 0xfe28: createSymbolObject("atomic.rmw16_u.sub_u", "i32", 1), - 0xfe29: createSymbolObject("atomic.rmw8_u.sub_u", "i64", 1), - 0xfe2a: createSymbolObject("atomic.rmw16_u.sub_u", "i64", 1), - 0xfe2b: createSymbolObject("atomic.rmw32_u.sub_u", "i64", 1), - 0xfe2c: createSymbolObject("atomic.rmw.and", "i32", 1), - 0xfe2d: createSymbolObject("atomic.rmw.and", "i64", 1), - 0xfe2e: createSymbolObject("atomic.rmw8_u.and_u", "i32", 1), - 0xfe2f: createSymbolObject("atomic.rmw16_u.and_u", "i32", 1), - 0xfe30: createSymbolObject("atomic.rmw8_u.and_u", "i64", 1), - 0xfe31: createSymbolObject("atomic.rmw16_u.and_u", "i64", 1), - 0xfe32: createSymbolObject("atomic.rmw32_u.and_u", "i64", 1), - 0xfe33: createSymbolObject("atomic.rmw.or", "i32", 1), - 0xfe34: createSymbolObject("atomic.rmw.or", "i64", 1), - 0xfe35: createSymbolObject("atomic.rmw8_u.or_u", "i32", 1), - 0xfe36: createSymbolObject("atomic.rmw16_u.or_u", "i32", 1), - 0xfe37: createSymbolObject("atomic.rmw8_u.or_u", "i64", 1), - 0xfe38: createSymbolObject("atomic.rmw16_u.or_u", "i64", 1), - 0xfe39: createSymbolObject("atomic.rmw32_u.or_u", "i64", 1), - 0xfe3a: createSymbolObject("atomic.rmw.xor", "i32", 1), - 0xfe3b: createSymbolObject("atomic.rmw.xor", "i64", 1), - 0xfe3c: createSymbolObject("atomic.rmw8_u.xor_u", "i32", 1), - 0xfe3d: createSymbolObject("atomic.rmw16_u.xor_u", "i32", 1), - 0xfe3e: createSymbolObject("atomic.rmw8_u.xor_u", "i64", 1), - 0xfe3f: createSymbolObject("atomic.rmw16_u.xor_u", "i64", 1), - 0xfe40: createSymbolObject("atomic.rmw32_u.xor_u", "i64", 1), - 0xfe41: createSymbolObject("atomic.rmw.xchg", "i32", 1), - 0xfe42: createSymbolObject("atomic.rmw.xchg", "i64", 1), - 0xfe43: createSymbolObject("atomic.rmw8_u.xchg_u", "i32", 1), - 0xfe44: createSymbolObject("atomic.rmw16_u.xchg_u", "i32", 1), - 0xfe45: createSymbolObject("atomic.rmw8_u.xchg_u", "i64", 1), - 0xfe46: createSymbolObject("atomic.rmw16_u.xchg_u", "i64", 1), - 0xfe47: createSymbolObject("atomic.rmw32_u.xchg_u", "i64", 1), - 0xfe48: createSymbolObject("atomic.rmw.cmpxchg", "i32", 1), - 0xfe49: createSymbolObject("atomic.rmw.cmpxchg", "i64", 1), - 0xfe4a: createSymbolObject("atomic.rmw8_u.cmpxchg_u", "i32", 1), - 0xfe4b: createSymbolObject("atomic.rmw16_u.cmpxchg_u", "i32", 1), - 0xfe4c: createSymbolObject("atomic.rmw8_u.cmpxchg_u", "i64", 1), - 0xfe4d: createSymbolObject("atomic.rmw16_u.cmpxchg_u", "i64", 1), - 0xfe4e: createSymbolObject("atomic.rmw32_u.cmpxchg_u", "i64", 1) -}; -var symbolsByName = invertMap(symbolsByByte, function (obj) { - if (typeof obj.object === "string") { - return "".concat(obj.object, ".").concat(obj.name); - } - - return obj.name; -}); -var _default = { - symbolsByByte: symbolsByByte, - sections: sections, - magicModuleHeader: magicModuleHeader, - moduleVersion: moduleVersion, - types: types, - valtypes: valtypes, - exportTypes: exportTypes, - blockTypes: blockTypes, - tableTypes: tableTypes, - globalTypes: globalTypes, - importTypes: importTypes, - valtypesByString: valtypesByString, - globalTypesByString: globalTypesByString, - exportTypesByName: exportTypesByName, - symbolsByName: symbolsByName -}; -exports["default"] = _default; - -/***/ }), - -/***/ 19280: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.getSectionForNode = getSectionForNode; - -function getSectionForNode(n) { - switch (n.type) { - case "ModuleImport": - return "import"; - - case "CallInstruction": - case "CallIndirectInstruction": - case "Func": - case "Instr": - return "code"; - - case "ModuleExport": - return "export"; - - case "Start": - return "start"; - - case "TypeInstruction": - return "type"; - - case "IndexInFuncSection": - return "func"; - - case "Global": - return "global"; - // No section - - default: - return; - } -} - -/***/ }), - -/***/ 31016: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.createEmptySection = createEmptySection; - -var _wasmGen = __webpack_require__(50908); - -var _helperBuffer = __webpack_require__(623); - -var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(67658)); - -var t = _interopRequireWildcard(__webpack_require__(44977)); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function findLastSection(ast, forSection) { - var targetSectionId = _helperWasmBytecode.default.sections[forSection]; // $FlowIgnore: metadata can not be empty - - var moduleSections = ast.body[0].metadata.sections; - var lastSection; - var lastId = 0; - - for (var i = 0, len = moduleSections.length; i < len; i++) { - var section = moduleSections[i]; // Ignore custom section since they can actually occur everywhere - - if (section.section === "custom") { - continue; - } - - var sectionId = _helperWasmBytecode.default.sections[section.section]; - - if (targetSectionId > lastId && targetSectionId < sectionId) { - return lastSection; - } - - lastId = sectionId; - lastSection = section; - } - - return lastSection; -} - -function createEmptySection(ast, uint8Buffer, section) { - // previous section after which we are going to insert our section - var lastSection = findLastSection(ast, section); - var start, end; - /** - * It's the first section - */ - - if (lastSection == null || lastSection.section === "custom") { - start = 8 - /* wasm header size */ - ; - end = start; - } else { - start = lastSection.startOffset + lastSection.size.value + 1; - end = start; - } // section id - - - start += 1; - var sizeStartLoc = { - line: -1, - column: start - }; - var sizeEndLoc = { - line: -1, - column: start + 1 - }; // 1 byte for the empty vector - - var size = t.withLoc(t.numberLiteralFromRaw(1), sizeEndLoc, sizeStartLoc); - var vectorOfSizeStartLoc = { - line: -1, - column: sizeEndLoc.column - }; - var vectorOfSizeEndLoc = { - line: -1, - column: sizeEndLoc.column + 1 - }; - var vectorOfSize = t.withLoc(t.numberLiteralFromRaw(0), vectorOfSizeEndLoc, vectorOfSizeStartLoc); - var sectionMetadata = t.sectionMetadata(section, start, size, vectorOfSize); - var sectionBytes = (0, _wasmGen.encodeNode)(sectionMetadata); - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start - 1, end, sectionBytes); // Add section into the AST for later lookups - - if (_typeof(ast.body[0].metadata) === "object") { - // $FlowIgnore: metadata can not be empty - ast.body[0].metadata.sections.push(sectionMetadata); - t.sortSectionMetadata(ast.body[0]); - } - /** - * Update AST - */ - // Once we hit our section every that is after needs to be shifted by the delta - - - var deltaBytes = +sectionBytes.length; - var encounteredSection = false; - t.traverse(ast, { - SectionMetadata: function SectionMetadata(path) { - if (path.node.section === section) { - encounteredSection = true; - return; - } - - if (encounteredSection === true) { - t.shiftSection(ast, path.node, deltaBytes); - } - } - }); - return { - uint8Buffer: uint8Buffer, - sectionMetadata: sectionMetadata - }; -} - -/***/ }), - -/***/ 16111: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "resizeSectionByteSize", ({ - enumerable: true, - get: function get() { - return _resize.resizeSectionByteSize; - } -})); -Object.defineProperty(exports, "resizeSectionVecSize", ({ - enumerable: true, - get: function get() { - return _resize.resizeSectionVecSize; - } -})); -Object.defineProperty(exports, "createEmptySection", ({ - enumerable: true, - get: function get() { - return _create.createEmptySection; - } -})); -Object.defineProperty(exports, "removeSections", ({ - enumerable: true, - get: function get() { - return _remove.removeSections; - } -})); - -var _resize = __webpack_require__(19157); - -var _create = __webpack_require__(31016); - -var _remove = __webpack_require__(37906); - -/***/ }), - -/***/ 37906: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.removeSections = removeSections; - -var _ast = __webpack_require__(44977); - -var _helperBuffer = __webpack_require__(623); - -function removeSections(ast, uint8Buffer, section) { - var sectionMetadatas = (0, _ast.getSectionMetadatas)(ast, section); - - if (sectionMetadatas.length === 0) { - throw new Error("Section metadata not found"); - } - - return sectionMetadatas.reverse().reduce(function (uint8Buffer, sectionMetadata) { - var startsIncludingId = sectionMetadata.startOffset - 1; - var ends = section === "start" ? sectionMetadata.size.loc.end.column + 1 : sectionMetadata.startOffset + sectionMetadata.size.value + 1; - var delta = -(ends - startsIncludingId); - /** - * update AST - */ - // Once we hit our section every that is after needs to be shifted by the delta - - var encounteredSection = false; - (0, _ast.traverse)(ast, { - SectionMetadata: function SectionMetadata(path) { - if (path.node.section === section) { - encounteredSection = true; - return path.remove(); - } - - if (encounteredSection === true) { - (0, _ast.shiftSection)(ast, path.node, delta); - } - } - }); // replacement is nothing - - var replacement = []; - return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, startsIncludingId, ends, replacement); - }, uint8Buffer); -} - -/***/ }), - -/***/ 19157: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.resizeSectionByteSize = resizeSectionByteSize; -exports.resizeSectionVecSize = resizeSectionVecSize; - -var _wasmGen = __webpack_require__(50908); - -var _ast = __webpack_require__(44977); - -var _helperBuffer = __webpack_require__(623); - -function resizeSectionByteSize(ast, uint8Buffer, section, deltaBytes) { - var sectionMetadata = (0, _ast.getSectionMetadata)(ast, section); - - if (typeof sectionMetadata === "undefined") { - throw new Error("Section metadata not found"); - } - - if (typeof sectionMetadata.size.loc === "undefined") { - throw new Error("SectionMetadata " + section + " has no loc"); - } // keep old node location to be overriden - - - var start = sectionMetadata.size.loc.start.column; - var end = sectionMetadata.size.loc.end.column; - var newSectionSize = sectionMetadata.size.value + deltaBytes; - var newBytes = (0, _wasmGen.encodeU32)(newSectionSize); - /** - * update AST - */ - - sectionMetadata.size.value = newSectionSize; - var oldu32EncodedLen = end - start; - var newu32EncodedLen = newBytes.length; // the new u32 has a different encoded length - - if (newu32EncodedLen !== oldu32EncodedLen) { - var deltaInSizeEncoding = newu32EncodedLen - oldu32EncodedLen; - sectionMetadata.size.loc.end.column = start + newu32EncodedLen; - deltaBytes += deltaInSizeEncoding; // move the vec size pointer size the section size is now smaller - - sectionMetadata.vectorOfSize.loc.start.column += deltaInSizeEncoding; - sectionMetadata.vectorOfSize.loc.end.column += deltaInSizeEncoding; - } // Once we hit our section every that is after needs to be shifted by the delta - - - var encounteredSection = false; - (0, _ast.traverse)(ast, { - SectionMetadata: function SectionMetadata(path) { - if (path.node.section === section) { - encounteredSection = true; - return; - } - - if (encounteredSection === true) { - (0, _ast.shiftSection)(ast, path.node, deltaBytes); - } - } - }); - return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newBytes); -} - -function resizeSectionVecSize(ast, uint8Buffer, section, deltaElements) { - var sectionMetadata = (0, _ast.getSectionMetadata)(ast, section); - - if (typeof sectionMetadata === "undefined") { - throw new Error("Section metadata not found"); - } - - if (typeof sectionMetadata.vectorOfSize.loc === "undefined") { - throw new Error("SectionMetadata " + section + " has no loc"); - } // Section has no vector - - - if (sectionMetadata.vectorOfSize.value === -1) { - return uint8Buffer; - } // keep old node location to be overriden - - - var start = sectionMetadata.vectorOfSize.loc.start.column; - var end = sectionMetadata.vectorOfSize.loc.end.column; - var newValue = sectionMetadata.vectorOfSize.value + deltaElements; - var newBytes = (0, _wasmGen.encodeU32)(newValue); // Update AST - - sectionMetadata.vectorOfSize.value = newValue; - sectionMetadata.vectorOfSize.loc.end.column = start + newBytes.length; - return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newBytes); -} - -/***/ }), - -/***/ 31395: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.encodeF32 = encodeF32; -exports.encodeF64 = encodeF64; -exports.decodeF32 = decodeF32; -exports.decodeF64 = decodeF64; -exports.DOUBLE_PRECISION_MANTISSA = exports.SINGLE_PRECISION_MANTISSA = exports.NUMBER_OF_BYTE_F64 = exports.NUMBER_OF_BYTE_F32 = void 0; - -var _ieee = __webpack_require__(84846); - -/** - * According to https://webassembly.github.io/spec/binary/values.html#binary-float - * n = 32/8 - */ -var NUMBER_OF_BYTE_F32 = 4; -/** - * According to https://webassembly.github.io/spec/binary/values.html#binary-float - * n = 64/8 - */ - -exports.NUMBER_OF_BYTE_F32 = NUMBER_OF_BYTE_F32; -var NUMBER_OF_BYTE_F64 = 8; -exports.NUMBER_OF_BYTE_F64 = NUMBER_OF_BYTE_F64; -var SINGLE_PRECISION_MANTISSA = 23; -exports.SINGLE_PRECISION_MANTISSA = SINGLE_PRECISION_MANTISSA; -var DOUBLE_PRECISION_MANTISSA = 52; -exports.DOUBLE_PRECISION_MANTISSA = DOUBLE_PRECISION_MANTISSA; - -function encodeF32(v) { - var buffer = []; - (0, _ieee.write)(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32); - return buffer; -} - -function encodeF64(v) { - var buffer = []; - (0, _ieee.write)(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64); - return buffer; -} - -function decodeF32(bytes) { - var buffer = Buffer.from(bytes); - return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32); -} - -function decodeF64(bytes) { - var buffer = Buffer.from(bytes); - return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64); -} - -/***/ }), - -/***/ 87294: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -// Copyright 2012 The Obvious Corporation. - -/* - * bits: Bitwise buffer utilities. The utilities here treat a buffer - * as a little-endian bigint, so the lowest-order bit is bit #0 of - * `buffer[0]`, and the highest-order bit is bit #7 of - * `buffer[buffer.length - 1]`. - */ - -/* - * Modules used - */ - -/* - * Exported bindings - */ - -/** - * Extracts the given number of bits from the buffer at the indicated - * index, returning a simple number as the result. If bits are requested - * that aren't covered by the buffer, the `defaultBit` is used as their - * value. - * - * The `bitLength` must be no more than 32. The `defaultBit` if not - * specified is taken to be `0`. - */ - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.extract = extract; -exports.inject = inject; -exports.getSign = getSign; -exports.highOrder = highOrder; - -function extract(buffer, bitIndex, bitLength, defaultBit) { - if (bitLength < 0 || bitLength > 32) { - throw new Error("Bad value for bitLength."); - } - - if (defaultBit === undefined) { - defaultBit = 0; - } else if (defaultBit !== 0 && defaultBit !== 1) { - throw new Error("Bad value for defaultBit."); - } - - var defaultByte = defaultBit * 0xff; - var result = 0; // All starts are inclusive. The {endByte, endBit} pair is exclusive, but - // if endBit !== 0, then endByte is inclusive. - - var lastBit = bitIndex + bitLength; - var startByte = Math.floor(bitIndex / 8); - var startBit = bitIndex % 8; - var endByte = Math.floor(lastBit / 8); - var endBit = lastBit % 8; - - if (endBit !== 0) { - // `(1 << endBit) - 1` is the mask of all bits up to but not including - // the endBit. - result = get(endByte) & (1 << endBit) - 1; - } - - while (endByte > startByte) { - endByte--; - result = result << 8 | get(endByte); - } - - result >>>= startBit; - return result; - - function get(index) { - var result = buffer[index]; - return result === undefined ? defaultByte : result; - } -} -/** - * Injects the given bits into the given buffer at the given index. Any - * bits in the value beyond the length to set are ignored. - */ - - -function inject(buffer, bitIndex, bitLength, value) { - if (bitLength < 0 || bitLength > 32) { - throw new Error("Bad value for bitLength."); - } - - var lastByte = Math.floor((bitIndex + bitLength - 1) / 8); - - if (bitIndex < 0 || lastByte >= buffer.length) { - throw new Error("Index out of range."); - } // Just keeping it simple, until / unless profiling shows that this - // is a problem. - - - var atByte = Math.floor(bitIndex / 8); - var atBit = bitIndex % 8; - - while (bitLength > 0) { - if (value & 1) { - buffer[atByte] |= 1 << atBit; - } else { - buffer[atByte] &= ~(1 << atBit); - } - - value >>= 1; - bitLength--; - atBit = (atBit + 1) % 8; - - if (atBit === 0) { - atByte++; - } - } -} -/** - * Gets the sign bit of the given buffer. - */ - - -function getSign(buffer) { - return buffer[buffer.length - 1] >>> 7; -} -/** - * Gets the zero-based bit number of the highest-order bit with the - * given value in the given buffer. - * - * If the buffer consists entirely of the other bit value, then this returns - * `-1`. - */ - - -function highOrder(bit, buffer) { - var length = buffer.length; - var fullyWrongByte = (bit ^ 1) * 0xff; // the other-bit extended to a full byte - - while (length > 0 && buffer[length - 1] === fullyWrongByte) { - length--; - } - - if (length === 0) { - // Degenerate case. The buffer consists entirely of ~bit. - return -1; - } - - var byteToCheck = buffer[length - 1]; - var result = length * 8 - 1; - - for (var i = 7; i > 0; i--) { - if ((byteToCheck >> i & 1) === bit) { - break; - } - - result--; - } - - return result; -} - -/***/ }), - -/***/ 50853: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.alloc = alloc; -exports.free = free; -exports.resize = resize; -exports.readInt = readInt; -exports.readUInt = readUInt; -exports.writeInt64 = writeInt64; -exports.writeUInt64 = writeUInt64; -// Copyright 2012 The Obvious Corporation. - -/* - * bufs: Buffer utilities. - */ - -/* - * Module variables - */ - -/** Pool of buffers, where `bufPool[x].length === x`. */ -var bufPool = []; -/** Maximum length of kept temporary buffers. */ - -var TEMP_BUF_MAXIMUM_LENGTH = 20; -/** Minimum exactly-representable 64-bit int. */ - -var MIN_EXACT_INT64 = -0x8000000000000000; -/** Maximum exactly-representable 64-bit int. */ - -var MAX_EXACT_INT64 = 0x7ffffffffffffc00; -/** Maximum exactly-representable 64-bit uint. */ - -var MAX_EXACT_UINT64 = 0xfffffffffffff800; -/** - * The int value consisting just of a 1 in bit #32 (that is, one more - * than the maximum 32-bit unsigned value). - */ - -var BIT_32 = 0x100000000; -/** - * The int value consisting just of a 1 in bit #64 (that is, one more - * than the maximum 64-bit unsigned value). - */ - -var BIT_64 = 0x10000000000000000; -/* - * Helper functions - */ - -/** - * Masks off all but the lowest bit set of the given number. - */ - -function lowestBit(num) { - return num & -num; -} -/** - * Gets whether trying to add the second number to the first is lossy - * (inexact). The first number is meant to be an accumulated result. - */ - - -function isLossyToAdd(accum, num) { - if (num === 0) { - return false; - } - - var lowBit = lowestBit(num); - var added = accum + lowBit; - - if (added === accum) { - return true; - } - - if (added - lowBit !== accum) { - return true; - } - - return false; -} -/* - * Exported functions - */ - -/** - * Allocates a buffer of the given length, which is initialized - * with all zeroes. This returns a buffer from the pool if it is - * available, or a freshly-allocated buffer if not. - */ - - -function alloc(length) { - var result = bufPool[length]; - - if (result) { - bufPool[length] = undefined; - } else { - result = new Buffer(length); - } - - result.fill(0); - return result; -} -/** - * Releases a buffer back to the pool. - */ - - -function free(buffer) { - var length = buffer.length; - - if (length < TEMP_BUF_MAXIMUM_LENGTH) { - bufPool[length] = buffer; - } -} -/** - * Resizes a buffer, returning a new buffer. Returns the argument if - * the length wouldn't actually change. This function is only safe to - * use if the given buffer was allocated within this module (since - * otherwise the buffer might possibly be shared externally). - */ - - -function resize(buffer, length) { - if (length === buffer.length) { - return buffer; - } - - var newBuf = alloc(length); - buffer.copy(newBuf); - free(buffer); - return newBuf; -} -/** - * Reads an arbitrary signed int from a buffer. - */ - - -function readInt(buffer) { - var length = buffer.length; - var positive = buffer[length - 1] < 0x80; - var result = positive ? 0 : -1; - var lossy = false; // Note: We can't use bit manipulation here, since that stops - // working if the result won't fit in a 32-bit int. - - if (length < 7) { - // Common case which can't possibly be lossy (because the result has - // no more than 48 bits, and loss only happens with 54 or more). - for (var i = length - 1; i >= 0; i--) { - result = result * 0x100 + buffer[i]; - } - } else { - for (var _i = length - 1; _i >= 0; _i--) { - var one = buffer[_i]; - result *= 0x100; - - if (isLossyToAdd(result, one)) { - lossy = true; - } - - result += one; - } - } - - return { - value: result, - lossy: lossy - }; -} -/** - * Reads an arbitrary unsigned int from a buffer. - */ - - -function readUInt(buffer) { - var length = buffer.length; - var result = 0; - var lossy = false; // Note: See above in re bit manipulation. - - if (length < 7) { - // Common case which can't possibly be lossy (see above). - for (var i = length - 1; i >= 0; i--) { - result = result * 0x100 + buffer[i]; - } - } else { - for (var _i2 = length - 1; _i2 >= 0; _i2--) { - var one = buffer[_i2]; - result *= 0x100; - - if (isLossyToAdd(result, one)) { - lossy = true; - } - - result += one; - } - } - - return { - value: result, - lossy: lossy - }; -} -/** - * Writes a little-endian 64-bit signed int into a buffer. - */ - - -function writeInt64(value, buffer) { - if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) { - throw new Error("Value out of range."); - } - - if (value < 0) { - value += BIT_64; - } - - writeUInt64(value, buffer); -} -/** - * Writes a little-endian 64-bit unsigned int into a buffer. - */ - - -function writeUInt64(value, buffer) { - if (value < 0 || value > MAX_EXACT_UINT64) { - throw new Error("Value out of range."); - } - - var lowWord = value % BIT_32; - var highWord = Math.floor(value / BIT_32); - buffer.writeUInt32LE(lowWord, 0); - buffer.writeUInt32LE(highWord, 4); -} - -/***/ }), - -/***/ 21294: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decodeInt64 = decodeInt64; -exports.decodeUInt64 = decodeUInt64; -exports.decodeInt32 = decodeInt32; -exports.decodeUInt32 = decodeUInt32; -exports.encodeU32 = encodeU32; -exports.encodeI32 = encodeI32; -exports.encodeI64 = encodeI64; -exports.MAX_NUMBER_OF_BYTE_U64 = exports.MAX_NUMBER_OF_BYTE_U32 = void 0; - -var _leb = _interopRequireDefault(__webpack_require__(71529)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * According to https://webassembly.github.io/spec/core/binary/values.html#binary-int - * max = ceil(32/7) - */ -var MAX_NUMBER_OF_BYTE_U32 = 5; -/** - * According to https://webassembly.github.io/spec/core/binary/values.html#binary-int - * max = ceil(64/7) - */ - -exports.MAX_NUMBER_OF_BYTE_U32 = MAX_NUMBER_OF_BYTE_U32; -var MAX_NUMBER_OF_BYTE_U64 = 10; -exports.MAX_NUMBER_OF_BYTE_U64 = MAX_NUMBER_OF_BYTE_U64; - -function decodeInt64(encodedBuffer, index) { - return _leb.default.decodeInt64(encodedBuffer, index); -} - -function decodeUInt64(encodedBuffer, index) { - return _leb.default.decodeUInt64(encodedBuffer, index); -} - -function decodeInt32(encodedBuffer, index) { - return _leb.default.decodeInt32(encodedBuffer, index); -} - -function decodeUInt32(encodedBuffer, index) { - return _leb.default.decodeUInt32(encodedBuffer, index); -} - -function encodeU32(v) { - return _leb.default.encodeUInt32(v); -} - -function encodeI32(v) { - return _leb.default.encodeInt32(v); -} - -function encodeI64(v) { - return _leb.default.encodeInt64(v); -} - -/***/ }), - -/***/ 71529: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -// Copyright 2012 The Obvious Corporation. - -/* - * leb: LEB128 utilities. - */ - -/* - * Modules used - */ - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _long = _interopRequireDefault(__webpack_require__(68396)); - -var bits = _interopRequireWildcard(__webpack_require__(87294)); - -var bufs = _interopRequireWildcard(__webpack_require__(50853)); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/* - * Module variables - */ - -/** The minimum possible 32-bit signed int. */ -var MIN_INT32 = -0x80000000; -/** The maximum possible 32-bit signed int. */ - -var MAX_INT32 = 0x7fffffff; -/** The maximum possible 32-bit unsigned int. */ - -var MAX_UINT32 = 0xffffffff; -/** The minimum possible 64-bit signed int. */ -// const MIN_INT64 = -0x8000000000000000; - -/** - * The maximum possible 64-bit signed int that is representable as a - * JavaScript number. - */ -// const MAX_INT64 = 0x7ffffffffffffc00; - -/** - * The maximum possible 64-bit unsigned int that is representable as a - * JavaScript number. - */ -// const MAX_UINT64 = 0xfffffffffffff800; - -/* - * Helper functions - */ - -/** - * Determines the number of bits required to encode the number - * represented in the given buffer as a signed value. The buffer is - * taken to represent a signed number in little-endian form. - * - * The number of bits to encode is the (zero-based) bit number of the - * highest-order non-sign-matching bit, plus two. For example: - * - * 11111011 01110101 - * high low - * - * The sign bit here is 1 (that is, it's a negative number). The highest - * bit number that doesn't match the sign is bit #10 (where the lowest-order - * bit is bit #0). So, we have to encode at least 12 bits total. - * - * As a special degenerate case, the numbers 0 and -1 each require just one bit. - */ - -function signedBitCount(buffer) { - return bits.highOrder(bits.getSign(buffer) ^ 1, buffer) + 2; -} -/** - * Determines the number of bits required to encode the number - * represented in the given buffer as an unsigned value. The buffer is - * taken to represent an unsigned number in little-endian form. - * - * The number of bits to encode is the (zero-based) bit number of the - * highest-order 1 bit, plus one. For example: - * - * 00011000 01010011 - * high low - * - * The highest-order 1 bit here is bit #12 (where the lowest-order bit - * is bit #0). So, we have to encode at least 13 bits total. - * - * As a special degenerate case, the number 0 requires 1 bit. - */ - - -function unsignedBitCount(buffer) { - var result = bits.highOrder(1, buffer) + 1; - return result ? result : 1; -} -/** - * Common encoder for both signed and unsigned ints. This takes a - * bigint-ish buffer, returning an LEB128-encoded buffer. - */ - - -function encodeBufferCommon(buffer, signed) { - var signBit; - var bitCount; - - if (signed) { - signBit = bits.getSign(buffer); - bitCount = signedBitCount(buffer); - } else { - signBit = 0; - bitCount = unsignedBitCount(buffer); - } - - var byteCount = Math.ceil(bitCount / 7); - var result = bufs.alloc(byteCount); - - for (var i = 0; i < byteCount; i++) { - var payload = bits.extract(buffer, i * 7, 7, signBit); - result[i] = payload | 0x80; - } // Mask off the top bit of the last byte, to indicate the end of the - // encoding. - - - result[byteCount - 1] &= 0x7f; - return result; -} -/** - * Gets the byte-length of the value encoded in the given buffer at - * the given index. - */ - - -function encodedLength(encodedBuffer, index) { - var result = 0; - - while (encodedBuffer[index + result] >= 0x80) { - result++; - } - - result++; // to account for the last byte - - if (index + result > encodedBuffer.length) {// FIXME(sven): seems to cause false positives - // throw new Error("integer representation too long"); - } - - return result; -} -/** - * Common decoder for both signed and unsigned ints. This takes an - * LEB128-encoded buffer, returning a bigint-ish buffer. - */ - - -function decodeBufferCommon(encodedBuffer, index, signed) { - index = index === undefined ? 0 : index; - var length = encodedLength(encodedBuffer, index); - var bitLength = length * 7; - var byteLength = Math.ceil(bitLength / 8); - var result = bufs.alloc(byteLength); - var outIndex = 0; - - while (length > 0) { - bits.inject(result, outIndex, 7, encodedBuffer[index]); - outIndex += 7; - index++; - length--; - } - - var signBit; - var signByte; - - if (signed) { - // Sign-extend the last byte. - var lastByte = result[byteLength - 1]; - var endBit = outIndex % 8; - - if (endBit !== 0) { - var shift = 32 - endBit; // 32 because JS bit ops work on 32-bit ints. - - lastByte = result[byteLength - 1] = lastByte << shift >> shift & 0xff; - } - - signBit = lastByte >> 7; - signByte = signBit * 0xff; - } else { - signBit = 0; - signByte = 0; - } // Slice off any superfluous bytes, that is, ones that add no meaningful - // bits (because the value would be the same if they were removed). - - - while (byteLength > 1 && result[byteLength - 1] === signByte && (!signed || result[byteLength - 2] >> 7 === signBit)) { - byteLength--; - } - - result = bufs.resize(result, byteLength); - return { - value: result, - nextIndex: index - }; -} -/* - * Exported bindings - */ - - -function encodeIntBuffer(buffer) { - return encodeBufferCommon(buffer, true); -} - -function decodeIntBuffer(encodedBuffer, index) { - return decodeBufferCommon(encodedBuffer, index, true); -} - -function encodeInt32(num) { - var buf = bufs.alloc(4); - buf.writeInt32LE(num, 0); - var result = encodeIntBuffer(buf); - bufs.free(buf); - return result; -} - -function decodeInt32(encodedBuffer, index) { - var result = decodeIntBuffer(encodedBuffer, index); - var parsed = bufs.readInt(result.value); - var value = parsed.value; - bufs.free(result.value); - - if (value < MIN_INT32 || value > MAX_INT32) { - throw new Error("integer too large"); - } - - return { - value: value, - nextIndex: result.nextIndex - }; -} - -function encodeInt64(num) { - var buf = bufs.alloc(8); - bufs.writeInt64(num, buf); - var result = encodeIntBuffer(buf); - bufs.free(buf); - return result; -} - -function decodeInt64(encodedBuffer, index) { - var result = decodeIntBuffer(encodedBuffer, index); - - var value = _long.default.fromBytesLE(result.value, false); - - bufs.free(result.value); - return { - value: value, - nextIndex: result.nextIndex, - lossy: false - }; -} - -function encodeUIntBuffer(buffer) { - return encodeBufferCommon(buffer, false); -} - -function decodeUIntBuffer(encodedBuffer, index) { - return decodeBufferCommon(encodedBuffer, index, false); -} - -function encodeUInt32(num) { - var buf = bufs.alloc(4); - buf.writeUInt32LE(num, 0); - var result = encodeUIntBuffer(buf); - bufs.free(buf); - return result; -} - -function decodeUInt32(encodedBuffer, index) { - var result = decodeUIntBuffer(encodedBuffer, index); - var parsed = bufs.readUInt(result.value); - var value = parsed.value; - bufs.free(result.value); - - if (value > MAX_UINT32) { - throw new Error("integer too large"); - } - - return { - value: value, - nextIndex: result.nextIndex - }; -} - -function encodeUInt64(num) { - var buf = bufs.alloc(8); - bufs.writeUInt64(num, buf); - var result = encodeUIntBuffer(buf); - bufs.free(buf); - return result; -} - -function decodeUInt64(encodedBuffer, index) { - var result = decodeUIntBuffer(encodedBuffer, index); - - var value = _long.default.fromBytesLE(result.value, true); - - bufs.free(result.value); - return { - value: value, - nextIndex: result.nextIndex, - lossy: false - }; -} - -var _default = { - decodeInt32: decodeInt32, - decodeInt64: decodeInt64, - decodeIntBuffer: decodeIntBuffer, - decodeUInt32: decodeUInt32, - decodeUInt64: decodeUInt64, - decodeUIntBuffer: decodeUIntBuffer, - encodeInt32: encodeInt32, - encodeInt64: encodeInt64, - encodeIntBuffer: encodeIntBuffer, - encodeUInt32: encodeUInt32, - encodeUInt64: encodeUInt64, - encodeUIntBuffer: encodeUIntBuffer -}; -exports["default"] = _default; - -/***/ }), - -/***/ 17353: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decode = decode; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } - -function con(b) { - if ((b & 0xc0) === 0x80) { - return b & 0x3f; - } else { - throw new Error("invalid UTF-8 encoding"); - } -} - -function code(min, n) { - if (n < min || 0xd800 <= n && n < 0xe000 || n >= 0x10000) { - throw new Error("invalid UTF-8 encoding"); - } else { - return n; - } -} - -function decode(bytes) { - return _decode(bytes).map(function (x) { - return String.fromCharCode(x); - }).join(""); -} - -function _decode(bytes) { - if (bytes.length === 0) { - return []; - } - /** - * 1 byte - */ - - - { - var _bytes = _toArray(bytes), - b1 = _bytes[0], - bs = _bytes.slice(1); - - if (b1 < 0x80) { - return [code(0x0, b1)].concat(_toConsumableArray(_decode(bs))); - } - - if (b1 < 0xc0) { - throw new Error("invalid UTF-8 encoding"); - } - } - /** - * 2 bytes - */ - - { - var _bytes2 = _toArray(bytes), - _b = _bytes2[0], - b2 = _bytes2[1], - _bs = _bytes2.slice(2); - - if (_b < 0xe0) { - return [code(0x80, ((_b & 0x1f) << 6) + con(b2))].concat(_toConsumableArray(_decode(_bs))); - } - } - /** - * 3 bytes - */ - - { - var _bytes3 = _toArray(bytes), - _b2 = _bytes3[0], - _b3 = _bytes3[1], - b3 = _bytes3[2], - _bs2 = _bytes3.slice(3); - - if (_b2 < 0xf0) { - return [code(0x800, ((_b2 & 0x0f) << 12) + (con(_b3) << 6) + con(b3))].concat(_toConsumableArray(_decode(_bs2))); - } - } - /** - * 4 bytes - */ - - { - var _bytes4 = _toArray(bytes), - _b4 = _bytes4[0], - _b5 = _bytes4[1], - _b6 = _bytes4[2], - b4 = _bytes4[3], - _bs3 = _bytes4.slice(4); - - if (_b4 < 0xf8) { - return [code(0x10000, (((_b4 & 0x07) << 18) + con(_b5) << 12) + (con(_b6) << 6) + con(b4))].concat(_toConsumableArray(_decode(_bs3))); - } - } - throw new Error("invalid UTF-8 encoding"); -} - -/***/ }), - -/***/ 32383: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.encode = encode; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } - -function con(n) { - return 0x80 | n & 0x3f; -} - -function encode(str) { - var arr = str.split("").map(function (x) { - return x.charCodeAt(0); - }); - return _encode(arr); -} - -function _encode(arr) { - if (arr.length === 0) { - return []; - } - - var _arr = _toArray(arr), - n = _arr[0], - ns = _arr.slice(1); - - if (n < 0) { - throw new Error("utf8"); - } - - if (n < 0x80) { - return [n].concat(_toConsumableArray(_encode(ns))); - } - - if (n < 0x800) { - return [0xc0 | n >>> 6, con(n)].concat(_toConsumableArray(_encode(ns))); - } - - if (n < 0x10000) { - return [0xe0 | n >>> 12, con(n >>> 6), con(n)].concat(_toConsumableArray(_encode(ns))); - } - - if (n < 0x110000) { - return [0xf0 | n >>> 18, con(n >>> 12), con(n >>> 6), con(n)].concat(_toConsumableArray(_encode(ns))); - } - - throw new Error("utf8"); -} - -/***/ }), - -/***/ 59881: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "decode", ({ - enumerable: true, - get: function get() { - return _decoder.decode; - } -})); -Object.defineProperty(exports, "encode", ({ - enumerable: true, - get: function get() { - return _encoder.encode; - } -})); - -var _decoder = __webpack_require__(17353); - -var _encoder = __webpack_require__(32383); - -/***/ }), - -/***/ 92330: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.applyOperations = applyOperations; - -var _wasmGen = __webpack_require__(50908); - -var _encoder = __webpack_require__(29100); - -var _ast = __webpack_require__(44977); - -var _helperWasmSection = __webpack_require__(16111); - -var _helperBuffer = __webpack_require__(623); - -var _helperWasmBytecode = __webpack_require__(67658); - -function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } - -function shiftLocNodeByDelta(node, delta) { - (0, _ast.assertHasLoc)(node); // $FlowIgnore: assertHasLoc ensures that - - node.loc.start.column += delta; // $FlowIgnore: assertHasLoc ensures that - - node.loc.end.column += delta; -} - -function applyUpdate(ast, uint8Buffer, _ref) { - var _ref2 = _slicedToArray(_ref, 2), - oldNode = _ref2[0], - newNode = _ref2[1]; - - var deltaElements = 0; - (0, _ast.assertHasLoc)(oldNode); - var sectionName = (0, _helperWasmBytecode.getSectionForNode)(newNode); - var replacementByteArray = (0, _wasmGen.encodeNode)(newNode); - /** - * Replace new node as bytes - */ - - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, // $FlowIgnore: assertHasLoc ensures that - oldNode.loc.start.column, // $FlowIgnore: assertHasLoc ensures that - oldNode.loc.end.column, replacementByteArray); - /** - * Update function body size if needed - */ - - if (sectionName === "code") { - // Find the parent func - (0, _ast.traverse)(ast, { - Func: function Func(_ref3) { - var node = _ref3.node; - var funcHasThisIntr = node.body.find(function (n) { - return n === newNode; - }) !== undefined; // Update func's body size if needed - - if (funcHasThisIntr === true) { - // These are the old functions locations informations - (0, _ast.assertHasLoc)(node); - var oldNodeSize = (0, _wasmGen.encodeNode)(oldNode).length; - var bodySizeDeltaBytes = replacementByteArray.length - oldNodeSize; - - if (bodySizeDeltaBytes !== 0) { - var newValue = node.metadata.bodySize + bodySizeDeltaBytes; - var newByteArray = (0, _encoder.encodeU32)(newValue); // function body size byte - // FIXME(sven): only handles one byte u32 - - var start = node.loc.start.column; - var end = start + 1; - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newByteArray); - } - } - } - }); - } - /** - * Update section size - */ - - - var deltaBytes = replacementByteArray.length - ( // $FlowIgnore: assertHasLoc ensures that - oldNode.loc.end.column - oldNode.loc.start.column); // Init location informations - - newNode.loc = { - start: { - line: -1, - column: -1 - }, - end: { - line: -1, - column: -1 - } - }; // Update new node end position - // $FlowIgnore: assertHasLoc ensures that - - newNode.loc.start.column = oldNode.loc.start.column; // $FlowIgnore: assertHasLoc ensures that - - newNode.loc.end.column = // $FlowIgnore: assertHasLoc ensures that - oldNode.loc.start.column + replacementByteArray.length; - return { - uint8Buffer: uint8Buffer, - deltaBytes: deltaBytes, - deltaElements: deltaElements - }; -} - -function applyDelete(ast, uint8Buffer, node) { - var deltaElements = -1; // since we removed an element - - (0, _ast.assertHasLoc)(node); - var sectionName = (0, _helperWasmBytecode.getSectionForNode)(node); - - if (sectionName === "start") { - var sectionMetadata = (0, _ast.getSectionMetadata)(ast, "start"); - /** - * The start section only contains one element, - * we need to remove the whole section - */ - - uint8Buffer = (0, _helperWasmSection.removeSections)(ast, uint8Buffer, "start"); - - var _deltaBytes = -(sectionMetadata.size.value + 1); - /* section id */ - - - return { - uint8Buffer: uint8Buffer, - deltaBytes: _deltaBytes, - deltaElements: deltaElements - }; - } // replacement is nothing - - - var replacement = []; - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, // $FlowIgnore: assertHasLoc ensures that - node.loc.start.column, // $FlowIgnore: assertHasLoc ensures that - node.loc.end.column, replacement); - /** - * Update section - */ - // $FlowIgnore: assertHasLoc ensures that - - var deltaBytes = -(node.loc.end.column - node.loc.start.column); - return { - uint8Buffer: uint8Buffer, - deltaBytes: deltaBytes, - deltaElements: deltaElements - }; -} - -function applyAdd(ast, uint8Buffer, node) { - var deltaElements = +1; // since we added an element - - var sectionName = (0, _helperWasmBytecode.getSectionForNode)(node); - var sectionMetadata = (0, _ast.getSectionMetadata)(ast, sectionName); // Section doesn't exists, we create an empty one - - if (typeof sectionMetadata === "undefined") { - var res = (0, _helperWasmSection.createEmptySection)(ast, uint8Buffer, sectionName); - uint8Buffer = res.uint8Buffer; - sectionMetadata = res.sectionMetadata; - } - /** - * check that the expressions were ended - */ - - - if ((0, _ast.isFunc)(node)) { - // $FlowIgnore - var body = node.body; - - if (body.length === 0 || body[body.length - 1].id !== "end") { - throw new Error("expressions must be ended"); - } - } - - if ((0, _ast.isGlobal)(node)) { - // $FlowIgnore - var body = node.init; - - if (body.length === 0 || body[body.length - 1].id !== "end") { - throw new Error("expressions must be ended"); - } - } - /** - * Add nodes - */ - - - var newByteArray = (0, _wasmGen.encodeNode)(node); // The size of the section doesn't include the storage of the size itself - // we need to manually add it here - - var start = (0, _ast.getEndOfSection)(sectionMetadata); - var end = start; - /** - * Update section - */ - - var deltaBytes = newByteArray.length; - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newByteArray); - node.loc = { - start: { - line: -1, - column: start - }, - end: { - line: -1, - column: start + deltaBytes - } - }; // for func add the additional metadata in the AST - - if (node.type === "Func") { - // the size is the first byte - // FIXME(sven): handle LEB128 correctly here - var bodySize = newByteArray[0]; - node.metadata = { - bodySize: bodySize - }; - } - - if (node.type !== "IndexInFuncSection") { - (0, _ast.orderedInsertNode)(ast.body[0], node); - } - - return { - uint8Buffer: uint8Buffer, - deltaBytes: deltaBytes, - deltaElements: deltaElements - }; -} - -function applyOperations(ast, uint8Buffer, ops) { - ops.forEach(function (op) { - var state; - var sectionName; - - switch (op.kind) { - case "update": - state = applyUpdate(ast, uint8Buffer, [op.oldNode, op.node]); - sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); - break; - - case "delete": - state = applyDelete(ast, uint8Buffer, op.node); - sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); - break; - - case "add": - state = applyAdd(ast, uint8Buffer, op.node); - sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); - break; - - default: - throw new Error("Unknown operation"); - } - /** - * Resize section vec size. - * If the length of the LEB-encoded size changes, this can change - * the byte length of the section and the offset for nodes in the - * section. So we do this first before resizing section byte size - * or shifting following operations' nodes. - */ - - - if (state.deltaElements !== 0 && sectionName !== "start") { - var oldBufferLength = state.uint8Buffer.length; - state.uint8Buffer = (0, _helperWasmSection.resizeSectionVecSize)(ast, state.uint8Buffer, sectionName, state.deltaElements); // Infer bytes added/removed by comparing buffer lengths - - state.deltaBytes += state.uint8Buffer.length - oldBufferLength; - } - /** - * Resize section byte size. - * If the length of the LEB-encoded size changes, this can change - * the offset for nodes in the section. So we do this before - * shifting following operations' nodes. - */ - - - if (state.deltaBytes !== 0 && sectionName !== "start") { - var _oldBufferLength = state.uint8Buffer.length; - state.uint8Buffer = (0, _helperWasmSection.resizeSectionByteSize)(ast, state.uint8Buffer, sectionName, state.deltaBytes); // Infer bytes added/removed by comparing buffer lengths - - state.deltaBytes += state.uint8Buffer.length - _oldBufferLength; - } - /** - * Shift following operation's nodes - */ - - - if (state.deltaBytes !== 0) { - ops.forEach(function (op) { - // We don't need to handle add ops, they are positioning independent - switch (op.kind) { - case "update": - shiftLocNodeByDelta(op.oldNode, state.deltaBytes); - break; - - case "delete": - shiftLocNodeByDelta(op.node, state.deltaBytes); - break; - } - }); - } - - uint8Buffer = state.uint8Buffer; - }); - return uint8Buffer; -} - -/***/ }), - -/***/ 17696: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.edit = edit; -exports.editWithAST = editWithAST; -exports.add = add; -exports.addWithAST = addWithAST; - -var _wasmParser = __webpack_require__(41786); - -var _ast = __webpack_require__(44977); - -var _clone = __webpack_require__(96381); - -var _wasmOpt = __webpack_require__(845); - -var _helperWasmBytecode = _interopRequireWildcard(__webpack_require__(67658)); - -var _apply = __webpack_require__(92330); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function hashNode(node) { - return JSON.stringify(node); -} - -function preprocess(ab) { - var optBin = (0, _wasmOpt.shrinkPaddedLEB128)(new Uint8Array(ab)); - return optBin.buffer; -} - -function sortBySectionOrder(nodes) { - var originalOrder = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _node = _step.value; - originalOrder.set(_node, originalOrder.size); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - nodes.sort(function (a, b) { - var sectionA = (0, _helperWasmBytecode.getSectionForNode)(a); - var sectionB = (0, _helperWasmBytecode.getSectionForNode)(b); - var aId = _helperWasmBytecode.default.sections[sectionA]; - var bId = _helperWasmBytecode.default.sections[sectionB]; - - if (typeof aId !== "number" || typeof bId !== "number") { - throw new Error("Section id not found"); - } - - if (aId === bId) { - // $FlowIgnore originalOrder is filled for all nodes - return originalOrder.get(a) - originalOrder.get(b); - } - - return aId - bId; - }); -} - -function edit(ab, visitors) { - ab = preprocess(ab); - var ast = (0, _wasmParser.decode)(ab); - return editWithAST(ast, ab, visitors); -} - -function editWithAST(ast, ab, visitors) { - var operations = []; - var uint8Buffer = new Uint8Array(ab); - var nodeBefore; - - function before(type, path) { - nodeBefore = (0, _clone.cloneNode)(path.node); - } - - function after(type, path) { - if (path.node._deleted === true) { - operations.push({ - kind: "delete", - node: path.node - }); // $FlowIgnore - } else if (hashNode(nodeBefore) !== hashNode(path.node)) { - operations.push({ - kind: "update", - oldNode: nodeBefore, - node: path.node - }); - } - } - - (0, _ast.traverse)(ast, visitors, before, after); - uint8Buffer = (0, _apply.applyOperations)(ast, uint8Buffer, operations); - return uint8Buffer.buffer; -} - -function add(ab, newNodes) { - ab = preprocess(ab); - var ast = (0, _wasmParser.decode)(ab); - return addWithAST(ast, ab, newNodes); -} - -function addWithAST(ast, ab, newNodes) { - // Sort nodes by insertion order - sortBySectionOrder(newNodes); - var uint8Buffer = new Uint8Array(ab); // Map node into operations - - var operations = newNodes.map(function (n) { - return { - kind: "add", - node: n - }; - }); - uint8Buffer = (0, _apply.applyOperations)(ast, uint8Buffer, operations); - return uint8Buffer.buffer; -} - -/***/ }), - -/***/ 29100: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.encodeVersion = encodeVersion; -exports.encodeHeader = encodeHeader; -exports.encodeU32 = encodeU32; -exports.encodeI32 = encodeI32; -exports.encodeI64 = encodeI64; -exports.encodeVec = encodeVec; -exports.encodeValtype = encodeValtype; -exports.encodeMutability = encodeMutability; -exports.encodeUTF8Vec = encodeUTF8Vec; -exports.encodeLimits = encodeLimits; -exports.encodeModuleImport = encodeModuleImport; -exports.encodeSectionMetadata = encodeSectionMetadata; -exports.encodeCallInstruction = encodeCallInstruction; -exports.encodeCallIndirectInstruction = encodeCallIndirectInstruction; -exports.encodeModuleExport = encodeModuleExport; -exports.encodeTypeInstruction = encodeTypeInstruction; -exports.encodeInstr = encodeInstr; -exports.encodeStringLiteral = encodeStringLiteral; -exports.encodeGlobal = encodeGlobal; -exports.encodeFuncBody = encodeFuncBody; -exports.encodeIndexInFuncSection = encodeIndexInFuncSection; -exports.encodeElem = encodeElem; - -var leb = _interopRequireWildcard(__webpack_require__(21294)); - -var ieee754 = _interopRequireWildcard(__webpack_require__(31395)); - -var utf8 = _interopRequireWildcard(__webpack_require__(59881)); - -var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(67658)); - -var _index = __webpack_require__(50908); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function assertNotIdentifierNode(n) { - if (n.type === "Identifier") { - throw new Error("Unsupported node Identifier"); - } -} - -function encodeVersion(v) { - var bytes = _helperWasmBytecode.default.moduleVersion; - bytes[0] = v; - return bytes; -} - -function encodeHeader() { - return _helperWasmBytecode.default.magicModuleHeader; -} - -function encodeU32(v) { - var uint8view = new Uint8Array(leb.encodeU32(v)); - - var array = _toConsumableArray(uint8view); - - return array; -} - -function encodeI32(v) { - var uint8view = new Uint8Array(leb.encodeI32(v)); - - var array = _toConsumableArray(uint8view); - - return array; -} - -function encodeI64(v) { - var uint8view = new Uint8Array(leb.encodeI64(v)); - - var array = _toConsumableArray(uint8view); - - return array; -} - -function encodeVec(elements) { - var size = encodeU32(elements.length); - return _toConsumableArray(size).concat(_toConsumableArray(elements)); -} - -function encodeValtype(v) { - var byte = _helperWasmBytecode.default.valtypesByString[v]; - - if (typeof byte === "undefined") { - throw new Error("Unknown valtype: " + v); - } - - return parseInt(byte, 10); -} - -function encodeMutability(v) { - var byte = _helperWasmBytecode.default.globalTypesByString[v]; - - if (typeof byte === "undefined") { - throw new Error("Unknown mutability: " + v); - } - - return parseInt(byte, 10); -} - -function encodeUTF8Vec(str) { - return encodeVec(utf8.encode(str)); -} - -function encodeLimits(n) { - var out = []; - - if (typeof n.max === "number") { - out.push(0x01); - out.push.apply(out, _toConsumableArray(encodeU32(n.min))); // $FlowIgnore: ensured by the typeof - - out.push.apply(out, _toConsumableArray(encodeU32(n.max))); - } else { - out.push(0x00); - out.push.apply(out, _toConsumableArray(encodeU32(n.min))); - } - - return out; -} - -function encodeModuleImport(n) { - var out = []; - out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.module))); - out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.name))); - - switch (n.descr.type) { - case "GlobalType": - { - out.push(0x03); // $FlowIgnore: GlobalType ensure that these props exists - - out.push(encodeValtype(n.descr.valtype)); // $FlowIgnore: GlobalType ensure that these props exists - - out.push(encodeMutability(n.descr.mutability)); - break; - } - - case "Memory": - { - out.push(0x02); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeLimits(n.descr.limits))); - break; - } - - case "Table": - { - out.push(0x01); - out.push(0x70); // element type - // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeLimits(n.descr.limits))); - break; - } - - case "FuncImportDescr": - { - out.push(0x00); // $FlowIgnore - - assertNotIdentifierNode(n.descr.id); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeU32(n.descr.id.value))); - break; - } - - default: - throw new Error("Unsupport operation: encode module import of type: " + n.descr.type); - } - - return out; -} - -function encodeSectionMetadata(n) { - var out = []; - var sectionId = _helperWasmBytecode.default.sections[n.section]; - - if (typeof sectionId === "undefined") { - throw new Error("Unknown section: " + n.section); - } - - if (n.section === "start") { - /** - * This is not implemented yet because it's a special case which - * doesn't have a vector in its section. - */ - throw new Error("Unsupported section encoding of type start"); - } - - out.push(sectionId); - out.push.apply(out, _toConsumableArray(encodeU32(n.size.value))); - out.push.apply(out, _toConsumableArray(encodeU32(n.vectorOfSize.value))); - return out; -} - -function encodeCallInstruction(n) { - var out = []; - assertNotIdentifierNode(n.index); - out.push(0x10); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeU32(n.index.value))); - return out; -} - -function encodeCallIndirectInstruction(n) { - var out = []; // $FlowIgnore - - assertNotIdentifierNode(n.index); - out.push(0x11); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeU32(n.index.value))); // add a reserved byte - - out.push(0x00); - return out; -} - -function encodeModuleExport(n) { - var out = []; - assertNotIdentifierNode(n.descr.id); - var exportTypeByteString = _helperWasmBytecode.default.exportTypesByName[n.descr.exportType]; - - if (typeof exportTypeByteString === "undefined") { - throw new Error("Unknown export of type: " + n.descr.exportType); - } - - var exportTypeByte = parseInt(exportTypeByteString, 10); - out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.name))); - out.push(exportTypeByte); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeU32(n.descr.id.value))); - return out; -} - -function encodeTypeInstruction(n) { - var out = [0x60]; - var params = n.functype.params.map(function (x) { - return x.valtype; - }).map(encodeValtype); - var results = n.functype.results.map(encodeValtype); - out.push.apply(out, _toConsumableArray(encodeVec(params))); - out.push.apply(out, _toConsumableArray(encodeVec(results))); - return out; -} - -function encodeInstr(n) { - var out = []; - var instructionName = n.id; - - if (typeof n.object === "string") { - instructionName = "".concat(n.object, ".").concat(String(n.id)); - } - - var byteString = _helperWasmBytecode.default.symbolsByName[instructionName]; - - if (typeof byteString === "undefined") { - throw new Error("encodeInstr: unknown instruction " + JSON.stringify(instructionName)); - } - - var byte = parseInt(byteString, 10); - out.push(byte); - - if (n.args) { - n.args.forEach(function (arg) { - var encoder = encodeU32; // find correct encoder - - if (n.object === "i32") { - encoder = encodeI32; - } - - if (n.object === "i64") { - encoder = encodeI64; - } - - if (n.object === "f32") { - encoder = ieee754.encodeF32; - } - - if (n.object === "f64") { - encoder = ieee754.encodeF64; - } - - if (arg.type === "NumberLiteral" || arg.type === "FloatLiteral" || arg.type === "LongNumberLiteral") { - // $FlowIgnore - out.push.apply(out, _toConsumableArray(encoder(arg.value))); - } else { - throw new Error("Unsupported instruction argument encoding " + JSON.stringify(arg.type)); - } - }); - } - - return out; -} - -function encodeExpr(instrs) { - var out = []; - instrs.forEach(function (instr) { - // $FlowIgnore - var n = (0, _index.encodeNode)(instr); - out.push.apply(out, _toConsumableArray(n)); - }); - return out; -} - -function encodeStringLiteral(n) { - return encodeUTF8Vec(n.value); -} - -function encodeGlobal(n) { - var out = []; - var _n$globalType = n.globalType, - valtype = _n$globalType.valtype, - mutability = _n$globalType.mutability; - out.push(encodeValtype(valtype)); - out.push(encodeMutability(mutability)); - out.push.apply(out, _toConsumableArray(encodeExpr(n.init))); - return out; -} - -function encodeFuncBody(n) { - var out = []; - out.push(-1); // temporary function body size - // FIXME(sven): get the func locals? - - var localBytes = encodeVec([]); - out.push.apply(out, _toConsumableArray(localBytes)); - var funcBodyBytes = encodeExpr(n.body); - out[0] = funcBodyBytes.length + localBytes.length; - out.push.apply(out, _toConsumableArray(funcBodyBytes)); - return out; -} - -function encodeIndexInFuncSection(n) { - assertNotIdentifierNode(n.index); // $FlowIgnore - - return encodeU32(n.index.value); -} - -function encodeElem(n) { - var out = []; - assertNotIdentifierNode(n.table); // $FlowIgnore - - out.push.apply(out, _toConsumableArray(encodeU32(n.table.value))); - out.push.apply(out, _toConsumableArray(encodeExpr(n.offset))); // $FlowIgnore - - var funcs = n.funcs.reduce(function (acc, x) { - return _toConsumableArray(acc).concat(_toConsumableArray(encodeU32(x.value))); - }, []); - out.push.apply(out, _toConsumableArray(encodeVec(funcs))); - return out; -} - -/***/ }), - -/***/ 50908: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.encodeNode = encodeNode; -exports.encodeU32 = void 0; - -var encoder = _interopRequireWildcard(__webpack_require__(29100)); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function encodeNode(n) { - switch (n.type) { - case "ModuleImport": - // $FlowIgnore: ModuleImport ensure that the node is well formated - return encoder.encodeModuleImport(n); - - case "SectionMetadata": - // $FlowIgnore: SectionMetadata ensure that the node is well formated - return encoder.encodeSectionMetadata(n); - - case "CallInstruction": - // $FlowIgnore: SectionMetadata ensure that the node is well formated - return encoder.encodeCallInstruction(n); - - case "CallIndirectInstruction": - // $FlowIgnore: SectionMetadata ensure that the node is well formated - return encoder.encodeCallIndirectInstruction(n); - - case "TypeInstruction": - return encoder.encodeTypeInstruction(n); - - case "Instr": - // $FlowIgnore - return encoder.encodeInstr(n); - - case "ModuleExport": - // $FlowIgnore: SectionMetadata ensure that the node is well formated - return encoder.encodeModuleExport(n); - - case "Global": - // $FlowIgnore - return encoder.encodeGlobal(n); - - case "Func": - return encoder.encodeFuncBody(n); - - case "IndexInFuncSection": - return encoder.encodeIndexInFuncSection(n); - - case "StringLiteral": - return encoder.encodeStringLiteral(n); - - case "Elem": - return encoder.encodeElem(n); - - default: - throw new Error("Unsupported encoding for node of type: " + JSON.stringify(n.type)); - } -} - -var encodeU32 = encoder.encodeU32; -exports.encodeU32 = encodeU32; - -/***/ }), - -/***/ 845: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.shrinkPaddedLEB128 = shrinkPaddedLEB128; - -var _wasmParser = __webpack_require__(41786); - -var _leb = __webpack_require__(70712); - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var OptimizerError = -/*#__PURE__*/ -function (_Error) { - _inherits(OptimizerError, _Error); - - function OptimizerError(name, initalError) { - var _this; - - _classCallCheck(this, OptimizerError); - - _this = _possibleConstructorReturn(this, (OptimizerError.__proto__ || Object.getPrototypeOf(OptimizerError)).call(this, "Error while optimizing: " + name + ": " + initalError.message)); - _this.stack = initalError.stack; - return _this; - } - - return OptimizerError; -}(Error); - -var decoderOpts = { - ignoreCodeSection: true, - ignoreDataSection: true -}; - -function shrinkPaddedLEB128(uint8Buffer) { - try { - var ast = (0, _wasmParser.decode)(uint8Buffer.buffer, decoderOpts); - return (0, _leb.shrinkPaddedLEB128)(ast, uint8Buffer); - } catch (e) { - throw new OptimizerError("shrinkPaddedLEB128", e); - } -} - -/***/ }), - -/***/ 70712: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.shrinkPaddedLEB128 = shrinkPaddedLEB128; - -var _ast = __webpack_require__(44977); - -var _encoder = __webpack_require__(29100); - -var _helperBuffer = __webpack_require__(623); - -function shiftFollowingSections(ast, _ref, deltaInSizeEncoding) { - var section = _ref.section; - // Once we hit our section every that is after needs to be shifted by the delta - var encounteredSection = false; - (0, _ast.traverse)(ast, { - SectionMetadata: function SectionMetadata(path) { - if (path.node.section === section) { - encounteredSection = true; - return; - } - - if (encounteredSection === true) { - (0, _ast.shiftSection)(ast, path.node, deltaInSizeEncoding); - } - } - }); -} - -function shrinkPaddedLEB128(ast, uint8Buffer) { - (0, _ast.traverse)(ast, { - SectionMetadata: function SectionMetadata(_ref2) { - var node = _ref2.node; - - /** - * Section size - */ - { - var newu32Encoded = (0, _encoder.encodeU32)(node.size.value); - var newu32EncodedLen = newu32Encoded.length; - var start = node.size.loc.start.column; - var end = node.size.loc.end.column; - var oldu32EncodedLen = end - start; - - if (newu32EncodedLen !== oldu32EncodedLen) { - var deltaInSizeEncoding = oldu32EncodedLen - newu32EncodedLen; - uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newu32Encoded); - shiftFollowingSections(ast, node, -deltaInSizeEncoding); - } - } - } - }); - return uint8Buffer; -} - -/***/ }), - -/***/ 1466: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decode = decode; - -var _helperApiError = __webpack_require__(73261); - -var ieee754 = _interopRequireWildcard(__webpack_require__(31395)); - -var utf8 = _interopRequireWildcard(__webpack_require__(59881)); - -var t = _interopRequireWildcard(__webpack_require__(44977)); - -var _leb = __webpack_require__(21294); - -var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(67658)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function toHex(n) { - return "0x" + Number(n).toString(16); -} - -function byteArrayEq(l, r) { - if (l.length !== r.length) { - return false; - } - - for (var i = 0; i < l.length; i++) { - if (l[i] !== r[i]) { - return false; - } - } - - return true; -} - -function decode(ab, opts) { - var buf = new Uint8Array(ab); - var getUniqueName = t.getUniqueNameGenerator(); - var offset = 0; - - function getPosition() { - return { - line: -1, - column: offset - }; - } - - function dump(b, msg) { - if (opts.dump === false) return; - var pad = "\t\t\t\t\t\t\t\t\t\t"; - var str = ""; - - if (b.length < 5) { - str = b.map(toHex).join(" "); - } else { - str = "..."; - } - - console.log(toHex(offset) + ":\t", str, pad, ";", msg); - } - - function dumpSep(msg) { - if (opts.dump === false) return; - console.log(";", msg); - } - /** - * TODO(sven): we can atually use a same structure - * we are adding incrementally new features - */ - - - var state = { - elementsInFuncSection: [], - elementsInExportSection: [], - elementsInCodeSection: [], - - /** - * Decode memory from: - * - Memory section - */ - memoriesInModule: [], - - /** - * Decoded types from: - * - Type section - */ - typesInModule: [], - - /** - * Decoded functions from: - * - Function section - * - Import section - */ - functionsInModule: [], - - /** - * Decoded tables from: - * - Table section - */ - tablesInModule: [], - - /** - * Decoded globals from: - * - Global section - */ - globalsInModule: [] - }; - - function isEOF() { - return offset >= buf.length; - } - - function eatBytes(n) { - offset = offset + n; - } - - function readBytesAtOffset(_offset, numberOfBytes) { - var arr = []; - - for (var i = 0; i < numberOfBytes; i++) { - arr.push(buf[_offset + i]); - } - - return arr; - } - - function readBytes(numberOfBytes) { - return readBytesAtOffset(offset, numberOfBytes); - } - - function readF64() { - var bytes = readBytes(ieee754.NUMBER_OF_BYTE_F64); - var value = ieee754.decodeF64(bytes); - - if (Math.sign(value) * value === Infinity) { - return { - value: Math.sign(value), - inf: true, - nextIndex: ieee754.NUMBER_OF_BYTE_F64 - }; - } - - if (isNaN(value)) { - var sign = bytes[bytes.length - 1] >> 7 ? -1 : 1; - var mantissa = 0; - - for (var i = 0; i < bytes.length - 2; ++i) { - mantissa += bytes[i] * Math.pow(256, i); - } - - mantissa += bytes[bytes.length - 2] % 16 * Math.pow(256, bytes.length - 2); - return { - value: sign * mantissa, - nan: true, - nextIndex: ieee754.NUMBER_OF_BYTE_F64 - }; - } - - return { - value: value, - nextIndex: ieee754.NUMBER_OF_BYTE_F64 - }; - } - - function readF32() { - var bytes = readBytes(ieee754.NUMBER_OF_BYTE_F32); - var value = ieee754.decodeF32(bytes); - - if (Math.sign(value) * value === Infinity) { - return { - value: Math.sign(value), - inf: true, - nextIndex: ieee754.NUMBER_OF_BYTE_F32 - }; - } - - if (isNaN(value)) { - var sign = bytes[bytes.length - 1] >> 7 ? -1 : 1; - var mantissa = 0; - - for (var i = 0; i < bytes.length - 2; ++i) { - mantissa += bytes[i] * Math.pow(256, i); - } - - mantissa += bytes[bytes.length - 2] % 128 * Math.pow(256, bytes.length - 2); - return { - value: sign * mantissa, - nan: true, - nextIndex: ieee754.NUMBER_OF_BYTE_F32 - }; - } - - return { - value: value, - nextIndex: ieee754.NUMBER_OF_BYTE_F32 - }; - } - - function readUTF8String() { - var lenu32 = readU32(); // Don't eat any bytes. Instead, peek ahead of the current offset using - // readBytesAtOffset below. This keeps readUTF8String neutral with respect - // to the current offset, just like the other readX functions. - - var strlen = lenu32.value; - dump([strlen], "string length"); - var bytes = readBytesAtOffset(offset + lenu32.nextIndex, strlen); - var value = utf8.decode(bytes); - return { - value: value, - nextIndex: strlen + lenu32.nextIndex - }; - } - /** - * Decode an unsigned 32bits integer - * - * The length will be handled by the leb librairy, we pass the max number of - * byte. - */ - - - function readU32() { - var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U32); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeUInt32)(buffer); - } - - function readVaruint32() { - // where 32 bits = max 4 bytes - var bytes = readBytes(4); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeUInt32)(buffer); - } - - function readVaruint7() { - // where 7 bits = max 1 bytes - var bytes = readBytes(1); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeUInt32)(buffer); - } - /** - * Decode a signed 32bits interger - */ - - - function read32() { - var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U32); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeInt32)(buffer); - } - /** - * Decode a signed 64bits integer - */ - - - function read64() { - var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U64); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeInt64)(buffer); - } - - function readU64() { - var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U64); - var buffer = Buffer.from(bytes); - return (0, _leb.decodeUInt64)(buffer); - } - - function readByte() { - return readBytes(1)[0]; - } - - function parseModuleHeader() { - if (isEOF() === true || offset + 4 > buf.length) { - throw new Error("unexpected end"); - } - - var header = readBytes(4); - - if (byteArrayEq(_helperWasmBytecode.default.magicModuleHeader, header) === false) { - throw new _helperApiError.CompileError("magic header not detected"); - } - - dump(header, "wasm magic header"); - eatBytes(4); - } - - function parseVersion() { - if (isEOF() === true || offset + 4 > buf.length) { - throw new Error("unexpected end"); - } - - var version = readBytes(4); - - if (byteArrayEq(_helperWasmBytecode.default.moduleVersion, version) === false) { - throw new _helperApiError.CompileError("unknown binary version"); - } - - dump(version, "wasm version"); - eatBytes(4); - } - - function parseVec(cast) { - var u32 = readU32(); - var length = u32.value; - eatBytes(u32.nextIndex); - dump([length], "number"); - - if (length === 0) { - return []; - } - - var elements = []; - - for (var i = 0; i < length; i++) { - var byte = readByte(); - eatBytes(1); - var value = cast(byte); - dump([byte], value); - - if (typeof value === "undefined") { - throw new _helperApiError.CompileError("Internal failure: parseVec could not cast the value"); - } - - elements.push(value); - } - - return elements; - } // Type section - // https://webassembly.github.io/spec/binary/modules.html#binary-typesec - - - function parseTypeSection(numberOfTypes) { - var typeInstructionNodes = []; - dump([numberOfTypes], "num types"); - - for (var i = 0; i < numberOfTypes; i++) { - var _startLoc = getPosition(); - - dumpSep("type " + i); - var type = readByte(); - eatBytes(1); - - if (type == _helperWasmBytecode.default.types.func) { - dump([type], "func"); - var paramValtypes = parseVec(function (b) { - return _helperWasmBytecode.default.valtypes[b]; - }); - var params = paramValtypes.map(function (v) { - return t.funcParam( - /*valtype*/ - v); - }); - var result = parseVec(function (b) { - return _helperWasmBytecode.default.valtypes[b]; - }); - typeInstructionNodes.push(function () { - var endLoc = getPosition(); - return t.withLoc(t.typeInstruction(undefined, t.signature(params, result)), endLoc, _startLoc); - }()); - state.typesInModule.push({ - params: params, - result: result - }); - } else { - throw new Error("Unsupported type: " + toHex(type)); - } - } - - return typeInstructionNodes; - } // Import section - // https://webassembly.github.io/spec/binary/modules.html#binary-importsec - - - function parseImportSection(numberOfImports) { - var imports = []; - - for (var i = 0; i < numberOfImports; i++) { - dumpSep("import header " + i); - - var _startLoc2 = getPosition(); - /** - * Module name - */ - - - var moduleName = readUTF8String(); - eatBytes(moduleName.nextIndex); - dump([], "module name (".concat(moduleName.value, ")")); - /** - * Name - */ - - var name = readUTF8String(); - eatBytes(name.nextIndex); - dump([], "name (".concat(name.value, ")")); - /** - * Import descr - */ - - var descrTypeByte = readByte(); - eatBytes(1); - var descrType = _helperWasmBytecode.default.importTypes[descrTypeByte]; - dump([descrTypeByte], "import kind"); - - if (typeof descrType === "undefined") { - throw new _helperApiError.CompileError("Unknown import description type: " + toHex(descrTypeByte)); - } - - var importDescr = void 0; - - if (descrType === "func") { - var indexU32 = readU32(); - var typeindex = indexU32.value; - eatBytes(indexU32.nextIndex); - dump([typeindex], "type index"); - var signature = state.typesInModule[typeindex]; - - if (typeof signature === "undefined") { - throw new _helperApiError.CompileError("function signature not found (".concat(typeindex, ")")); - } - - var id = getUniqueName("func"); - importDescr = t.funcImportDescr(id, t.signature(signature.params, signature.result)); - state.functionsInModule.push({ - id: t.identifier(name.value), - signature: signature, - isExternal: true - }); - } else if (descrType === "global") { - importDescr = parseGlobalType(); - var globalNode = t.global(importDescr, []); - state.globalsInModule.push(globalNode); - } else if (descrType === "table") { - importDescr = parseTableType(i); - } else if (descrType === "mem") { - var memoryNode = parseMemoryType(0); - state.memoriesInModule.push(memoryNode); - importDescr = memoryNode; - } else { - throw new _helperApiError.CompileError("Unsupported import of type: " + descrType); - } - - imports.push(function () { - var endLoc = getPosition(); - return t.withLoc(t.moduleImport(moduleName.value, name.value, importDescr), endLoc, _startLoc2); - }()); - } - - return imports; - } // Function section - // https://webassembly.github.io/spec/binary/modules.html#function-section - - - function parseFuncSection(numberOfFunctions) { - dump([numberOfFunctions], "num funcs"); - - for (var i = 0; i < numberOfFunctions; i++) { - var indexU32 = readU32(); - var typeindex = indexU32.value; - eatBytes(indexU32.nextIndex); - dump([typeindex], "type index"); - var signature = state.typesInModule[typeindex]; - - if (typeof signature === "undefined") { - throw new _helperApiError.CompileError("function signature not found (".concat(typeindex, ")")); - } // preserve anonymous, a name might be resolved later - - - var id = t.withRaw(t.identifier(getUniqueName("func")), ""); - state.functionsInModule.push({ - id: id, - signature: signature, - isExternal: false - }); - } - } // Export section - // https://webassembly.github.io/spec/binary/modules.html#export-section - - - function parseExportSection(numberOfExport) { - dump([numberOfExport], "num exports"); // Parse vector of exports - - for (var i = 0; i < numberOfExport; i++) { - var _startLoc3 = getPosition(); - /** - * Name - */ - - - var name = readUTF8String(); - eatBytes(name.nextIndex); - dump([], "export name (".concat(name.value, ")")); - /** - * exportdescr - */ - - var typeIndex = readByte(); - eatBytes(1); - dump([typeIndex], "export kind"); - var indexu32 = readU32(); - var index = indexu32.value; - eatBytes(indexu32.nextIndex); - dump([index], "export index"); - var id = void 0, - signature = void 0; - - if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Func") { - var func = state.functionsInModule[index]; - - if (typeof func === "undefined") { - throw new _helperApiError.CompileError("unknown function (".concat(index, ")")); - } - - id = t.numberLiteralFromRaw(index, String(index)); - signature = func.signature; - } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Table") { - var table = state.tablesInModule[index]; - - if (typeof table === "undefined") { - throw new _helperApiError.CompileError("unknown table ".concat(index)); - } - - id = t.numberLiteralFromRaw(index, String(index)); - signature = null; - } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Mem") { - var memNode = state.memoriesInModule[index]; - - if (typeof memNode === "undefined") { - throw new _helperApiError.CompileError("unknown memory ".concat(index)); - } - - id = t.numberLiteralFromRaw(index, String(index)); - signature = null; - } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Global") { - var global = state.globalsInModule[index]; - - if (typeof global === "undefined") { - throw new _helperApiError.CompileError("unknown global ".concat(index)); - } - - id = t.numberLiteralFromRaw(index, String(index)); - signature = null; - } else { - console.warn("Unsupported export type: " + toHex(typeIndex)); - return; - } - - var endLoc = getPosition(); - state.elementsInExportSection.push({ - name: name.value, - type: _helperWasmBytecode.default.exportTypes[typeIndex], - signature: signature, - id: id, - index: index, - endLoc: endLoc, - startLoc: _startLoc3 - }); - } - } // Code section - // https://webassembly.github.io/spec/binary/modules.html#code-section - - - function parseCodeSection(numberOfFuncs) { - dump([numberOfFuncs], "number functions"); // Parse vector of function - - for (var i = 0; i < numberOfFuncs; i++) { - var _startLoc4 = getPosition(); - - dumpSep("function body " + i); // the u32 size of the function code in bytes - // Ignore it for now - - var bodySizeU32 = readU32(); - eatBytes(bodySizeU32.nextIndex); - dump([bodySizeU32.value], "function body size"); - var code = []; - /** - * Parse locals - */ - - var funcLocalNumU32 = readU32(); - var funcLocalNum = funcLocalNumU32.value; - eatBytes(funcLocalNumU32.nextIndex); - dump([funcLocalNum], "num locals"); - var locals = []; - - for (var _i = 0; _i < funcLocalNum; _i++) { - var _startLoc5 = getPosition(); - - var localCountU32 = readU32(); - var localCount = localCountU32.value; - eatBytes(localCountU32.nextIndex); - dump([localCount], "num local"); - var valtypeByte = readByte(); - eatBytes(1); - var type = _helperWasmBytecode.default.valtypes[valtypeByte]; - var args = []; - - for (var _i2 = 0; _i2 < localCount; _i2++) { - args.push(t.valtypeLiteral(type)); - } - - var localNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.instruction("local", args), endLoc, _startLoc5); - }(); - - locals.push(localNode); - dump([valtypeByte], type); - - if (typeof type === "undefined") { - throw new _helperApiError.CompileError("Unexpected valtype: " + toHex(valtypeByte)); - } - } - - code.push.apply(code, locals); // Decode instructions until the end - - parseInstructionBlock(code); - var endLoc = getPosition(); - state.elementsInCodeSection.push({ - code: code, - locals: locals, - endLoc: endLoc, - startLoc: _startLoc4, - bodySize: bodySizeU32.value - }); - } - } - - function parseInstructionBlock(code) { - while (true) { - var _startLoc6 = getPosition(); - - var instructionAlreadyCreated = false; - var instructionByte = readByte(); - eatBytes(1); - - if (instructionByte === 0xfe) { - instructionByte = 0xfe00 + readByte(); - eatBytes(1); - } - - var instruction = _helperWasmBytecode.default.symbolsByByte[instructionByte]; - - if (typeof instruction === "undefined") { - throw new _helperApiError.CompileError("Unexpected instruction: " + toHex(instructionByte)); - } - - if (typeof instruction.object === "string") { - dump([instructionByte], "".concat(instruction.object, ".").concat(instruction.name)); - } else { - dump([instructionByte], instruction.name); - } - /** - * End of the function - */ - - - if (instruction.name === "end") { - var node = function () { - var endLoc = getPosition(); - return t.withLoc(t.instruction(instruction.name), endLoc, _startLoc6); - }(); - - code.push(node); - break; - } - - var args = []; - - if (instruction.name === "loop") { - var _startLoc7 = getPosition(); - - var blocktypeByte = readByte(); - eatBytes(1); - var blocktype = _helperWasmBytecode.default.blockTypes[blocktypeByte]; - dump([blocktypeByte], "blocktype"); - - if (typeof blocktype === "undefined") { - throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(blocktypeByte)); - } - - var instr = []; - parseInstructionBlock(instr); // preserve anonymous - - var label = t.withRaw(t.identifier(getUniqueName("loop")), ""); - - var loopNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.loopInstruction(label, blocktype, instr), endLoc, _startLoc7); - }(); - - code.push(loopNode); - instructionAlreadyCreated = true; - } else if (instruction.name === "if") { - var _startLoc8 = getPosition(); - - var _blocktypeByte = readByte(); - - eatBytes(1); - var _blocktype = _helperWasmBytecode.default.blockTypes[_blocktypeByte]; - dump([_blocktypeByte], "blocktype"); - - if (typeof _blocktype === "undefined") { - throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte)); - } - - var testIndex = t.withRaw(t.identifier(getUniqueName("if")), ""); - var ifBody = []; - parseInstructionBlock(ifBody); // Defaults to no alternate - - var elseIndex = 0; - - for (elseIndex = 0; elseIndex < ifBody.length; ++elseIndex) { - var _instr = ifBody[elseIndex]; - - if (_instr.type === "Instr" && _instr.id === "else") { - break; - } - } - - var consequentInstr = ifBody.slice(0, elseIndex); - var alternate = ifBody.slice(elseIndex + 1); // wast sugar - - var testInstrs = []; - - var ifNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.ifInstruction(testIndex, testInstrs, _blocktype, consequentInstr, alternate), endLoc, _startLoc8); - }(); - - code.push(ifNode); - instructionAlreadyCreated = true; - } else if (instruction.name === "block") { - var _startLoc9 = getPosition(); - - var _blocktypeByte2 = readByte(); - - eatBytes(1); - var _blocktype2 = _helperWasmBytecode.default.blockTypes[_blocktypeByte2]; - dump([_blocktypeByte2], "blocktype"); - - if (typeof _blocktype2 === "undefined") { - throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte2)); - } - - var _instr2 = []; - parseInstructionBlock(_instr2); // preserve anonymous - - var _label = t.withRaw(t.identifier(getUniqueName("block")), ""); - - var blockNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.blockInstruction(_label, _instr2, _blocktype2), endLoc, _startLoc9); - }(); - - code.push(blockNode); - instructionAlreadyCreated = true; - } else if (instruction.name === "call") { - var indexu32 = readU32(); - var index = indexu32.value; - eatBytes(indexu32.nextIndex); - dump([index], "index"); - - var callNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.callInstruction(t.indexLiteral(index)), endLoc, _startLoc6); - }(); - - code.push(callNode); - instructionAlreadyCreated = true; - } else if (instruction.name === "call_indirect") { - var _startLoc10 = getPosition(); - - var indexU32 = readU32(); - var typeindex = indexU32.value; - eatBytes(indexU32.nextIndex); - dump([typeindex], "type index"); - var signature = state.typesInModule[typeindex]; - - if (typeof signature === "undefined") { - throw new _helperApiError.CompileError("call_indirect signature not found (".concat(typeindex, ")")); - } - - var _callNode = t.callIndirectInstruction(t.signature(signature.params, signature.result), []); - - var flagU32 = readU32(); - var flag = flagU32.value; // 0x00 - reserved byte - - eatBytes(flagU32.nextIndex); - - if (flag !== 0) { - throw new _helperApiError.CompileError("zero flag expected"); - } - - code.push(function () { - var endLoc = getPosition(); - return t.withLoc(_callNode, endLoc, _startLoc10); - }()); - instructionAlreadyCreated = true; - } else if (instruction.name === "br_table") { - var indicesu32 = readU32(); - var indices = indicesu32.value; - eatBytes(indicesu32.nextIndex); - dump([indices], "num indices"); - - for (var i = 0; i <= indices; i++) { - var _indexu = readU32(); - - var _index = _indexu.value; - eatBytes(_indexu.nextIndex); - dump([_index], "index"); - args.push(t.numberLiteralFromRaw(_indexu.value.toString(), "u32")); - } - } else if (instructionByte >= 0x28 && instructionByte <= 0x40) { - /** - * Memory instructions - */ - if (instruction.name === "grow_memory" || instruction.name === "current_memory") { - var _indexU = readU32(); - - var _index2 = _indexU.value; - eatBytes(_indexU.nextIndex); - - if (_index2 !== 0) { - throw new Error("zero flag expected"); - } - - dump([_index2], "index"); - } else { - var aligun32 = readU32(); - var align = aligun32.value; - eatBytes(aligun32.nextIndex); - dump([align], "align"); - var offsetu32 = readU32(); - var _offset2 = offsetu32.value; - eatBytes(offsetu32.nextIndex); - dump([_offset2], "offset"); - } - } else if (instructionByte >= 0x41 && instructionByte <= 0x44) { - /** - * Numeric instructions - */ - if (instruction.object === "i32") { - var value32 = read32(); - var value = value32.value; - eatBytes(value32.nextIndex); - dump([value], "i32 value"); - args.push(t.numberLiteralFromRaw(value)); - } - - if (instruction.object === "u32") { - var valueu32 = readU32(); - var _value = valueu32.value; - eatBytes(valueu32.nextIndex); - dump([_value], "u32 value"); - args.push(t.numberLiteralFromRaw(_value)); - } - - if (instruction.object === "i64") { - var value64 = read64(); - var _value2 = value64.value; - eatBytes(value64.nextIndex); - dump([Number(_value2.toString())], "i64 value"); - var high = _value2.high, - low = _value2.low; - var _node = { - type: "LongNumberLiteral", - value: { - high: high, - low: low - } - }; - args.push(_node); - } - - if (instruction.object === "u64") { - var valueu64 = readU64(); - var _value3 = valueu64.value; - eatBytes(valueu64.nextIndex); - dump([Number(_value3.toString())], "u64 value"); - var _high = _value3.high, - _low = _value3.low; - var _node2 = { - type: "LongNumberLiteral", - value: { - high: _high, - low: _low - } - }; - args.push(_node2); - } - - if (instruction.object === "f32") { - var valuef32 = readF32(); - var _value4 = valuef32.value; - eatBytes(valuef32.nextIndex); - dump([_value4], "f32 value"); - args.push( // $FlowIgnore - t.floatLiteral(_value4, valuef32.nan, valuef32.inf, String(_value4))); - } - - if (instruction.object === "f64") { - var valuef64 = readF64(); - var _value5 = valuef64.value; - eatBytes(valuef64.nextIndex); - dump([_value5], "f64 value"); - args.push( // $FlowIgnore - t.floatLiteral(_value5, valuef64.nan, valuef64.inf, String(_value5))); - } - } else if (instructionByte >= 0xfe00 && instructionByte <= 0xfeff) { - /** - * Atomic memory instructions - */ - var align32 = readU32(); - var _align = align32.value; - eatBytes(align32.nextIndex); - dump([_align], "align"); - - var _offsetu = readU32(); - - var _offset3 = _offsetu.value; - eatBytes(_offsetu.nextIndex); - dump([_offset3], "offset"); - } else { - for (var _i3 = 0; _i3 < instruction.numberOfArgs; _i3++) { - var u32 = readU32(); - eatBytes(u32.nextIndex); - dump([u32.value], "argument " + _i3); - args.push(t.numberLiteralFromRaw(u32.value)); - } - } - - if (instructionAlreadyCreated === false) { - if (typeof instruction.object === "string") { - var _node3 = function () { - var endLoc = getPosition(); - return t.withLoc(t.objectInstruction(instruction.name, instruction.object, args), endLoc, _startLoc6); - }(); - - code.push(_node3); - } else { - var _node4 = function () { - var endLoc = getPosition(); - return t.withLoc(t.instruction(instruction.name, args), endLoc, _startLoc6); - }(); - - code.push(_node4); - } - } - } - } // https://webassembly.github.io/spec/core/binary/types.html#limits - - - function parseLimits() { - var limitType = readByte(); - eatBytes(1); - var shared = limitType === 0x03; - dump([limitType], "limit type" + (shared ? " (shared)" : "")); - var min, max; - - if (limitType === 0x01 || limitType === 0x03 // shared limits - ) { - var u32min = readU32(); - min = parseInt(u32min.value); - eatBytes(u32min.nextIndex); - dump([min], "min"); - var u32max = readU32(); - max = parseInt(u32max.value); - eatBytes(u32max.nextIndex); - dump([max], "max"); - } - - if (limitType === 0x00) { - var _u32min = readU32(); - - min = parseInt(_u32min.value); - eatBytes(_u32min.nextIndex); - dump([min], "min"); - } - - return t.limit(min, max, shared); - } // https://webassembly.github.io/spec/core/binary/types.html#binary-tabletype - - - function parseTableType(index) { - var name = t.withRaw(t.identifier(getUniqueName("table")), String(index)); - var elementTypeByte = readByte(); - eatBytes(1); - dump([elementTypeByte], "element type"); - var elementType = _helperWasmBytecode.default.tableTypes[elementTypeByte]; - - if (typeof elementType === "undefined") { - throw new _helperApiError.CompileError("Unknown element type in table: " + toHex(elementType)); - } - - var limits = parseLimits(); - return t.table(elementType, limits, name); - } // https://webassembly.github.io/spec/binary/types.html#global-types - - - function parseGlobalType() { - var valtypeByte = readByte(); - eatBytes(1); - var type = _helperWasmBytecode.default.valtypes[valtypeByte]; - dump([valtypeByte], type); - - if (typeof type === "undefined") { - throw new _helperApiError.CompileError("Unknown valtype: " + toHex(valtypeByte)); - } - - var globalTypeByte = readByte(); - eatBytes(1); - var globalType = _helperWasmBytecode.default.globalTypes[globalTypeByte]; - dump([globalTypeByte], "global type (".concat(globalType, ")")); - - if (typeof globalType === "undefined") { - throw new _helperApiError.CompileError("Invalid mutability: " + toHex(globalTypeByte)); - } - - return t.globalType(type, globalType); - } // function parseNameModule() { - // const lenu32 = readVaruint32(); - // eatBytes(lenu32.nextIndex); - // console.log("len", lenu32); - // const strlen = lenu32.value; - // dump([strlen], "string length"); - // const bytes = readBytes(strlen); - // eatBytes(strlen); - // const value = utf8.decode(bytes); - // return [t.moduleNameMetadata(value)]; - // } - // this section contains an array of function names and indices - - - function parseNameSectionFunctions() { - var functionNames = []; - var numberOfFunctionsu32 = readU32(); - var numbeOfFunctions = numberOfFunctionsu32.value; - eatBytes(numberOfFunctionsu32.nextIndex); - - for (var i = 0; i < numbeOfFunctions; i++) { - var indexu32 = readU32(); - var index = indexu32.value; - eatBytes(indexu32.nextIndex); - var name = readUTF8String(); - eatBytes(name.nextIndex); - functionNames.push(t.functionNameMetadata(name.value, index)); - } - - return functionNames; - } - - function parseNameSectionLocals() { - var localNames = []; - var numbeOfFunctionsu32 = readU32(); - var numbeOfFunctions = numbeOfFunctionsu32.value; - eatBytes(numbeOfFunctionsu32.nextIndex); - - for (var i = 0; i < numbeOfFunctions; i++) { - var functionIndexu32 = readU32(); - var functionIndex = functionIndexu32.value; - eatBytes(functionIndexu32.nextIndex); - var numLocalsu32 = readU32(); - var numLocals = numLocalsu32.value; - eatBytes(numLocalsu32.nextIndex); - - for (var _i4 = 0; _i4 < numLocals; _i4++) { - var localIndexu32 = readU32(); - var localIndex = localIndexu32.value; - eatBytes(localIndexu32.nextIndex); - var name = readUTF8String(); - eatBytes(name.nextIndex); - localNames.push(t.localNameMetadata(name.value, localIndex, functionIndex)); - } - } - - return localNames; - } // this is a custom section used for name resolution - // https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section - - - function parseNameSection(remainingBytes) { - var nameMetadata = []; - var initialOffset = offset; - - while (offset - initialOffset < remainingBytes) { - // name_type - var sectionTypeByte = readVaruint7(); - eatBytes(sectionTypeByte.nextIndex); // name_payload_len - - var subSectionSizeInBytesu32 = readVaruint32(); - eatBytes(subSectionSizeInBytesu32.nextIndex); - - switch (sectionTypeByte.value) { - // case 0: { - // TODO(sven): re-enable that - // Current status: it seems that when we decode the module's name - // no name_payload_len is used. - // - // See https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section - // - // nameMetadata.push(...parseNameModule()); - // break; - // } - case 1: - { - nameMetadata.push.apply(nameMetadata, _toConsumableArray(parseNameSectionFunctions())); - break; - } - - case 2: - { - nameMetadata.push.apply(nameMetadata, _toConsumableArray(parseNameSectionLocals())); - break; - } - - default: - { - // skip unknown subsection - eatBytes(subSectionSizeInBytesu32.value); - } - } - } - - return nameMetadata; - } // this is a custom section used for information about the producers - // https://github.com/WebAssembly/tool-conventions/blob/master/ProducersSection.md - - - function parseProducersSection() { - var metadata = t.producersSectionMetadata([]); // field_count - - var sectionTypeByte = readVaruint32(); - eatBytes(sectionTypeByte.nextIndex); - dump([sectionTypeByte.value], "num of producers"); - var fields = { - language: [], - "processed-by": [], - sdk: [] - }; // fields - - for (var fieldI = 0; fieldI < sectionTypeByte.value; fieldI++) { - // field_name - var fieldName = readUTF8String(); - eatBytes(fieldName.nextIndex); // field_value_count - - var valueCount = readVaruint32(); - eatBytes(valueCount.nextIndex); // field_values - - for (var producerI = 0; producerI < valueCount.value; producerI++) { - var producerName = readUTF8String(); - eatBytes(producerName.nextIndex); - var producerVersion = readUTF8String(); - eatBytes(producerVersion.nextIndex); - fields[fieldName.value].push(t.producerMetadataVersionedName(producerName.value, producerVersion.value)); - } - - metadata.producers.push(fields[fieldName.value]); - } - - return metadata; - } - - function parseGlobalSection(numberOfGlobals) { - var globals = []; - dump([numberOfGlobals], "num globals"); - - for (var i = 0; i < numberOfGlobals; i++) { - var _startLoc11 = getPosition(); - - var globalType = parseGlobalType(); - /** - * Global expressions - */ - - var init = []; - parseInstructionBlock(init); - - var node = function () { - var endLoc = getPosition(); - return t.withLoc(t.global(globalType, init), endLoc, _startLoc11); - }(); - - globals.push(node); - state.globalsInModule.push(node); - } - - return globals; - } - - function parseElemSection(numberOfElements) { - var elems = []; - dump([numberOfElements], "num elements"); - - for (var i = 0; i < numberOfElements; i++) { - var _startLoc12 = getPosition(); - - var tableindexu32 = readU32(); - var tableindex = tableindexu32.value; - eatBytes(tableindexu32.nextIndex); - dump([tableindex], "table index"); - /** - * Parse instructions - */ - - var instr = []; - parseInstructionBlock(instr); - /** - * Parse ( vector function index ) * - */ - - var indicesu32 = readU32(); - var indices = indicesu32.value; - eatBytes(indicesu32.nextIndex); - dump([indices], "num indices"); - var indexValues = []; - - for (var _i5 = 0; _i5 < indices; _i5++) { - var indexu32 = readU32(); - var index = indexu32.value; - eatBytes(indexu32.nextIndex); - dump([index], "index"); - indexValues.push(t.indexLiteral(index)); - } - - var elemNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.elem(t.indexLiteral(tableindex), instr, indexValues), endLoc, _startLoc12); - }(); - - elems.push(elemNode); - } - - return elems; - } // https://webassembly.github.io/spec/core/binary/types.html#memory-types - - - function parseMemoryType(i) { - var limits = parseLimits(); - return t.memory(limits, t.indexLiteral(i)); - } // https://webassembly.github.io/spec/binary/modules.html#table-section - - - function parseTableSection(numberOfElements) { - var tables = []; - dump([numberOfElements], "num elements"); - - for (var i = 0; i < numberOfElements; i++) { - var tablesNode = parseTableType(i); - state.tablesInModule.push(tablesNode); - tables.push(tablesNode); - } - - return tables; - } // https://webassembly.github.io/spec/binary/modules.html#memory-section - - - function parseMemorySection(numberOfElements) { - var memories = []; - dump([numberOfElements], "num elements"); - - for (var i = 0; i < numberOfElements; i++) { - var memoryNode = parseMemoryType(i); - state.memoriesInModule.push(memoryNode); - memories.push(memoryNode); - } - - return memories; - } // https://webassembly.github.io/spec/binary/modules.html#binary-startsec - - - function parseStartSection() { - var startLoc = getPosition(); - var u32 = readU32(); - var startFuncIndex = u32.value; - eatBytes(u32.nextIndex); - dump([startFuncIndex], "index"); - return function () { - var endLoc = getPosition(); - return t.withLoc(t.start(t.indexLiteral(startFuncIndex)), endLoc, startLoc); - }(); - } // https://webassembly.github.io/spec/binary/modules.html#data-section - - - function parseDataSection(numberOfElements) { - var dataEntries = []; - dump([numberOfElements], "num elements"); - - for (var i = 0; i < numberOfElements; i++) { - var memoryIndexu32 = readU32(); - var memoryIndex = memoryIndexu32.value; - eatBytes(memoryIndexu32.nextIndex); - dump([memoryIndex], "memory index"); - var instrs = []; - parseInstructionBlock(instrs); - var hasExtraInstrs = instrs.filter(function (i) { - return i.id !== "end"; - }).length !== 1; - - if (hasExtraInstrs) { - throw new _helperApiError.CompileError("data section offset must be a single instruction"); - } - - var bytes = parseVec(function (b) { - return b; - }); - dump([], "init"); - dataEntries.push(t.data(t.memIndexLiteral(memoryIndex), instrs[0], t.byteArray(bytes))); - } - - return dataEntries; - } // https://webassembly.github.io/spec/binary/modules.html#binary-section - - - function parseSection(sectionIndex) { - var sectionId = readByte(); - eatBytes(1); - - if (sectionId >= sectionIndex || sectionIndex === _helperWasmBytecode.default.sections.custom) { - sectionIndex = sectionId + 1; - } else { - if (sectionId !== _helperWasmBytecode.default.sections.custom) throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId)); - } - - var nextSectionIndex = sectionIndex; - var startOffset = offset; - var startLoc = getPosition(); - var u32 = readU32(); - var sectionSizeInBytes = u32.value; - eatBytes(u32.nextIndex); - - var sectionSizeInBytesNode = function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(sectionSizeInBytes), endLoc, startLoc); - }(); - - switch (sectionId) { - case _helperWasmBytecode.default.sections.type: - { - dumpSep("section Type"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc13 = getPosition(); - - var _u = readU32(); - - var numberOfTypes = _u.value; - eatBytes(_u.nextIndex); - - var _metadata = t.sectionMetadata("type", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfTypes), endLoc, _startLoc13); - }()); - - var _nodes = parseTypeSection(numberOfTypes); - - return { - nodes: _nodes, - metadata: _metadata, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.table: - { - dumpSep("section Table"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc14 = getPosition(); - - var _u2 = readU32(); - - var numberOfTable = _u2.value; - eatBytes(_u2.nextIndex); - dump([numberOfTable], "num tables"); - - var _metadata2 = t.sectionMetadata("table", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfTable), endLoc, _startLoc14); - }()); - - var _nodes2 = parseTableSection(numberOfTable); - - return { - nodes: _nodes2, - metadata: _metadata2, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.import: - { - dumpSep("section Import"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc15 = getPosition(); - - var numberOfImportsu32 = readU32(); - var numberOfImports = numberOfImportsu32.value; - eatBytes(numberOfImportsu32.nextIndex); - dump([numberOfImports], "number of imports"); - - var _metadata3 = t.sectionMetadata("import", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfImports), endLoc, _startLoc15); - }()); - - var _nodes3 = parseImportSection(numberOfImports); - - return { - nodes: _nodes3, - metadata: _metadata3, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.func: - { - dumpSep("section Function"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc16 = getPosition(); - - var numberOfFunctionsu32 = readU32(); - var numberOfFunctions = numberOfFunctionsu32.value; - eatBytes(numberOfFunctionsu32.nextIndex); - - var _metadata4 = t.sectionMetadata("func", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfFunctions), endLoc, _startLoc16); - }()); - - parseFuncSection(numberOfFunctions); - var _nodes4 = []; - return { - nodes: _nodes4, - metadata: _metadata4, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.export: - { - dumpSep("section Export"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc17 = getPosition(); - - var _u3 = readU32(); - - var numberOfExport = _u3.value; - eatBytes(_u3.nextIndex); - - var _metadata5 = t.sectionMetadata("export", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfExport), endLoc, _startLoc17); - }()); - - parseExportSection(numberOfExport); - var _nodes5 = []; - return { - nodes: _nodes5, - metadata: _metadata5, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.code: - { - dumpSep("section Code"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc18 = getPosition(); - - var _u4 = readU32(); - - var numberOfFuncs = _u4.value; - eatBytes(_u4.nextIndex); - - var _metadata6 = t.sectionMetadata("code", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfFuncs), endLoc, _startLoc18); - }()); - - if (opts.ignoreCodeSection === true) { - var remainingBytes = sectionSizeInBytes - _u4.nextIndex; - eatBytes(remainingBytes); // eat the entire section - } else { - parseCodeSection(numberOfFuncs); - } - - var _nodes6 = []; - return { - nodes: _nodes6, - metadata: _metadata6, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.start: - { - dumpSep("section Start"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _metadata7 = t.sectionMetadata("start", startOffset, sectionSizeInBytesNode); - - var _nodes7 = [parseStartSection()]; - return { - nodes: _nodes7, - metadata: _metadata7, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.element: - { - dumpSep("section Element"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc19 = getPosition(); - - var numberOfElementsu32 = readU32(); - var numberOfElements = numberOfElementsu32.value; - eatBytes(numberOfElementsu32.nextIndex); - - var _metadata8 = t.sectionMetadata("element", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfElements), endLoc, _startLoc19); - }()); - - var _nodes8 = parseElemSection(numberOfElements); - - return { - nodes: _nodes8, - metadata: _metadata8, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.global: - { - dumpSep("section Global"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc20 = getPosition(); - - var numberOfGlobalsu32 = readU32(); - var numberOfGlobals = numberOfGlobalsu32.value; - eatBytes(numberOfGlobalsu32.nextIndex); - - var _metadata9 = t.sectionMetadata("global", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(numberOfGlobals), endLoc, _startLoc20); - }()); - - var _nodes9 = parseGlobalSection(numberOfGlobals); - - return { - nodes: _nodes9, - metadata: _metadata9, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.memory: - { - dumpSep("section Memory"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _startLoc21 = getPosition(); - - var _numberOfElementsu = readU32(); - - var _numberOfElements = _numberOfElementsu.value; - eatBytes(_numberOfElementsu.nextIndex); - - var _metadata10 = t.sectionMetadata("memory", startOffset, sectionSizeInBytesNode, function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(_numberOfElements), endLoc, _startLoc21); - }()); - - var _nodes10 = parseMemorySection(_numberOfElements); - - return { - nodes: _nodes10, - metadata: _metadata10, - nextSectionIndex: nextSectionIndex - }; - } - - case _helperWasmBytecode.default.sections.data: - { - dumpSep("section Data"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - - var _metadata11 = t.sectionMetadata("data", startOffset, sectionSizeInBytesNode); - - var _startLoc22 = getPosition(); - - var _numberOfElementsu2 = readU32(); - - var _numberOfElements2 = _numberOfElementsu2.value; - eatBytes(_numberOfElementsu2.nextIndex); - - _metadata11.vectorOfSize = function () { - var endLoc = getPosition(); - return t.withLoc(t.numberLiteralFromRaw(_numberOfElements2), endLoc, _startLoc22); - }(); - - if (opts.ignoreDataSection === true) { - var _remainingBytes = sectionSizeInBytes - _numberOfElementsu2.nextIndex; - - eatBytes(_remainingBytes); // eat the entire section - - dumpSep("ignore data (" + sectionSizeInBytes + " bytes)"); - return { - nodes: [], - metadata: _metadata11, - nextSectionIndex: nextSectionIndex - }; - } else { - var _nodes11 = parseDataSection(_numberOfElements2); - - return { - nodes: _nodes11, - metadata: _metadata11, - nextSectionIndex: nextSectionIndex - }; - } - } - - case _helperWasmBytecode.default.sections.custom: - { - dumpSep("section Custom"); - dump([sectionId], "section code"); - dump([sectionSizeInBytes], "section size"); - var _metadata12 = [t.sectionMetadata("custom", startOffset, sectionSizeInBytesNode)]; - var sectionName = readUTF8String(); - eatBytes(sectionName.nextIndex); - dump([], "section name (".concat(sectionName.value, ")")); - - var _remainingBytes2 = sectionSizeInBytes - sectionName.nextIndex; - - if (sectionName.value === "name") { - var initialOffset = offset; - - try { - _metadata12.push.apply(_metadata12, _toConsumableArray(parseNameSection(_remainingBytes2))); - } catch (e) { - console.warn("Failed to decode custom \"name\" section @".concat(offset, "; ignoring (").concat(e.message, ").")); - eatBytes(offset - (initialOffset + _remainingBytes2)); - } - } else if (sectionName.value === "producers") { - var _initialOffset = offset; - - try { - _metadata12.push(parseProducersSection()); - } catch (e) { - console.warn("Failed to decode custom \"producers\" section @".concat(offset, "; ignoring (").concat(e.message, ").")); - eatBytes(offset - (_initialOffset + _remainingBytes2)); - } - } else { - // We don't parse the custom section - eatBytes(_remainingBytes2); - dumpSep("ignore custom " + JSON.stringify(sectionName.value) + " section (" + _remainingBytes2 + " bytes)"); - } - - return { - nodes: [], - metadata: _metadata12, - nextSectionIndex: nextSectionIndex - }; - } - } - - throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId)); - } - - parseModuleHeader(); - parseVersion(); - var moduleFields = []; - var sectionIndex = 0; - var moduleMetadata = { - sections: [], - functionNames: [], - localNames: [], - producers: [] - }; - /** - * All the generate declaration are going to be stored in our state - */ - - while (offset < buf.length) { - var _parseSection = parseSection(sectionIndex), - _nodes12 = _parseSection.nodes, - _metadata13 = _parseSection.metadata, - nextSectionIndex = _parseSection.nextSectionIndex; - - moduleFields.push.apply(moduleFields, _toConsumableArray(_nodes12)); - var metadataArray = Array.isArray(_metadata13) ? _metadata13 : [_metadata13]; - metadataArray.forEach(function (metadataItem) { - if (metadataItem.type === "FunctionNameMetadata") { - moduleMetadata.functionNames.push(metadataItem); - } else if (metadataItem.type === "LocalNameMetadata") { - moduleMetadata.localNames.push(metadataItem); - } else if (metadataItem.type === "ProducersSectionMetadata") { - moduleMetadata.producers.push(metadataItem); - } else { - moduleMetadata.sections.push(metadataItem); - } - }); // Ignore custom section - - if (nextSectionIndex) { - sectionIndex = nextSectionIndex; - } - } - /** - * Transform the state into AST nodes - */ - - - var funcIndex = 0; - state.functionsInModule.forEach(function (func) { - var params = func.signature.params; - var result = func.signature.result; - var body = []; // External functions doesn't provide any code, can skip it here - - if (func.isExternal === true) { - return; - } - - var decodedElementInCodeSection = state.elementsInCodeSection[funcIndex]; - - if (opts.ignoreCodeSection === false) { - if (typeof decodedElementInCodeSection === "undefined") { - throw new _helperApiError.CompileError("func " + toHex(funcIndex) + " code not found"); - } - - body = decodedElementInCodeSection.code; - } - - funcIndex++; - var funcNode = t.func(func.id, t.signature(params, result), body); - - if (func.isExternal === true) { - funcNode.isExternal = func.isExternal; - } // Add function position in the binary if possible - - - if (opts.ignoreCodeSection === false) { - var _startLoc23 = decodedElementInCodeSection.startLoc, - endLoc = decodedElementInCodeSection.endLoc, - bodySize = decodedElementInCodeSection.bodySize; - funcNode = t.withLoc(funcNode, endLoc, _startLoc23); - funcNode.metadata = { - bodySize: bodySize - }; - } - - moduleFields.push(funcNode); - }); - state.elementsInExportSection.forEach(function (moduleExport) { - /** - * If the export has no id, we won't be able to call it from the outside - * so we can omit it - */ - if (moduleExport.id != null) { - moduleFields.push(t.withLoc(t.moduleExport(moduleExport.name, t.moduleExportDescr(moduleExport.type, moduleExport.id)), moduleExport.endLoc, moduleExport.startLoc)); - } - }); - dumpSep("end of program"); - var module = t.module(null, moduleFields, t.moduleMetadata(moduleMetadata.sections, moduleMetadata.functionNames, moduleMetadata.localNames, moduleMetadata.producers)); - return t.program([module]); -} - -/***/ }), - -/***/ 41786: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.decode = decode; - -var decoder = _interopRequireWildcard(__webpack_require__(1466)); - -var t = _interopRequireWildcard(__webpack_require__(44977)); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -/** - * TODO(sven): I added initial props, but we should rather fix - * https://github.com/xtuc/webassemblyjs/issues/405 - */ -var defaultDecoderOpts = { - dump: false, - ignoreCodeSection: false, - ignoreDataSection: false, - ignoreCustomNameSection: false -}; // traverses the AST, locating function name metadata, which is then -// used to update index-based identifiers with function names - -function restoreFunctionNames(ast) { - var functionNames = []; - t.traverse(ast, { - FunctionNameMetadata: function FunctionNameMetadata(_ref) { - var node = _ref.node; - functionNames.push({ - name: node.value, - index: node.index - }); - } - }); - - if (functionNames.length === 0) { - return; - } - - t.traverse(ast, { - Func: function (_Func) { - function Func(_x) { - return _Func.apply(this, arguments); - } - - Func.toString = function () { - return _Func.toString(); - }; - - return Func; - }(function (_ref2) { - var node = _ref2.node; - // $FlowIgnore - var nodeName = node.name; - var indexBasedFunctionName = nodeName.value; - var index = Number(indexBasedFunctionName.replace("func_", "")); - var functionName = functionNames.find(function (f) { - return f.index === index; - }); - - if (functionName) { - var oldValue = nodeName.value; - nodeName.value = functionName.name; - nodeName.numeric = oldValue; // $FlowIgnore - - delete nodeName.raw; - } - }), - // Also update the reference in the export - ModuleExport: function (_ModuleExport) { - function ModuleExport(_x2) { - return _ModuleExport.apply(this, arguments); - } - - ModuleExport.toString = function () { - return _ModuleExport.toString(); - }; - - return ModuleExport; - }(function (_ref3) { - var node = _ref3.node; - - if (node.descr.exportType === "Func") { - // $FlowIgnore - var nodeName = node.descr.id; - var index = nodeName.value; - var functionName = functionNames.find(function (f) { - return f.index === index; - }); - - if (functionName) { - node.descr.id = t.identifier(functionName.name); - } - } - }), - ModuleImport: function (_ModuleImport) { - function ModuleImport(_x3) { - return _ModuleImport.apply(this, arguments); - } - - ModuleImport.toString = function () { - return _ModuleImport.toString(); - }; - - return ModuleImport; - }(function (_ref4) { - var node = _ref4.node; - - if (node.descr.type === "FuncImportDescr") { - // $FlowIgnore - var indexBasedFunctionName = node.descr.id; - var index = Number(indexBasedFunctionName.replace("func_", "")); - var functionName = functionNames.find(function (f) { - return f.index === index; - }); - - if (functionName) { - // $FlowIgnore - node.descr.id = t.identifier(functionName.name); - } - } - }), - CallInstruction: function (_CallInstruction) { - function CallInstruction(_x4) { - return _CallInstruction.apply(this, arguments); - } - - CallInstruction.toString = function () { - return _CallInstruction.toString(); - }; - - return CallInstruction; - }(function (nodePath) { - var node = nodePath.node; - var index = node.index.value; - var functionName = functionNames.find(function (f) { - return f.index === index; - }); - - if (functionName) { - var oldValue = node.index; - node.index = t.identifier(functionName.name); - node.numeric = oldValue; // $FlowIgnore - - delete node.raw; - } - }) - }); -} - -function restoreLocalNames(ast) { - var localNames = []; - t.traverse(ast, { - LocalNameMetadata: function LocalNameMetadata(_ref5) { - var node = _ref5.node; - localNames.push({ - name: node.value, - localIndex: node.localIndex, - functionIndex: node.functionIndex - }); - } - }); - - if (localNames.length === 0) { - return; - } - - t.traverse(ast, { - Func: function (_Func2) { - function Func(_x5) { - return _Func2.apply(this, arguments); - } - - Func.toString = function () { - return _Func2.toString(); - }; - - return Func; - }(function (_ref6) { - var node = _ref6.node; - var signature = node.signature; - - if (signature.type !== "Signature") { - return; - } // $FlowIgnore - - - var nodeName = node.name; - var indexBasedFunctionName = nodeName.value; - var functionIndex = Number(indexBasedFunctionName.replace("func_", "")); - signature.params.forEach(function (param, paramIndex) { - var paramName = localNames.find(function (f) { - return f.localIndex === paramIndex && f.functionIndex === functionIndex; - }); - - if (paramName && paramName.name !== "") { - param.id = paramName.name; - } - }); - }) - }); -} - -function restoreModuleName(ast) { - t.traverse(ast, { - ModuleNameMetadata: function (_ModuleNameMetadata) { - function ModuleNameMetadata(_x6) { - return _ModuleNameMetadata.apply(this, arguments); - } - - ModuleNameMetadata.toString = function () { - return _ModuleNameMetadata.toString(); - }; - - return ModuleNameMetadata; - }(function (moduleNameMetadataPath) { - // update module - t.traverse(ast, { - Module: function (_Module) { - function Module(_x7) { - return _Module.apply(this, arguments); - } - - Module.toString = function () { - return _Module.toString(); - }; - - return Module; - }(function (_ref7) { - var node = _ref7.node; - var name = moduleNameMetadataPath.node.value; // compatiblity with wast-parser - - if (name === "") { - name = null; - } - - node.id = name; - }) - }); - }) - }); -} - -function decode(buf, customOpts) { - var opts = Object.assign({}, defaultDecoderOpts, customOpts); - var ast = decoder.decode(buf, opts); - - if (opts.ignoreCustomNameSection === false) { - restoreFunctionNames(ast); - restoreLocalNames(ast); - restoreModuleName(ast); - } - - return ast; -} - -/***/ }), - -/***/ 84846: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.read = read; -exports.write = write; - -function read(buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? nBytes - 1 : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - i += d; - e = s & (1 << -nBits) - 1; - s >>= -nBits; - nBits += eLen; - - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & (1 << -nBits) - 1; - e >>= -nBits; - nBits += mLen; - - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : (s ? -1 : 1) * Infinity; - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); -} - -function write(buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; - var i = isLE ? 0 : nBytes - 1; - var d = isLE ? 1 : -1; - var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = e << mLen | m; - eLen += mLen; - - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128; -} - - -/***/ }), - -/***/ 68396: -/***/ (function(module) { - -module.exports = Long; - -/** - * wasm optimizations, to do native i64 multiplication and divide - */ -var wasm = null; - -try { - wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([ - 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11 - ])), {}).exports; -} catch (e) { - // no wasm support :( -} - -/** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @constructor - */ -function Long(low, high, unsigned) { - - /** - * The low 32 bits as a signed value. - * @type {number} - */ - this.low = low | 0; - - /** - * The high 32 bits as a signed value. - * @type {number} - */ - this.high = high | 0; - - /** - * Whether unsigned or not. - * @type {boolean} - */ - this.unsigned = !!unsigned; -} - -// The internal representation of a long is the two given signed, 32-bit values. -// We use 32-bit pieces because these are the size of integers on which -// Javascript performs bit-operations. For operations like addition and -// multiplication, we split each number into 16 bit pieces, which can easily be -// multiplied within Javascript's floating-point representation without overflow -// or change in sign. -// -// In the algorithms below, we frequently reduce the negative case to the -// positive case by negating the input(s) and then post-processing the result. -// Note that we must ALWAYS check specially whether those values are MIN_VALUE -// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as -// a positive number, it overflows back into a negative). Not handling this -// case would often result in infinite recursion. -// -// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* -// methods on which they depend. - -/** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @private - */ -Long.prototype.__isLong__; - -Object.defineProperty(Long.prototype, "__isLong__", { value: true }); - -/** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner - */ -function isLong(obj) { - return (obj && obj["__isLong__"]) === true; -} - -/** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} - */ -Long.isLong = isLong; - -/** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner - */ -var INT_CACHE = {}; - -/** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner - */ -var UINT_CACHE = {}; - -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ -function fromInt(value, unsigned) { - var obj, cachedObj, cache; - if (unsigned) { - value >>>= 0; - if (cache = (0 <= value && value < 256)) { - cachedObj = UINT_CACHE[value]; - if (cachedObj) - return cachedObj; - } - obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); - if (cache) - UINT_CACHE[value] = obj; - return obj; - } else { - value |= 0; - if (cache = (-128 <= value && value < 128)) { - cachedObj = INT_CACHE[value]; - if (cachedObj) - return cachedObj; - } - obj = fromBits(value, value < 0 ? -1 : 0, false); - if (cache) - INT_CACHE[value] = obj; - return obj; - } -} - -/** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value - */ -Long.fromInt = fromInt; - -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ -function fromNumber(value, unsigned) { - if (isNaN(value)) - return unsigned ? UZERO : ZERO; - if (unsigned) { - if (value < 0) - return UZERO; - if (value >= TWO_PWR_64_DBL) - return MAX_UNSIGNED_VALUE; - } else { - if (value <= -TWO_PWR_63_DBL) - return MIN_VALUE; - if (value + 1 >= TWO_PWR_63_DBL) - return MAX_VALUE; - } - if (value < 0) - return fromNumber(-value, unsigned).neg(); - return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); -} - -/** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value - */ -Long.fromNumber = fromNumber; - -/** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ -function fromBits(lowBits, highBits, unsigned) { - return new Long(lowBits, highBits, unsigned); -} - -/** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value - */ -Long.fromBits = fromBits; - -/** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner - */ -var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) - -/** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner - */ -function fromString(str, unsigned, radix) { - if (str.length === 0) - throw Error('empty string'); - if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") - return ZERO; - if (typeof unsigned === 'number') { - // For goog.math.long compatibility - radix = unsigned, - unsigned = false; - } else { - unsigned = !! unsigned; - } - radix = radix || 10; - if (radix < 2 || 36 < radix) - throw RangeError('radix'); - - var p; - if ((p = str.indexOf('-')) > 0) - throw Error('interior hyphen'); - else if (p === 0) { - return fromString(str.substring(1), unsigned, radix).neg(); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = fromNumber(pow_dbl(radix, 8)); - - var result = ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i), - value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = fromNumber(pow_dbl(radix, size)); - result = result.mul(power).add(fromNumber(value)); - } else { - result = result.mul(radixToPower); - result = result.add(fromNumber(value)); - } - } - result.unsigned = unsigned; - return result; -} - -/** - * Returns a Long representation of the given string, written using the specified radix. - * @function - * @param {string} str The textual representation of the Long - * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed - * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 - * @returns {!Long} The corresponding Long value - */ -Long.fromString = fromString; - -/** - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ -function fromValue(val, unsigned) { - if (typeof val === 'number') - return fromNumber(val, unsigned); - if (typeof val === 'string') - return fromString(val, unsigned); - // Throws for non-objects, converts non-instanceof Long: - return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned); -} - -/** - * Converts the specified value to a Long using the appropriate from* function for its type. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} - */ -Long.fromValue = fromValue; - -// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be -// no runtime penalty for these. - -/** - * @type {number} - * @const - * @inner - */ -var TWO_PWR_16_DBL = 1 << 16; - -/** - * @type {number} - * @const - * @inner - */ -var TWO_PWR_24_DBL = 1 << 24; - -/** - * @type {number} - * @const - * @inner - */ -var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; - -/** - * @type {number} - * @const - * @inner - */ -var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; - -/** - * @type {number} - * @const - * @inner - */ -var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; - -/** - * @type {!Long} - * @const - * @inner - */ -var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); - -/** - * @type {!Long} - * @inner - */ -var ZERO = fromInt(0); - -/** - * Signed zero. - * @type {!Long} - */ -Long.ZERO = ZERO; - -/** - * @type {!Long} - * @inner - */ -var UZERO = fromInt(0, true); - -/** - * Unsigned zero. - * @type {!Long} - */ -Long.UZERO = UZERO; - -/** - * @type {!Long} - * @inner - */ -var ONE = fromInt(1); - -/** - * Signed one. - * @type {!Long} - */ -Long.ONE = ONE; - -/** - * @type {!Long} - * @inner - */ -var UONE = fromInt(1, true); - -/** - * Unsigned one. - * @type {!Long} - */ -Long.UONE = UONE; - -/** - * @type {!Long} - * @inner - */ -var NEG_ONE = fromInt(-1); - -/** - * Signed negative one. - * @type {!Long} - */ -Long.NEG_ONE = NEG_ONE; - -/** - * @type {!Long} - * @inner - */ -var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); - -/** - * Maximum signed value. - * @type {!Long} - */ -Long.MAX_VALUE = MAX_VALUE; - -/** - * @type {!Long} - * @inner - */ -var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); - -/** - * Maximum unsigned value. - * @type {!Long} - */ -Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; - -/** - * @type {!Long} - * @inner - */ -var MIN_VALUE = fromBits(0, 0x80000000|0, false); - -/** - * Minimum signed value. - * @type {!Long} - */ -Long.MIN_VALUE = MIN_VALUE; - -/** - * @alias Long.prototype - * @inner - */ -var LongPrototype = Long.prototype; - -/** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @this {!Long} - * @returns {number} - */ -LongPrototype.toInt = function toInt() { - return this.unsigned ? this.low >>> 0 : this.low; -}; - -/** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @this {!Long} - * @returns {number} - */ -LongPrototype.toNumber = function toNumber() { - if (this.unsigned) - return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); - return this.high * TWO_PWR_32_DBL + (this.low >>> 0); -}; - -/** - * Converts the Long to a string written in the specified radix. - * @this {!Long} - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range - */ -LongPrototype.toString = function toString(radix) { - radix = radix || 10; - if (radix < 2 || 36 < radix) - throw RangeError('radix'); - if (this.isZero()) - return '0'; - if (this.isNegative()) { // Unsigned Longs are never negative - if (this.eq(MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = fromNumber(radix), - div = this.div(radixLong), - rem1 = div.mul(radixLong).sub(this); - return div.toString(radix) + rem1.toInt().toString(radix); - } else - return '-' + this.neg().toString(radix); - } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), - rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower), - intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, - digits = intval.toString(radix); - rem = remDiv; - if (rem.isZero()) - return digits + result; - else { - while (digits.length < 6) - digits = '0' + digits; - result = '' + digits + result; - } - } -}; - -/** - * Gets the high 32 bits as a signed integer. - * @this {!Long} - * @returns {number} Signed high bits - */ -LongPrototype.getHighBits = function getHighBits() { - return this.high; -}; - -/** - * Gets the high 32 bits as an unsigned integer. - * @this {!Long} - * @returns {number} Unsigned high bits - */ -LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { - return this.high >>> 0; -}; - -/** - * Gets the low 32 bits as a signed integer. - * @this {!Long} - * @returns {number} Signed low bits - */ -LongPrototype.getLowBits = function getLowBits() { - return this.low; -}; - -/** - * Gets the low 32 bits as an unsigned integer. - * @this {!Long} - * @returns {number} Unsigned low bits - */ -LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { - return this.low >>> 0; -}; - -/** - * Gets the number of bits needed to represent the absolute value of this Long. - * @this {!Long} - * @returns {number} - */ -LongPrototype.getNumBitsAbs = function getNumBitsAbs() { - if (this.isNegative()) // Unsigned Longs are never negative - return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) - if ((val & (1 << bit)) != 0) - break; - return this.high != 0 ? bit + 33 : bit + 1; -}; - -/** - * Tests if this Long's value equals zero. - * @this {!Long} - * @returns {boolean} - */ -LongPrototype.isZero = function isZero() { - return this.high === 0 && this.low === 0; -}; - -/** - * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. - * @returns {boolean} - */ -LongPrototype.eqz = LongPrototype.isZero; - -/** - * Tests if this Long's value is negative. - * @this {!Long} - * @returns {boolean} - */ -LongPrototype.isNegative = function isNegative() { - return !this.unsigned && this.high < 0; -}; - -/** - * Tests if this Long's value is positive. - * @this {!Long} - * @returns {boolean} - */ -LongPrototype.isPositive = function isPositive() { - return this.unsigned || this.high >= 0; -}; - -/** - * Tests if this Long's value is odd. - * @this {!Long} - * @returns {boolean} - */ -LongPrototype.isOdd = function isOdd() { - return (this.low & 1) === 1; -}; - -/** - * Tests if this Long's value is even. - * @this {!Long} - * @returns {boolean} - */ -LongPrototype.isEven = function isEven() { - return (this.low & 1) === 0; -}; - -/** - * Tests if this Long's value equals the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.equals = function equals(other) { - if (!isLong(other)) - other = fromValue(other); - if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) - return false; - return this.high === other.high && this.low === other.low; -}; - -/** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.eq = LongPrototype.equals; - -/** - * Tests if this Long's value differs from the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.notEquals = function notEquals(other) { - return !this.eq(/* validates */ other); -}; - -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.neq = LongPrototype.notEquals; - -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.ne = LongPrototype.notEquals; - -/** - * Tests if this Long's value is less than the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.lessThan = function lessThan(other) { - return this.comp(/* validates */ other) < 0; -}; - -/** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.lt = LongPrototype.lessThan; - -/** - * Tests if this Long's value is less than or equal the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { - return this.comp(/* validates */ other) <= 0; -}; - -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.lte = LongPrototype.lessThanOrEqual; - -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.le = LongPrototype.lessThanOrEqual; - -/** - * Tests if this Long's value is greater than the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.greaterThan = function greaterThan(other) { - return this.comp(/* validates */ other) > 0; -}; - -/** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.gt = LongPrototype.greaterThan; - -/** - * Tests if this Long's value is greater than or equal the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { - return this.comp(/* validates */ other) >= 0; -}; - -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.gte = LongPrototype.greaterThanOrEqual; - -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - */ -LongPrototype.ge = LongPrototype.greaterThanOrEqual; - -/** - * Compares this Long's value with the specified's. - * @this {!Long} - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater - */ -LongPrototype.compare = function compare(other) { - if (!isLong(other)) - other = fromValue(other); - if (this.eq(other)) - return 0; - var thisNeg = this.isNegative(), - otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) - return -1; - if (!thisNeg && otherNeg) - return 1; - // At this point the sign bits are the same - if (!this.unsigned) - return this.sub(other).isNegative() ? -1 : 1; - // Both are positive if at least one is unsigned - return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; -}; - -/** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater - */ -LongPrototype.comp = LongPrototype.compare; - -/** - * Negates this Long's value. - * @this {!Long} - * @returns {!Long} Negated Long - */ -LongPrototype.negate = function negate() { - if (!this.unsigned && this.eq(MIN_VALUE)) - return MIN_VALUE; - return this.not().add(ONE); -}; - -/** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long - */ -LongPrototype.neg = LongPrototype.negate; - -/** - * Returns the sum of this and the specified Long. - * @this {!Long} - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum - */ -LongPrototype.add = function add(addend) { - if (!isLong(addend)) - addend = fromValue(addend); - - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high >>> 16; - var a32 = this.high & 0xFFFF; - var a16 = this.low >>> 16; - var a00 = this.low & 0xFFFF; - - var b48 = addend.high >>> 16; - var b32 = addend.high & 0xFFFF; - var b16 = addend.low >>> 16; - var b00 = addend.low & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); -}; - -/** - * Returns the difference of this and the specified Long. - * @this {!Long} - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference - */ -LongPrototype.subtract = function subtract(subtrahend) { - if (!isLong(subtrahend)) - subtrahend = fromValue(subtrahend); - return this.add(subtrahend.neg()); -}; - -/** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference - */ -LongPrototype.sub = LongPrototype.subtract; - -/** - * Returns the product of this and the specified Long. - * @this {!Long} - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product - */ -LongPrototype.multiply = function multiply(multiplier) { - if (this.isZero()) - return ZERO; - if (!isLong(multiplier)) - multiplier = fromValue(multiplier); - - // use wasm support if present - if (wasm) { - var low = wasm["mul"](this.low, - this.high, - multiplier.low, - multiplier.high); - return fromBits(low, wasm["get_high"](), this.unsigned); - } - - if (multiplier.isZero()) - return ZERO; - if (this.eq(MIN_VALUE)) - return multiplier.isOdd() ? MIN_VALUE : ZERO; - if (multiplier.eq(MIN_VALUE)) - return this.isOdd() ? MIN_VALUE : ZERO; - - if (this.isNegative()) { - if (multiplier.isNegative()) - return this.neg().mul(multiplier.neg()); - else - return this.neg().mul(multiplier).neg(); - } else if (multiplier.isNegative()) - return this.mul(multiplier.neg()).neg(); - - // If both longs are small, use float multiplication - if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) - return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high >>> 16; - var a32 = this.high & 0xFFFF; - var a16 = this.low >>> 16; - var a00 = this.low & 0xFFFF; - - var b48 = multiplier.high >>> 16; - var b32 = multiplier.high & 0xFFFF; - var b16 = multiplier.low >>> 16; - var b00 = multiplier.low & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); -}; - -/** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product - */ -LongPrototype.mul = LongPrototype.multiply; - -/** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @this {!Long} - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient - */ -LongPrototype.divide = function divide(divisor) { - if (!isLong(divisor)) - divisor = fromValue(divisor); - if (divisor.isZero()) - throw Error('division by zero'); - - // use wasm support if present - if (wasm) { - // guard against signed division overflow: the largest - // negative number / -1 would be 1 larger than the largest - // positive number, due to two's complement. - if (!this.unsigned && - this.high === -0x80000000 && - divisor.low === -1 && divisor.high === -1) { - // be consistent with non-wasm code path - return this; - } - var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])( - this.low, - this.high, - divisor.low, - divisor.high - ); - return fromBits(low, wasm["get_high"](), this.unsigned); - } - - if (this.isZero()) - return this.unsigned ? UZERO : ZERO; - var approx, rem, res; - if (!this.unsigned) { - // This section is only relevant for signed longs and is derived from the - // closure library as a whole. - if (this.eq(MIN_VALUE)) { - if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) - return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - else if (divisor.eq(MIN_VALUE)) - return ONE; - else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shr(1); - approx = halfThis.div(divisor).shl(1); - if (approx.eq(ZERO)) { - return divisor.isNegative() ? ONE : NEG_ONE; - } else { - rem = this.sub(divisor.mul(approx)); - res = approx.add(rem.div(divisor)); - return res; - } - } - } else if (divisor.eq(MIN_VALUE)) - return this.unsigned ? UZERO : ZERO; - if (this.isNegative()) { - if (divisor.isNegative()) - return this.neg().div(divisor.neg()); - return this.neg().div(divisor).neg(); - } else if (divisor.isNegative()) - return this.div(divisor.neg()).neg(); - res = ZERO; - } else { - // The algorithm below has not been made for unsigned longs. It's therefore - // required to take special care of the MSB prior to running it. - if (!divisor.unsigned) - divisor = divisor.toUnsigned(); - if (divisor.gt(this)) - return UZERO; - if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true - return UONE; - res = UZERO; - } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - rem = this; - while (rem.gte(divisor)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2), - delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - approxRes = fromNumber(approx), - approxRem = approxRes.mul(divisor); - while (approxRem.isNegative() || approxRem.gt(rem)) { - approx -= delta; - approxRes = fromNumber(approx, this.unsigned); - approxRem = approxRes.mul(divisor); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) - approxRes = ONE; - - res = res.add(approxRes); - rem = rem.sub(approxRem); - } - return res; -}; - -/** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient - */ -LongPrototype.div = LongPrototype.divide; - -/** - * Returns this Long modulo the specified. - * @this {!Long} - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder - */ -LongPrototype.modulo = function modulo(divisor) { - if (!isLong(divisor)) - divisor = fromValue(divisor); - - // use wasm support if present - if (wasm) { - var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])( - this.low, - this.high, - divisor.low, - divisor.high - ); - return fromBits(low, wasm["get_high"](), this.unsigned); - } - - return this.sub(this.div(divisor).mul(divisor)); -}; - -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder - */ -LongPrototype.mod = LongPrototype.modulo; - -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder - */ -LongPrototype.rem = LongPrototype.modulo; - -/** - * Returns the bitwise NOT of this Long. - * @this {!Long} - * @returns {!Long} - */ -LongPrototype.not = function not() { - return fromBits(~this.low, ~this.high, this.unsigned); -}; - -/** - * Returns the bitwise AND of this Long and the specified. - * @this {!Long} - * @param {!Long|number|string} other Other Long - * @returns {!Long} - */ -LongPrototype.and = function and(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low & other.low, this.high & other.high, this.unsigned); -}; - -/** - * Returns the bitwise OR of this Long and the specified. - * @this {!Long} - * @param {!Long|number|string} other Other Long - * @returns {!Long} - */ -LongPrototype.or = function or(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low | other.low, this.high | other.high, this.unsigned); -}; - -/** - * Returns the bitwise XOR of this Long and the given one. - * @this {!Long} - * @param {!Long|number|string} other Other Long - * @returns {!Long} - */ -LongPrototype.xor = function xor(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); -}; - -/** - * Returns this Long with bits shifted to the left by the given amount. - * @this {!Long} - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shiftLeft = function shiftLeft(numBits) { - if (isLong(numBits)) - numBits = numBits.toInt(); - if ((numBits &= 63) === 0) - return this; - else if (numBits < 32) - return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); - else - return fromBits(0, this.low << (numBits - 32), this.unsigned); -}; - -/** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shl = LongPrototype.shiftLeft; - -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @this {!Long} - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shiftRight = function shiftRight(numBits) { - if (isLong(numBits)) - numBits = numBits.toInt(); - if ((numBits &= 63) === 0) - return this; - else if (numBits < 32) - return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); - else - return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); -}; - -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shr = LongPrototype.shiftRight; - -/** - * Returns this Long with bits logically shifted to the right by the given amount. - * @this {!Long} - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { - if (isLong(numBits)) numBits = numBits.toInt(); - if ((numBits &= 63) === 0) return this; - if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned); - if (numBits === 32) return fromBits(this.high, 0, this.unsigned); - return fromBits(this.high >>> (numBits - 32), 0, this.unsigned); -}; - -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shru = LongPrototype.shiftRightUnsigned; - -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - */ -LongPrototype.shr_u = LongPrototype.shiftRightUnsigned; - -/** - * Returns this Long with bits rotated to the left by the given amount. - * @this {!Long} - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Rotated Long - */ -LongPrototype.rotateLeft = function rotateLeft(numBits) { - var b; - if (isLong(numBits)) numBits = numBits.toInt(); - if ((numBits &= 63) === 0) return this; - if (numBits === 32) return fromBits(this.high, this.low, this.unsigned); - if (numBits < 32) { - b = (32 - numBits); - return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned); - } - numBits -= 32; - b = (32 - numBits); - return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned); -} -/** - * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Rotated Long - */ -LongPrototype.rotl = LongPrototype.rotateLeft; - -/** - * Returns this Long with bits rotated to the right by the given amount. - * @this {!Long} - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Rotated Long - */ -LongPrototype.rotateRight = function rotateRight(numBits) { - var b; - if (isLong(numBits)) numBits = numBits.toInt(); - if ((numBits &= 63) === 0) return this; - if (numBits === 32) return fromBits(this.high, this.low, this.unsigned); - if (numBits < 32) { - b = (32 - numBits); - return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned); - } - numBits -= 32; - b = (32 - numBits); - return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned); -} -/** - * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Rotated Long - */ -LongPrototype.rotr = LongPrototype.rotateRight; - -/** - * Converts this Long to signed. - * @this {!Long} - * @returns {!Long} Signed long - */ -LongPrototype.toSigned = function toSigned() { - if (!this.unsigned) - return this; - return fromBits(this.low, this.high, false); -}; - -/** - * Converts this Long to unsigned. - * @this {!Long} - * @returns {!Long} Unsigned long - */ -LongPrototype.toUnsigned = function toUnsigned() { - if (this.unsigned) - return this; - return fromBits(this.low, this.high, true); -}; - -/** - * Converts this Long to its byte representation. - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @this {!Long} - * @returns {!Array.} Byte representation - */ -LongPrototype.toBytes = function toBytes(le) { - return le ? this.toBytesLE() : this.toBytesBE(); -}; - -/** - * Converts this Long to its little endian byte representation. - * @this {!Long} - * @returns {!Array.} Little endian byte representation - */ -LongPrototype.toBytesLE = function toBytesLE() { - var hi = this.high, - lo = this.low; - return [ - lo & 0xff, - lo >>> 8 & 0xff, - lo >>> 16 & 0xff, - lo >>> 24 , - hi & 0xff, - hi >>> 8 & 0xff, - hi >>> 16 & 0xff, - hi >>> 24 - ]; -}; - -/** - * Converts this Long to its big endian byte representation. - * @this {!Long} - * @returns {!Array.} Big endian byte representation - */ -LongPrototype.toBytesBE = function toBytesBE() { - var hi = this.high, - lo = this.low; - return [ - hi >>> 24 , - hi >>> 16 & 0xff, - hi >>> 8 & 0xff, - hi & 0xff, - lo >>> 24 , - lo >>> 16 & 0xff, - lo >>> 8 & 0xff, - lo & 0xff - ]; -}; - -/** - * Creates a Long from its byte representation. - * @param {!Array.} bytes Byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {Long} The corresponding Long value - */ -Long.fromBytes = function fromBytes(bytes, unsigned, le) { - return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned); -}; - -/** - * Creates a Long from its little endian byte representation. - * @param {!Array.} bytes Little endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value - */ -Long.fromBytesLE = function fromBytesLE(bytes, unsigned) { - return new Long( - bytes[0] | - bytes[1] << 8 | - bytes[2] << 16 | - bytes[3] << 24, - bytes[4] | - bytes[5] << 8 | - bytes[6] << 16 | - bytes[7] << 24, - unsigned - ); -}; - -/** - * Creates a Long from its big endian byte representation. - * @param {!Array.} bytes Big endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value - */ -Long.fromBytesBE = function fromBytesBE(bytes, unsigned) { - return new Long( - bytes[4] << 24 | - bytes[5] << 16 | - bytes[6] << 8 | - bytes[7], - bytes[0] << 24 | - bytes[1] << 16 | - bytes[2] << 8 | - bytes[3], - unsigned - ); -}; - - -/***/ }), - -/***/ 81579: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.importAssertions = importAssertions; - -var _acorn = _interopRequireWildcard(__webpack_require__(31988)); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const leftCurlyBrace = "{".charCodeAt(0); -const space = " ".charCodeAt(0); -const keyword = "assert"; -const FUNC_STATEMENT = 1, - FUNC_HANGING_STATEMENT = 2, - FUNC_NULLABLE_ID = 4; - -function importAssertions(Parser) { - // Use supplied version acorn version if present, to avoid - // reference mismatches due to different acorn versions. This - // allows this plugin to be used with Rollup which supplies - // its own internal version of acorn and thereby sidesteps - // the package manager. - const acorn = Parser.acorn || _acorn; - const { - tokTypes: tt, - TokenType - } = acorn; - return class extends Parser { - constructor(...args) { - super(...args); - this.assertToken = new TokenType(keyword); - } - - _codeAt(i) { - return this.input.charCodeAt(i); - } - - _eat(t) { - if (this.type !== t) { - this.unexpected(); - } - - this.next(); - } - - readToken(code) { - let i = 0; - - for (; i < keyword.length; i++) { - if (this._codeAt(this.pos + i) !== keyword.charCodeAt(i)) { - return super.readToken(code); - } - } // ensure that the keyword is at the correct location - // ie `assert{...` or `assert {...` - - - for (;; i++) { - if (this._codeAt(this.pos + i) === leftCurlyBrace) { - // Found '{' - break; - } else if (this._codeAt(this.pos + i) === space) { - // white space is allowed between `assert` and `{`, so continue. - continue; - } else { - return super.readToken(code); - } - } // If we're inside a dynamic import expression we'll parse - // the `assert` keyword as a standard object property name - // ie `import(""./foo.json", { assert: { type: "json" } })` - - - if (this.type.label === "{") { - return super.readToken(code); - } - - this.pos += keyword.length; - return this.finishToken(this.assertToken); - } - - parseDynamicImport(node) { - this.next(); // skip `(` - // Parse node.source. - - node.source = this.parseMaybeAssign(); - - if (this.eat(tt.comma)) { - const obj = this.parseObj(false); - node.arguments = [obj]; - } - - this._eat(tt.parenR); - - return this.finishNode(node, "ImportExpression"); - } // ported from acorn/src/statement.js pp.parseExport - - - parseExport(node, exports) { - this.next(); // export * from '...' - - if (this.eat(tt.star)) { - if (this.options.ecmaVersion >= 11) { - if (this.eatContextual("as")) { - node.exported = this.parseIdent(true); - this.checkExport(exports, node.exported.name, this.lastTokStart); - } else { - node.exported = null; - } - } - - this.expectContextual("from"); - - if (this.type !== tt.string) { - this.unexpected(); - } - - node.source = this.parseExprAtom(); - - if (this.type === this.assertToken) { - this.next(); - const assertions = this.parseImportAssertions(); - - if (assertions) { - node.assertions = assertions; - } - } - - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - - if (this.eat(tt._default)) { - // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - - if (this.type === tt._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - - if (isAsync) { - this.next(); - } - - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === tt._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - - return this.finishNode(node, "ExportDefaultDeclaration"); - } // export var|const|let|function|class ... - - - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - - if (node.declaration.type === "VariableDeclaration") { - this.checkVariableExport(exports, node.declaration.declarations); - } else { - this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); - } - - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - - if (this.eatContextual("from")) { - if (this.type !== tt.string) { - this.unexpected(); - } - - node.source = this.parseExprAtom(); - - if (this.type === this.assertToken) { - this.next(); - const assertions = this.parseImportAssertions(); - - if (assertions) { - node.assertions = assertions; - } - } - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; - this.checkUnreserved(spec.local); // check if export is defined - - this.checkLocalExport(spec.local); - } - - node.source = null; - } - - this.semicolon(); - } - - return this.finishNode(node, "ExportNamedDeclaration"); - } - - parseImport(node) { - this.next(); // import '...' - - if (this.type === tt.string) { - node.specifiers = []; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } - - if (this.type === this.assertToken) { - this.next(); - const assertions = this.parseImportAssertions(); - - if (assertions) { - node.assertions = assertions; - } - } - - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - parseImportAssertions() { - this._eat(tt.braceL); - - const attrs = this.parseAssertEntries(); - - this._eat(tt.braceR); - - return attrs; - } - - parseAssertEntries() { - const attrs = []; - const attrNames = new Set(); - - do { - if (this.type === tt.braceR) { - break; - } - - const node = this.startNode(); // parse AssertionKey : IdentifierName, StringLiteral - - let assertionKeyNode; - - if (this.type === tt.string) { - assertionKeyNode = this.parseLiteral(this.value); - } else { - assertionKeyNode = this.parseIdent(true); - } - - this.next(); - node.key = assertionKeyNode; // for now we are only allowing `type` as the only allowed module attribute - - if (node.key.name !== "type") { - this.raise(this.pos, "The only accepted import assertion is `type`"); - } // check if we already have an entry for an attribute - // if a duplicate entry is found, throw an error - // for now this logic will come into play only when someone declares `type` twice - - - if (attrNames.has(node.key.name)) { - this.raise(this.pos, "Duplicated key in assertions"); - } - - attrNames.add(node.key.name); - - if (this.type !== tt.string) { - this.raise(this.pos, "Only string is supported as an assertion value"); - } - - node.value = this.parseLiteral(this.value); - attrs.push(this.finishNode(node, "ImportAttribute")); - } while (this.eat(tt.comma)); - - return attrs; - } - - }; -} - -/***/ }), - -/***/ 97098: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - -/** - * trace-event - A library to create a trace of your node app per - * Google's Trace Event format: - * // JSSTYLED - * https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -var tslib_1 = __webpack_require__(27285); -var stream_1 = __webpack_require__(12781); -function evCommon() { - var hrtime = process.hrtime(); // [seconds, nanoseconds] - var ts = hrtime[0] * 1000000 + Math.round(hrtime[1] / 1000); // microseconds - return { - ts: ts, - pid: process.pid, - tid: process.pid // no meaningful tid for node.js - }; -} -var Tracer = /** @class */ (function (_super) { - tslib_1.__extends(Tracer, _super); - function Tracer(opts) { - if (opts === void 0) { opts = {}; } - var _this = _super.call(this) || this; - _this.noStream = false; - _this.events = []; - if (typeof opts !== "object") { - throw new Error("Invalid options passed (must be an object)"); - } - if (opts.parent != null && typeof opts.parent !== "object") { - throw new Error("Invalid option (parent) passed (must be an object)"); - } - if (opts.fields != null && typeof opts.fields !== "object") { - throw new Error("Invalid option (fields) passed (must be an object)"); - } - if (opts.objectMode != null && - (opts.objectMode !== true && opts.objectMode !== false)) { - throw new Error("Invalid option (objectsMode) passed (must be a boolean)"); - } - _this.noStream = opts.noStream || false; - _this.parent = opts.parent; - if (_this.parent) { - _this.fields = Object.assign({}, opts.parent && opts.parent.fields); - } - else { - _this.fields = {}; - } - if (opts.fields) { - Object.assign(_this.fields, opts.fields); - } - if (!_this.fields.cat) { - // trace-viewer *requires* `cat`, so let's have a fallback. - _this.fields.cat = "default"; - } - else if (Array.isArray(_this.fields.cat)) { - _this.fields.cat = _this.fields.cat.join(","); - } - if (!_this.fields.args) { - // trace-viewer *requires* `args`, so let's have a fallback. - _this.fields.args = {}; - } - if (_this.parent) { - // TODO: Not calling Readable ctor here. Does that cause probs? - // Probably if trying to pipe from the child. - // Might want a serpate TracerChild class for these guys. - _this._push = _this.parent._push.bind(_this.parent); - } - else { - _this._objectMode = Boolean(opts.objectMode); - var streamOpts = { objectMode: _this._objectMode }; - if (_this._objectMode) { - _this._push = _this.push; - } - else { - _this._push = _this._pushString; - streamOpts.encoding = "utf8"; - } - stream_1.Readable.call(_this, streamOpts); - } - return _this; - } - /** - * If in no streamMode in order to flush out the trace - * you need to call flush. - */ - Tracer.prototype.flush = function () { - if (this.noStream === true) { - for (var _i = 0, _a = this.events; _i < _a.length; _i++) { - var evt = _a[_i]; - this._push(evt); - } - this._flush(); - } - }; - Tracer.prototype._read = function (_) { }; - Tracer.prototype._pushString = function (ev) { - var separator = ""; - if (!this.firstPush) { - this.push("["); - this.firstPush = true; - } - else { - separator = ",\n"; - } - this.push(separator + JSON.stringify(ev), "utf8"); - }; - Tracer.prototype._flush = function () { - if (!this._objectMode) { - this.push("]"); - } - }; - Tracer.prototype.child = function (fields) { - return new Tracer({ - parent: this, - fields: fields - }); - }; - Tracer.prototype.begin = function (fields) { - return this.mkEventFunc("b")(fields); - }; - Tracer.prototype.end = function (fields) { - return this.mkEventFunc("e")(fields); - }; - Tracer.prototype.completeEvent = function (fields) { - return this.mkEventFunc("X")(fields); - }; - Tracer.prototype.instantEvent = function (fields) { - return this.mkEventFunc("I")(fields); - }; - Tracer.prototype.mkEventFunc = function (ph) { - var _this = this; - return function (fields) { - var ev = evCommon(); - // Assign the event phase. - ev.ph = ph; - if (fields) { - if (typeof fields === "string") { - ev.name = fields; - } - else { - for (var _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) { - var k = _a[_i]; - if (k === "cat") { - ev.cat = fields.cat.join(","); - } - else { - ev[k] = fields[k]; - } - } - } - } - if (!_this.noStream) { - _this._push(ev); - } - else { - _this.events.push(ev); - } - }; - }; - return Tracer; -}(stream_1.Readable)); -exports.Tracer = Tracer; -/* - * These correspond to the "Async events" in the Trace Events doc. - * - * Required fields: - * - name - * - id - * - * Optional fields: - * - cat (array) - * - args (object) - * - TODO: stack fields, other optional fields? - * - * Dev Note: We don't explicitly assert that correct fields are - * used for speed (premature optimization alert!). - */ -//# sourceMappingURL=trace-event.js.map - -/***/ }), - -/***/ 78032: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DescriptionFileUtils = __webpack_require__(65746); -const getInnerRequest = __webpack_require__(30613); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class AliasFieldPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | Array} field field - * @param {string | ResolveStepHook} target target - */ - constructor(source, field, target) { - this.source = source; - this.field = field; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => { - if (!request.descriptionFileData) return callback(); - const innerRequest = getInnerRequest(resolver, request); - if (!innerRequest) return callback(); - const fieldData = DescriptionFileUtils.getField( - request.descriptionFileData, - this.field - ); - if (fieldData === null || typeof fieldData !== "object") { - if (resolveContext.log) - resolveContext.log( - "Field '" + - this.field + - "' doesn't contain a valid alias configuration" - ); - return callback(); - } - const data = Object.prototype.hasOwnProperty.call( - fieldData, - innerRequest - ) - ? fieldData[innerRequest] - : innerRequest.startsWith("./") - ? fieldData[innerRequest.slice(2)] - : undefined; - if (data === innerRequest) return callback(); - if (data === undefined) return callback(); - if (data === false) { - /** @type {ResolveRequest} */ - const ignoreObj = { - ...request, - path: false - }; - if (typeof resolveContext.yield === "function") { - resolveContext.yield(ignoreObj); - return callback(null, null); - } - return callback(null, ignoreObj); - } - const obj = { - ...request, - path: request.descriptionFileRoot, - request: data, - fullySpecified: false - }; - resolver.doResolve( - target, - obj, - "aliased from description file " + - request.descriptionFilePath + - " with mapping '" + - innerRequest + - "' to '" + - data + - "'", - resolveContext, - (err, result) => { - if (err) return callback(err); - - // Don't allow other aliasing or raw request - if (result === undefined) return callback(null, null); - callback(null, result); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 52896: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const forEachBail = __webpack_require__(94968); -const { PathType, getType } = __webpack_require__(448); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {{alias: string|Array|false, name: string, onlyModule?: boolean}} AliasOption */ - -module.exports = class AliasPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {AliasOption | Array} options options - * @param {string | ResolveStepHook} target target - */ - constructor(source, options, target) { - this.source = source; - this.options = Array.isArray(options) ? options : [options]; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - const getAbsolutePathWithSlashEnding = maybeAbsolutePath => { - const type = getType(maybeAbsolutePath); - if (type === PathType.AbsolutePosix || type === PathType.AbsoluteWin) { - return resolver.join(maybeAbsolutePath, "_").slice(0, -1); - } - return null; - }; - const isSubPath = (path, maybeSubPath) => { - const absolutePath = getAbsolutePathWithSlashEnding(maybeSubPath); - if (!absolutePath) return false; - return path.startsWith(absolutePath); - }; - resolver - .getHook(this.source) - .tapAsync("AliasPlugin", (request, resolveContext, callback) => { - const innerRequest = request.request || request.path; - if (!innerRequest) return callback(); - forEachBail( - this.options, - (item, callback) => { - let shouldStop = false; - if ( - innerRequest === item.name || - (!item.onlyModule && - (request.request - ? innerRequest.startsWith(`${item.name}/`) - : isSubPath(innerRequest, item.name))) - ) { - const remainingRequest = innerRequest.substr(item.name.length); - const resolveWithAlias = (alias, callback) => { - if (alias === false) { - /** @type {ResolveRequest} */ - const ignoreObj = { - ...request, - path: false - }; - if (typeof resolveContext.yield === "function") { - resolveContext.yield(ignoreObj); - return callback(null, null); - } - return callback(null, ignoreObj); - } - if ( - innerRequest !== alias && - !innerRequest.startsWith(alias + "/") - ) { - shouldStop = true; - const newRequestStr = alias + remainingRequest; - const obj = { - ...request, - request: newRequestStr, - fullySpecified: false - }; - return resolver.doResolve( - target, - obj, - "aliased with mapping '" + - item.name + - "': '" + - alias + - "' to '" + - newRequestStr + - "'", - resolveContext, - (err, result) => { - if (err) return callback(err); - if (result) return callback(null, result); - return callback(); - } - ); - } - return callback(); - }; - const stoppingCallback = (err, result) => { - if (err) return callback(err); - - if (result) return callback(null, result); - // Don't allow other aliasing or raw request - if (shouldStop) return callback(null, null); - return callback(); - }; - if (Array.isArray(item.alias)) { - return forEachBail( - item.alias, - resolveWithAlias, - stoppingCallback - ); - } else { - return resolveWithAlias(item.alias, stoppingCallback); - } - } - return callback(); - }, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 35565: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class AppendPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string} appending appending - * @param {string | ResolveStepHook} target target - */ - constructor(source, appending, target) { - this.source = source; - this.appending = appending; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("AppendPlugin", (request, resolveContext, callback) => { - const obj = { - ...request, - path: request.path + this.appending, - relativePath: - request.relativePath && request.relativePath + this.appending - }; - resolver.doResolve( - target, - obj, - this.appending, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 28754: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const nextTick = (__webpack_require__(77282).nextTick); - -/** @typedef {import("./Resolver").FileSystem} FileSystem */ -/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ - -const dirname = path => { - let idx = path.length - 1; - while (idx >= 0) { - const c = path.charCodeAt(idx); - // slash or backslash - if (c === 47 || c === 92) break; - idx--; - } - if (idx < 0) return ""; - return path.slice(0, idx); -}; - -const runCallbacks = (callbacks, err, result) => { - if (callbacks.length === 1) { - callbacks[0](err, result); - callbacks.length = 0; - return; - } - let error; - for (const callback of callbacks) { - try { - callback(err, result); - } catch (e) { - if (!error) error = e; - } - } - callbacks.length = 0; - if (error) throw error; -}; - -class OperationMergerBackend { - /** - * @param {any} provider async method - * @param {any} syncProvider sync method - * @param {any} providerContext call context for the provider methods - */ - constructor(provider, syncProvider, providerContext) { - this._provider = provider; - this._syncProvider = syncProvider; - this._providerContext = providerContext; - this._activeAsyncOperations = new Map(); - - this.provide = this._provider - ? (path, options, callback) => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - if (options) { - return this._provider.call( - this._providerContext, - path, - options, - callback - ); - } - if (typeof path !== "string") { - callback(new TypeError("path must be a string")); - return; - } - let callbacks = this._activeAsyncOperations.get(path); - if (callbacks) { - callbacks.push(callback); - return; - } - this._activeAsyncOperations.set(path, (callbacks = [callback])); - provider(path, (err, result) => { - this._activeAsyncOperations.delete(path); - runCallbacks(callbacks, err, result); - }); - } - : null; - this.provideSync = this._syncProvider - ? (path, options) => { - return this._syncProvider.call(this._providerContext, path, options); - } - : null; - } - - purge() {} - purgeParent() {} -} - -/* - -IDLE: - insert data: goto SYNC - -SYNC: - before provide: run ticks - event loop tick: goto ASYNC_ACTIVE - -ASYNC: - timeout: run tick, goto ASYNC_PASSIVE - -ASYNC_PASSIVE: - before provide: run ticks - -IDLE --[insert data]--> SYNC --[event loop tick]--> ASYNC_ACTIVE --[interval tick]-> ASYNC_PASSIVE - ^ | - +---------[insert data]-------+ -*/ - -const STORAGE_MODE_IDLE = 0; -const STORAGE_MODE_SYNC = 1; -const STORAGE_MODE_ASYNC = 2; - -class CacheBackend { - /** - * @param {number} duration max cache duration of items - * @param {any} provider async method - * @param {any} syncProvider sync method - * @param {any} providerContext call context for the provider methods - */ - constructor(duration, provider, syncProvider, providerContext) { - this._duration = duration; - this._provider = provider; - this._syncProvider = syncProvider; - this._providerContext = providerContext; - /** @type {Map} */ - this._activeAsyncOperations = new Map(); - /** @type {Map }>} */ - this._data = new Map(); - /** @type {Set[]} */ - this._levels = []; - for (let i = 0; i < 10; i++) this._levels.push(new Set()); - for (let i = 5000; i < duration; i += 500) this._levels.push(new Set()); - this._currentLevel = 0; - this._tickInterval = Math.floor(duration / this._levels.length); - /** @type {STORAGE_MODE_IDLE | STORAGE_MODE_SYNC | STORAGE_MODE_ASYNC} */ - this._mode = STORAGE_MODE_IDLE; - - /** @type {NodeJS.Timeout | undefined} */ - this._timeout = undefined; - /** @type {number | undefined} */ - this._nextDecay = undefined; - - this.provide = provider ? this.provide.bind(this) : null; - this.provideSync = syncProvider ? this.provideSync.bind(this) : null; - } - - provide(path, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - if (typeof path !== "string") { - callback(new TypeError("path must be a string")); - return; - } - if (options) { - return this._provider.call( - this._providerContext, - path, - options, - callback - ); - } - - // When in sync mode we can move to async mode - if (this._mode === STORAGE_MODE_SYNC) { - this._enterAsyncMode(); - } - - // Check in cache - let cacheEntry = this._data.get(path); - if (cacheEntry !== undefined) { - if (cacheEntry.err) return nextTick(callback, cacheEntry.err); - return nextTick(callback, null, cacheEntry.result); - } - - // Check if there is already the same operation running - let callbacks = this._activeAsyncOperations.get(path); - if (callbacks !== undefined) { - callbacks.push(callback); - return; - } - this._activeAsyncOperations.set(path, (callbacks = [callback])); - - // Run the operation - this._provider.call(this._providerContext, path, (err, result) => { - this._activeAsyncOperations.delete(path); - this._storeResult(path, err, result); - - // Enter async mode if not yet done - this._enterAsyncMode(); - - runCallbacks(callbacks, err, result); - }); - } - - provideSync(path, options) { - if (typeof path !== "string") { - throw new TypeError("path must be a string"); - } - if (options) { - return this._syncProvider.call(this._providerContext, path, options); - } - - // In sync mode we may have to decay some cache items - if (this._mode === STORAGE_MODE_SYNC) { - this._runDecays(); - } - - // Check in cache - let cacheEntry = this._data.get(path); - if (cacheEntry !== undefined) { - if (cacheEntry.err) throw cacheEntry.err; - return cacheEntry.result; - } - - // Get all active async operations - // This sync operation will also complete them - const callbacks = this._activeAsyncOperations.get(path); - this._activeAsyncOperations.delete(path); - - // Run the operation - // When in idle mode, we will enter sync mode - let result; - try { - result = this._syncProvider.call(this._providerContext, path); - } catch (err) { - this._storeResult(path, err, undefined); - this._enterSyncModeWhenIdle(); - if (callbacks) runCallbacks(callbacks, err, undefined); - throw err; - } - this._storeResult(path, undefined, result); - this._enterSyncModeWhenIdle(); - if (callbacks) runCallbacks(callbacks, undefined, result); - return result; - } - - purge(what) { - if (!what) { - if (this._mode !== STORAGE_MODE_IDLE) { - this._data.clear(); - for (const level of this._levels) { - level.clear(); - } - this._enterIdleMode(); - } - } else if (typeof what === "string") { - for (let [key, data] of this._data) { - if (key.startsWith(what)) { - this._data.delete(key); - data.level.delete(key); - } - } - if (this._data.size === 0) { - this._enterIdleMode(); - } - } else { - for (let [key, data] of this._data) { - for (const item of what) { - if (key.startsWith(item)) { - this._data.delete(key); - data.level.delete(key); - break; - } - } - } - if (this._data.size === 0) { - this._enterIdleMode(); - } - } - } - - purgeParent(what) { - if (!what) { - this.purge(); - } else if (typeof what === "string") { - this.purge(dirname(what)); - } else { - const set = new Set(); - for (const item of what) { - set.add(dirname(item)); - } - this.purge(set); - } - } - - _storeResult(path, err, result) { - if (this._data.has(path)) return; - const level = this._levels[this._currentLevel]; - this._data.set(path, { err, result, level }); - level.add(path); - } - - _decayLevel() { - const nextLevel = (this._currentLevel + 1) % this._levels.length; - const decay = this._levels[nextLevel]; - this._currentLevel = nextLevel; - for (let item of decay) { - this._data.delete(item); - } - decay.clear(); - if (this._data.size === 0) { - this._enterIdleMode(); - } else { - // @ts-ignore _nextDecay is always a number in sync mode - this._nextDecay += this._tickInterval; - } - } - - _runDecays() { - while ( - /** @type {number} */ (this._nextDecay) <= Date.now() && - this._mode !== STORAGE_MODE_IDLE - ) { - this._decayLevel(); - } - } - - _enterAsyncMode() { - let timeout = 0; - switch (this._mode) { - case STORAGE_MODE_ASYNC: - return; - case STORAGE_MODE_IDLE: - this._nextDecay = Date.now() + this._tickInterval; - timeout = this._tickInterval; - break; - case STORAGE_MODE_SYNC: - this._runDecays(); - // @ts-ignore _runDecays may change the mode - if (this._mode === STORAGE_MODE_IDLE) return; - timeout = Math.max( - 0, - /** @type {number} */ (this._nextDecay) - Date.now() - ); - break; - } - this._mode = STORAGE_MODE_ASYNC; - const ref = setTimeout(() => { - this._mode = STORAGE_MODE_SYNC; - this._runDecays(); - }, timeout); - if (ref.unref) ref.unref(); - this._timeout = ref; - } - - _enterSyncModeWhenIdle() { - if (this._mode === STORAGE_MODE_IDLE) { - this._mode = STORAGE_MODE_SYNC; - this._nextDecay = Date.now() + this._tickInterval; - } - } - - _enterIdleMode() { - this._mode = STORAGE_MODE_IDLE; - this._nextDecay = undefined; - if (this._timeout) clearTimeout(this._timeout); - } -} - -const createBackend = (duration, provider, syncProvider, providerContext) => { - if (duration > 0) { - return new CacheBackend(duration, provider, syncProvider, providerContext); - } - return new OperationMergerBackend(provider, syncProvider, providerContext); -}; - -module.exports = class CachedInputFileSystem { - constructor(fileSystem, duration) { - this.fileSystem = fileSystem; - - this._lstatBackend = createBackend( - duration, - this.fileSystem.lstat, - this.fileSystem.lstatSync, - this.fileSystem - ); - const lstat = this._lstatBackend.provide; - this.lstat = /** @type {FileSystem["lstat"]} */ (lstat); - const lstatSync = this._lstatBackend.provideSync; - this.lstatSync = /** @type {SyncFileSystem["lstatSync"]} */ (lstatSync); - - this._statBackend = createBackend( - duration, - this.fileSystem.stat, - this.fileSystem.statSync, - this.fileSystem - ); - const stat = this._statBackend.provide; - this.stat = /** @type {FileSystem["stat"]} */ (stat); - const statSync = this._statBackend.provideSync; - this.statSync = /** @type {SyncFileSystem["statSync"]} */ (statSync); - - this._readdirBackend = createBackend( - duration, - this.fileSystem.readdir, - this.fileSystem.readdirSync, - this.fileSystem - ); - const readdir = this._readdirBackend.provide; - this.readdir = /** @type {FileSystem["readdir"]} */ (readdir); - const readdirSync = this._readdirBackend.provideSync; - this.readdirSync = /** @type {SyncFileSystem["readdirSync"]} */ (readdirSync); - - this._readFileBackend = createBackend( - duration, - this.fileSystem.readFile, - this.fileSystem.readFileSync, - this.fileSystem - ); - const readFile = this._readFileBackend.provide; - this.readFile = /** @type {FileSystem["readFile"]} */ (readFile); - const readFileSync = this._readFileBackend.provideSync; - this.readFileSync = /** @type {SyncFileSystem["readFileSync"]} */ (readFileSync); - - this._readJsonBackend = createBackend( - duration, - this.fileSystem.readJson || - (this.readFile && - ((path, callback) => { - // @ts-ignore - this.readFile(path, (err, buffer) => { - if (err) return callback(err); - if (!buffer || buffer.length === 0) - return callback(new Error("No file content")); - let data; - try { - data = JSON.parse(buffer.toString("utf-8")); - } catch (e) { - return callback(e); - } - callback(null, data); - }); - })), - this.fileSystem.readJsonSync || - (this.readFileSync && - (path => { - const buffer = this.readFileSync(path); - const data = JSON.parse(buffer.toString("utf-8")); - return data; - })), - this.fileSystem - ); - const readJson = this._readJsonBackend.provide; - this.readJson = /** @type {FileSystem["readJson"]} */ (readJson); - const readJsonSync = this._readJsonBackend.provideSync; - this.readJsonSync = /** @type {SyncFileSystem["readJsonSync"]} */ (readJsonSync); - - this._readlinkBackend = createBackend( - duration, - this.fileSystem.readlink, - this.fileSystem.readlinkSync, - this.fileSystem - ); - const readlink = this._readlinkBackend.provide; - this.readlink = /** @type {FileSystem["readlink"]} */ (readlink); - const readlinkSync = this._readlinkBackend.provideSync; - this.readlinkSync = /** @type {SyncFileSystem["readlinkSync"]} */ (readlinkSync); - } - - purge(what) { - this._statBackend.purge(what); - this._lstatBackend.purge(what); - this._readdirBackend.purgeParent(what); - this._readFileBackend.purge(what); - this._readlinkBackend.purge(what); - this._readJsonBackend.purge(what); - } -}; - - -/***/ }), - -/***/ 71975: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const basename = (__webpack_require__(74689).basename); - -/** @typedef {import("./Resolver")} Resolver */ - -module.exports = class CloneBasenamePlugin { - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("CloneBasenamePlugin", (request, resolveContext, callback) => { - const filename = basename(request.path); - const filePath = resolver.join(request.path, filename); - const obj = { - ...request, - path: filePath, - relativePath: - request.relativePath && - resolver.join(request.relativePath, filename) - }; - resolver.doResolve( - target, - obj, - "using path: " + filePath, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 49465: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class ConditionalPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {Partial} test compare object - * @param {string | null} message log message - * @param {boolean} allowAlternatives when false, do not continue with the current step when "test" matches - * @param {string | ResolveStepHook} target target - */ - constructor(source, test, message, allowAlternatives, target) { - this.source = source; - this.test = test; - this.message = message; - this.allowAlternatives = allowAlternatives; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - const { test, message, allowAlternatives } = this; - const keys = Object.keys(test); - resolver - .getHook(this.source) - .tapAsync("ConditionalPlugin", (request, resolveContext, callback) => { - for (const prop of keys) { - if (request[prop] !== test[prop]) return callback(); - } - resolver.doResolve( - target, - request, - message, - resolveContext, - allowAlternatives - ? callback - : (err, result) => { - if (err) return callback(err); - - // Don't allow other alternatives - if (result === undefined) return callback(null, null); - callback(null, result); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 1938: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DescriptionFileUtils = __webpack_require__(65746); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class DescriptionFilePlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string[]} filenames filenames - * @param {boolean} pathIsFile pathIsFile - * @param {string | ResolveStepHook} target target - */ - constructor(source, filenames, pathIsFile, target) { - this.source = source; - this.filenames = filenames; - this.pathIsFile = pathIsFile; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync( - "DescriptionFilePlugin", - (request, resolveContext, callback) => { - const path = request.path; - if (!path) return callback(); - const directory = this.pathIsFile - ? DescriptionFileUtils.cdUp(path) - : path; - if (!directory) return callback(); - DescriptionFileUtils.loadDescriptionFile( - resolver, - directory, - this.filenames, - request.descriptionFilePath - ? { - path: request.descriptionFilePath, - content: request.descriptionFileData, - directory: /** @type {string} */ (request.descriptionFileRoot) - } - : undefined, - resolveContext, - (err, result) => { - if (err) return callback(err); - if (!result) { - if (resolveContext.log) - resolveContext.log( - `No description file found in ${directory} or above` - ); - return callback(); - } - const relativePath = - "." + path.substr(result.directory.length).replace(/\\/g, "/"); - const obj = { - ...request, - descriptionFilePath: result.path, - descriptionFileData: result.content, - descriptionFileRoot: result.directory, - relativePath: relativePath - }; - resolver.doResolve( - target, - obj, - "using description file: " + - result.path + - " (relative path: " + - relativePath + - ")", - resolveContext, - (err, result) => { - if (err) return callback(err); - - // Don't allow other processing - if (result === undefined) return callback(null, null); - callback(null, result); - } - ); - } - ); - } - ); - } -}; - - -/***/ }), - -/***/ 65746: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const forEachBail = __webpack_require__(94968); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ - -/** - * @typedef {Object} DescriptionFileInfo - * @property {any=} content - * @property {string} path - * @property {string} directory - */ - -/** - * @callback ErrorFirstCallback - * @param {Error|null=} error - * @param {DescriptionFileInfo=} result - */ - -/** - * @param {Resolver} resolver resolver - * @param {string} directory directory - * @param {string[]} filenames filenames - * @param {DescriptionFileInfo|undefined} oldInfo oldInfo - * @param {ResolveContext} resolveContext resolveContext - * @param {ErrorFirstCallback} callback callback - */ -function loadDescriptionFile( - resolver, - directory, - filenames, - oldInfo, - resolveContext, - callback -) { - (function findDescriptionFile() { - if (oldInfo && oldInfo.directory === directory) { - // We already have info for this directory and can reuse it - return callback(null, oldInfo); - } - forEachBail( - filenames, - (filename, callback) => { - const descriptionFilePath = resolver.join(directory, filename); - if (resolver.fileSystem.readJson) { - resolver.fileSystem.readJson(descriptionFilePath, (err, content) => { - if (err) { - if (typeof err.code !== "undefined") { - if (resolveContext.missingDependencies) { - resolveContext.missingDependencies.add(descriptionFilePath); - } - return callback(); - } - if (resolveContext.fileDependencies) { - resolveContext.fileDependencies.add(descriptionFilePath); - } - return onJson(err); - } - if (resolveContext.fileDependencies) { - resolveContext.fileDependencies.add(descriptionFilePath); - } - onJson(null, content); - }); - } else { - resolver.fileSystem.readFile(descriptionFilePath, (err, content) => { - if (err) { - if (resolveContext.missingDependencies) { - resolveContext.missingDependencies.add(descriptionFilePath); - } - return callback(); - } - if (resolveContext.fileDependencies) { - resolveContext.fileDependencies.add(descriptionFilePath); - } - let json; - - if (content) { - try { - json = JSON.parse(content.toString()); - } catch (e) { - return onJson(e); - } - } else { - return onJson(new Error("No content in file")); - } - - onJson(null, json); - }); - } - - function onJson(err, content) { - if (err) { - if (resolveContext.log) - resolveContext.log( - descriptionFilePath + " (directory description file): " + err - ); - else - err.message = - descriptionFilePath + " (directory description file): " + err; - return callback(err); - } - callback(null, { - content, - directory, - path: descriptionFilePath - }); - } - }, - (err, result) => { - if (err) return callback(err); - if (result) { - return callback(null, result); - } else { - const dir = cdUp(directory); - if (!dir) { - return callback(); - } else { - directory = dir; - return findDescriptionFile(); - } - } - } - ); - })(); -} - -/** - * @param {any} content content - * @param {string|string[]} field field - * @returns {object|string|number|boolean|undefined} field data - */ -function getField(content, field) { - if (!content) return undefined; - if (Array.isArray(field)) { - let current = content; - for (let j = 0; j < field.length; j++) { - if (current === null || typeof current !== "object") { - current = null; - break; - } - current = current[field[j]]; - } - return current; - } else { - return content[field]; - } -} - -/** - * @param {string} directory directory - * @returns {string|null} parent directory or null - */ -function cdUp(directory) { - if (directory === "/") return null; - const i = directory.lastIndexOf("/"), - j = directory.lastIndexOf("\\"); - const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; - if (p < 0) return null; - return directory.substr(0, p || 1); -} - -exports.loadDescriptionFile = loadDescriptionFile; -exports.getField = getField; -exports.cdUp = cdUp; - - -/***/ }), - -/***/ 19599: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class DirectoryExistsPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync( - "DirectoryExistsPlugin", - (request, resolveContext, callback) => { - const fs = resolver.fileSystem; - const directory = request.path; - if (!directory) return callback(); - fs.stat(directory, (err, stat) => { - if (err || !stat) { - if (resolveContext.missingDependencies) - resolveContext.missingDependencies.add(directory); - if (resolveContext.log) - resolveContext.log(directory + " doesn't exist"); - return callback(); - } - if (!stat.isDirectory()) { - if (resolveContext.missingDependencies) - resolveContext.missingDependencies.add(directory); - if (resolveContext.log) - resolveContext.log(directory + " is not a directory"); - return callback(); - } - if (resolveContext.fileDependencies) - resolveContext.fileDependencies.add(directory); - resolver.doResolve( - target, - request, - `existing directory ${directory}`, - resolveContext, - callback - ); - }); - } - ); - } -}; - - -/***/ }), - -/***/ 54882: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const path = __webpack_require__(71017); -const DescriptionFileUtils = __webpack_require__(65746); -const forEachBail = __webpack_require__(94968); -const { processExportsField } = __webpack_require__(60367); -const { parseIdentifier } = __webpack_require__(33805); -const { checkImportsExportsFieldTarget } = __webpack_require__(448); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {import("./util/entrypoints").ExportsField} ExportsField */ -/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ - -module.exports = class ExportsFieldPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {Set} conditionNames condition names - * @param {string | string[]} fieldNamePath name path - * @param {string | ResolveStepHook} target target - */ - constructor(source, conditionNames, fieldNamePath, target) { - this.source = source; - this.target = target; - this.conditionNames = conditionNames; - this.fieldName = fieldNamePath; - /** @type {WeakMap} */ - this.fieldProcessorCache = new WeakMap(); - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("ExportsFieldPlugin", (request, resolveContext, callback) => { - // When there is no description file, abort - if (!request.descriptionFilePath) return callback(); - if ( - // When the description file is inherited from parent, abort - // (There is no description file inside of this package) - request.relativePath !== "." || - request.request === undefined - ) - return callback(); - - const remainingRequest = - request.query || request.fragment - ? (request.request === "." ? "./" : request.request) + - request.query + - request.fragment - : request.request; - /** @type {ExportsField|null} */ - const exportsField = DescriptionFileUtils.getField( - request.descriptionFileData, - this.fieldName - ); - if (!exportsField) return callback(); - - if (request.directory) { - return callback( - new Error( - `Resolving to directories is not possible with the exports field (request was ${remainingRequest}/)` - ) - ); - } - - let paths; - - try { - // We attach the cache to the description file instead of the exportsField value - // because we use a WeakMap and the exportsField could be a string too. - // Description file is always an object when exports field can be accessed. - let fieldProcessor = this.fieldProcessorCache.get( - request.descriptionFileData - ); - if (fieldProcessor === undefined) { - fieldProcessor = processExportsField(exportsField); - this.fieldProcessorCache.set( - request.descriptionFileData, - fieldProcessor - ); - } - paths = fieldProcessor(remainingRequest, this.conditionNames); - } catch (err) { - if (resolveContext.log) { - resolveContext.log( - `Exports field in ${request.descriptionFilePath} can't be processed: ${err}` - ); - } - return callback(err); - } - - if (paths.length === 0) { - return callback( - new Error( - `Package path ${remainingRequest} is not exported from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})` - ) - ); - } - - forEachBail( - paths, - (p, callback) => { - const parsedIdentifier = parseIdentifier(p); - - if (!parsedIdentifier) return callback(); - - const [relativePath, query, fragment] = parsedIdentifier; - - const error = checkImportsExportsFieldTarget(relativePath); - - if (error) { - return callback(error); - } - - const obj = { - ...request, - request: undefined, - path: path.join( - /** @type {string} */ (request.descriptionFileRoot), - relativePath - ), - relativePath, - query, - fragment - }; - - resolver.doResolve( - target, - obj, - "using exports field: " + p, - resolveContext, - callback - ); - }, - (err, result) => callback(err, result || null) - ); - }); - } -}; - - -/***/ }), - -/***/ 41232: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const forEachBail = __webpack_require__(94968); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {{ alias: string|string[], extension: string }} ExtensionAliasOption */ - -module.exports = class ExtensionAliasPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {ExtensionAliasOption} options options - * @param {string | ResolveStepHook} target target - */ - constructor(source, options, target) { - this.source = source; - this.options = options; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - const { extension, alias } = this.options; - resolver - .getHook(this.source) - .tapAsync("ExtensionAliasPlugin", (request, resolveContext, callback) => { - const requestPath = request.request; - if (!requestPath || !requestPath.endsWith(extension)) return callback(); - const resolve = (alias, callback) => { - resolver.doResolve( - target, - { - ...request, - request: `${requestPath.slice(0, -extension.length)}${alias}`, - fullySpecified: true - }, - `aliased from extension alias with mapping '${extension}' to '${alias}'`, - resolveContext, - callback - ); - }; - - const stoppingCallback = (err, result) => { - if (err) return callback(err); - if (result) return callback(null, result); - // Don't allow other aliasing or raw request - return callback(null, null); - }; - if (typeof alias === "string") { - resolve(alias, stoppingCallback); - } else if (alias.length > 1) { - forEachBail(alias, resolve, stoppingCallback); - } else { - resolve(alias[0], stoppingCallback); - } - }); - } -}; - - -/***/ }), - -/***/ 69141: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class FileExistsPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - const fs = resolver.fileSystem; - resolver - .getHook(this.source) - .tapAsync("FileExistsPlugin", (request, resolveContext, callback) => { - const file = request.path; - if (!file) return callback(); - fs.stat(file, (err, stat) => { - if (err || !stat) { - if (resolveContext.missingDependencies) - resolveContext.missingDependencies.add(file); - if (resolveContext.log) resolveContext.log(file + " doesn't exist"); - return callback(); - } - if (!stat.isFile()) { - if (resolveContext.missingDependencies) - resolveContext.missingDependencies.add(file); - if (resolveContext.log) resolveContext.log(file + " is not a file"); - return callback(); - } - if (resolveContext.fileDependencies) - resolveContext.fileDependencies.add(file); - resolver.doResolve( - target, - request, - "existing file: " + file, - resolveContext, - callback - ); - }); - }); - } -}; - - -/***/ }), - -/***/ 22363: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const path = __webpack_require__(71017); -const DescriptionFileUtils = __webpack_require__(65746); -const forEachBail = __webpack_require__(94968); -const { processImportsField } = __webpack_require__(60367); -const { parseIdentifier } = __webpack_require__(33805); -const { checkImportsExportsFieldTarget } = __webpack_require__(448); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ -/** @typedef {import("./util/entrypoints").ImportsField} ImportsField */ - -const dotCode = ".".charCodeAt(0); - -module.exports = class ImportsFieldPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {Set} conditionNames condition names - * @param {string | string[]} fieldNamePath name path - * @param {string | ResolveStepHook} targetFile target file - * @param {string | ResolveStepHook} targetPackage target package - */ - constructor( - source, - conditionNames, - fieldNamePath, - targetFile, - targetPackage - ) { - this.source = source; - this.targetFile = targetFile; - this.targetPackage = targetPackage; - this.conditionNames = conditionNames; - this.fieldName = fieldNamePath; - /** @type {WeakMap} */ - this.fieldProcessorCache = new WeakMap(); - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const targetFile = resolver.ensureHook(this.targetFile); - const targetPackage = resolver.ensureHook(this.targetPackage); - - resolver - .getHook(this.source) - .tapAsync("ImportsFieldPlugin", (request, resolveContext, callback) => { - // When there is no description file, abort - if (!request.descriptionFilePath || request.request === undefined) { - return callback(); - } - - const remainingRequest = - request.request + request.query + request.fragment; - /** @type {ImportsField|null} */ - const importsField = DescriptionFileUtils.getField( - request.descriptionFileData, - this.fieldName - ); - if (!importsField) return callback(); - - if (request.directory) { - return callback( - new Error( - `Resolving to directories is not possible with the imports field (request was ${remainingRequest}/)` - ) - ); - } - - let paths; - - try { - // We attach the cache to the description file instead of the importsField value - // because we use a WeakMap and the importsField could be a string too. - // Description file is always an object when exports field can be accessed. - let fieldProcessor = this.fieldProcessorCache.get( - request.descriptionFileData - ); - if (fieldProcessor === undefined) { - fieldProcessor = processImportsField(importsField); - this.fieldProcessorCache.set( - request.descriptionFileData, - fieldProcessor - ); - } - paths = fieldProcessor(remainingRequest, this.conditionNames); - } catch (err) { - if (resolveContext.log) { - resolveContext.log( - `Imports field in ${request.descriptionFilePath} can't be processed: ${err}` - ); - } - return callback(err); - } - - if (paths.length === 0) { - return callback( - new Error( - `Package import ${remainingRequest} is not imported from package ${request.descriptionFileRoot} (see imports field in ${request.descriptionFilePath})` - ) - ); - } - - forEachBail( - paths, - (p, callback) => { - const parsedIdentifier = parseIdentifier(p); - - if (!parsedIdentifier) return callback(); - - const [path_, query, fragment] = parsedIdentifier; - - const error = checkImportsExportsFieldTarget(path_); - - if (error) { - return callback(error); - } - - switch (path_.charCodeAt(0)) { - // should be relative - case dotCode: { - const obj = { - ...request, - request: undefined, - path: path.join( - /** @type {string} */ (request.descriptionFileRoot), - path_ - ), - relativePath: path_, - query, - fragment - }; - - resolver.doResolve( - targetFile, - obj, - "using imports field: " + p, - resolveContext, - callback - ); - break; - } - - // package resolving - default: { - const obj = { - ...request, - request: path_, - relativePath: path_, - fullySpecified: true, - query, - fragment - }; - - resolver.doResolve( - targetPackage, - obj, - "using imports field: " + p, - resolveContext, - callback - ); - } - } - }, - (err, result) => callback(err, result || null) - ); - }); - } -}; - - -/***/ }), - -/***/ 78232: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -const namespaceStartCharCode = "@".charCodeAt(0); - -module.exports = class JoinRequestPartPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync( - "JoinRequestPartPlugin", - (request, resolveContext, callback) => { - const req = request.request || ""; - let i = req.indexOf("/", 3); - - if (i >= 0 && req.charCodeAt(2) === namespaceStartCharCode) { - i = req.indexOf("/", i + 1); - } - - let moduleName, remainingRequest, fullySpecified; - if (i < 0) { - moduleName = req; - remainingRequest = "."; - fullySpecified = false; - } else { - moduleName = req.slice(0, i); - remainingRequest = "." + req.slice(i); - fullySpecified = request.fullySpecified; - } - const obj = { - ...request, - path: resolver.join(request.path, moduleName), - relativePath: - request.relativePath && - resolver.join(request.relativePath, moduleName), - request: remainingRequest, - fullySpecified - }; - resolver.doResolve(target, obj, null, resolveContext, callback); - } - ); - } -}; - - -/***/ }), - -/***/ 84858: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class JoinRequestPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("JoinRequestPlugin", (request, resolveContext, callback) => { - const obj = { - ...request, - path: resolver.join(request.path, request.request), - relativePath: - request.relativePath && - resolver.join(request.relativePath, request.request), - request: undefined - }; - resolver.doResolve(target, obj, null, resolveContext, callback); - }); - } -}; - - -/***/ }), - -/***/ 51492: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ - -module.exports = class LogInfoPlugin { - constructor(source) { - this.source = source; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const source = this.source; - resolver - .getHook(this.source) - .tapAsync("LogInfoPlugin", (request, resolveContext, callback) => { - if (!resolveContext.log) return callback(); - const log = resolveContext.log; - const prefix = "[" + source + "] "; - if (request.path) - log(prefix + "Resolving in directory: " + request.path); - if (request.request) - log(prefix + "Resolving request: " + request.request); - if (request.module) log(prefix + "Request is an module request."); - if (request.directory) log(prefix + "Request is a directory request."); - if (request.query) - log(prefix + "Resolving request query: " + request.query); - if (request.fragment) - log(prefix + "Resolving request fragment: " + request.fragment); - if (request.descriptionFilePath) - log( - prefix + "Has description data from " + request.descriptionFilePath - ); - if (request.relativePath) - log( - prefix + - "Relative path from description file is: " + - request.relativePath - ); - callback(); - }); - } -}; - - -/***/ }), - -/***/ 23365: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const path = __webpack_require__(71017); -const DescriptionFileUtils = __webpack_require__(65746); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {{name: string|Array, forceRelative: boolean}} MainFieldOptions */ - -const alreadyTriedMainField = Symbol("alreadyTriedMainField"); - -module.exports = class MainFieldPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {MainFieldOptions} options options - * @param {string | ResolveStepHook} target target - */ - constructor(source, options, target) { - this.source = source; - this.options = options; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("MainFieldPlugin", (request, resolveContext, callback) => { - if ( - request.path !== request.descriptionFileRoot || - request[alreadyTriedMainField] === request.descriptionFilePath || - !request.descriptionFilePath - ) - return callback(); - const filename = path.basename(request.descriptionFilePath); - let mainModule = DescriptionFileUtils.getField( - request.descriptionFileData, - this.options.name - ); - - if ( - !mainModule || - typeof mainModule !== "string" || - mainModule === "." || - mainModule === "./" - ) { - return callback(); - } - if (this.options.forceRelative && !/^\.\.?\//.test(mainModule)) - mainModule = "./" + mainModule; - const obj = { - ...request, - request: mainModule, - module: false, - directory: mainModule.endsWith("/"), - [alreadyTriedMainField]: request.descriptionFilePath - }; - return resolver.doResolve( - target, - obj, - "use " + - mainModule + - " from " + - this.options.name + - " in " + - filename, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 42482: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const forEachBail = __webpack_require__(94968); -const getPaths = __webpack_require__(74689); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class ModulesInHierarchicalDirectoriesPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | Array} directories directories - * @param {string | ResolveStepHook} target target - */ - constructor(source, directories, target) { - this.source = source; - this.directories = /** @type {Array} */ ([]).concat(directories); - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync( - "ModulesInHierarchicalDirectoriesPlugin", - (request, resolveContext, callback) => { - const fs = resolver.fileSystem; - const addrs = getPaths(request.path) - .paths.map(p => { - return this.directories.map(d => resolver.join(p, d)); - }) - .reduce((array, p) => { - array.push.apply(array, p); - return array; - }, []); - forEachBail( - addrs, - (addr, callback) => { - fs.stat(addr, (err, stat) => { - if (!err && stat && stat.isDirectory()) { - const obj = { - ...request, - path: addr, - request: "./" + request.request, - module: false - }; - const message = "looking for modules in " + addr; - return resolver.doResolve( - target, - obj, - message, - resolveContext, - callback - ); - } - if (resolveContext.log) - resolveContext.log( - addr + " doesn't exist or is not a directory" - ); - if (resolveContext.missingDependencies) - resolveContext.missingDependencies.add(addr); - return callback(); - }); - }, - callback - ); - } - ); - } -}; - - -/***/ }), - -/***/ 24714: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class ModulesInRootPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string} path path - * @param {string | ResolveStepHook} target target - */ - constructor(source, path, target) { - this.source = source; - this.path = path; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => { - const obj = { - ...request, - path: this.path, - request: "./" + request.request, - module: false - }; - resolver.doResolve( - target, - obj, - "looking for modules in " + this.path, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 48689: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class NextPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("NextPlugin", (request, resolveContext, callback) => { - resolver.doResolve(target, request, null, resolveContext, callback); - }); - } -}; - - -/***/ }), - -/***/ 29346: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class ParsePlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {Partial} requestOptions request options - * @param {string | ResolveStepHook} target target - */ - constructor(source, requestOptions, target) { - this.source = source; - this.requestOptions = requestOptions; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("ParsePlugin", (request, resolveContext, callback) => { - const parsed = resolver.parse(/** @type {string} */ (request.request)); - const obj = { ...request, ...parsed, ...this.requestOptions }; - if (request.query && !parsed.query) { - obj.query = request.query; - } - if (request.fragment && !parsed.fragment) { - obj.fragment = request.fragment; - } - if (parsed && resolveContext.log) { - if (parsed.module) resolveContext.log("Parsed request is a module"); - if (parsed.directory) - resolveContext.log("Parsed request is a directory"); - } - // There is an edge-case where a request with # can be a path or a fragment -> try both - if (obj.request && !obj.query && obj.fragment) { - const directory = obj.fragment.endsWith("/"); - const alternative = { - ...obj, - directory, - request: - obj.request + - (obj.directory ? "/" : "") + - (directory ? obj.fragment.slice(0, -1) : obj.fragment), - fragment: "" - }; - resolver.doResolve( - target, - alternative, - null, - resolveContext, - (err, result) => { - if (err) return callback(err); - if (result) return callback(null, result); - resolver.doResolve(target, obj, null, resolveContext, callback); - } - ); - return; - } - resolver.doResolve(target, obj, null, resolveContext, callback); - }); - } -}; - - -/***/ }), - -/***/ 24370: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Maël Nison @arcanis -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** - * @typedef {Object} PnpApiImpl - * @property {function(string, string, object): string} resolveToUnqualified - */ - -module.exports = class PnpPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {PnpApiImpl} pnpApi pnpApi - * @param {string | ResolveStepHook} target target - */ - constructor(source, pnpApi, target) { - this.source = source; - this.pnpApi = pnpApi; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("PnpPlugin", (request, resolveContext, callback) => { - const req = request.request; - if (!req) return callback(); - - // The trailing slash indicates to PnP that this value is a folder rather than a file - const issuer = `${request.path}/`; - - const packageMatch = /^(@[^/]+\/)?[^/]+/.exec(req); - if (!packageMatch) return callback(); - - const packageName = packageMatch[0]; - const innerRequest = `.${req.slice(packageName.length)}`; - - let resolution; - let apiResolution; - try { - resolution = this.pnpApi.resolveToUnqualified(packageName, issuer, { - considerBuiltins: false - }); - if (resolveContext.fileDependencies) { - apiResolution = this.pnpApi.resolveToUnqualified("pnpapi", issuer, { - considerBuiltins: false - }); - } - } catch (error) { - if ( - error.code === "MODULE_NOT_FOUND" && - error.pnpCode === "UNDECLARED_DEPENDENCY" - ) { - // This is not a PnP managed dependency. - // Try to continue resolving with our alternatives - if (resolveContext.log) { - resolveContext.log(`request is not managed by the pnpapi`); - for (const line of error.message.split("\n").filter(Boolean)) - resolveContext.log(` ${line}`); - } - return callback(); - } - return callback(error); - } - - if (resolution === packageName) return callback(); - - if (apiResolution && resolveContext.fileDependencies) { - resolveContext.fileDependencies.add(apiResolution); - } - - const obj = { - ...request, - path: resolution, - request: innerRequest, - ignoreSymlinks: true, - fullySpecified: request.fullySpecified && innerRequest !== "." - }; - resolver.doResolve( - target, - obj, - `resolved by pnp to ${resolution}`, - resolveContext, - (err, result) => { - if (err) return callback(err); - if (result) return callback(null, result); - // Skip alternatives - return callback(null, null); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 22789: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } = __webpack_require__(44217); -const createInnerContext = __webpack_require__(1655); -const { parseIdentifier } = __webpack_require__(33805); -const { - normalize, - cachedJoin: join, - getType, - PathType -} = __webpack_require__(448); - -/** @typedef {import("./ResolverFactory").ResolveOptions} ResolveOptions */ - -/** - * @typedef {Object} FileSystemStats - * @property {function(): boolean} isDirectory - * @property {function(): boolean} isFile - */ - -/** - * @typedef {Object} FileSystemDirent - * @property {Buffer | string} name - * @property {function(): boolean} isDirectory - * @property {function(): boolean} isFile - */ - -/** - * @typedef {Object} PossibleFileSystemError - * @property {string=} code - * @property {number=} errno - * @property {string=} path - * @property {string=} syscall - */ - -/** - * @template T - * @callback FileSystemCallback - * @param {PossibleFileSystemError & Error | null | undefined} err - * @param {T=} result - */ - -/** - * @typedef {Object} FileSystem - * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readFile - * @property {(function(string, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void) & function(string, object, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void} readdir - * @property {((function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void)=} readJson - * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readlink - * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void=} lstat - * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} stat - */ - -/** - * @typedef {Object} SyncFileSystem - * @property {function(string, object=): Buffer | string} readFileSync - * @property {function(string, object=): (Buffer | string)[] | FileSystemDirent[]} readdirSync - * @property {(function(string, object=): object)=} readJsonSync - * @property {function(string, object=): Buffer | string} readlinkSync - * @property {function(string, object=): FileSystemStats=} lstatSync - * @property {function(string, object=): FileSystemStats} statSync - */ - -/** - * @typedef {Object} ParsedIdentifier - * @property {string} request - * @property {string} query - * @property {string} fragment - * @property {boolean} directory - * @property {boolean} module - * @property {boolean} file - * @property {boolean} internal - */ - -/** - * @typedef {Object} BaseResolveRequest - * @property {string | false} path - * @property {string=} descriptionFilePath - * @property {string=} descriptionFileRoot - * @property {object=} descriptionFileData - * @property {string=} relativePath - * @property {boolean=} ignoreSymlinks - * @property {boolean=} fullySpecified - */ - -/** @typedef {BaseResolveRequest & Partial} ResolveRequest */ - -/** - * String with special formatting - * @typedef {string} StackEntry - */ - -/** @template T @typedef {{ add: (T) => void }} WriteOnlySet */ - -/** - * Resolve context - * @typedef {Object} ResolveContext - * @property {WriteOnlySet=} contextDependencies - * @property {WriteOnlySet=} fileDependencies files that was found on file system - * @property {WriteOnlySet=} missingDependencies dependencies that was not found on file system - * @property {Set=} stack set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`, - * @property {(function(string): void)=} log log function - * @property {(function (ResolveRequest): void)=} yield yield result, if provided plugins can return several results - */ - -/** @typedef {AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>} ResolveStepHook */ - -/** - * @param {string} str input string - * @returns {string} in camel case - */ -function toCamelCase(str) { - return str.replace(/-([a-z])/g, str => str.substr(1).toUpperCase()); -} - -class Resolver { - /** - * @param {ResolveStepHook} hook hook - * @param {ResolveRequest} request request - * @returns {StackEntry} stack entry - */ - static createStackEntry(hook, request) { - return ( - hook.name + - ": (" + - request.path + - ") " + - (request.request || "") + - (request.query || "") + - (request.fragment || "") + - (request.directory ? " directory" : "") + - (request.module ? " module" : "") - ); - } - - /** - * @param {FileSystem} fileSystem a filesystem - * @param {ResolveOptions} options options - */ - constructor(fileSystem, options) { - this.fileSystem = fileSystem; - this.options = options; - this.hooks = { - /** @type {SyncHook<[ResolveStepHook, ResolveRequest], void>} */ - resolveStep: new SyncHook(["hook", "request"], "resolveStep"), - /** @type {SyncHook<[ResolveRequest, Error]>} */ - noResolve: new SyncHook(["request", "error"], "noResolve"), - /** @type {ResolveStepHook} */ - resolve: new AsyncSeriesBailHook( - ["request", "resolveContext"], - "resolve" - ), - /** @type {AsyncSeriesHook<[ResolveRequest, ResolveContext]>} */ - result: new AsyncSeriesHook(["result", "resolveContext"], "result") - }; - } - - /** - * @param {string | ResolveStepHook} name hook name or hook itself - * @returns {ResolveStepHook} the hook - */ - ensureHook(name) { - if (typeof name !== "string") { - return name; - } - name = toCamelCase(name); - if (/^before/.test(name)) { - return /** @type {ResolveStepHook} */ (this.ensureHook( - name[6].toLowerCase() + name.substr(7) - ).withOptions({ - stage: -10 - })); - } - if (/^after/.test(name)) { - return /** @type {ResolveStepHook} */ (this.ensureHook( - name[5].toLowerCase() + name.substr(6) - ).withOptions({ - stage: 10 - })); - } - const hook = this.hooks[name]; - if (!hook) { - return (this.hooks[name] = new AsyncSeriesBailHook( - ["request", "resolveContext"], - name - )); - } - return hook; - } - - /** - * @param {string | ResolveStepHook} name hook name or hook itself - * @returns {ResolveStepHook} the hook - */ - getHook(name) { - if (typeof name !== "string") { - return name; - } - name = toCamelCase(name); - if (/^before/.test(name)) { - return /** @type {ResolveStepHook} */ (this.getHook( - name[6].toLowerCase() + name.substr(7) - ).withOptions({ - stage: -10 - })); - } - if (/^after/.test(name)) { - return /** @type {ResolveStepHook} */ (this.getHook( - name[5].toLowerCase() + name.substr(6) - ).withOptions({ - stage: 10 - })); - } - const hook = this.hooks[name]; - if (!hook) { - throw new Error(`Hook ${name} doesn't exist`); - } - return hook; - } - - /** - * @param {object} context context information object - * @param {string} path context path - * @param {string} request request string - * @returns {string | false} result - */ - resolveSync(context, path, request) { - /** @type {Error | null | undefined} */ - let err = undefined; - /** @type {string | false | undefined} */ - let result = undefined; - let sync = false; - this.resolve(context, path, request, {}, (e, r) => { - err = e; - result = r; - sync = true; - }); - if (!sync) { - throw new Error( - "Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!" - ); - } - if (err) throw err; - if (result === undefined) throw new Error("No result"); - return result; - } - - /** - * @param {object} context context information object - * @param {string} path context path - * @param {string} request request string - * @param {ResolveContext} resolveContext resolve context - * @param {function(Error | null, (string|false)=, ResolveRequest=): void} callback callback function - * @returns {void} - */ - resolve(context, path, request, resolveContext, callback) { - if (!context || typeof context !== "object") - return callback(new Error("context argument is not an object")); - if (typeof path !== "string") - return callback(new Error("path argument is not a string")); - if (typeof request !== "string") - return callback(new Error("request argument is not a string")); - if (!resolveContext) - return callback(new Error("resolveContext argument is not set")); - - const obj = { - context: context, - path: path, - request: request - }; - - let yield_; - let yieldCalled = false; - let finishYield; - if (typeof resolveContext.yield === "function") { - const old = resolveContext.yield; - yield_ = obj => { - old(obj); - yieldCalled = true; - }; - finishYield = result => { - if (result) yield_(result); - callback(null); - }; - } - - const message = `resolve '${request}' in '${path}'`; - - const finishResolved = result => { - return callback( - null, - result.path === false - ? false - : `${result.path.replace(/#/g, "\0#")}${ - result.query ? result.query.replace(/#/g, "\0#") : "" - }${result.fragment || ""}`, - result - ); - }; - - const finishWithoutResolve = log => { - /** - * @type {Error & {details?: string}} - */ - const error = new Error("Can't " + message); - error.details = log.join("\n"); - this.hooks.noResolve.call(obj, error); - return callback(error); - }; - - if (resolveContext.log) { - // We need log anyway to capture it in case of an error - const parentLog = resolveContext.log; - const log = []; - return this.doResolve( - this.hooks.resolve, - obj, - message, - { - log: msg => { - parentLog(msg); - log.push(msg); - }, - yield: yield_, - fileDependencies: resolveContext.fileDependencies, - contextDependencies: resolveContext.contextDependencies, - missingDependencies: resolveContext.missingDependencies, - stack: resolveContext.stack - }, - (err, result) => { - if (err) return callback(err); - - if (yieldCalled || (result && yield_)) return finishYield(result); - if (result) return finishResolved(result); - - return finishWithoutResolve(log); - } - ); - } else { - // Try to resolve assuming there is no error - // We don't log stuff in this case - return this.doResolve( - this.hooks.resolve, - obj, - message, - { - log: undefined, - yield: yield_, - fileDependencies: resolveContext.fileDependencies, - contextDependencies: resolveContext.contextDependencies, - missingDependencies: resolveContext.missingDependencies, - stack: resolveContext.stack - }, - (err, result) => { - if (err) return callback(err); - - if (yieldCalled || (result && yield_)) return finishYield(result); - if (result) return finishResolved(result); - - // log is missing for the error details - // so we redo the resolving for the log info - // this is more expensive to the success case - // is assumed by default - - const log = []; - - return this.doResolve( - this.hooks.resolve, - obj, - message, - { - log: msg => log.push(msg), - yield: yield_, - stack: resolveContext.stack - }, - (err, result) => { - if (err) return callback(err); - - // In a case that there is a race condition and yield will be called - if (yieldCalled || (result && yield_)) return finishYield(result); - - return finishWithoutResolve(log); - } - ); - } - ); - } - } - - doResolve(hook, request, message, resolveContext, callback) { - const stackEntry = Resolver.createStackEntry(hook, request); - - let newStack; - if (resolveContext.stack) { - newStack = new Set(resolveContext.stack); - if (resolveContext.stack.has(stackEntry)) { - /** - * Prevent recursion - * @type {Error & {recursion?: boolean}} - */ - const recursionError = new Error( - "Recursion in resolving\nStack:\n " + - Array.from(newStack).join("\n ") - ); - recursionError.recursion = true; - if (resolveContext.log) - resolveContext.log("abort resolving because of recursion"); - return callback(recursionError); - } - newStack.add(stackEntry); - } else { - newStack = new Set([stackEntry]); - } - this.hooks.resolveStep.call(hook, request); - - if (hook.isUsed()) { - const innerContext = createInnerContext( - { - log: resolveContext.log, - yield: resolveContext.yield, - fileDependencies: resolveContext.fileDependencies, - contextDependencies: resolveContext.contextDependencies, - missingDependencies: resolveContext.missingDependencies, - stack: newStack - }, - message - ); - return hook.callAsync(request, innerContext, (err, result) => { - if (err) return callback(err); - if (result) return callback(null, result); - callback(); - }); - } else { - callback(); - } - } - - /** - * @param {string} identifier identifier - * @returns {ParsedIdentifier} parsed identifier - */ - parse(identifier) { - const part = { - request: "", - query: "", - fragment: "", - module: false, - directory: false, - file: false, - internal: false - }; - - const parsedIdentifier = parseIdentifier(identifier); - - if (!parsedIdentifier) return part; - - [part.request, part.query, part.fragment] = parsedIdentifier; - - if (part.request.length > 0) { - part.internal = this.isPrivate(identifier); - part.module = this.isModule(part.request); - part.directory = this.isDirectory(part.request); - if (part.directory) { - part.request = part.request.substr(0, part.request.length - 1); - } - } - - return part; - } - - isModule(path) { - return getType(path) === PathType.Normal; - } - - isPrivate(path) { - return getType(path) === PathType.Internal; - } - - /** - * @param {string} path a path - * @returns {boolean} true, if the path is a directory path - */ - isDirectory(path) { - return path.endsWith("/"); - } - - join(path, request) { - return join(path, request); - } - - normalize(path) { - return normalize(path); - } -} - -module.exports = Resolver; - - -/***/ }), - -/***/ 34387: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const versions = (__webpack_require__(77282).versions); -const Resolver = __webpack_require__(22789); -const { getType, PathType } = __webpack_require__(448); - -const SyncAsyncFileSystemDecorator = __webpack_require__(62529); - -const AliasFieldPlugin = __webpack_require__(78032); -const AliasPlugin = __webpack_require__(52896); -const AppendPlugin = __webpack_require__(35565); -const ConditionalPlugin = __webpack_require__(49465); -const DescriptionFilePlugin = __webpack_require__(1938); -const DirectoryExistsPlugin = __webpack_require__(19599); -const ExportsFieldPlugin = __webpack_require__(54882); -const ExtensionAliasPlugin = __webpack_require__(41232); -const FileExistsPlugin = __webpack_require__(69141); -const ImportsFieldPlugin = __webpack_require__(22363); -const JoinRequestPartPlugin = __webpack_require__(78232); -const JoinRequestPlugin = __webpack_require__(84858); -const MainFieldPlugin = __webpack_require__(23365); -const ModulesInHierarchicalDirectoriesPlugin = __webpack_require__(42482); -const ModulesInRootPlugin = __webpack_require__(24714); -const NextPlugin = __webpack_require__(48689); -const ParsePlugin = __webpack_require__(29346); -const PnpPlugin = __webpack_require__(24370); -const RestrictionsPlugin = __webpack_require__(8065); -const ResultPlugin = __webpack_require__(79942); -const RootsPlugin = __webpack_require__(39329); -const SelfReferencePlugin = __webpack_require__(16402); -const SymlinkPlugin = __webpack_require__(2568); -const TryNextPlugin = __webpack_require__(36146); -const UnsafeCachePlugin = __webpack_require__(90828); -const UseFilePlugin = __webpack_require__(85487); - -/** @typedef {import("./AliasPlugin").AliasOption} AliasOptionEntry */ -/** @typedef {import("./ExtensionAliasPlugin").ExtensionAliasOption} ExtensionAliasOption */ -/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ -/** @typedef {import("./Resolver").FileSystem} FileSystem */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ - -/** @typedef {string|string[]|false} AliasOptionNewRequest */ -/** @typedef {{[k: string]: AliasOptionNewRequest}} AliasOptions */ -/** @typedef {{[k: string]: string|string[] }} ExtensionAliasOptions */ -/** @typedef {{apply: function(Resolver): void} | function(this: Resolver, Resolver): void} Plugin */ - -/** - * @typedef {Object} UserResolveOptions - * @property {(AliasOptions | AliasOptionEntry[])=} alias A list of module alias configurations or an object which maps key to value - * @property {(AliasOptions | AliasOptionEntry[])=} fallback A list of module alias configurations or an object which maps key to value, applied only after modules option - * @property {ExtensionAliasOptions=} extensionAlias An object which maps extension to extension aliases - * @property {(string | string[])[]=} aliasFields A list of alias fields in description files - * @property {(function(ResolveRequest): boolean)=} cachePredicate A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties. - * @property {boolean=} cacheWithContext Whether or not the unsafeCache should include request context as part of the cache key. - * @property {string[]=} descriptionFiles A list of description files to read from - * @property {string[]=} conditionNames A list of exports field condition names. - * @property {boolean=} enforceExtension Enforce that a extension from extensions must be used - * @property {(string | string[])[]=} exportsFields A list of exports fields in description files - * @property {(string | string[])[]=} importsFields A list of imports fields in description files - * @property {string[]=} extensions A list of extensions which should be tried for files - * @property {FileSystem} fileSystem The file system which should be used - * @property {(object | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests - * @property {boolean=} symlinks Resolve symlinks to their symlinked location - * @property {Resolver=} resolver A prepared Resolver to which the plugins are attached - * @property {string[] | string=} modules A list of directories to resolve modules from, can be absolute path or folder name - * @property {(string | string[] | {name: string | string[], forceRelative: boolean})[]=} mainFields A list of main fields in description files - * @property {string[]=} mainFiles A list of main files in directories - * @property {Plugin[]=} plugins A list of additional resolve plugins which should be applied - * @property {PnpApi | null=} pnpApi A PnP API that should be used - null is "never", undefined is "auto" - * @property {string[]=} roots A list of root paths - * @property {boolean=} fullySpecified The request is already fully specified and no extensions or directories are resolved for it - * @property {boolean=} resolveToContext Resolve to a context instead of a file - * @property {(string|RegExp)[]=} restrictions A list of resolve restrictions - * @property {boolean=} useSyncFileSystemCalls Use only the sync constraints of the file system calls - * @property {boolean=} preferRelative Prefer to resolve module requests as relative requests before falling back to modules - * @property {boolean=} preferAbsolute Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots - */ - -/** - * @typedef {Object} ResolveOptions - * @property {AliasOptionEntry[]} alias - * @property {AliasOptionEntry[]} fallback - * @property {Set} aliasFields - * @property {ExtensionAliasOption[]} extensionAlias - * @property {(function(ResolveRequest): boolean)} cachePredicate - * @property {boolean} cacheWithContext - * @property {Set} conditionNames A list of exports field condition names. - * @property {string[]} descriptionFiles - * @property {boolean} enforceExtension - * @property {Set} exportsFields - * @property {Set} importsFields - * @property {Set} extensions - * @property {FileSystem} fileSystem - * @property {object | false} unsafeCache - * @property {boolean} symlinks - * @property {Resolver=} resolver - * @property {Array} modules - * @property {{name: string[], forceRelative: boolean}[]} mainFields - * @property {Set} mainFiles - * @property {Plugin[]} plugins - * @property {PnpApi | null} pnpApi - * @property {Set} roots - * @property {boolean} fullySpecified - * @property {boolean} resolveToContext - * @property {Set} restrictions - * @property {boolean} preferRelative - * @property {boolean} preferAbsolute - */ - -/** - * @param {PnpApi | null=} option option - * @returns {PnpApi | null} processed option - */ -function processPnpApiOption(option) { - if ( - option === undefined && - /** @type {NodeJS.ProcessVersions & {pnp: string}} */ versions.pnp - ) { - // @ts-ignore - return __webpack_require__(35125); // eslint-disable-line node/no-missing-require - } - - return option || null; -} - -/** - * @param {AliasOptions | AliasOptionEntry[] | undefined} alias alias - * @returns {AliasOptionEntry[]} normalized aliases - */ -function normalizeAlias(alias) { - return typeof alias === "object" && !Array.isArray(alias) && alias !== null - ? Object.keys(alias).map(key => { - /** @type {AliasOptionEntry} */ - const obj = { name: key, onlyModule: false, alias: alias[key] }; - - if (/\$$/.test(key)) { - obj.onlyModule = true; - obj.name = key.substr(0, key.length - 1); - } - - return obj; - }) - : /** @type {Array} */ (alias) || []; -} - -/** - * @param {UserResolveOptions} options input options - * @returns {ResolveOptions} output options - */ -function createOptions(options) { - const mainFieldsSet = new Set(options.mainFields || ["main"]); - const mainFields = []; - - for (const item of mainFieldsSet) { - if (typeof item === "string") { - mainFields.push({ - name: [item], - forceRelative: true - }); - } else if (Array.isArray(item)) { - mainFields.push({ - name: item, - forceRelative: true - }); - } else { - mainFields.push({ - name: Array.isArray(item.name) ? item.name : [item.name], - forceRelative: item.forceRelative - }); - } - } - - return { - alias: normalizeAlias(options.alias), - fallback: normalizeAlias(options.fallback), - aliasFields: new Set(options.aliasFields), - cachePredicate: - options.cachePredicate || - function () { - return true; - }, - cacheWithContext: - typeof options.cacheWithContext !== "undefined" - ? options.cacheWithContext - : true, - exportsFields: new Set(options.exportsFields || ["exports"]), - importsFields: new Set(options.importsFields || ["imports"]), - conditionNames: new Set(options.conditionNames), - descriptionFiles: Array.from( - new Set(options.descriptionFiles || ["package.json"]) - ), - enforceExtension: - options.enforceExtension === undefined - ? options.extensions && options.extensions.includes("") - ? true - : false - : options.enforceExtension, - extensions: new Set(options.extensions || [".js", ".json", ".node"]), - extensionAlias: options.extensionAlias - ? Object.keys(options.extensionAlias).map(k => ({ - extension: k, - alias: /** @type {ExtensionAliasOptions} */ (options.extensionAlias)[ - k - ] - })) - : [], - fileSystem: options.useSyncFileSystemCalls - ? new SyncAsyncFileSystemDecorator( - /** @type {SyncFileSystem} */ ( - /** @type {unknown} */ (options.fileSystem) - ) - ) - : options.fileSystem, - unsafeCache: - options.unsafeCache && typeof options.unsafeCache !== "object" - ? {} - : options.unsafeCache || false, - symlinks: typeof options.symlinks !== "undefined" ? options.symlinks : true, - resolver: options.resolver, - modules: mergeFilteredToArray( - Array.isArray(options.modules) - ? options.modules - : options.modules - ? [options.modules] - : ["node_modules"], - item => { - const type = getType(item); - return type === PathType.Normal || type === PathType.Relative; - } - ), - mainFields, - mainFiles: new Set(options.mainFiles || ["index"]), - plugins: options.plugins || [], - pnpApi: processPnpApiOption(options.pnpApi), - roots: new Set(options.roots || undefined), - fullySpecified: options.fullySpecified || false, - resolveToContext: options.resolveToContext || false, - preferRelative: options.preferRelative || false, - preferAbsolute: options.preferAbsolute || false, - restrictions: new Set(options.restrictions) - }; -} - -/** - * @param {UserResolveOptions} options resolve options - * @returns {Resolver} created resolver - */ -exports.createResolver = function (options) { - const normalizedOptions = createOptions(options); - - const { - alias, - fallback, - aliasFields, - cachePredicate, - cacheWithContext, - conditionNames, - descriptionFiles, - enforceExtension, - exportsFields, - extensionAlias, - importsFields, - extensions, - fileSystem, - fullySpecified, - mainFields, - mainFiles, - modules, - plugins: userPlugins, - pnpApi, - resolveToContext, - preferRelative, - preferAbsolute, - symlinks, - unsafeCache, - resolver: customResolver, - restrictions, - roots - } = normalizedOptions; - - const plugins = userPlugins.slice(); - - const resolver = customResolver - ? customResolver - : new Resolver(fileSystem, normalizedOptions); - - //// pipeline //// - - resolver.ensureHook("resolve"); - resolver.ensureHook("internalResolve"); - resolver.ensureHook("newInternalResolve"); - resolver.ensureHook("parsedResolve"); - resolver.ensureHook("describedResolve"); - resolver.ensureHook("rawResolve"); - resolver.ensureHook("normalResolve"); - resolver.ensureHook("internal"); - resolver.ensureHook("rawModule"); - resolver.ensureHook("module"); - resolver.ensureHook("resolveAsModule"); - resolver.ensureHook("undescribedResolveInPackage"); - resolver.ensureHook("resolveInPackage"); - resolver.ensureHook("resolveInExistingDirectory"); - resolver.ensureHook("relative"); - resolver.ensureHook("describedRelative"); - resolver.ensureHook("directory"); - resolver.ensureHook("undescribedExistingDirectory"); - resolver.ensureHook("existingDirectory"); - resolver.ensureHook("undescribedRawFile"); - resolver.ensureHook("rawFile"); - resolver.ensureHook("file"); - resolver.ensureHook("finalFile"); - resolver.ensureHook("existingFile"); - resolver.ensureHook("resolved"); - - // TODO remove in next major - // cspell:word Interal - // Backward-compat - resolver.hooks.newInteralResolve = resolver.hooks.newInternalResolve; - - // resolve - for (const { source, resolveOptions } of [ - { source: "resolve", resolveOptions: { fullySpecified } }, - { source: "internal-resolve", resolveOptions: { fullySpecified: false } } - ]) { - if (unsafeCache) { - plugins.push( - new UnsafeCachePlugin( - source, - cachePredicate, - unsafeCache, - cacheWithContext, - `new-${source}` - ) - ); - plugins.push( - new ParsePlugin(`new-${source}`, resolveOptions, "parsed-resolve") - ); - } else { - plugins.push(new ParsePlugin(source, resolveOptions, "parsed-resolve")); - } - } - - // parsed-resolve - plugins.push( - new DescriptionFilePlugin( - "parsed-resolve", - descriptionFiles, - false, - "described-resolve" - ) - ); - plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve")); - - // described-resolve - plugins.push(new NextPlugin("described-resolve", "raw-resolve")); - if (fallback.length > 0) { - plugins.push( - new AliasPlugin("described-resolve", fallback, "internal-resolve") - ); - } - - // raw-resolve - if (alias.length > 0) { - plugins.push(new AliasPlugin("raw-resolve", alias, "internal-resolve")); - } - aliasFields.forEach(item => { - plugins.push(new AliasFieldPlugin("raw-resolve", item, "internal-resolve")); - }); - extensionAlias.forEach(item => - plugins.push( - new ExtensionAliasPlugin("raw-resolve", item, "normal-resolve") - ) - ); - plugins.push(new NextPlugin("raw-resolve", "normal-resolve")); - - // normal-resolve - if (preferRelative) { - plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); - } - plugins.push( - new ConditionalPlugin( - "after-normal-resolve", - { module: true }, - "resolve as module", - false, - "raw-module" - ) - ); - plugins.push( - new ConditionalPlugin( - "after-normal-resolve", - { internal: true }, - "resolve as internal import", - false, - "internal" - ) - ); - if (preferAbsolute) { - plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); - } - if (roots.size > 0) { - plugins.push(new RootsPlugin("after-normal-resolve", roots, "relative")); - } - if (!preferRelative && !preferAbsolute) { - plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); - } - - // internal - importsFields.forEach(importsField => { - plugins.push( - new ImportsFieldPlugin( - "internal", - conditionNames, - importsField, - "relative", - "internal-resolve" - ) - ); - }); - - // raw-module - exportsFields.forEach(exportsField => { - plugins.push( - new SelfReferencePlugin("raw-module", exportsField, "resolve-as-module") - ); - }); - modules.forEach(item => { - if (Array.isArray(item)) { - if (item.includes("node_modules") && pnpApi) { - plugins.push( - new ModulesInHierarchicalDirectoriesPlugin( - "raw-module", - item.filter(i => i !== "node_modules"), - "module" - ) - ); - plugins.push( - new PnpPlugin("raw-module", pnpApi, "undescribed-resolve-in-package") - ); - } else { - plugins.push( - new ModulesInHierarchicalDirectoriesPlugin( - "raw-module", - item, - "module" - ) - ); - } - } else { - plugins.push(new ModulesInRootPlugin("raw-module", item, "module")); - } - }); - - // module - plugins.push(new JoinRequestPartPlugin("module", "resolve-as-module")); - - // resolve-as-module - if (!resolveToContext) { - plugins.push( - new ConditionalPlugin( - "resolve-as-module", - { directory: false, request: "." }, - "single file module", - true, - "undescribed-raw-file" - ) - ); - } - plugins.push( - new DirectoryExistsPlugin( - "resolve-as-module", - "undescribed-resolve-in-package" - ) - ); - - // undescribed-resolve-in-package - plugins.push( - new DescriptionFilePlugin( - "undescribed-resolve-in-package", - descriptionFiles, - false, - "resolve-in-package" - ) - ); - plugins.push( - new NextPlugin("after-undescribed-resolve-in-package", "resolve-in-package") - ); - - // resolve-in-package - exportsFields.forEach(exportsField => { - plugins.push( - new ExportsFieldPlugin( - "resolve-in-package", - conditionNames, - exportsField, - "relative" - ) - ); - }); - plugins.push( - new NextPlugin("resolve-in-package", "resolve-in-existing-directory") - ); - - // resolve-in-existing-directory - plugins.push( - new JoinRequestPlugin("resolve-in-existing-directory", "relative") - ); - - // relative - plugins.push( - new DescriptionFilePlugin( - "relative", - descriptionFiles, - true, - "described-relative" - ) - ); - plugins.push(new NextPlugin("after-relative", "described-relative")); - - // described-relative - if (resolveToContext) { - plugins.push(new NextPlugin("described-relative", "directory")); - } else { - plugins.push( - new ConditionalPlugin( - "described-relative", - { directory: false }, - null, - true, - "raw-file" - ) - ); - plugins.push( - new ConditionalPlugin( - "described-relative", - { fullySpecified: false }, - "as directory", - true, - "directory" - ) - ); - } - - // directory - plugins.push( - new DirectoryExistsPlugin("directory", "undescribed-existing-directory") - ); - - if (resolveToContext) { - // undescribed-existing-directory - plugins.push(new NextPlugin("undescribed-existing-directory", "resolved")); - } else { - // undescribed-existing-directory - plugins.push( - new DescriptionFilePlugin( - "undescribed-existing-directory", - descriptionFiles, - false, - "existing-directory" - ) - ); - mainFiles.forEach(item => { - plugins.push( - new UseFilePlugin( - "undescribed-existing-directory", - item, - "undescribed-raw-file" - ) - ); - }); - - // described-existing-directory - mainFields.forEach(item => { - plugins.push( - new MainFieldPlugin( - "existing-directory", - item, - "resolve-in-existing-directory" - ) - ); - }); - mainFiles.forEach(item => { - plugins.push( - new UseFilePlugin("existing-directory", item, "undescribed-raw-file") - ); - }); - - // undescribed-raw-file - plugins.push( - new DescriptionFilePlugin( - "undescribed-raw-file", - descriptionFiles, - true, - "raw-file" - ) - ); - plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file")); - - // raw-file - plugins.push( - new ConditionalPlugin( - "raw-file", - { fullySpecified: true }, - null, - false, - "file" - ) - ); - if (!enforceExtension) { - plugins.push(new TryNextPlugin("raw-file", "no extension", "file")); - } - extensions.forEach(item => { - plugins.push(new AppendPlugin("raw-file", item, "file")); - }); - - // file - if (alias.length > 0) - plugins.push(new AliasPlugin("file", alias, "internal-resolve")); - aliasFields.forEach(item => { - plugins.push(new AliasFieldPlugin("file", item, "internal-resolve")); - }); - plugins.push(new NextPlugin("file", "final-file")); - - // final-file - plugins.push(new FileExistsPlugin("final-file", "existing-file")); - - // existing-file - if (symlinks) - plugins.push(new SymlinkPlugin("existing-file", "existing-file")); - plugins.push(new NextPlugin("existing-file", "resolved")); - } - - // resolved - if (restrictions.size > 0) { - plugins.push(new RestrictionsPlugin(resolver.hooks.resolved, restrictions)); - } - plugins.push(new ResultPlugin(resolver.hooks.resolved)); - - //// RESOLVER //// - - for (const plugin of plugins) { - if (typeof plugin === "function") { - plugin.call(resolver, resolver); - } else { - plugin.apply(resolver); - } - } - - return resolver; -}; - -/** - * Merging filtered elements - * @param {string[]} array source array - * @param {function(string): boolean} filter predicate - * @returns {Array} merge result - */ -function mergeFilteredToArray(array, filter) { - /** @type {Array} */ - const result = []; - const set = new Set(array); - - for (const item of set) { - if (filter(item)) { - const lastElement = - result.length > 0 ? result[result.length - 1] : undefined; - if (Array.isArray(lastElement)) { - lastElement.push(item); - } else { - result.push([item]); - } - } else { - result.push(item); - } - } - - return result; -} - - -/***/ }), - -/***/ 8065: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -const slashCode = "/".charCodeAt(0); -const backslashCode = "\\".charCodeAt(0); - -const isInside = (path, parent) => { - if (!path.startsWith(parent)) return false; - if (path.length === parent.length) return true; - const charCode = path.charCodeAt(parent.length); - return charCode === slashCode || charCode === backslashCode; -}; - -module.exports = class RestrictionsPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {Set} restrictions restrictions - */ - constructor(source, restrictions) { - this.source = source; - this.restrictions = restrictions; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - resolver - .getHook(this.source) - .tapAsync("RestrictionsPlugin", (request, resolveContext, callback) => { - if (typeof request.path === "string") { - const path = request.path; - for (const rule of this.restrictions) { - if (typeof rule === "string") { - if (!isInside(path, rule)) { - if (resolveContext.log) { - resolveContext.log( - `${path} is not inside of the restriction ${rule}` - ); - } - return callback(null, null); - } - } else if (!rule.test(path)) { - if (resolveContext.log) { - resolveContext.log( - `${path} doesn't match the restriction ${rule}` - ); - } - return callback(null, null); - } - } - } - - callback(); - }); - } -}; - - -/***/ }), - -/***/ 79942: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class ResultPlugin { - /** - * @param {ResolveStepHook} source source - */ - constructor(source) { - this.source = source; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - this.source.tapAsync( - "ResultPlugin", - (request, resolverContext, callback) => { - const obj = { ...request }; - if (resolverContext.log) - resolverContext.log("reporting result " + obj.path); - resolver.hooks.result.callAsync(obj, resolverContext, err => { - if (err) return callback(err); - if (typeof resolverContext.yield === "function") { - resolverContext.yield(obj); - callback(null, null); - } else { - callback(null, obj); - } - }); - } - ); - } -}; - - -/***/ }), - -/***/ 39329: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const forEachBail = __webpack_require__(94968); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -class RootsPlugin { - /** - * @param {string | ResolveStepHook} source source hook - * @param {Set} roots roots - * @param {string | ResolveStepHook} target target hook - */ - constructor(source, roots, target) { - this.roots = Array.from(roots); - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - - resolver - .getHook(this.source) - .tapAsync("RootsPlugin", (request, resolveContext, callback) => { - const req = request.request; - if (!req) return callback(); - if (!req.startsWith("/")) return callback(); - - forEachBail( - this.roots, - (root, callback) => { - const path = resolver.join(root, req.slice(1)); - const obj = { - ...request, - path, - relativePath: request.relativePath && path - }; - resolver.doResolve( - target, - obj, - `root path ${root}`, - resolveContext, - callback - ); - }, - callback - ); - }); - } -} - -module.exports = RootsPlugin; - - -/***/ }), - -/***/ 16402: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DescriptionFileUtils = __webpack_require__(65746); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -const slashCode = "/".charCodeAt(0); - -module.exports = class SelfReferencePlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | string[]} fieldNamePath name path - * @param {string | ResolveStepHook} target target - */ - constructor(source, fieldNamePath, target) { - this.source = source; - this.target = target; - this.fieldName = fieldNamePath; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("SelfReferencePlugin", (request, resolveContext, callback) => { - if (!request.descriptionFilePath) return callback(); - - const req = request.request; - if (!req) return callback(); - - // Feature is only enabled when an exports field is present - const exportsField = DescriptionFileUtils.getField( - request.descriptionFileData, - this.fieldName - ); - if (!exportsField) return callback(); - - const name = DescriptionFileUtils.getField( - request.descriptionFileData, - "name" - ); - if (typeof name !== "string") return callback(); - - if ( - req.startsWith(name) && - (req.length === name.length || - req.charCodeAt(name.length) === slashCode) - ) { - const remainingRequest = `.${req.slice(name.length)}`; - - const obj = { - ...request, - request: remainingRequest, - path: /** @type {string} */ (request.descriptionFileRoot), - relativePath: "." - }; - - resolver.doResolve( - target, - obj, - "self reference", - resolveContext, - callback - ); - } else { - return callback(); - } - }); - } -}; - - -/***/ }), - -/***/ 2568: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const forEachBail = __webpack_require__(94968); -const getPaths = __webpack_require__(74689); -const { getType, PathType } = __webpack_require__(448); - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class SymlinkPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string | ResolveStepHook} target target - */ - constructor(source, target) { - this.source = source; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - const fs = resolver.fileSystem; - resolver - .getHook(this.source) - .tapAsync("SymlinkPlugin", (request, resolveContext, callback) => { - if (request.ignoreSymlinks) return callback(); - const pathsResult = getPaths(request.path); - const pathSegments = pathsResult.segments; - const paths = pathsResult.paths; - - let containsSymlink = false; - let idx = -1; - forEachBail( - paths, - (path, callback) => { - idx++; - if (resolveContext.fileDependencies) - resolveContext.fileDependencies.add(path); - fs.readlink(path, (err, result) => { - if (!err && result) { - pathSegments[idx] = result; - containsSymlink = true; - // Shortcut when absolute symlink found - const resultType = getType(result.toString()); - if ( - resultType === PathType.AbsoluteWin || - resultType === PathType.AbsolutePosix - ) { - return callback(null, idx); - } - } - callback(); - }); - }, - (err, idx) => { - if (!containsSymlink) return callback(); - const resultSegments = - typeof idx === "number" - ? pathSegments.slice(0, idx + 1) - : pathSegments.slice(); - const result = resultSegments.reduceRight((a, b) => { - return resolver.join(a, b); - }); - const obj = { - ...request, - path: result - }; - resolver.doResolve( - target, - obj, - "resolved symlink to " + result, - resolveContext, - callback - ); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 62529: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver").FileSystem} FileSystem */ -/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ - -/** - * @param {SyncFileSystem} fs file system implementation - * @constructor - */ -function SyncAsyncFileSystemDecorator(fs) { - this.fs = fs; - - this.lstat = undefined; - this.lstatSync = undefined; - const lstatSync = fs.lstatSync; - if (lstatSync) { - this.lstat = (arg, options, callback) => { - let result; - try { - result = lstatSync.call(fs, arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - this.lstatSync = (arg, options) => lstatSync.call(fs, arg, options); - } - - this.stat = (arg, options, callback) => { - let result; - try { - result = callback ? fs.statSync(arg, options) : fs.statSync(arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - this.statSync = (arg, options) => fs.statSync(arg, options); - - this.readdir = (arg, options, callback) => { - let result; - try { - result = fs.readdirSync(arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - this.readdirSync = (arg, options) => fs.readdirSync(arg, options); - - this.readFile = (arg, options, callback) => { - let result; - try { - result = fs.readFileSync(arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - this.readFileSync = (arg, options) => fs.readFileSync(arg, options); - - this.readlink = (arg, options, callback) => { - let result; - try { - result = fs.readlinkSync(arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - this.readlinkSync = (arg, options) => fs.readlinkSync(arg, options); - - this.readJson = undefined; - this.readJsonSync = undefined; - const readJsonSync = fs.readJsonSync; - if (readJsonSync) { - this.readJson = (arg, options, callback) => { - let result; - try { - result = readJsonSync.call(fs, arg); - } catch (e) { - return (callback || options)(e); - } - (callback || options)(null, result); - }; - - this.readJsonSync = (arg, options) => readJsonSync.call(fs, arg, options); - } -} -module.exports = SyncAsyncFileSystemDecorator; - - -/***/ }), - -/***/ 36146: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class TryNextPlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string} message message - * @param {string | ResolveStepHook} target target - */ - constructor(source, message, target) { - this.source = source; - this.message = message; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("TryNextPlugin", (request, resolveContext, callback) => { - resolver.doResolve( - target, - request, - this.message, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 90828: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ -/** @typedef {{[k: string]: any}} Cache */ - -function getCacheId(type, request, withContext) { - return JSON.stringify({ - type, - context: withContext ? request.context : "", - path: request.path, - query: request.query, - fragment: request.fragment, - request: request.request - }); -} - -module.exports = class UnsafeCachePlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {function(ResolveRequest): boolean} filterPredicate filterPredicate - * @param {Cache} cache cache - * @param {boolean} withContext withContext - * @param {string | ResolveStepHook} target target - */ - constructor(source, filterPredicate, cache, withContext, target) { - this.source = source; - this.filterPredicate = filterPredicate; - this.withContext = withContext; - this.cache = cache; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("UnsafeCachePlugin", (request, resolveContext, callback) => { - if (!this.filterPredicate(request)) return callback(); - const isYield = typeof resolveContext.yield === "function"; - const cacheId = getCacheId( - isYield ? "yield" : "default", - request, - this.withContext - ); - const cacheEntry = this.cache[cacheId]; - if (cacheEntry) { - if (isYield) { - const yield_ = /** @type {Function} */ (resolveContext.yield); - if (Array.isArray(cacheEntry)) { - for (const result of cacheEntry) yield_(result); - } else { - yield_(cacheEntry); - } - return callback(null, null); - } - return callback(null, cacheEntry); - } - - let yieldFn; - let yield_; - const yieldResult = []; - if (isYield) { - yieldFn = resolveContext.yield; - yield_ = result => { - yieldResult.push(result); - }; - } - - resolver.doResolve( - target, - request, - null, - yield_ ? { ...resolveContext, yield: yield_ } : resolveContext, - (err, result) => { - if (err) return callback(err); - if (isYield) { - if (result) yieldResult.push(result); - for (const result of yieldResult) yieldFn(result); - this.cache[cacheId] = yieldResult; - return callback(null, null); - } - if (result) return callback(null, (this.cache[cacheId] = result)); - callback(); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 85487: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ - -module.exports = class UseFilePlugin { - /** - * @param {string | ResolveStepHook} source source - * @param {string} filename filename - * @param {string | ResolveStepHook} target target - */ - constructor(source, filename, target) { - this.source = source; - this.filename = filename; - this.target = target; - } - - /** - * @param {Resolver} resolver the resolver - * @returns {void} - */ - apply(resolver) { - const target = resolver.ensureHook(this.target); - resolver - .getHook(this.source) - .tapAsync("UseFilePlugin", (request, resolveContext, callback) => { - const filePath = resolver.join(request.path, this.filename); - const obj = { - ...request, - path: filePath, - relativePath: - request.relativePath && - resolver.join(request.relativePath, this.filename) - }; - resolver.doResolve( - target, - obj, - "using path: " + filePath, - resolveContext, - callback - ); - }); - } -}; - - -/***/ }), - -/***/ 1655: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -module.exports = function createInnerContext( - options, - message, - messageOptional -) { - let messageReported = false; - let innerLog = undefined; - if (options.log) { - if (message) { - innerLog = msg => { - if (!messageReported) { - options.log(message); - messageReported = true; - } - options.log(" " + msg); - }; - } else { - innerLog = options.log; - } - } - const childContext = { - log: innerLog, - yield: options.yield, - fileDependencies: options.fileDependencies, - contextDependencies: options.contextDependencies, - missingDependencies: options.missingDependencies, - stack: options.stack - }; - return childContext; -}; - - -/***/ }), - -/***/ 94968: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -module.exports = function forEachBail(array, iterator, callback) { - if (array.length === 0) return callback(); - - let i = 0; - const next = () => { - let loop = undefined; - iterator(array[i++], (err, result) => { - if (err || result !== undefined || i >= array.length) { - return callback(err, result); - } - if (loop === false) while (next()); - loop = true; - }); - if (!loop) loop = false; - return loop; - }; - while (next()); -}; - - -/***/ }), - -/***/ 30613: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -module.exports = function getInnerRequest(resolver, request) { - if ( - typeof request.__innerRequest === "string" && - request.__innerRequest_request === request.request && - request.__innerRequest_relativePath === request.relativePath - ) - return request.__innerRequest; - let innerRequest; - if (request.request) { - innerRequest = request.request; - if (/^\.\.?(?:\/|$)/.test(innerRequest) && request.relativePath) { - innerRequest = resolver.join(request.relativePath, innerRequest); - } - } else { - innerRequest = request.relativePath; - } - request.__innerRequest_request = request.request; - request.__innerRequest_relativePath = request.relativePath; - return (request.__innerRequest = innerRequest); -}; - - -/***/ }), - -/***/ 74689: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -module.exports = function getPaths(path) { - if (path === "/") return { paths: ["/"], segments: [""] }; - const parts = path.split(/(.*?[\\/]+)/); - const paths = [path]; - const segments = [parts[parts.length - 1]]; - let part = parts[parts.length - 1]; - path = path.substr(0, path.length - part.length - 1); - for (let i = parts.length - 2; i > 2; i -= 2) { - paths.push(path); - part = parts[i]; - path = path.substr(0, path.length - part.length) || "/"; - segments.push(part.substr(0, part.length - 1)); - } - part = parts[1]; - segments.push(part); - paths.push(part); - return { - paths: paths, - segments: segments - }; -}; - -module.exports.basename = function basename(path) { - const i = path.lastIndexOf("/"), - j = path.lastIndexOf("\\"); - const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; - if (p < 0) return null; - const s = path.substr(p + 1); - return s; -}; - - -/***/ }), - -/***/ 958: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const fs = __webpack_require__(41653); -const CachedInputFileSystem = __webpack_require__(28754); -const ResolverFactory = __webpack_require__(34387); - -/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ -/** @typedef {import("./Resolver")} Resolver */ -/** @typedef {import("./Resolver").FileSystem} FileSystem */ -/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ -/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ -/** @typedef {import("./ResolverFactory").Plugin} Plugin */ -/** @typedef {import("./ResolverFactory").UserResolveOptions} ResolveOptions */ - -const nodeFileSystem = new CachedInputFileSystem(fs, 4000); - -const nodeContext = { - environments: ["node+es3+es5+process+native"] -}; - -const asyncResolver = ResolverFactory.createResolver({ - conditionNames: ["node"], - extensions: [".js", ".json", ".node"], - fileSystem: nodeFileSystem -}); -function resolve(context, path, request, resolveContext, callback) { - if (typeof context === "string") { - callback = resolveContext; - resolveContext = request; - request = path; - path = context; - context = nodeContext; - } - if (typeof callback !== "function") { - callback = resolveContext; - } - asyncResolver.resolve(context, path, request, resolveContext, callback); -} - -const syncResolver = ResolverFactory.createResolver({ - conditionNames: ["node"], - extensions: [".js", ".json", ".node"], - useSyncFileSystemCalls: true, - fileSystem: nodeFileSystem -}); -function resolveSync(context, path, request) { - if (typeof context === "string") { - request = path; - path = context; - context = nodeContext; - } - return syncResolver.resolveSync(context, path, request); -} - -function create(options) { - options = { - fileSystem: nodeFileSystem, - ...options - }; - const resolver = ResolverFactory.createResolver(options); - return function (context, path, request, resolveContext, callback) { - if (typeof context === "string") { - callback = resolveContext; - resolveContext = request; - request = path; - path = context; - context = nodeContext; - } - if (typeof callback !== "function") { - callback = resolveContext; - } - resolver.resolve(context, path, request, resolveContext, callback); - }; -} - -function createSync(options) { - options = { - useSyncFileSystemCalls: true, - fileSystem: nodeFileSystem, - ...options - }; - const resolver = ResolverFactory.createResolver(options); - return function (context, path, request) { - if (typeof context === "string") { - request = path; - path = context; - context = nodeContext; - } - return resolver.resolveSync(context, path, request); - }; -} - -/** - * @template A - * @template B - * @param {A} obj input a - * @param {B} exports input b - * @returns {A & B} merged - */ -const mergeExports = (obj, exports) => { - const descriptors = Object.getOwnPropertyDescriptors(exports); - Object.defineProperties(obj, descriptors); - return /** @type {A & B} */ (Object.freeze(obj)); -}; - -module.exports = mergeExports(resolve, { - get sync() { - return resolveSync; - }, - create: mergeExports(create, { - get sync() { - return createSync; - } - }), - ResolverFactory, - CachedInputFileSystem, - get CloneBasenamePlugin() { - return __webpack_require__(71975); - }, - get LogInfoPlugin() { - return __webpack_require__(51492); - }, - get forEachBail() { - return __webpack_require__(94968); - } -}); - - -/***/ }), - -/***/ 60367: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -/** @typedef {string|(string|ConditionalMapping)[]} DirectMapping */ -/** @typedef {{[k: string]: MappingValue}} ConditionalMapping */ -/** @typedef {ConditionalMapping|DirectMapping|null} MappingValue */ -/** @typedef {Record|ConditionalMapping|DirectMapping} ExportsField */ -/** @typedef {Record} ImportsField */ - -/** - * @typedef {Object} PathTreeNode - * @property {Map|null} children - * @property {MappingValue} folder - * @property {Map|null} wildcards - * @property {Map} files - */ - -/** - * Processing exports/imports field - * @callback FieldProcessor - * @param {string} request request - * @param {Set} conditionNames condition names - * @returns {string[]} resolved paths - */ - -/* -Example exports field: -{ - ".": "./main.js", - "./feature": { - "browser": "./feature-browser.js", - "default": "./feature.js" - } -} -Terminology: - -Enhanced-resolve name keys ("." and "./feature") as exports field keys. - -If value is string or string[], mapping is called as a direct mapping -and value called as a direct export. - -If value is key-value object, mapping is called as a conditional mapping -and value called as a conditional export. - -Key in conditional mapping is called condition name. - -Conditional mapping nested in another conditional mapping is called nested mapping. - ----------- - -Example imports field: -{ - "#a": "./main.js", - "#moment": { - "browser": "./moment/index.js", - "default": "moment" - }, - "#moment/": { - "browser": "./moment/", - "default": "moment/" - } -} -Terminology: - -Enhanced-resolve name keys ("#a" and "#moment/", "#moment") as imports field keys. - -If value is string or string[], mapping is called as a direct mapping -and value called as a direct export. - -If value is key-value object, mapping is called as a conditional mapping -and value called as a conditional export. - -Key in conditional mapping is called condition name. - -Conditional mapping nested in another conditional mapping is called nested mapping. - -*/ - -const slashCode = "/".charCodeAt(0); -const dotCode = ".".charCodeAt(0); -const hashCode = "#".charCodeAt(0); - -/** - * @param {ExportsField} exportsField the exports field - * @returns {FieldProcessor} process callback - */ -module.exports.processExportsField = function processExportsField( - exportsField -) { - return createFieldProcessor( - buildExportsFieldPathTree(exportsField), - assertExportsFieldRequest, - assertExportTarget - ); -}; - -/** - * @param {ImportsField} importsField the exports field - * @returns {FieldProcessor} process callback - */ -module.exports.processImportsField = function processImportsField( - importsField -) { - return createFieldProcessor( - buildImportsFieldPathTree(importsField), - assertImportsFieldRequest, - assertImportTarget - ); -}; - -/** - * @param {PathTreeNode} treeRoot root - * @param {(s: string) => string} assertRequest assertRequest - * @param {(s: string, f: boolean) => void} assertTarget assertTarget - * @returns {FieldProcessor} field processor - */ -function createFieldProcessor(treeRoot, assertRequest, assertTarget) { - return function fieldProcessor(request, conditionNames) { - request = assertRequest(request); - - const match = findMatch(request, treeRoot); - - if (match === null) return []; - - const [mapping, remainRequestIndex] = match; - - /** @type {DirectMapping|null} */ - let direct = null; - - if (isConditionalMapping(mapping)) { - direct = conditionalMapping( - /** @type {ConditionalMapping} */ (mapping), - conditionNames - ); - - // matching not found - if (direct === null) return []; - } else { - direct = /** @type {DirectMapping} */ (mapping); - } - - const remainingRequest = - remainRequestIndex === request.length + 1 - ? undefined - : remainRequestIndex < 0 - ? request.slice(-remainRequestIndex - 1) - : request.slice(remainRequestIndex); - - return directMapping( - remainingRequest, - remainRequestIndex < 0, - direct, - conditionNames, - assertTarget - ); - }; -} - -/** - * @param {string} request request - * @returns {string} updated request - */ -function assertExportsFieldRequest(request) { - if (request.charCodeAt(0) !== dotCode) { - throw new Error('Request should be relative path and start with "."'); - } - if (request.length === 1) return ""; - if (request.charCodeAt(1) !== slashCode) { - throw new Error('Request should be relative path and start with "./"'); - } - if (request.charCodeAt(request.length - 1) === slashCode) { - throw new Error("Only requesting file allowed"); - } - - return request.slice(2); -} - -/** - * @param {string} request request - * @returns {string} updated request - */ -function assertImportsFieldRequest(request) { - if (request.charCodeAt(0) !== hashCode) { - throw new Error('Request should start with "#"'); - } - if (request.length === 1) { - throw new Error("Request should have at least 2 characters"); - } - if (request.charCodeAt(1) === slashCode) { - throw new Error('Request should not start with "#/"'); - } - if (request.charCodeAt(request.length - 1) === slashCode) { - throw new Error("Only requesting file allowed"); - } - - return request.slice(1); -} - -/** - * @param {string} exp export target - * @param {boolean} expectFolder is folder expected - */ -function assertExportTarget(exp, expectFolder) { - if ( - exp.charCodeAt(0) === slashCode || - (exp.charCodeAt(0) === dotCode && exp.charCodeAt(1) !== slashCode) - ) { - throw new Error( - `Export should be relative path and start with "./", got ${JSON.stringify( - exp - )}.` - ); - } - - const isFolder = exp.charCodeAt(exp.length - 1) === slashCode; - - if (isFolder !== expectFolder) { - throw new Error( - expectFolder - ? `Expecting folder to folder mapping. ${JSON.stringify( - exp - )} should end with "/"` - : `Expecting file to file mapping. ${JSON.stringify( - exp - )} should not end with "/"` - ); - } -} - -/** - * @param {string} imp import target - * @param {boolean} expectFolder is folder expected - */ -function assertImportTarget(imp, expectFolder) { - const isFolder = imp.charCodeAt(imp.length - 1) === slashCode; - - if (isFolder !== expectFolder) { - throw new Error( - expectFolder - ? `Expecting folder to folder mapping. ${JSON.stringify( - imp - )} should end with "/"` - : `Expecting file to file mapping. ${JSON.stringify( - imp - )} should not end with "/"` - ); - } -} - -/** - * Trying to match request to field - * @param {string} request request - * @param {PathTreeNode} treeRoot path tree root - * @returns {[MappingValue, number]|null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings - */ -function findMatch(request, treeRoot) { - if (request.length === 0) { - const value = treeRoot.files.get(""); - - return value ? [value, 1] : null; - } - - if ( - treeRoot.children === null && - treeRoot.folder === null && - treeRoot.wildcards === null - ) { - const value = treeRoot.files.get(request); - - return value ? [value, request.length + 1] : null; - } - - let node = treeRoot; - let lastNonSlashIndex = 0; - let slashIndex = request.indexOf("/", 0); - - /** @type {[MappingValue, number]|null} */ - let lastFolderMatch = null; - - const applyFolderMapping = () => { - const folderMapping = node.folder; - if (folderMapping) { - if (lastFolderMatch) { - lastFolderMatch[0] = folderMapping; - lastFolderMatch[1] = -lastNonSlashIndex - 1; - } else { - lastFolderMatch = [folderMapping, -lastNonSlashIndex - 1]; - } - } - }; - - const applyWildcardMappings = (wildcardMappings, remainingRequest) => { - if (wildcardMappings) { - for (const [key, target] of wildcardMappings) { - if (remainingRequest.startsWith(key)) { - if (!lastFolderMatch) { - lastFolderMatch = [target, lastNonSlashIndex + key.length]; - } else if (lastFolderMatch[1] < lastNonSlashIndex + key.length) { - lastFolderMatch[0] = target; - lastFolderMatch[1] = lastNonSlashIndex + key.length; - } - } - } - } - }; - - while (slashIndex !== -1) { - applyFolderMapping(); - - const wildcardMappings = node.wildcards; - - if (!wildcardMappings && node.children === null) return lastFolderMatch; - - const folder = request.slice(lastNonSlashIndex, slashIndex); - - applyWildcardMappings(wildcardMappings, folder); - - if (node.children === null) return lastFolderMatch; - - const newNode = node.children.get(folder); - - if (!newNode) { - return lastFolderMatch; - } - - node = newNode; - lastNonSlashIndex = slashIndex + 1; - slashIndex = request.indexOf("/", lastNonSlashIndex); - } - - const remainingRequest = - lastNonSlashIndex > 0 ? request.slice(lastNonSlashIndex) : request; - - const value = node.files.get(remainingRequest); - - if (value) { - return [value, request.length + 1]; - } - - applyFolderMapping(); - - applyWildcardMappings(node.wildcards, remainingRequest); - - return lastFolderMatch; -} - -/** - * @param {ConditionalMapping|DirectMapping|null} mapping mapping - * @returns {boolean} is conditional mapping - */ -function isConditionalMapping(mapping) { - return ( - mapping !== null && typeof mapping === "object" && !Array.isArray(mapping) - ); -} - -/** - * @param {string|undefined} remainingRequest remaining request when folder mapping, undefined for file mappings - * @param {boolean} subpathMapping true, for subpath mappings - * @param {DirectMapping|null} mappingTarget direct export - * @param {Set} conditionNames condition names - * @param {(d: string, f: boolean) => void} assert asserting direct value - * @returns {string[]} mapping result - */ -function directMapping( - remainingRequest, - subpathMapping, - mappingTarget, - conditionNames, - assert -) { - if (mappingTarget === null) return []; - - if (typeof mappingTarget === "string") { - return [ - targetMapping(remainingRequest, subpathMapping, mappingTarget, assert) - ]; - } - - const targets = []; - - for (const exp of mappingTarget) { - if (typeof exp === "string") { - targets.push( - targetMapping(remainingRequest, subpathMapping, exp, assert) - ); - continue; - } - - const mapping = conditionalMapping(exp, conditionNames); - if (!mapping) continue; - const innerExports = directMapping( - remainingRequest, - subpathMapping, - mapping, - conditionNames, - assert - ); - for (const innerExport of innerExports) { - targets.push(innerExport); - } - } - - return targets; -} - -/** - * @param {string|undefined} remainingRequest remaining request when folder mapping, undefined for file mappings - * @param {boolean} subpathMapping true, for subpath mappings - * @param {string} mappingTarget direct export - * @param {(d: string, f: boolean) => void} assert asserting direct value - * @returns {string} mapping result - */ -function targetMapping( - remainingRequest, - subpathMapping, - mappingTarget, - assert -) { - if (remainingRequest === undefined) { - assert(mappingTarget, false); - return mappingTarget; - } - if (subpathMapping) { - assert(mappingTarget, true); - return mappingTarget + remainingRequest; - } - assert(mappingTarget, false); - return mappingTarget.replace(/\*/g, remainingRequest.replace(/\$/g, "$$")); -} - -/** - * @param {ConditionalMapping} conditionalMapping_ conditional mapping - * @param {Set} conditionNames condition names - * @returns {DirectMapping|null} direct mapping if found - */ -function conditionalMapping(conditionalMapping_, conditionNames) { - /** @type {[ConditionalMapping, string[], number][]} */ - let lookup = [[conditionalMapping_, Object.keys(conditionalMapping_), 0]]; - - loop: while (lookup.length > 0) { - const [mapping, conditions, j] = lookup[lookup.length - 1]; - const last = conditions.length - 1; - - for (let i = j; i < conditions.length; i++) { - const condition = conditions[i]; - - // assert default. Could be last only - if (i !== last) { - if (condition === "default") { - throw new Error("Default condition should be last one"); - } - } else if (condition === "default") { - const innerMapping = mapping[condition]; - // is nested - if (isConditionalMapping(innerMapping)) { - const conditionalMapping = /** @type {ConditionalMapping} */ (innerMapping); - lookup[lookup.length - 1][2] = i + 1; - lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); - continue loop; - } - - return /** @type {DirectMapping} */ (innerMapping); - } - - if (conditionNames.has(condition)) { - const innerMapping = mapping[condition]; - // is nested - if (isConditionalMapping(innerMapping)) { - const conditionalMapping = /** @type {ConditionalMapping} */ (innerMapping); - lookup[lookup.length - 1][2] = i + 1; - lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); - continue loop; - } - - return /** @type {DirectMapping} */ (innerMapping); - } - } - - lookup.pop(); - } - - return null; -} - -/** - * Internal helper to create path tree node - * to ensure that each node gets the same hidden class - * @returns {PathTreeNode} node - */ -function createNode() { - return { - children: null, - folder: null, - wildcards: null, - files: new Map() - }; -} - -/** - * Internal helper for building path tree - * @param {PathTreeNode} root root - * @param {string} path path - * @param {MappingValue} target target - */ -function walkPath(root, path, target) { - if (path.length === 0) { - root.folder = target; - return; - } - - let node = root; - // Typical path tree can looks like - // root - // - files: ["a.js", "b.js"] - // - children: - // node1: - // - files: ["a.js", "b.js"] - let lastNonSlashIndex = 0; - let slashIndex = path.indexOf("/", 0); - - while (slashIndex !== -1) { - const folder = path.slice(lastNonSlashIndex, slashIndex); - let newNode; - - if (node.children === null) { - newNode = createNode(); - node.children = new Map(); - node.children.set(folder, newNode); - } else { - newNode = node.children.get(folder); - - if (!newNode) { - newNode = createNode(); - node.children.set(folder, newNode); - } - } - - node = newNode; - lastNonSlashIndex = slashIndex + 1; - slashIndex = path.indexOf("/", lastNonSlashIndex); - } - - if (lastNonSlashIndex >= path.length) { - node.folder = target; - } else { - const file = lastNonSlashIndex > 0 ? path.slice(lastNonSlashIndex) : path; - if (file.endsWith("*")) { - if (node.wildcards === null) node.wildcards = new Map(); - node.wildcards.set(file.slice(0, -1), target); - } else { - node.files.set(file, target); - } - } -} - -/** - * @param {ExportsField} field exports field - * @returns {PathTreeNode} tree root - */ -function buildExportsFieldPathTree(field) { - const root = createNode(); - - // handle syntax sugar, if exports field is direct mapping for "." - if (typeof field === "string") { - root.files.set("", field); - - return root; - } else if (Array.isArray(field)) { - root.files.set("", field.slice()); - - return root; - } - - const keys = Object.keys(field); - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - - if (key.charCodeAt(0) !== dotCode) { - // handle syntax sugar, if exports field is conditional mapping for "." - if (i === 0) { - while (i < keys.length) { - const charCode = keys[i].charCodeAt(0); - if (charCode === dotCode || charCode === slashCode) { - throw new Error( - `Exports field key should be relative path and start with "." (key: ${JSON.stringify( - key - )})` - ); - } - i++; - } - - root.files.set("", field); - return root; - } - - throw new Error( - `Exports field key should be relative path and start with "." (key: ${JSON.stringify( - key - )})` - ); - } - - if (key.length === 1) { - root.files.set("", field[key]); - continue; - } - - if (key.charCodeAt(1) !== slashCode) { - throw new Error( - `Exports field key should be relative path and start with "./" (key: ${JSON.stringify( - key - )})` - ); - } - - walkPath(root, key.slice(2), field[key]); - } - - return root; -} - -/** - * @param {ImportsField} field imports field - * @returns {PathTreeNode} root - */ -function buildImportsFieldPathTree(field) { - const root = createNode(); - - const keys = Object.keys(field); - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - - if (key.charCodeAt(0) !== hashCode) { - throw new Error( - `Imports field key should start with "#" (key: ${JSON.stringify(key)})` - ); - } - - if (key.length === 1) { - throw new Error( - `Imports field key should have at least 2 characters (key: ${JSON.stringify( - key - )})` - ); - } - - if (key.charCodeAt(1) === slashCode) { - throw new Error( - `Imports field key should not start with "#/" (key: ${JSON.stringify( - key - )})` - ); - } - - walkPath(root, key.slice(1), field[key]); - } - - return root; -} - - -/***/ }), - -/***/ 33805: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const PATH_QUERY_FRAGMENT_REGEXP = /^(#?(?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; - -/** - * @param {string} identifier identifier - * @returns {[string, string, string]|null} parsed identifier - */ -function parseIdentifier(identifier) { - const match = PATH_QUERY_FRAGMENT_REGEXP.exec(identifier); - - if (!match) return null; - - return [ - match[1].replace(/\0(.)/g, "$1"), - match[2] ? match[2].replace(/\0(.)/g, "$1") : "", - match[3] || "" - ]; -} - -module.exports.parseIdentifier = parseIdentifier; - - -/***/ }), - -/***/ 448: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const path = __webpack_require__(71017); - -const CHAR_HASH = "#".charCodeAt(0); -const CHAR_SLASH = "/".charCodeAt(0); -const CHAR_BACKSLASH = "\\".charCodeAt(0); -const CHAR_A = "A".charCodeAt(0); -const CHAR_Z = "Z".charCodeAt(0); -const CHAR_LOWER_A = "a".charCodeAt(0); -const CHAR_LOWER_Z = "z".charCodeAt(0); -const CHAR_DOT = ".".charCodeAt(0); -const CHAR_COLON = ":".charCodeAt(0); - -const posixNormalize = path.posix.normalize; -const winNormalize = path.win32.normalize; - -/** - * @enum {number} - */ -const PathType = Object.freeze({ - Empty: 0, - Normal: 1, - Relative: 2, - AbsoluteWin: 3, - AbsolutePosix: 4, - Internal: 5 -}); -exports.PathType = PathType; - -/** - * @param {string} p a path - * @returns {PathType} type of path - */ -const getType = p => { - switch (p.length) { - case 0: - return PathType.Empty; - case 1: { - const c0 = p.charCodeAt(0); - switch (c0) { - case CHAR_DOT: - return PathType.Relative; - case CHAR_SLASH: - return PathType.AbsolutePosix; - case CHAR_HASH: - return PathType.Internal; - } - return PathType.Normal; - } - case 2: { - const c0 = p.charCodeAt(0); - switch (c0) { - case CHAR_DOT: { - const c1 = p.charCodeAt(1); - switch (c1) { - case CHAR_DOT: - case CHAR_SLASH: - return PathType.Relative; - } - return PathType.Normal; - } - case CHAR_SLASH: - return PathType.AbsolutePosix; - case CHAR_HASH: - return PathType.Internal; - } - const c1 = p.charCodeAt(1); - if (c1 === CHAR_COLON) { - if ( - (c0 >= CHAR_A && c0 <= CHAR_Z) || - (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z) - ) { - return PathType.AbsoluteWin; - } - } - return PathType.Normal; - } - } - const c0 = p.charCodeAt(0); - switch (c0) { - case CHAR_DOT: { - const c1 = p.charCodeAt(1); - switch (c1) { - case CHAR_SLASH: - return PathType.Relative; - case CHAR_DOT: { - const c2 = p.charCodeAt(2); - if (c2 === CHAR_SLASH) return PathType.Relative; - return PathType.Normal; - } - } - return PathType.Normal; - } - case CHAR_SLASH: - return PathType.AbsolutePosix; - case CHAR_HASH: - return PathType.Internal; - } - const c1 = p.charCodeAt(1); - if (c1 === CHAR_COLON) { - const c2 = p.charCodeAt(2); - if ( - (c2 === CHAR_BACKSLASH || c2 === CHAR_SLASH) && - ((c0 >= CHAR_A && c0 <= CHAR_Z) || - (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z)) - ) { - return PathType.AbsoluteWin; - } - } - return PathType.Normal; -}; -exports.getType = getType; - -/** - * @param {string} p a path - * @returns {string} the normalized path - */ -const normalize = p => { - switch (getType(p)) { - case PathType.Empty: - return p; - case PathType.AbsoluteWin: - return winNormalize(p); - case PathType.Relative: { - const r = posixNormalize(p); - return getType(r) === PathType.Relative ? r : `./${r}`; - } - } - return posixNormalize(p); -}; -exports.normalize = normalize; - -/** - * @param {string} rootPath the root path - * @param {string | undefined} request the request path - * @returns {string} the joined path - */ -const join = (rootPath, request) => { - if (!request) return normalize(rootPath); - const requestType = getType(request); - switch (requestType) { - case PathType.AbsolutePosix: - return posixNormalize(request); - case PathType.AbsoluteWin: - return winNormalize(request); - } - switch (getType(rootPath)) { - case PathType.Normal: - case PathType.Relative: - case PathType.AbsolutePosix: - return posixNormalize(`${rootPath}/${request}`); - case PathType.AbsoluteWin: - return winNormalize(`${rootPath}\\${request}`); - } - switch (requestType) { - case PathType.Empty: - return rootPath; - case PathType.Relative: { - const r = posixNormalize(rootPath); - return getType(r) === PathType.Relative ? r : `./${r}`; - } - } - return posixNormalize(rootPath); -}; -exports.join = join; - -const joinCache = new Map(); - -/** - * @param {string} rootPath the root path - * @param {string | undefined} request the request path - * @returns {string} the joined path - */ -const cachedJoin = (rootPath, request) => { - let cacheEntry; - let cache = joinCache.get(rootPath); - if (cache === undefined) { - joinCache.set(rootPath, (cache = new Map())); - } else { - cacheEntry = cache.get(request); - if (cacheEntry !== undefined) return cacheEntry; - } - cacheEntry = join(rootPath, request); - cache.set(request, cacheEntry); - return cacheEntry; -}; -exports.cachedJoin = cachedJoin; - -const checkImportsExportsFieldTarget = relativePath => { - let lastNonSlashIndex = 0; - let slashIndex = relativePath.indexOf("/", 1); - let cd = 0; - - while (slashIndex !== -1) { - const folder = relativePath.slice(lastNonSlashIndex, slashIndex); - - switch (folder) { - case "..": { - cd--; - if (cd < 0) - return new Error( - `Trying to access out of package scope. Requesting ${relativePath}` - ); - break; - } - case ".": - break; - default: - cd++; - break; - } - - lastNonSlashIndex = slashIndex + 1; - slashIndex = relativePath.indexOf("/", lastNonSlashIndex); - } -}; -exports.checkImportsExportsFieldTarget = checkImportsExportsFieldTarget; - - -/***/ }), - -/***/ 32411: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -const Variable = __webpack_require__(721); - -/** - * @class Definition - */ -class Definition { - constructor(type, name, node, parent, index, kind) { - - /** - * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). - */ - this.type = type; - - /** - * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence. - */ - this.name = name; - - /** - * @member {espree.Node} Definition#node - the enclosing node of the identifier. - */ - this.node = node; - - /** - * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier. - */ - this.parent = parent; - - /** - * @member {Number?} Definition#index - the index in the declaration statement. - */ - this.index = index; - - /** - * @member {String?} Definition#kind - the kind of the declaration statement. - */ - this.kind = kind; - } -} - -/** - * @class ParameterDefinition - */ -class ParameterDefinition extends Definition { - constructor(name, node, index, rest) { - super(Variable.Parameter, name, node, null, index, null); - - /** - * Whether the parameter definition is a part of a rest parameter. - * @member {boolean} ParameterDefinition#rest - */ - this.rest = rest; - } -} - -module.exports = { - ParameterDefinition, - Definition -}; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 77736: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2012-2014 Yusuke Suzuki - Copyright (C) 2013 Alex Seville - Copyright (C) 2014 Thiago de Arruda - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** - * Escope (escope) is an ECMAScript - * scope analyzer extracted from the esmangle project. - *

- * escope finds lexical scopes in a source program, i.e. areas of that - * program where different occurrences of the same identifier refer to the same - * variable. With each scope the contained variables are collected, and each - * identifier reference in code is linked to its corresponding variable (if - * possible). - *

- * escope works on a syntax tree of the parsed source code which has - * to adhere to the - * Mozilla Parser API. E.g. espree is a parser - * that produces such syntax trees. - *

- * The main interface is the {@link analyze} function. - * @module escope - */ - - -/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ - -const assert = __webpack_require__(39491); - -const ScopeManager = __webpack_require__(56138); -const Referencer = __webpack_require__(41759); -const Reference = __webpack_require__(32858); -const Variable = __webpack_require__(721); -const Scope = (__webpack_require__(29105).Scope); -const version = (__webpack_require__(13348)/* .version */ .i8); - -/** - * Set the default options - * @returns {Object} options - */ -function defaultOptions() { - return { - optimistic: false, - directive: false, - nodejsScope: false, - impliedStrict: false, - sourceType: "script", // one of ['script', 'module'] - ecmaVersion: 5, - childVisitorKeys: null, - fallback: "iteration" - }; -} - -/** - * Preform deep update on option object - * @param {Object} target - Options - * @param {Object} override - Updates - * @returns {Object} Updated options - */ -function updateDeeply(target, override) { - - /** - * Is hash object - * @param {Object} value - Test value - * @returns {boolean} Result - */ - function isHashObject(value) { - return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp); - } - - for (const key in override) { - if (Object.prototype.hasOwnProperty.call(override, key)) { - const val = override[key]; - - if (isHashObject(val)) { - if (isHashObject(target[key])) { - updateDeeply(target[key], val); - } else { - target[key] = updateDeeply({}, val); - } - } else { - target[key] = val; - } - } - } - return target; -} - -/** - * Main interface function. Takes an Espree syntax tree and returns the - * analyzed scopes. - * @function analyze - * @param {espree.Tree} tree - Abstract Syntax Tree - * @param {Object} providedOptions - Options that tailor the scope analysis - * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag - * @param {boolean} [providedOptions.directive=false]- the directive flag - * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls - * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole - * script is executed under node.js environment. When enabled, escope adds - * a function scope immediately following the global scope. - * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode - * (if ecmaVersion >= 5). - * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module' - * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered - * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. - * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. - * @returns {ScopeManager} ScopeManager - */ -function analyze(tree, providedOptions) { - const options = updateDeeply(defaultOptions(), providedOptions); - const scopeManager = new ScopeManager(options); - const referencer = new Referencer(options, scopeManager); - - referencer.visit(tree); - - assert(scopeManager.__currentScope === null, "currentScope should be null."); - - return scopeManager; -} - -module.exports = { - - /** @name module:escope.version */ - version, - - /** @name module:escope.Reference */ - Reference, - - /** @name module:escope.Variable */ - Variable, - - /** @name module:escope.Scope */ - Scope, - - /** @name module:escope.ScopeManager */ - ScopeManager, - analyze -}; - - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 26274: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -/* eslint-disable no-undefined */ - -const Syntax = (__webpack_require__(66057).Syntax); -const esrecurse = __webpack_require__(41350); - -/** - * Get last array element - * @param {array} xs - array - * @returns {any} Last elment - */ -function getLast(xs) { - return xs[xs.length - 1] || null; -} - -class PatternVisitor extends esrecurse.Visitor { - static isPattern(node) { - const nodeType = node.type; - - return ( - nodeType === Syntax.Identifier || - nodeType === Syntax.ObjectPattern || - nodeType === Syntax.ArrayPattern || - nodeType === Syntax.SpreadElement || - nodeType === Syntax.RestElement || - nodeType === Syntax.AssignmentPattern - ); - } - - constructor(options, rootPattern, callback) { - super(null, options); - this.rootPattern = rootPattern; - this.callback = callback; - this.assignments = []; - this.rightHandNodes = []; - this.restElements = []; - } - - Identifier(pattern) { - const lastRestElement = getLast(this.restElements); - - this.callback(pattern, { - topLevel: pattern === this.rootPattern, - rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, - assignments: this.assignments - }); - } - - Property(property) { - - // Computed property's key is a right hand node. - if (property.computed) { - this.rightHandNodes.push(property.key); - } - - // If it's shorthand, its key is same as its value. - // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). - // If it's not shorthand, the name of new variable is its value's. - this.visit(property.value); - } - - ArrayPattern(pattern) { - for (let i = 0, iz = pattern.elements.length; i < iz; ++i) { - const element = pattern.elements[i]; - - this.visit(element); - } - } - - AssignmentPattern(pattern) { - this.assignments.push(pattern); - this.visit(pattern.left); - this.rightHandNodes.push(pattern.right); - this.assignments.pop(); - } - - RestElement(pattern) { - this.restElements.push(pattern); - this.visit(pattern.argument); - this.restElements.pop(); - } - - MemberExpression(node) { - - // Computed property's key is a right hand node. - if (node.computed) { - this.rightHandNodes.push(node.property); - } - - // the object is only read, write to its property. - this.rightHandNodes.push(node.object); - } - - // - // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression. - // By spec, LeftHandSideExpression is Pattern or MemberExpression. - // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758) - // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc... - // - - SpreadElement(node) { - this.visit(node.argument); - } - - ArrayExpression(node) { - node.elements.forEach(this.visit, this); - } - - AssignmentExpression(node) { - this.assignments.push(node); - this.visit(node.left); - this.rightHandNodes.push(node.right); - this.assignments.pop(); - } - - CallExpression(node) { - - // arguments are right hand nodes. - node.arguments.forEach(a => { - this.rightHandNodes.push(a); - }); - this.visit(node.callee); - } -} - -module.exports = PatternVisitor; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 32858: -/***/ (function(module) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -const READ = 0x1; -const WRITE = 0x2; -const RW = READ | WRITE; - -/** - * A Reference represents a single occurrence of an identifier in code. - * @class Reference - */ -class Reference { - constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { - - /** - * Identifier syntax node. - * @member {espreeIdentifier} Reference#identifier - */ - this.identifier = ident; - - /** - * Reference to the enclosing Scope. - * @member {Scope} Reference#from - */ - this.from = scope; - - /** - * Whether the reference comes from a dynamic scope (such as 'eval', - * 'with', etc.), and may be trapped by dynamic scopes. - * @member {boolean} Reference#tainted - */ - this.tainted = false; - - /** - * The variable this reference is resolved with. - * @member {Variable} Reference#resolved - */ - this.resolved = null; - - /** - * The read-write mode of the reference. (Value is one of {@link - * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}). - * @member {number} Reference#flag - * @private - */ - this.flag = flag; - if (this.isWrite()) { - - /** - * If reference is writeable, this is the tree being written to it. - * @member {espreeNode} Reference#writeExpr - */ - this.writeExpr = writeExpr; - - /** - * Whether the Reference might refer to a partial value of writeExpr. - * @member {boolean} Reference#partial - */ - this.partial = partial; - - /** - * Whether the Reference is to write of initialization. - * @member {boolean} Reference#init - */ - this.init = init; - } - this.__maybeImplicitGlobal = maybeImplicitGlobal; - } - - /** - * Whether the reference is static. - * @method Reference#isStatic - * @returns {boolean} static - */ - isStatic() { - return !this.tainted && this.resolved && this.resolved.scope.isStatic(); - } - - /** - * Whether the reference is writeable. - * @method Reference#isWrite - * @returns {boolean} write - */ - isWrite() { - return !!(this.flag & Reference.WRITE); - } - - /** - * Whether the reference is readable. - * @method Reference#isRead - * @returns {boolean} read - */ - isRead() { - return !!(this.flag & Reference.READ); - } - - /** - * Whether the reference is read-only. - * @method Reference#isReadOnly - * @returns {boolean} read only - */ - isReadOnly() { - return this.flag === Reference.READ; - } - - /** - * Whether the reference is write-only. - * @method Reference#isWriteOnly - * @returns {boolean} write only - */ - isWriteOnly() { - return this.flag === Reference.WRITE; - } - - /** - * Whether the reference is read-write. - * @method Reference#isReadWrite - * @returns {boolean} read write - */ - isReadWrite() { - return this.flag === Reference.RW; - } -} - -/** - * @constant Reference.READ - * @private - */ -Reference.READ = READ; - -/** - * @constant Reference.WRITE - * @private - */ -Reference.WRITE = WRITE; - -/** - * @constant Reference.RW - * @private - */ -Reference.RW = RW; - -module.exports = Reference; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 41759: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -/* eslint-disable no-underscore-dangle */ -/* eslint-disable no-undefined */ - -const Syntax = (__webpack_require__(66057).Syntax); -const esrecurse = __webpack_require__(41350); -const Reference = __webpack_require__(32858); -const Variable = __webpack_require__(721); -const PatternVisitor = __webpack_require__(26274); -const definition = __webpack_require__(32411); -const assert = __webpack_require__(39491); - -const ParameterDefinition = definition.ParameterDefinition; -const Definition = definition.Definition; - -/** - * Traverse identifier in pattern - * @param {Object} options - options - * @param {pattern} rootPattern - root pattern - * @param {Refencer} referencer - referencer - * @param {callback} callback - callback - * @returns {void} - */ -function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { - - // Call the callback at left hand identifier nodes, and Collect right hand nodes. - const visitor = new PatternVisitor(options, rootPattern, callback); - - visitor.visit(rootPattern); - - // Process the right hand nodes recursively. - if (referencer !== null && referencer !== undefined) { - visitor.rightHandNodes.forEach(referencer.visit, referencer); - } -} - -// Importing ImportDeclaration. -// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation -// https://github.com/estree/estree/blob/master/es6.md#importdeclaration -// FIXME: Now, we don't create module environment, because the context is -// implementation dependent. - -class Importer extends esrecurse.Visitor { - constructor(declaration, referencer) { - super(null, referencer.options); - this.declaration = declaration; - this.referencer = referencer; - } - - visitImport(id, specifier) { - this.referencer.visitPattern(id, pattern => { - this.referencer.currentScope().__define(pattern, - new Definition( - Variable.ImportBinding, - pattern, - specifier, - this.declaration, - null, - null - )); - }); - } - - ImportNamespaceSpecifier(node) { - const local = (node.local || node.id); - - if (local) { - this.visitImport(local, node); - } - } - - ImportDefaultSpecifier(node) { - const local = (node.local || node.id); - - this.visitImport(local, node); - } - - ImportSpecifier(node) { - const local = (node.local || node.id); - - if (node.name) { - this.visitImport(node.name, node); - } else { - this.visitImport(local, node); - } - } -} - -// Referencing variables and creating bindings. -class Referencer extends esrecurse.Visitor { - constructor(options, scopeManager) { - super(null, options); - this.options = options; - this.scopeManager = scopeManager; - this.parent = null; - this.isInnerMethodDefinition = false; - } - - currentScope() { - return this.scopeManager.__currentScope; - } - - close(node) { - while (this.currentScope() && node === this.currentScope().block) { - this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager); - } - } - - pushInnerMethodDefinition(isInnerMethodDefinition) { - const previous = this.isInnerMethodDefinition; - - this.isInnerMethodDefinition = isInnerMethodDefinition; - return previous; - } - - popInnerMethodDefinition(isInnerMethodDefinition) { - this.isInnerMethodDefinition = isInnerMethodDefinition; - } - - referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { - const scope = this.currentScope(); - - assignments.forEach(assignment => { - scope.__referencing( - pattern, - Reference.WRITE, - assignment.right, - maybeImplicitGlobal, - pattern !== assignment.left, - init - ); - }); - } - - visitPattern(node, options, callback) { - let visitPatternOptions = options; - let visitPatternCallback = callback; - - if (typeof options === "function") { - visitPatternCallback = options; - visitPatternOptions = { processRightHandNodes: false }; - } - - traverseIdentifierInPattern( - this.options, - node, - visitPatternOptions.processRightHandNodes ? this : null, - visitPatternCallback - ); - } - - visitFunction(node) { - let i, iz; - - // FunctionDeclaration name is defined in upper scope - // NOTE: Not referring variableScope. It is intended. - // Since - // in ES5, FunctionDeclaration should be in FunctionBody. - // in ES6, FunctionDeclaration should be block scoped. - - if (node.type === Syntax.FunctionDeclaration) { - - // id is defined in upper scope - this.currentScope().__define(node.id, - new Definition( - Variable.FunctionName, - node.id, - node, - null, - null, - null - )); - } - - // FunctionExpression with name creates its special scope; - // FunctionExpressionNameScope. - if (node.type === Syntax.FunctionExpression && node.id) { - this.scopeManager.__nestFunctionExpressionNameScope(node); - } - - // Consider this function is in the MethodDefinition. - this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition); - - const that = this; - - /** - * Visit pattern callback - * @param {pattern} pattern - pattern - * @param {Object} info - info - * @returns {void} - */ - function visitPatternCallback(pattern, info) { - that.currentScope().__define(pattern, - new ParameterDefinition( - pattern, - node, - i, - info.rest - )); - - that.referencingDefaultValue(pattern, info.assignments, null, true); - } - - // Process parameter declarations. - for (i = 0, iz = node.params.length; i < iz; ++i) { - this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback); - } - - // if there's a rest argument, add that - if (node.rest) { - this.visitPattern({ - type: "RestElement", - argument: node.rest - }, pattern => { - this.currentScope().__define(pattern, - new ParameterDefinition( - pattern, - node, - node.params.length, - true - )); - }); - } - - // In TypeScript there are a number of function-like constructs which have no body, - // so check it exists before traversing - if (node.body) { - - // Skip BlockStatement to prevent creating BlockStatement scope. - if (node.body.type === Syntax.BlockStatement) { - this.visitChildren(node.body); - } else { - this.visit(node.body); - } - } - - this.close(node); - } - - visitClass(node) { - if (node.type === Syntax.ClassDeclaration) { - this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node, - null, - null, - null - )); - } - - this.visit(node.superClass); - - this.scopeManager.__nestClassScope(node); - - if (node.id) { - this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node - )); - } - this.visit(node.body); - - this.close(node); - } - - visitProperty(node) { - let previous; - - if (node.computed) { - this.visit(node.key); - } - - const isMethodDefinition = node.type === Syntax.MethodDefinition; - - if (isMethodDefinition) { - previous = this.pushInnerMethodDefinition(true); - } - this.visit(node.value); - if (isMethodDefinition) { - this.popInnerMethodDefinition(previous); - } - } - - visitForIn(node) { - if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") { - this.scopeManager.__nestForScope(node); - } - - if (node.left.type === Syntax.VariableDeclaration) { - this.visit(node.left); - this.visitPattern(node.left.declarations[0].id, pattern => { - this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); - }); - } else { - this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { - let maybeImplicitGlobal = null; - - if (!this.currentScope().isStrict) { - maybeImplicitGlobal = { - pattern, - node - }; - } - this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); - this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false); - }); - } - this.visit(node.right); - this.visit(node.body); - - this.close(node); - } - - visitVariableDeclaration(variableTargetScope, type, node, index) { - - const decl = node.declarations[index]; - const init = decl.init; - - this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => { - variableTargetScope.__define( - pattern, - new Definition( - type, - pattern, - decl, - node, - index, - node.kind - ) - ); - - this.referencingDefaultValue(pattern, info.assignments, null, true); - if (init) { - this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true); - } - }); - } - - AssignmentExpression(node) { - if (PatternVisitor.isPattern(node.left)) { - if (node.operator === "=") { - this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { - let maybeImplicitGlobal = null; - - if (!this.currentScope().isStrict) { - maybeImplicitGlobal = { - pattern, - node - }; - } - this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); - this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false); - }); - } else { - this.currentScope().__referencing(node.left, Reference.RW, node.right); - } - } else { - this.visit(node.left); - } - this.visit(node.right); - } - - CatchClause(node) { - this.scopeManager.__nestCatchScope(node); - - this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => { - this.currentScope().__define(pattern, - new Definition( - Variable.CatchClause, - node.param, - node, - null, - null, - null - )); - this.referencingDefaultValue(pattern, info.assignments, null, true); - }); - this.visit(node.body); - - this.close(node); - } - - Program(node) { - this.scopeManager.__nestGlobalScope(node); - - if (this.scopeManager.__isNodejsScope()) { - - // Force strictness of GlobalScope to false when using node.js scope. - this.currentScope().isStrict = false; - this.scopeManager.__nestFunctionScope(node, false); - } - - if (this.scopeManager.__isES6() && this.scopeManager.isModule()) { - this.scopeManager.__nestModuleScope(node); - } - - if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) { - this.currentScope().isStrict = true; - } - - this.visitChildren(node); - this.close(node); - } - - Identifier(node) { - this.currentScope().__referencing(node); - } - - UpdateExpression(node) { - if (PatternVisitor.isPattern(node.argument)) { - this.currentScope().__referencing(node.argument, Reference.RW, null); - } else { - this.visitChildren(node); - } - } - - MemberExpression(node) { - this.visit(node.object); - if (node.computed) { - this.visit(node.property); - } - } - - Property(node) { - this.visitProperty(node); - } - - MethodDefinition(node) { - this.visitProperty(node); - } - - BreakStatement() {} // eslint-disable-line class-methods-use-this - - ContinueStatement() {} // eslint-disable-line class-methods-use-this - - LabeledStatement(node) { - this.visit(node.body); - } - - ForStatement(node) { - - // Create ForStatement declaration. - // NOTE: In ES6, ForStatement dynamically generates - // per iteration environment. However, escope is - // a static analyzer, we only generate one scope for ForStatement. - if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") { - this.scopeManager.__nestForScope(node); - } - - this.visitChildren(node); - - this.close(node); - } - - ClassExpression(node) { - this.visitClass(node); - } - - ClassDeclaration(node) { - this.visitClass(node); - } - - CallExpression(node) { - - // Check this is direct call to eval - if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") { - - // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and - // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment. - this.currentScope().variableScope.__detectEval(); - } - this.visitChildren(node); - } - - BlockStatement(node) { - if (this.scopeManager.__isES6()) { - this.scopeManager.__nestBlockScope(node); - } - - this.visitChildren(node); - - this.close(node); - } - - ThisExpression() { - this.currentScope().variableScope.__detectThis(); - } - - WithStatement(node) { - this.visit(node.object); - - // Then nest scope for WithStatement. - this.scopeManager.__nestWithScope(node); - - this.visit(node.body); - - this.close(node); - } - - VariableDeclaration(node) { - const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope(); - - for (let i = 0, iz = node.declarations.length; i < iz; ++i) { - const decl = node.declarations[i]; - - this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i); - if (decl.init) { - this.visit(decl.init); - } - } - } - - // sec 13.11.8 - SwitchStatement(node) { - this.visit(node.discriminant); - - if (this.scopeManager.__isES6()) { - this.scopeManager.__nestSwitchScope(node); - } - - for (let i = 0, iz = node.cases.length; i < iz; ++i) { - this.visit(node.cases[i]); - } - - this.close(node); - } - - FunctionDeclaration(node) { - this.visitFunction(node); - } - - FunctionExpression(node) { - this.visitFunction(node); - } - - ForOfStatement(node) { - this.visitForIn(node); - } - - ForInStatement(node) { - this.visitForIn(node); - } - - ArrowFunctionExpression(node) { - this.visitFunction(node); - } - - ImportDeclaration(node) { - assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context."); - - const importer = new Importer(node, this); - - importer.visit(node); - } - - visitExportDeclaration(node) { - if (node.source) { - return; - } - if (node.declaration) { - this.visit(node.declaration); - return; - } - - this.visitChildren(node); - } - - // TODO: ExportDeclaration doesn't exist. for bc? - ExportDeclaration(node) { - this.visitExportDeclaration(node); - } - - ExportAllDeclaration(node) { - this.visitExportDeclaration(node); - } - - ExportDefaultDeclaration(node) { - this.visitExportDeclaration(node); - } - - ExportNamedDeclaration(node) { - this.visitExportDeclaration(node); - } - - ExportSpecifier(node) { - - // TODO: `node.id` doesn't exist. for bc? - const local = (node.id || node.local); - - this.visit(local); - } - - MetaProperty() { // eslint-disable-line class-methods-use-this - - // do nothing. - } -} - -module.exports = Referencer; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 56138: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -/* eslint-disable no-underscore-dangle */ - -const Scope = __webpack_require__(29105); -const assert = __webpack_require__(39491); - -const GlobalScope = Scope.GlobalScope; -const CatchScope = Scope.CatchScope; -const WithScope = Scope.WithScope; -const ModuleScope = Scope.ModuleScope; -const ClassScope = Scope.ClassScope; -const SwitchScope = Scope.SwitchScope; -const FunctionScope = Scope.FunctionScope; -const ForScope = Scope.ForScope; -const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope; -const BlockScope = Scope.BlockScope; - -/** - * @class ScopeManager - */ -class ScopeManager { - constructor(options) { - this.scopes = []; - this.globalScope = null; - this.__nodeToScope = new WeakMap(); - this.__currentScope = null; - this.__options = options; - this.__declaredVariables = new WeakMap(); - } - - __useDirective() { - return this.__options.directive; - } - - __isOptimistic() { - return this.__options.optimistic; - } - - __ignoreEval() { - return this.__options.ignoreEval; - } - - __isNodejsScope() { - return this.__options.nodejsScope; - } - - isModule() { - return this.__options.sourceType === "module"; - } - - isImpliedStrict() { - return this.__options.impliedStrict; - } - - isStrictModeSupported() { - return this.__options.ecmaVersion >= 5; - } - - // Returns appropriate scope for this node. - __get(node) { - return this.__nodeToScope.get(node); - } - - /** - * Get variables that are declared by the node. - * - * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. - * If the node declares nothing, this method returns an empty array. - * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. - * - * @param {Espree.Node} node - a node to get. - * @returns {Variable[]} variables that declared by the node. - */ - getDeclaredVariables(node) { - return this.__declaredVariables.get(node) || []; - } - - /** - * acquire scope from node. - * @method ScopeManager#acquire - * @param {Espree.Node} node - node for the acquired scope. - * @param {boolean=} inner - look up the most inner scope, default value is false. - * @returns {Scope?} Scope from node - */ - acquire(node, inner) { - - /** - * predicate - * @param {Scope} testScope - scope to test - * @returns {boolean} predicate - */ - function predicate(testScope) { - if (testScope.type === "function" && testScope.functionExpressionScope) { - return false; - } - return true; - } - - const scopes = this.__get(node); - - if (!scopes || scopes.length === 0) { - return null; - } - - // Heuristic selection from all scopes. - // If you would like to get all scopes, please use ScopeManager#acquireAll. - if (scopes.length === 1) { - return scopes[0]; - } - - if (inner) { - for (let i = scopes.length - 1; i >= 0; --i) { - const scope = scopes[i]; - - if (predicate(scope)) { - return scope; - } - } - } else { - for (let i = 0, iz = scopes.length; i < iz; ++i) { - const scope = scopes[i]; - - if (predicate(scope)) { - return scope; - } - } - } - - return null; - } - - /** - * acquire all scopes from node. - * @method ScopeManager#acquireAll - * @param {Espree.Node} node - node for the acquired scope. - * @returns {Scopes?} Scope array - */ - acquireAll(node) { - return this.__get(node); - } - - /** - * release the node. - * @method ScopeManager#release - * @param {Espree.Node} node - releasing node. - * @param {boolean=} inner - look up the most inner scope, default value is false. - * @returns {Scope?} upper scope for the node. - */ - release(node, inner) { - const scopes = this.__get(node); - - if (scopes && scopes.length) { - const scope = scopes[0].upper; - - if (!scope) { - return null; - } - return this.acquire(scope.block, inner); - } - return null; - } - - attach() { } // eslint-disable-line class-methods-use-this - - detach() { } // eslint-disable-line class-methods-use-this - - __nestScope(scope) { - if (scope instanceof GlobalScope) { - assert(this.__currentScope === null); - this.globalScope = scope; - } - this.__currentScope = scope; - return scope; - } - - __nestGlobalScope(node) { - return this.__nestScope(new GlobalScope(this, node)); - } - - __nestBlockScope(node) { - return this.__nestScope(new BlockScope(this, this.__currentScope, node)); - } - - __nestFunctionScope(node, isMethodDefinition) { - return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition)); - } - - __nestForScope(node) { - return this.__nestScope(new ForScope(this, this.__currentScope, node)); - } - - __nestCatchScope(node) { - return this.__nestScope(new CatchScope(this, this.__currentScope, node)); - } - - __nestWithScope(node) { - return this.__nestScope(new WithScope(this, this.__currentScope, node)); - } - - __nestClassScope(node) { - return this.__nestScope(new ClassScope(this, this.__currentScope, node)); - } - - __nestSwitchScope(node) { - return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); - } - - __nestModuleScope(node) { - return this.__nestScope(new ModuleScope(this, this.__currentScope, node)); - } - - __nestFunctionExpressionNameScope(node) { - return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node)); - } - - __isES6() { - return this.__options.ecmaVersion >= 6; - } -} - -module.exports = ScopeManager; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 29105: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -/* eslint-disable no-underscore-dangle */ -/* eslint-disable no-undefined */ - -const Syntax = (__webpack_require__(66057).Syntax); - -const Reference = __webpack_require__(32858); -const Variable = __webpack_require__(721); -const Definition = (__webpack_require__(32411).Definition); -const assert = __webpack_require__(39491); - -/** - * Test if scope is struct - * @param {Scope} scope - scope - * @param {Block} block - block - * @param {boolean} isMethodDefinition - is method definition - * @param {boolean} useDirective - use directive - * @returns {boolean} is strict scope - */ -function isStrictScope(scope, block, isMethodDefinition, useDirective) { - let body; - - // When upper scope is exists and strict, inner scope is also strict. - if (scope.upper && scope.upper.isStrict) { - return true; - } - - if (isMethodDefinition) { - return true; - } - - if (scope.type === "class" || scope.type === "module") { - return true; - } - - if (scope.type === "block" || scope.type === "switch") { - return false; - } - - if (scope.type === "function") { - if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) { - return false; - } - - if (block.type === Syntax.Program) { - body = block; - } else { - body = block.body; - } - - if (!body) { - return false; - } - } else if (scope.type === "global") { - body = block; - } else { - return false; - } - - // Search 'use strict' directive. - if (useDirective) { - for (let i = 0, iz = body.body.length; i < iz; ++i) { - const stmt = body.body[i]; - - if (stmt.type !== Syntax.DirectiveStatement) { - break; - } - if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") { - return true; - } - } - } else { - for (let i = 0, iz = body.body.length; i < iz; ++i) { - const stmt = body.body[i]; - - if (stmt.type !== Syntax.ExpressionStatement) { - break; - } - const expr = stmt.expression; - - if (expr.type !== Syntax.Literal || typeof expr.value !== "string") { - break; - } - if (expr.raw !== null && expr.raw !== undefined) { - if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") { - return true; - } - } else { - if (expr.value === "use strict") { - return true; - } - } - } - } - return false; -} - -/** - * Register scope - * @param {ScopeManager} scopeManager - scope manager - * @param {Scope} scope - scope - * @returns {void} - */ -function registerScope(scopeManager, scope) { - scopeManager.scopes.push(scope); - - const scopes = scopeManager.__nodeToScope.get(scope.block); - - if (scopes) { - scopes.push(scope); - } else { - scopeManager.__nodeToScope.set(scope.block, [scope]); - } -} - -/** - * Should be statically - * @param {Object} def - def - * @returns {boolean} should be statically - */ -function shouldBeStatically(def) { - return ( - (def.type === Variable.ClassName) || - (def.type === Variable.Variable && def.parent.kind !== "var") - ); -} - -/** - * @class Scope - */ -class Scope { - constructor(scopeManager, type, upperScope, block, isMethodDefinition) { - - /** - * One of 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'. - * @member {String} Scope#type - */ - this.type = type; - - /** - * The scoped {@link Variable}s of this scope, as { Variable.name - * : Variable }. - * @member {Map} Scope#set - */ - this.set = new Map(); - - /** - * The tainted variables of this scope, as { Variable.name : - * boolean }. - * @member {Map} Scope#taints */ - this.taints = new Map(); - - /** - * Generally, through the lexical scoping of JS you can always know - * which variable an identifier in the source code refers to. There are - * a few exceptions to this rule. With 'global' and 'with' scopes you - * can only decide at runtime which variable a reference refers to. - * Moreover, if 'eval()' is used in a scope, it might introduce new - * bindings in this or its parent scopes. - * All those scopes are considered 'dynamic'. - * @member {boolean} Scope#dynamic - */ - this.dynamic = this.type === "global" || this.type === "with"; - - /** - * A reference to the scope-defining syntax node. - * @member {espree.Node} Scope#block - */ - this.block = block; - - /** - * The {@link Reference|references} that are not resolved with this scope. - * @member {Reference[]} Scope#through - */ - this.through = []; - - /** - * The scoped {@link Variable}s of this scope. In the case of a - * 'function' scope this includes the automatic argument arguments as - * its first element, as well as all further formal arguments. - * @member {Variable[]} Scope#variables - */ - this.variables = []; - - /** - * Any variable {@link Reference|reference} found in this scope. This - * includes occurrences of local variables as well as variables from - * parent scopes (including the global scope). For local variables - * this also includes defining occurrences (like in a 'var' statement). - * In a 'function' scope this does not include the occurrences of the - * formal parameter in the parameter list. - * @member {Reference[]} Scope#references - */ - this.references = []; - - /** - * For 'global' and 'function' scopes, this is a self-reference. For - * other scope types this is the variableScope value of the - * parent scope. - * @member {Scope} Scope#variableScope - */ - this.variableScope = - (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; - - /** - * Whether this scope is created by a FunctionExpression. - * @member {boolean} Scope#functionExpressionScope - */ - this.functionExpressionScope = false; - - /** - * Whether this is a scope that contains an 'eval()' invocation. - * @member {boolean} Scope#directCallToEvalScope - */ - this.directCallToEvalScope = false; - - /** - * @member {boolean} Scope#thisFound - */ - this.thisFound = false; - - this.__left = []; - - /** - * Reference to the parent {@link Scope|scope}. - * @member {Scope} Scope#upper - */ - this.upper = upperScope; - - /** - * Whether 'use strict' is in effect in this scope. - * @member {boolean} Scope#isStrict - */ - this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); - - /** - * List of nested {@link Scope}s. - * @member {Scope[]} Scope#childScopes - */ - this.childScopes = []; - if (this.upper) { - this.upper.childScopes.push(this); - } - - this.__declaredVariables = scopeManager.__declaredVariables; - - registerScope(scopeManager, this); - } - - __shouldStaticallyClose(scopeManager) { - return (!this.dynamic || scopeManager.__isOptimistic()); - } - - __shouldStaticallyCloseForGlobal(ref) { - - // On global scope, let/const/class declarations should be resolved statically. - const name = ref.identifier.name; - - if (!this.set.has(name)) { - return false; - } - - const variable = this.set.get(name); - const defs = variable.defs; - - return defs.length > 0 && defs.every(shouldBeStatically); - } - - __staticCloseRef(ref) { - if (!this.__resolve(ref)) { - this.__delegateToUpperScope(ref); - } - } - - __dynamicCloseRef(ref) { - - // notify all names are through to global - let current = this; - - do { - current.through.push(ref); - current = current.upper; - } while (current); - } - - __globalCloseRef(ref) { - - // let/const/class declarations should be resolved statically. - // others should be resolved dynamically. - if (this.__shouldStaticallyCloseForGlobal(ref)) { - this.__staticCloseRef(ref); - } else { - this.__dynamicCloseRef(ref); - } - } - - __close(scopeManager) { - let closeRef; - - if (this.__shouldStaticallyClose(scopeManager)) { - closeRef = this.__staticCloseRef; - } else if (this.type !== "global") { - closeRef = this.__dynamicCloseRef; - } else { - closeRef = this.__globalCloseRef; - } - - // Try Resolving all references in this scope. - for (let i = 0, iz = this.__left.length; i < iz; ++i) { - const ref = this.__left[i]; - - closeRef.call(this, ref); - } - this.__left = null; - - return this.upper; - } - - // To override by function scopes. - // References in default parameters isn't resolved to variables which are in their function body. - __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars - return true; - } - - __resolve(ref) { - const name = ref.identifier.name; - - if (!this.set.has(name)) { - return false; - } - const variable = this.set.get(name); - - if (!this.__isValidResolution(ref, variable)) { - return false; - } - variable.references.push(ref); - variable.stack = variable.stack && ref.from.variableScope === this.variableScope; - if (ref.tainted) { - variable.tainted = true; - this.taints.set(variable.name, true); - } - ref.resolved = variable; - - return true; - } - - __delegateToUpperScope(ref) { - if (this.upper) { - this.upper.__left.push(ref); - } - this.through.push(ref); - } - - __addDeclaredVariablesOfNode(variable, node) { - if (node === null || node === undefined) { - return; - } - - let variables = this.__declaredVariables.get(node); - - if (variables === null || variables === undefined) { - variables = []; - this.__declaredVariables.set(node, variables); - } - if (variables.indexOf(variable) === -1) { - variables.push(variable); - } - } - - __defineGeneric(name, set, variables, node, def) { - let variable; - - variable = set.get(name); - if (!variable) { - variable = new Variable(name, this); - set.set(name, variable); - variables.push(variable); - } - - if (def) { - variable.defs.push(def); - this.__addDeclaredVariablesOfNode(variable, def.node); - this.__addDeclaredVariablesOfNode(variable, def.parent); - } - if (node) { - variable.identifiers.push(node); - } - } - - __define(node, def) { - if (node && node.type === Syntax.Identifier) { - this.__defineGeneric( - node.name, - this.set, - this.variables, - node, - def - ); - } - } - - __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) { - - // because Array element may be null - if (!node || node.type !== Syntax.Identifier) { - return; - } - - // Specially handle like `this`. - if (node.name === "super") { - return; - } - - const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init); - - this.references.push(ref); - this.__left.push(ref); - } - - __detectEval() { - let current = this; - - this.directCallToEvalScope = true; - do { - current.dynamic = true; - current = current.upper; - } while (current); - } - - __detectThis() { - this.thisFound = true; - } - - __isClosed() { - return this.__left === null; - } - - /** - * returns resolved {Reference} - * @method Scope#resolve - * @param {Espree.Identifier} ident - identifier to be resolved. - * @returns {Reference} reference - */ - resolve(ident) { - let ref, i, iz; - - assert(this.__isClosed(), "Scope should be closed."); - assert(ident.type === Syntax.Identifier, "Target should be identifier."); - for (i = 0, iz = this.references.length; i < iz; ++i) { - ref = this.references[i]; - if (ref.identifier === ident) { - return ref; - } - } - return null; - } - - /** - * returns this scope is static - * @method Scope#isStatic - * @returns {boolean} static - */ - isStatic() { - return !this.dynamic; - } - - /** - * returns this scope has materialized arguments - * @method Scope#isArgumentsMaterialized - * @returns {boolean} arguemnts materialized - */ - isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this - return true; - } - - /** - * returns this scope has materialized `this` reference - * @method Scope#isThisMaterialized - * @returns {boolean} this materialized - */ - isThisMaterialized() { // eslint-disable-line class-methods-use-this - return true; - } - - isUsedName(name) { - if (this.set.has(name)) { - return true; - } - for (let i = 0, iz = this.through.length; i < iz; ++i) { - if (this.through[i].identifier.name === name) { - return true; - } - } - return false; - } -} - -class GlobalScope extends Scope { - constructor(scopeManager, block) { - super(scopeManager, "global", null, block, false); - this.implicit = { - set: new Map(), - variables: [], - - /** - * List of {@link Reference}s that are left to be resolved (i.e. which - * need to be linked to the variable they refer to). - * @member {Reference[]} Scope#implicit#left - */ - left: [] - }; - } - - __close(scopeManager) { - const implicit = []; - - for (let i = 0, iz = this.__left.length; i < iz; ++i) { - const ref = this.__left[i]; - - if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { - implicit.push(ref.__maybeImplicitGlobal); - } - } - - // create an implicit global variable from assignment expression - for (let i = 0, iz = implicit.length; i < iz; ++i) { - const info = implicit[i]; - - this.__defineImplicit(info.pattern, - new Definition( - Variable.ImplicitGlobalVariable, - info.pattern, - info.node, - null, - null, - null - )); - - } - - this.implicit.left = this.__left; - - return super.__close(scopeManager); - } - - __defineImplicit(node, def) { - if (node && node.type === Syntax.Identifier) { - this.__defineGeneric( - node.name, - this.implicit.set, - this.implicit.variables, - node, - def - ); - } - } -} - -class ModuleScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "module", upperScope, block, false); - } -} - -class FunctionExpressionNameScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "function-expression-name", upperScope, block, false); - this.__define(block.id, - new Definition( - Variable.FunctionName, - block.id, - block, - null, - null, - null - )); - this.functionExpressionScope = true; - } -} - -class CatchScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "catch", upperScope, block, false); - } -} - -class WithScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "with", upperScope, block, false); - } - - __close(scopeManager) { - if (this.__shouldStaticallyClose(scopeManager)) { - return super.__close(scopeManager); - } - - for (let i = 0, iz = this.__left.length; i < iz; ++i) { - const ref = this.__left[i]; - - ref.tainted = true; - this.__delegateToUpperScope(ref); - } - this.__left = null; - - return this.upper; - } -} - -class BlockScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "block", upperScope, block, false); - } -} - -class SwitchScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "switch", upperScope, block, false); - } -} - -class FunctionScope extends Scope { - constructor(scopeManager, upperScope, block, isMethodDefinition) { - super(scopeManager, "function", upperScope, block, isMethodDefinition); - - // section 9.2.13, FunctionDeclarationInstantiation. - // NOTE Arrow functions never have an arguments objects. - if (this.block.type !== Syntax.ArrowFunctionExpression) { - this.__defineArguments(); - } - } - - isArgumentsMaterialized() { - - // TODO(Constellation) - // We can more aggressive on this condition like this. - // - // function t() { - // // arguments of t is always hidden. - // function arguments() { - // } - // } - if (this.block.type === Syntax.ArrowFunctionExpression) { - return false; - } - - if (!this.isStatic()) { - return true; - } - - const variable = this.set.get("arguments"); - - assert(variable, "Always have arguments variable."); - return variable.tainted || variable.references.length !== 0; - } - - isThisMaterialized() { - if (!this.isStatic()) { - return true; - } - return this.thisFound; - } - - __defineArguments() { - this.__defineGeneric( - "arguments", - this.set, - this.variables, - null, - null - ); - this.taints.set("arguments", true); - } - - // References in default parameters isn't resolved to variables which are in their function body. - // const x = 1 - // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. - // const x = 2 - // console.log(a) - // } - __isValidResolution(ref, variable) { - - // If `options.nodejsScope` is true, `this.block` becomes a Program node. - if (this.block.type === "Program") { - return true; - } - - const bodyStart = this.block.body.range[0]; - - // It's invalid resolution in the following case: - return !( - variable.scope === this && - ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. - variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. - ); - } -} - -class ForScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "for", upperScope, block, false); - } -} - -class ClassScope extends Scope { - constructor(scopeManager, upperScope, block) { - super(scopeManager, "class", upperScope, block, false); - } -} - -module.exports = { - Scope, - GlobalScope, - ModuleScope, - FunctionExpressionNameScope, - CatchScope, - WithScope, - BlockScope, - SwitchScope, - FunctionScope, - ForScope, - ClassScope -}; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 721: -/***/ (function(module) { - -"use strict"; -/* - Copyright (C) 2015 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -/** - * A Variable represents a locally scoped identifier. These include arguments to - * functions. - * @class Variable - */ -class Variable { - constructor(name, scope) { - - /** - * The variable name, as given in the source code. - * @member {String} Variable#name - */ - this.name = name; - - /** - * List of defining occurrences of this variable (like in 'var ...' - * statements or as parameter), as AST nodes. - * @member {espree.Identifier[]} Variable#identifiers - */ - this.identifiers = []; - - /** - * List of {@link Reference|references} of this variable (excluding parameter entries) - * in its defining scope and all nested scopes. For defining - * occurrences only see {@link Variable#defs}. - * @member {Reference[]} Variable#references - */ - this.references = []; - - /** - * List of defining occurrences of this variable (like in 'var ...' - * statements or as parameter), as custom objects. - * @member {Definition[]} Variable#defs - */ - this.defs = []; - - this.tainted = false; - - /** - * Whether this is a stack variable. - * @member {boolean} Variable#stack - */ - this.stack = true; - - /** - * Reference to the enclosing Scope. - * @member {Scope} Variable#scope - */ - this.scope = scope; - } -} - -Variable.CatchClause = "CatchClause"; -Variable.Parameter = "Parameter"; -Variable.FunctionName = "FunctionName"; -Variable.ClassName = "ClassName"; -Variable.Variable = "Variable"; -Variable.ImportBinding = "ImportBinding"; -Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; - -module.exports = Variable; - -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 41350: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -/* - Copyright (C) 2014 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -(function () { - 'use strict'; - - var estraverse = __webpack_require__(40274); - - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; - } - - function isProperty(nodeType, key) { - return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties'; - } - - function Visitor(visitor, options) { - options = options || {}; - - this.__visitor = visitor || this; - this.__childVisitorKeys = options.childVisitorKeys - ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys) - : estraverse.VisitorKeys; - if (options.fallback === 'iteration') { - this.__fallback = Object.keys; - } else if (typeof options.fallback === 'function') { - this.__fallback = options.fallback; - } - } - - /* Default method for visiting children. - * When you need to call default visiting operation inside custom visiting - * operation, you can use it with `this.visitChildren(node)`. - */ - Visitor.prototype.visitChildren = function (node) { - var type, children, i, iz, j, jz, child; - - if (node == null) { - return; - } - - type = node.type || estraverse.Syntax.Property; - - children = this.__childVisitorKeys[type]; - if (!children) { - if (this.__fallback) { - children = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + type + '.'); - } - } - - for (i = 0, iz = children.length; i < iz; ++i) { - child = node[children[i]]; - if (child) { - if (Array.isArray(child)) { - for (j = 0, jz = child.length; j < jz; ++j) { - if (child[j]) { - if (isNode(child[j]) || isProperty(type, children[i])) { - this.visit(child[j]); - } - } - } - } else if (isNode(child)) { - this.visit(child); - } - } - } - }; - - /* Dispatching node. */ - Visitor.prototype.visit = function (node) { - var type; - - if (node == null) { - return; - } - - type = node.type || estraverse.Syntax.Property; - if (this.__visitor[type]) { - this.__visitor[type].call(this, node); - return; - } - this.visitChildren(node); - }; - - exports.version = __webpack_require__(14730).version; - exports.Visitor = Visitor; - exports.visit = function (node, visitor, options) { - var v = new Visitor(visitor, options); - v.visit(node); - }; -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 66057: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -/* - Copyright (C) 2012-2013 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*jslint vars:false, bitwise:true*/ -/*jshint indent:4*/ -/*global exports:true*/ -(function clone(exports) { - 'use strict'; - - var Syntax, - VisitorOption, - VisitorKeys, - BREAK, - SKIP, - REMOVE; - - function deepCopy(obj) { - var ret = {}, key, val; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - val = obj[key]; - if (typeof val === 'object' && val !== null) { - ret[key] = deepCopy(val); - } else { - ret[key] = val; - } - } - } - return ret; - } - - // based on LLVM libc++ upper_bound / lower_bound - // MIT License - - function upperBound(array, func) { - var diff, len, i, current; - - len = array.length; - i = 0; - - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - len = diff; - } else { - i = current + 1; - len -= diff + 1; - } - } - return i; - } - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. - ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DirectiveStatement: 'DirectiveStatement', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportExpression: 'ImportExpression', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - - VisitorKeys = { - AssignmentExpression: ['left', 'right'], - AssignmentPattern: ['left', 'right'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'body'], - AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. - BlockStatement: ['body'], - BinaryExpression: ['left', 'right'], - BreakStatement: ['label'], - CallExpression: ['callee', 'arguments'], - CatchClause: ['param', 'body'], - ClassBody: ['body'], - ClassDeclaration: ['id', 'superClass', 'body'], - ClassExpression: ['id', 'superClass', 'body'], - ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. - ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - ConditionalExpression: ['test', 'consequent', 'alternate'], - ContinueStatement: ['label'], - DebuggerStatement: [], - DirectiveStatement: [], - DoWhileStatement: ['body', 'test'], - EmptyStatement: [], - ExportAllDeclaration: ['source'], - ExportDefaultDeclaration: ['declaration'], - ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], - ExportSpecifier: ['exported', 'local'], - ExpressionStatement: ['expression'], - ForStatement: ['init', 'test', 'update', 'body'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - FunctionDeclaration: ['id', 'params', 'body'], - FunctionExpression: ['id', 'params', 'body'], - GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - Identifier: [], - IfStatement: ['test', 'consequent', 'alternate'], - ImportExpression: ['source'], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['local'], - ImportNamespaceSpecifier: ['local'], - ImportSpecifier: ['imported', 'local'], - Literal: [], - LabeledStatement: ['label', 'body'], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MetaProperty: ['meta', 'property'], - MethodDefinition: ['key', 'value'], - ModuleSpecifier: [], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - Program: ['body'], - Property: ['key', 'value'], - RestElement: [ 'argument' ], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - Super: [], - SwitchStatement: ['discriminant', 'cases'], - SwitchCase: ['test', 'consequent'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handler', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'] - }; - - // unique id - BREAK = {}; - SKIP = {}; - REMOVE = {}; - - VisitorOption = { - Break: BREAK, - Skip: SKIP, - Remove: REMOVE - }; - - function Reference(parent, key) { - this.parent = parent; - this.key = key; - } - - Reference.prototype.replace = function replace(node) { - this.parent[this.key] = node; - }; - - Reference.prototype.remove = function remove() { - if (Array.isArray(this.parent)) { - this.parent.splice(this.key, 1); - return true; - } else { - this.replace(null); - return false; - } - }; - - function Element(node, path, wrap, ref) { - this.node = node; - this.path = path; - this.wrap = wrap; - this.ref = ref; - } - - function Controller() { } - - // API: - // return property path array from root to current node - Controller.prototype.path = function path() { - var i, iz, j, jz, result, element; - - function addToPath(result, path) { - if (Array.isArray(path)) { - for (j = 0, jz = path.length; j < jz; ++j) { - result.push(path[j]); - } - } else { - result.push(path); - } - } - - // root node - if (!this.__current.path) { - return null; - } - - // first node is sentinel, second node is root element - result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { - element = this.__leavelist[i]; - addToPath(result, element.path); - } - addToPath(result, this.__current.path); - return result; - }; - - // API: - // return type of current node - Controller.prototype.type = function () { - var node = this.current(); - return node.type || this.__current.wrap; - }; - - // API: - // return array of parent elements - Controller.prototype.parents = function parents() { - var i, iz, result; - - // first node is sentinel - result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { - result.push(this.__leavelist[i].node); - } - - return result; - }; - - // API: - // return current node - Controller.prototype.current = function current() { - return this.__current.node; - }; - - Controller.prototype.__execute = function __execute(callback, element) { - var previous, result; - - result = undefined; - - previous = this.__current; - this.__current = element; - this.__state = null; - if (callback) { - result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); - } - this.__current = previous; - - return result; - }; - - // API: - // notify control skip / break - Controller.prototype.notify = function notify(flag) { - this.__state = flag; - }; - - // API: - // skip child nodes of current node - Controller.prototype.skip = function () { - this.notify(SKIP); - }; - - // API: - // break traversals - Controller.prototype['break'] = function () { - this.notify(BREAK); - }; - - // API: - // remove node - Controller.prototype.remove = function () { - this.notify(REMOVE); - }; - - Controller.prototype.__initialize = function(root, visitor) { - this.visitor = visitor; - this.root = root; - this.__worklist = []; - this.__leavelist = []; - this.__current = null; - this.__state = null; - this.__fallback = null; - if (visitor.fallback === 'iteration') { - this.__fallback = Object.keys; - } else if (typeof visitor.fallback === 'function') { - this.__fallback = visitor.fallback; - } - - this.__keys = VisitorKeys; - if (visitor.keys) { - this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); - } - }; - - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; - } - - function isProperty(nodeType, key) { - return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; - } - - Controller.prototype.traverse = function traverse(root, visitor) { - var worklist, - leavelist, - element, - node, - nodeType, - ret, - key, - current, - current2, - candidates, - candidate, - sentinel; - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - worklist.push(new Element(root, null, null, null)); - leavelist.push(new Element(null, null, null, null)); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - ret = this.__execute(visitor.leave, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - continue; - } - - if (element.node) { - - ret = this.__execute(visitor.enter, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || ret === SKIP) { - continue; - } - - node = element.node; - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', null); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, null); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - worklist.push(new Element(candidate, key, null, null)); - } - } - } - } - }; - - Controller.prototype.replace = function replace(root, visitor) { - var worklist, - leavelist, - node, - nodeType, - target, - element, - current, - current2, - candidates, - candidate, - sentinel, - outer, - key; - - function removeElem(element) { - var i, - key, - nextElem, - parent; - - if (element.ref.remove()) { - // When the reference is an element of an array. - key = element.ref.key; - parent = element.ref.parent; - - // If removed from array, then decrease following items' keys. - i = worklist.length; - while (i--) { - nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { - if (nextElem.ref.key < key) { - break; - } - --nextElem.ref.key; - } - } - } - } - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - outer = { - root: root - }; - element = new Element(root, null, null, new Reference(outer, 'root')); - worklist.push(element); - leavelist.push(element); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - target = this.__execute(visitor.leave, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - continue; - } - - target = this.__execute(visitor.enter, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - element.node = target; - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - element.node = null; - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - - // node may be null - node = element.node; - if (!node) { - continue; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || target === SKIP) { - continue; - } - - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - worklist.push(new Element(candidate, key, null, new Reference(node, key))); - } - } - } - - return outer.root; - }; - - function traverse(root, visitor) { - var controller = new Controller(); - return controller.traverse(root, visitor); - } - - function replace(root, visitor) { - var controller = new Controller(); - return controller.replace(root, visitor); - } - - function extendCommentRange(comment, tokens) { - var target; - - target = upperBound(tokens, function search(token) { - return token.range[0] > comment.range[0]; - }); - - comment.extendedRange = [comment.range[0], comment.range[1]]; - - if (target !== tokens.length) { - comment.extendedRange[1] = tokens[target].range[0]; - } - - target -= 1; - if (target >= 0) { - comment.extendedRange[0] = tokens[target].range[1]; - } - - return comment; - } - - function attachComments(tree, providedComments, tokens) { - // At first, we should calculate extended comment ranges. - var comments = [], comment, len, i, cursor; - - if (!tree.range) { - throw new Error('attachComments needs range information'); - } - - // tokens array is empty, we attach comments to tree as 'leadingComments' - if (!tokens.length) { - if (providedComments.length) { - for (i = 0, len = providedComments.length; i < len; i += 1) { - comment = deepCopy(providedComments[i]); - comment.extendedRange = [0, tree.range[0]]; - comments.push(comment); - } - tree.leadingComments = comments; - } - return tree; - } - - for (i = 0, len = providedComments.length; i < len; i += 1) { - comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } - - // This is based on John Freeman's implementation. - cursor = 0; - traverse(tree, { - enter: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { - break; - } - - if (comment.extendedRange[1] === node.range[0]) { - if (!node.leadingComments) { - node.leadingComments = []; - } - node.leadingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - cursor = 0; - traverse(tree, { - leave: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { - break; - } - - if (node.range[1] === comment.extendedRange[0]) { - if (!node.trailingComments) { - node.trailingComments = []; - } - node.trailingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - return tree; - } - - exports.version = (__webpack_require__(61752)/* .version */ .i8); - exports.Syntax = Syntax; - exports.traverse = traverse; - exports.replace = replace; - exports.attachComments = attachComments; - exports.VisitorKeys = VisitorKeys; - exports.VisitorOption = VisitorOption; - exports.Controller = Controller; - exports.cloneEnvironment = function () { return clone({}); }; - - return exports; -}(exports)); -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 40274: -/***/ (function(__unused_webpack_module, exports) { - -/* - Copyright (C) 2012-2013 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*jslint vars:false, bitwise:true*/ -/*jshint indent:4*/ -/*global exports:true*/ -(function clone(exports) { - 'use strict'; - - var Syntax, - VisitorOption, - VisitorKeys, - BREAK, - SKIP, - REMOVE; - - function deepCopy(obj) { - var ret = {}, key, val; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - val = obj[key]; - if (typeof val === 'object' && val !== null) { - ret[key] = deepCopy(val); - } else { - ret[key] = val; - } - } - } - return ret; - } - - // based on LLVM libc++ upper_bound / lower_bound - // MIT License - - function upperBound(array, func) { - var diff, len, i, current; - - len = array.length; - i = 0; - - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - len = diff; - } else { - i = current + 1; - len -= diff + 1; - } - } - return i; - } - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ChainExpression: 'ChainExpression', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. - ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DirectiveStatement: 'DirectiveStatement', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportExpression: 'ImportExpression', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - PrivateIdentifier: 'PrivateIdentifier', - Program: 'Program', - Property: 'Property', - PropertyDefinition: 'PropertyDefinition', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - - VisitorKeys = { - AssignmentExpression: ['left', 'right'], - AssignmentPattern: ['left', 'right'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'body'], - AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. - BlockStatement: ['body'], - BinaryExpression: ['left', 'right'], - BreakStatement: ['label'], - CallExpression: ['callee', 'arguments'], - CatchClause: ['param', 'body'], - ChainExpression: ['expression'], - ClassBody: ['body'], - ClassDeclaration: ['id', 'superClass', 'body'], - ClassExpression: ['id', 'superClass', 'body'], - ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. - ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - ConditionalExpression: ['test', 'consequent', 'alternate'], - ContinueStatement: ['label'], - DebuggerStatement: [], - DirectiveStatement: [], - DoWhileStatement: ['body', 'test'], - EmptyStatement: [], - ExportAllDeclaration: ['source'], - ExportDefaultDeclaration: ['declaration'], - ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], - ExportSpecifier: ['exported', 'local'], - ExpressionStatement: ['expression'], - ForStatement: ['init', 'test', 'update', 'body'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - FunctionDeclaration: ['id', 'params', 'body'], - FunctionExpression: ['id', 'params', 'body'], - GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - Identifier: [], - IfStatement: ['test', 'consequent', 'alternate'], - ImportExpression: ['source'], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['local'], - ImportNamespaceSpecifier: ['local'], - ImportSpecifier: ['imported', 'local'], - Literal: [], - LabeledStatement: ['label', 'body'], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MetaProperty: ['meta', 'property'], - MethodDefinition: ['key', 'value'], - ModuleSpecifier: [], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - PrivateIdentifier: [], - Program: ['body'], - Property: ['key', 'value'], - PropertyDefinition: ['key', 'value'], - RestElement: [ 'argument' ], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - Super: [], - SwitchStatement: ['discriminant', 'cases'], - SwitchCase: ['test', 'consequent'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handler', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'] - }; - - // unique id - BREAK = {}; - SKIP = {}; - REMOVE = {}; - - VisitorOption = { - Break: BREAK, - Skip: SKIP, - Remove: REMOVE - }; - - function Reference(parent, key) { - this.parent = parent; - this.key = key; - } - - Reference.prototype.replace = function replace(node) { - this.parent[this.key] = node; - }; - - Reference.prototype.remove = function remove() { - if (Array.isArray(this.parent)) { - this.parent.splice(this.key, 1); - return true; - } else { - this.replace(null); - return false; - } - }; - - function Element(node, path, wrap, ref) { - this.node = node; - this.path = path; - this.wrap = wrap; - this.ref = ref; - } - - function Controller() { } - - // API: - // return property path array from root to current node - Controller.prototype.path = function path() { - var i, iz, j, jz, result, element; - - function addToPath(result, path) { - if (Array.isArray(path)) { - for (j = 0, jz = path.length; j < jz; ++j) { - result.push(path[j]); - } - } else { - result.push(path); - } - } - - // root node - if (!this.__current.path) { - return null; - } - - // first node is sentinel, second node is root element - result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { - element = this.__leavelist[i]; - addToPath(result, element.path); - } - addToPath(result, this.__current.path); - return result; - }; - - // API: - // return type of current node - Controller.prototype.type = function () { - var node = this.current(); - return node.type || this.__current.wrap; - }; - - // API: - // return array of parent elements - Controller.prototype.parents = function parents() { - var i, iz, result; - - // first node is sentinel - result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { - result.push(this.__leavelist[i].node); - } - - return result; - }; - - // API: - // return current node - Controller.prototype.current = function current() { - return this.__current.node; - }; - - Controller.prototype.__execute = function __execute(callback, element) { - var previous, result; - - result = undefined; - - previous = this.__current; - this.__current = element; - this.__state = null; - if (callback) { - result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); - } - this.__current = previous; - - return result; - }; - - // API: - // notify control skip / break - Controller.prototype.notify = function notify(flag) { - this.__state = flag; - }; - - // API: - // skip child nodes of current node - Controller.prototype.skip = function () { - this.notify(SKIP); - }; - - // API: - // break traversals - Controller.prototype['break'] = function () { - this.notify(BREAK); - }; - - // API: - // remove node - Controller.prototype.remove = function () { - this.notify(REMOVE); - }; - - Controller.prototype.__initialize = function(root, visitor) { - this.visitor = visitor; - this.root = root; - this.__worklist = []; - this.__leavelist = []; - this.__current = null; - this.__state = null; - this.__fallback = null; - if (visitor.fallback === 'iteration') { - this.__fallback = Object.keys; - } else if (typeof visitor.fallback === 'function') { - this.__fallback = visitor.fallback; - } - - this.__keys = VisitorKeys; - if (visitor.keys) { - this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); - } - }; - - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; - } - - function isProperty(nodeType, key) { - return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; - } - - function candidateExistsInLeaveList(leavelist, candidate) { - for (var i = leavelist.length - 1; i >= 0; --i) { - if (leavelist[i].node === candidate) { - return true; - } - } - return false; - } - - Controller.prototype.traverse = function traverse(root, visitor) { - var worklist, - leavelist, - element, - node, - nodeType, - ret, - key, - current, - current2, - candidates, - candidate, - sentinel; - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - worklist.push(new Element(root, null, null, null)); - leavelist.push(new Element(null, null, null, null)); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - ret = this.__execute(visitor.leave, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - continue; - } - - if (element.node) { - - ret = this.__execute(visitor.enter, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || ret === SKIP) { - continue; - } - - node = element.node; - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - - if (candidateExistsInLeaveList(leavelist, candidate[current2])) { - continue; - } - - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', null); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, null); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - if (candidateExistsInLeaveList(leavelist, candidate)) { - continue; - } - - worklist.push(new Element(candidate, key, null, null)); - } - } - } - } - }; - - Controller.prototype.replace = function replace(root, visitor) { - var worklist, - leavelist, - node, - nodeType, - target, - element, - current, - current2, - candidates, - candidate, - sentinel, - outer, - key; - - function removeElem(element) { - var i, - key, - nextElem, - parent; - - if (element.ref.remove()) { - // When the reference is an element of an array. - key = element.ref.key; - parent = element.ref.parent; - - // If removed from array, then decrease following items' keys. - i = worklist.length; - while (i--) { - nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { - if (nextElem.ref.key < key) { - break; - } - --nextElem.ref.key; - } - } - } - } - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - outer = { - root: root - }; - element = new Element(root, null, null, new Reference(outer, 'root')); - worklist.push(element); - leavelist.push(element); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - target = this.__execute(visitor.leave, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - continue; - } - - target = this.__execute(visitor.enter, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - element.node = target; - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - element.node = null; - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - - // node may be null - node = element.node; - if (!node) { - continue; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || target === SKIP) { - continue; - } - - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - worklist.push(new Element(candidate, key, null, new Reference(node, key))); - } - } - } - - return outer.root; - }; - - function traverse(root, visitor) { - var controller = new Controller(); - return controller.traverse(root, visitor); - } - - function replace(root, visitor) { - var controller = new Controller(); - return controller.replace(root, visitor); - } - - function extendCommentRange(comment, tokens) { - var target; - - target = upperBound(tokens, function search(token) { - return token.range[0] > comment.range[0]; - }); - - comment.extendedRange = [comment.range[0], comment.range[1]]; - - if (target !== tokens.length) { - comment.extendedRange[1] = tokens[target].range[0]; - } - - target -= 1; - if (target >= 0) { - comment.extendedRange[0] = tokens[target].range[1]; - } - - return comment; - } - - function attachComments(tree, providedComments, tokens) { - // At first, we should calculate extended comment ranges. - var comments = [], comment, len, i, cursor; - - if (!tree.range) { - throw new Error('attachComments needs range information'); - } - - // tokens array is empty, we attach comments to tree as 'leadingComments' - if (!tokens.length) { - if (providedComments.length) { - for (i = 0, len = providedComments.length; i < len; i += 1) { - comment = deepCopy(providedComments[i]); - comment.extendedRange = [0, tree.range[0]]; - comments.push(comment); - } - tree.leadingComments = comments; - } - return tree; - } - - for (i = 0, len = providedComments.length; i < len; i += 1) { - comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } - - // This is based on John Freeman's implementation. - cursor = 0; - traverse(tree, { - enter: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { - break; - } - - if (comment.extendedRange[1] === node.range[0]) { - if (!node.leadingComments) { - node.leadingComments = []; - } - node.leadingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - cursor = 0; - traverse(tree, { - leave: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { - break; - } - - if (node.range[1] === comment.extendedRange[0]) { - if (!node.trailingComments) { - node.trailingComments = []; - } - node.trailingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - return tree; - } - - exports.Syntax = Syntax; - exports.traverse = traverse; - exports.replace = replace; - exports.attachComments = attachComments; - exports.VisitorKeys = VisitorKeys; - exports.VisitorOption = VisitorOption; - exports.Controller = Controller; - exports.cloneEnvironment = function () { return clone({}); }; - - return exports; -}(exports)); -/* vim: set sw=4 ts=4 et tw=80 : */ - - -/***/ }), - -/***/ 72544: -/***/ (function(module) { - -module.exports = function (glob, opts) { - if (typeof glob !== 'string') { - throw new TypeError('Expected a string'); - } - - var str = String(glob); - - // The regexp we are building, as a string. - var reStr = ""; - - // Whether we are matching so called "extended" globs (like bash) and should - // support single character matching, matching ranges of characters, group - // matching, etc. - var extended = opts ? !!opts.extended : false; - - // When globstar is _false_ (default), '/foo/*' is translated a regexp like - // '^\/foo\/.*$' which will match any string beginning with '/foo/' - // When globstar is _true_, '/foo/*' is translated to regexp like - // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT - // which does not have a '/' to the right of it. - // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but - // these will not '/foo/bar/baz', '/foo/bar/baz.txt' - // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when - // globstar is _false_ - var globstar = opts ? !!opts.globstar : false; - - // If we are doing extended matching, this boolean is true when we are inside - // a group (eg {*.html,*.js}), and false otherwise. - var inGroup = false; - - // RegExp flags (eg "i" ) to pass in to RegExp constructor. - var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : ""; - - var c; - for (var i = 0, len = str.length; i < len; i++) { - c = str[i]; - - switch (c) { - case "/": - case "$": - case "^": - case "+": - case ".": - case "(": - case ")": - case "=": - case "!": - case "|": - reStr += "\\" + c; - break; - - case "?": - if (extended) { - reStr += "."; - break; - } - - case "[": - case "]": - if (extended) { - reStr += c; - break; - } - - case "{": - if (extended) { - inGroup = true; - reStr += "("; - break; - } - - case "}": - if (extended) { - inGroup = false; - reStr += ")"; - break; - } - - case ",": - if (inGroup) { - reStr += "|"; - break; - } - reStr += "\\" + c; - break; - - case "*": - // Move over all consecutive "*"'s. - // Also store the previous and next characters - var prevChar = str[i - 1]; - var starCount = 1; - while(str[i + 1] === "*") { - starCount++; - i++; - } - var nextChar = str[i + 1]; - - if (!globstar) { - // globstar is disabled, so treat any number of "*" as one - reStr += ".*"; - } else { - // globstar is enabled, so determine if this is a globstar segment - var isGlobstar = starCount > 1 // multiple "*"'s - && (prevChar === "/" || prevChar === undefined) // from the start of the segment - && (nextChar === "/" || nextChar === undefined) // to the end of the segment - - if (isGlobstar) { - // it's a globstar, so match zero or more path segments - reStr += "((?:[^/]*(?:\/|$))*)"; - i++; // move over the "/" - } else { - // it's not a globstar, so only match one path segment - reStr += "([^/]*)"; - } - } - break; - - default: - reStr += c; - } - } - - // When regexp 'g' flag is specified don't - // constrain the regular expression with ^ & $ - if (!flags || !~flags.indexOf('g')) { - reStr = "^" + reStr + "$"; - } - - return new RegExp(reStr, flags); -}; - - -/***/ }), - -/***/ 96045: -/***/ (function(module) { - -"use strict"; - - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), - -/***/ 41653: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fs = __webpack_require__(57147) -var polyfills = __webpack_require__(50008) -var legacy = __webpack_require__(17448) -var clone = __webpack_require__(96045) - -var util = __webpack_require__(73837) - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __webpack_require__(39491).equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readdir(path, options, cb) - - function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - }) - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} - - -/***/ }), - -/***/ 17448: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var Stream = (__webpack_require__(12781).Stream) - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), - -/***/ 50008: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var constants = __webpack_require__(22057) - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - }})(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} - - -/***/ }), - -/***/ 85685: -/***/ (function(module) { - -"use strict"; - - -const hexify = char => { - const h = char.charCodeAt(0).toString(16).toUpperCase() - return '0x' + (h.length % 2 ? '0' : '') + h -} - -const parseError = (e, txt, context) => { - if (!txt) { - return { - message: e.message + ' while parsing empty string', - position: 0, - } - } - const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i) - const errIdx = badToken ? +badToken[2] - : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 - : null - - const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${ - JSON.stringify(badToken[1]) - } (${hexify(badToken[1])})`) - : e.message - - if (errIdx !== null && errIdx !== undefined) { - const start = errIdx <= context ? 0 - : errIdx - context - - const end = errIdx + context >= txt.length ? txt.length - : errIdx + context - - const slice = (start === 0 ? '' : '...') + - txt.slice(start, end) + - (end === txt.length ? '' : '...') - - const near = txt === slice ? '' : 'near ' - - return { - message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, - position: errIdx, - } - } else { - return { - message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, - position: 0, - } - } -} - -class JSONParseError extends SyntaxError { - constructor (er, txt, context, caller) { - context = context || 20 - const metadata = parseError(er, txt, context) - super(metadata.message) - Object.assign(this, metadata) - this.code = 'EJSONPARSE' - this.systemError = er - Error.captureStackTrace(this, caller || this.constructor) - } - get name () { return this.constructor.name } - set name (n) {} - get [Symbol.toStringTag] () { return this.constructor.name } -} - -const kIndent = Symbol.for('indent') -const kNewline = Symbol.for('newline') -// only respect indentation if we got a line break, otherwise squash it -// things other than objects and arrays aren't indented, so ignore those -// Important: in both of these regexps, the $1 capture group is the newline -// or undefined, and the $2 capture group is the indent, or undefined. -const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/ -const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/ - -const parseJson = (txt, reviver, context) => { - const parseText = stripBOM(txt) - context = context || 20 - try { - // get the indentation so that we can save it back nicely - // if the file starts with {" then we have an indent of '', ie, none - // otherwise, pick the indentation of the next line after the first \n - // If the pattern doesn't match, then it means no indentation. - // JSON.stringify ignores symbols, so this is reasonably safe. - // if the string is '{}' or '[]', then use the default 2-space indent. - const [, newline = '\n', indent = ' '] = parseText.match(emptyRE) || - parseText.match(formatRE) || - [, '', ''] - - const result = JSON.parse(parseText, reviver) - if (result && typeof result === 'object') { - result[kNewline] = newline - result[kIndent] = indent - } - return result - } catch (e) { - if (typeof txt !== 'string' && !Buffer.isBuffer(txt)) { - const isEmptyArray = Array.isArray(txt) && txt.length === 0 - throw Object.assign(new TypeError( - `Cannot parse ${isEmptyArray ? 'an empty array' : String(txt)}` - ), { - code: 'EJSONPARSE', - systemError: e, - }) - } - - throw new JSONParseError(e, parseText, context, parseJson) - } -} - -// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) -// because the buffer-to-string conversion in `fs.readFileSync()` -// translates it to FEFF, the UTF-16 BOM. -const stripBOM = txt => String(txt).replace(/^\uFEFF/, '') - -module.exports = parseJson -parseJson.JSONParseError = JSONParseError - -parseJson.noExceptions = (txt, reviver) => { - try { - return JSON.parse(stripBOM(txt), reviver) - } catch (e) {} -} - - -/***/ }), - -/***/ 46843: -/***/ (function(module) { - -"use strict"; - - -class LoadingLoaderError extends Error { - constructor(message) { - super(message); - this.name = "LoaderRunnerError"; - Error.captureStackTrace(this, this.constructor); - } -} - -module.exports = LoadingLoaderError; - - -/***/ }), - -/***/ 91256: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -var fs = __webpack_require__(57147); -var readFile = fs.readFile.bind(fs); -var loadLoader = __webpack_require__(66470); - -function utf8BufferToString(buf) { - var str = buf.toString("utf-8"); - if(str.charCodeAt(0) === 0xFEFF) { - return str.substr(1); - } else { - return str; - } -} - -const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; - -/** - * @param {string} str the path with query and fragment - * @returns {{ path: string, query: string, fragment: string }} parsed parts - */ -function parsePathQueryFragment(str) { - var match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); - return { - path: match[1].replace(/\0(.)/g, "$1"), - query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", - fragment: match[3] || "" - }; -} - -function dirname(path) { - if(path === "/") return "/"; - var i = path.lastIndexOf("/"); - var j = path.lastIndexOf("\\"); - var i2 = path.indexOf("/"); - var j2 = path.indexOf("\\"); - var idx = i > j ? i : j; - var idx2 = i > j ? i2 : j2; - if(idx < 0) return path; - if(idx === idx2) return path.substr(0, idx + 1); - return path.substr(0, idx); -} - -function createLoaderObject(loader) { - var obj = { - path: null, - query: null, - fragment: null, - options: null, - ident: null, - normal: null, - pitch: null, - raw: null, - data: null, - pitchExecuted: false, - normalExecuted: false - }; - Object.defineProperty(obj, "request", { - enumerable: true, - get: function() { - return obj.path.replace(/#/g, "\0#") + obj.query.replace(/#/g, "\0#") + obj.fragment; - }, - set: function(value) { - if(typeof value === "string") { - var splittedRequest = parsePathQueryFragment(value); - obj.path = splittedRequest.path; - obj.query = splittedRequest.query; - obj.fragment = splittedRequest.fragment; - obj.options = undefined; - obj.ident = undefined; - } else { - if(!value.loader) - throw new Error("request should be a string or object with loader and options (" + JSON.stringify(value) + ")"); - obj.path = value.loader; - obj.fragment = value.fragment || ""; - obj.type = value.type; - obj.options = value.options; - obj.ident = value.ident; - if(obj.options === null) - obj.query = ""; - else if(obj.options === undefined) - obj.query = ""; - else if(typeof obj.options === "string") - obj.query = "?" + obj.options; - else if(obj.ident) - obj.query = "??" + obj.ident; - else if(typeof obj.options === "object" && obj.options.ident) - obj.query = "??" + obj.options.ident; - else - obj.query = "?" + JSON.stringify(obj.options); - } - } - }); - obj.request = loader; - if(Object.preventExtensions) { - Object.preventExtensions(obj); - } - return obj; -} - -function runSyncOrAsync(fn, context, args, callback) { - var isSync = true; - var isDone = false; - var isError = false; // internal error - var reportedError = false; - context.async = function async() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("async(): The callback was already called."); - } - isSync = false; - return innerCallback; - }; - var innerCallback = context.callback = function() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("callback(): The callback was already called."); - } - isDone = true; - isSync = false; - try { - callback.apply(null, arguments); - } catch(e) { - isError = true; - throw e; - } - }; - try { - var result = (function LOADER_EXECUTION() { - return fn.apply(context, args); - }()); - if(isSync) { - isDone = true; - if(result === undefined) - return callback(); - if(result && typeof result === "object" && typeof result.then === "function") { - return result.then(function(r) { - callback(null, r); - }, callback); - } - return callback(null, result); - } - } catch(e) { - if(isError) throw e; - if(isDone) { - // loader is already "done", so we cannot use the callback function - // for better debugging we print the error on the console - if(typeof e === "object" && e.stack) console.error(e.stack); - else console.error(e); - return; - } - isDone = true; - reportedError = true; - callback(e); - } - -} - -function convertArgs(args, raw) { - if(!raw && Buffer.isBuffer(args[0])) - args[0] = utf8BufferToString(args[0]); - else if(raw && typeof args[0] === "string") - args[0] = Buffer.from(args[0], "utf-8"); -} - -function iteratePitchingLoaders(options, loaderContext, callback) { - // abort after last loader - if(loaderContext.loaderIndex >= loaderContext.loaders.length) - return processResource(options, loaderContext, callback); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.pitchExecuted) { - loaderContext.loaderIndex++; - return iteratePitchingLoaders(options, loaderContext, callback); - } - - // load loader module - loadLoader(currentLoaderObject, function(err) { - if(err) { - loaderContext.cacheable(false); - return callback(err); - } - var fn = currentLoaderObject.pitch; - currentLoaderObject.pitchExecuted = true; - if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); - - runSyncOrAsync( - fn, - loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], - function(err) { - if(err) return callback(err); - var args = Array.prototype.slice.call(arguments, 1); - // Determine whether to continue the pitching process based on - // argument values (as opposed to argument presence) in order - // to support synchronous and asynchronous usages. - var hasArg = args.some(function(value) { - return value !== undefined; - }); - if(hasArg) { - loaderContext.loaderIndex--; - iterateNormalLoaders(options, loaderContext, args, callback); - } else { - iteratePitchingLoaders(options, loaderContext, callback); - } - } - ); - }); -} - -function processResource(options, loaderContext, callback) { - // set loader index to last loader - loaderContext.loaderIndex = loaderContext.loaders.length - 1; - - var resourcePath = loaderContext.resourcePath; - if(resourcePath) { - options.processResource(loaderContext, resourcePath, function(err, buffer) { - if(err) return callback(err); - options.resourceBuffer = buffer; - iterateNormalLoaders(options, loaderContext, [buffer], callback); - }); - } else { - iterateNormalLoaders(options, loaderContext, [null], callback); - } -} - -function iterateNormalLoaders(options, loaderContext, args, callback) { - if(loaderContext.loaderIndex < 0) - return callback(null, args); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.normalExecuted) { - loaderContext.loaderIndex--; - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - var fn = currentLoaderObject.normal; - currentLoaderObject.normalExecuted = true; - if(!fn) { - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - convertArgs(args, currentLoaderObject.raw); - - runSyncOrAsync(fn, loaderContext, args, function(err) { - if(err) return callback(err); - - var args = Array.prototype.slice.call(arguments, 1); - iterateNormalLoaders(options, loaderContext, args, callback); - }); -} - -exports.getContext = function getContext(resource) { - var path = parsePathQueryFragment(resource).path; - return dirname(path); -}; - -exports.runLoaders = function runLoaders(options, callback) { - // read options - var resource = options.resource || ""; - var loaders = options.loaders || []; - var loaderContext = options.context || {}; - var processResource = options.processResource || ((readResource, context, resource, callback) => { - context.addDependency(resource); - readResource(resource, callback); - }).bind(null, options.readResource || readFile); - - // - var splittedResource = resource && parsePathQueryFragment(resource); - var resourcePath = splittedResource ? splittedResource.path : undefined; - var resourceQuery = splittedResource ? splittedResource.query : undefined; - var resourceFragment = splittedResource ? splittedResource.fragment : undefined; - var contextDirectory = resourcePath ? dirname(resourcePath) : null; - - // execution state - var requestCacheable = true; - var fileDependencies = []; - var contextDependencies = []; - var missingDependencies = []; - - // prepare loader objects - loaders = loaders.map(createLoaderObject); - - loaderContext.context = contextDirectory; - loaderContext.loaderIndex = 0; - loaderContext.loaders = loaders; - loaderContext.resourcePath = resourcePath; - loaderContext.resourceQuery = resourceQuery; - loaderContext.resourceFragment = resourceFragment; - loaderContext.async = null; - loaderContext.callback = null; - loaderContext.cacheable = function cacheable(flag) { - if(flag === false) { - requestCacheable = false; - } - }; - loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { - fileDependencies.push(file); - }; - loaderContext.addContextDependency = function addContextDependency(context) { - contextDependencies.push(context); - }; - loaderContext.addMissingDependency = function addMissingDependency(context) { - missingDependencies.push(context); - }; - loaderContext.getDependencies = function getDependencies() { - return fileDependencies.slice(); - }; - loaderContext.getContextDependencies = function getContextDependencies() { - return contextDependencies.slice(); - }; - loaderContext.getMissingDependencies = function getMissingDependencies() { - return missingDependencies.slice(); - }; - loaderContext.clearDependencies = function clearDependencies() { - fileDependencies.length = 0; - contextDependencies.length = 0; - missingDependencies.length = 0; - requestCacheable = true; - }; - Object.defineProperty(loaderContext, "resource", { - enumerable: true, - get: function() { - if(loaderContext.resourcePath === undefined) - return undefined; - return loaderContext.resourcePath.replace(/#/g, "\0#") + loaderContext.resourceQuery.replace(/#/g, "\0#") + loaderContext.resourceFragment; - }, - set: function(value) { - var splittedResource = value && parsePathQueryFragment(value); - loaderContext.resourcePath = splittedResource ? splittedResource.path : undefined; - loaderContext.resourceQuery = splittedResource ? splittedResource.query : undefined; - loaderContext.resourceFragment = splittedResource ? splittedResource.fragment : undefined; - } - }); - Object.defineProperty(loaderContext, "request", { - enumerable: true, - get: function() { - return loaderContext.loaders.map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "remainingRequest", { - enumerable: true, - get: function() { - if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) - return ""; - return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "currentRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "previousRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { - return o.request; - }).join("!"); - } - }); - Object.defineProperty(loaderContext, "query", { - enumerable: true, - get: function() { - var entry = loaderContext.loaders[loaderContext.loaderIndex]; - return entry.options && typeof entry.options === "object" ? entry.options : entry.query; - } - }); - Object.defineProperty(loaderContext, "data", { - enumerable: true, - get: function() { - return loaderContext.loaders[loaderContext.loaderIndex].data; - } - }); - - // finish loader context - if(Object.preventExtensions) { - Object.preventExtensions(loaderContext); - } - - var processOptions = { - resourceBuffer: null, - processResource: processResource - }; - iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { - if(err) { - return callback(err, { - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - } - callback(null, { - result: result, - resourceBuffer: processOptions.resourceBuffer, - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - }); -}; - - -/***/ }), - -/***/ 66470: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var LoaderLoadingError = __webpack_require__(46843); -var url; - -module.exports = function loadLoader(loader, callback) { - if(loader.type === "module") { - try { - if(url === undefined) url = __webpack_require__(57310); - var loaderUrl = url.pathToFileURL(loader.path); - var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); - modulePromise.then(function(module) { - handleResult(loader, module, callback); - }, callback); - return; - } catch(e) { - callback(e); - } - } else { - try { - var module = require(loader.path); - } catch(e) { - // it is possible for node to choke on a require if the FD descriptor - // limit has been reached. give it a chance to recover. - if(e instanceof Error && e.code === "EMFILE") { - var retry = loadLoader.bind(null, loader, callback); - if(typeof setImmediate === "function") { - // node >= 0.9.0 - return setImmediate(retry); - } else { - // node < 0.9.0 - return process.nextTick(retry); - } - } - return callback(e); - } - return handleResult(loader, module, callback); - } -}; - -function handleResult(loader, module, callback) { - if(typeof module !== "function" && typeof module !== "object") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (export function or es6 module)" - )); - } - loader.normal = typeof module === "function" ? module : module.default; - loader.pitch = module.pitch; - loader.raw = module.raw; - if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" - )); - } - callback(); -} - - -/***/ }), - -/***/ 58469: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __webpack_require__(66282) - - -/***/ }), - -/***/ 92414: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __webpack_require__(58469) -var extname = (__webpack_require__(71017).extname) - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ 62825: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ - value: true -}); -exports.Z = void 0; - -const { - stringHints, - numberHints -} = __webpack_require__(86601); -/** @typedef {import("json-schema").JSONSchema6} JSONSchema6 */ - -/** @typedef {import("json-schema").JSONSchema7} JSONSchema7 */ - -/** @typedef {import("./validate").Schema} Schema */ - -/** @typedef {import("./validate").ValidationErrorConfiguration} ValidationErrorConfiguration */ - -/** @typedef {import("./validate").PostFormatter} PostFormatter */ - -/** @typedef {import("./validate").SchemaUtilErrorObject} SchemaUtilErrorObject */ - -/** @enum {number} */ - - -const SPECIFICITY = { - type: 1, - not: 1, - oneOf: 1, - anyOf: 1, - if: 1, - enum: 1, - const: 1, - instanceof: 1, - required: 2, - pattern: 2, - patternRequired: 2, - format: 2, - formatMinimum: 2, - formatMaximum: 2, - minimum: 2, - exclusiveMinimum: 2, - maximum: 2, - exclusiveMaximum: 2, - multipleOf: 2, - uniqueItems: 2, - contains: 2, - minLength: 2, - maxLength: 2, - minItems: 2, - maxItems: 2, - minProperties: 2, - maxProperties: 2, - dependencies: 2, - propertyNames: 2, - additionalItems: 2, - additionalProperties: 2, - absolutePath: 2 -}; -/** - * - * @param {Array} array - * @param {(item: SchemaUtilErrorObject) => number} fn - * @returns {Array} - */ - -function filterMax(array, fn) { - const evaluatedMax = array.reduce((max, item) => Math.max(max, fn(item)), 0); - return array.filter(item => fn(item) === evaluatedMax); -} -/** - * - * @param {Array} children - * @returns {Array} - */ - - -function filterChildren(children) { - let newChildren = children; - newChildren = filterMax(newChildren, - /** - * - * @param {SchemaUtilErrorObject} error - * @returns {number} - */ - error => error.dataPath ? error.dataPath.length : 0); - newChildren = filterMax(newChildren, - /** - * @param {SchemaUtilErrorObject} error - * @returns {number} - */ - error => SPECIFICITY[ - /** @type {keyof typeof SPECIFICITY} */ - error.keyword] || 2); - return newChildren; -} -/** - * Find all children errors - * @param {Array} children - * @param {Array} schemaPaths - * @return {number} returns index of first child - */ - - -function findAllChildren(children, schemaPaths) { - let i = children.length - 1; - - const predicate = - /** - * @param {string} schemaPath - * @returns {boolean} - */ - schemaPath => children[i].schemaPath.indexOf(schemaPath) !== 0; - - while (i > -1 && !schemaPaths.every(predicate)) { - if (children[i].keyword === "anyOf" || children[i].keyword === "oneOf") { - const refs = extractRefs(children[i]); - const childrenStart = findAllChildren(children.slice(0, i), refs.concat(children[i].schemaPath)); - i = childrenStart - 1; - } else { - i -= 1; - } - } - - return i + 1; -} -/** - * Extracts all refs from schema - * @param {SchemaUtilErrorObject} error - * @return {Array} - */ - - -function extractRefs(error) { - const { - schema - } = error; - - if (!Array.isArray(schema)) { - return []; - } - - return schema.map(({ - $ref - }) => $ref).filter(s => s); -} -/** - * Groups children by their first level parent (assuming that error is root) - * @param {Array} children - * @return {Array} - */ - - -function groupChildrenByFirstChild(children) { - const result = []; - let i = children.length - 1; - - while (i > 0) { - const child = children[i]; - - if (child.keyword === "anyOf" || child.keyword === "oneOf") { - const refs = extractRefs(child); - const childrenStart = findAllChildren(children.slice(0, i), refs.concat(child.schemaPath)); - - if (childrenStart !== i) { - result.push(Object.assign({}, child, { - children: children.slice(childrenStart, i) - })); - i = childrenStart; - } else { - result.push(child); - } - } else { - result.push(child); - } - - i -= 1; - } - - if (i === 0) { - result.push(children[i]); - } - - return result.reverse(); -} -/** - * @param {string} str - * @param {string} prefix - * @returns {string} - */ - - -function indent(str, prefix) { - return str.replace(/\n(?!$)/g, `\n${prefix}`); -} -/** - * @param {Schema} schema - * @returns {schema is (Schema & {not: Schema})} - */ - - -function hasNotInSchema(schema) { - return !!schema.not; -} -/** - * @param {Schema} schema - * @return {Schema} - */ - - -function findFirstTypedSchema(schema) { - if (hasNotInSchema(schema)) { - return findFirstTypedSchema(schema.not); - } - - return schema; -} -/** - * @param {Schema} schema - * @return {boolean} - */ - - -function canApplyNot(schema) { - const typedSchema = findFirstTypedSchema(schema); - return likeNumber(typedSchema) || likeInteger(typedSchema) || likeString(typedSchema) || likeNull(typedSchema) || likeBoolean(typedSchema); -} -/** - * @param {any} maybeObj - * @returns {boolean} - */ - - -function isObject(maybeObj) { - return typeof maybeObj === "object" && maybeObj !== null; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeNumber(schema) { - return schema.type === "number" || typeof schema.minimum !== "undefined" || typeof schema.exclusiveMinimum !== "undefined" || typeof schema.maximum !== "undefined" || typeof schema.exclusiveMaximum !== "undefined" || typeof schema.multipleOf !== "undefined"; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeInteger(schema) { - return schema.type === "integer" || typeof schema.minimum !== "undefined" || typeof schema.exclusiveMinimum !== "undefined" || typeof schema.maximum !== "undefined" || typeof schema.exclusiveMaximum !== "undefined" || typeof schema.multipleOf !== "undefined"; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeString(schema) { - return schema.type === "string" || typeof schema.minLength !== "undefined" || typeof schema.maxLength !== "undefined" || typeof schema.pattern !== "undefined" || typeof schema.format !== "undefined" || typeof schema.formatMinimum !== "undefined" || typeof schema.formatMaximum !== "undefined"; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeBoolean(schema) { - return schema.type === "boolean"; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeArray(schema) { - return schema.type === "array" || typeof schema.minItems === "number" || typeof schema.maxItems === "number" || typeof schema.uniqueItems !== "undefined" || typeof schema.items !== "undefined" || typeof schema.additionalItems !== "undefined" || typeof schema.contains !== "undefined"; -} -/** - * @param {Schema & {patternRequired?: Array}} schema - * @returns {boolean} - */ - - -function likeObject(schema) { - return schema.type === "object" || typeof schema.minProperties !== "undefined" || typeof schema.maxProperties !== "undefined" || typeof schema.required !== "undefined" || typeof schema.properties !== "undefined" || typeof schema.patternProperties !== "undefined" || typeof schema.additionalProperties !== "undefined" || typeof schema.dependencies !== "undefined" || typeof schema.propertyNames !== "undefined" || typeof schema.patternRequired !== "undefined"; -} -/** - * @param {Schema} schema - * @returns {boolean} - */ - - -function likeNull(schema) { - return schema.type === "null"; -} -/** - * @param {string} type - * @returns {string} - */ - - -function getArticle(type) { - if (/^[aeiou]/i.test(type)) { - return "an"; - } - - return "a"; -} -/** - * @param {Schema=} schema - * @returns {string} - */ - - -function getSchemaNonTypes(schema) { - if (!schema) { - return ""; - } - - if (!schema.type) { - if (likeNumber(schema) || likeInteger(schema)) { - return " | should be any non-number"; - } - - if (likeString(schema)) { - return " | should be any non-string"; - } - - if (likeArray(schema)) { - return " | should be any non-array"; - } - - if (likeObject(schema)) { - return " | should be any non-object"; - } - } - - return ""; -} -/** - * @param {Array} hints - * @returns {string} - */ - - -function formatHints(hints) { - return hints.length > 0 ? `(${hints.join(", ")})` : ""; -} -/** - * @param {Schema} schema - * @param {boolean} logic - * @returns {string[]} - */ - - -function getHints(schema, logic) { - if (likeNumber(schema) || likeInteger(schema)) { - return numberHints(schema, logic); - } else if (likeString(schema)) { - return stringHints(schema, logic); - } - - return []; -} - -class ValidationError extends Error { - /** - * @param {Array} errors - * @param {Schema} schema - * @param {ValidationErrorConfiguration} configuration - */ - constructor(errors, schema, configuration = {}) { - super(); - /** @type {string} */ - - this.name = "ValidationError"; - /** @type {Array} */ - - this.errors = errors; - /** @type {Schema} */ - - this.schema = schema; - let headerNameFromSchema; - let baseDataPathFromSchema; - - if (schema.title && (!configuration.name || !configuration.baseDataPath)) { - const splittedTitleFromSchema = schema.title.match(/^(.+) (.+)$/); - - if (splittedTitleFromSchema) { - if (!configuration.name) { - [, headerNameFromSchema] = splittedTitleFromSchema; - } - - if (!configuration.baseDataPath) { - [,, baseDataPathFromSchema] = splittedTitleFromSchema; - } - } - } - /** @type {string} */ - - - this.headerName = configuration.name || headerNameFromSchema || "Object"; - /** @type {string} */ - - this.baseDataPath = configuration.baseDataPath || baseDataPathFromSchema || "configuration"; - /** @type {PostFormatter | null} */ - - this.postFormatter = configuration.postFormatter || null; - const header = `Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`; - /** @type {string} */ - - this.message = `${header}${this.formatValidationErrors(errors)}`; - Error.captureStackTrace(this, this.constructor); - } - /** - * @param {string} path - * @returns {Schema} - */ - - - getSchemaPart(path) { - const newPath = path.split("/"); - let schemaPart = this.schema; - - for (let i = 1; i < newPath.length; i++) { - const inner = schemaPart[ - /** @type {keyof Schema} */ - newPath[i]]; - - if (!inner) { - break; - } - - schemaPart = inner; - } - - return schemaPart; - } - /** - * @param {Schema} schema - * @param {boolean} logic - * @param {Array} prevSchemas - * @returns {string} - */ - - - formatSchema(schema, logic = true, prevSchemas = []) { - let newLogic = logic; - - const formatInnerSchema = - /** - * - * @param {Object} innerSchema - * @param {boolean=} addSelf - * @returns {string} - */ - (innerSchema, addSelf) => { - if (!addSelf) { - return this.formatSchema(innerSchema, newLogic, prevSchemas); - } - - if (prevSchemas.includes(innerSchema)) { - return "(recursive)"; - } - - return this.formatSchema(innerSchema, newLogic, prevSchemas.concat(schema)); - }; - - if (hasNotInSchema(schema) && !likeObject(schema)) { - if (canApplyNot(schema.not)) { - newLogic = !logic; - return formatInnerSchema(schema.not); - } - - const needApplyLogicHere = !schema.not.not; - const prefix = logic ? "" : "non "; - newLogic = !logic; - return needApplyLogicHere ? prefix + formatInnerSchema(schema.not) : formatInnerSchema(schema.not); - } - - if ( - /** @type {Schema & {instanceof: string | Array}} */ - schema.instanceof) { - const { - instanceof: value - } = - /** @type {Schema & {instanceof: string | Array}} */ - schema; - const values = !Array.isArray(value) ? [value] : value; - return values.map( - /** - * @param {string} item - * @returns {string} - */ - item => item === "Function" ? "function" : item).join(" | "); - } - - if (schema.enum) { - return ( - /** @type {Array} */ - schema.enum.map(item => JSON.stringify(item)).join(" | ") - ); - } - - if (typeof schema.const !== "undefined") { - return JSON.stringify(schema.const); - } - - if (schema.oneOf) { - return ( - /** @type {Array} */ - schema.oneOf.map(item => formatInnerSchema(item, true)).join(" | ") - ); - } - - if (schema.anyOf) { - return ( - /** @type {Array} */ - schema.anyOf.map(item => formatInnerSchema(item, true)).join(" | ") - ); - } - - if (schema.allOf) { - return ( - /** @type {Array} */ - schema.allOf.map(item => formatInnerSchema(item, true)).join(" & ") - ); - } - - if ( - /** @type {JSONSchema7} */ - schema.if) { - const { - if: ifValue, - then: thenValue, - else: elseValue - } = - /** @type {JSONSchema7} */ - schema; - return `${ifValue ? `if ${formatInnerSchema(ifValue)}` : ""}${thenValue ? ` then ${formatInnerSchema(thenValue)}` : ""}${elseValue ? ` else ${formatInnerSchema(elseValue)}` : ""}`; - } - - if (schema.$ref) { - return formatInnerSchema(this.getSchemaPart(schema.$ref), true); - } - - if (likeNumber(schema) || likeInteger(schema)) { - const [type, ...hints] = getHints(schema, logic); - const str = `${type}${hints.length > 0 ? ` ${formatHints(hints)}` : ""}`; - return logic ? str : hints.length > 0 ? `non-${type} | ${str}` : `non-${type}`; - } - - if (likeString(schema)) { - const [type, ...hints] = getHints(schema, logic); - const str = `${type}${hints.length > 0 ? ` ${formatHints(hints)}` : ""}`; - return logic ? str : str === "string" ? "non-string" : `non-string | ${str}`; - } - - if (likeBoolean(schema)) { - return `${logic ? "" : "non-"}boolean`; - } - - if (likeArray(schema)) { - // not logic already applied in formatValidationError - newLogic = true; - const hints = []; - - if (typeof schema.minItems === "number") { - hints.push(`should not have fewer than ${schema.minItems} item${schema.minItems > 1 ? "s" : ""}`); - } - - if (typeof schema.maxItems === "number") { - hints.push(`should not have more than ${schema.maxItems} item${schema.maxItems > 1 ? "s" : ""}`); - } - - if (schema.uniqueItems) { - hints.push("should not have duplicate items"); - } - - const hasAdditionalItems = typeof schema.additionalItems === "undefined" || Boolean(schema.additionalItems); - let items = ""; - - if (schema.items) { - if (Array.isArray(schema.items) && schema.items.length > 0) { - items = `${ - /** @type {Array} */ - schema.items.map(item => formatInnerSchema(item)).join(", ")}`; - - if (hasAdditionalItems) { - if (schema.additionalItems && isObject(schema.additionalItems) && Object.keys(schema.additionalItems).length > 0) { - hints.push(`additional items should be ${formatInnerSchema(schema.additionalItems)}`); - } - } - } else if (schema.items && Object.keys(schema.items).length > 0) { - // "additionalItems" is ignored - items = `${formatInnerSchema(schema.items)}`; - } else { - // Fallback for empty `items` value - items = "any"; - } - } else { - // "additionalItems" is ignored - items = "any"; - } - - if (schema.contains && Object.keys(schema.contains).length > 0) { - hints.push(`should contains at least one ${this.formatSchema(schema.contains)} item`); - } - - return `[${items}${hasAdditionalItems ? ", ..." : ""}]${hints.length > 0 ? ` (${hints.join(", ")})` : ""}`; - } - - if (likeObject(schema)) { - // not logic already applied in formatValidationError - newLogic = true; - const hints = []; - - if (typeof schema.minProperties === "number") { - hints.push(`should not have fewer than ${schema.minProperties} ${schema.minProperties > 1 ? "properties" : "property"}`); - } - - if (typeof schema.maxProperties === "number") { - hints.push(`should not have more than ${schema.maxProperties} ${schema.minProperties && schema.minProperties > 1 ? "properties" : "property"}`); - } - - if (schema.patternProperties && Object.keys(schema.patternProperties).length > 0) { - const patternProperties = Object.keys(schema.patternProperties); - hints.push(`additional property names should match pattern${patternProperties.length > 1 ? "s" : ""} ${patternProperties.map(pattern => JSON.stringify(pattern)).join(" | ")}`); - } - - const properties = schema.properties ? Object.keys(schema.properties) : []; - const required = schema.required ? schema.required : []; - const allProperties = [...new Set( - /** @type {Array} */ - [].concat(required).concat(properties))]; - const objectStructure = allProperties.map(property => { - const isRequired = required.includes(property); // Some properties need quotes, maybe we should add check - // Maybe we should output type of property (`foo: string`), but it is looks very unreadable - - return `${property}${isRequired ? "" : "?"}`; - }).concat(typeof schema.additionalProperties === "undefined" || Boolean(schema.additionalProperties) ? schema.additionalProperties && isObject(schema.additionalProperties) ? [`: ${formatInnerSchema(schema.additionalProperties)}`] : ["…"] : []).join(", "); - const { - dependencies, - propertyNames, - patternRequired - } = - /** @type {Schema & {patternRequired?: Array;}} */ - schema; - - if (dependencies) { - Object.keys(dependencies).forEach(dependencyName => { - const dependency = dependencies[dependencyName]; - - if (Array.isArray(dependency)) { - hints.push(`should have ${dependency.length > 1 ? "properties" : "property"} ${dependency.map(dep => `'${dep}'`).join(", ")} when property '${dependencyName}' is present`); - } else { - hints.push(`should be valid according to the schema ${formatInnerSchema(dependency)} when property '${dependencyName}' is present`); - } - }); - } - - if (propertyNames && Object.keys(propertyNames).length > 0) { - hints.push(`each property name should match format ${JSON.stringify(schema.propertyNames.format)}`); - } - - if (patternRequired && patternRequired.length > 0) { - hints.push(`should have property matching pattern ${patternRequired.map( - /** - * @param {string} item - * @returns {string} - */ - item => JSON.stringify(item))}`); - } - - return `object {${objectStructure ? ` ${objectStructure} ` : ""}}${hints.length > 0 ? ` (${hints.join(", ")})` : ""}`; - } - - if (likeNull(schema)) { - return `${logic ? "" : "non-"}null`; - } - - if (Array.isArray(schema.type)) { - // not logic already applied in formatValidationError - return `${schema.type.join(" | ")}`; - } // Fallback for unknown keywords - // not logic already applied in formatValidationError - - /* istanbul ignore next */ - - - return JSON.stringify(schema, null, 2); - } - /** - * @param {Schema=} schemaPart - * @param {(boolean | Array)=} additionalPath - * @param {boolean=} needDot - * @param {boolean=} logic - * @returns {string} - */ - - - getSchemaPartText(schemaPart, additionalPath, needDot = false, logic = true) { - if (!schemaPart) { - return ""; - } - - if (Array.isArray(additionalPath)) { - for (let i = 0; i < additionalPath.length; i++) { - /** @type {Schema | undefined} */ - const inner = schemaPart[ - /** @type {keyof Schema} */ - additionalPath[i]]; - - if (inner) { - // eslint-disable-next-line no-param-reassign - schemaPart = inner; - } else { - break; - } - } - } - - while (schemaPart.$ref) { - // eslint-disable-next-line no-param-reassign - schemaPart = this.getSchemaPart(schemaPart.$ref); - } - - let schemaText = `${this.formatSchema(schemaPart, logic)}${needDot ? "." : ""}`; - - if (schemaPart.description) { - schemaText += `\n-> ${schemaPart.description}`; - } - - if (schemaPart.link) { - schemaText += `\n-> Read more at ${schemaPart.link}`; - } - - return schemaText; - } - /** - * @param {Schema=} schemaPart - * @returns {string} - */ - - - getSchemaPartDescription(schemaPart) { - if (!schemaPart) { - return ""; - } - - while (schemaPart.$ref) { - // eslint-disable-next-line no-param-reassign - schemaPart = this.getSchemaPart(schemaPart.$ref); - } - - let schemaText = ""; - - if (schemaPart.description) { - schemaText += `\n-> ${schemaPart.description}`; - } - - if (schemaPart.link) { - schemaText += `\n-> Read more at ${schemaPart.link}`; - } - - return schemaText; - } - /** - * @param {SchemaUtilErrorObject} error - * @returns {string} - */ - - - formatValidationError(error) { - const { - keyword, - dataPath: errorDataPath - } = error; - const dataPath = `${this.baseDataPath}${errorDataPath}`; - - switch (keyword) { - case "type": - { - const { - parentSchema, - params - } = error; // eslint-disable-next-line default-case - - switch ( - /** @type {import("ajv").TypeParams} */ - params.type) { - case "number": - return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; - - case "integer": - return `${dataPath} should be an ${this.getSchemaPartText(parentSchema, false, true)}`; - - case "string": - return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; - - case "boolean": - return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; - - case "array": - return `${dataPath} should be an array:\n${this.getSchemaPartText(parentSchema)}`; - - case "object": - return `${dataPath} should be an object:\n${this.getSchemaPartText(parentSchema)}`; - - case "null": - return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; - - default: - return `${dataPath} should be:\n${this.getSchemaPartText(parentSchema)}`; - } - } - - case "instanceof": - { - const { - parentSchema - } = error; - return `${dataPath} should be an instance of ${this.getSchemaPartText(parentSchema, false, true)}`; - } - - case "pattern": - { - const { - params, - parentSchema - } = error; - const { - pattern - } = - /** @type {import("ajv").PatternParams} */ - params; - return `${dataPath} should match pattern ${JSON.stringify(pattern)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "format": - { - const { - params, - parentSchema - } = error; - const { - format - } = - /** @type {import("ajv").FormatParams} */ - params; - return `${dataPath} should match format ${JSON.stringify(format)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "formatMinimum": - case "formatMaximum": - { - const { - params, - parentSchema - } = error; - const { - comparison, - limit - } = - /** @type {import("ajv").ComparisonParams} */ - params; - return `${dataPath} should be ${comparison} ${JSON.stringify(limit)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "minimum": - case "maximum": - case "exclusiveMinimum": - case "exclusiveMaximum": - { - const { - parentSchema, - params - } = error; - const { - comparison, - limit - } = - /** @type {import("ajv").ComparisonParams} */ - params; - const [, ...hints] = getHints( - /** @type {Schema} */ - parentSchema, true); - - if (hints.length === 0) { - hints.push(`should be ${comparison} ${limit}`); - } - - return `${dataPath} ${hints.join(" ")}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "multipleOf": - { - const { - params, - parentSchema - } = error; - const { - multipleOf - } = - /** @type {import("ajv").MultipleOfParams} */ - params; - return `${dataPath} should be multiple of ${multipleOf}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "patternRequired": - { - const { - params, - parentSchema - } = error; - const { - missingPattern - } = - /** @type {import("ajv").PatternRequiredParams} */ - params; - return `${dataPath} should have property matching pattern ${JSON.stringify(missingPattern)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "minLength": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - - if (limit === 1) { - return `${dataPath} should be a non-empty string${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - const length = limit - 1; - return `${dataPath} should be longer than ${length} character${length > 1 ? "s" : ""}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "minItems": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - - if (limit === 1) { - return `${dataPath} should be a non-empty array${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - return `${dataPath} should not have fewer than ${limit} items${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "minProperties": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - - if (limit === 1) { - return `${dataPath} should be a non-empty object${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - return `${dataPath} should not have fewer than ${limit} properties${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "maxLength": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - const max = limit + 1; - return `${dataPath} should be shorter than ${max} character${max > 1 ? "s" : ""}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "maxItems": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - return `${dataPath} should not have more than ${limit} items${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "maxProperties": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - return `${dataPath} should not have more than ${limit} properties${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "uniqueItems": - { - const { - params, - parentSchema - } = error; - const { - i - } = - /** @type {import("ajv").UniqueItemsParams} */ - params; - return `${dataPath} should not contain the item '${error.data[i]}' twice${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "additionalItems": - { - const { - params, - parentSchema - } = error; - const { - limit - } = - /** @type {import("ajv").LimitParams} */ - params; - return `${dataPath} should not have more than ${limit} items${getSchemaNonTypes(parentSchema)}. These items are valid:\n${this.getSchemaPartText(parentSchema)}`; - } - - case "contains": - { - const { - parentSchema - } = error; - return `${dataPath} should contains at least one ${this.getSchemaPartText(parentSchema, ["contains"])} item${getSchemaNonTypes(parentSchema)}.`; - } - - case "required": - { - const { - parentSchema, - params - } = error; - const missingProperty = - /** @type {import("ajv").DependenciesParams} */ - params.missingProperty.replace(/^\./, ""); - const hasProperty = parentSchema && Boolean( - /** @type {Schema} */ - parentSchema.properties && - /** @type {Schema} */ - parentSchema.properties[missingProperty]); - return `${dataPath} misses the property '${missingProperty}'${getSchemaNonTypes(parentSchema)}.${hasProperty ? ` Should be:\n${this.getSchemaPartText(parentSchema, ["properties", missingProperty])}` : this.getSchemaPartDescription(parentSchema)}`; - } - - case "additionalProperties": - { - const { - params, - parentSchema - } = error; - const { - additionalProperty - } = - /** @type {import("ajv").AdditionalPropertiesParams} */ - params; - return `${dataPath} has an unknown property '${additionalProperty}'${getSchemaNonTypes(parentSchema)}. These properties are valid:\n${this.getSchemaPartText(parentSchema)}`; - } - - case "dependencies": - { - const { - params, - parentSchema - } = error; - const { - property, - deps - } = - /** @type {import("ajv").DependenciesParams} */ - params; - const dependencies = deps.split(",").map( - /** - * @param {string} dep - * @returns {string} - */ - dep => `'${dep.trim()}'`).join(", "); - return `${dataPath} should have properties ${dependencies} when property '${property}' is present${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "propertyNames": - { - const { - params, - parentSchema, - schema - } = error; - const { - propertyName - } = - /** @type {import("ajv").PropertyNamesParams} */ - params; - return `${dataPath} property name '${propertyName}' is invalid${getSchemaNonTypes(parentSchema)}. Property names should be match format ${JSON.stringify(schema.format)}.${this.getSchemaPartDescription(parentSchema)}`; - } - - case "enum": - { - const { - parentSchema - } = error; - - if (parentSchema && - /** @type {Schema} */ - parentSchema.enum && - /** @type {Schema} */ - parentSchema.enum.length === 1) { - return `${dataPath} should be ${this.getSchemaPartText(parentSchema, false, true)}`; - } - - return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}`; - } - - case "const": - { - const { - parentSchema - } = error; - return `${dataPath} should be equal to constant ${this.getSchemaPartText(parentSchema, false, true)}`; - } - - case "not": - { - const postfix = likeObject( - /** @type {Schema} */ - error.parentSchema) ? `\n${this.getSchemaPartText(error.parentSchema)}` : ""; - const schemaOutput = this.getSchemaPartText(error.schema, false, false, false); - - if (canApplyNot(error.schema)) { - return `${dataPath} should be any ${schemaOutput}${postfix}.`; - } - - const { - schema, - parentSchema - } = error; - return `${dataPath} should not be ${this.getSchemaPartText(schema, false, true)}${parentSchema && likeObject(parentSchema) ? `\n${this.getSchemaPartText(parentSchema)}` : ""}`; - } - - case "oneOf": - case "anyOf": - { - const { - parentSchema, - children - } = error; - - if (children && children.length > 0) { - if (error.schema.length === 1) { - const lastChild = children[children.length - 1]; - const remainingChildren = children.slice(0, children.length - 1); - return this.formatValidationError(Object.assign({}, lastChild, { - children: remainingChildren, - parentSchema: Object.assign({}, parentSchema, lastChild.parentSchema) - })); - } - - let filteredChildren = filterChildren(children); - - if (filteredChildren.length === 1) { - return this.formatValidationError(filteredChildren[0]); - } - - filteredChildren = groupChildrenByFirstChild(filteredChildren); - return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}\nDetails:\n${filteredChildren.map( - /** - * @param {SchemaUtilErrorObject} nestedError - * @returns {string} - */ - nestedError => ` * ${indent(this.formatValidationError(nestedError), " ")}`).join("\n")}`; - } - - return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}`; - } - - case "if": - { - const { - params, - parentSchema - } = error; - const { - failingKeyword - } = - /** @type {import("ajv").IfParams} */ - params; - return `${dataPath} should match "${failingKeyword}" schema:\n${this.getSchemaPartText(parentSchema, [failingKeyword])}`; - } - - case "absolutePath": - { - const { - message, - parentSchema - } = error; - return `${dataPath}: ${message}${this.getSchemaPartDescription(parentSchema)}`; - } - - /* istanbul ignore next */ - - default: - { - const { - message, - parentSchema - } = error; - const ErrorInJSON = JSON.stringify(error, null, 2); // For `custom`, `false schema`, `$ref` keywords - // Fallback for unknown keywords - - return `${dataPath} ${message} (${ErrorInJSON}).\n${this.getSchemaPartText(parentSchema, false)}`; - } - } - } - /** - * @param {Array} errors - * @returns {string} - */ - - - formatValidationErrors(errors) { - return errors.map(error => { - let formattedError = this.formatValidationError(error); - - if (this.postFormatter) { - formattedError = this.postFormatter(formattedError, error); - } - - return ` - ${indent(formattedError, " ")}`; - }).join("\n"); - } - -} - -var _default = ValidationError; -exports.Z = _default; - -/***/ }), - -/***/ 82480: -/***/ (function(module) { - -"use strict"; - - -/** - * @typedef {[number, boolean]} RangeValue - */ - -/** - * @callback RangeValueCallback - * @param {RangeValue} rangeValue - * @returns {boolean} - */ -class Range { - /** - * @param {"left" | "right"} side - * @param {boolean} exclusive - * @returns {">" | ">=" | "<" | "<="} - */ - static getOperator(side, exclusive) { - if (side === "left") { - return exclusive ? ">" : ">="; - } - - return exclusive ? "<" : "<="; - } - /** - * @param {number} value - * @param {boolean} logic is not logic applied - * @param {boolean} exclusive is range exclusive - * @returns {string} - */ - - - static formatRight(value, logic, exclusive) { - if (logic === false) { - return Range.formatLeft(value, !logic, !exclusive); - } - - return `should be ${Range.getOperator("right", exclusive)} ${value}`; - } - /** - * @param {number} value - * @param {boolean} logic is not logic applied - * @param {boolean} exclusive is range exclusive - * @returns {string} - */ - - - static formatLeft(value, logic, exclusive) { - if (logic === false) { - return Range.formatRight(value, !logic, !exclusive); - } - - return `should be ${Range.getOperator("left", exclusive)} ${value}`; - } - /** - * @param {number} start left side value - * @param {number} end right side value - * @param {boolean} startExclusive is range exclusive from left side - * @param {boolean} endExclusive is range exclusive from right side - * @param {boolean} logic is not logic applied - * @returns {string} - */ - - - static formatRange(start, end, startExclusive, endExclusive, logic) { - let result = "should be"; - result += ` ${Range.getOperator(logic ? "left" : "right", logic ? startExclusive : !startExclusive)} ${start} `; - result += logic ? "and" : "or"; - result += ` ${Range.getOperator(logic ? "right" : "left", logic ? endExclusive : !endExclusive)} ${end}`; - return result; - } - /** - * @param {Array} values - * @param {boolean} logic is not logic applied - * @return {RangeValue} computed value and it's exclusive flag - */ - - - static getRangeValue(values, logic) { - let minMax = logic ? Infinity : -Infinity; - let j = -1; - const predicate = logic ? - /** @type {RangeValueCallback} */ - ([value]) => value <= minMax : - /** @type {RangeValueCallback} */ - ([value]) => value >= minMax; - - for (let i = 0; i < values.length; i++) { - if (predicate(values[i])) { - [minMax] = values[i]; - j = i; - } - } - - if (j > -1) { - return values[j]; - } - - return [Infinity, true]; - } - - constructor() { - /** @type {Array} */ - this._left = []; - /** @type {Array} */ - - this._right = []; - } - /** - * @param {number} value - * @param {boolean=} exclusive - */ - - - left(value, exclusive = false) { - this._left.push([value, exclusive]); - } - /** - * @param {number} value - * @param {boolean=} exclusive - */ - - - right(value, exclusive = false) { - this._right.push([value, exclusive]); - } - /** - * @param {boolean} logic is not logic applied - * @return {string} "smart" range string representation - */ - - - format(logic = true) { - const [start, leftExclusive] = Range.getRangeValue(this._left, logic); - const [end, rightExclusive] = Range.getRangeValue(this._right, !logic); - - if (!Number.isFinite(start) && !Number.isFinite(end)) { - return ""; - } - - const realStart = leftExclusive ? start + 1 : start; - const realEnd = rightExclusive ? end - 1 : end; // e.g. 5 < x < 7, 5 < x <= 6, 6 <= x <= 6 - - if (realStart === realEnd) { - return `should be ${logic ? "" : "!"}= ${realStart}`; - } // e.g. 4 < x < ∞ - - - if (Number.isFinite(start) && !Number.isFinite(end)) { - return Range.formatLeft(start, logic, leftExclusive); - } // e.g. ∞ < x < 4 - - - if (!Number.isFinite(start) && Number.isFinite(end)) { - return Range.formatRight(end, logic, rightExclusive); - } - - return Range.formatRange(start, end, leftExclusive, rightExclusive, logic); - } - -} - -module.exports = Range; - -/***/ }), - -/***/ 86601: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -const Range = __webpack_require__(82480); -/** @typedef {import("../validate").Schema} Schema */ - -/** - * @param {Schema} schema - * @param {boolean} logic - * @return {string[]} - */ - - -module.exports.stringHints = function stringHints(schema, logic) { - const hints = []; - let type = "string"; - const currentSchema = { ...schema - }; - - if (!logic) { - const tmpLength = currentSchema.minLength; - const tmpFormat = currentSchema.formatMinimum; - const tmpExclusive = currentSchema.formatExclusiveMaximum; - currentSchema.minLength = currentSchema.maxLength; - currentSchema.maxLength = tmpLength; - currentSchema.formatMinimum = currentSchema.formatMaximum; - currentSchema.formatMaximum = tmpFormat; - currentSchema.formatExclusiveMaximum = !currentSchema.formatExclusiveMinimum; - currentSchema.formatExclusiveMinimum = !tmpExclusive; - } - - if (typeof currentSchema.minLength === "number") { - if (currentSchema.minLength === 1) { - type = "non-empty string"; - } else { - const length = Math.max(currentSchema.minLength - 1, 0); - hints.push(`should be longer than ${length} character${length > 1 ? "s" : ""}`); - } - } - - if (typeof currentSchema.maxLength === "number") { - if (currentSchema.maxLength === 0) { - type = "empty string"; - } else { - const length = currentSchema.maxLength + 1; - hints.push(`should be shorter than ${length} character${length > 1 ? "s" : ""}`); - } - } - - if (currentSchema.pattern) { - hints.push(`should${logic ? "" : " not"} match pattern ${JSON.stringify(currentSchema.pattern)}`); - } - - if (currentSchema.format) { - hints.push(`should${logic ? "" : " not"} match format ${JSON.stringify(currentSchema.format)}`); - } - - if (currentSchema.formatMinimum) { - hints.push(`should be ${currentSchema.formatExclusiveMinimum ? ">" : ">="} ${JSON.stringify(currentSchema.formatMinimum)}`); - } - - if (currentSchema.formatMaximum) { - hints.push(`should be ${currentSchema.formatExclusiveMaximum ? "<" : "<="} ${JSON.stringify(currentSchema.formatMaximum)}`); - } - - return [type].concat(hints); -}; -/** - * @param {Schema} schema - * @param {boolean} logic - * @return {string[]} - */ - - -module.exports.numberHints = function numberHints(schema, logic) { - const hints = [schema.type === "integer" ? "integer" : "number"]; - const range = new Range(); - - if (typeof schema.minimum === "number") { - range.left(schema.minimum); - } - - if (typeof schema.exclusiveMinimum === "number") { - range.left(schema.exclusiveMinimum, true); - } - - if (typeof schema.maximum === "number") { - range.right(schema.maximum); - } - - if (typeof schema.exclusiveMaximum === "number") { - range.right(schema.exclusiveMaximum, true); - } - - const rangeFormat = range.format(logic); - - if (rangeFormat) { - hints.push(rangeFormat); - } - - if (typeof schema.multipleOf === "number") { - hints.push(`should${logic ? "" : " not"} be multiple of ${schema.multipleOf}`); - } - - return hints; -}; - -/***/ }), - -/***/ 78718: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncParallelBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, onDone }) { - let code = ""; - code += `var _results = new Array(${this.options.taps.length});\n`; - code += "var _checkDone = function() {\n"; - code += "for(var i = 0; i < _results.length; i++) {\n"; - code += "var item = _results[i];\n"; - code += "if(item === undefined) return false;\n"; - code += "if(item.result !== undefined) {\n"; - code += onResult("item.result"); - code += "return true;\n"; - code += "}\n"; - code += "if(item.error) {\n"; - code += onError("item.error"); - code += "return true;\n"; - code += "}\n"; - code += "}\n"; - code += "return false;\n"; - code += "}\n"; - code += this.callTapsParallel({ - onError: (i, err, done, doneBreak) => { - let code = ""; - code += `if(${i} < _results.length && ((_results.length = ${i + - 1}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`; - code += doneBreak(true); - code += "} else {\n"; - code += done(); - code += "}\n"; - return code; - }, - onResult: (i, result, done, doneBreak) => { - let code = ""; - code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${i + - 1}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`; - code += doneBreak(true); - code += "} else {\n"; - code += done(); - code += "}\n"; - return code; - }, - onTap: (i, run, done, doneBreak) => { - let code = ""; - if (i > 0) { - code += `if(${i} >= _results.length) {\n`; - code += done(); - code += "} else {\n"; - } - code += run(); - if (i > 0) code += "}\n"; - return code; - }, - onDone - }); - return code; - } -} - -const factory = new AsyncParallelBailHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncParallelBailHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncParallelBailHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncParallelBailHook.prototype = null; - -module.exports = AsyncParallelBailHook; - - -/***/ }), - -/***/ 13854: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncParallelHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsParallel({ - onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), - onDone - }); - } -} - -const factory = new AsyncParallelHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncParallelHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncParallelHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncParallelHook.prototype = null; - -module.exports = AsyncParallelHook; - - -/***/ }), - -/***/ 50936: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onResult: (i, result, next) => - `if(${result} !== undefined) {\n${onResult( - result - )}\n} else {\n${next()}}\n`, - resultReturns, - onDone - }); - } -} - -const factory = new AsyncSeriesBailHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesBailHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesBailHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesBailHook.prototype = null; - -module.exports = AsyncSeriesBailHook; - - -/***/ }), - -/***/ 99580: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncSeriesHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onDone - }); - } -} - -const factory = new AsyncSeriesHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesHook.prototype = null; - -module.exports = AsyncSeriesHook; - - -/***/ }), - -/***/ 36813: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsLooping({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onDone - }); - } -} - -const factory = new AsyncSeriesLoopHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesLoopHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesLoopHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesLoopHook.prototype = null; - -module.exports = AsyncSeriesLoopHook; - - -/***/ }), - -/***/ 51931: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onResult: (i, result, next) => { - let code = ""; - code += `if(${result} !== undefined) {\n`; - code += `${this._args[0]} = ${result};\n`; - code += `}\n`; - code += next(); - return code; - }, - onDone: () => onResult(this._args[0]) - }); - } -} - -const factory = new AsyncSeriesWaterfallHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesWaterfallHook(args = [], name = undefined) { - if (args.length < 1) - throw new Error("Waterfall hooks must have at least one argument"); - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesWaterfallHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesWaterfallHook.prototype = null; - -module.exports = AsyncSeriesWaterfallHook; - - -/***/ }), - -/***/ 4214: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const util = __webpack_require__(73837); - -const deprecateContext = util.deprecate(() => {}, -"Hook.context is deprecated and will be removed"); - -const CALL_DELEGATE = function(...args) { - this.call = this._createCall("sync"); - return this.call(...args); -}; -const CALL_ASYNC_DELEGATE = function(...args) { - this.callAsync = this._createCall("async"); - return this.callAsync(...args); -}; -const PROMISE_DELEGATE = function(...args) { - this.promise = this._createCall("promise"); - return this.promise(...args); -}; - -class Hook { - constructor(args = [], name = undefined) { - this._args = args; - this.name = name; - this.taps = []; - this.interceptors = []; - this._call = CALL_DELEGATE; - this.call = CALL_DELEGATE; - this._callAsync = CALL_ASYNC_DELEGATE; - this.callAsync = CALL_ASYNC_DELEGATE; - this._promise = PROMISE_DELEGATE; - this.promise = PROMISE_DELEGATE; - this._x = undefined; - - this.compile = this.compile; - this.tap = this.tap; - this.tapAsync = this.tapAsync; - this.tapPromise = this.tapPromise; - } - - compile(options) { - throw new Error("Abstract: should be overridden"); - } - - _createCall(type) { - return this.compile({ - taps: this.taps, - interceptors: this.interceptors, - args: this._args, - type: type - }); - } - - _tap(type, options, fn) { - if (typeof options === "string") { - options = { - name: options.trim() - }; - } else if (typeof options !== "object" || options === null) { - throw new Error("Invalid tap options"); - } - if (typeof options.name !== "string" || options.name === "") { - throw new Error("Missing name for tap"); - } - if (typeof options.context !== "undefined") { - deprecateContext(); - } - options = Object.assign({ type, fn }, options); - options = this._runRegisterInterceptors(options); - this._insert(options); - } - - tap(options, fn) { - this._tap("sync", options, fn); - } - - tapAsync(options, fn) { - this._tap("async", options, fn); - } - - tapPromise(options, fn) { - this._tap("promise", options, fn); - } - - _runRegisterInterceptors(options) { - for (const interceptor of this.interceptors) { - if (interceptor.register) { - const newOptions = interceptor.register(options); - if (newOptions !== undefined) { - options = newOptions; - } - } - } - return options; - } - - withOptions(options) { - const mergeOptions = opt => - Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); - - return { - name: this.name, - tap: (opt, fn) => this.tap(mergeOptions(opt), fn), - tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), - tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), - intercept: interceptor => this.intercept(interceptor), - isUsed: () => this.isUsed(), - withOptions: opt => this.withOptions(mergeOptions(opt)) - }; - } - - isUsed() { - return this.taps.length > 0 || this.interceptors.length > 0; - } - - intercept(interceptor) { - this._resetCompilation(); - this.interceptors.push(Object.assign({}, interceptor)); - if (interceptor.register) { - for (let i = 0; i < this.taps.length; i++) { - this.taps[i] = interceptor.register(this.taps[i]); - } - } - } - - _resetCompilation() { - this.call = this._call; - this.callAsync = this._callAsync; - this.promise = this._promise; - } - - _insert(item) { - this._resetCompilation(); - let before; - if (typeof item.before === "string") { - before = new Set([item.before]); - } else if (Array.isArray(item.before)) { - before = new Set(item.before); - } - let stage = 0; - if (typeof item.stage === "number") { - stage = item.stage; - } - let i = this.taps.length; - while (i > 0) { - i--; - const x = this.taps[i]; - this.taps[i + 1] = x; - const xStage = x.stage || 0; - if (before) { - if (before.has(x.name)) { - before.delete(x.name); - continue; - } - if (before.size > 0) { - continue; - } - } - if (xStage > stage) { - continue; - } - i++; - break; - } - this.taps[i] = item; - } -} - -Object.setPrototypeOf(Hook.prototype, null); - -module.exports = Hook; - - -/***/ }), - -/***/ 67308: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -class HookCodeFactory { - constructor(config) { - this.config = config; - this.options = undefined; - this._args = undefined; - } - - create(options) { - this.init(options); - let fn; - switch (this.options.type) { - case "sync": - fn = new Function( - this.args(), - '"use strict";\n' + - this.header() + - this.contentWithInterceptors({ - onError: err => `throw ${err};\n`, - onResult: result => `return ${result};\n`, - resultReturns: true, - onDone: () => "", - rethrowIfPossible: true - }) - ); - break; - case "async": - fn = new Function( - this.args({ - after: "_callback" - }), - '"use strict";\n' + - this.header() + - this.contentWithInterceptors({ - onError: err => `_callback(${err});\n`, - onResult: result => `_callback(null, ${result});\n`, - onDone: () => "_callback();\n" - }) - ); - break; - case "promise": - let errorHelperUsed = false; - const content = this.contentWithInterceptors({ - onError: err => { - errorHelperUsed = true; - return `_error(${err});\n`; - }, - onResult: result => `_resolve(${result});\n`, - onDone: () => "_resolve();\n" - }); - let code = ""; - code += '"use strict";\n'; - code += this.header(); - code += "return new Promise((function(_resolve, _reject) {\n"; - if (errorHelperUsed) { - code += "var _sync = true;\n"; - code += "function _error(_err) {\n"; - code += "if(_sync)\n"; - code += - "_resolve(Promise.resolve().then((function() { throw _err; })));\n"; - code += "else\n"; - code += "_reject(_err);\n"; - code += "};\n"; - } - code += content; - if (errorHelperUsed) { - code += "_sync = false;\n"; - } - code += "}));\n"; - fn = new Function(this.args(), code); - break; - } - this.deinit(); - return fn; - } - - setup(instance, options) { - instance._x = options.taps.map(t => t.fn); - } - - /** - * @param {{ type: "sync" | "promise" | "async", taps: Array, interceptors: Array }} options - */ - init(options) { - this.options = options; - this._args = options.args.slice(); - } - - deinit() { - this.options = undefined; - this._args = undefined; - } - - contentWithInterceptors(options) { - if (this.options.interceptors.length > 0) { - const onError = options.onError; - const onResult = options.onResult; - const onDone = options.onDone; - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.call) { - code += `${this.getInterceptor(i)}.call(${this.args({ - before: interceptor.context ? "_context" : undefined - })});\n`; - } - } - code += this.content( - Object.assign(options, { - onError: - onError && - (err => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.error) { - code += `${this.getInterceptor(i)}.error(${err});\n`; - } - } - code += onError(err); - return code; - }), - onResult: - onResult && - (result => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.result) { - code += `${this.getInterceptor(i)}.result(${result});\n`; - } - } - code += onResult(result); - return code; - }), - onDone: - onDone && - (() => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.done) { - code += `${this.getInterceptor(i)}.done();\n`; - } - } - code += onDone(); - return code; - }) - }) - ); - return code; - } else { - return this.content(options); - } - } - - header() { - let code = ""; - if (this.needContext()) { - code += "var _context = {};\n"; - } else { - code += "var _context;\n"; - } - code += "var _x = this._x;\n"; - if (this.options.interceptors.length > 0) { - code += "var _taps = this.taps;\n"; - code += "var _interceptors = this.interceptors;\n"; - } - return code; - } - - needContext() { - for (const tap of this.options.taps) if (tap.context) return true; - return false; - } - - callTap(tapIndex, { onError, onResult, onDone, rethrowIfPossible }) { - let code = ""; - let hasTapCached = false; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.tap) { - if (!hasTapCached) { - code += `var _tap${tapIndex} = ${this.getTap(tapIndex)};\n`; - hasTapCached = true; - } - code += `${this.getInterceptor(i)}.tap(${ - interceptor.context ? "_context, " : "" - }_tap${tapIndex});\n`; - } - } - code += `var _fn${tapIndex} = ${this.getTapFn(tapIndex)};\n`; - const tap = this.options.taps[tapIndex]; - switch (tap.type) { - case "sync": - if (!rethrowIfPossible) { - code += `var _hasError${tapIndex} = false;\n`; - code += "try {\n"; - } - if (onResult) { - code += `var _result${tapIndex} = _fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - } else { - code += `_fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - } - if (!rethrowIfPossible) { - code += "} catch(_err) {\n"; - code += `_hasError${tapIndex} = true;\n`; - code += onError("_err"); - code += "}\n"; - code += `if(!_hasError${tapIndex}) {\n`; - } - if (onResult) { - code += onResult(`_result${tapIndex}`); - } - if (onDone) { - code += onDone(); - } - if (!rethrowIfPossible) { - code += "}\n"; - } - break; - case "async": - let cbCode = ""; - if (onResult) - cbCode += `(function(_err${tapIndex}, _result${tapIndex}) {\n`; - else cbCode += `(function(_err${tapIndex}) {\n`; - cbCode += `if(_err${tapIndex}) {\n`; - cbCode += onError(`_err${tapIndex}`); - cbCode += "} else {\n"; - if (onResult) { - cbCode += onResult(`_result${tapIndex}`); - } - if (onDone) { - cbCode += onDone(); - } - cbCode += "}\n"; - cbCode += "})"; - code += `_fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined, - after: cbCode - })});\n`; - break; - case "promise": - code += `var _hasResult${tapIndex} = false;\n`; - code += `var _promise${tapIndex} = _fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - code += `if (!_promise${tapIndex} || !_promise${tapIndex}.then)\n`; - code += ` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${tapIndex} + ')');\n`; - code += `_promise${tapIndex}.then((function(_result${tapIndex}) {\n`; - code += `_hasResult${tapIndex} = true;\n`; - if (onResult) { - code += onResult(`_result${tapIndex}`); - } - if (onDone) { - code += onDone(); - } - code += `}), function(_err${tapIndex}) {\n`; - code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`; - code += onError(`_err${tapIndex}`); - code += "});\n"; - break; - } - return code; - } - - callTapsSeries({ - onError, - onResult, - resultReturns, - onDone, - doneReturns, - rethrowIfPossible - }) { - if (this.options.taps.length === 0) return onDone(); - const firstAsync = this.options.taps.findIndex(t => t.type !== "sync"); - const somethingReturns = resultReturns || doneReturns; - let code = ""; - let current = onDone; - let unrollCounter = 0; - for (let j = this.options.taps.length - 1; j >= 0; j--) { - const i = j; - const unroll = - current !== onDone && - (this.options.taps[i].type !== "sync" || unrollCounter++ > 20); - if (unroll) { - unrollCounter = 0; - code += `function _next${i}() {\n`; - code += current(); - code += `}\n`; - current = () => `${somethingReturns ? "return " : ""}_next${i}();\n`; - } - const done = current; - const doneBreak = skipDone => { - if (skipDone) return ""; - return onDone(); - }; - const content = this.callTap(i, { - onError: error => onError(i, error, done, doneBreak), - onResult: - onResult && - (result => { - return onResult(i, result, done, doneBreak); - }), - onDone: !onResult && done, - rethrowIfPossible: - rethrowIfPossible && (firstAsync < 0 || i < firstAsync) - }); - current = () => content; - } - code += current(); - return code; - } - - callTapsLooping({ onError, onDone, rethrowIfPossible }) { - if (this.options.taps.length === 0) return onDone(); - const syncOnly = this.options.taps.every(t => t.type === "sync"); - let code = ""; - if (!syncOnly) { - code += "var _looper = (function() {\n"; - code += "var _loopAsync = false;\n"; - } - code += "var _loop;\n"; - code += "do {\n"; - code += "_loop = false;\n"; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.loop) { - code += `${this.getInterceptor(i)}.loop(${this.args({ - before: interceptor.context ? "_context" : undefined - })});\n`; - } - } - code += this.callTapsSeries({ - onError, - onResult: (i, result, next, doneBreak) => { - let code = ""; - code += `if(${result} !== undefined) {\n`; - code += "_loop = true;\n"; - if (!syncOnly) code += "if(_loopAsync) _looper();\n"; - code += doneBreak(true); - code += `} else {\n`; - code += next(); - code += `}\n`; - return code; - }, - onDone: - onDone && - (() => { - let code = ""; - code += "if(!_loop) {\n"; - code += onDone(); - code += "}\n"; - return code; - }), - rethrowIfPossible: rethrowIfPossible && syncOnly - }); - code += "} while(_loop);\n"; - if (!syncOnly) { - code += "_loopAsync = true;\n"; - code += "});\n"; - code += "_looper();\n"; - } - return code; - } - - callTapsParallel({ - onError, - onResult, - onDone, - rethrowIfPossible, - onTap = (i, run) => run() - }) { - if (this.options.taps.length <= 1) { - return this.callTapsSeries({ - onError, - onResult, - onDone, - rethrowIfPossible - }); - } - let code = ""; - code += "do {\n"; - code += `var _counter = ${this.options.taps.length};\n`; - if (onDone) { - code += "var _done = (function() {\n"; - code += onDone(); - code += "});\n"; - } - for (let i = 0; i < this.options.taps.length; i++) { - const done = () => { - if (onDone) return "if(--_counter === 0) _done();\n"; - else return "--_counter;"; - }; - const doneBreak = skipDone => { - if (skipDone || !onDone) return "_counter = 0;\n"; - else return "_counter = 0;\n_done();\n"; - }; - code += "if(_counter <= 0) break;\n"; - code += onTap( - i, - () => - this.callTap(i, { - onError: error => { - let code = ""; - code += "if(_counter > 0) {\n"; - code += onError(i, error, done, doneBreak); - code += "}\n"; - return code; - }, - onResult: - onResult && - (result => { - let code = ""; - code += "if(_counter > 0) {\n"; - code += onResult(i, result, done, doneBreak); - code += "}\n"; - return code; - }), - onDone: - !onResult && - (() => { - return done(); - }), - rethrowIfPossible - }), - done, - doneBreak - ); - } - code += "} while(false);\n"; - return code; - } - - args({ before, after } = {}) { - let allArgs = this._args; - if (before) allArgs = [before].concat(allArgs); - if (after) allArgs = allArgs.concat(after); - if (allArgs.length === 0) { - return ""; - } else { - return allArgs.join(", "); - } - } - - getTapFn(idx) { - return `_x[${idx}]`; - } - - getTap(idx) { - return `_taps[${idx}]`; - } - - getInterceptor(idx) { - return `_interceptors[${idx}]`; - } -} - -module.exports = HookCodeFactory; - - -/***/ }), - -/***/ 16407: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const util = __webpack_require__(73837); - -const defaultFactory = (key, hook) => hook; - -class HookMap { - constructor(factory, name = undefined) { - this._map = new Map(); - this.name = name; - this._factory = factory; - this._interceptors = []; - } - - get(key) { - return this._map.get(key); - } - - for(key) { - const hook = this.get(key); - if (hook !== undefined) { - return hook; - } - let newHook = this._factory(key); - const interceptors = this._interceptors; - for (let i = 0; i < interceptors.length; i++) { - newHook = interceptors[i].factory(key, newHook); - } - this._map.set(key, newHook); - return newHook; - } - - intercept(interceptor) { - this._interceptors.push( - Object.assign( - { - factory: defaultFactory - }, - interceptor - ) - ); - } -} - -HookMap.prototype.tap = util.deprecate(function(key, options, fn) { - return this.for(key).tap(options, fn); -}, "HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."); - -HookMap.prototype.tapAsync = util.deprecate(function(key, options, fn) { - return this.for(key).tapAsync(options, fn); -}, "HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."); - -HookMap.prototype.tapPromise = util.deprecate(function(key, options, fn) { - return this.for(key).tapPromise(options, fn); -}, "HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."); - -module.exports = HookMap; - - -/***/ }), - -/***/ 4934: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); - -class MultiHook { - constructor(hooks, name = undefined) { - this.hooks = hooks; - this.name = name; - } - - tap(options, fn) { - for (const hook of this.hooks) { - hook.tap(options, fn); - } - } - - tapAsync(options, fn) { - for (const hook of this.hooks) { - hook.tapAsync(options, fn); - } - } - - tapPromise(options, fn) { - for (const hook of this.hooks) { - hook.tapPromise(options, fn); - } - } - - isUsed() { - for (const hook of this.hooks) { - if (hook.isUsed()) return true; - } - return false; - } - - intercept(interceptor) { - for (const hook of this.hooks) { - hook.intercept(interceptor); - } - } - - withOptions(options) { - return new MultiHook( - this.hooks.map(h => h.withOptions(options)), - this.name - ); - } -} - -module.exports = MultiHook; - - -/***/ }), - -/***/ 61826: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class SyncBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) { - return this.callTapsSeries({ - onError: (i, err) => onError(err), - onResult: (i, result, next) => - `if(${result} !== undefined) {\n${onResult( - result - )};\n} else {\n${next()}}\n`, - resultReturns, - onDone, - rethrowIfPossible - }); - } -} - -const factory = new SyncBailHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncBailHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncBailHook"); -}; - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function SyncBailHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = SyncBailHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; - hook.compile = COMPILE; - return hook; -} - -SyncBailHook.prototype = null; - -module.exports = SyncBailHook; - - -/***/ }), - -/***/ 72169: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class SyncHookCodeFactory extends HookCodeFactory { - content({ onError, onDone, rethrowIfPossible }) { - return this.callTapsSeries({ - onError: (i, err) => onError(err), - onDone, - rethrowIfPossible - }); - } -} - -const factory = new SyncHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncHook"); -}; - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function SyncHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = SyncHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; - hook.compile = COMPILE; - return hook; -} - -SyncHook.prototype = null; - -module.exports = SyncHook; - - -/***/ }), - -/***/ 70818: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class SyncLoopHookCodeFactory extends HookCodeFactory { - content({ onError, onDone, rethrowIfPossible }) { - return this.callTapsLooping({ - onError: (i, err) => onError(err), - onDone, - rethrowIfPossible - }); - } -} - -const factory = new SyncLoopHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncLoopHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncLoopHook"); -}; - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function SyncLoopHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = SyncLoopHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; - hook.compile = COMPILE; - return hook; -} - -SyncLoopHook.prototype = null; - -module.exports = SyncLoopHook; - - -/***/ }), - -/***/ 73545: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(4214); -const HookCodeFactory = __webpack_require__(67308); - -class SyncWaterfallHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, rethrowIfPossible }) { - return this.callTapsSeries({ - onError: (i, err) => onError(err), - onResult: (i, result, next) => { - let code = ""; - code += `if(${result} !== undefined) {\n`; - code += `${this._args[0]} = ${result};\n`; - code += `}\n`; - code += next(); - return code; - }, - onDone: () => onResult(this._args[0]), - doneReturns: resultReturns, - rethrowIfPossible - }); - } -} - -const factory = new SyncWaterfallHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncWaterfallHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncWaterfallHook"); -}; - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function SyncWaterfallHook(args = [], name = undefined) { - if (args.length < 1) - throw new Error("Waterfall hooks must have at least one argument"); - const hook = new Hook(args, name); - hook.constructor = SyncWaterfallHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; - hook.compile = COMPILE; - return hook; -} - -SyncWaterfallHook.prototype = null; - -module.exports = SyncWaterfallHook; - - -/***/ }), - -/***/ 44217: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -exports.__esModule = true; -exports.SyncHook = __webpack_require__(72169); -exports.SyncBailHook = __webpack_require__(61826); -exports.SyncWaterfallHook = __webpack_require__(73545); -exports.SyncLoopHook = __webpack_require__(70818); -exports.AsyncParallelHook = __webpack_require__(13854); -exports.AsyncParallelBailHook = __webpack_require__(78718); -exports.AsyncSeriesHook = __webpack_require__(99580); -exports.AsyncSeriesBailHook = __webpack_require__(50936); -exports.AsyncSeriesLoopHook = __webpack_require__(36813); -exports.AsyncSeriesWaterfallHook = __webpack_require__(51931); -exports.HookMap = __webpack_require__(16407); -exports.MultiHook = __webpack_require__(4934); - - -/***/ }), - -/***/ 27285: -/***/ (function(module) { - -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - - __extends = function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function (m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - }; - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; - } - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); - - -/***/ }), - -/***/ 77661: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const WebpackError = __webpack_require__(27154); -const ConstDependency = __webpack_require__(14367); -const BasicEvaluatedExpression = __webpack_require__(94844); -const { - toConstantDependency, - evaluateToString -} = __webpack_require__(97574); -const ChunkNameRuntimeModule = __webpack_require__(83162); -const GetFullHashRuntimeModule = __webpack_require__(61126); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -/* eslint-disable camelcase */ -const REPLACEMENTS = { - __webpack_require__: { - expr: RuntimeGlobals.require, - req: [RuntimeGlobals.require], - type: "function", - assign: false - }, - __webpack_public_path__: { - expr: RuntimeGlobals.publicPath, - req: [RuntimeGlobals.publicPath], - type: "string", - assign: true - }, - __webpack_base_uri__: { - expr: RuntimeGlobals.baseURI, - req: [RuntimeGlobals.baseURI], - type: "string", - assign: true - }, - __webpack_modules__: { - expr: RuntimeGlobals.moduleFactories, - req: [RuntimeGlobals.moduleFactories], - type: "object", - assign: false - }, - __webpack_chunk_load__: { - expr: RuntimeGlobals.ensureChunk, - req: [RuntimeGlobals.ensureChunk], - type: "function", - assign: true - }, - __non_webpack_require__: { - expr: "require", - req: null, - type: undefined, // type is not known, depends on environment - assign: true - }, - __webpack_nonce__: { - expr: RuntimeGlobals.scriptNonce, - req: [RuntimeGlobals.scriptNonce], - type: "string", - assign: true - }, - __webpack_hash__: { - expr: `${RuntimeGlobals.getFullHash}()`, - req: [RuntimeGlobals.getFullHash], - type: "string", - assign: false - }, - __webpack_chunkname__: { - expr: RuntimeGlobals.chunkName, - req: [RuntimeGlobals.chunkName], - type: "string", - assign: false - }, - __webpack_get_script_filename__: { - expr: RuntimeGlobals.getChunkScriptFilename, - req: [RuntimeGlobals.getChunkScriptFilename], - type: "function", - assign: true - }, - __webpack_runtime_id__: { - expr: RuntimeGlobals.runtimeId, - req: [RuntimeGlobals.runtimeId], - assign: false - }, - "require.onError": { - expr: RuntimeGlobals.uncaughtErrorHandler, - req: [RuntimeGlobals.uncaughtErrorHandler], - type: undefined, // type is not known, could be function or undefined - assign: true // is never a pattern - }, - __system_context__: { - expr: RuntimeGlobals.systemContext, - req: [RuntimeGlobals.systemContext], - type: "object", - assign: false - }, - __webpack_share_scopes__: { - expr: RuntimeGlobals.shareScopeMap, - req: [RuntimeGlobals.shareScopeMap], - type: "object", - assign: false - }, - __webpack_init_sharing__: { - expr: RuntimeGlobals.initializeSharing, - req: [RuntimeGlobals.initializeSharing], - type: "function", - assign: true - } -}; -/* eslint-enable camelcase */ - -class APIPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "APIPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.chunkName) - .tap("APIPlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new ChunkNameRuntimeModule(chunk.name) - ); - return true; - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getFullHash) - .tap("APIPlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new GetFullHashRuntimeModule()); - return true; - }); - - /** - * @param {JavascriptParser} parser the parser - */ - const handler = parser => { - Object.keys(REPLACEMENTS).forEach(key => { - const info = REPLACEMENTS[key]; - parser.hooks.expression - .for(key) - .tap( - "APIPlugin", - toConstantDependency(parser, info.expr, info.req) - ); - if (info.assign === false) { - parser.hooks.assign.for(key).tap("APIPlugin", expr => { - const err = new WebpackError(`${key} must not be assigned`); - err.loc = expr.loc; - throw err; - }); - } - if (info.type) { - parser.hooks.evaluateTypeof - .for(key) - .tap("APIPlugin", evaluateToString(info.type)); - } - }); - - parser.hooks.expression - .for("__webpack_layer__") - .tap("APIPlugin", expr => { - const dep = new ConstDependency( - JSON.stringify(parser.state.module.layer), - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluateIdentifier - .for("__webpack_layer__") - .tap("APIPlugin", expr => - (parser.state.module.layer === null - ? new BasicEvaluatedExpression().setNull() - : new BasicEvaluatedExpression().setString( - parser.state.module.layer - ) - ).setRange(expr.range) - ); - parser.hooks.evaluateTypeof - .for("__webpack_layer__") - .tap("APIPlugin", expr => - new BasicEvaluatedExpression() - .setString( - parser.state.module.layer === null ? "object" : "string" - ) - .setRange(expr.range) - ); - - parser.hooks.expression - .for("__webpack_module__.id") - .tap("APIPlugin", expr => { - parser.state.module.buildInfo.moduleConcatenationBailout = - "__webpack_module__.id"; - const dep = new ConstDependency( - parser.state.module.moduleArgument + ".id", - expr.range, - [RuntimeGlobals.moduleId] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - parser.hooks.expression - .for("__webpack_module__") - .tap("APIPlugin", expr => { - parser.state.module.buildInfo.moduleConcatenationBailout = - "__webpack_module__"; - const dep = new ConstDependency( - parser.state.module.moduleArgument, - expr.range, - [RuntimeGlobals.module] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluateTypeof - .for("__webpack_module__") - .tap("APIPlugin", evaluateToString("object")); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("APIPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("APIPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("APIPlugin", handler); - } - ); - } -} - -module.exports = APIPlugin; - - -/***/ }), - -/***/ 73846: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const WebpackError = __webpack_require__(27154); -const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/; - -/** - * @param {string=} method method name - * @returns {string} message - */ -function createMessage(method) { - return `Abstract method${method ? " " + method : ""}. Must be overridden.`; -} - -/** - * @constructor - */ -function Message() { - /** @type {string} */ - this.stack = undefined; - Error.captureStackTrace(this); - /** @type {RegExpMatchArray} */ - const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP); - - this.message = match && match[1] ? createMessage(match[1]) : createMessage(); -} - -/** - * Error for abstract method - * @example - * class FooClass { - * abstractMethod() { - * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overridden. - * } - * } - * - */ -class AbstractMethodError extends WebpackError { - constructor() { - super(new Message().message); - this.name = "AbstractMethodError"; - } -} - -module.exports = AbstractMethodError; - - -/***/ }), - -/***/ 42290: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DependenciesBlock = __webpack_require__(82618); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./util/Hash")} Hash */ - -class AsyncDependenciesBlock extends DependenciesBlock { - /** - * @param {ChunkGroupOptions & { entryOptions?: EntryOptions }} groupOptions options for the group - * @param {DependencyLocation=} loc the line of code - * @param {string=} request the request - */ - constructor(groupOptions, loc, request) { - super(); - if (typeof groupOptions === "string") { - groupOptions = { name: groupOptions }; - } else if (!groupOptions) { - groupOptions = { name: undefined }; - } - this.groupOptions = groupOptions; - this.loc = loc; - this.request = request; - this._stringifiedGroupOptions = undefined; - } - - /** - * @returns {string} The name of the chunk - */ - get chunkName() { - return this.groupOptions.name; - } - - /** - * @param {string} value The new chunk name - * @returns {void} - */ - set chunkName(value) { - if (this.groupOptions.name !== value) { - this.groupOptions.name = value; - this._stringifiedGroupOptions = undefined; - } - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - const { chunkGraph } = context; - if (this._stringifiedGroupOptions === undefined) { - this._stringifiedGroupOptions = JSON.stringify(this.groupOptions); - } - const chunkGroup = chunkGraph.getBlockChunkGroup(this); - hash.update( - `${this._stringifiedGroupOptions}${chunkGroup ? chunkGroup.id : ""}` - ); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - write(this.groupOptions); - write(this.loc); - write(this.request); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.groupOptions = read(); - this.loc = read(); - this.request = read(); - super.deserialize(context); - } -} - -makeSerializable(AsyncDependenciesBlock, "webpack/lib/AsyncDependenciesBlock"); - -Object.defineProperty(AsyncDependenciesBlock.prototype, "module", { - get() { - throw new Error( - "module property was removed from AsyncDependenciesBlock (it's not needed)" - ); - }, - set() { - throw new Error( - "module property was removed from AsyncDependenciesBlock (it's not needed)" - ); - } -}); - -module.exports = AsyncDependenciesBlock; - - -/***/ }), - -/***/ 51558: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -class AsyncDependencyToInitialChunkError extends WebpackError { - /** - * Creates an instance of AsyncDependencyToInitialChunkError. - * @param {string} chunkName Name of Chunk - * @param {Module} module module tied to dependency - * @param {DependencyLocation} loc location of dependency - */ - constructor(chunkName, module, loc) { - super( - `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.` - ); - - this.name = "AsyncDependencyToInitialChunkError"; - this.module = module; - this.loc = loc; - } -} - -module.exports = AsyncDependencyToInitialChunkError; - - -/***/ }), - -/***/ 59851: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const NormalModule = __webpack_require__(89417); -const PrefetchDependency = __webpack_require__(45851); - -/** @typedef {import("./Compiler")} Compiler */ - -class AutomaticPrefetchPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "AutomaticPrefetchPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - PrefetchDependency, - normalModuleFactory - ); - } - ); - let lastModules = null; - compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { - lastModules = []; - - for (const m of compilation.modules) { - if (m instanceof NormalModule) { - lastModules.push({ - context: m.context, - request: m.request - }); - } - } - }); - compiler.hooks.make.tapAsync( - "AutomaticPrefetchPlugin", - (compilation, callback) => { - if (!lastModules) return callback(); - asyncLib.forEach( - lastModules, - (m, callback) => { - compilation.addModuleChain( - m.context || compiler.context, - new PrefetchDependency(`!!${m.request}`), - callback - ); - }, - err => { - lastModules = null; - callback(err); - } - ); - } - ); - } -} -module.exports = AutomaticPrefetchPlugin; - - -/***/ }), - -/***/ 65502: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const Compilation = __webpack_require__(73002); -const ModuleFilenameHelpers = __webpack_require__(99523); -const Template = __webpack_require__(43841); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginArgument} BannerPluginArgument */ -/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(71611), - () => __webpack_require__(72245), - { - name: "Banner Plugin", - baseDataPath: "options" - } -); - -const wrapComment = str => { - if (!str.includes("\n")) { - return Template.toComment(str); - } - return `/*!\n * ${str - .replace(/\*\//g, "* /") - .split("\n") - .join("\n * ") - .replace(/\s+\n/g, "\n") - .trimRight()}\n */`; -}; - -class BannerPlugin { - /** - * @param {BannerPluginArgument} options options object - */ - constructor(options) { - if (typeof options === "string" || typeof options === "function") { - options = { - banner: options - }; - } - - validate(options); - - this.options = options; - - const bannerOption = options.banner; - if (typeof bannerOption === "function") { - const getBanner = bannerOption; - this.banner = this.options.raw - ? getBanner - : data => wrapComment(getBanner(data)); - } else { - const banner = this.options.raw - ? bannerOption - : wrapComment(bannerOption); - this.banner = () => banner; - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - const banner = this.banner; - const matchObject = ModuleFilenameHelpers.matchObject.bind( - undefined, - options - ); - const cache = new WeakMap(); - - compiler.hooks.compilation.tap("BannerPlugin", compilation => { - compilation.hooks.processAssets.tap( - { - name: "BannerPlugin", - stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS - }, - () => { - for (const chunk of compilation.chunks) { - if (options.entryOnly && !chunk.canBeInitial()) { - continue; - } - - for (const file of chunk.files) { - if (!matchObject(file)) { - continue; - } - - const data = { - chunk, - filename: file - }; - - const comment = compilation.getPath(banner, data); - - compilation.updateAsset(file, old => { - let cached = cache.get(old); - if (!cached || cached.comment !== comment) { - const source = options.footer - ? new ConcatSource(old, "\n", comment) - : new ConcatSource(comment, "\n", old); - cache.set(old, { source, comment }); - return source; - } - return cached.source; - }); - } - } - } - ); - }); - } -} - -module.exports = BannerPlugin; - - -/***/ }), - -/***/ 25363: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } = __webpack_require__(44217); -const { - makeWebpackError, - makeWebpackErrorCallback -} = __webpack_require__(35230); - -/** @typedef {import("./WebpackError")} WebpackError */ - -/** - * @typedef {Object} Etag - * @property {function(): string} toString - */ - -/** - * @template T - * @callback CallbackCache - * @param {(WebpackError | null)=} err - * @param {T=} result - * @returns {void} - */ - -/** - * @callback GotHandler - * @param {any} result - * @param {function(Error=): void} callback - * @returns {void} - */ - -const needCalls = (times, callback) => { - return err => { - if (--times === 0) { - return callback(err); - } - if (err && times > 0) { - times = 0; - return callback(err); - } - }; -}; - -class Cache { - constructor() { - this.hooks = { - /** @type {AsyncSeriesBailHook<[string, Etag | null, GotHandler[]], any>} */ - get: new AsyncSeriesBailHook(["identifier", "etag", "gotHandlers"]), - /** @type {AsyncParallelHook<[string, Etag | null, any]>} */ - store: new AsyncParallelHook(["identifier", "etag", "data"]), - /** @type {AsyncParallelHook<[Iterable]>} */ - storeBuildDependencies: new AsyncParallelHook(["dependencies"]), - /** @type {SyncHook<[]>} */ - beginIdle: new SyncHook([]), - /** @type {AsyncParallelHook<[]>} */ - endIdle: new AsyncParallelHook([]), - /** @type {AsyncParallelHook<[]>} */ - shutdown: new AsyncParallelHook([]) - }; - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(identifier, etag, callback) { - const gotHandlers = []; - this.hooks.get.callAsync(identifier, etag, gotHandlers, (err, result) => { - if (err) { - callback(makeWebpackError(err, "Cache.hooks.get")); - return; - } - if (result === null) { - result = undefined; - } - if (gotHandlers.length > 1) { - const innerCallback = needCalls(gotHandlers.length, () => - callback(null, result) - ); - for (const gotHandler of gotHandlers) { - gotHandler(result, innerCallback); - } - } else if (gotHandlers.length === 1) { - gotHandlers[0](result, () => callback(null, result)); - } else { - callback(null, result); - } - }); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(identifier, etag, data, callback) { - this.hooks.store.callAsync( - identifier, - etag, - data, - makeWebpackErrorCallback(callback, "Cache.hooks.store") - ); - } - - /** - * After this method has succeeded the cache can only be restored when build dependencies are - * @param {Iterable} dependencies list of all build dependencies - * @param {CallbackCache} callback signals when the dependencies are stored - * @returns {void} - */ - storeBuildDependencies(dependencies, callback) { - this.hooks.storeBuildDependencies.callAsync( - dependencies, - makeWebpackErrorCallback(callback, "Cache.hooks.storeBuildDependencies") - ); - } - - /** - * @returns {void} - */ - beginIdle() { - this.hooks.beginIdle.call(); - } - - /** - * @param {CallbackCache} callback signals when the call finishes - * @returns {void} - */ - endIdle(callback) { - this.hooks.endIdle.callAsync( - makeWebpackErrorCallback(callback, "Cache.hooks.endIdle") - ); - } - - /** - * @param {CallbackCache} callback signals when the call finishes - * @returns {void} - */ - shutdown(callback) { - this.hooks.shutdown.callAsync( - makeWebpackErrorCallback(callback, "Cache.hooks.shutdown") - ); - } -} - -Cache.STAGE_MEMORY = -10; -Cache.STAGE_DEFAULT = 0; -Cache.STAGE_DISK = 10; -Cache.STAGE_NETWORK = 20; - -module.exports = Cache; - - -/***/ }), - -/***/ 36035: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { forEachBail } = __webpack_require__(958); -const asyncLib = __webpack_require__(78175); -const getLazyHashedEtag = __webpack_require__(84059); -const mergeEtags = __webpack_require__(81053); - -/** @typedef {import("./Cache")} Cache */ -/** @typedef {import("./Cache").Etag} Etag */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./cache/getLazyHashedEtag").HashableObject} HashableObject */ -/** @typedef {typeof import("./util/Hash")} HashConstructor */ - -/** - * @template T - * @callback CallbackCache - * @param {(WebpackError | null)=} err - * @param {T=} result - * @returns {void} - */ - -/** - * @template T - * @callback CallbackNormalErrorCache - * @param {(Error | null)=} err - * @param {T=} result - * @returns {void} - */ - -class MultiItemCache { - /** - * @param {ItemCacheFacade[]} items item caches - */ - constructor(items) { - this._items = items; - if (items.length === 1) return /** @type {any} */ (items[0]); - } - - /** - * @template T - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(callback) { - forEachBail(this._items, (item, callback) => item.get(callback), callback); - } - - /** - * @template T - * @returns {Promise} promise with the data - */ - getPromise() { - const next = i => { - return this._items[i].getPromise().then(result => { - if (result !== undefined) return result; - if (++i < this._items.length) return next(i); - }); - }; - return next(0); - } - - /** - * @template T - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(data, callback) { - asyncLib.each( - this._items, - (item, callback) => item.store(data, callback), - callback - ); - } - - /** - * @template T - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(data) { - return Promise.all(this._items.map(item => item.storePromise(data))).then( - () => {} - ); - } -} - -class ItemCacheFacade { - /** - * @param {Cache} cache the root cache - * @param {string} name the child cache item name - * @param {Etag | null} etag the etag - */ - constructor(cache, name, etag) { - this._cache = cache; - this._name = name; - this._etag = etag; - } - - /** - * @template T - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(callback) { - this._cache.get(this._name, this._etag, callback); - } - - /** - * @template T - * @returns {Promise} promise with the data - */ - getPromise() { - return new Promise((resolve, reject) => { - this._cache.get(this._name, this._etag, (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - }); - } - - /** - * @template T - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(data, callback) { - this._cache.store(this._name, this._etag, data, callback); - } - - /** - * @template T - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(data) { - return new Promise((resolve, reject) => { - this._cache.store(this._name, this._etag, data, err => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); - } - - /** - * @template T - * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached - * @param {CallbackNormalErrorCache} callback signals when the value is retrieved - * @returns {void} - */ - provide(computer, callback) { - this.get((err, cacheEntry) => { - if (err) return callback(err); - if (cacheEntry !== undefined) return cacheEntry; - computer((err, result) => { - if (err) return callback(err); - this.store(result, err => { - if (err) return callback(err); - callback(null, result); - }); - }); - }); - } - - /** - * @template T - * @param {function(): Promise | T} computer function to compute the value if not cached - * @returns {Promise} promise with the data - */ - async providePromise(computer) { - const cacheEntry = await this.getPromise(); - if (cacheEntry !== undefined) return cacheEntry; - const result = await computer(); - await this.storePromise(result); - return result; - } -} - -class CacheFacade { - /** - * @param {Cache} cache the root cache - * @param {string} name the child cache name - * @param {string | HashConstructor} hashFunction the hash function to use - */ - constructor(cache, name, hashFunction) { - this._cache = cache; - this._name = name; - this._hashFunction = hashFunction; - } - - /** - * @param {string} name the child cache name# - * @returns {CacheFacade} child cache - */ - getChildCache(name) { - return new CacheFacade( - this._cache, - `${this._name}|${name}`, - this._hashFunction - ); - } - - /** - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @returns {ItemCacheFacade} item cache - */ - getItemCache(identifier, etag) { - return new ItemCacheFacade( - this._cache, - `${this._name}|${identifier}`, - etag - ); - } - - /** - * @param {HashableObject} obj an hashable object - * @returns {Etag} an etag that is lazy hashed - */ - getLazyHashedEtag(obj) { - return getLazyHashedEtag(obj, this._hashFunction); - } - - /** - * @param {Etag} a an etag - * @param {Etag} b another etag - * @returns {Etag} an etag that represents both - */ - mergeEtags(a, b) { - return mergeEtags(a, b); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(identifier, etag, callback) { - this._cache.get(`${this._name}|${identifier}`, etag, callback); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @returns {Promise} promise with the data - */ - getPromise(identifier, etag) { - return new Promise((resolve, reject) => { - this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - }); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(identifier, etag, data, callback) { - this._cache.store(`${this._name}|${identifier}`, etag, data, callback); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(identifier, etag, data) { - return new Promise((resolve, reject) => { - this._cache.store(`${this._name}|${identifier}`, etag, data, err => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached - * @param {CallbackNormalErrorCache} callback signals when the value is retrieved - * @returns {void} - */ - provide(identifier, etag, computer, callback) { - this.get(identifier, etag, (err, cacheEntry) => { - if (err) return callback(err); - if (cacheEntry !== undefined) return cacheEntry; - computer((err, result) => { - if (err) return callback(err); - this.store(identifier, etag, result, err => { - if (err) return callback(err); - callback(null, result); - }); - }); - }); - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {function(): Promise | T} computer function to compute the value if not cached - * @returns {Promise} promise with the data - */ - async providePromise(identifier, etag, computer) { - const cacheEntry = await this.getPromise(identifier, etag); - if (cacheEntry !== undefined) return cacheEntry; - const result = await computer(); - await this.storePromise(identifier, etag, result); - return result; - } -} - -module.exports = CacheFacade; -module.exports.ItemCacheFacade = ItemCacheFacade; -module.exports.MultiItemCache = MultiItemCache; - - -/***/ }), - -/***/ 36715: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ - -/** - * @param {Module[]} modules the modules to be sorted - * @returns {Module[]} sorted version of original modules - */ -const sortModules = modules => { - return modules.sort((a, b) => { - const aIdent = a.identifier(); - const bIdent = b.identifier(); - /* istanbul ignore next */ - if (aIdent < bIdent) return -1; - /* istanbul ignore next */ - if (aIdent > bIdent) return 1; - /* istanbul ignore next */ - return 0; - }); -}; - -/** - * @param {Module[]} modules each module from throw - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string} each message from provided modules - */ -const createModulesListMessage = (modules, moduleGraph) => { - return modules - .map(m => { - let message = `* ${m.identifier()}`; - const validReasons = Array.from( - moduleGraph.getIncomingConnectionsByOriginModule(m).keys() - ).filter(x => x); - - if (validReasons.length > 0) { - message += `\n Used by ${validReasons.length} module(s), i. e.`; - message += `\n ${validReasons[0].identifier()}`; - } - return message; - }) - .join("\n"); -}; - -class CaseSensitiveModulesWarning extends WebpackError { - /** - * Creates an instance of CaseSensitiveModulesWarning. - * @param {Iterable} modules modules that were detected - * @param {ModuleGraph} moduleGraph the module graph - */ - constructor(modules, moduleGraph) { - const sortedModules = sortModules(Array.from(modules)); - const modulesList = createModulesListMessage(sortedModules, moduleGraph); - super(`There are multiple modules with names that only differ in casing. -This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. -Use equal casing. Compare these module identifiers: -${modulesList}`); - - this.name = "CaseSensitiveModulesWarning"; - this.module = sortedModules[0]; - } -} - -module.exports = CaseSensitiveModulesWarning; - - -/***/ }), - -/***/ 84891: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ChunkGraph = __webpack_require__(75449); -const Entrypoint = __webpack_require__(33546); -const { intersect } = __webpack_require__(73268); -const SortableSet = __webpack_require__(87122); -const StringXor = __webpack_require__(8382); -const { - compareModulesByIdentifier, - compareChunkGroupsByIndex, - compareModulesById -} = __webpack_require__(58792); -const { createArrayToSetDeprecationSet } = __webpack_require__(99321); -const { mergeRuntime } = __webpack_require__(47462); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./ChunkGraph").ChunkFilterPredicate} ChunkFilterPredicate */ -/** @typedef {import("./ChunkGraph").ChunkSizeOptions} ChunkSizeOptions */ -/** @typedef {import("./ChunkGraph").ModuleFilterPredicate} ModuleFilterPredicate */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compilation").PathData} PathData */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -const ChunkFilesSet = createArrayToSetDeprecationSet("chunk.files"); - -/** - * @typedef {Object} WithId an object who has an id property * - * @property {string | number} id the id of the object - */ - -/** - * @deprecated - * @typedef {Object} ChunkMaps - * @property {Record} hash - * @property {Record>} contentHash - * @property {Record} name - */ - -/** - * @deprecated - * @typedef {Object} ChunkModuleMaps - * @property {Record} id - * @property {Record} hash - */ - -let debugId = 1000; - -/** - * A Chunk is a unit of encapsulation for Modules. - * Chunks are "rendered" into bundles that get emitted when the build completes. - */ -class Chunk { - /** - * @param {string=} name of chunk being created, is optional (for subclasses) - * @param {boolean} backCompat enable backward-compatibility - */ - constructor(name, backCompat = true) { - /** @type {number | string | null} */ - this.id = null; - /** @type {(number|string)[] | null} */ - this.ids = null; - /** @type {number} */ - this.debugId = debugId++; - /** @type {string} */ - this.name = name; - /** @type {SortableSet} */ - this.idNameHints = new SortableSet(); - /** @type {boolean} */ - this.preventIntegration = false; - /** @type {(string | function(PathData, AssetInfo=): string)?} */ - this.filenameTemplate = undefined; - /** @type {(string | function(PathData, AssetInfo=): string)?} */ - this.cssFilenameTemplate = undefined; - /** @private @type {SortableSet} */ - this._groups = new SortableSet(undefined, compareChunkGroupsByIndex); - /** @type {RuntimeSpec} */ - this.runtime = undefined; - /** @type {Set} */ - this.files = backCompat ? new ChunkFilesSet() : new Set(); - /** @type {Set} */ - this.auxiliaryFiles = new Set(); - /** @type {boolean} */ - this.rendered = false; - /** @type {string=} */ - this.hash = undefined; - /** @type {Record} */ - this.contentHash = Object.create(null); - /** @type {string=} */ - this.renderedHash = undefined; - /** @type {string=} */ - this.chunkReason = undefined; - /** @type {boolean} */ - this.extraAsync = false; - } - - // TODO remove in webpack 6 - // BACKWARD-COMPAT START - get entryModule() { - const entryModules = Array.from( - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.entryModule", - "DEP_WEBPACK_CHUNK_ENTRY_MODULE" - ).getChunkEntryModulesIterable(this) - ); - if (entryModules.length === 0) { - return undefined; - } else if (entryModules.length === 1) { - return entryModules[0]; - } else { - throw new Error( - "Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)" - ); - } - } - - /** - * @returns {boolean} true, if the chunk contains an entry module - */ - hasEntryModule() { - return ( - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.hasEntryModule", - "DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE" - ).getNumberOfEntryModules(this) > 0 - ); - } - - /** - * @param {Module} module the module - * @returns {boolean} true, if the chunk could be added - */ - addModule(module) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.addModule", - "DEP_WEBPACK_CHUNK_ADD_MODULE" - ); - if (chunkGraph.isModuleInChunk(module, this)) return false; - chunkGraph.connectChunkAndModule(this, module); - return true; - } - - /** - * @param {Module} module the module - * @returns {void} - */ - removeModule(module) { - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.removeModule", - "DEP_WEBPACK_CHUNK_REMOVE_MODULE" - ).disconnectChunkAndModule(this, module); - } - - /** - * @returns {number} the number of module which are contained in this chunk - */ - getNumberOfModules() { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getNumberOfModules", - "DEP_WEBPACK_CHUNK_GET_NUMBER_OF_MODULES" - ).getNumberOfChunkModules(this); - } - - get modulesIterable() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.modulesIterable", - "DEP_WEBPACK_CHUNK_MODULES_ITERABLE" - ); - return chunkGraph.getOrderedChunkModulesIterable( - this, - compareModulesByIdentifier - ); - } - - /** - * @param {Chunk} otherChunk the chunk to compare with - * @returns {-1|0|1} the comparison result - */ - compareTo(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.compareTo", - "DEP_WEBPACK_CHUNK_COMPARE_TO" - ); - return chunkGraph.compareChunks(this, otherChunk); - } - - /** - * @param {Module} module the module - * @returns {boolean} true, if the chunk contains the module - */ - containsModule(module) { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.containsModule", - "DEP_WEBPACK_CHUNK_CONTAINS_MODULE" - ).isModuleInChunk(module, this); - } - - /** - * @returns {Module[]} the modules for this chunk - */ - getModules() { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getModules", - "DEP_WEBPACK_CHUNK_GET_MODULES" - ).getChunkModules(this); - } - - /** - * @returns {void} - */ - remove() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.remove", - "DEP_WEBPACK_CHUNK_REMOVE" - ); - chunkGraph.disconnectChunk(this); - this.disconnectFromGroups(); - } - - /** - * @param {Module} module the module - * @param {Chunk} otherChunk the target chunk - * @returns {void} - */ - moveModule(module, otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.moveModule", - "DEP_WEBPACK_CHUNK_MOVE_MODULE" - ); - chunkGraph.disconnectChunkAndModule(this, module); - chunkGraph.connectChunkAndModule(otherChunk, module); - } - - /** - * @param {Chunk} otherChunk the other chunk - * @returns {boolean} true, if the specified chunk has been integrated - */ - integrate(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.integrate", - "DEP_WEBPACK_CHUNK_INTEGRATE" - ); - if (chunkGraph.canChunksBeIntegrated(this, otherChunk)) { - chunkGraph.integrateChunks(this, otherChunk); - return true; - } else { - return false; - } - } - - /** - * @param {Chunk} otherChunk the other chunk - * @returns {boolean} true, if chunks could be integrated - */ - canBeIntegrated(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.canBeIntegrated", - "DEP_WEBPACK_CHUNK_CAN_BE_INTEGRATED" - ); - return chunkGraph.canChunksBeIntegrated(this, otherChunk); - } - - /** - * @returns {boolean} true, if this chunk contains no module - */ - isEmpty() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.isEmpty", - "DEP_WEBPACK_CHUNK_IS_EMPTY" - ); - return chunkGraph.getNumberOfChunkModules(this) === 0; - } - - /** - * @returns {number} total size of all modules in this chunk - */ - modulesSize() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.modulesSize", - "DEP_WEBPACK_CHUNK_MODULES_SIZE" - ); - return chunkGraph.getChunkModulesSize(this); - } - - /** - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of this chunk - */ - size(options = {}) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.size", - "DEP_WEBPACK_CHUNK_SIZE" - ); - return chunkGraph.getChunkSize(this, options); - } - - /** - * @param {Chunk} otherChunk the other chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk or false if the chunk can't be integrated - */ - integratedSize(otherChunk, options) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.integratedSize", - "DEP_WEBPACK_CHUNK_INTEGRATED_SIZE" - ); - return chunkGraph.getIntegratedChunksSize(this, otherChunk, options); - } - - /** - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @returns {ChunkModuleMaps} module map information - */ - getChunkModuleMaps(filterFn) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getChunkModuleMaps", - "DEP_WEBPACK_CHUNK_GET_CHUNK_MODULE_MAPS" - ); - /** @type {Record} */ - const chunkModuleIdMap = Object.create(null); - /** @type {Record} */ - const chunkModuleHashMap = Object.create(null); - - for (const asyncChunk of this.getAllAsyncChunks()) { - /** @type {(string|number)[]} */ - let array; - for (const module of chunkGraph.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(chunkGraph) - )) { - if (filterFn(module)) { - if (array === undefined) { - array = []; - chunkModuleIdMap[asyncChunk.id] = array; - } - const moduleId = chunkGraph.getModuleId(module); - array.push(moduleId); - chunkModuleHashMap[moduleId] = chunkGraph.getRenderedModuleHash( - module, - undefined - ); - } - } - } - - return { - id: chunkModuleIdMap, - hash: chunkModuleHashMap - }; - } - - /** - * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules - * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks - * @returns {boolean} return true if module exists in graph - */ - hasModuleInGraph(filterFn, filterChunkFn) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.hasModuleInGraph", - "DEP_WEBPACK_CHUNK_HAS_MODULE_IN_GRAPH" - ); - return chunkGraph.hasModuleInGraph(this, filterFn, filterChunkFn); - } - - /** - * @deprecated - * @param {boolean} realHash whether the full hash or the rendered hash is to be used - * @returns {ChunkMaps} the chunk map information - */ - getChunkMaps(realHash) { - /** @type {Record} */ - const chunkHashMap = Object.create(null); - /** @type {Record>} */ - const chunkContentHashMap = Object.create(null); - /** @type {Record} */ - const chunkNameMap = Object.create(null); - - for (const chunk of this.getAllAsyncChunks()) { - chunkHashMap[chunk.id] = realHash ? chunk.hash : chunk.renderedHash; - for (const key of Object.keys(chunk.contentHash)) { - if (!chunkContentHashMap[key]) { - chunkContentHashMap[key] = Object.create(null); - } - chunkContentHashMap[key][chunk.id] = chunk.contentHash[key]; - } - if (chunk.name) { - chunkNameMap[chunk.id] = chunk.name; - } - } - - return { - hash: chunkHashMap, - contentHash: chunkContentHashMap, - name: chunkNameMap - }; - } - // BACKWARD-COMPAT END - - /** - * @returns {boolean} whether or not the Chunk will have a runtime - */ - hasRuntime() { - for (const chunkGroup of this._groups) { - if ( - chunkGroup instanceof Entrypoint && - chunkGroup.getRuntimeChunk() === this - ) { - return true; - } - } - return false; - } - - /** - * @returns {boolean} whether or not this chunk can be an initial chunk - */ - canBeInitial() { - for (const chunkGroup of this._groups) { - if (chunkGroup.isInitial()) return true; - } - return false; - } - - /** - * @returns {boolean} whether this chunk can only be an initial chunk - */ - isOnlyInitial() { - if (this._groups.size <= 0) return false; - for (const chunkGroup of this._groups) { - if (!chunkGroup.isInitial()) return false; - } - return true; - } - - /** - * @returns {EntryOptions | undefined} the entry options for this chunk - */ - getEntryOptions() { - for (const chunkGroup of this._groups) { - if (chunkGroup instanceof Entrypoint) { - return chunkGroup.options; - } - } - return undefined; - } - - /** - * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being added - * @returns {void} - */ - addGroup(chunkGroup) { - this._groups.add(chunkGroup); - } - - /** - * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being removed from - * @returns {void} - */ - removeGroup(chunkGroup) { - this._groups.delete(chunkGroup); - } - - /** - * @param {ChunkGroup} chunkGroup the chunkGroup to check - * @returns {boolean} returns true if chunk has chunkGroup reference and exists in chunkGroup - */ - isInGroup(chunkGroup) { - return this._groups.has(chunkGroup); - } - - /** - * @returns {number} the amount of groups that the said chunk is in - */ - getNumberOfGroups() { - return this._groups.size; - } - - /** - * @returns {Iterable} the chunkGroups that the said chunk is referenced in - */ - get groupsIterable() { - this._groups.sort(); - return this._groups; - } - - /** - * @returns {void} - */ - disconnectFromGroups() { - for (const chunkGroup of this._groups) { - chunkGroup.removeChunk(this); - } - } - - /** - * @param {Chunk} newChunk the new chunk that will be split out of - * @returns {void} - */ - split(newChunk) { - for (const chunkGroup of this._groups) { - chunkGroup.insertChunk(newChunk, this); - newChunk.addGroup(chunkGroup); - } - for (const idHint of this.idNameHints) { - newChunk.idNameHints.add(idHint); - } - newChunk.runtime = mergeRuntime(newChunk.runtime, this.runtime); - } - - /** - * @param {Hash} hash hash (will be modified) - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - updateHash(hash, chunkGraph) { - hash.update( - `${this.id} ${this.ids ? this.ids.join() : ""} ${this.name || ""} ` - ); - const xor = new StringXor(); - for (const m of chunkGraph.getChunkModulesIterable(this)) { - xor.add(chunkGraph.getModuleHash(m, this.runtime)); - } - xor.updateHash(hash); - const entryModules = - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(this); - for (const [m, chunkGroup] of entryModules) { - hash.update(`entry${chunkGraph.getModuleId(m)}${chunkGroup.id}`); - } - } - - /** - * @returns {Set} a set of all the async chunks - */ - getAllAsyncChunks() { - const queue = new Set(); - const chunks = new Set(); - - const initialChunks = intersect( - Array.from(this.groupsIterable, g => new Set(g.chunks)) - ); - - const initialQueue = new Set(this.groupsIterable); - - for (const chunkGroup of initialQueue) { - for (const child of chunkGroup.childrenIterable) { - if (child instanceof Entrypoint) { - initialQueue.add(child); - } else { - queue.add(child); - } - } - } - - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - if (!initialChunks.has(chunk)) { - chunks.add(chunk); - } - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - - return chunks; - } - - /** - * @returns {Set} a set of all the initial chunks (including itself) - */ - getAllInitialChunks() { - const chunks = new Set(); - const queue = new Set(this.groupsIterable); - for (const group of queue) { - if (group.isInitial()) { - for (const c of group.chunks) chunks.add(c); - for (const g of group.childrenIterable) queue.add(g); - } - } - return chunks; - } - - /** - * @returns {Set} a set of all the referenced chunks (including itself) - */ - getAllReferencedChunks() { - const queue = new Set(this.groupsIterable); - const chunks = new Set(); - - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - chunks.add(chunk); - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - - return chunks; - } - - /** - * @returns {Set} a set of all the referenced entrypoints - */ - getAllReferencedAsyncEntrypoints() { - const queue = new Set(this.groupsIterable); - const entrypoints = new Set(); - - for (const chunkGroup of queue) { - for (const entrypoint of chunkGroup.asyncEntrypointsIterable) { - entrypoints.add(entrypoint); - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - - return entrypoints; - } - - /** - * @returns {boolean} true, if the chunk references async chunks - */ - hasAsyncChunks() { - const queue = new Set(); - - const initialChunks = intersect( - Array.from(this.groupsIterable, g => new Set(g.chunks)) - ); - - for (const chunkGroup of this.groupsIterable) { - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - if (!initialChunks.has(chunk)) { - return true; - } - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - - return false; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {ChunkFilterPredicate=} filterFn function used to filter chunks - * @returns {Record} a record object of names to lists of child ids(?) - */ - getChildIdsByOrders(chunkGraph, filterFn) { - /** @type {Map} */ - const lists = new Map(); - for (const group of this.groupsIterable) { - if (group.chunks[group.chunks.length - 1] === this) { - for (const childGroup of group.childrenIterable) { - for (const key of Object.keys(childGroup.options)) { - if (key.endsWith("Order")) { - const name = key.slice(0, key.length - "Order".length); - let list = lists.get(name); - if (list === undefined) { - list = []; - lists.set(name, list); - } - list.push({ - order: childGroup.options[key], - group: childGroup - }); - } - } - } - } - } - /** @type {Record} */ - const result = Object.create(null); - for (const [name, list] of lists) { - list.sort((a, b) => { - const cmp = b.order - a.order; - if (cmp !== 0) return cmp; - return a.group.compareTo(chunkGraph, b.group); - }); - /** @type {Set} */ - const chunkIdSet = new Set(); - for (const item of list) { - for (const chunk of item.group.chunks) { - if (filterFn && !filterFn(chunk, chunkGraph)) continue; - chunkIdSet.add(chunk.id); - } - } - if (chunkIdSet.size > 0) { - result[name] = Array.from(chunkIdSet); - } - } - return result; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {string} type option name - * @returns {{ onChunks: Chunk[], chunks: Set }[]} referenced chunks for a specific type - */ - getChildrenOfTypeInOrder(chunkGraph, type) { - const list = []; - for (const group of this.groupsIterable) { - for (const childGroup of group.childrenIterable) { - const order = childGroup.options[type]; - if (order === undefined) continue; - list.push({ - order, - group, - childGroup - }); - } - } - if (list.length === 0) return undefined; - list.sort((a, b) => { - const cmp = b.order - a.order; - if (cmp !== 0) return cmp; - return a.group.compareTo(chunkGraph, b.group); - }); - const result = []; - let lastEntry; - for (const { group, childGroup } of list) { - if (lastEntry && lastEntry.onChunks === group.chunks) { - for (const chunk of childGroup.chunks) { - lastEntry.chunks.add(chunk); - } - } else { - result.push( - (lastEntry = { - onChunks: group.chunks, - chunks: new Set(childGroup.chunks) - }) - ); - } - } - return result; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {boolean=} includeDirectChildren include direct children (by default only children of async children are included) - * @param {ChunkFilterPredicate=} filterFn function used to filter chunks - * @returns {Record>} a record object of names to lists of child ids(?) by chunk id - */ - getChildIdsByOrdersMap(chunkGraph, includeDirectChildren, filterFn) { - /** @type {Record>} */ - const chunkMaps = Object.create(null); - - /** - * @param {Chunk} chunk a chunk - * @returns {void} - */ - const addChildIdsByOrdersToMap = chunk => { - const data = chunk.getChildIdsByOrders(chunkGraph, filterFn); - for (const key of Object.keys(data)) { - let chunkMap = chunkMaps[key]; - if (chunkMap === undefined) { - chunkMaps[key] = chunkMap = Object.create(null); - } - chunkMap[chunk.id] = data[key]; - } - }; - - if (includeDirectChildren) { - /** @type {Set} */ - const chunks = new Set(); - for (const chunkGroup of this.groupsIterable) { - for (const chunk of chunkGroup.chunks) { - chunks.add(chunk); - } - } - for (const chunk of chunks) { - addChildIdsByOrdersToMap(chunk); - } - } - - for (const chunk of this.getAllAsyncChunks()) { - addChildIdsByOrdersToMap(chunk); - } - - return chunkMaps; - } -} - -module.exports = Chunk; - - -/***/ }), - -/***/ 75449: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const Entrypoint = __webpack_require__(33546); -const ModuleGraphConnection = __webpack_require__(82921); -const { first } = __webpack_require__(73268); -const SortableSet = __webpack_require__(87122); -const { - compareModulesById, - compareIterables, - compareModulesByIdentifier, - concatComparators, - compareSelect, - compareIds -} = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const findGraphRoots = __webpack_require__(30584); -const { - RuntimeSpecMap, - RuntimeSpecSet, - runtimeToString, - mergeRuntime, - forEachRuntime -} = __webpack_require__(47462); - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RuntimeModule")} RuntimeModule */ -/** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** @type {ReadonlySet} */ -const EMPTY_SET = new Set(); - -const ZERO_BIG_INT = BigInt(0); - -const compareModuleIterables = compareIterables(compareModulesByIdentifier); - -/** @typedef {(c: Chunk, chunkGraph: ChunkGraph) => boolean} ChunkFilterPredicate */ -/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ -/** @typedef {[Module, Entrypoint | undefined]} EntryModuleWithChunkGroup */ - -/** - * @typedef {Object} ChunkSizeOptions - * @property {number=} chunkOverhead constant overhead for a chunk - * @property {number=} entryChunkMultiplicator multiplicator for initial chunks - */ - -class ModuleHashInfo { - constructor(hash, renderedHash) { - this.hash = hash; - this.renderedHash = renderedHash; - } -} - -/** @template T @typedef {(set: SortableSet) => T[]} SetToArrayFunction */ - -/** - * @template T - * @param {SortableSet} set the set - * @returns {T[]} set as array - */ -const getArray = set => { - return Array.from(set); -}; - -/** - * @param {SortableSet} chunks the chunks - * @returns {RuntimeSpecSet} runtimes - */ -const getModuleRuntimes = chunks => { - const runtimes = new RuntimeSpecSet(); - for (const chunk of chunks) { - runtimes.add(chunk.runtime); - } - return runtimes; -}; - -/** - * @param {WeakMap> | undefined} sourceTypesByModule sourceTypesByModule - * @returns {function (SortableSet): Map>} modules by source type - */ -const modulesBySourceType = sourceTypesByModule => set => { - /** @type {Map>} */ - const map = new Map(); - for (const module of set) { - const sourceTypes = - (sourceTypesByModule && sourceTypesByModule.get(module)) || - module.getSourceTypes(); - for (const sourceType of sourceTypes) { - let innerSet = map.get(sourceType); - if (innerSet === undefined) { - innerSet = new SortableSet(); - map.set(sourceType, innerSet); - } - innerSet.add(module); - } - } - for (const [key, innerSet] of map) { - // When all modules have the source type, we reuse the original SortableSet - // to benefit from the shared cache (especially for sorting) - if (innerSet.size === set.size) { - map.set(key, set); - } - } - return map; -}; -const defaultModulesBySourceType = modulesBySourceType(undefined); - -/** @type {WeakMap} */ -const createOrderedArrayFunctionMap = new WeakMap(); - -/** - * @template T - * @param {function(T, T): -1|0|1} comparator comparator function - * @returns {SetToArrayFunction} set as ordered array - */ -const createOrderedArrayFunction = comparator => { - /** @type {SetToArrayFunction} */ - let fn = createOrderedArrayFunctionMap.get(comparator); - if (fn !== undefined) return fn; - fn = set => { - set.sortWith(comparator); - return Array.from(set); - }; - createOrderedArrayFunctionMap.set(comparator, fn); - return fn; -}; - -/** - * @param {Iterable} modules the modules to get the count/size of - * @returns {number} the size of the modules - */ -const getModulesSize = modules => { - let size = 0; - for (const module of modules) { - for (const type of module.getSourceTypes()) { - size += module.size(type); - } - } - return size; -}; - -/** - * @param {Iterable} modules the sortable Set to get the size of - * @returns {Record} the sizes of the modules - */ -const getModulesSizes = modules => { - let sizes = Object.create(null); - for (const module of modules) { - for (const type of module.getSourceTypes()) { - sizes[type] = (sizes[type] || 0) + module.size(type); - } - } - return sizes; -}; - -/** - * @param {Chunk} a chunk - * @param {Chunk} b chunk - * @returns {boolean} true, if a is always a parent of b - */ -const isAvailableChunk = (a, b) => { - const queue = new Set(b.groupsIterable); - for (const chunkGroup of queue) { - if (a.isInGroup(chunkGroup)) continue; - if (chunkGroup.isInitial()) return false; - for (const parent of chunkGroup.parentsIterable) { - queue.add(parent); - } - } - return true; -}; - -class ChunkGraphModule { - constructor() { - /** @type {SortableSet} */ - this.chunks = new SortableSet(); - /** @type {Set | undefined} */ - this.entryInChunks = undefined; - /** @type {Set | undefined} */ - this.runtimeInChunks = undefined; - /** @type {RuntimeSpecMap} */ - this.hashes = undefined; - /** @type {string | number} */ - this.id = null; - /** @type {RuntimeSpecMap> | undefined} */ - this.runtimeRequirements = undefined; - /** @type {RuntimeSpecMap} */ - this.graphHashes = undefined; - /** @type {RuntimeSpecMap} */ - this.graphHashesWithConnections = undefined; - } -} - -class ChunkGraphChunk { - constructor() { - /** @type {SortableSet} */ - this.modules = new SortableSet(); - /** @type {WeakMap> | undefined} */ - this.sourceTypesByModule = undefined; - /** @type {Map} */ - this.entryModules = new Map(); - /** @type {SortableSet} */ - this.runtimeModules = new SortableSet(); - /** @type {Set | undefined} */ - this.fullHashModules = undefined; - /** @type {Set | undefined} */ - this.dependentHashModules = undefined; - /** @type {Set | undefined} */ - this.runtimeRequirements = undefined; - /** @type {Set} */ - this.runtimeRequirementsInTree = new Set(); - - this._modulesBySourceType = defaultModulesBySourceType; - } -} - -class ChunkGraph { - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {string | Hash} hashFunction the hash function to use - */ - constructor(moduleGraph, hashFunction = "md4") { - /** @private @type {WeakMap} */ - this._modules = new WeakMap(); - /** @private @type {WeakMap} */ - this._chunks = new WeakMap(); - /** @private @type {WeakMap} */ - this._blockChunkGroups = new WeakMap(); - /** @private @type {Map} */ - this._runtimeIds = new Map(); - /** @type {ModuleGraph} */ - this.moduleGraph = moduleGraph; - - this._hashFunction = hashFunction; - - this._getGraphRoots = this._getGraphRoots.bind(this); - } - - /** - * @private - * @param {Module} module the module - * @returns {ChunkGraphModule} internal module - */ - _getChunkGraphModule(module) { - let cgm = this._modules.get(module); - if (cgm === undefined) { - cgm = new ChunkGraphModule(); - this._modules.set(module, cgm); - } - return cgm; - } - - /** - * @private - * @param {Chunk} chunk the chunk - * @returns {ChunkGraphChunk} internal chunk - */ - _getChunkGraphChunk(chunk) { - let cgc = this._chunks.get(chunk); - if (cgc === undefined) { - cgc = new ChunkGraphChunk(); - this._chunks.set(chunk, cgc); - } - return cgc; - } - - /** - * @param {SortableSet} set the sortable Set to get the roots of - * @returns {Module[]} the graph roots - */ - _getGraphRoots(set) { - const { moduleGraph } = this; - return Array.from( - findGraphRoots(set, module => { - /** @type {Set} */ - const set = new Set(); - const addDependencies = module => { - for (const connection of moduleGraph.getOutgoingConnections(module)) { - if (!connection.module) continue; - const activeState = connection.getActiveState(undefined); - if (activeState === false) continue; - if (activeState === ModuleGraphConnection.TRANSITIVE_ONLY) { - addDependencies(connection.module); - continue; - } - set.add(connection.module); - } - }; - addDependencies(module); - return set; - }) - ).sort(compareModulesByIdentifier); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the module - * @returns {void} - */ - connectChunkAndModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.chunks.add(chunk); - cgc.modules.add(module); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Module} module the module - * @returns {void} - */ - disconnectChunkAndModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.delete(module); - // No need to invalidate cgc._modulesBySourceType because we modified cgc.modules anyway - if (cgc.sourceTypesByModule) cgc.sourceTypesByModule.delete(module); - cgm.chunks.delete(chunk); - } - - /** - * @param {Chunk} chunk the chunk which will be disconnected - * @returns {void} - */ - disconnectChunk(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of cgc.modules) { - const cgm = this._getChunkGraphModule(module); - cgm.chunks.delete(chunk); - } - cgc.modules.clear(); - chunk.disconnectFromGroups(); - ChunkGraph.clearChunkGraphForChunk(chunk); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules - * @returns {void} - */ - attachModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of modules) { - cgc.modules.add(module); - } - } - - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the runtime modules - * @returns {void} - */ - attachRuntimeModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of modules) { - cgc.runtimeModules.add(module); - } - } - - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules that require a full hash - * @returns {void} - */ - attachFullHashModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); - for (const module of modules) { - cgc.fullHashModules.add(module); - } - } - - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules that require a full hash - * @returns {void} - */ - attachDependentHashModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) - cgc.dependentHashModules = new Set(); - for (const module of modules) { - cgc.dependentHashModules.add(module); - } - } - - /** - * @param {Module} oldModule the replaced module - * @param {Module} newModule the replacing module - * @returns {void} - */ - replaceModule(oldModule, newModule) { - const oldCgm = this._getChunkGraphModule(oldModule); - const newCgm = this._getChunkGraphModule(newModule); - - for (const chunk of oldCgm.chunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.delete(oldModule); - cgc.modules.add(newModule); - newCgm.chunks.add(chunk); - } - oldCgm.chunks.clear(); - - if (oldCgm.entryInChunks !== undefined) { - if (newCgm.entryInChunks === undefined) { - newCgm.entryInChunks = new Set(); - } - for (const chunk of oldCgm.entryInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - const old = cgc.entryModules.get(oldModule); - /** @type {Map} */ - const newEntryModules = new Map(); - for (const [m, cg] of cgc.entryModules) { - if (m === oldModule) { - newEntryModules.set(newModule, old); - } else { - newEntryModules.set(m, cg); - } - } - cgc.entryModules = newEntryModules; - newCgm.entryInChunks.add(chunk); - } - oldCgm.entryInChunks = undefined; - } - - if (oldCgm.runtimeInChunks !== undefined) { - if (newCgm.runtimeInChunks === undefined) { - newCgm.runtimeInChunks = new Set(); - } - for (const chunk of oldCgm.runtimeInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.runtimeModules.delete(/** @type {RuntimeModule} */ (oldModule)); - cgc.runtimeModules.add(/** @type {RuntimeModule} */ (newModule)); - newCgm.runtimeInChunks.add(chunk); - if ( - cgc.fullHashModules !== undefined && - cgc.fullHashModules.has(/** @type {RuntimeModule} */ (oldModule)) - ) { - cgc.fullHashModules.delete(/** @type {RuntimeModule} */ (oldModule)); - cgc.fullHashModules.add(/** @type {RuntimeModule} */ (newModule)); - } - if ( - cgc.dependentHashModules !== undefined && - cgc.dependentHashModules.has(/** @type {RuntimeModule} */ (oldModule)) - ) { - cgc.dependentHashModules.delete( - /** @type {RuntimeModule} */ (oldModule) - ); - cgc.dependentHashModules.add( - /** @type {RuntimeModule} */ (newModule) - ); - } - } - oldCgm.runtimeInChunks = undefined; - } - } - - /** - * @param {Module} module the checked module - * @param {Chunk} chunk the checked chunk - * @returns {boolean} true, if the chunk contains the module - */ - isModuleInChunk(module, chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.has(module); - } - - /** - * @param {Module} module the checked module - * @param {ChunkGroup} chunkGroup the checked chunk group - * @returns {boolean} true, if the chunk contains the module - */ - isModuleInChunkGroup(module, chunkGroup) { - for (const chunk of chunkGroup.chunks) { - if (this.isModuleInChunk(module, chunk)) return true; - } - return false; - } - - /** - * @param {Module} module the checked module - * @returns {boolean} true, if the module is entry of any chunk - */ - isEntryModule(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.entryInChunks !== undefined; - } - - /** - * @param {Module} module the module - * @returns {Iterable} iterable of chunks (do not modify) - */ - getModuleChunksIterable(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks; - } - - /** - * @param {Module} module the module - * @param {function(Chunk, Chunk): -1|0|1} sortFn sort function - * @returns {Iterable} iterable of chunks (do not modify) - */ - getOrderedModuleChunksIterable(module, sortFn) { - const cgm = this._getChunkGraphModule(module); - cgm.chunks.sortWith(sortFn); - return cgm.chunks; - } - - /** - * @param {Module} module the module - * @returns {Chunk[]} array of chunks (cached, do not modify) - */ - getModuleChunks(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.getFromCache(getArray); - } - - /** - * @param {Module} module the module - * @returns {number} the number of chunk which contain the module - */ - getNumberOfModuleChunks(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.size; - } - - /** - * @param {Module} module the module - * @returns {RuntimeSpecSet} runtimes - */ - getModuleRuntimes(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.getFromUnorderedCache(getModuleRuntimes); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} the number of modules which are contained in this chunk - */ - getNumberOfChunkModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.size; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} the number of full hash modules which are contained in this chunk - */ - getNumberOfChunkFullHashModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules === undefined ? 0 : cgc.fullHashModules.size; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} return the modules for this chunk - */ - getChunkModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules; - } - - /** - * @param {Chunk} chunk the chunk - * @param {string} sourceType source type - * @returns {Iterable | undefined} return the modules for this chunk - */ - getChunkModulesIterableBySourceType(chunk, sourceType) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesWithSourceType = cgc.modules - .getFromUnorderedCache(cgc._modulesBySourceType) - .get(sourceType); - return modulesWithSourceType; - } - - /** - * @param {Chunk} chunk chunk - * @param {Module} module chunk module - * @param {Set} sourceTypes source types - */ - setChunkModuleSourceTypes(chunk, module, sourceTypes) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.sourceTypesByModule === undefined) { - cgc.sourceTypesByModule = new WeakMap(); - } - cgc.sourceTypesByModule.set(module, sourceTypes); - // Update cgc._modulesBySourceType to invalidate the cache - cgc._modulesBySourceType = modulesBySourceType(cgc.sourceTypesByModule); - } - - /** - * @param {Chunk} chunk chunk - * @param {Module} module chunk module - * @returns {Set} source types - */ - getChunkModuleSourceTypes(chunk, module) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.sourceTypesByModule === undefined) { - return module.getSourceTypes(); - } - return cgc.sourceTypesByModule.get(module) || module.getSourceTypes(); - } - - /** - * @param {Module} module module - * @returns {Set} source types - */ - getModuleSourceTypes(module) { - return ( - this._getOverwrittenModuleSourceTypes(module) || module.getSourceTypes() - ); - } - - /** - * @param {Module} module module - * @returns {Set | undefined} source types - */ - _getOverwrittenModuleSourceTypes(module) { - let newSet = false; - let sourceTypes; - for (const chunk of this.getModuleChunksIterable(module)) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.sourceTypesByModule === undefined) return; - const st = cgc.sourceTypesByModule.get(module); - if (st === undefined) return; - if (!sourceTypes) { - sourceTypes = st; - continue; - } else if (!newSet) { - for (const type of st) { - if (!newSet) { - if (!sourceTypes.has(type)) { - newSet = true; - sourceTypes = new Set(sourceTypes); - sourceTypes.add(type); - } - } else { - sourceTypes.add(type); - } - } - } else { - for (const type of st) sourceTypes.add(type); - } - } - - return sourceTypes; - } - - /** - * @param {Chunk} chunk the chunk - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Iterable} return the modules for this chunk - */ - getOrderedChunkModulesIterable(chunk, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.sortWith(comparator); - return cgc.modules; - } - - /** - * @param {Chunk} chunk the chunk - * @param {string} sourceType source type - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Iterable | undefined} return the modules for this chunk - */ - getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesWithSourceType = cgc.modules - .getFromUnorderedCache(cgc._modulesBySourceType) - .get(sourceType); - if (modulesWithSourceType === undefined) return undefined; - modulesWithSourceType.sortWith(comparator); - return modulesWithSourceType; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Module[]} return the modules for this chunk (cached, do not modify) - */ - getChunkModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getArray); - } - - /** - * @param {Chunk} chunk the chunk - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Module[]} return the modules for this chunk (cached, do not modify) - */ - getOrderedChunkModules(chunk, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - const arrayFunction = createOrderedArrayFunction(comparator); - return cgc.modules.getFromUnorderedCache(arrayFunction); - } - - /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @param {boolean} includeAllChunks all chunks or only async chunks - * @returns {Record} chunk to module ids object - */ - getChunkModuleIdMap(chunk, filterFn, includeAllChunks = false) { - /** @type {Record} */ - const chunkModuleIdMap = Object.create(null); - - for (const asyncChunk of includeAllChunks - ? chunk.getAllReferencedChunks() - : chunk.getAllAsyncChunks()) { - /** @type {(string|number)[]} */ - let array; - for (const module of this.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(this) - )) { - if (filterFn(module)) { - if (array === undefined) { - array = []; - chunkModuleIdMap[asyncChunk.id] = array; - } - const moduleId = this.getModuleId(module); - array.push(moduleId); - } - } - } - - return chunkModuleIdMap; - } - - /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @param {number} hashLength length of the hash - * @param {boolean} includeAllChunks all chunks or only async chunks - * @returns {Record>} chunk to module id to module hash object - */ - getChunkModuleRenderedHashMap( - chunk, - filterFn, - hashLength = 0, - includeAllChunks = false - ) { - /** @type {Record>} */ - const chunkModuleHashMap = Object.create(null); - - for (const asyncChunk of includeAllChunks - ? chunk.getAllReferencedChunks() - : chunk.getAllAsyncChunks()) { - /** @type {Record} */ - let idToHashMap; - for (const module of this.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(this) - )) { - if (filterFn(module)) { - if (idToHashMap === undefined) { - idToHashMap = Object.create(null); - chunkModuleHashMap[asyncChunk.id] = idToHashMap; - } - const moduleId = this.getModuleId(module); - const hash = this.getRenderedModuleHash(module, asyncChunk.runtime); - idToHashMap[moduleId] = hashLength ? hash.slice(0, hashLength) : hash; - } - } - } - - return chunkModuleHashMap; - } - - /** - * @param {Chunk} chunk the chunk - * @param {ChunkFilterPredicate} filterFn function used to filter chunks - * @returns {Record} chunk map - */ - getChunkConditionMap(chunk, filterFn) { - const map = Object.create(null); - for (const c of chunk.getAllReferencedChunks()) { - map[c.id] = filterFn(c, this); - } - return map; - } - - /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules - * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks - * @returns {boolean} return true if module exists in graph - */ - hasModuleInGraph(chunk, filterFn, filterChunkFn) { - const queue = new Set(chunk.groupsIterable); - const chunksProcessed = new Set(); - - for (const chunkGroup of queue) { - for (const innerChunk of chunkGroup.chunks) { - if (!chunksProcessed.has(innerChunk)) { - chunksProcessed.add(innerChunk); - if (!filterChunkFn || filterChunkFn(innerChunk, this)) { - for (const module of this.getChunkModulesIterable(innerChunk)) { - if (filterFn(module)) { - return true; - } - } - } - } - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - return false; - } - - /** - * @param {Chunk} chunkA first chunk - * @param {Chunk} chunkB second chunk - * @returns {-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order - */ - compareChunks(chunkA, chunkB) { - const cgcA = this._getChunkGraphChunk(chunkA); - const cgcB = this._getChunkGraphChunk(chunkB); - if (cgcA.modules.size > cgcB.modules.size) return -1; - if (cgcA.modules.size < cgcB.modules.size) return 1; - cgcA.modules.sortWith(compareModulesByIdentifier); - cgcB.modules.sortWith(compareModulesByIdentifier); - return compareModuleIterables(cgcA.modules, cgcB.modules); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} total size of all modules in the chunk - */ - getChunkModulesSize(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getModulesSize); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Record} total sizes of all modules in the chunk by source type - */ - getChunkModulesSizes(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getModulesSizes); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Module[]} root modules of the chunks (ordered by identifier) - */ - getChunkRootModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(this._getGraphRoots); - } - - /** - * @param {Chunk} chunk the chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk - */ - getChunkSize(chunk, options = {}) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesSize = cgc.modules.getFromUnorderedCache(getModulesSize); - const chunkOverhead = - typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; - const entryChunkMultiplicator = - typeof options.entryChunkMultiplicator === "number" - ? options.entryChunkMultiplicator - : 10; - return ( - chunkOverhead + - modulesSize * (chunk.canBeInitial() ? entryChunkMultiplicator : 1) - ); - } - - /** - * @param {Chunk} chunkA chunk - * @param {Chunk} chunkB chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk or false if chunks can't be integrated - */ - getIntegratedChunksSize(chunkA, chunkB, options = {}) { - const cgcA = this._getChunkGraphChunk(chunkA); - const cgcB = this._getChunkGraphChunk(chunkB); - const allModules = new Set(cgcA.modules); - for (const m of cgcB.modules) allModules.add(m); - let modulesSize = getModulesSize(allModules); - const chunkOverhead = - typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; - const entryChunkMultiplicator = - typeof options.entryChunkMultiplicator === "number" - ? options.entryChunkMultiplicator - : 10; - return ( - chunkOverhead + - modulesSize * - (chunkA.canBeInitial() || chunkB.canBeInitial() - ? entryChunkMultiplicator - : 1) - ); - } - - /** - * @param {Chunk} chunkA chunk - * @param {Chunk} chunkB chunk - * @returns {boolean} true, if chunks could be integrated - */ - canChunksBeIntegrated(chunkA, chunkB) { - if (chunkA.preventIntegration || chunkB.preventIntegration) { - return false; - } - - const hasRuntimeA = chunkA.hasRuntime(); - const hasRuntimeB = chunkB.hasRuntime(); - - if (hasRuntimeA !== hasRuntimeB) { - if (hasRuntimeA) { - return isAvailableChunk(chunkA, chunkB); - } else if (hasRuntimeB) { - return isAvailableChunk(chunkB, chunkA); - } else { - return false; - } - } - - if ( - this.getNumberOfEntryModules(chunkA) > 0 || - this.getNumberOfEntryModules(chunkB) > 0 - ) { - return false; - } - - return true; - } - - /** - * @param {Chunk} chunkA the target chunk - * @param {Chunk} chunkB the chunk to integrate - * @returns {void} - */ - integrateChunks(chunkA, chunkB) { - // Decide for one name (deterministic) - if (chunkA.name && chunkB.name) { - if ( - this.getNumberOfEntryModules(chunkA) > 0 === - this.getNumberOfEntryModules(chunkB) > 0 - ) { - // When both chunks have entry modules or none have one, use - // shortest name - if (chunkA.name.length !== chunkB.name.length) { - chunkA.name = - chunkA.name.length < chunkB.name.length ? chunkA.name : chunkB.name; - } else { - chunkA.name = chunkA.name < chunkB.name ? chunkA.name : chunkB.name; - } - } else if (this.getNumberOfEntryModules(chunkB) > 0) { - // Pick the name of the chunk with the entry module - chunkA.name = chunkB.name; - } - } else if (chunkB.name) { - chunkA.name = chunkB.name; - } - - // Merge id name hints - for (const hint of chunkB.idNameHints) { - chunkA.idNameHints.add(hint); - } - - // Merge runtime - chunkA.runtime = mergeRuntime(chunkA.runtime, chunkB.runtime); - - // getChunkModules is used here to create a clone, because disconnectChunkAndModule modifies - for (const module of this.getChunkModules(chunkB)) { - this.disconnectChunkAndModule(chunkB, module); - this.connectChunkAndModule(chunkA, module); - } - - for (const [module, chunkGroup] of Array.from( - this.getChunkEntryModulesWithChunkGroupIterable(chunkB) - )) { - this.disconnectChunkAndEntryModule(chunkB, module); - this.connectChunkAndEntryModule(chunkA, module, chunkGroup); - } - - for (const chunkGroup of chunkB.groupsIterable) { - chunkGroup.replaceChunk(chunkB, chunkA); - chunkA.addGroup(chunkGroup); - chunkB.removeGroup(chunkGroup); - } - ChunkGraph.clearChunkGraphForChunk(chunkB); - } - - /** - * @param {Chunk} chunk the chunk to upgrade - * @returns {void} - */ - upgradeDependentToFullHashModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) return; - if (cgc.fullHashModules === undefined) { - cgc.fullHashModules = cgc.dependentHashModules; - } else { - for (const m of cgc.dependentHashModules) { - cgc.fullHashModules.add(m); - } - cgc.dependentHashModules = undefined; - } - } - - /** - * @param {Module} module the checked module - * @param {Chunk} chunk the checked chunk - * @returns {boolean} true, if the chunk contains the module as entry - */ - isEntryModuleInChunk(module, chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.has(module); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the entry module - * @param {Entrypoint=} entrypoint the chunk group which must be loaded before the module is executed - * @returns {void} - */ - connectChunkAndEntryModule(chunk, module, entrypoint) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - if (cgm.entryInChunks === undefined) { - cgm.entryInChunks = new Set(); - } - cgm.entryInChunks.add(chunk); - cgc.entryModules.set(module, entrypoint); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the runtime module - * @returns {void} - */ - connectChunkAndRuntimeModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - if (cgm.runtimeInChunks === undefined) { - cgm.runtimeInChunks = new Set(); - } - cgm.runtimeInChunks.add(chunk); - cgc.runtimeModules.add(module); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the module that require a full hash - * @returns {void} - */ - addFullHashModuleToChunk(chunk, module) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); - cgc.fullHashModules.add(module); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the module that require a full hash - * @returns {void} - */ - addDependentHashModuleToChunk(chunk, module) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) - cgc.dependentHashModules = new Set(); - cgc.dependentHashModules.add(module); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the entry module - * @returns {void} - */ - disconnectChunkAndEntryModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.entryInChunks.delete(chunk); - if (cgm.entryInChunks.size === 0) { - cgm.entryInChunks = undefined; - } - cgc.entryModules.delete(module); - } - - /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the runtime module - * @returns {void} - */ - disconnectChunkAndRuntimeModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.runtimeInChunks.delete(chunk); - if (cgm.runtimeInChunks.size === 0) { - cgm.runtimeInChunks = undefined; - } - cgc.runtimeModules.delete(module); - } - - /** - * @param {Module} module the entry module, it will no longer be entry - * @returns {void} - */ - disconnectEntryModule(module) { - const cgm = this._getChunkGraphModule(module); - for (const chunk of cgm.entryInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.entryModules.delete(module); - } - cgm.entryInChunks = undefined; - } - - /** - * @param {Chunk} chunk the chunk, for which all entries will be removed - * @returns {void} - */ - disconnectEntries(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of cgc.entryModules.keys()) { - const cgm = this._getChunkGraphModule(module); - cgm.entryInChunks.delete(chunk); - if (cgm.entryInChunks.size === 0) { - cgm.entryInChunks = undefined; - } - } - cgc.entryModules.clear(); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} the amount of entry modules in chunk - */ - getNumberOfEntryModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.size; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} the amount of entry modules in chunk - */ - getNumberOfRuntimeModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeModules.size; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) - */ - getChunkEntryModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.keys(); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of chunks - */ - getChunkEntryDependentChunksIterable(chunk) { - /** @type {Set} */ - const set = new Set(); - for (const chunkGroup of chunk.groupsIterable) { - if (chunkGroup instanceof Entrypoint) { - const entrypointChunk = chunkGroup.getEntrypointChunk(); - const cgc = this._getChunkGraphChunk(entrypointChunk); - for (const chunkGroup of cgc.entryModules.values()) { - for (const c of chunkGroup.chunks) { - if (c !== chunk && c !== entrypointChunk && !c.hasRuntime()) { - set.add(c); - } - } - } - } - } - - return set; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {boolean} true, when it has dependent chunks - */ - hasChunkEntryDependentChunks(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const chunkGroup of cgc.entryModules.values()) { - for (const c of chunkGroup.chunks) { - if (c !== chunk) { - return true; - } - } - } - return false; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) - */ - getChunkRuntimeModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeModules; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {RuntimeModule[]} array of modules in order of execution - */ - getChunkRuntimeModulesInOrder(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - const array = Array.from(cgc.runtimeModules); - array.sort( - concatComparators( - compareSelect( - /** - * @param {RuntimeModule} r runtime module - * @returns {number=} stage - */ - r => r.stage, - compareIds - ), - compareModulesByIdentifier - ) - ); - return array; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable | undefined} iterable of modules (do not modify) - */ - getChunkFullHashModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet | undefined} set of modules (do not modify) - */ - getChunkFullHashModulesSet(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable | undefined} iterable of modules (do not modify) - */ - getChunkDependentHashModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.dependentHashModules; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) - */ - getChunkEntryModulesWithChunkGroupIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules; - } - - /** - * @param {AsyncDependenciesBlock} depBlock the async block - * @returns {ChunkGroup} the chunk group - */ - getBlockChunkGroup(depBlock) { - return this._blockChunkGroups.get(depBlock); - } - - /** - * @param {AsyncDependenciesBlock} depBlock the async block - * @param {ChunkGroup} chunkGroup the chunk group - * @returns {void} - */ - connectBlockAndChunkGroup(depBlock, chunkGroup) { - this._blockChunkGroups.set(depBlock, chunkGroup); - chunkGroup.addBlock(depBlock); - } - - /** - * @param {ChunkGroup} chunkGroup the chunk group - * @returns {void} - */ - disconnectChunkGroup(chunkGroup) { - for (const block of chunkGroup.blocksIterable) { - this._blockChunkGroups.delete(block); - } - // TODO refactor by moving blocks list into ChunkGraph - chunkGroup._blocks.clear(); - } - - /** - * @param {Module} module the module - * @returns {string | number} the id of the module - */ - getModuleId(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.id; - } - - /** - * @param {Module} module the module - * @param {string | number} id the id of the module - * @returns {void} - */ - setModuleId(module, id) { - const cgm = this._getChunkGraphModule(module); - cgm.id = id; - } - - /** - * @param {string} runtime runtime - * @returns {string | number} the id of the runtime - */ - getRuntimeId(runtime) { - return this._runtimeIds.get(runtime); - } - - /** - * @param {string} runtime runtime - * @param {string | number} id the id of the runtime - * @returns {void} - */ - setRuntimeId(runtime, id) { - this._runtimeIds.set(runtime, id); - } - - /** - * @template T - * @param {Module} module the module - * @param {RuntimeSpecMap} hashes hashes data - * @param {RuntimeSpec} runtime the runtime - * @returns {T} hash - */ - _getModuleHashInfo(module, hashes, runtime) { - if (!hashes) { - throw new Error( - `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( - runtime - )} (hashes not set at all)` - ); - } else if (runtime === undefined) { - const hashInfoItems = new Set(hashes.values()); - if (hashInfoItems.size !== 1) { - throw new Error( - `No unique hash info entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( - hashes.keys(), - r => runtimeToString(r) - ).join(", ")}). -Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` - ); - } - return first(hashInfoItems); - } else { - const hashInfo = hashes.get(runtime); - if (!hashInfo) { - throw new Error( - `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( - runtime - )} (available runtimes ${Array.from( - hashes.keys(), - runtimeToString - ).join(", ")})` - ); - } - return hashInfo; - } - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, if the module has hashes for this runtime - */ - hasModuleHashes(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return hashes && hashes.has(runtime); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash - */ - getModuleHash(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return this._getModuleHashInfo(module, hashes, runtime).hash; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash - */ - getRenderedModuleHash(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return this._getModuleHashInfo(module, hashes, runtime).renderedHash; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {string} hash the full hash - * @param {string} renderedHash the shortened hash for rendering - * @returns {void} - */ - setModuleHashes(module, runtime, hash, renderedHash) { - const cgm = this._getChunkGraphModule(module); - if (cgm.hashes === undefined) { - cgm.hashes = new RuntimeSpecMap(); - } - cgm.hashes.set(runtime, new ModuleHashInfo(hash, renderedHash)); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph when transferOwnership not false) - * @param {boolean} transferOwnership true: transfer ownership of the items object, false: items is immutable and shared and won't be modified - * @returns {void} - */ - addModuleRuntimeRequirements( - module, - runtime, - items, - transferOwnership = true - ) { - const cgm = this._getChunkGraphModule(module); - const runtimeRequirementsMap = cgm.runtimeRequirements; - if (runtimeRequirementsMap === undefined) { - const map = new RuntimeSpecMap(); - // TODO avoid cloning item and track ownership instead - map.set(runtime, transferOwnership ? items : new Set(items)); - cgm.runtimeRequirements = map; - return; - } - runtimeRequirementsMap.update(runtime, runtimeRequirements => { - if (runtimeRequirements === undefined) { - return transferOwnership ? items : new Set(items); - } else if (!transferOwnership || runtimeRequirements.size >= items.size) { - for (const item of items) runtimeRequirements.add(item); - return runtimeRequirements; - } else { - for (const item of runtimeRequirements) items.add(item); - return items; - } - }); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph) - * @returns {void} - */ - addChunkRuntimeRequirements(chunk, items) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirements; - if (runtimeRequirements === undefined) { - cgc.runtimeRequirements = items; - } else if (runtimeRequirements.size >= items.size) { - for (const item of items) runtimeRequirements.add(item); - } else { - for (const item of runtimeRequirements) items.add(item); - cgc.runtimeRequirements = items; - } - } - - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} items runtime requirements to be added - * @returns {void} - */ - addTreeRuntimeRequirements(chunk, items) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirementsInTree; - for (const item of items) runtimeRequirements.add(item); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {ReadonlySet} runtime requirements - */ - getModuleRuntimeRequirements(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const runtimeRequirements = - cgm.runtimeRequirements && cgm.runtimeRequirements.get(runtime); - return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; - } - - /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet} runtime requirements - */ - getChunkRuntimeRequirements(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirements; - return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {boolean} withConnections include connections - * @returns {string} hash - */ - getModuleGraphHash(module, runtime, withConnections = true) { - const cgm = this._getChunkGraphModule(module); - return withConnections - ? this._getModuleGraphHashWithConnections(cgm, module, runtime) - : this._getModuleGraphHashBigInt(cgm, module, runtime).toString(16); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {boolean} withConnections include connections - * @returns {bigint} hash - */ - getModuleGraphHashBigInt(module, runtime, withConnections = true) { - const cgm = this._getChunkGraphModule(module); - return withConnections - ? BigInt( - `0x${this._getModuleGraphHashWithConnections(cgm, module, runtime)}` - ) - : this._getModuleGraphHashBigInt(cgm, module, runtime); - } - - /** - * @param {ChunkGraphModule} cgm the ChunkGraphModule - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {bigint} hash as big int - */ - _getModuleGraphHashBigInt(cgm, module, runtime) { - if (cgm.graphHashes === undefined) { - cgm.graphHashes = new RuntimeSpecMap(); - } - const graphHash = cgm.graphHashes.provide(runtime, () => { - const hash = createHash(this._hashFunction); - hash.update(`${cgm.id}${this.moduleGraph.isAsync(module)}`); - const sourceTypes = this._getOverwrittenModuleSourceTypes(module); - if (sourceTypes !== undefined) { - for (const type of sourceTypes) hash.update(type); - } - this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime); - return BigInt(`0x${/** @type {string} */ (hash.digest("hex"))}`); - }); - return graphHash; - } - - /** - * @param {ChunkGraphModule} cgm the ChunkGraphModule - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash - */ - _getModuleGraphHashWithConnections(cgm, module, runtime) { - if (cgm.graphHashesWithConnections === undefined) { - cgm.graphHashesWithConnections = new RuntimeSpecMap(); - } - const activeStateToString = state => { - if (state === false) return "F"; - if (state === true) return "T"; - if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "O"; - throw new Error("Not implemented active state"); - }; - const strict = module.buildMeta && module.buildMeta.strictHarmonyModule; - return cgm.graphHashesWithConnections.provide(runtime, () => { - const graphHash = this._getModuleGraphHashBigInt( - cgm, - module, - runtime - ).toString(16); - const connections = this.moduleGraph.getOutgoingConnections(module); - /** @type {Set} */ - const activeNamespaceModules = new Set(); - /** @type {Map>} */ - const connectedModules = new Map(); - const processConnection = (connection, stateInfo) => { - const module = connection.module; - stateInfo += module.getExportsType(this.moduleGraph, strict); - // cspell:word Tnamespace - if (stateInfo === "Tnamespace") activeNamespaceModules.add(module); - else { - const oldModule = connectedModules.get(stateInfo); - if (oldModule === undefined) { - connectedModules.set(stateInfo, module); - } else if (oldModule instanceof Set) { - oldModule.add(module); - } else if (oldModule !== module) { - connectedModules.set(stateInfo, new Set([oldModule, module])); - } - } - }; - if (runtime === undefined || typeof runtime === "string") { - for (const connection of connections) { - const state = connection.getActiveState(runtime); - if (state === false) continue; - processConnection(connection, state === true ? "T" : "O"); - } - } else { - // cspell:word Tnamespace - for (const connection of connections) { - const states = new Set(); - let stateInfo = ""; - forEachRuntime( - runtime, - runtime => { - const state = connection.getActiveState(runtime); - states.add(state); - stateInfo += activeStateToString(state) + runtime; - }, - true - ); - if (states.size === 1) { - const state = first(states); - if (state === false) continue; - stateInfo = activeStateToString(state); - } - processConnection(connection, stateInfo); - } - } - // cspell:word Tnamespace - if (activeNamespaceModules.size === 0 && connectedModules.size === 0) - return graphHash; - const connectedModulesInOrder = - connectedModules.size > 1 - ? Array.from(connectedModules).sort(([a], [b]) => (a < b ? -1 : 1)) - : connectedModules; - const hash = createHash(this._hashFunction); - const addModuleToHash = module => { - hash.update( - this._getModuleGraphHashBigInt( - this._getChunkGraphModule(module), - module, - runtime - ).toString(16) - ); - }; - const addModulesToHash = modules => { - let xor = ZERO_BIG_INT; - for (const m of modules) { - xor = - xor ^ - this._getModuleGraphHashBigInt( - this._getChunkGraphModule(m), - m, - runtime - ); - } - hash.update(xor.toString(16)); - }; - if (activeNamespaceModules.size === 1) - addModuleToHash(activeNamespaceModules.values().next().value); - else if (activeNamespaceModules.size > 1) - addModulesToHash(activeNamespaceModules); - for (const [stateInfo, modules] of connectedModulesInOrder) { - hash.update(stateInfo); - if (modules instanceof Set) { - addModulesToHash(modules); - } else { - addModuleToHash(modules); - } - } - hash.update(graphHash); - return /** @type {string} */ (hash.digest("hex")); - }); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet} runtime requirements - */ - getTreeRuntimeRequirements(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeRequirementsInTree; - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @param {string} deprecateMessage message for the deprecation message - * @param {string} deprecationCode code for the deprecation - * @returns {ChunkGraph} the chunk graph - */ - static getChunkGraphForModule(module, deprecateMessage, deprecationCode) { - const fn = deprecateGetChunkGraphForModuleMap.get(deprecateMessage); - if (fn) return fn(module); - const newFn = util.deprecate( - /** - * @param {Module} module the module - * @returns {ChunkGraph} the chunk graph - */ - module => { - const chunkGraph = chunkGraphForModuleMap.get(module); - if (!chunkGraph) - throw new Error( - deprecateMessage + - ": There was no ChunkGraph assigned to the Module for backward-compat (Use the new API)" - ); - return chunkGraph; - }, - deprecateMessage + ": Use new ChunkGraph API", - deprecationCode - ); - deprecateGetChunkGraphForModuleMap.set(deprecateMessage, newFn); - return newFn(module); - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - static setChunkGraphForModule(module, chunkGraph) { - chunkGraphForModuleMap.set(module, chunkGraph); - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @returns {void} - */ - static clearChunkGraphForModule(module) { - chunkGraphForModuleMap.delete(module); - } - - // TODO remove in webpack 6 - /** - * @param {Chunk} chunk the chunk - * @param {string} deprecateMessage message for the deprecation message - * @param {string} deprecationCode code for the deprecation - * @returns {ChunkGraph} the chunk graph - */ - static getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode) { - const fn = deprecateGetChunkGraphForChunkMap.get(deprecateMessage); - if (fn) return fn(chunk); - const newFn = util.deprecate( - /** - * @param {Chunk} chunk the chunk - * @returns {ChunkGraph} the chunk graph - */ - chunk => { - const chunkGraph = chunkGraphForChunkMap.get(chunk); - if (!chunkGraph) - throw new Error( - deprecateMessage + - "There was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)" - ); - return chunkGraph; - }, - deprecateMessage + ": Use new ChunkGraph API", - deprecationCode - ); - deprecateGetChunkGraphForChunkMap.set(deprecateMessage, newFn); - return newFn(chunk); - } - - // TODO remove in webpack 6 - /** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - static setChunkGraphForChunk(chunk, chunkGraph) { - chunkGraphForChunkMap.set(chunk, chunkGraph); - } - - // TODO remove in webpack 6 - /** - * @param {Chunk} chunk the chunk - * @returns {void} - */ - static clearChunkGraphForChunk(chunk) { - chunkGraphForChunkMap.delete(chunk); - } -} - -// TODO remove in webpack 6 -/** @type {WeakMap} */ -const chunkGraphForModuleMap = new WeakMap(); - -// TODO remove in webpack 6 -/** @type {WeakMap} */ -const chunkGraphForChunkMap = new WeakMap(); - -// TODO remove in webpack 6 -/** @type {Map ChunkGraph>} */ -const deprecateGetChunkGraphForModuleMap = new Map(); - -// TODO remove in webpack 6 -/** @type {Map ChunkGraph>} */ -const deprecateGetChunkGraphForChunkMap = new Map(); - -module.exports = ChunkGraph; - - -/***/ }), - -/***/ 12487: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const SortableSet = __webpack_require__(87122); -const { - compareLocations, - compareChunks, - compareIterables -} = __webpack_require__(58792); - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Entrypoint")} Entrypoint */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ - -/** @typedef {{id: number}} HasId */ -/** @typedef {{module: Module, loc: DependencyLocation, request: string}} OriginRecord */ - -/** - * @typedef {Object} RawChunkGroupOptions - * @property {number=} preloadOrder - * @property {number=} prefetchOrder - */ - -/** @typedef {RawChunkGroupOptions & { name?: string }} ChunkGroupOptions */ - -let debugId = 5000; - -/** - * @template T - * @param {SortableSet} set set to convert to array. - * @returns {T[]} the array format of existing set - */ -const getArray = set => Array.from(set); - -/** - * A convenience method used to sort chunks based on their id's - * @param {ChunkGroup} a first sorting comparator - * @param {ChunkGroup} b second sorting comparator - * @returns {1|0|-1} a sorting index to determine order - */ -const sortById = (a, b) => { - if (a.id < b.id) return -1; - if (b.id < a.id) return 1; - return 0; -}; - -/** - * @param {OriginRecord} a the first comparator in sort - * @param {OriginRecord} b the second comparator in sort - * @returns {1|-1|0} returns sorting order as index - */ -const sortOrigin = (a, b) => { - const aIdent = a.module ? a.module.identifier() : ""; - const bIdent = b.module ? b.module.identifier() : ""; - if (aIdent < bIdent) return -1; - if (aIdent > bIdent) return 1; - return compareLocations(a.loc, b.loc); -}; - -class ChunkGroup { - /** - * Creates an instance of ChunkGroup. - * @param {string|ChunkGroupOptions=} options chunk group options passed to chunkGroup - */ - constructor(options) { - if (typeof options === "string") { - options = { name: options }; - } else if (!options) { - options = { name: undefined }; - } - /** @type {number} */ - this.groupDebugId = debugId++; - this.options = options; - /** @type {SortableSet} */ - this._children = new SortableSet(undefined, sortById); - /** @type {SortableSet} */ - this._parents = new SortableSet(undefined, sortById); - /** @type {SortableSet} */ - this._asyncEntrypoints = new SortableSet(undefined, sortById); - this._blocks = new SortableSet(); - /** @type {Chunk[]} */ - this.chunks = []; - /** @type {OriginRecord[]} */ - this.origins = []; - /** Indices in top-down order */ - /** @private @type {Map} */ - this._modulePreOrderIndices = new Map(); - /** Indices in bottom-up order */ - /** @private @type {Map} */ - this._modulePostOrderIndices = new Map(); - /** @type {number} */ - this.index = undefined; - } - - /** - * when a new chunk is added to a chunkGroup, addingOptions will occur. - * @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions - * @returns {void} - */ - addOptions(options) { - for (const key of Object.keys(options)) { - if (this.options[key] === undefined) { - this.options[key] = options[key]; - } else if (this.options[key] !== options[key]) { - if (key.endsWith("Order")) { - this.options[key] = Math.max(this.options[key], options[key]); - } else { - throw new Error( - `ChunkGroup.addOptions: No option merge strategy for ${key}` - ); - } - } - } - } - - /** - * returns the name of current ChunkGroup - * @returns {string|undefined} returns the ChunkGroup name - */ - get name() { - return this.options.name; - } - - /** - * sets a new name for current ChunkGroup - * @param {string} value the new name for ChunkGroup - * @returns {void} - */ - set name(value) { - this.options.name = value; - } - - /* istanbul ignore next */ - /** - * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's - * @returns {string} a unique concatenation of chunk debugId's - */ - get debugId() { - return Array.from(this.chunks, x => x.debugId).join("+"); - } - - /** - * get a unique id for ChunkGroup, made up of its member Chunk id's - * @returns {string} a unique concatenation of chunk ids - */ - get id() { - return Array.from(this.chunks, x => x.id).join("+"); - } - - /** - * Performs an unshift of a specific chunk - * @param {Chunk} chunk chunk being unshifted - * @returns {boolean} returns true if attempted chunk shift is accepted - */ - unshiftChunk(chunk) { - const oldIdx = this.chunks.indexOf(chunk); - if (oldIdx > 0) { - this.chunks.splice(oldIdx, 1); - this.chunks.unshift(chunk); - } else if (oldIdx < 0) { - this.chunks.unshift(chunk); - return true; - } - return false; - } - - /** - * inserts a chunk before another existing chunk in group - * @param {Chunk} chunk Chunk being inserted - * @param {Chunk} before Placeholder/target chunk marking new chunk insertion point - * @returns {boolean} return true if insertion was successful - */ - insertChunk(chunk, before) { - const oldIdx = this.chunks.indexOf(chunk); - const idx = this.chunks.indexOf(before); - if (idx < 0) { - throw new Error("before chunk not found"); - } - if (oldIdx >= 0 && oldIdx > idx) { - this.chunks.splice(oldIdx, 1); - this.chunks.splice(idx, 0, chunk); - } else if (oldIdx < 0) { - this.chunks.splice(idx, 0, chunk); - return true; - } - return false; - } - - /** - * add a chunk into ChunkGroup. Is pushed on or prepended - * @param {Chunk} chunk chunk being pushed into ChunkGroupS - * @returns {boolean} returns true if chunk addition was successful. - */ - pushChunk(chunk) { - const oldIdx = this.chunks.indexOf(chunk); - if (oldIdx >= 0) { - return false; - } - this.chunks.push(chunk); - return true; - } - - /** - * @param {Chunk} oldChunk chunk to be replaced - * @param {Chunk} newChunk New chunk that will be replaced with - * @returns {boolean} returns true if the replacement was successful - */ - replaceChunk(oldChunk, newChunk) { - const oldIdx = this.chunks.indexOf(oldChunk); - if (oldIdx < 0) return false; - const newIdx = this.chunks.indexOf(newChunk); - if (newIdx < 0) { - this.chunks[oldIdx] = newChunk; - return true; - } - if (newIdx < oldIdx) { - this.chunks.splice(oldIdx, 1); - return true; - } else if (newIdx !== oldIdx) { - this.chunks[oldIdx] = newChunk; - this.chunks.splice(newIdx, 1); - return true; - } - } - - /** - * @param {Chunk} chunk chunk to remove - * @returns {boolean} returns true if chunk was removed - */ - removeChunk(chunk) { - const idx = this.chunks.indexOf(chunk); - if (idx >= 0) { - this.chunks.splice(idx, 1); - return true; - } - return false; - } - - /** - * @returns {boolean} true, when this chunk group will be loaded on initial page load - */ - isInitial() { - return false; - } - - /** - * @param {ChunkGroup} group chunk group to add - * @returns {boolean} returns true if chunk group was added - */ - addChild(group) { - const size = this._children.size; - this._children.add(group); - return size !== this._children.size; - } - - /** - * @returns {ChunkGroup[]} returns the children of this group - */ - getChildren() { - return this._children.getFromCache(getArray); - } - - getNumberOfChildren() { - return this._children.size; - } - - get childrenIterable() { - return this._children; - } - - /** - * @param {ChunkGroup} group the chunk group to remove - * @returns {boolean} returns true if the chunk group was removed - */ - removeChild(group) { - if (!this._children.has(group)) { - return false; - } - - this._children.delete(group); - group.removeParent(this); - return true; - } - - /** - * @param {ChunkGroup} parentChunk the parent group to be added into - * @returns {boolean} returns true if this chunk group was added to the parent group - */ - addParent(parentChunk) { - if (!this._parents.has(parentChunk)) { - this._parents.add(parentChunk); - return true; - } - return false; - } - - /** - * @returns {ChunkGroup[]} returns the parents of this group - */ - getParents() { - return this._parents.getFromCache(getArray); - } - - getNumberOfParents() { - return this._parents.size; - } - - /** - * @param {ChunkGroup} parent the parent group - * @returns {boolean} returns true if the parent group contains this group - */ - hasParent(parent) { - return this._parents.has(parent); - } - - get parentsIterable() { - return this._parents; - } - - /** - * @param {ChunkGroup} chunkGroup the parent group - * @returns {boolean} returns true if this group has been removed from the parent - */ - removeParent(chunkGroup) { - if (this._parents.delete(chunkGroup)) { - chunkGroup.removeChild(this); - return true; - } - return false; - } - - /** - * @param {Entrypoint} entrypoint entrypoint to add - * @returns {boolean} returns true if entrypoint was added - */ - addAsyncEntrypoint(entrypoint) { - const size = this._asyncEntrypoints.size; - this._asyncEntrypoints.add(entrypoint); - return size !== this._asyncEntrypoints.size; - } - - get asyncEntrypointsIterable() { - return this._asyncEntrypoints; - } - - /** - * @returns {Array} an array containing the blocks - */ - getBlocks() { - return this._blocks.getFromCache(getArray); - } - - getNumberOfBlocks() { - return this._blocks.size; - } - - hasBlock(block) { - return this._blocks.has(block); - } - - /** - * @returns {Iterable} blocks - */ - get blocksIterable() { - return this._blocks; - } - - /** - * @param {AsyncDependenciesBlock} block a block - * @returns {boolean} false, if block was already added - */ - addBlock(block) { - if (!this._blocks.has(block)) { - this._blocks.add(block); - return true; - } - return false; - } - - /** - * @param {Module} module origin module - * @param {DependencyLocation} loc location of the reference in the origin module - * @param {string} request request name of the reference - * @returns {void} - */ - addOrigin(module, loc, request) { - this.origins.push({ - module, - loc, - request - }); - } - - /** - * @returns {string[]} the files contained this chunk group - */ - getFiles() { - const files = new Set(); - - for (const chunk of this.chunks) { - for (const file of chunk.files) { - files.add(file); - } - } - - return Array.from(files); - } - - /** - * @returns {void} - */ - remove() { - // cleanup parents - for (const parentChunkGroup of this._parents) { - // remove this chunk from its parents - parentChunkGroup._children.delete(this); - - // cleanup "sub chunks" - for (const chunkGroup of this._children) { - /** - * remove this chunk as "intermediary" and connect - * it "sub chunks" and parents directly - */ - // add parent to each "sub chunk" - chunkGroup.addParent(parentChunkGroup); - // add "sub chunk" to parent - parentChunkGroup.addChild(chunkGroup); - } - } - - /** - * we need to iterate again over the children - * to remove this from the child's parents. - * This can not be done in the above loop - * as it is not guaranteed that `this._parents` contains anything. - */ - for (const chunkGroup of this._children) { - // remove this as parent of every "sub chunk" - chunkGroup._parents.delete(this); - } - - // remove chunks - for (const chunk of this.chunks) { - chunk.removeGroup(this); - } - } - - sortItems() { - this.origins.sort(sortOrigin); - } - - /** - * Sorting predicate which allows current ChunkGroup to be compared against another. - * Sorting values are based off of number of chunks in ChunkGroup. - * - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {ChunkGroup} otherGroup the chunkGroup to compare this against - * @returns {-1|0|1} sort position for comparison - */ - compareTo(chunkGraph, otherGroup) { - if (this.chunks.length > otherGroup.chunks.length) return -1; - if (this.chunks.length < otherGroup.chunks.length) return 1; - return compareIterables(compareChunks(chunkGraph))( - this.chunks, - otherGroup.chunks - ); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {Record} mapping from children type to ordered list of ChunkGroups - */ - getChildrenByOrders(moduleGraph, chunkGraph) { - /** @type {Map} */ - const lists = new Map(); - for (const childGroup of this._children) { - for (const key of Object.keys(childGroup.options)) { - if (key.endsWith("Order")) { - const name = key.slice(0, key.length - "Order".length); - let list = lists.get(name); - if (list === undefined) { - lists.set(name, (list = [])); - } - list.push({ - order: childGroup.options[key], - group: childGroup - }); - } - } - } - /** @type {Record} */ - const result = Object.create(null); - for (const [name, list] of lists) { - list.sort((a, b) => { - const cmp = b.order - a.order; - if (cmp !== 0) return cmp; - return a.group.compareTo(chunkGraph, b.group); - }); - result[name] = list.map(i => i.group); - } - return result; - } - - /** - * Sets the top-down index of a module in this ChunkGroup - * @param {Module} module module for which the index should be set - * @param {number} index the index of the module - * @returns {void} - */ - setModulePreOrderIndex(module, index) { - this._modulePreOrderIndices.set(module, index); - } - - /** - * Gets the top-down index of a module in this ChunkGroup - * @param {Module} module the module - * @returns {number} index - */ - getModulePreOrderIndex(module) { - return this._modulePreOrderIndices.get(module); - } - - /** - * Sets the bottom-up index of a module in this ChunkGroup - * @param {Module} module module for which the index should be set - * @param {number} index the index of the module - * @returns {void} - */ - setModulePostOrderIndex(module, index) { - this._modulePostOrderIndices.set(module, index); - } - - /** - * Gets the bottom-up index of a module in this ChunkGroup - * @param {Module} module the module - * @returns {number} index - */ - getModulePostOrderIndex(module) { - return this._modulePostOrderIndices.get(module); - } - - /* istanbul ignore next */ - checkConstraints() { - const chunk = this; - for (const child of chunk._children) { - if (!child._parents.has(chunk)) { - throw new Error( - `checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}` - ); - } - } - for (const parentChunk of chunk._parents) { - if (!parentChunk._children.has(chunk)) { - throw new Error( - `checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}` - ); - } - } - } -} - -ChunkGroup.prototype.getModuleIndex = util.deprecate( - ChunkGroup.prototype.getModulePreOrderIndex, - "ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex", - "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX" -); - -ChunkGroup.prototype.getModuleIndex2 = util.deprecate( - ChunkGroup.prototype.getModulePostOrderIndex, - "ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex", - "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2" -); - -module.exports = ChunkGroup; - - -/***/ }), - -/***/ 54089: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Chunk")} Chunk */ - -class ChunkRenderError extends WebpackError { - /** - * Create a new ChunkRenderError - * @param {Chunk} chunk A chunk - * @param {string} file Related file - * @param {Error} error Original error - */ - constructor(chunk, file, error) { - super(); - - this.name = "ChunkRenderError"; - this.error = error; - this.message = error.message; - this.details = error.stack; - this.file = file; - this.chunk = chunk; - } -} - -module.exports = ChunkRenderError; - - -/***/ }), - -/***/ 61221: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ -/** @typedef {import("./Compilation")} Compilation */ - -const getJavascriptModulesPlugin = memoize(() => - __webpack_require__(36109) -); - -// TODO webpack 6 remove this class -class ChunkTemplate { - /** - * @param {OutputOptions} outputOptions output options - * @param {Compilation} compilation the compilation - */ - constructor(outputOptions, compilation) { - this._outputOptions = outputOptions || {}; - this.hooks = Object.freeze({ - renderManifest: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.renderManifest.tap( - options, - (entries, options) => { - if (options.chunk.hasRuntime()) return entries; - return fn(entries, options); - } - ); - }, - "ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST" - ) - }, - modules: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderChunk.tap(options, (source, renderContext) => - fn( - source, - compilation.moduleTemplates.javascript, - renderContext - ) - ); - }, - "ChunkTemplate.hooks.modules is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_MODULES" - ) - }, - render: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderChunk.tap(options, (source, renderContext) => - fn( - source, - compilation.moduleTemplates.javascript, - renderContext - ) - ); - }, - "ChunkTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER" - ) - }, - renderWithEntry: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .render.tap(options, (source, renderContext) => { - if ( - renderContext.chunkGraph.getNumberOfEntryModules( - renderContext.chunk - ) === 0 || - renderContext.chunk.hasRuntime() - ) { - return source; - } - return fn(source, renderContext.chunk); - }); - }, - "ChunkTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_WITH_ENTRY" - ) - }, - hash: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.fullHash.tap(options, fn); - }, - "ChunkTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_HASH" - ) - }, - hashForChunk: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .chunkHash.tap(options, (chunk, hash, context) => { - if (chunk.hasRuntime()) return; - fn(hash, chunk, context); - }); - }, - "ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK" - ) - } - }); - } -} - -Object.defineProperty(ChunkTemplate.prototype, "outputOptions", { - get: util.deprecate( - /** - * @this {ChunkTemplate} - * @returns {OutputOptions} output options - */ - function () { - return this._outputOptions; - }, - "ChunkTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" - ) -}); - -module.exports = ChunkTemplate; - - -/***/ }), - -/***/ 40135: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const asyncLib = __webpack_require__(78175); -const { SyncBailHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const createSchemaValidation = __webpack_require__(89699); -const { join } = __webpack_require__(47077); -const processAsyncTree = __webpack_require__(64102); - -/** @typedef {import("../declarations/WebpackOptions").CleanOptions} CleanOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./logging/Logger").Logger} Logger */ -/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ -/** @typedef {import("./util/fs").StatsCallback} StatsCallback */ - -/** @typedef {(function(string):boolean)|RegExp} IgnoreItem */ -/** @typedef {Map} Assets */ -/** @typedef {function(IgnoreItem): void} AddToIgnoreCallback */ - -/** - * @typedef {Object} CleanPluginCompilationHooks - * @property {SyncBailHook<[string], boolean>} keep when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config - */ - -const validate = createSchemaValidation( - undefined, - () => { - const { definitions } = __webpack_require__(13954); - return { - definitions, - oneOf: [{ $ref: "#/definitions/CleanOptions" }] - }; - }, - { - name: "Clean Plugin", - baseDataPath: "options" - } -); -const _10sec = 10 * 1000; - -/** - * marge assets map 2 into map 1 - * @param {Assets} as1 assets - * @param {Assets} as2 assets - * @returns {void} - */ -const mergeAssets = (as1, as2) => { - for (const [key, value1] of as2) { - const value2 = as1.get(key); - if (!value2 || value1 > value2) as1.set(key, value1); - } -}; - -/** - * @param {OutputFileSystem} fs filesystem - * @param {string} outputPath output path - * @param {Map} currentAssets filename of the current assets (must not start with .. or ., must only use / as path separator) - * @param {function((Error | null)=, Set=): void} callback returns the filenames of the assets that shouldn't be there - * @returns {void} - */ -const getDiffToFs = (fs, outputPath, currentAssets, callback) => { - const directories = new Set(); - // get directories of assets - for (const [asset] of currentAssets) { - directories.add(asset.replace(/(^|\/)[^/]*$/, "")); - } - // and all parent directories - for (const directory of directories) { - directories.add(directory.replace(/(^|\/)[^/]*$/, "")); - } - const diff = new Set(); - asyncLib.forEachLimit( - directories, - 10, - (directory, callback) => { - fs.readdir(join(fs, outputPath, directory), (err, entries) => { - if (err) { - if (err.code === "ENOENT") return callback(); - if (err.code === "ENOTDIR") { - diff.add(directory); - return callback(); - } - return callback(err); - } - for (const entry of entries) { - const file = /** @type {string} */ (entry); - const filename = directory ? `${directory}/${file}` : file; - if (!directories.has(filename) && !currentAssets.has(filename)) { - diff.add(filename); - } - } - callback(); - }); - }, - err => { - if (err) return callback(err); - - callback(null, diff); - } - ); -}; - -/** - * @param {Assets} currentAssets assets list - * @param {Assets} oldAssets old assets list - * @returns {Set} diff - */ -const getDiffToOldAssets = (currentAssets, oldAssets) => { - const diff = new Set(); - const now = Date.now(); - for (const [asset, ts] of oldAssets) { - if (ts >= now) continue; - if (!currentAssets.has(asset)) diff.add(asset); - } - return diff; -}; - -/** - * @param {OutputFileSystem} fs filesystem - * @param {string} filename path to file - * @param {StatsCallback} callback callback for provided filename - * @returns {void} - */ -const doStat = (fs, filename, callback) => { - if ("lstat" in fs) { - fs.lstat(filename, callback); - } else { - fs.stat(filename, callback); - } -}; - -/** - * @param {OutputFileSystem} fs filesystem - * @param {string} outputPath output path - * @param {boolean} dry only log instead of fs modification - * @param {Logger} logger logger - * @param {Set} diff filenames of the assets that shouldn't be there - * @param {function(string): boolean} isKept check if the entry is ignored - * @param {function(Error=, Assets=): void} callback callback - * @returns {void} - */ -const applyDiff = (fs, outputPath, dry, logger, diff, isKept, callback) => { - const log = msg => { - if (dry) { - logger.info(msg); - } else { - logger.log(msg); - } - }; - /** @typedef {{ type: "check" | "unlink" | "rmdir", filename: string, parent: { remaining: number, job: Job } | undefined }} Job */ - /** @type {Job[]} */ - const jobs = Array.from(diff.keys(), filename => ({ - type: "check", - filename, - parent: undefined - })); - /** @type {Assets} */ - const keptAssets = new Map(); - processAsyncTree( - jobs, - 10, - ({ type, filename, parent }, push, callback) => { - const handleError = err => { - if (err.code === "ENOENT") { - log(`${filename} was removed during cleaning by something else`); - handleParent(); - return callback(); - } - return callback(err); - }; - const handleParent = () => { - if (parent && --parent.remaining === 0) push(parent.job); - }; - const path = join(fs, outputPath, filename); - switch (type) { - case "check": - if (isKept(filename)) { - keptAssets.set(filename, 0); - // do not decrement parent entry as we don't want to delete the parent - log(`${filename} will be kept`); - return process.nextTick(callback); - } - doStat(fs, path, (err, stats) => { - if (err) return handleError(err); - if (!stats.isDirectory()) { - push({ - type: "unlink", - filename, - parent - }); - return callback(); - } - fs.readdir(path, (err, entries) => { - if (err) return handleError(err); - /** @type {Job} */ - const deleteJob = { - type: "rmdir", - filename, - parent - }; - if (entries.length === 0) { - push(deleteJob); - } else { - const parentToken = { - remaining: entries.length, - job: deleteJob - }; - for (const entry of entries) { - const file = /** @type {string} */ (entry); - if (file.startsWith(".")) { - log( - `${filename} will be kept (dot-files will never be removed)` - ); - continue; - } - push({ - type: "check", - filename: `${filename}/${file}`, - parent: parentToken - }); - } - } - return callback(); - }); - }); - break; - case "rmdir": - log(`${filename} will be removed`); - if (dry) { - handleParent(); - return process.nextTick(callback); - } - if (!fs.rmdir) { - logger.warn( - `${filename} can't be removed because output file system doesn't support removing directories (rmdir)` - ); - return process.nextTick(callback); - } - fs.rmdir(path, err => { - if (err) return handleError(err); - handleParent(); - callback(); - }); - break; - case "unlink": - log(`${filename} will be removed`); - if (dry) { - handleParent(); - return process.nextTick(callback); - } - if (!fs.unlink) { - logger.warn( - `${filename} can't be removed because output file system doesn't support removing files (rmdir)` - ); - return process.nextTick(callback); - } - fs.unlink(path, err => { - if (err) return handleError(err); - handleParent(); - callback(); - }); - break; - } - }, - err => { - if (err) return callback(err); - callback(undefined, keptAssets); - } - ); -}; - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class CleanPlugin { - /** - * @param {Compilation} compilation the compilation - * @returns {CleanPluginCompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - /** @type {SyncBailHook<[string], boolean>} */ - keep: new SyncBailHook(["ignore"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - /** @param {CleanOptions} options options */ - constructor(options = {}) { - validate(options); - this.options = { dry: false, ...options }; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { dry, keep } = this.options; - - const keepFn = - typeof keep === "function" - ? keep - : typeof keep === "string" - ? path => path.startsWith(keep) - : typeof keep === "object" && keep.test - ? path => keep.test(path) - : () => false; - - // We assume that no external modification happens while the compiler is active - // So we can store the old assets and only diff to them to avoid fs access on - // incremental builds - /** @type {undefined|Assets} */ - let oldAssets; - - compiler.hooks.emit.tapAsync( - { - name: "CleanPlugin", - stage: 100 - }, - (compilation, callback) => { - const hooks = CleanPlugin.getCompilationHooks(compilation); - const logger = compilation.getLogger("webpack.CleanPlugin"); - const fs = compiler.outputFileSystem; - - if (!fs.readdir) { - return callback( - new Error( - "CleanPlugin: Output filesystem doesn't support listing directories (readdir)" - ) - ); - } - - /** @type {Assets} */ - const currentAssets = new Map(); - const now = Date.now(); - for (const asset of Object.keys(compilation.assets)) { - if (/^[A-Za-z]:\\|^\/|^\\\\/.test(asset)) continue; - let normalizedAsset; - let newNormalizedAsset = asset.replace(/\\/g, "/"); - do { - normalizedAsset = newNormalizedAsset; - newNormalizedAsset = normalizedAsset.replace( - /(^|\/)(?!\.\.)[^/]+\/\.\.\//g, - "$1" - ); - } while (newNormalizedAsset !== normalizedAsset); - if (normalizedAsset.startsWith("../")) continue; - const assetInfo = compilation.assetsInfo.get(asset); - if (assetInfo && assetInfo.hotModuleReplacement) { - currentAssets.set(normalizedAsset, now + _10sec); - } else { - currentAssets.set(normalizedAsset, 0); - } - } - - const outputPath = compilation.getPath(compiler.outputPath, {}); - - const isKept = path => { - const result = hooks.keep.call(path); - if (result !== undefined) return result; - return keepFn(path); - }; - - /** - * @param {Error=} err err - * @param {Set=} diff diff - */ - const diffCallback = (err, diff) => { - if (err) { - oldAssets = undefined; - callback(err); - return; - } - applyDiff( - fs, - outputPath, - dry, - logger, - diff, - isKept, - (err, keptAssets) => { - if (err) { - oldAssets = undefined; - } else { - if (oldAssets) mergeAssets(currentAssets, oldAssets); - oldAssets = currentAssets; - if (keptAssets) mergeAssets(oldAssets, keptAssets); - } - callback(err); - } - ); - }; - - if (oldAssets) { - diffCallback(null, getDiffToOldAssets(currentAssets, oldAssets)); - } else { - getDiffToFs(fs, outputPath, currentAssets, diffCallback); - } - } - ); - } -} - -module.exports = CleanPlugin; - - -/***/ }), - -/***/ 52743: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ - -class CodeGenerationError extends WebpackError { - /** - * Create a new CodeGenerationError - * @param {Module} module related module - * @param {Error} error Original error - */ - constructor(module, error) { - super(); - - this.name = "CodeGenerationError"; - this.error = error; - this.message = error.message; - this.details = error.stack; - this.module = module; - } -} - -module.exports = CodeGenerationError; - - -/***/ }), - -/***/ 18894: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { provide } = __webpack_require__(94970); -const { first } = __webpack_require__(73268); -const createHash = __webpack_require__(85205); -const { runtimeToString, RuntimeSpecMap } = __webpack_require__(47462); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -class CodeGenerationResults { - /** - * @param {string | Hash} hashFunction the hash function to use - */ - constructor(hashFunction = "md4") { - /** @type {Map>} */ - this.map = new Map(); - this._hashFunction = hashFunction; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {CodeGenerationResult} the CodeGenerationResult - */ - get(module, runtime) { - const entry = this.map.get(module); - if (entry === undefined) { - throw new Error( - `No code generation entry for ${module.identifier()} (existing entries: ${Array.from( - this.map.keys(), - m => m.identifier() - ).join(", ")})` - ); - } - if (runtime === undefined) { - if (entry.size > 1) { - const results = new Set(entry.values()); - if (results.size !== 1) { - throw new Error( - `No unique code generation entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( - entry.keys(), - r => runtimeToString(r) - ).join(", ")}). -Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` - ); - } - return first(results); - } - return entry.values().next().value; - } - const result = entry.get(runtime); - if (result === undefined) { - throw new Error( - `No code generation entry for runtime ${runtimeToString( - runtime - )} for ${module.identifier()} (existing runtimes: ${Array.from( - entry.keys(), - r => runtimeToString(r) - ).join(", ")})` - ); - } - return result; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {boolean} true, when we have data for this - */ - has(module, runtime) { - const entry = this.map.get(module); - if (entry === undefined) { - return false; - } - if (runtime !== undefined) { - return entry.has(runtime); - } else if (entry.size > 1) { - const results = new Set(entry.values()); - return results.size === 1; - } else { - return entry.size === 1; - } - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {string} sourceType the source type - * @returns {Source} a source - */ - getSource(module, runtime, sourceType) { - return this.get(module, runtime).sources.get(sourceType); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {ReadonlySet} runtime requirements - */ - getRuntimeRequirements(module, runtime) { - return this.get(module, runtime).runtimeRequirements; - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {string} key data key - * @returns {any} data generated by code generation - */ - getData(module, runtime, key) { - const data = this.get(module, runtime).data; - return data === undefined ? undefined : data.get(key); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {any} hash of the code generation - */ - getHash(module, runtime) { - const info = this.get(module, runtime); - if (info.hash !== undefined) return info.hash; - const hash = createHash(this._hashFunction); - for (const [type, source] of info.sources) { - hash.update(type); - source.updateHash(hash); - } - if (info.runtimeRequirements) { - for (const rr of info.runtimeRequirements) hash.update(rr); - } - return (info.hash = /** @type {string} */ (hash.digest("hex"))); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {CodeGenerationResult} result result from module - * @returns {void} - */ - add(module, runtime, result) { - const map = provide(this.map, module, () => new RuntimeSpecMap()); - map.set(runtime, result); - } -} - -module.exports = CodeGenerationResults; - - -/***/ }), - -/***/ 54437: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ - -class CommentCompilationWarning extends WebpackError { - /** - * - * @param {string} message warning message - * @param {DependencyLocation} loc affected lines of code - */ - constructor(message, loc) { - super(message); - - this.name = "CommentCompilationWarning"; - - this.loc = loc; - } -} - -makeSerializable( - CommentCompilationWarning, - "webpack/lib/CommentCompilationWarning" -); - -module.exports = CommentCompilationWarning; - - -/***/ }), - -/***/ 39220: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConstDependency = __webpack_require__(14367); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -const nestedWebpackRequireTag = Symbol("nested __webpack_require__"); - -class CompatibilityPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "CompatibilityPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("CompatibilityPlugin", (parser, parserOptions) => { - if ( - parserOptions.browserify !== undefined && - !parserOptions.browserify - ) - return; - - parser.hooks.call - .for("require") - .tap("CompatibilityPlugin", expr => { - // support for browserify style require delegator: "require(o, !0)" - if (expr.arguments.length !== 2) return; - const second = parser.evaluateExpression(expr.arguments[1]); - if (!second.isBoolean()) return; - if (second.asBool() !== true) return; - const dep = new ConstDependency("require", expr.callee.range); - dep.loc = expr.loc; - if (parser.state.current.dependencies.length > 0) { - const last = - parser.state.current.dependencies[ - parser.state.current.dependencies.length - 1 - ]; - if ( - last.critical && - last.options && - last.options.request === "." && - last.userRequest === "." && - last.options.recursive - ) - parser.state.current.dependencies.pop(); - } - parser.state.module.addPresentationalDependency(dep); - return true; - }); - }); - - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - const handler = parser => { - // Handle nested requires - parser.hooks.preStatement.tap("CompatibilityPlugin", statement => { - if ( - statement.type === "FunctionDeclaration" && - statement.id && - statement.id.name === "__webpack_require__" - ) { - const newName = `__nested_webpack_require_${statement.range[0]}__`; - parser.tagVariable(statement.id.name, nestedWebpackRequireTag, { - name: newName, - declaration: { - updated: false, - loc: statement.id.loc, - range: statement.id.range - } - }); - return true; - } - }); - parser.hooks.pattern - .for("__webpack_require__") - .tap("CompatibilityPlugin", pattern => { - const newName = `__nested_webpack_require_${pattern.range[0]}__`; - parser.tagVariable(pattern.name, nestedWebpackRequireTag, { - name: newName, - declaration: { - updated: false, - loc: pattern.loc, - range: pattern.range - } - }); - return true; - }); - parser.hooks.expression - .for(nestedWebpackRequireTag) - .tap("CompatibilityPlugin", expr => { - const { name, declaration } = parser.currentTagData; - if (!declaration.updated) { - const dep = new ConstDependency(name, declaration.range); - dep.loc = declaration.loc; - parser.state.module.addPresentationalDependency(dep); - declaration.updated = true; - } - const dep = new ConstDependency(name, expr.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - // Handle hashbang - parser.hooks.program.tap( - "CompatibilityPlugin", - (program, comments) => { - if (comments.length === 0) return; - const c = comments[0]; - if (c.type === "Line" && c.range[0] === 0) { - if (parser.state.source.slice(0, 2).toString() !== "#!") return; - // this is a hashbang comment - const dep = new ConstDependency("//", 0); - dep.loc = c.loc; - parser.state.module.addPresentationalDependency(dep); - } - } - ); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("CompatibilityPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("CompatibilityPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("CompatibilityPlugin", handler); - } - ); - } -} -module.exports = CompatibilityPlugin; - - -/***/ }), - -/***/ 73002: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const { - HookMap, - SyncHook, - SyncBailHook, - SyncWaterfallHook, - AsyncSeriesHook, - AsyncSeriesBailHook, - AsyncParallelHook -} = __webpack_require__(44217); -const util = __webpack_require__(73837); -const { CachedSource } = __webpack_require__(51255); -const { MultiItemCache } = __webpack_require__(36035); -const Chunk = __webpack_require__(84891); -const ChunkGraph = __webpack_require__(75449); -const ChunkGroup = __webpack_require__(12487); -const ChunkRenderError = __webpack_require__(54089); -const ChunkTemplate = __webpack_require__(61221); -const CodeGenerationError = __webpack_require__(52743); -const CodeGenerationResults = __webpack_require__(18894); -const Dependency = __webpack_require__(87056); -const DependencyTemplates = __webpack_require__(97723); -const Entrypoint = __webpack_require__(33546); -const ErrorHelpers = __webpack_require__(8821); -const FileSystemInfo = __webpack_require__(67469); -const { - connectChunkGroupAndChunk, - connectChunkGroupParentAndChild -} = __webpack_require__(37855); -const { - makeWebpackError, - tryRunOrWebpackError -} = __webpack_require__(35230); -const MainTemplate = __webpack_require__(87797); -const Module = __webpack_require__(53840); -const ModuleDependencyError = __webpack_require__(17799); -const ModuleDependencyWarning = __webpack_require__(76218); -const ModuleGraph = __webpack_require__(13487); -const ModuleHashingError = __webpack_require__(16939); -const ModuleNotFoundError = __webpack_require__(16554); -const ModuleProfile = __webpack_require__(4833); -const ModuleRestoreError = __webpack_require__(14273); -const ModuleStoreError = __webpack_require__(73731); -const ModuleTemplate = __webpack_require__(88367); -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeTemplate = __webpack_require__(30514); -const Stats = __webpack_require__(47158); -const WebpackError = __webpack_require__(27154); -const buildChunkGraph = __webpack_require__(21078); -const BuildCycleError = __webpack_require__(55774); -const { Logger, LogType } = __webpack_require__(33594); -const StatsFactory = __webpack_require__(70900); -const StatsPrinter = __webpack_require__(67793); -const { equals: arrayEquals } = __webpack_require__(28087); -const AsyncQueue = __webpack_require__(51491); -const LazySet = __webpack_require__(96522); -const { provide } = __webpack_require__(94970); -const WeakTupleMap = __webpack_require__(20427); -const { cachedCleverMerge } = __webpack_require__(22093); -const { - compareLocations, - concatComparators, - compareSelect, - compareIds, - compareStringsNumeric, - compareModulesByIdentifier -} = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const { - arrayToSetDeprecation, - soonFrozenObjectDeprecation, - createFakeHook -} = __webpack_require__(99321); -const processAsyncTree = __webpack_require__(64102); -const { getRuntimeKey } = __webpack_require__(47462); -const { isSourceEqual } = __webpack_require__(22307); - -/** @template T @typedef {import("tapable").AsArray} AsArray */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ -/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ -/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */ -/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Cache")} Cache */ -/** @typedef {import("./CacheFacade")} CacheFacade */ -/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Compiler").CompilationParams} CompilationParams */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./ModuleFactory")} ModuleFactory */ -/** @typedef {import("./ModuleFactory").ModuleFactoryCreateDataContextInfo} ModuleFactoryCreateDataContextInfo */ -/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./RuntimeModule")} RuntimeModule */ -/** @typedef {import("./Template").RenderManifestEntry} RenderManifestEntry */ -/** @typedef {import("./Template").RenderManifestOptions} RenderManifestOptions */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsError} StatsError */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModule} StatsModule */ -/** @typedef {import("./util/Hash")} Hash */ -/** @template T @typedef {import("./util/deprecation").FakeHook} FakeHook */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @callback Callback - * @param {(WebpackError | null)=} err - * @returns {void} - */ - -/** - * @callback ModuleCallback - * @param {(WebpackError | null)=} err - * @param {Module=} result - * @returns {void} - */ - -/** - * @callback ModuleFactoryResultCallback - * @param {(WebpackError | null)=} err - * @param {ModuleFactoryResult=} result - * @returns {void} - */ - -/** - * @callback ModuleOrFactoryResultCallback - * @param {(WebpackError | null)=} err - * @param {Module | ModuleFactoryResult=} result - * @returns {void} - */ - -/** - * @callback ExecuteModuleCallback - * @param {(WebpackError | null)=} err - * @param {ExecuteModuleResult=} result - * @returns {void} - */ - -/** - * @callback DepBlockVarDependenciesCallback - * @param {Dependency} dependency - * @returns {any} - */ - -/** @typedef {new (...args: any[]) => Dependency} DepConstructor */ -/** @typedef {Record} CompilationAssets */ - -/** - * @typedef {Object} AvailableModulesChunkGroupMapping - * @property {ChunkGroup} chunkGroup - * @property {Set} availableModules - * @property {boolean} needCopy - */ - -/** - * @typedef {Object} DependenciesBlockLike - * @property {Dependency[]} dependencies - * @property {AsyncDependenciesBlock[]} blocks - */ - -/** - * @typedef {Object} ChunkPathData - * @property {string|number} id - * @property {string=} name - * @property {string} hash - * @property {function(number): string=} hashWithLength - * @property {(Record)=} contentHash - * @property {(Record string>)=} contentHashWithLength - */ - -/** - * @typedef {Object} ChunkHashContext - * @property {CodeGenerationResults} codeGenerationResults results of code generation - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - */ - -/** - * @typedef {Object} RuntimeRequirementsContext - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {CodeGenerationResults} codeGenerationResults the code generation results - */ - -/** - * @typedef {Object} ExecuteModuleOptions - * @property {EntryOptions=} entryOptions - */ - -/** - * @typedef {Object} ExecuteModuleResult - * @property {any} exports - * @property {boolean} cacheable - * @property {Map} assets - * @property {LazySet} fileDependencies - * @property {LazySet} contextDependencies - * @property {LazySet} missingDependencies - * @property {LazySet} buildDependencies - */ - -/** - * @typedef {Object} ExecuteModuleArgument - * @property {Module} module - * @property {{ id: string, exports: any, loaded: boolean }=} moduleObject - * @property {any} preparedInfo - * @property {CodeGenerationResult} codeGenerationResult - */ - -/** - * @typedef {Object} ExecuteModuleContext - * @property {Map} assets - * @property {Chunk} chunk - * @property {ChunkGraph} chunkGraph - * @property {function(string): any=} __webpack_require__ - */ - -/** - * @typedef {Object} EntryData - * @property {Dependency[]} dependencies dependencies of the entrypoint that should be evaluated at startup - * @property {Dependency[]} includeDependencies dependencies of the entrypoint that should be included but not evaluated - * @property {EntryOptions} options options of the entrypoint - */ - -/** - * @typedef {Object} LogEntry - * @property {string} type - * @property {any[]} args - * @property {number} time - * @property {string[]=} trace - */ - -/** - * @typedef {Object} KnownAssetInfo - * @property {boolean=} immutable true, if the asset can be long term cached forever (contains a hash) - * @property {boolean=} minimized whether the asset is minimized - * @property {string | string[]=} fullhash the value(s) of the full hash used for this asset - * @property {string | string[]=} chunkhash the value(s) of the chunk hash used for this asset - * @property {string | string[]=} modulehash the value(s) of the module hash used for this asset - * @property {string | string[]=} contenthash the value(s) of the content hash used for this asset - * @property {string=} sourceFilename when asset was created from a source file (potentially transformed), the original filename relative to compilation context - * @property {number=} size size in bytes, only set after asset has been emitted - * @property {boolean=} development true, when asset is only used for development and doesn't count towards user-facing assets - * @property {boolean=} hotModuleReplacement true, when asset ships data for updating an existing application (HMR) - * @property {boolean=} javascriptModule true, when asset is javascript and an ESM - * @property {Record=} related object of pointers to other assets, keyed by type of relation (only points from parent to child) - */ - -/** @typedef {KnownAssetInfo & Record} AssetInfo */ - -/** - * @typedef {Object} Asset - * @property {string} name the filename of the asset - * @property {Source} source source of the asset - * @property {AssetInfo} info info about the asset - */ - -/** - * @typedef {Object} ModulePathData - * @property {string|number} id - * @property {string} hash - * @property {function(number): string=} hashWithLength - */ - -/** - * @typedef {Object} PathData - * @property {ChunkGraph=} chunkGraph - * @property {string=} hash - * @property {function(number): string=} hashWithLength - * @property {(Chunk|ChunkPathData)=} chunk - * @property {(Module|ModulePathData)=} module - * @property {RuntimeSpec=} runtime - * @property {string=} filename - * @property {string=} basename - * @property {string=} query - * @property {string=} contentHashType - * @property {string=} contentHash - * @property {function(number): string=} contentHashWithLength - * @property {boolean=} noChunkHash - * @property {string=} url - */ - -/** - * @typedef {Object} KnownNormalizedStatsOptions - * @property {string} context - * @property {RequestShortener} requestShortener - * @property {string} chunksSort - * @property {string} modulesSort - * @property {string} chunkModulesSort - * @property {string} nestedModulesSort - * @property {string} assetsSort - * @property {boolean} ids - * @property {boolean} cachedAssets - * @property {boolean} groupAssetsByEmitStatus - * @property {boolean} groupAssetsByPath - * @property {boolean} groupAssetsByExtension - * @property {number} assetsSpace - * @property {((value: string, asset: StatsAsset) => boolean)[]} excludeAssets - * @property {((name: string, module: StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean)[]} excludeModules - * @property {((warning: StatsError, textValue: string) => boolean)[]} warningsFilter - * @property {boolean} cachedModules - * @property {boolean} orphanModules - * @property {boolean} dependentModules - * @property {boolean} runtimeModules - * @property {boolean} groupModulesByCacheStatus - * @property {boolean} groupModulesByLayer - * @property {boolean} groupModulesByAttributes - * @property {boolean} groupModulesByPath - * @property {boolean} groupModulesByExtension - * @property {boolean} groupModulesByType - * @property {boolean | "auto"} entrypoints - * @property {boolean} chunkGroups - * @property {boolean} chunkGroupAuxiliary - * @property {boolean} chunkGroupChildren - * @property {number} chunkGroupMaxAssets - * @property {number} modulesSpace - * @property {number} chunkModulesSpace - * @property {number} nestedModulesSpace - * @property {false|"none"|"error"|"warn"|"info"|"log"|"verbose"} logging - * @property {((value: string) => boolean)[]} loggingDebug - * @property {boolean} loggingTrace - * @property {any} _env - */ - -/** @typedef {KnownNormalizedStatsOptions & Omit & Record} NormalizedStatsOptions */ - -/** - * @typedef {Object} KnownCreateStatsOptionsContext - * @property {boolean=} forToString - */ - -/** @typedef {KnownCreateStatsOptionsContext & Record} CreateStatsOptionsContext */ - -/** @type {AssetInfo} */ -const EMPTY_ASSET_INFO = Object.freeze({}); - -const esmDependencyCategory = "esm"; -// TODO webpack 6: remove -const deprecatedNormalModuleLoaderHook = util.deprecate( - compilation => { - return (__webpack_require__(89417).getCompilationHooks)(compilation).loader; - }, - "Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader", - "DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK" -); - -// TODO webpack 6: remove -const defineRemovedModuleTemplates = moduleTemplates => { - Object.defineProperties(moduleTemplates, { - asset: { - enumerable: false, - configurable: false, - get: () => { - throw new WebpackError( - "Compilation.moduleTemplates.asset has been removed" - ); - } - }, - webassembly: { - enumerable: false, - configurable: false, - get: () => { - throw new WebpackError( - "Compilation.moduleTemplates.webassembly has been removed" - ); - } - } - }); - moduleTemplates = undefined; -}; - -const byId = compareSelect( - /** - * @param {Chunk} c chunk - * @returns {number | string} id - */ c => c.id, - compareIds -); - -const byNameOrHash = concatComparators( - compareSelect( - /** - * @param {Compilation} c compilation - * @returns {string} name - */ - c => c.name, - compareIds - ), - compareSelect( - /** - * @param {Compilation} c compilation - * @returns {string} hash - */ c => c.fullHash, - compareIds - ) -); - -const byMessage = compareSelect(err => `${err.message}`, compareStringsNumeric); - -const byModule = compareSelect( - err => (err.module && err.module.identifier()) || "", - compareStringsNumeric -); - -const byLocation = compareSelect(err => err.loc, compareLocations); - -const compareErrors = concatComparators(byModule, byLocation, byMessage); - -/** @type {WeakMap} */ -const unsafeCacheDependencies = new WeakMap(); - -/** @type {WeakMap} */ -const unsafeCacheData = new WeakMap(); - -class Compilation { - /** - * Creates an instance of Compilation. - * @param {Compiler} compiler the compiler which created the compilation - * @param {CompilationParams} params the compilation parameters - */ - constructor(compiler, params) { - this._backCompat = compiler._backCompat; - - const getNormalModuleLoader = () => deprecatedNormalModuleLoaderHook(this); - /** @typedef {{ additionalAssets?: true | Function }} ProcessAssetsAdditionalOptions */ - /** @type {AsyncSeriesHook<[CompilationAssets], ProcessAssetsAdditionalOptions>} */ - const processAssetsHook = new AsyncSeriesHook(["assets"]); - - let savedAssets = new Set(); - const popNewAssets = assets => { - let newAssets = undefined; - for (const file of Object.keys(assets)) { - if (savedAssets.has(file)) continue; - if (newAssets === undefined) { - newAssets = Object.create(null); - } - newAssets[file] = assets[file]; - savedAssets.add(file); - } - return newAssets; - }; - processAssetsHook.intercept({ - name: "Compilation", - call: () => { - savedAssets = new Set(Object.keys(this.assets)); - }, - register: tap => { - const { type, name } = tap; - const { fn, additionalAssets, ...remainingTap } = tap; - const additionalAssetsFn = - additionalAssets === true ? fn : additionalAssets; - const processedAssets = additionalAssetsFn ? new WeakSet() : undefined; - switch (type) { - case "sync": - if (additionalAssetsFn) { - this.hooks.processAdditionalAssets.tap(name, assets => { - if (processedAssets.has(this.assets)) - additionalAssetsFn(assets); - }); - } - return { - ...remainingTap, - type: "async", - fn: (assets, callback) => { - try { - fn(assets); - } catch (e) { - return callback(e); - } - if (processedAssets !== undefined) - processedAssets.add(this.assets); - const newAssets = popNewAssets(assets); - if (newAssets !== undefined) { - this.hooks.processAdditionalAssets.callAsync( - newAssets, - callback - ); - return; - } - callback(); - } - }; - case "async": - if (additionalAssetsFn) { - this.hooks.processAdditionalAssets.tapAsync( - name, - (assets, callback) => { - if (processedAssets.has(this.assets)) - return additionalAssetsFn(assets, callback); - callback(); - } - ); - } - return { - ...remainingTap, - fn: (assets, callback) => { - fn(assets, err => { - if (err) return callback(err); - if (processedAssets !== undefined) - processedAssets.add(this.assets); - const newAssets = popNewAssets(assets); - if (newAssets !== undefined) { - this.hooks.processAdditionalAssets.callAsync( - newAssets, - callback - ); - return; - } - callback(); - }); - } - }; - case "promise": - if (additionalAssetsFn) { - this.hooks.processAdditionalAssets.tapPromise(name, assets => { - if (processedAssets.has(this.assets)) - return additionalAssetsFn(assets); - return Promise.resolve(); - }); - } - return { - ...remainingTap, - fn: assets => { - const p = fn(assets); - if (!p || !p.then) return p; - return p.then(() => { - if (processedAssets !== undefined) - processedAssets.add(this.assets); - const newAssets = popNewAssets(assets); - if (newAssets !== undefined) { - return this.hooks.processAdditionalAssets.promise( - newAssets - ); - } - }); - } - }; - } - } - }); - - /** @type {SyncHook<[CompilationAssets]>} */ - const afterProcessAssetsHook = new SyncHook(["assets"]); - - /** - * @template T - * @param {string} name name of the hook - * @param {number} stage new stage - * @param {function(): AsArray} getArgs get old hook function args - * @param {string=} code deprecation code (not deprecated when unset) - * @returns {FakeHook, "tap" | "tapAsync" | "tapPromise" | "name">>} fake hook which redirects - */ - const createProcessAssetsHook = (name, stage, getArgs, code) => { - if (!this._backCompat && code) return undefined; - const errorMessage = - reason => `Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}. -BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`; - const getOptions = options => { - if (typeof options === "string") options = { name: options }; - if (options.stage) { - throw new Error(errorMessage("it's using the 'stage' option")); - } - return { ...options, stage: stage }; - }; - return createFakeHook( - { - name, - /** @type {AsyncSeriesHook["intercept"]} */ - intercept(interceptor) { - throw new Error(errorMessage("it's using 'intercept'")); - }, - /** @type {AsyncSeriesHook["tap"]} */ - tap: (options, fn) => { - processAssetsHook.tap(getOptions(options), () => fn(...getArgs())); - }, - /** @type {AsyncSeriesHook["tapAsync"]} */ - tapAsync: (options, fn) => { - processAssetsHook.tapAsync( - getOptions(options), - (assets, callback) => - /** @type {any} */ (fn)(...getArgs(), callback) - ); - }, - /** @type {AsyncSeriesHook["tapPromise"]} */ - tapPromise: (options, fn) => { - processAssetsHook.tapPromise(getOptions(options), () => - fn(...getArgs()) - ); - } - }, - `${name} is deprecated (use Compilation.hooks.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)`, - code - ); - }; - this.hooks = Object.freeze({ - /** @type {SyncHook<[Module]>} */ - buildModule: new SyncHook(["module"]), - /** @type {SyncHook<[Module]>} */ - rebuildModule: new SyncHook(["module"]), - /** @type {SyncHook<[Module, WebpackError]>} */ - failedModule: new SyncHook(["module", "error"]), - /** @type {SyncHook<[Module]>} */ - succeedModule: new SyncHook(["module"]), - /** @type {SyncHook<[Module]>} */ - stillValidModule: new SyncHook(["module"]), - - /** @type {SyncHook<[Dependency, EntryOptions]>} */ - addEntry: new SyncHook(["entry", "options"]), - /** @type {SyncHook<[Dependency, EntryOptions, Error]>} */ - failedEntry: new SyncHook(["entry", "options", "error"]), - /** @type {SyncHook<[Dependency, EntryOptions, Module]>} */ - succeedEntry: new SyncHook(["entry", "options", "module"]), - - /** @type {SyncWaterfallHook<[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]>} */ - dependencyReferencedExports: new SyncWaterfallHook([ - "referencedExports", - "dependency", - "runtime" - ]), - - /** @type {SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>} */ - executeModule: new SyncHook(["options", "context"]), - /** @type {AsyncParallelHook<[ExecuteModuleArgument, ExecuteModuleContext]>} */ - prepareModuleExecution: new AsyncParallelHook(["options", "context"]), - - /** @type {AsyncSeriesHook<[Iterable]>} */ - finishModules: new AsyncSeriesHook(["modules"]), - /** @type {AsyncSeriesHook<[Module]>} */ - finishRebuildingModule: new AsyncSeriesHook(["module"]), - /** @type {SyncHook<[]>} */ - unseal: new SyncHook([]), - /** @type {SyncHook<[]>} */ - seal: new SyncHook([]), - - /** @type {SyncHook<[]>} */ - beforeChunks: new SyncHook([]), - /** @type {SyncHook<[Iterable]>} */ - afterChunks: new SyncHook(["chunks"]), - - /** @type {SyncBailHook<[Iterable]>} */ - optimizeDependencies: new SyncBailHook(["modules"]), - /** @type {SyncHook<[Iterable]>} */ - afterOptimizeDependencies: new SyncHook(["modules"]), - - /** @type {SyncHook<[]>} */ - optimize: new SyncHook([]), - /** @type {SyncBailHook<[Iterable]>} */ - optimizeModules: new SyncBailHook(["modules"]), - /** @type {SyncHook<[Iterable]>} */ - afterOptimizeModules: new SyncHook(["modules"]), - - /** @type {SyncBailHook<[Iterable, ChunkGroup[]]>} */ - optimizeChunks: new SyncBailHook(["chunks", "chunkGroups"]), - /** @type {SyncHook<[Iterable, ChunkGroup[]]>} */ - afterOptimizeChunks: new SyncHook(["chunks", "chunkGroups"]), - - /** @type {AsyncSeriesHook<[Iterable, Iterable]>} */ - optimizeTree: new AsyncSeriesHook(["chunks", "modules"]), - /** @type {SyncHook<[Iterable, Iterable]>} */ - afterOptimizeTree: new SyncHook(["chunks", "modules"]), - - /** @type {AsyncSeriesBailHook<[Iterable, Iterable]>} */ - optimizeChunkModules: new AsyncSeriesBailHook(["chunks", "modules"]), - /** @type {SyncHook<[Iterable, Iterable]>} */ - afterOptimizeChunkModules: new SyncHook(["chunks", "modules"]), - /** @type {SyncBailHook<[], boolean>} */ - shouldRecord: new SyncBailHook([]), - - /** @type {SyncHook<[Chunk, Set, RuntimeRequirementsContext]>} */ - additionalChunkRuntimeRequirements: new SyncHook([ - "chunk", - "runtimeRequirements", - "context" - ]), - /** @type {HookMap, RuntimeRequirementsContext]>>} */ - runtimeRequirementInChunk: new HookMap( - () => new SyncBailHook(["chunk", "runtimeRequirements", "context"]) - ), - /** @type {SyncHook<[Module, Set, RuntimeRequirementsContext]>} */ - additionalModuleRuntimeRequirements: new SyncHook([ - "module", - "runtimeRequirements", - "context" - ]), - /** @type {HookMap, RuntimeRequirementsContext]>>} */ - runtimeRequirementInModule: new HookMap( - () => new SyncBailHook(["module", "runtimeRequirements", "context"]) - ), - /** @type {SyncHook<[Chunk, Set, RuntimeRequirementsContext]>} */ - additionalTreeRuntimeRequirements: new SyncHook([ - "chunk", - "runtimeRequirements", - "context" - ]), - /** @type {HookMap, RuntimeRequirementsContext]>>} */ - runtimeRequirementInTree: new HookMap( - () => new SyncBailHook(["chunk", "runtimeRequirements", "context"]) - ), - - /** @type {SyncHook<[RuntimeModule, Chunk]>} */ - runtimeModule: new SyncHook(["module", "chunk"]), - - /** @type {SyncHook<[Iterable, any]>} */ - reviveModules: new SyncHook(["modules", "records"]), - /** @type {SyncHook<[Iterable]>} */ - beforeModuleIds: new SyncHook(["modules"]), - /** @type {SyncHook<[Iterable]>} */ - moduleIds: new SyncHook(["modules"]), - /** @type {SyncHook<[Iterable]>} */ - optimizeModuleIds: new SyncHook(["modules"]), - /** @type {SyncHook<[Iterable]>} */ - afterOptimizeModuleIds: new SyncHook(["modules"]), - - /** @type {SyncHook<[Iterable, any]>} */ - reviveChunks: new SyncHook(["chunks", "records"]), - /** @type {SyncHook<[Iterable]>} */ - beforeChunkIds: new SyncHook(["chunks"]), - /** @type {SyncHook<[Iterable]>} */ - chunkIds: new SyncHook(["chunks"]), - /** @type {SyncHook<[Iterable]>} */ - optimizeChunkIds: new SyncHook(["chunks"]), - /** @type {SyncHook<[Iterable]>} */ - afterOptimizeChunkIds: new SyncHook(["chunks"]), - - /** @type {SyncHook<[Iterable, any]>} */ - recordModules: new SyncHook(["modules", "records"]), - /** @type {SyncHook<[Iterable, any]>} */ - recordChunks: new SyncHook(["chunks", "records"]), - - /** @type {SyncHook<[Iterable]>} */ - optimizeCodeGeneration: new SyncHook(["modules"]), - - /** @type {SyncHook<[]>} */ - beforeModuleHash: new SyncHook([]), - /** @type {SyncHook<[]>} */ - afterModuleHash: new SyncHook([]), - - /** @type {SyncHook<[]>} */ - beforeCodeGeneration: new SyncHook([]), - /** @type {SyncHook<[]>} */ - afterCodeGeneration: new SyncHook([]), - - /** @type {SyncHook<[]>} */ - beforeRuntimeRequirements: new SyncHook([]), - /** @type {SyncHook<[]>} */ - afterRuntimeRequirements: new SyncHook([]), - - /** @type {SyncHook<[]>} */ - beforeHash: new SyncHook([]), - /** @type {SyncHook<[Chunk]>} */ - contentHash: new SyncHook(["chunk"]), - /** @type {SyncHook<[]>} */ - afterHash: new SyncHook([]), - /** @type {SyncHook<[any]>} */ - recordHash: new SyncHook(["records"]), - /** @type {SyncHook<[Compilation, any]>} */ - record: new SyncHook(["compilation", "records"]), - - /** @type {SyncHook<[]>} */ - beforeModuleAssets: new SyncHook([]), - /** @type {SyncBailHook<[], boolean>} */ - shouldGenerateChunkAssets: new SyncBailHook([]), - /** @type {SyncHook<[]>} */ - beforeChunkAssets: new SyncHook([]), - // TODO webpack 6 remove - /** @deprecated */ - additionalChunkAssets: createProcessAssetsHook( - "additionalChunkAssets", - Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, - () => [this.chunks], - "DEP_WEBPACK_COMPILATION_ADDITIONAL_CHUNK_ASSETS" - ), - - // TODO webpack 6 deprecate - /** @deprecated */ - additionalAssets: createProcessAssetsHook( - "additionalAssets", - Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, - () => [] - ), - // TODO webpack 6 remove - /** @deprecated */ - optimizeChunkAssets: createProcessAssetsHook( - "optimizeChunkAssets", - Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE, - () => [this.chunks], - "DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS" - ), - // TODO webpack 6 remove - /** @deprecated */ - afterOptimizeChunkAssets: createProcessAssetsHook( - "afterOptimizeChunkAssets", - Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE + 1, - () => [this.chunks], - "DEP_WEBPACK_COMPILATION_AFTER_OPTIMIZE_CHUNK_ASSETS" - ), - // TODO webpack 6 deprecate - /** @deprecated */ - optimizeAssets: processAssetsHook, - // TODO webpack 6 deprecate - /** @deprecated */ - afterOptimizeAssets: afterProcessAssetsHook, - - processAssets: processAssetsHook, - afterProcessAssets: afterProcessAssetsHook, - /** @type {AsyncSeriesHook<[CompilationAssets]>} */ - processAdditionalAssets: new AsyncSeriesHook(["assets"]), - - /** @type {SyncBailHook<[], boolean>} */ - needAdditionalSeal: new SyncBailHook([]), - /** @type {AsyncSeriesHook<[]>} */ - afterSeal: new AsyncSeriesHook([]), - - /** @type {SyncWaterfallHook<[RenderManifestEntry[], RenderManifestOptions]>} */ - renderManifest: new SyncWaterfallHook(["result", "options"]), - - /** @type {SyncHook<[Hash]>} */ - fullHash: new SyncHook(["hash"]), - /** @type {SyncHook<[Chunk, Hash, ChunkHashContext]>} */ - chunkHash: new SyncHook(["chunk", "chunkHash", "ChunkHashContext"]), - - /** @type {SyncHook<[Module, string]>} */ - moduleAsset: new SyncHook(["module", "filename"]), - /** @type {SyncHook<[Chunk, string]>} */ - chunkAsset: new SyncHook(["chunk", "filename"]), - - /** @type {SyncWaterfallHook<[string, object, AssetInfo]>} */ - assetPath: new SyncWaterfallHook(["path", "options", "assetInfo"]), - - /** @type {SyncBailHook<[], boolean>} */ - needAdditionalPass: new SyncBailHook([]), - - /** @type {SyncHook<[Compiler, string, number]>} */ - childCompiler: new SyncHook([ - "childCompiler", - "compilerName", - "compilerIndex" - ]), - - /** @type {SyncBailHook<[string, LogEntry], true>} */ - log: new SyncBailHook(["origin", "logEntry"]), - - /** @type {SyncWaterfallHook<[WebpackError[]]>} */ - processWarnings: new SyncWaterfallHook(["warnings"]), - /** @type {SyncWaterfallHook<[WebpackError[]]>} */ - processErrors: new SyncWaterfallHook(["errors"]), - - /** @type {HookMap, CreateStatsOptionsContext]>>} */ - statsPreset: new HookMap(() => new SyncHook(["options", "context"])), - /** @type {SyncHook<[Partial, CreateStatsOptionsContext]>} */ - statsNormalize: new SyncHook(["options", "context"]), - /** @type {SyncHook<[StatsFactory, NormalizedStatsOptions]>} */ - statsFactory: new SyncHook(["statsFactory", "options"]), - /** @type {SyncHook<[StatsPrinter, NormalizedStatsOptions]>} */ - statsPrinter: new SyncHook(["statsPrinter", "options"]), - - get normalModuleLoader() { - return getNormalModuleLoader(); - } - }); - /** @type {string=} */ - this.name = undefined; - this.startTime = undefined; - this.endTime = undefined; - /** @type {Compiler} */ - this.compiler = compiler; - this.resolverFactory = compiler.resolverFactory; - this.inputFileSystem = compiler.inputFileSystem; - this.fileSystemInfo = new FileSystemInfo(this.inputFileSystem, { - managedPaths: compiler.managedPaths, - immutablePaths: compiler.immutablePaths, - logger: this.getLogger("webpack.FileSystemInfo"), - hashFunction: compiler.options.output.hashFunction - }); - if (compiler.fileTimestamps) { - this.fileSystemInfo.addFileTimestamps(compiler.fileTimestamps, true); - } - if (compiler.contextTimestamps) { - this.fileSystemInfo.addContextTimestamps( - compiler.contextTimestamps, - true - ); - } - /** @type {Map>} */ - this.valueCacheVersions = new Map(); - this.requestShortener = compiler.requestShortener; - this.compilerPath = compiler.compilerPath; - - this.logger = this.getLogger("webpack.Compilation"); - - const options = compiler.options; - this.options = options; - this.outputOptions = options && options.output; - /** @type {boolean} */ - this.bail = (options && options.bail) || false; - /** @type {boolean} */ - this.profile = (options && options.profile) || false; - - this.params = params; - this.mainTemplate = new MainTemplate(this.outputOptions, this); - this.chunkTemplate = new ChunkTemplate(this.outputOptions, this); - this.runtimeTemplate = new RuntimeTemplate( - this, - this.outputOptions, - this.requestShortener - ); - /** @type {{javascript: ModuleTemplate}} */ - this.moduleTemplates = { - javascript: new ModuleTemplate(this.runtimeTemplate, this) - }; - defineRemovedModuleTemplates(this.moduleTemplates); - - /** @type {Map> | undefined} */ - this.moduleMemCaches = undefined; - /** @type {Map> | undefined} */ - this.moduleMemCaches2 = undefined; - this.moduleGraph = new ModuleGraph(); - /** @type {ChunkGraph} */ - this.chunkGraph = undefined; - /** @type {CodeGenerationResults} */ - this.codeGenerationResults = undefined; - - /** @type {AsyncQueue} */ - this.processDependenciesQueue = new AsyncQueue({ - name: "processDependencies", - parallelism: options.parallelism || 100, - processor: this._processModuleDependencies.bind(this) - }); - /** @type {AsyncQueue} */ - this.addModuleQueue = new AsyncQueue({ - name: "addModule", - parent: this.processDependenciesQueue, - getKey: module => module.identifier(), - processor: this._addModule.bind(this) - }); - /** @type {AsyncQueue} */ - this.factorizeQueue = new AsyncQueue({ - name: "factorize", - parent: this.addModuleQueue, - processor: this._factorizeModule.bind(this) - }); - /** @type {AsyncQueue} */ - this.buildQueue = new AsyncQueue({ - name: "build", - parent: this.factorizeQueue, - processor: this._buildModule.bind(this) - }); - /** @type {AsyncQueue} */ - this.rebuildQueue = new AsyncQueue({ - name: "rebuild", - parallelism: options.parallelism || 100, - processor: this._rebuildModule.bind(this) - }); - - /** - * Modules in value are building during the build of Module in key. - * Means value blocking key from finishing. - * Needed to detect build cycles. - * @type {WeakMap>} - */ - this.creatingModuleDuringBuild = new WeakMap(); - - /** @type {Map} */ - this.entries = new Map(); - /** @type {EntryData} */ - this.globalEntry = { - dependencies: [], - includeDependencies: [], - options: { - name: undefined - } - }; - /** @type {Map} */ - this.entrypoints = new Map(); - /** @type {Entrypoint[]} */ - this.asyncEntrypoints = []; - /** @type {Set} */ - this.chunks = new Set(); - /** @type {ChunkGroup[]} */ - this.chunkGroups = []; - /** @type {Map} */ - this.namedChunkGroups = new Map(); - /** @type {Map} */ - this.namedChunks = new Map(); - /** @type {Set} */ - this.modules = new Set(); - if (this._backCompat) { - arrayToSetDeprecation(this.chunks, "Compilation.chunks"); - arrayToSetDeprecation(this.modules, "Compilation.modules"); - } - /** @private @type {Map} */ - this._modules = new Map(); - this.records = null; - /** @type {string[]} */ - this.additionalChunkAssets = []; - /** @type {CompilationAssets} */ - this.assets = {}; - /** @type {Map} */ - this.assetsInfo = new Map(); - /** @type {Map>>} */ - this._assetsRelatedIn = new Map(); - /** @type {WebpackError[]} */ - this.errors = []; - /** @type {WebpackError[]} */ - this.warnings = []; - /** @type {Compilation[]} */ - this.children = []; - /** @type {Map} */ - this.logging = new Map(); - /** @type {Map} */ - this.dependencyFactories = new Map(); - /** @type {DependencyTemplates} */ - this.dependencyTemplates = new DependencyTemplates( - this.outputOptions.hashFunction - ); - this.childrenCounters = {}; - /** @type {Set} */ - this.usedChunkIds = null; - /** @type {Set} */ - this.usedModuleIds = null; - /** @type {boolean} */ - this.needAdditionalPass = false; - /** @type {Set} */ - this._restoredUnsafeCacheModuleEntries = new Set(); - /** @type {Map} */ - this._restoredUnsafeCacheEntries = new Map(); - /** @type {WeakSet} */ - this.builtModules = new WeakSet(); - /** @type {WeakSet} */ - this.codeGeneratedModules = new WeakSet(); - /** @type {WeakSet} */ - this.buildTimeExecutedModules = new WeakSet(); - /** @private @type {Map} */ - this._rebuildingModules = new Map(); - /** @type {Set} */ - this.emittedAssets = new Set(); - /** @type {Set} */ - this.comparedForEmitAssets = new Set(); - /** @type {LazySet} */ - this.fileDependencies = new LazySet(); - /** @type {LazySet} */ - this.contextDependencies = new LazySet(); - /** @type {LazySet} */ - this.missingDependencies = new LazySet(); - /** @type {LazySet} */ - this.buildDependencies = new LazySet(); - // TODO webpack 6 remove - this.compilationDependencies = { - add: util.deprecate( - item => this.fileDependencies.add(item), - "Compilation.compilationDependencies is deprecated (used Compilation.fileDependencies instead)", - "DEP_WEBPACK_COMPILATION_COMPILATION_DEPENDENCIES" - ) - }; - - this._modulesCache = this.getCache("Compilation/modules"); - this._assetsCache = this.getCache("Compilation/assets"); - this._codeGenerationCache = this.getCache("Compilation/codeGeneration"); - - const unsafeCache = options.module.unsafeCache; - this._unsafeCache = !!unsafeCache; - this._unsafeCachePredicate = - typeof unsafeCache === "function" ? unsafeCache : () => true; - } - - getStats() { - return new Stats(this); - } - - /** - * @param {StatsOptions | string} optionsOrPreset stats option value - * @param {CreateStatsOptionsContext} context context - * @returns {NormalizedStatsOptions} normalized options - */ - createStatsOptions(optionsOrPreset, context = {}) { - if ( - typeof optionsOrPreset === "boolean" || - typeof optionsOrPreset === "string" - ) { - optionsOrPreset = { preset: optionsOrPreset }; - } - if (typeof optionsOrPreset === "object" && optionsOrPreset !== null) { - // We use this method of shallow cloning this object to include - // properties in the prototype chain - /** @type {Partial} */ - const options = {}; - for (const key in optionsOrPreset) { - options[key] = optionsOrPreset[key]; - } - if (options.preset !== undefined) { - this.hooks.statsPreset.for(options.preset).call(options, context); - } - this.hooks.statsNormalize.call(options, context); - return /** @type {NormalizedStatsOptions} */ (options); - } else { - /** @type {Partial} */ - const options = {}; - this.hooks.statsNormalize.call(options, context); - return /** @type {NormalizedStatsOptions} */ (options); - } - } - - createStatsFactory(options) { - const statsFactory = new StatsFactory(); - this.hooks.statsFactory.call(statsFactory, options); - return statsFactory; - } - - createStatsPrinter(options) { - const statsPrinter = new StatsPrinter(); - this.hooks.statsPrinter.call(statsPrinter, options); - return statsPrinter; - } - - /** - * @param {string} name cache name - * @returns {CacheFacade} the cache facade instance - */ - getCache(name) { - return this.compiler.getCache(name); - } - - /** - * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name - * @returns {Logger} a logger with that name - */ - getLogger(name) { - if (!name) { - throw new TypeError("Compilation.getLogger(name) called without a name"); - } - /** @type {LogEntry[] | undefined} */ - let logEntries; - return new Logger( - (type, args) => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compilation.getLogger(name) called with a function not returning a name" - ); - } - } - let trace; - switch (type) { - case LogType.warn: - case LogType.error: - case LogType.trace: - trace = ErrorHelpers.cutOffLoaderExecution(new Error("Trace").stack) - .split("\n") - .slice(3); - break; - } - /** @type {LogEntry} */ - const logEntry = { - time: Date.now(), - type, - args, - trace - }; - if (this.hooks.log.call(name, logEntry) === undefined) { - if (logEntry.type === LogType.profileEnd) { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.profileEnd === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.profileEnd(`[${name}] ${logEntry.args[0]}`); - } - } - if (logEntries === undefined) { - logEntries = this.logging.get(name); - if (logEntries === undefined) { - logEntries = []; - this.logging.set(name, logEntries); - } - } - logEntries.push(logEntry); - if (logEntry.type === LogType.profile) { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.profile === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.profile(`[${name}] ${logEntry.args[0]}`); - } - } - } - }, - childName => { - if (typeof name === "function") { - if (typeof childName === "function") { - return this.getLogger(() => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compilation.getLogger(name) called with a function not returning a name" - ); - } - } - if (typeof childName === "function") { - childName = childName(); - if (!childName) { - throw new TypeError( - "Logger.getChildLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } else { - return this.getLogger(() => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compilation.getLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } - } else { - if (typeof childName === "function") { - return this.getLogger(() => { - if (typeof childName === "function") { - childName = childName(); - if (!childName) { - throw new TypeError( - "Logger.getChildLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } else { - return this.getLogger(`${name}/${childName}`); - } - } - } - ); - } - - /** - * @param {Module} module module to be added that was created - * @param {ModuleCallback} callback returns the module in the compilation, - * it could be the passed one (if new), or an already existing in the compilation - * @returns {void} - */ - addModule(module, callback) { - this.addModuleQueue.add(module, callback); - } - - /** - * @param {Module} module module to be added that was created - * @param {ModuleCallback} callback returns the module in the compilation, - * it could be the passed one (if new), or an already existing in the compilation - * @returns {void} - */ - _addModule(module, callback) { - const identifier = module.identifier(); - const alreadyAddedModule = this._modules.get(identifier); - if (alreadyAddedModule) { - return callback(null, alreadyAddedModule); - } - - const currentProfile = this.profile - ? this.moduleGraph.getProfile(module) - : undefined; - if (currentProfile !== undefined) { - currentProfile.markRestoringStart(); - } - - this._modulesCache.get(identifier, null, (err, cacheModule) => { - if (err) return callback(new ModuleRestoreError(module, err)); - - if (currentProfile !== undefined) { - currentProfile.markRestoringEnd(); - currentProfile.markIntegrationStart(); - } - - if (cacheModule) { - cacheModule.updateCacheModule(module); - - module = cacheModule; - } - this._modules.set(identifier, module); - this.modules.add(module); - if (this._backCompat) - ModuleGraph.setModuleGraphForModule(module, this.moduleGraph); - if (currentProfile !== undefined) { - currentProfile.markIntegrationEnd(); - } - callback(null, module); - }); - } - - /** - * Fetches a module from a compilation by its identifier - * @param {Module} module the module provided - * @returns {Module} the module requested - */ - getModule(module) { - const identifier = module.identifier(); - return this._modules.get(identifier); - } - - /** - * Attempts to search for a module by its identifier - * @param {string} identifier identifier (usually path) for module - * @returns {Module|undefined} attempt to search for module and return it, else undefined - */ - findModule(identifier) { - return this._modules.get(identifier); - } - - /** - * Schedules a build of the module object - * - * @param {Module} module module to be built - * @param {ModuleCallback} callback the callback - * @returns {void} - */ - buildModule(module, callback) { - this.buildQueue.add(module, callback); - } - - /** - * Builds the module object - * - * @param {Module} module module to be built - * @param {ModuleCallback} callback the callback - * @returns {void} - */ - _buildModule(module, callback) { - const currentProfile = this.profile - ? this.moduleGraph.getProfile(module) - : undefined; - if (currentProfile !== undefined) { - currentProfile.markBuildingStart(); - } - - module.needBuild( - { - compilation: this, - fileSystemInfo: this.fileSystemInfo, - valueCacheVersions: this.valueCacheVersions - }, - (err, needBuild) => { - if (err) return callback(err); - - if (!needBuild) { - if (currentProfile !== undefined) { - currentProfile.markBuildingEnd(); - } - this.hooks.stillValidModule.call(module); - return callback(); - } - - this.hooks.buildModule.call(module); - this.builtModules.add(module); - module.build( - this.options, - this, - this.resolverFactory.get("normal", module.resolveOptions), - this.inputFileSystem, - err => { - if (currentProfile !== undefined) { - currentProfile.markBuildingEnd(); - } - if (err) { - this.hooks.failedModule.call(module, err); - return callback(err); - } - if (currentProfile !== undefined) { - currentProfile.markStoringStart(); - } - this._modulesCache.store(module.identifier(), null, module, err => { - if (currentProfile !== undefined) { - currentProfile.markStoringEnd(); - } - if (err) { - this.hooks.failedModule.call(module, err); - return callback(new ModuleStoreError(module, err)); - } - this.hooks.succeedModule.call(module); - return callback(); - }); - } - ); - } - ); - } - - /** - * @param {Module} module to be processed for deps - * @param {ModuleCallback} callback callback to be triggered - * @returns {void} - */ - processModuleDependencies(module, callback) { - this.processDependenciesQueue.add(module, callback); - } - - /** - * @param {Module} module to be processed for deps - * @returns {void} - */ - processModuleDependenciesNonRecursive(module) { - const processDependenciesBlock = block => { - if (block.dependencies) { - let i = 0; - for (const dep of block.dependencies) { - this.moduleGraph.setParents(dep, block, module, i++); - } - } - if (block.blocks) { - for (const b of block.blocks) processDependenciesBlock(b); - } - }; - - processDependenciesBlock(module); - } - - /** - * @param {Module} module to be processed for deps - * @param {ModuleCallback} callback callback to be triggered - * @returns {void} - */ - _processModuleDependencies(module, callback) { - /** @type {Array<{factory: ModuleFactory, dependencies: Dependency[], context: string|undefined, originModule: Module|null}>} */ - const sortedDependencies = []; - - /** @type {DependenciesBlock} */ - let currentBlock; - - /** @type {Map>} */ - let dependencies; - /** @type {DepConstructor} */ - let factoryCacheKey; - /** @type {ModuleFactory} */ - let factoryCacheKey2; - /** @type {Map} */ - let factoryCacheValue; - /** @type {string} */ - let listCacheKey1; - /** @type {string} */ - let listCacheKey2; - /** @type {Dependency[]} */ - let listCacheValue; - - let inProgressSorting = 1; - let inProgressTransitive = 1; - - const onDependenciesSorted = err => { - if (err) return callback(err); - - // early exit without changing parallelism back and forth - if (sortedDependencies.length === 0 && inProgressTransitive === 1) { - return callback(); - } - - // This is nested so we need to allow one additional task - this.processDependenciesQueue.increaseParallelism(); - - for (const item of sortedDependencies) { - inProgressTransitive++; - this.handleModuleCreation(item, err => { - // In V8, the Error objects keep a reference to the functions on the stack. These warnings & - // errors are created inside closures that keep a reference to the Compilation, so errors are - // leaking the Compilation object. - if (err && this.bail) { - if (inProgressTransitive <= 0) return; - inProgressTransitive = -1; - // eslint-disable-next-line no-self-assign - err.stack = err.stack; - onTransitiveTasksFinished(err); - return; - } - if (--inProgressTransitive === 0) onTransitiveTasksFinished(); - }); - } - if (--inProgressTransitive === 0) onTransitiveTasksFinished(); - }; - - const onTransitiveTasksFinished = err => { - if (err) return callback(err); - this.processDependenciesQueue.decreaseParallelism(); - - return callback(); - }; - - /** - * @param {Dependency} dep dependency - * @param {number} index index in block - * @returns {void} - */ - const processDependency = (dep, index) => { - this.moduleGraph.setParents(dep, currentBlock, module, index); - if (this._unsafeCache) { - try { - const unsafeCachedModule = unsafeCacheDependencies.get(dep); - if (unsafeCachedModule === null) return; - if (unsafeCachedModule !== undefined) { - if ( - this._restoredUnsafeCacheModuleEntries.has(unsafeCachedModule) - ) { - this._handleExistingModuleFromUnsafeCache( - module, - dep, - unsafeCachedModule - ); - return; - } - const identifier = unsafeCachedModule.identifier(); - const cachedModule = - this._restoredUnsafeCacheEntries.get(identifier); - if (cachedModule !== undefined) { - // update unsafe cache to new module - unsafeCacheDependencies.set(dep, cachedModule); - this._handleExistingModuleFromUnsafeCache( - module, - dep, - cachedModule - ); - return; - } - inProgressSorting++; - this._modulesCache.get(identifier, null, (err, cachedModule) => { - if (err) { - if (inProgressSorting <= 0) return; - inProgressSorting = -1; - onDependenciesSorted(err); - return; - } - try { - if (!this._restoredUnsafeCacheEntries.has(identifier)) { - const data = unsafeCacheData.get(cachedModule); - if (data === undefined) { - processDependencyForResolving(dep); - if (--inProgressSorting === 0) onDependenciesSorted(); - return; - } - if (cachedModule !== unsafeCachedModule) { - unsafeCacheDependencies.set(dep, cachedModule); - } - cachedModule.restoreFromUnsafeCache( - data, - this.params.normalModuleFactory, - this.params - ); - this._restoredUnsafeCacheEntries.set( - identifier, - cachedModule - ); - this._restoredUnsafeCacheModuleEntries.add(cachedModule); - if (!this.modules.has(cachedModule)) { - inProgressTransitive++; - this._handleNewModuleFromUnsafeCache( - module, - dep, - cachedModule, - err => { - if (err) { - if (inProgressTransitive <= 0) return; - inProgressTransitive = -1; - onTransitiveTasksFinished(err); - } - if (--inProgressTransitive === 0) - return onTransitiveTasksFinished(); - } - ); - if (--inProgressSorting === 0) onDependenciesSorted(); - return; - } - } - if (unsafeCachedModule !== cachedModule) { - unsafeCacheDependencies.set(dep, cachedModule); - } - this._handleExistingModuleFromUnsafeCache( - module, - dep, - cachedModule - ); // a3 - } catch (err) { - if (inProgressSorting <= 0) return; - inProgressSorting = -1; - onDependenciesSorted(err); - return; - } - if (--inProgressSorting === 0) onDependenciesSorted(); - }); - return; - } - } catch (e) { - console.error(e); - } - } - processDependencyForResolving(dep); - }; - - /** - * @param {Dependency} dep dependency - * @returns {void} - */ - const processDependencyForResolving = dep => { - const resourceIdent = dep.getResourceIdentifier(); - if (resourceIdent !== undefined && resourceIdent !== null) { - const category = dep.category; - const constructor = /** @type {DepConstructor} */ (dep.constructor); - if (factoryCacheKey === constructor) { - // Fast path 1: same constructor as prev item - if (listCacheKey1 === category && listCacheKey2 === resourceIdent) { - // Super fast path 1: also same resource - listCacheValue.push(dep); - return; - } - } else { - const factory = this.dependencyFactories.get(constructor); - if (factory === undefined) { - throw new Error( - `No module factory available for dependency type: ${constructor.name}` - ); - } - if (factoryCacheKey2 === factory) { - // Fast path 2: same factory as prev item - factoryCacheKey = constructor; - if (listCacheKey1 === category && listCacheKey2 === resourceIdent) { - // Super fast path 2: also same resource - listCacheValue.push(dep); - return; - } - } else { - // Slow path - if (factoryCacheKey2 !== undefined) { - // Archive last cache entry - if (dependencies === undefined) dependencies = new Map(); - dependencies.set(factoryCacheKey2, factoryCacheValue); - factoryCacheValue = dependencies.get(factory); - if (factoryCacheValue === undefined) { - factoryCacheValue = new Map(); - } - } else { - factoryCacheValue = new Map(); - } - factoryCacheKey = constructor; - factoryCacheKey2 = factory; - } - } - // Here webpack is using heuristic that assumes - // mostly esm dependencies would be used - // so we don't allocate extra string for them - const cacheKey = - category === esmDependencyCategory - ? resourceIdent - : `${category}${resourceIdent}`; - let list = factoryCacheValue.get(cacheKey); - if (list === undefined) { - factoryCacheValue.set(cacheKey, (list = [])); - sortedDependencies.push({ - factory: factoryCacheKey2, - dependencies: list, - context: dep.getContext(), - originModule: module - }); - } - list.push(dep); - listCacheKey1 = category; - listCacheKey2 = resourceIdent; - listCacheValue = list; - } - }; - - try { - /** @type {DependenciesBlock[]} */ - const queue = [module]; - do { - const block = queue.pop(); - if (block.dependencies) { - currentBlock = block; - let i = 0; - for (const dep of block.dependencies) processDependency(dep, i++); - } - if (block.blocks) { - for (const b of block.blocks) queue.push(b); - } - } while (queue.length !== 0); - } catch (e) { - return callback(e); - } - - if (--inProgressSorting === 0) onDependenciesSorted(); - } - - _handleNewModuleFromUnsafeCache(originModule, dependency, module, callback) { - const moduleGraph = this.moduleGraph; - - moduleGraph.setResolvedModule(originModule, dependency, module); - - moduleGraph.setIssuerIfUnset( - module, - originModule !== undefined ? originModule : null - ); - - this._modules.set(module.identifier(), module); - this.modules.add(module); - if (this._backCompat) - ModuleGraph.setModuleGraphForModule(module, this.moduleGraph); - - this._handleModuleBuildAndDependencies( - originModule, - module, - true, - callback - ); - } - - _handleExistingModuleFromUnsafeCache(originModule, dependency, module) { - const moduleGraph = this.moduleGraph; - - moduleGraph.setResolvedModule(originModule, dependency, module); - } - - /** - * @typedef {Object} HandleModuleCreationOptions - * @property {ModuleFactory} factory - * @property {Dependency[]} dependencies - * @property {Module | null} originModule - * @property {Partial=} contextInfo - * @property {string=} context - * @property {boolean=} recursive recurse into dependencies of the created module - * @property {boolean=} connectOrigin connect the resolved module with the origin module - */ - - /** - * @param {HandleModuleCreationOptions} options options object - * @param {ModuleCallback} callback callback - * @returns {void} - */ - handleModuleCreation( - { - factory, - dependencies, - originModule, - contextInfo, - context, - recursive = true, - connectOrigin = recursive - }, - callback - ) { - const moduleGraph = this.moduleGraph; - - const currentProfile = this.profile ? new ModuleProfile() : undefined; - - this.factorizeModule( - { - currentProfile, - factory, - dependencies, - factoryResult: true, - originModule, - contextInfo, - context - }, - (err, factoryResult) => { - const applyFactoryResultDependencies = () => { - const { fileDependencies, contextDependencies, missingDependencies } = - factoryResult; - if (fileDependencies) { - this.fileDependencies.addAll(fileDependencies); - } - if (contextDependencies) { - this.contextDependencies.addAll(contextDependencies); - } - if (missingDependencies) { - this.missingDependencies.addAll(missingDependencies); - } - }; - if (err) { - if (factoryResult) applyFactoryResultDependencies(); - if (dependencies.every(d => d.optional)) { - this.warnings.push(err); - return callback(); - } else { - this.errors.push(err); - return callback(err); - } - } - - const newModule = factoryResult.module; - - if (!newModule) { - applyFactoryResultDependencies(); - return callback(); - } - - if (currentProfile !== undefined) { - moduleGraph.setProfile(newModule, currentProfile); - } - - this.addModule(newModule, (err, module) => { - if (err) { - applyFactoryResultDependencies(); - if (!err.module) { - err.module = module; - } - this.errors.push(err); - - return callback(err); - } - - if ( - this._unsafeCache && - factoryResult.cacheable !== false && - /** @type {any} */ (module).restoreFromUnsafeCache && - this._unsafeCachePredicate(module) - ) { - const unsafeCacheableModule = - /** @type {Module & { restoreFromUnsafeCache: Function }} */ ( - module - ); - for (let i = 0; i < dependencies.length; i++) { - const dependency = dependencies[i]; - moduleGraph.setResolvedModule( - connectOrigin ? originModule : null, - dependency, - unsafeCacheableModule - ); - unsafeCacheDependencies.set(dependency, unsafeCacheableModule); - } - if (!unsafeCacheData.has(unsafeCacheableModule)) { - unsafeCacheData.set( - unsafeCacheableModule, - unsafeCacheableModule.getUnsafeCacheData() - ); - } - } else { - applyFactoryResultDependencies(); - for (let i = 0; i < dependencies.length; i++) { - const dependency = dependencies[i]; - moduleGraph.setResolvedModule( - connectOrigin ? originModule : null, - dependency, - module - ); - } - } - - moduleGraph.setIssuerIfUnset( - module, - originModule !== undefined ? originModule : null - ); - if (module !== newModule) { - if (currentProfile !== undefined) { - const otherProfile = moduleGraph.getProfile(module); - if (otherProfile !== undefined) { - currentProfile.mergeInto(otherProfile); - } else { - moduleGraph.setProfile(module, currentProfile); - } - } - } - - this._handleModuleBuildAndDependencies( - originModule, - module, - recursive, - callback - ); - }); - } - ); - } - - _handleModuleBuildAndDependencies(originModule, module, recursive, callback) { - // Check for cycles when build is trigger inside another build - let creatingModuleDuringBuildSet = undefined; - if (!recursive && this.buildQueue.isProcessing(originModule)) { - // Track build dependency - creatingModuleDuringBuildSet = - this.creatingModuleDuringBuild.get(originModule); - if (creatingModuleDuringBuildSet === undefined) { - creatingModuleDuringBuildSet = new Set(); - this.creatingModuleDuringBuild.set( - originModule, - creatingModuleDuringBuildSet - ); - } - creatingModuleDuringBuildSet.add(module); - - // When building is blocked by another module - // search for a cycle, cancel the cycle by throwing - // an error (otherwise this would deadlock) - const blockReasons = this.creatingModuleDuringBuild.get(module); - if (blockReasons !== undefined) { - const set = new Set(blockReasons); - for (const item of set) { - const blockReasons = this.creatingModuleDuringBuild.get(item); - if (blockReasons !== undefined) { - for (const m of blockReasons) { - if (m === module) { - return callback(new BuildCycleError(module)); - } - set.add(m); - } - } - } - } - } - - this.buildModule(module, err => { - if (creatingModuleDuringBuildSet !== undefined) { - creatingModuleDuringBuildSet.delete(module); - } - if (err) { - if (!err.module) { - err.module = module; - } - this.errors.push(err); - - return callback(err); - } - - if (!recursive) { - this.processModuleDependenciesNonRecursive(module); - callback(null, module); - return; - } - - // This avoids deadlocks for circular dependencies - if (this.processDependenciesQueue.isProcessing(module)) { - return callback(); - } - - this.processModuleDependencies(module, err => { - if (err) { - return callback(err); - } - callback(null, module); - }); - }); - } - - /** - * @param {FactorizeModuleOptions} options options object - * @param {ModuleOrFactoryResultCallback} callback callback - * @returns {void} - */ - _factorizeModule( - { - currentProfile, - factory, - dependencies, - originModule, - factoryResult, - contextInfo, - context - }, - callback - ) { - if (currentProfile !== undefined) { - currentProfile.markFactoryStart(); - } - factory.create( - { - contextInfo: { - issuer: originModule ? originModule.nameForCondition() : "", - issuerLayer: originModule ? originModule.layer : null, - compiler: this.compiler.name, - ...contextInfo - }, - resolveOptions: originModule ? originModule.resolveOptions : undefined, - context: context - ? context - : originModule - ? originModule.context - : this.compiler.context, - dependencies: dependencies - }, - (err, result) => { - if (result) { - // TODO webpack 6: remove - // For backward-compat - if (result.module === undefined && result instanceof Module) { - result = { - module: result - }; - } - if (!factoryResult) { - const { - fileDependencies, - contextDependencies, - missingDependencies - } = result; - if (fileDependencies) { - this.fileDependencies.addAll(fileDependencies); - } - if (contextDependencies) { - this.contextDependencies.addAll(contextDependencies); - } - if (missingDependencies) { - this.missingDependencies.addAll(missingDependencies); - } - } - } - if (err) { - const notFoundError = new ModuleNotFoundError( - originModule, - err, - dependencies.map(d => d.loc).filter(Boolean)[0] - ); - return callback(notFoundError, factoryResult ? result : undefined); - } - if (!result) { - return callback(); - } - - if (currentProfile !== undefined) { - currentProfile.markFactoryEnd(); - } - - callback(null, factoryResult ? result : result.module); - } - ); - } - - /** - * @param {string} context context string path - * @param {Dependency} dependency dependency used to create Module chain - * @param {ModuleCallback} callback callback for when module chain is complete - * @returns {void} will throw if dependency instance is not a valid Dependency - */ - addModuleChain(context, dependency, callback) { - return this.addModuleTree({ context, dependency }, callback); - } - - /** - * @param {Object} options options - * @param {string} options.context context string path - * @param {Dependency} options.dependency dependency used to create Module chain - * @param {Partial=} options.contextInfo additional context info for the root module - * @param {ModuleCallback} callback callback for when module chain is complete - * @returns {void} will throw if dependency instance is not a valid Dependency - */ - addModuleTree({ context, dependency, contextInfo }, callback) { - if ( - typeof dependency !== "object" || - dependency === null || - !dependency.constructor - ) { - return callback( - new WebpackError("Parameter 'dependency' must be a Dependency") - ); - } - const Dep = /** @type {DepConstructor} */ (dependency.constructor); - const moduleFactory = this.dependencyFactories.get(Dep); - if (!moduleFactory) { - return callback( - new WebpackError( - `No dependency factory available for this dependency type: ${dependency.constructor.name}` - ) - ); - } - - this.handleModuleCreation( - { - factory: moduleFactory, - dependencies: [dependency], - originModule: null, - contextInfo, - context - }, - (err, result) => { - if (err && this.bail) { - callback(err); - this.buildQueue.stop(); - this.rebuildQueue.stop(); - this.processDependenciesQueue.stop(); - this.factorizeQueue.stop(); - } else if (!err && result) { - callback(null, result); - } else { - callback(); - } - } - ); - } - - /** - * @param {string} context context path for entry - * @param {Dependency} entry entry dependency that should be followed - * @param {string | EntryOptions} optionsOrName options or deprecated name of entry - * @param {ModuleCallback} callback callback function - * @returns {void} returns - */ - addEntry(context, entry, optionsOrName, callback) { - // TODO webpack 6 remove - const options = - typeof optionsOrName === "object" - ? optionsOrName - : { name: optionsOrName }; - - this._addEntryItem(context, entry, "dependencies", options, callback); - } - - /** - * @param {string} context context path for entry - * @param {Dependency} dependency dependency that should be followed - * @param {EntryOptions} options options - * @param {ModuleCallback} callback callback function - * @returns {void} returns - */ - addInclude(context, dependency, options, callback) { - this._addEntryItem( - context, - dependency, - "includeDependencies", - options, - callback - ); - } - - /** - * @param {string} context context path for entry - * @param {Dependency} entry entry dependency that should be followed - * @param {"dependencies" | "includeDependencies"} target type of entry - * @param {EntryOptions} options options - * @param {ModuleCallback} callback callback function - * @returns {void} returns - */ - _addEntryItem(context, entry, target, options, callback) { - const { name } = options; - let entryData = - name !== undefined ? this.entries.get(name) : this.globalEntry; - if (entryData === undefined) { - entryData = { - dependencies: [], - includeDependencies: [], - options: { - name: undefined, - ...options - } - }; - entryData[target].push(entry); - this.entries.set(name, entryData); - } else { - entryData[target].push(entry); - for (const key of Object.keys(options)) { - if (options[key] === undefined) continue; - if (entryData.options[key] === options[key]) continue; - if ( - Array.isArray(entryData.options[key]) && - Array.isArray(options[key]) && - arrayEquals(entryData.options[key], options[key]) - ) { - continue; - } - if (entryData.options[key] === undefined) { - entryData.options[key] = options[key]; - } else { - return callback( - new WebpackError( - `Conflicting entry option ${key} = ${entryData.options[key]} vs ${options[key]}` - ) - ); - } - } - } - - this.hooks.addEntry.call(entry, options); - - this.addModuleTree( - { - context, - dependency: entry, - contextInfo: entryData.options.layer - ? { issuerLayer: entryData.options.layer } - : undefined - }, - (err, module) => { - if (err) { - this.hooks.failedEntry.call(entry, options, err); - return callback(err); - } - this.hooks.succeedEntry.call(entry, options, module); - return callback(null, module); - } - ); - } - - /** - * @param {Module} module module to be rebuilt - * @param {ModuleCallback} callback callback when module finishes rebuilding - * @returns {void} - */ - rebuildModule(module, callback) { - this.rebuildQueue.add(module, callback); - } - - /** - * @param {Module} module module to be rebuilt - * @param {ModuleCallback} callback callback when module finishes rebuilding - * @returns {void} - */ - _rebuildModule(module, callback) { - this.hooks.rebuildModule.call(module); - const oldDependencies = module.dependencies.slice(); - const oldBlocks = module.blocks.slice(); - module.invalidateBuild(); - this.buildQueue.invalidate(module); - this.buildModule(module, err => { - if (err) { - return this.hooks.finishRebuildingModule.callAsync(module, err2 => { - if (err2) { - callback( - makeWebpackError(err2, "Compilation.hooks.finishRebuildingModule") - ); - return; - } - callback(err); - }); - } - - this.processDependenciesQueue.invalidate(module); - this.moduleGraph.unfreeze(); - this.processModuleDependencies(module, err => { - if (err) return callback(err); - this.removeReasonsOfDependencyBlock(module, { - dependencies: oldDependencies, - blocks: oldBlocks - }); - this.hooks.finishRebuildingModule.callAsync(module, err2 => { - if (err2) { - callback( - makeWebpackError(err2, "Compilation.hooks.finishRebuildingModule") - ); - return; - } - callback(null, module); - }); - }); - }); - } - - _computeAffectedModules(modules) { - const moduleMemCacheCache = this.compiler.moduleMemCaches; - if (!moduleMemCacheCache) return; - if (!this.moduleMemCaches) { - this.moduleMemCaches = new Map(); - this.moduleGraph.setModuleMemCaches(this.moduleMemCaches); - } - const { moduleGraph, moduleMemCaches } = this; - const affectedModules = new Set(); - const infectedModules = new Set(); - let statNew = 0; - let statChanged = 0; - let statUnchanged = 0; - let statReferencesChanged = 0; - let statWithoutBuild = 0; - - const computeReferences = module => { - /** @type {WeakMap} */ - let references = undefined; - for (const connection of moduleGraph.getOutgoingConnections(module)) { - const d = connection.dependency; - const m = connection.module; - if (!d || !m || unsafeCacheDependencies.has(d)) continue; - if (references === undefined) references = new WeakMap(); - references.set(d, m); - } - return references; - }; - - /** - * @param {Module} module the module - * @param {WeakMap} references references - * @returns {boolean} true, when the references differ - */ - const compareReferences = (module, references) => { - if (references === undefined) return true; - for (const connection of moduleGraph.getOutgoingConnections(module)) { - const d = connection.dependency; - if (!d) continue; - const entry = references.get(d); - if (entry === undefined) continue; - if (entry !== connection.module) return false; - } - return true; - }; - - const modulesWithoutCache = new Set(modules); - for (const [module, cachedMemCache] of moduleMemCacheCache) { - if (modulesWithoutCache.has(module)) { - const buildInfo = module.buildInfo; - if (buildInfo) { - if (cachedMemCache.buildInfo !== buildInfo) { - // use a new one - const memCache = new WeakTupleMap(); - moduleMemCaches.set(module, memCache); - affectedModules.add(module); - cachedMemCache.buildInfo = buildInfo; - cachedMemCache.references = computeReferences(module); - cachedMemCache.memCache = memCache; - statChanged++; - } else if (!compareReferences(module, cachedMemCache.references)) { - // use a new one - const memCache = new WeakTupleMap(); - moduleMemCaches.set(module, memCache); - affectedModules.add(module); - cachedMemCache.references = computeReferences(module); - cachedMemCache.memCache = memCache; - statReferencesChanged++; - } else { - // keep the old mem cache - moduleMemCaches.set(module, cachedMemCache.memCache); - statUnchanged++; - } - } else { - infectedModules.add(module); - moduleMemCacheCache.delete(module); - statWithoutBuild++; - } - modulesWithoutCache.delete(module); - } else { - moduleMemCacheCache.delete(module); - } - } - - for (const module of modulesWithoutCache) { - const buildInfo = module.buildInfo; - if (buildInfo) { - // create a new entry - const memCache = new WeakTupleMap(); - moduleMemCacheCache.set(module, { - buildInfo, - references: computeReferences(module), - memCache - }); - moduleMemCaches.set(module, memCache); - affectedModules.add(module); - statNew++; - } else { - infectedModules.add(module); - statWithoutBuild++; - } - } - - const reduceAffectType = connections => { - let affected = false; - for (const { dependency } of connections) { - if (!dependency) continue; - const type = dependency.couldAffectReferencingModule(); - if (type === Dependency.TRANSITIVE) return Dependency.TRANSITIVE; - if (type === false) continue; - affected = true; - } - return affected; - }; - const directOnlyInfectedModules = new Set(); - for (const module of infectedModules) { - for (const [ - referencingModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { - if (!referencingModule) continue; - if (infectedModules.has(referencingModule)) continue; - const type = reduceAffectType(connections); - if (!type) continue; - if (type === true) { - directOnlyInfectedModules.add(referencingModule); - } else { - infectedModules.add(referencingModule); - } - } - } - for (const module of directOnlyInfectedModules) infectedModules.add(module); - const directOnlyAffectModules = new Set(); - for (const module of affectedModules) { - for (const [ - referencingModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { - if (!referencingModule) continue; - if (infectedModules.has(referencingModule)) continue; - if (affectedModules.has(referencingModule)) continue; - const type = reduceAffectType(connections); - if (!type) continue; - if (type === true) { - directOnlyAffectModules.add(referencingModule); - } else { - affectedModules.add(referencingModule); - } - const memCache = new WeakTupleMap(); - const cache = moduleMemCacheCache.get(referencingModule); - cache.memCache = memCache; - moduleMemCaches.set(referencingModule, memCache); - } - } - for (const module of directOnlyAffectModules) affectedModules.add(module); - this.logger.log( - `${Math.round( - (100 * (affectedModules.size + infectedModules.size)) / - this.modules.size - )}% (${affectedModules.size} affected + ${ - infectedModules.size - } infected of ${ - this.modules.size - }) modules flagged as affected (${statNew} new modules, ${statChanged} changed, ${statReferencesChanged} references changed, ${statUnchanged} unchanged, ${statWithoutBuild} were not built)` - ); - } - - _computeAffectedModulesWithChunkGraph() { - const { moduleMemCaches } = this; - if (!moduleMemCaches) return; - const moduleMemCaches2 = (this.moduleMemCaches2 = new Map()); - const { moduleGraph, chunkGraph } = this; - const key = "memCache2"; - let statUnchanged = 0; - let statChanged = 0; - let statNew = 0; - /** - * @param {Module} module module - * @returns {{ id: string | number, modules?: Map, blocks?: (string | number)[] }} references - */ - const computeReferences = module => { - const id = chunkGraph.getModuleId(module); - /** @type {Map} */ - let modules = undefined; - /** @type {(string | number)[] | undefined} */ - let blocks = undefined; - const outgoing = moduleGraph.getOutgoingConnectionsByModule(module); - if (outgoing !== undefined) { - for (const m of outgoing.keys()) { - if (!m) continue; - if (modules === undefined) modules = new Map(); - modules.set(m, chunkGraph.getModuleId(m)); - } - } - if (module.blocks.length > 0) { - blocks = []; - const queue = Array.from(module.blocks); - for (const block of queue) { - const chunkGroup = chunkGraph.getBlockChunkGroup(block); - if (chunkGroup) { - for (const chunk of chunkGroup.chunks) { - blocks.push(chunk.id); - } - } else { - blocks.push(null); - } - queue.push.apply(queue, block.blocks); - } - } - return { id, modules, blocks }; - }; - /** - * @param {Module} module module - * @param {Object} references references - * @param {string | number} references.id id - * @param {Map=} references.modules modules - * @param {(string | number)[]=} references.blocks blocks - * @returns {boolean} ok? - */ - const compareReferences = (module, { id, modules, blocks }) => { - if (id !== chunkGraph.getModuleId(module)) return false; - if (modules !== undefined) { - for (const [module, id] of modules) { - if (chunkGraph.getModuleId(module) !== id) return false; - } - } - if (blocks !== undefined) { - const queue = Array.from(module.blocks); - let i = 0; - for (const block of queue) { - const chunkGroup = chunkGraph.getBlockChunkGroup(block); - if (chunkGroup) { - for (const chunk of chunkGroup.chunks) { - if (i >= blocks.length || blocks[i++] !== chunk.id) return false; - } - } else { - if (i >= blocks.length || blocks[i++] !== null) return false; - } - queue.push.apply(queue, block.blocks); - } - if (i !== blocks.length) return false; - } - return true; - }; - - for (const [module, memCache] of moduleMemCaches) { - /** @type {{ references: { id: string | number, modules?: Map, blocks?: (string | number)[]}, memCache: WeakTupleMap }} */ - const cache = memCache.get(key); - if (cache === undefined) { - const memCache2 = new WeakTupleMap(); - memCache.set(key, { - references: computeReferences(module), - memCache: memCache2 - }); - moduleMemCaches2.set(module, memCache2); - statNew++; - } else if (!compareReferences(module, cache.references)) { - const memCache = new WeakTupleMap(); - cache.references = computeReferences(module); - cache.memCache = memCache; - moduleMemCaches2.set(module, memCache); - statChanged++; - } else { - moduleMemCaches2.set(module, cache.memCache); - statUnchanged++; - } - } - - this.logger.log( - `${Math.round( - (100 * statChanged) / (statNew + statChanged + statUnchanged) - )}% modules flagged as affected by chunk graph (${statNew} new modules, ${statChanged} changed, ${statUnchanged} unchanged)` - ); - } - - finish(callback) { - this.factorizeQueue.clear(); - if (this.profile) { - this.logger.time("finish module profiles"); - const ParallelismFactorCalculator = __webpack_require__(15924); - const p = new ParallelismFactorCalculator(); - const moduleGraph = this.moduleGraph; - const modulesWithProfiles = new Map(); - for (const module of this.modules) { - const profile = moduleGraph.getProfile(module); - if (!profile) continue; - modulesWithProfiles.set(module, profile); - p.range( - profile.buildingStartTime, - profile.buildingEndTime, - f => (profile.buildingParallelismFactor = f) - ); - p.range( - profile.factoryStartTime, - profile.factoryEndTime, - f => (profile.factoryParallelismFactor = f) - ); - p.range( - profile.integrationStartTime, - profile.integrationEndTime, - f => (profile.integrationParallelismFactor = f) - ); - p.range( - profile.storingStartTime, - profile.storingEndTime, - f => (profile.storingParallelismFactor = f) - ); - p.range( - profile.restoringStartTime, - profile.restoringEndTime, - f => (profile.restoringParallelismFactor = f) - ); - if (profile.additionalFactoryTimes) { - for (const { start, end } of profile.additionalFactoryTimes) { - const influence = (end - start) / profile.additionalFactories; - p.range( - start, - end, - f => - (profile.additionalFactoriesParallelismFactor += f * influence) - ); - } - } - } - p.calculate(); - - const logger = this.getLogger("webpack.Compilation.ModuleProfile"); - const logByValue = (value, msg) => { - if (value > 1000) { - logger.error(msg); - } else if (value > 500) { - logger.warn(msg); - } else if (value > 200) { - logger.info(msg); - } else if (value > 30) { - logger.log(msg); - } else { - logger.debug(msg); - } - }; - const logNormalSummary = (category, getDuration, getParallelism) => { - let sum = 0; - let max = 0; - for (const [module, profile] of modulesWithProfiles) { - const p = getParallelism(profile); - const d = getDuration(profile); - if (d === 0 || p === 0) continue; - const t = d / p; - sum += t; - if (t <= 10) continue; - logByValue( - t, - ` | ${Math.round(t)} ms${ - p >= 1.1 ? ` (parallelism ${Math.round(p * 10) / 10})` : "" - } ${category} > ${module.readableIdentifier(this.requestShortener)}` - ); - max = Math.max(max, t); - } - if (sum <= 10) return; - logByValue( - Math.max(sum / 10, max), - `${Math.round(sum)} ms ${category}` - ); - }; - const logByLoadersSummary = (category, getDuration, getParallelism) => { - const map = new Map(); - for (const [module, profile] of modulesWithProfiles) { - const list = provide( - map, - module.type + "!" + module.identifier().replace(/(!|^)[^!]*$/, ""), - () => [] - ); - list.push({ module, profile }); - } - - let sum = 0; - let max = 0; - for (const [key, modules] of map) { - let innerSum = 0; - let innerMax = 0; - for (const { module, profile } of modules) { - const p = getParallelism(profile); - const d = getDuration(profile); - if (d === 0 || p === 0) continue; - const t = d / p; - innerSum += t; - if (t <= 10) continue; - logByValue( - t, - ` | | ${Math.round(t)} ms${ - p >= 1.1 ? ` (parallelism ${Math.round(p * 10) / 10})` : "" - } ${category} > ${module.readableIdentifier( - this.requestShortener - )}` - ); - innerMax = Math.max(innerMax, t); - } - sum += innerSum; - if (innerSum <= 10) continue; - const idx = key.indexOf("!"); - const loaders = key.slice(idx + 1); - const moduleType = key.slice(0, idx); - const t = Math.max(innerSum / 10, innerMax); - logByValue( - t, - ` | ${Math.round(innerSum)} ms ${category} > ${ - loaders - ? `${ - modules.length - } x ${moduleType} with ${this.requestShortener.shorten( - loaders - )}` - : `${modules.length} x ${moduleType}` - }` - ); - max = Math.max(max, t); - } - if (sum <= 10) return; - logByValue( - Math.max(sum / 10, max), - `${Math.round(sum)} ms ${category}` - ); - }; - logNormalSummary( - "resolve to new modules", - p => p.factory, - p => p.factoryParallelismFactor - ); - logNormalSummary( - "resolve to existing modules", - p => p.additionalFactories, - p => p.additionalFactoriesParallelismFactor - ); - logNormalSummary( - "integrate modules", - p => p.restoring, - p => p.restoringParallelismFactor - ); - logByLoadersSummary( - "build modules", - p => p.building, - p => p.buildingParallelismFactor - ); - logNormalSummary( - "store modules", - p => p.storing, - p => p.storingParallelismFactor - ); - logNormalSummary( - "restore modules", - p => p.restoring, - p => p.restoringParallelismFactor - ); - this.logger.timeEnd("finish module profiles"); - } - this.logger.time("compute affected modules"); - this._computeAffectedModules(this.modules); - this.logger.timeEnd("compute affected modules"); - this.logger.time("finish modules"); - const { modules, moduleMemCaches } = this; - this.hooks.finishModules.callAsync(modules, err => { - this.logger.timeEnd("finish modules"); - if (err) return callback(err); - - // extract warnings and errors from modules - this.moduleGraph.freeze("dependency errors"); - // TODO keep a cacheToken (= {}) for each module in the graph - // create a new one per compilation and flag all updated files - // and parents with it - this.logger.time("report dependency errors and warnings"); - for (const module of modules) { - // TODO only run for modules with changed cacheToken - // global WeakMap> to keep modules without errors/warnings - const memCache = moduleMemCaches && moduleMemCaches.get(module); - if (memCache && memCache.get("noWarningsOrErrors")) continue; - let hasProblems = this.reportDependencyErrorsAndWarnings(module, [ - module - ]); - const errors = module.getErrors(); - if (errors !== undefined) { - for (const error of errors) { - if (!error.module) { - error.module = module; - } - this.errors.push(error); - hasProblems = true; - } - } - const warnings = module.getWarnings(); - if (warnings !== undefined) { - for (const warning of warnings) { - if (!warning.module) { - warning.module = module; - } - this.warnings.push(warning); - hasProblems = true; - } - } - if (!hasProblems && memCache) memCache.set("noWarningsOrErrors", true); - } - this.moduleGraph.unfreeze(); - this.logger.timeEnd("report dependency errors and warnings"); - - callback(); - }); - } - - unseal() { - this.hooks.unseal.call(); - this.chunks.clear(); - this.chunkGroups.length = 0; - this.namedChunks.clear(); - this.namedChunkGroups.clear(); - this.entrypoints.clear(); - this.additionalChunkAssets.length = 0; - this.assets = {}; - this.assetsInfo.clear(); - this.moduleGraph.removeAllModuleAttributes(); - this.moduleGraph.unfreeze(); - this.moduleMemCaches2 = undefined; - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - seal(callback) { - const finalCallback = err => { - this.factorizeQueue.clear(); - this.buildQueue.clear(); - this.rebuildQueue.clear(); - this.processDependenciesQueue.clear(); - this.addModuleQueue.clear(); - return callback(err); - }; - const chunkGraph = new ChunkGraph( - this.moduleGraph, - this.outputOptions.hashFunction - ); - this.chunkGraph = chunkGraph; - - if (this._backCompat) { - for (const module of this.modules) { - ChunkGraph.setChunkGraphForModule(module, chunkGraph); - } - } - - this.hooks.seal.call(); - - this.logger.time("optimize dependencies"); - while (this.hooks.optimizeDependencies.call(this.modules)) { - /* empty */ - } - this.hooks.afterOptimizeDependencies.call(this.modules); - this.logger.timeEnd("optimize dependencies"); - - this.logger.time("create chunks"); - this.hooks.beforeChunks.call(); - this.moduleGraph.freeze("seal"); - /** @type {Map} */ - const chunkGraphInit = new Map(); - for (const [name, { dependencies, includeDependencies, options }] of this - .entries) { - const chunk = this.addChunk(name); - if (options.filename) { - chunk.filenameTemplate = options.filename; - } - const entrypoint = new Entrypoint(options); - if (!options.dependOn && !options.runtime) { - entrypoint.setRuntimeChunk(chunk); - } - entrypoint.setEntrypointChunk(chunk); - this.namedChunkGroups.set(name, entrypoint); - this.entrypoints.set(name, entrypoint); - this.chunkGroups.push(entrypoint); - connectChunkGroupAndChunk(entrypoint, chunk); - - const entryModules = new Set(); - for (const dep of [...this.globalEntry.dependencies, ...dependencies]) { - entrypoint.addOrigin(null, { name }, /** @type {any} */ (dep).request); - - const module = this.moduleGraph.getModule(dep); - if (module) { - chunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint); - entryModules.add(module); - const modulesList = chunkGraphInit.get(entrypoint); - if (modulesList === undefined) { - chunkGraphInit.set(entrypoint, [module]); - } else { - modulesList.push(module); - } - } - } - - this.assignDepths(entryModules); - - const mapAndSort = deps => - deps - .map(dep => this.moduleGraph.getModule(dep)) - .filter(Boolean) - .sort(compareModulesByIdentifier); - const includedModules = [ - ...mapAndSort(this.globalEntry.includeDependencies), - ...mapAndSort(includeDependencies) - ]; - - let modulesList = chunkGraphInit.get(entrypoint); - if (modulesList === undefined) { - chunkGraphInit.set(entrypoint, (modulesList = [])); - } - for (const module of includedModules) { - this.assignDepth(module); - modulesList.push(module); - } - } - const runtimeChunks = new Set(); - outer: for (const [ - name, - { - options: { dependOn, runtime } - } - ] of this.entries) { - if (dependOn && runtime) { - const err = - new WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid. -Entrypoints that depend on other entrypoints do not have their own runtime. -They will use the runtime(s) from referenced entrypoints instead. -Remove the 'runtime' option from the entrypoint.`); - const entry = this.entrypoints.get(name); - err.chunk = entry.getEntrypointChunk(); - this.errors.push(err); - } - if (dependOn) { - const entry = this.entrypoints.get(name); - const referencedChunks = entry - .getEntrypointChunk() - .getAllReferencedChunks(); - const dependOnEntries = []; - for (const dep of dependOn) { - const dependency = this.entrypoints.get(dep); - if (!dependency) { - throw new Error( - `Entry ${name} depends on ${dep}, but this entry was not found` - ); - } - if (referencedChunks.has(dependency.getEntrypointChunk())) { - const err = new WebpackError( - `Entrypoints '${name}' and '${dep}' use 'dependOn' to depend on each other in a circular way.` - ); - const entryChunk = entry.getEntrypointChunk(); - err.chunk = entryChunk; - this.errors.push(err); - entry.setRuntimeChunk(entryChunk); - continue outer; - } - dependOnEntries.push(dependency); - } - for (const dependency of dependOnEntries) { - connectChunkGroupParentAndChild(dependency, entry); - } - } else if (runtime) { - const entry = this.entrypoints.get(name); - let chunk = this.namedChunks.get(runtime); - if (chunk) { - if (!runtimeChunks.has(chunk)) { - const err = - new WebpackError(`Entrypoint '${name}' has a 'runtime' option which points to another entrypoint named '${runtime}'. -It's not valid to use other entrypoints as runtime chunk. -Did you mean to use 'dependOn: ${JSON.stringify( - runtime - )}' instead to allow using entrypoint '${name}' within the runtime of entrypoint '${runtime}'? For this '${runtime}' must always be loaded when '${name}' is used. -Or do you want to use the entrypoints '${name}' and '${runtime}' independently on the same page with a shared runtime? In this case give them both the same value for the 'runtime' option. It must be a name not already used by an entrypoint.`); - const entryChunk = entry.getEntrypointChunk(); - err.chunk = entryChunk; - this.errors.push(err); - entry.setRuntimeChunk(entryChunk); - continue; - } - } else { - chunk = this.addChunk(runtime); - chunk.preventIntegration = true; - runtimeChunks.add(chunk); - } - entry.unshiftChunk(chunk); - chunk.addGroup(entry); - entry.setRuntimeChunk(chunk); - } - } - buildChunkGraph(this, chunkGraphInit); - this.hooks.afterChunks.call(this.chunks); - this.logger.timeEnd("create chunks"); - - this.logger.time("optimize"); - this.hooks.optimize.call(); - - while (this.hooks.optimizeModules.call(this.modules)) { - /* empty */ - } - this.hooks.afterOptimizeModules.call(this.modules); - - while (this.hooks.optimizeChunks.call(this.chunks, this.chunkGroups)) { - /* empty */ - } - this.hooks.afterOptimizeChunks.call(this.chunks, this.chunkGroups); - - this.hooks.optimizeTree.callAsync(this.chunks, this.modules, err => { - if (err) { - return finalCallback( - makeWebpackError(err, "Compilation.hooks.optimizeTree") - ); - } - - this.hooks.afterOptimizeTree.call(this.chunks, this.modules); - - this.hooks.optimizeChunkModules.callAsync( - this.chunks, - this.modules, - err => { - if (err) { - return finalCallback( - makeWebpackError(err, "Compilation.hooks.optimizeChunkModules") - ); - } - - this.hooks.afterOptimizeChunkModules.call(this.chunks, this.modules); - - const shouldRecord = this.hooks.shouldRecord.call() !== false; - - this.hooks.reviveModules.call(this.modules, this.records); - this.hooks.beforeModuleIds.call(this.modules); - this.hooks.moduleIds.call(this.modules); - this.hooks.optimizeModuleIds.call(this.modules); - this.hooks.afterOptimizeModuleIds.call(this.modules); - - this.hooks.reviveChunks.call(this.chunks, this.records); - this.hooks.beforeChunkIds.call(this.chunks); - this.hooks.chunkIds.call(this.chunks); - this.hooks.optimizeChunkIds.call(this.chunks); - this.hooks.afterOptimizeChunkIds.call(this.chunks); - - this.assignRuntimeIds(); - - this.logger.time("compute affected modules with chunk graph"); - this._computeAffectedModulesWithChunkGraph(); - this.logger.timeEnd("compute affected modules with chunk graph"); - - this.sortItemsWithChunkIds(); - - if (shouldRecord) { - this.hooks.recordModules.call(this.modules, this.records); - this.hooks.recordChunks.call(this.chunks, this.records); - } - - this.hooks.optimizeCodeGeneration.call(this.modules); - this.logger.timeEnd("optimize"); - - this.logger.time("module hashing"); - this.hooks.beforeModuleHash.call(); - this.createModuleHashes(); - this.hooks.afterModuleHash.call(); - this.logger.timeEnd("module hashing"); - - this.logger.time("code generation"); - this.hooks.beforeCodeGeneration.call(); - this.codeGeneration(err => { - if (err) { - return finalCallback(err); - } - this.hooks.afterCodeGeneration.call(); - this.logger.timeEnd("code generation"); - - this.logger.time("runtime requirements"); - this.hooks.beforeRuntimeRequirements.call(); - this.processRuntimeRequirements(); - this.hooks.afterRuntimeRequirements.call(); - this.logger.timeEnd("runtime requirements"); - - this.logger.time("hashing"); - this.hooks.beforeHash.call(); - const codeGenerationJobs = this.createHash(); - this.hooks.afterHash.call(); - this.logger.timeEnd("hashing"); - - this._runCodeGenerationJobs(codeGenerationJobs, err => { - if (err) { - return finalCallback(err); - } - - if (shouldRecord) { - this.logger.time("record hash"); - this.hooks.recordHash.call(this.records); - this.logger.timeEnd("record hash"); - } - - this.logger.time("module assets"); - this.clearAssets(); - - this.hooks.beforeModuleAssets.call(); - this.createModuleAssets(); - this.logger.timeEnd("module assets"); - - const cont = () => { - this.logger.time("process assets"); - this.hooks.processAssets.callAsync(this.assets, err => { - if (err) { - return finalCallback( - makeWebpackError(err, "Compilation.hooks.processAssets") - ); - } - this.hooks.afterProcessAssets.call(this.assets); - this.logger.timeEnd("process assets"); - this.assets = this._backCompat - ? soonFrozenObjectDeprecation( - this.assets, - "Compilation.assets", - "DEP_WEBPACK_COMPILATION_ASSETS", - `BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation. - Do changes to assets earlier, e. g. in Compilation.hooks.processAssets. - Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.` - ) - : Object.freeze(this.assets); - - this.summarizeDependencies(); - if (shouldRecord) { - this.hooks.record.call(this, this.records); - } - - if (this.hooks.needAdditionalSeal.call()) { - this.unseal(); - return this.seal(callback); - } - return this.hooks.afterSeal.callAsync(err => { - if (err) { - return finalCallback( - makeWebpackError(err, "Compilation.hooks.afterSeal") - ); - } - this.fileSystemInfo.logStatistics(); - finalCallback(); - }); - }); - }; - - this.logger.time("create chunk assets"); - if (this.hooks.shouldGenerateChunkAssets.call() !== false) { - this.hooks.beforeChunkAssets.call(); - this.createChunkAssets(err => { - this.logger.timeEnd("create chunk assets"); - if (err) { - return finalCallback(err); - } - cont(); - }); - } else { - this.logger.timeEnd("create chunk assets"); - cont(); - } - }); - }); - } - ); - }); - } - - /** - * @param {Module} module module to report from - * @param {DependenciesBlock[]} blocks blocks to report from - * @returns {boolean} true, when it has warnings or errors - */ - reportDependencyErrorsAndWarnings(module, blocks) { - let hasProblems = false; - for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { - const block = blocks[indexBlock]; - const dependencies = block.dependencies; - - for (let indexDep = 0; indexDep < dependencies.length; indexDep++) { - const d = dependencies[indexDep]; - - const warnings = d.getWarnings(this.moduleGraph); - if (warnings) { - for (let indexWar = 0; indexWar < warnings.length; indexWar++) { - const w = warnings[indexWar]; - - const warning = new ModuleDependencyWarning(module, w, d.loc); - this.warnings.push(warning); - hasProblems = true; - } - } - const errors = d.getErrors(this.moduleGraph); - if (errors) { - for (let indexErr = 0; indexErr < errors.length; indexErr++) { - const e = errors[indexErr]; - - const error = new ModuleDependencyError(module, e, d.loc); - this.errors.push(error); - hasProblems = true; - } - } - } - - if (this.reportDependencyErrorsAndWarnings(module, block.blocks)) - hasProblems = true; - } - return hasProblems; - } - - codeGeneration(callback) { - const { chunkGraph } = this; - this.codeGenerationResults = new CodeGenerationResults( - this.outputOptions.hashFunction - ); - /** @type {{module: Module, hash: string, runtime: RuntimeSpec, runtimes: RuntimeSpec[]}[]} */ - const jobs = []; - for (const module of this.modules) { - const runtimes = chunkGraph.getModuleRuntimes(module); - if (runtimes.size === 1) { - for (const runtime of runtimes) { - const hash = chunkGraph.getModuleHash(module, runtime); - jobs.push({ module, hash, runtime, runtimes: [runtime] }); - } - } else if (runtimes.size > 1) { - /** @type {Map} */ - const map = new Map(); - for (const runtime of runtimes) { - const hash = chunkGraph.getModuleHash(module, runtime); - const job = map.get(hash); - if (job === undefined) { - const newJob = { module, hash, runtime, runtimes: [runtime] }; - jobs.push(newJob); - map.set(hash, newJob); - } else { - job.runtimes.push(runtime); - } - } - } - } - - this._runCodeGenerationJobs(jobs, callback); - } - - _runCodeGenerationJobs(jobs, callback) { - let statModulesFromCache = 0; - let statModulesGenerated = 0; - const { chunkGraph, moduleGraph, dependencyTemplates, runtimeTemplate } = - this; - const results = this.codeGenerationResults; - const errors = []; - /** @type {Set | undefined} */ - let notCodeGeneratedModules = undefined; - const runIteration = () => { - let delayedJobs = []; - let delayedModules = new Set(); - asyncLib.eachLimit( - jobs, - this.options.parallelism, - (job, callback) => { - const { module } = job; - const { codeGenerationDependencies } = module; - if (codeGenerationDependencies !== undefined) { - if ( - notCodeGeneratedModules === undefined || - codeGenerationDependencies.some(dep => { - const referencedModule = moduleGraph.getModule(dep); - return notCodeGeneratedModules.has(referencedModule); - }) - ) { - delayedJobs.push(job); - delayedModules.add(module); - return callback(); - } - } - const { hash, runtime, runtimes } = job; - this._codeGenerationModule( - module, - runtime, - runtimes, - hash, - dependencyTemplates, - chunkGraph, - moduleGraph, - runtimeTemplate, - errors, - results, - (err, codeGenerated) => { - if (codeGenerated) statModulesGenerated++; - else statModulesFromCache++; - callback(err); - } - ); - }, - err => { - if (err) return callback(err); - if (delayedJobs.length > 0) { - if (delayedJobs.length === jobs.length) { - return callback( - new Error( - `Unable to make progress during code generation because of circular code generation dependency: ${Array.from( - delayedModules, - m => m.identifier() - ).join(", ")}` - ) - ); - } - jobs = delayedJobs; - delayedJobs = []; - notCodeGeneratedModules = delayedModules; - delayedModules = new Set(); - return runIteration(); - } - if (errors.length > 0) { - errors.sort( - compareSelect(err => err.module, compareModulesByIdentifier) - ); - for (const error of errors) { - this.errors.push(error); - } - } - this.logger.log( - `${Math.round( - (100 * statModulesGenerated) / - (statModulesGenerated + statModulesFromCache) - )}% code generated (${statModulesGenerated} generated, ${statModulesFromCache} from cache)` - ); - callback(); - } - ); - }; - runIteration(); - } - - /** - * @param {Module} module module - * @param {RuntimeSpec} runtime runtime - * @param {RuntimeSpec[]} runtimes runtimes - * @param {string} hash hash - * @param {DependencyTemplates} dependencyTemplates dependencyTemplates - * @param {ChunkGraph} chunkGraph chunkGraph - * @param {ModuleGraph} moduleGraph moduleGraph - * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate - * @param {WebpackError[]} errors errors - * @param {CodeGenerationResults} results results - * @param {function(WebpackError=, boolean=): void} callback callback - */ - _codeGenerationModule( - module, - runtime, - runtimes, - hash, - dependencyTemplates, - chunkGraph, - moduleGraph, - runtimeTemplate, - errors, - results, - callback - ) { - let codeGenerated = false; - const cache = new MultiItemCache( - runtimes.map(runtime => - this._codeGenerationCache.getItemCache( - `${module.identifier()}|${getRuntimeKey(runtime)}`, - `${hash}|${dependencyTemplates.getHash()}` - ) - ) - ); - cache.get((err, cachedResult) => { - if (err) return callback(err); - let result; - if (!cachedResult) { - try { - codeGenerated = true; - this.codeGeneratedModules.add(module); - result = module.codeGeneration({ - chunkGraph, - moduleGraph, - dependencyTemplates, - runtimeTemplate, - runtime, - codeGenerationResults: results, - compilation: this - }); - } catch (err) { - errors.push(new CodeGenerationError(module, err)); - result = cachedResult = { - sources: new Map(), - runtimeRequirements: null - }; - } - } else { - result = cachedResult; - } - for (const runtime of runtimes) { - results.add(module, runtime, result); - } - if (!cachedResult) { - cache.store(result, err => callback(err, codeGenerated)); - } else { - callback(null, codeGenerated); - } - }); - } - - _getChunkGraphEntries() { - /** @type {Set} */ - const treeEntries = new Set(); - for (const ep of this.entrypoints.values()) { - const chunk = ep.getRuntimeChunk(); - if (chunk) treeEntries.add(chunk); - } - for (const ep of this.asyncEntrypoints) { - const chunk = ep.getRuntimeChunk(); - if (chunk) treeEntries.add(chunk); - } - return treeEntries; - } - - /** - * @param {Object} options options - * @param {ChunkGraph=} options.chunkGraph the chunk graph - * @param {Iterable=} options.modules modules - * @param {Iterable=} options.chunks chunks - * @param {CodeGenerationResults=} options.codeGenerationResults codeGenerationResults - * @param {Iterable=} options.chunkGraphEntries chunkGraphEntries - * @returns {void} - */ - processRuntimeRequirements({ - chunkGraph = this.chunkGraph, - modules = this.modules, - chunks = this.chunks, - codeGenerationResults = this.codeGenerationResults, - chunkGraphEntries = this._getChunkGraphEntries() - } = {}) { - const context = { chunkGraph, codeGenerationResults }; - const { moduleMemCaches2 } = this; - this.logger.time("runtime requirements.modules"); - const additionalModuleRuntimeRequirements = - this.hooks.additionalModuleRuntimeRequirements; - const runtimeRequirementInModule = this.hooks.runtimeRequirementInModule; - for (const module of modules) { - if (chunkGraph.getNumberOfModuleChunks(module) > 0) { - const memCache = moduleMemCaches2 && moduleMemCaches2.get(module); - for (const runtime of chunkGraph.getModuleRuntimes(module)) { - if (memCache) { - const cached = memCache.get( - `moduleRuntimeRequirements-${getRuntimeKey(runtime)}` - ); - if (cached !== undefined) { - if (cached !== null) { - chunkGraph.addModuleRuntimeRequirements( - module, - runtime, - cached, - false - ); - } - continue; - } - } - let set; - const runtimeRequirements = - codeGenerationResults.getRuntimeRequirements(module, runtime); - if (runtimeRequirements && runtimeRequirements.size > 0) { - set = new Set(runtimeRequirements); - } else if (additionalModuleRuntimeRequirements.isUsed()) { - set = new Set(); - } else { - if (memCache) { - memCache.set( - `moduleRuntimeRequirements-${getRuntimeKey(runtime)}`, - null - ); - } - continue; - } - additionalModuleRuntimeRequirements.call(module, set, context); - - for (const r of set) { - const hook = runtimeRequirementInModule.get(r); - if (hook !== undefined) hook.call(module, set, context); - } - if (set.size === 0) { - if (memCache) { - memCache.set( - `moduleRuntimeRequirements-${getRuntimeKey(runtime)}`, - null - ); - } - } else { - if (memCache) { - memCache.set( - `moduleRuntimeRequirements-${getRuntimeKey(runtime)}`, - set - ); - chunkGraph.addModuleRuntimeRequirements( - module, - runtime, - set, - false - ); - } else { - chunkGraph.addModuleRuntimeRequirements(module, runtime, set); - } - } - } - } - } - this.logger.timeEnd("runtime requirements.modules"); - - this.logger.time("runtime requirements.chunks"); - for (const chunk of chunks) { - const set = new Set(); - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements( - module, - chunk.runtime - ); - for (const r of runtimeRequirements) set.add(r); - } - this.hooks.additionalChunkRuntimeRequirements.call(chunk, set, context); - - for (const r of set) { - this.hooks.runtimeRequirementInChunk.for(r).call(chunk, set, context); - } - - chunkGraph.addChunkRuntimeRequirements(chunk, set); - } - this.logger.timeEnd("runtime requirements.chunks"); - - this.logger.time("runtime requirements.entries"); - for (const treeEntry of chunkGraphEntries) { - const set = new Set(); - for (const chunk of treeEntry.getAllReferencedChunks()) { - const runtimeRequirements = - chunkGraph.getChunkRuntimeRequirements(chunk); - for (const r of runtimeRequirements) set.add(r); - } - - this.hooks.additionalTreeRuntimeRequirements.call( - treeEntry, - set, - context - ); - - for (const r of set) { - this.hooks.runtimeRequirementInTree - .for(r) - .call(treeEntry, set, context); - } - - chunkGraph.addTreeRuntimeRequirements(treeEntry, set); - } - this.logger.timeEnd("runtime requirements.entries"); - } - - // TODO webpack 6 make chunkGraph argument non-optional - /** - * @param {Chunk} chunk target chunk - * @param {RuntimeModule} module runtime module - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - addRuntimeModule(chunk, module, chunkGraph = this.chunkGraph) { - // Deprecated ModuleGraph association - if (this._backCompat) - ModuleGraph.setModuleGraphForModule(module, this.moduleGraph); - - // add it to the list - this.modules.add(module); - this._modules.set(module.identifier(), module); - - // connect to the chunk graph - chunkGraph.connectChunkAndModule(chunk, module); - chunkGraph.connectChunkAndRuntimeModule(chunk, module); - if (module.fullHash) { - chunkGraph.addFullHashModuleToChunk(chunk, module); - } else if (module.dependentHash) { - chunkGraph.addDependentHashModuleToChunk(chunk, module); - } - - // attach runtime module - module.attach(this, chunk, chunkGraph); - - // Setup internals - const exportsInfo = this.moduleGraph.getExportsInfo(module); - exportsInfo.setHasProvideInfo(); - if (typeof chunk.runtime === "string") { - exportsInfo.setUsedForSideEffectsOnly(chunk.runtime); - } else if (chunk.runtime === undefined) { - exportsInfo.setUsedForSideEffectsOnly(undefined); - } else { - for (const runtime of chunk.runtime) { - exportsInfo.setUsedForSideEffectsOnly(runtime); - } - } - chunkGraph.addModuleRuntimeRequirements( - module, - chunk.runtime, - new Set([RuntimeGlobals.requireScope]) - ); - - // runtime modules don't need ids - chunkGraph.setModuleId(module, ""); - - // Call hook - this.hooks.runtimeModule.call(module, chunk); - } - - /** - * If `module` is passed, `loc` and `request` must also be passed. - * @param {string | ChunkGroupOptions} groupOptions options for the chunk group - * @param {Module=} module the module the references the chunk group - * @param {DependencyLocation=} loc the location from with the chunk group is referenced (inside of module) - * @param {string=} request the request from which the the chunk group is referenced - * @returns {ChunkGroup} the new or existing chunk group - */ - addChunkInGroup(groupOptions, module, loc, request) { - if (typeof groupOptions === "string") { - groupOptions = { name: groupOptions }; - } - const name = groupOptions.name; - - if (name) { - const chunkGroup = this.namedChunkGroups.get(name); - if (chunkGroup !== undefined) { - chunkGroup.addOptions(groupOptions); - if (module) { - chunkGroup.addOrigin(module, loc, request); - } - return chunkGroup; - } - } - const chunkGroup = new ChunkGroup(groupOptions); - if (module) chunkGroup.addOrigin(module, loc, request); - const chunk = this.addChunk(name); - - connectChunkGroupAndChunk(chunkGroup, chunk); - - this.chunkGroups.push(chunkGroup); - if (name) { - this.namedChunkGroups.set(name, chunkGroup); - } - return chunkGroup; - } - - /** - * @param {EntryOptions} options options for the entrypoint - * @param {Module} module the module the references the chunk group - * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module) - * @param {string} request the request from which the the chunk group is referenced - * @returns {Entrypoint} the new or existing entrypoint - */ - addAsyncEntrypoint(options, module, loc, request) { - const name = options.name; - if (name) { - const entrypoint = this.namedChunkGroups.get(name); - if (entrypoint instanceof Entrypoint) { - if (entrypoint !== undefined) { - if (module) { - entrypoint.addOrigin(module, loc, request); - } - return entrypoint; - } - } else if (entrypoint) { - throw new Error( - `Cannot add an async entrypoint with the name '${name}', because there is already an chunk group with this name` - ); - } - } - const chunk = this.addChunk(name); - if (options.filename) { - chunk.filenameTemplate = options.filename; - } - const entrypoint = new Entrypoint(options, false); - entrypoint.setRuntimeChunk(chunk); - entrypoint.setEntrypointChunk(chunk); - if (name) { - this.namedChunkGroups.set(name, entrypoint); - } - this.chunkGroups.push(entrypoint); - this.asyncEntrypoints.push(entrypoint); - connectChunkGroupAndChunk(entrypoint, chunk); - if (module) { - entrypoint.addOrigin(module, loc, request); - } - return entrypoint; - } - - /** - * This method first looks to see if a name is provided for a new chunk, - * and first looks to see if any named chunks already exist and reuse that chunk instead. - * - * @param {string=} name optional chunk name to be provided - * @returns {Chunk} create a chunk (invoked during seal event) - */ - addChunk(name) { - if (name) { - const chunk = this.namedChunks.get(name); - if (chunk !== undefined) { - return chunk; - } - } - const chunk = new Chunk(name, this._backCompat); - this.chunks.add(chunk); - if (this._backCompat) - ChunkGraph.setChunkGraphForChunk(chunk, this.chunkGraph); - if (name) { - this.namedChunks.set(name, chunk); - } - return chunk; - } - - /** - * @deprecated - * @param {Module} module module to assign depth - * @returns {void} - */ - assignDepth(module) { - const moduleGraph = this.moduleGraph; - - const queue = new Set([module]); - let depth; - - moduleGraph.setDepth(module, 0); - - /** - * @param {Module} module module for processing - * @returns {void} - */ - const processModule = module => { - if (!moduleGraph.setDepthIfLower(module, depth)) return; - queue.add(module); - }; - - for (module of queue) { - queue.delete(module); - depth = moduleGraph.getDepth(module) + 1; - - for (const connection of moduleGraph.getOutgoingConnections(module)) { - const refModule = connection.module; - if (refModule) { - processModule(refModule); - } - } - } - } - - /** - * @param {Set} modules module to assign depth - * @returns {void} - */ - assignDepths(modules) { - const moduleGraph = this.moduleGraph; - - /** @type {Set} */ - const queue = new Set(modules); - queue.add(1); - let depth = 0; - - let i = 0; - for (const module of queue) { - i++; - if (typeof module === "number") { - depth = module; - if (queue.size === i) return; - queue.add(depth + 1); - } else { - moduleGraph.setDepth(module, depth); - for (const { module: refModule } of moduleGraph.getOutgoingConnections( - module - )) { - if (refModule) { - queue.add(refModule); - } - } - } - } - } - - /** - * @param {Dependency} dependency the dependency - * @param {RuntimeSpec} runtime the runtime - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getDependencyReferencedExports(dependency, runtime) { - const referencedExports = dependency.getReferencedExports( - this.moduleGraph, - runtime - ); - return this.hooks.dependencyReferencedExports.call( - referencedExports, - dependency, - runtime - ); - } - - /** - * - * @param {Module} module module relationship for removal - * @param {DependenciesBlockLike} block //TODO: good description - * @returns {void} - */ - removeReasonsOfDependencyBlock(module, block) { - if (block.blocks) { - for (const b of block.blocks) { - this.removeReasonsOfDependencyBlock(module, b); - } - } - - if (block.dependencies) { - for (const dep of block.dependencies) { - const originalModule = this.moduleGraph.getModule(dep); - if (originalModule) { - this.moduleGraph.removeConnection(dep); - - if (this.chunkGraph) { - for (const chunk of this.chunkGraph.getModuleChunks( - originalModule - )) { - this.patchChunksAfterReasonRemoval(originalModule, chunk); - } - } - } - } - } - } - - /** - * @param {Module} module module to patch tie - * @param {Chunk} chunk chunk to patch tie - * @returns {void} - */ - patchChunksAfterReasonRemoval(module, chunk) { - if (!module.hasReasons(this.moduleGraph, chunk.runtime)) { - this.removeReasonsOfDependencyBlock(module, module); - } - if (!module.hasReasonForChunk(chunk, this.moduleGraph, this.chunkGraph)) { - if (this.chunkGraph.isModuleInChunk(module, chunk)) { - this.chunkGraph.disconnectChunkAndModule(chunk, module); - this.removeChunkFromDependencies(module, chunk); - } - } - } - - /** - * - * @param {DependenciesBlock} block block tie for Chunk - * @param {Chunk} chunk chunk to remove from dep - * @returns {void} - */ - removeChunkFromDependencies(block, chunk) { - /** - * @param {Dependency} d dependency to (maybe) patch up - */ - const iteratorDependency = d => { - const depModule = this.moduleGraph.getModule(d); - if (!depModule) { - return; - } - this.patchChunksAfterReasonRemoval(depModule, chunk); - }; - - const blocks = block.blocks; - for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { - const asyncBlock = blocks[indexBlock]; - const chunkGroup = this.chunkGraph.getBlockChunkGroup(asyncBlock); - // Grab all chunks from the first Block's AsyncDepBlock - const chunks = chunkGroup.chunks; - // For each chunk in chunkGroup - for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { - const iteratedChunk = chunks[indexChunk]; - chunkGroup.removeChunk(iteratedChunk); - // Recurse - this.removeChunkFromDependencies(block, iteratedChunk); - } - } - - if (block.dependencies) { - for (const dep of block.dependencies) iteratorDependency(dep); - } - } - - assignRuntimeIds() { - const { chunkGraph } = this; - const processEntrypoint = ep => { - const runtime = ep.options.runtime || ep.name; - const chunk = ep.getRuntimeChunk(); - chunkGraph.setRuntimeId(runtime, chunk.id); - }; - for (const ep of this.entrypoints.values()) { - processEntrypoint(ep); - } - for (const ep of this.asyncEntrypoints) { - processEntrypoint(ep); - } - } - - sortItemsWithChunkIds() { - for (const chunkGroup of this.chunkGroups) { - chunkGroup.sortItems(); - } - - this.errors.sort(compareErrors); - this.warnings.sort(compareErrors); - this.children.sort(byNameOrHash); - } - - summarizeDependencies() { - for ( - let indexChildren = 0; - indexChildren < this.children.length; - indexChildren++ - ) { - const child = this.children[indexChildren]; - - this.fileDependencies.addAll(child.fileDependencies); - this.contextDependencies.addAll(child.contextDependencies); - this.missingDependencies.addAll(child.missingDependencies); - this.buildDependencies.addAll(child.buildDependencies); - } - - for (const module of this.modules) { - module.addCacheDependencies( - this.fileDependencies, - this.contextDependencies, - this.missingDependencies, - this.buildDependencies - ); - } - } - - createModuleHashes() { - let statModulesHashed = 0; - let statModulesFromCache = 0; - const { chunkGraph, runtimeTemplate, moduleMemCaches2 } = this; - const { hashFunction, hashDigest, hashDigestLength } = this.outputOptions; - const errors = []; - for (const module of this.modules) { - const memCache = moduleMemCaches2 && moduleMemCaches2.get(module); - for (const runtime of chunkGraph.getModuleRuntimes(module)) { - if (memCache) { - const digest = memCache.get(`moduleHash-${getRuntimeKey(runtime)}`); - if (digest !== undefined) { - chunkGraph.setModuleHashes( - module, - runtime, - digest, - digest.slice(0, hashDigestLength) - ); - statModulesFromCache++; - continue; - } - } - statModulesHashed++; - const digest = this._createModuleHash( - module, - chunkGraph, - runtime, - hashFunction, - runtimeTemplate, - hashDigest, - hashDigestLength, - errors - ); - if (memCache) { - memCache.set(`moduleHash-${getRuntimeKey(runtime)}`, digest); - } - } - } - if (errors.length > 0) { - errors.sort(compareSelect(err => err.module, compareModulesByIdentifier)); - for (const error of errors) { - this.errors.push(error); - } - } - this.logger.log( - `${statModulesHashed} modules hashed, ${statModulesFromCache} from cache (${ - Math.round( - (100 * (statModulesHashed + statModulesFromCache)) / this.modules.size - ) / 100 - } variants per module in average)` - ); - } - - _createModuleHash( - module, - chunkGraph, - runtime, - hashFunction, - runtimeTemplate, - hashDigest, - hashDigestLength, - errors - ) { - let moduleHashDigest; - try { - const moduleHash = createHash(hashFunction); - module.updateHash(moduleHash, { - chunkGraph, - runtime, - runtimeTemplate - }); - moduleHashDigest = /** @type {string} */ (moduleHash.digest(hashDigest)); - } catch (err) { - errors.push(new ModuleHashingError(module, err)); - moduleHashDigest = "XXXXXX"; - } - chunkGraph.setModuleHashes( - module, - runtime, - moduleHashDigest, - moduleHashDigest.slice(0, hashDigestLength) - ); - return moduleHashDigest; - } - - createHash() { - this.logger.time("hashing: initialize hash"); - const chunkGraph = this.chunkGraph; - const runtimeTemplate = this.runtimeTemplate; - const outputOptions = this.outputOptions; - const hashFunction = outputOptions.hashFunction; - const hashDigest = outputOptions.hashDigest; - const hashDigestLength = outputOptions.hashDigestLength; - const hash = createHash(hashFunction); - if (outputOptions.hashSalt) { - hash.update(outputOptions.hashSalt); - } - this.logger.timeEnd("hashing: initialize hash"); - if (this.children.length > 0) { - this.logger.time("hashing: hash child compilations"); - for (const child of this.children) { - hash.update(child.hash); - } - this.logger.timeEnd("hashing: hash child compilations"); - } - if (this.warnings.length > 0) { - this.logger.time("hashing: hash warnings"); - for (const warning of this.warnings) { - hash.update(`${warning.message}`); - } - this.logger.timeEnd("hashing: hash warnings"); - } - if (this.errors.length > 0) { - this.logger.time("hashing: hash errors"); - for (const error of this.errors) { - hash.update(`${error.message}`); - } - this.logger.timeEnd("hashing: hash errors"); - } - - this.logger.time("hashing: sort chunks"); - /* - * all non-runtime chunks need to be hashes first, - * since runtime chunk might use their hashes. - * runtime chunks need to be hashed in the correct order - * since they may depend on each other (for async entrypoints). - * So we put all non-runtime chunks first and hash them in any order. - * And order runtime chunks according to referenced between each other. - * Chunks need to be in deterministic order since we add hashes to full chunk - * during these hashing. - */ - /** @type {Chunk[]} */ - const unorderedRuntimeChunks = []; - /** @type {Chunk[]} */ - const otherChunks = []; - for (const c of this.chunks) { - if (c.hasRuntime()) { - unorderedRuntimeChunks.push(c); - } else { - otherChunks.push(c); - } - } - unorderedRuntimeChunks.sort(byId); - otherChunks.sort(byId); - - /** @typedef {{ chunk: Chunk, referencedBy: RuntimeChunkInfo[], remaining: number }} RuntimeChunkInfo */ - /** @type {Map} */ - const runtimeChunksMap = new Map(); - for (const chunk of unorderedRuntimeChunks) { - runtimeChunksMap.set(chunk, { - chunk, - referencedBy: [], - remaining: 0 - }); - } - let remaining = 0; - for (const info of runtimeChunksMap.values()) { - for (const other of new Set( - Array.from(info.chunk.getAllReferencedAsyncEntrypoints()).map( - e => e.chunks[e.chunks.length - 1] - ) - )) { - const otherInfo = runtimeChunksMap.get(other); - otherInfo.referencedBy.push(info); - info.remaining++; - remaining++; - } - } - /** @type {Chunk[]} */ - const runtimeChunks = []; - for (const info of runtimeChunksMap.values()) { - if (info.remaining === 0) { - runtimeChunks.push(info.chunk); - } - } - // If there are any references between chunks - // make sure to follow these chains - if (remaining > 0) { - const readyChunks = []; - for (const chunk of runtimeChunks) { - const hasFullHashModules = - chunkGraph.getNumberOfChunkFullHashModules(chunk) !== 0; - const info = runtimeChunksMap.get(chunk); - for (const otherInfo of info.referencedBy) { - if (hasFullHashModules) { - chunkGraph.upgradeDependentToFullHashModules(otherInfo.chunk); - } - remaining--; - if (--otherInfo.remaining === 0) { - readyChunks.push(otherInfo.chunk); - } - } - if (readyChunks.length > 0) { - // This ensures deterministic ordering, since referencedBy is non-deterministic - readyChunks.sort(byId); - for (const c of readyChunks) runtimeChunks.push(c); - readyChunks.length = 0; - } - } - } - // If there are still remaining references we have cycles and want to create a warning - if (remaining > 0) { - let circularRuntimeChunkInfo = []; - for (const info of runtimeChunksMap.values()) { - if (info.remaining !== 0) { - circularRuntimeChunkInfo.push(info); - } - } - circularRuntimeChunkInfo.sort(compareSelect(i => i.chunk, byId)); - const err = - new WebpackError(`Circular dependency between chunks with runtime (${Array.from( - circularRuntimeChunkInfo, - c => c.chunk.name || c.chunk.id - ).join(", ")}) -This prevents using hashes of each other and should be avoided.`); - err.chunk = circularRuntimeChunkInfo[0].chunk; - this.warnings.push(err); - for (const i of circularRuntimeChunkInfo) runtimeChunks.push(i.chunk); - } - this.logger.timeEnd("hashing: sort chunks"); - - const fullHashChunks = new Set(); - /** @type {{module: Module, hash: string, runtime: RuntimeSpec, runtimes: RuntimeSpec[]}[]} */ - const codeGenerationJobs = []; - /** @type {Map>} */ - const codeGenerationJobsMap = new Map(); - const errors = []; - - const processChunk = chunk => { - // Last minute module hash generation for modules that depend on chunk hashes - this.logger.time("hashing: hash runtime modules"); - const runtime = chunk.runtime; - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (!chunkGraph.hasModuleHashes(module, runtime)) { - const hash = this._createModuleHash( - module, - chunkGraph, - runtime, - hashFunction, - runtimeTemplate, - hashDigest, - hashDigestLength, - errors - ); - let hashMap = codeGenerationJobsMap.get(hash); - if (hashMap) { - const moduleJob = hashMap.get(module); - if (moduleJob) { - moduleJob.runtimes.push(runtime); - continue; - } - } else { - hashMap = new Map(); - codeGenerationJobsMap.set(hash, hashMap); - } - const job = { - module, - hash, - runtime, - runtimes: [runtime] - }; - hashMap.set(module, job); - codeGenerationJobs.push(job); - } - } - this.logger.timeAggregate("hashing: hash runtime modules"); - try { - this.logger.time("hashing: hash chunks"); - const chunkHash = createHash(hashFunction); - if (outputOptions.hashSalt) { - chunkHash.update(outputOptions.hashSalt); - } - chunk.updateHash(chunkHash, chunkGraph); - this.hooks.chunkHash.call(chunk, chunkHash, { - chunkGraph, - codeGenerationResults: this.codeGenerationResults, - moduleGraph: this.moduleGraph, - runtimeTemplate: this.runtimeTemplate - }); - const chunkHashDigest = /** @type {string} */ ( - chunkHash.digest(hashDigest) - ); - hash.update(chunkHashDigest); - chunk.hash = chunkHashDigest; - chunk.renderedHash = chunk.hash.slice(0, hashDigestLength); - const fullHashModules = - chunkGraph.getChunkFullHashModulesIterable(chunk); - if (fullHashModules) { - fullHashChunks.add(chunk); - } else { - this.hooks.contentHash.call(chunk); - } - } catch (err) { - this.errors.push(new ChunkRenderError(chunk, "", err)); - } - this.logger.timeAggregate("hashing: hash chunks"); - }; - otherChunks.forEach(processChunk); - for (const chunk of runtimeChunks) processChunk(chunk); - if (errors.length > 0) { - errors.sort(compareSelect(err => err.module, compareModulesByIdentifier)); - for (const error of errors) { - this.errors.push(error); - } - } - - this.logger.timeAggregateEnd("hashing: hash runtime modules"); - this.logger.timeAggregateEnd("hashing: hash chunks"); - this.logger.time("hashing: hash digest"); - this.hooks.fullHash.call(hash); - this.fullHash = /** @type {string} */ (hash.digest(hashDigest)); - this.hash = this.fullHash.slice(0, hashDigestLength); - this.logger.timeEnd("hashing: hash digest"); - - this.logger.time("hashing: process full hash modules"); - for (const chunk of fullHashChunks) { - for (const module of chunkGraph.getChunkFullHashModulesIterable(chunk)) { - const moduleHash = createHash(hashFunction); - module.updateHash(moduleHash, { - chunkGraph, - runtime: chunk.runtime, - runtimeTemplate - }); - const moduleHashDigest = /** @type {string} */ ( - moduleHash.digest(hashDigest) - ); - const oldHash = chunkGraph.getModuleHash(module, chunk.runtime); - chunkGraph.setModuleHashes( - module, - chunk.runtime, - moduleHashDigest, - moduleHashDigest.slice(0, hashDigestLength) - ); - codeGenerationJobsMap.get(oldHash).get(module).hash = moduleHashDigest; - } - const chunkHash = createHash(hashFunction); - chunkHash.update(chunk.hash); - chunkHash.update(this.hash); - const chunkHashDigest = /** @type {string} */ ( - chunkHash.digest(hashDigest) - ); - chunk.hash = chunkHashDigest; - chunk.renderedHash = chunk.hash.slice(0, hashDigestLength); - this.hooks.contentHash.call(chunk); - } - this.logger.timeEnd("hashing: process full hash modules"); - return codeGenerationJobs; - } - - /** - * @param {string} file file name - * @param {Source} source asset source - * @param {AssetInfo} assetInfo extra asset information - * @returns {void} - */ - emitAsset(file, source, assetInfo = {}) { - if (this.assets[file]) { - if (!isSourceEqual(this.assets[file], source)) { - this.errors.push( - new WebpackError( - `Conflict: Multiple assets emit different content to the same filename ${file}${ - assetInfo.sourceFilename - ? `. Original source ${assetInfo.sourceFilename}` - : "" - }` - ) - ); - this.assets[file] = source; - this._setAssetInfo(file, assetInfo); - return; - } - const oldInfo = this.assetsInfo.get(file); - const newInfo = Object.assign({}, oldInfo, assetInfo); - this._setAssetInfo(file, newInfo, oldInfo); - return; - } - this.assets[file] = source; - this._setAssetInfo(file, assetInfo, undefined); - } - - _setAssetInfo(file, newInfo, oldInfo = this.assetsInfo.get(file)) { - if (newInfo === undefined) { - this.assetsInfo.delete(file); - } else { - this.assetsInfo.set(file, newInfo); - } - const oldRelated = oldInfo && oldInfo.related; - const newRelated = newInfo && newInfo.related; - if (oldRelated) { - for (const key of Object.keys(oldRelated)) { - const remove = name => { - const relatedIn = this._assetsRelatedIn.get(name); - if (relatedIn === undefined) return; - const entry = relatedIn.get(key); - if (entry === undefined) return; - entry.delete(file); - if (entry.size !== 0) return; - relatedIn.delete(key); - if (relatedIn.size === 0) this._assetsRelatedIn.delete(name); - }; - const entry = oldRelated[key]; - if (Array.isArray(entry)) { - entry.forEach(remove); - } else if (entry) { - remove(entry); - } - } - } - if (newRelated) { - for (const key of Object.keys(newRelated)) { - const add = name => { - let relatedIn = this._assetsRelatedIn.get(name); - if (relatedIn === undefined) { - this._assetsRelatedIn.set(name, (relatedIn = new Map())); - } - let entry = relatedIn.get(key); - if (entry === undefined) { - relatedIn.set(key, (entry = new Set())); - } - entry.add(file); - }; - const entry = newRelated[key]; - if (Array.isArray(entry)) { - entry.forEach(add); - } else if (entry) { - add(entry); - } - } - } - } - - /** - * @param {string} file file name - * @param {Source | function(Source): Source} newSourceOrFunction new asset source or function converting old to new - * @param {AssetInfo | function(AssetInfo | undefined): AssetInfo} assetInfoUpdateOrFunction new asset info or function converting old to new - */ - updateAsset( - file, - newSourceOrFunction, - assetInfoUpdateOrFunction = undefined - ) { - if (!this.assets[file]) { - throw new Error( - `Called Compilation.updateAsset for not existing filename ${file}` - ); - } - if (typeof newSourceOrFunction === "function") { - this.assets[file] = newSourceOrFunction(this.assets[file]); - } else { - this.assets[file] = newSourceOrFunction; - } - if (assetInfoUpdateOrFunction !== undefined) { - const oldInfo = this.assetsInfo.get(file) || EMPTY_ASSET_INFO; - if (typeof assetInfoUpdateOrFunction === "function") { - this._setAssetInfo(file, assetInfoUpdateOrFunction(oldInfo), oldInfo); - } else { - this._setAssetInfo( - file, - cachedCleverMerge(oldInfo, assetInfoUpdateOrFunction), - oldInfo - ); - } - } - } - - renameAsset(file, newFile) { - const source = this.assets[file]; - if (!source) { - throw new Error( - `Called Compilation.renameAsset for not existing filename ${file}` - ); - } - if (this.assets[newFile]) { - if (!isSourceEqual(this.assets[file], source)) { - this.errors.push( - new WebpackError( - `Conflict: Called Compilation.renameAsset for already existing filename ${newFile} with different content` - ) - ); - } - } - const assetInfo = this.assetsInfo.get(file); - // Update related in all other assets - const relatedInInfo = this._assetsRelatedIn.get(file); - if (relatedInInfo) { - for (const [key, assets] of relatedInInfo) { - for (const name of assets) { - const info = this.assetsInfo.get(name); - if (!info) continue; - const related = info.related; - if (!related) continue; - const entry = related[key]; - let newEntry; - if (Array.isArray(entry)) { - newEntry = entry.map(x => (x === file ? newFile : x)); - } else if (entry === file) { - newEntry = newFile; - } else continue; - this.assetsInfo.set(name, { - ...info, - related: { - ...related, - [key]: newEntry - } - }); - } - } - } - this._setAssetInfo(file, undefined, assetInfo); - this._setAssetInfo(newFile, assetInfo); - delete this.assets[file]; - this.assets[newFile] = source; - for (const chunk of this.chunks) { - { - const size = chunk.files.size; - chunk.files.delete(file); - if (size !== chunk.files.size) { - chunk.files.add(newFile); - } - } - { - const size = chunk.auxiliaryFiles.size; - chunk.auxiliaryFiles.delete(file); - if (size !== chunk.auxiliaryFiles.size) { - chunk.auxiliaryFiles.add(newFile); - } - } - } - } - - /** - * @param {string} file file name - */ - deleteAsset(file) { - if (!this.assets[file]) { - return; - } - delete this.assets[file]; - const assetInfo = this.assetsInfo.get(file); - this._setAssetInfo(file, undefined, assetInfo); - const related = assetInfo && assetInfo.related; - if (related) { - for (const key of Object.keys(related)) { - const checkUsedAndDelete = file => { - if (!this._assetsRelatedIn.has(file)) { - this.deleteAsset(file); - } - }; - const items = related[key]; - if (Array.isArray(items)) { - items.forEach(checkUsedAndDelete); - } else if (items) { - checkUsedAndDelete(items); - } - } - } - // TODO If this becomes a performance problem - // store a reverse mapping from asset to chunk - for (const chunk of this.chunks) { - chunk.files.delete(file); - chunk.auxiliaryFiles.delete(file); - } - } - - getAssets() { - /** @type {Readonly[]} */ - const array = []; - for (const assetName of Object.keys(this.assets)) { - if (Object.prototype.hasOwnProperty.call(this.assets, assetName)) { - array.push({ - name: assetName, - source: this.assets[assetName], - info: this.assetsInfo.get(assetName) || EMPTY_ASSET_INFO - }); - } - } - return array; - } - - /** - * @param {string} name the name of the asset - * @returns {Readonly | undefined} the asset or undefined when not found - */ - getAsset(name) { - if (!Object.prototype.hasOwnProperty.call(this.assets, name)) - return undefined; - return { - name, - source: this.assets[name], - info: this.assetsInfo.get(name) || EMPTY_ASSET_INFO - }; - } - - clearAssets() { - for (const chunk of this.chunks) { - chunk.files.clear(); - chunk.auxiliaryFiles.clear(); - } - } - - createModuleAssets() { - const { chunkGraph } = this; - for (const module of this.modules) { - if (module.buildInfo.assets) { - const assetsInfo = module.buildInfo.assetsInfo; - for (const assetName of Object.keys(module.buildInfo.assets)) { - const fileName = this.getPath(assetName, { - chunkGraph: this.chunkGraph, - module - }); - for (const chunk of chunkGraph.getModuleChunksIterable(module)) { - chunk.auxiliaryFiles.add(fileName); - } - this.emitAsset( - fileName, - module.buildInfo.assets[assetName], - assetsInfo ? assetsInfo.get(assetName) : undefined - ); - this.hooks.moduleAsset.call(module, fileName); - } - } - } - } - - /** - * @param {RenderManifestOptions} options options object - * @returns {RenderManifestEntry[]} manifest entries - */ - getRenderManifest(options) { - return this.hooks.renderManifest.call([], options); - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - createChunkAssets(callback) { - const outputOptions = this.outputOptions; - const cachedSourceMap = new WeakMap(); - /** @type {Map} */ - const alreadyWrittenFiles = new Map(); - - asyncLib.forEachLimit( - this.chunks, - 15, - (chunk, callback) => { - /** @type {RenderManifestEntry[]} */ - let manifest; - try { - manifest = this.getRenderManifest({ - chunk, - hash: this.hash, - fullHash: this.fullHash, - outputOptions, - codeGenerationResults: this.codeGenerationResults, - moduleTemplates: this.moduleTemplates, - dependencyTemplates: this.dependencyTemplates, - chunkGraph: this.chunkGraph, - moduleGraph: this.moduleGraph, - runtimeTemplate: this.runtimeTemplate - }); - } catch (err) { - this.errors.push(new ChunkRenderError(chunk, "", err)); - return callback(); - } - asyncLib.forEach( - manifest, - (fileManifest, callback) => { - const ident = fileManifest.identifier; - const usedHash = fileManifest.hash; - - const assetCacheItem = this._assetsCache.getItemCache( - ident, - usedHash - ); - - assetCacheItem.get((err, sourceFromCache) => { - /** @type {string | function(PathData, AssetInfo=): string} */ - let filenameTemplate; - /** @type {string} */ - let file; - /** @type {AssetInfo} */ - let assetInfo; - - let inTry = true; - const errorAndCallback = err => { - const filename = - file || - (typeof file === "string" - ? file - : typeof filenameTemplate === "string" - ? filenameTemplate - : ""); - - this.errors.push(new ChunkRenderError(chunk, filename, err)); - inTry = false; - return callback(); - }; - - try { - if ("filename" in fileManifest) { - file = fileManifest.filename; - assetInfo = fileManifest.info; - } else { - filenameTemplate = fileManifest.filenameTemplate; - const pathAndInfo = this.getPathWithInfo( - filenameTemplate, - fileManifest.pathOptions - ); - file = pathAndInfo.path; - assetInfo = fileManifest.info - ? { - ...pathAndInfo.info, - ...fileManifest.info - } - : pathAndInfo.info; - } - - if (err) { - return errorAndCallback(err); - } - - let source = sourceFromCache; - - // check if the same filename was already written by another chunk - const alreadyWritten = alreadyWrittenFiles.get(file); - if (alreadyWritten !== undefined) { - if (alreadyWritten.hash !== usedHash) { - inTry = false; - return callback( - new WebpackError( - `Conflict: Multiple chunks emit assets to the same filename ${file}` + - ` (chunks ${alreadyWritten.chunk.id} and ${chunk.id})` - ) - ); - } else { - source = alreadyWritten.source; - } - } else if (!source) { - // render the asset - source = fileManifest.render(); - - // Ensure that source is a cached source to avoid additional cost because of repeated access - if (!(source instanceof CachedSource)) { - const cacheEntry = cachedSourceMap.get(source); - if (cacheEntry) { - source = cacheEntry; - } else { - const cachedSource = new CachedSource(source); - cachedSourceMap.set(source, cachedSource); - source = cachedSource; - } - } - } - this.emitAsset(file, source, assetInfo); - if (fileManifest.auxiliary) { - chunk.auxiliaryFiles.add(file); - } else { - chunk.files.add(file); - } - this.hooks.chunkAsset.call(chunk, file); - alreadyWrittenFiles.set(file, { - hash: usedHash, - source, - chunk - }); - if (source !== sourceFromCache) { - assetCacheItem.store(source, err => { - if (err) return errorAndCallback(err); - inTry = false; - return callback(); - }); - } else { - inTry = false; - callback(); - } - } catch (err) { - if (!inTry) throw err; - errorAndCallback(err); - } - }); - }, - callback - ); - }, - callback - ); - } - - /** - * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash - * @param {PathData} data context data - * @returns {string} interpolated path - */ - getPath(filename, data = {}) { - if (!data.hash) { - data = { - hash: this.hash, - ...data - }; - } - return this.getAssetPath(filename, data); - } - - /** - * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash - * @param {PathData} data context data - * @returns {{ path: string, info: AssetInfo }} interpolated path and asset info - */ - getPathWithInfo(filename, data = {}) { - if (!data.hash) { - data = { - hash: this.hash, - ...data - }; - } - return this.getAssetPathWithInfo(filename, data); - } - - /** - * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash - * @param {PathData} data context data - * @returns {string} interpolated path - */ - getAssetPath(filename, data) { - return this.hooks.assetPath.call( - typeof filename === "function" ? filename(data) : filename, - data, - undefined - ); - } - - /** - * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash - * @param {PathData} data context data - * @returns {{ path: string, info: AssetInfo }} interpolated path and asset info - */ - getAssetPathWithInfo(filename, data) { - const assetInfo = {}; - // TODO webpack 5: refactor assetPath hook to receive { path, info } object - const newPath = this.hooks.assetPath.call( - typeof filename === "function" ? filename(data, assetInfo) : filename, - data, - assetInfo - ); - return { path: newPath, info: assetInfo }; - } - - getWarnings() { - return this.hooks.processWarnings.call(this.warnings); - } - - getErrors() { - return this.hooks.processErrors.call(this.errors); - } - - /** - * This function allows you to run another instance of webpack inside of webpack however as - * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins - * from parent (or top level compiler) and creates a child Compilation - * - * @param {string} name name of the child compiler - * @param {OutputOptions=} outputOptions // Need to convert config schema to types for this - * @param {Array=} plugins webpack plugins that will be applied - * @returns {Compiler} creates a child Compiler instance - */ - createChildCompiler(name, outputOptions, plugins) { - const idx = this.childrenCounters[name] || 0; - this.childrenCounters[name] = idx + 1; - return this.compiler.createChildCompiler( - this, - name, - idx, - outputOptions, - plugins - ); - } - - /** - * @param {Module} module the module - * @param {ExecuteModuleOptions} options options - * @param {ExecuteModuleCallback} callback callback - */ - executeModule(module, options, callback) { - // Aggregate all referenced modules and ensure they are ready - const modules = new Set([module]); - processAsyncTree( - modules, - 10, - /** - * @param {Module} module the module - * @param {function(Module): void} push push more jobs - * @param {Callback} callback callback - * @returns {void} - */ - (module, push, callback) => { - this.buildQueue.waitFor(module, err => { - if (err) return callback(err); - this.processDependenciesQueue.waitFor(module, err => { - if (err) return callback(err); - for (const { module: m } of this.moduleGraph.getOutgoingConnections( - module - )) { - const size = modules.size; - modules.add(m); - if (modules.size !== size) push(m); - } - callback(); - }); - }); - }, - err => { - if (err) return callback(err); - - // Create new chunk graph, chunk and entrypoint for the build time execution - const chunkGraph = new ChunkGraph( - this.moduleGraph, - this.outputOptions.hashFunction - ); - const runtime = "build time"; - const { hashFunction, hashDigest, hashDigestLength } = - this.outputOptions; - const runtimeTemplate = this.runtimeTemplate; - - const chunk = new Chunk("build time chunk", this._backCompat); - chunk.id = chunk.name; - chunk.ids = [chunk.id]; - chunk.runtime = runtime; - - const entrypoint = new Entrypoint({ - runtime, - chunkLoading: false, - ...options.entryOptions - }); - chunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint); - connectChunkGroupAndChunk(entrypoint, chunk); - entrypoint.setRuntimeChunk(chunk); - entrypoint.setEntrypointChunk(chunk); - - const chunks = new Set([chunk]); - - // Assign ids to modules and modules to the chunk - for (const module of modules) { - const id = module.identifier(); - chunkGraph.setModuleId(module, id); - chunkGraph.connectChunkAndModule(chunk, module); - } - - /** @type {WebpackError[]} */ - const errors = []; - - // Hash modules - for (const module of modules) { - this._createModuleHash( - module, - chunkGraph, - runtime, - hashFunction, - runtimeTemplate, - hashDigest, - hashDigestLength, - errors - ); - } - - const codeGenerationResults = new CodeGenerationResults( - this.outputOptions.hashFunction - ); - /** - * @param {Module} module the module - * @param {Callback} callback callback - * @returns {void} - */ - const codeGen = (module, callback) => { - this._codeGenerationModule( - module, - runtime, - [runtime], - chunkGraph.getModuleHash(module, runtime), - this.dependencyTemplates, - chunkGraph, - this.moduleGraph, - runtimeTemplate, - errors, - codeGenerationResults, - (err, codeGenerated) => { - callback(err); - } - ); - }; - - const reportErrors = () => { - if (errors.length > 0) { - errors.sort( - compareSelect(err => err.module, compareModulesByIdentifier) - ); - for (const error of errors) { - this.errors.push(error); - } - errors.length = 0; - } - }; - - // Generate code for all aggregated modules - asyncLib.eachLimit(modules, 10, codeGen, err => { - if (err) return callback(err); - reportErrors(); - - // for backward-compat temporary set the chunk graph - // TODO webpack 6 - const old = this.chunkGraph; - this.chunkGraph = chunkGraph; - this.processRuntimeRequirements({ - chunkGraph, - modules, - chunks, - codeGenerationResults, - chunkGraphEntries: chunks - }); - this.chunkGraph = old; - - const runtimeModules = - chunkGraph.getChunkRuntimeModulesIterable(chunk); - - // Hash runtime modules - for (const module of runtimeModules) { - modules.add(module); - this._createModuleHash( - module, - chunkGraph, - runtime, - hashFunction, - runtimeTemplate, - hashDigest, - hashDigestLength - ); - } - - // Generate code for all runtime modules - asyncLib.eachLimit(runtimeModules, 10, codeGen, err => { - if (err) return callback(err); - reportErrors(); - - /** @type {Map} */ - const moduleArgumentsMap = new Map(); - /** @type {Map} */ - const moduleArgumentsById = new Map(); - - /** @type {ExecuteModuleResult["fileDependencies"]} */ - const fileDependencies = new LazySet(); - /** @type {ExecuteModuleResult["contextDependencies"]} */ - const contextDependencies = new LazySet(); - /** @type {ExecuteModuleResult["missingDependencies"]} */ - const missingDependencies = new LazySet(); - /** @type {ExecuteModuleResult["buildDependencies"]} */ - const buildDependencies = new LazySet(); - - /** @type {ExecuteModuleResult["assets"]} */ - const assets = new Map(); - - let cacheable = true; - - /** @type {ExecuteModuleContext} */ - const context = { - assets, - __webpack_require__: undefined, - chunk, - chunkGraph - }; - - // Prepare execution - asyncLib.eachLimit( - modules, - 10, - (module, callback) => { - const codeGenerationResult = codeGenerationResults.get( - module, - runtime - ); - /** @type {ExecuteModuleArgument} */ - const moduleArgument = { - module, - codeGenerationResult, - preparedInfo: undefined, - moduleObject: undefined - }; - moduleArgumentsMap.set(module, moduleArgument); - moduleArgumentsById.set(module.identifier(), moduleArgument); - module.addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ); - if (module.buildInfo.cacheable === false) { - cacheable = false; - } - if (module.buildInfo && module.buildInfo.assets) { - const { assets: moduleAssets, assetsInfo } = module.buildInfo; - for (const assetName of Object.keys(moduleAssets)) { - assets.set(assetName, { - source: moduleAssets[assetName], - info: assetsInfo ? assetsInfo.get(assetName) : undefined - }); - } - } - this.hooks.prepareModuleExecution.callAsync( - moduleArgument, - context, - callback - ); - }, - err => { - if (err) return callback(err); - - let exports; - try { - const { - strictModuleErrorHandling, - strictModuleExceptionHandling - } = this.outputOptions; - const __nested_webpack_require_153265__ = id => { - const cached = moduleCache[id]; - if (cached !== undefined) { - if (cached.error) throw cached.error; - return cached.exports; - } - const moduleArgument = moduleArgumentsById.get(id); - return __webpack_require_module__(moduleArgument, id); - }; - const interceptModuleExecution = (__nested_webpack_require_153265__[ - RuntimeGlobals.interceptModuleExecution.replace( - "__webpack_require__.", - "" - ) - ] = []); - const moduleCache = (__nested_webpack_require_153265__[ - RuntimeGlobals.moduleCache.replace( - "__webpack_require__.", - "" - ) - ] = {}); - - context.__webpack_require__ = __nested_webpack_require_153265__; - - /** - * @param {ExecuteModuleArgument} moduleArgument the module argument - * @param {string=} id id - * @returns {any} exports - */ - const __webpack_require_module__ = (moduleArgument, id) => { - var execOptions = { - id, - module: { - id, - exports: {}, - loaded: false, - error: undefined - }, - require: __nested_webpack_require_153265__ - }; - interceptModuleExecution.forEach(handler => - handler(execOptions) - ); - const module = moduleArgument.module; - this.buildTimeExecutedModules.add(module); - const moduleObject = execOptions.module; - moduleArgument.moduleObject = moduleObject; - try { - if (id) moduleCache[id] = moduleObject; - - tryRunOrWebpackError( - () => - this.hooks.executeModule.call( - moduleArgument, - context - ), - "Compilation.hooks.executeModule" - ); - moduleObject.loaded = true; - return moduleObject.exports; - } catch (e) { - if (strictModuleExceptionHandling) { - if (id) delete moduleCache[id]; - } else if (strictModuleErrorHandling) { - moduleObject.error = e; - } - if (!e.module) e.module = module; - throw e; - } - }; - - for (const runtimeModule of chunkGraph.getChunkRuntimeModulesInOrder( - chunk - )) { - __webpack_require_module__( - moduleArgumentsMap.get(runtimeModule) - ); - } - exports = __nested_webpack_require_153265__(module.identifier()); - } catch (e) { - const err = new WebpackError( - `Execution of module code from module graph (${module.readableIdentifier( - this.requestShortener - )}) failed: ${e.message}` - ); - err.stack = e.stack; - err.module = e.module; - return callback(err); - } - - callback(null, { - exports, - assets, - cacheable, - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - }); - } - ); - }); - }); - } - ); - } - - checkConstraints() { - const chunkGraph = this.chunkGraph; - - /** @type {Set} */ - const usedIds = new Set(); - - for (const module of this.modules) { - if (module.type === "runtime") continue; - const moduleId = chunkGraph.getModuleId(module); - if (moduleId === null) continue; - if (usedIds.has(moduleId)) { - throw new Error(`checkConstraints: duplicate module id ${moduleId}`); - } - usedIds.add(moduleId); - } - - for (const chunk of this.chunks) { - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (!this.modules.has(module)) { - throw new Error( - "checkConstraints: module in chunk but not in compilation " + - ` ${chunk.debugId} ${module.debugId}` - ); - } - } - for (const module of chunkGraph.getChunkEntryModulesIterable(chunk)) { - if (!this.modules.has(module)) { - throw new Error( - "checkConstraints: entry module in chunk but not in compilation " + - ` ${chunk.debugId} ${module.debugId}` - ); - } - } - } - - for (const chunkGroup of this.chunkGroups) { - chunkGroup.checkConstraints(); - } - } -} - -/** - * @typedef {Object} FactorizeModuleOptions - * @property {ModuleProfile} currentProfile - * @property {ModuleFactory} factory - * @property {Dependency[]} dependencies - * @property {boolean=} factoryResult return full ModuleFactoryResult instead of only module - * @property {Module | null} originModule - * @property {Partial=} contextInfo - * @property {string=} context - */ - -/** - * @param {FactorizeModuleOptions} options options object - * @param {ModuleCallback | ModuleFactoryResultCallback} callback callback - * @returns {void} - */ - -// Workaround for typescript as it doesn't support function overloading in jsdoc within a class -Compilation.prototype.factorizeModule = /** @type {{ - (options: FactorizeModuleOptions & { factoryResult?: false }, callback: ModuleCallback): void; - (options: FactorizeModuleOptions & { factoryResult: true }, callback: ModuleFactoryResultCallback): void; -}} */ ( - function (options, callback) { - this.factorizeQueue.add(options, callback); - } -); - -// Hide from typescript -const compilationPrototype = Compilation.prototype; - -// TODO webpack 6 remove -Object.defineProperty(compilationPrototype, "modifyHash", { - writable: false, - enumerable: false, - configurable: false, - value: () => { - throw new Error( - "Compilation.modifyHash was removed in favor of Compilation.hooks.fullHash" - ); - } -}); - -// TODO webpack 6 remove -Object.defineProperty(compilationPrototype, "cache", { - enumerable: false, - configurable: false, - get: util.deprecate( - /** - * @this {Compilation} the compilation - * @returns {Cache} the cache - */ - function () { - return this.compiler.cache; - }, - "Compilation.cache was removed in favor of Compilation.getCache()", - "DEP_WEBPACK_COMPILATION_CACHE" - ), - set: util.deprecate( - v => {}, - "Compilation.cache was removed in favor of Compilation.getCache()", - "DEP_WEBPACK_COMPILATION_CACHE" - ) -}); - -/** - * Add additional assets to the compilation. - */ -Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL = -2000; - -/** - * Basic preprocessing of assets. - */ -Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS = -1000; - -/** - * Derive new assets from existing assets. - * Existing assets should not be treated as complete. - */ -Compilation.PROCESS_ASSETS_STAGE_DERIVED = -200; - -/** - * Add additional sections to existing assets, like a banner or initialization code. - */ -Compilation.PROCESS_ASSETS_STAGE_ADDITIONS = -100; - -/** - * Optimize existing assets in a general way. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE = 100; - -/** - * Optimize the count of existing assets, e. g. by merging them. - * Only assets of the same type should be merged. - * For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT = 200; - -/** - * Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY = 300; - -/** - * Optimize the size of existing assets, e. g. by minimizing or omitting whitespace. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE = 400; - -/** - * Add development tooling to assets, e. g. by extracting a SourceMap. - */ -Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING = 500; - -/** - * Optimize the count of existing assets, e. g. by inlining assets of into other assets. - * Only assets of different types should be inlined. - * For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE = 700; - -/** - * Summarize the list of existing assets - * e. g. creating an assets manifest of Service Workers. - */ -Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE = 1000; - -/** - * Optimize the hashes of the assets, e. g. by generating real hashes of the asset content. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH = 2500; - -/** - * Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset. - */ -Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER = 3000; - -/** - * Analyse existing assets. - */ -Compilation.PROCESS_ASSETS_STAGE_ANALYSE = 4000; - -/** - * Creating assets for reporting purposes. - */ -Compilation.PROCESS_ASSETS_STAGE_REPORT = 5000; - -module.exports = Compilation; - - -/***/ }), - -/***/ 37912: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const parseJson = __webpack_require__(85685); -const asyncLib = __webpack_require__(78175); -const { - SyncHook, - SyncBailHook, - AsyncParallelHook, - AsyncSeriesHook -} = __webpack_require__(44217); -const { SizeOnlySource } = __webpack_require__(51255); -const webpack = __webpack_require__(13733); -const Cache = __webpack_require__(25363); -const CacheFacade = __webpack_require__(36035); -const ChunkGraph = __webpack_require__(75449); -const Compilation = __webpack_require__(73002); -const ConcurrentCompilationError = __webpack_require__(56275); -const ContextModuleFactory = __webpack_require__(5444); -const ModuleGraph = __webpack_require__(13487); -const NormalModuleFactory = __webpack_require__(26156); -const RequestShortener = __webpack_require__(41483); -const ResolverFactory = __webpack_require__(34001); -const Stats = __webpack_require__(47158); -const Watching = __webpack_require__(50313); -const WebpackError = __webpack_require__(27154); -const { Logger } = __webpack_require__(33594); -const { join, dirname, mkdirp } = __webpack_require__(47077); -const { makePathsRelative } = __webpack_require__(20162); -const { isSourceEqual } = __webpack_require__(22307); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} Entry */ -/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ -/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./util/WeakTupleMap")} WeakTupleMap */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */ -/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ -/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */ - -/** - * @typedef {Object} CompilationParams - * @property {NormalModuleFactory} normalModuleFactory - * @property {ContextModuleFactory} contextModuleFactory - */ - -/** - * @template T - * @callback Callback - * @param {(Error | null)=} err - * @param {T=} result - */ - -/** - * @callback RunAsChildCallback - * @param {(Error | null)=} err - * @param {Chunk[]=} entries - * @param {Compilation=} compilation - */ - -/** - * @typedef {Object} AssetEmittedInfo - * @property {Buffer} content - * @property {Source} source - * @property {Compilation} compilation - * @property {string} outputPath - * @property {string} targetPath - */ - -/** - * @param {string[]} array an array - * @returns {boolean} true, if the array is sorted - */ -const isSorted = array => { - for (let i = 1; i < array.length; i++) { - if (array[i - 1] > array[i]) return false; - } - return true; -}; - -/** - * @param {Object} obj an object - * @param {string[]} keys the keys of the object - * @returns {Object} the object with properties sorted by property name - */ -const sortObject = (obj, keys) => { - const o = {}; - for (const k of keys.sort()) { - o[k] = obj[k]; - } - return o; -}; - -/** - * @param {string} filename filename - * @param {string | string[] | undefined} hashes list of hashes - * @returns {boolean} true, if the filename contains any hash - */ -const includesHash = (filename, hashes) => { - if (!hashes) return false; - if (Array.isArray(hashes)) { - return hashes.some(hash => filename.includes(hash)); - } else { - return filename.includes(hashes); - } -}; - -class Compiler { - /** - * @param {string} context the compilation path - * @param {WebpackOptions} options options - */ - constructor(context, options = /** @type {WebpackOptions} */ ({})) { - this.hooks = Object.freeze({ - /** @type {SyncHook<[]>} */ - initialize: new SyncHook([]), - - /** @type {SyncBailHook<[Compilation], boolean>} */ - shouldEmit: new SyncBailHook(["compilation"]), - /** @type {AsyncSeriesHook<[Stats]>} */ - done: new AsyncSeriesHook(["stats"]), - /** @type {SyncHook<[Stats]>} */ - afterDone: new SyncHook(["stats"]), - /** @type {AsyncSeriesHook<[]>} */ - additionalPass: new AsyncSeriesHook([]), - /** @type {AsyncSeriesHook<[Compiler]>} */ - beforeRun: new AsyncSeriesHook(["compiler"]), - /** @type {AsyncSeriesHook<[Compiler]>} */ - run: new AsyncSeriesHook(["compiler"]), - /** @type {AsyncSeriesHook<[Compilation]>} */ - emit: new AsyncSeriesHook(["compilation"]), - /** @type {AsyncSeriesHook<[string, AssetEmittedInfo]>} */ - assetEmitted: new AsyncSeriesHook(["file", "info"]), - /** @type {AsyncSeriesHook<[Compilation]>} */ - afterEmit: new AsyncSeriesHook(["compilation"]), - - /** @type {SyncHook<[Compilation, CompilationParams]>} */ - thisCompilation: new SyncHook(["compilation", "params"]), - /** @type {SyncHook<[Compilation, CompilationParams]>} */ - compilation: new SyncHook(["compilation", "params"]), - /** @type {SyncHook<[NormalModuleFactory]>} */ - normalModuleFactory: new SyncHook(["normalModuleFactory"]), - /** @type {SyncHook<[ContextModuleFactory]>} */ - contextModuleFactory: new SyncHook(["contextModuleFactory"]), - - /** @type {AsyncSeriesHook<[CompilationParams]>} */ - beforeCompile: new AsyncSeriesHook(["params"]), - /** @type {SyncHook<[CompilationParams]>} */ - compile: new SyncHook(["params"]), - /** @type {AsyncParallelHook<[Compilation]>} */ - make: new AsyncParallelHook(["compilation"]), - /** @type {AsyncParallelHook<[Compilation]>} */ - finishMake: new AsyncSeriesHook(["compilation"]), - /** @type {AsyncSeriesHook<[Compilation]>} */ - afterCompile: new AsyncSeriesHook(["compilation"]), - - /** @type {AsyncSeriesHook<[]>} */ - readRecords: new AsyncSeriesHook([]), - /** @type {AsyncSeriesHook<[]>} */ - emitRecords: new AsyncSeriesHook([]), - - /** @type {AsyncSeriesHook<[Compiler]>} */ - watchRun: new AsyncSeriesHook(["compiler"]), - /** @type {SyncHook<[Error]>} */ - failed: new SyncHook(["error"]), - /** @type {SyncHook<[string | null, number]>} */ - invalid: new SyncHook(["filename", "changeTime"]), - /** @type {SyncHook<[]>} */ - watchClose: new SyncHook([]), - /** @type {AsyncSeriesHook<[]>} */ - shutdown: new AsyncSeriesHook([]), - - /** @type {SyncBailHook<[string, string, any[]], true>} */ - infrastructureLog: new SyncBailHook(["origin", "type", "args"]), - - // TODO the following hooks are weirdly located here - // TODO move them for webpack 5 - /** @type {SyncHook<[]>} */ - environment: new SyncHook([]), - /** @type {SyncHook<[]>} */ - afterEnvironment: new SyncHook([]), - /** @type {SyncHook<[Compiler]>} */ - afterPlugins: new SyncHook(["compiler"]), - /** @type {SyncHook<[Compiler]>} */ - afterResolvers: new SyncHook(["compiler"]), - /** @type {SyncBailHook<[string, Entry], boolean>} */ - entryOption: new SyncBailHook(["context", "entry"]) - }); - - this.webpack = webpack; - - /** @type {string=} */ - this.name = undefined; - /** @type {Compilation=} */ - this.parentCompilation = undefined; - /** @type {Compiler} */ - this.root = this; - /** @type {string} */ - this.outputPath = ""; - /** @type {Watching} */ - this.watching = undefined; - - /** @type {OutputFileSystem} */ - this.outputFileSystem = null; - /** @type {IntermediateFileSystem} */ - this.intermediateFileSystem = null; - /** @type {InputFileSystem} */ - this.inputFileSystem = null; - /** @type {WatchFileSystem} */ - this.watchFileSystem = null; - - /** @type {string|null} */ - this.recordsInputPath = null; - /** @type {string|null} */ - this.recordsOutputPath = null; - this.records = {}; - /** @type {Set} */ - this.managedPaths = new Set(); - /** @type {Set} */ - this.immutablePaths = new Set(); - - /** @type {ReadonlySet} */ - this.modifiedFiles = undefined; - /** @type {ReadonlySet} */ - this.removedFiles = undefined; - /** @type {ReadonlyMap} */ - this.fileTimestamps = undefined; - /** @type {ReadonlyMap} */ - this.contextTimestamps = undefined; - /** @type {number} */ - this.fsStartTime = undefined; - - /** @type {ResolverFactory} */ - this.resolverFactory = new ResolverFactory(); - - this.infrastructureLogger = undefined; - - this.options = options; - - this.context = context; - - this.requestShortener = new RequestShortener(context, this.root); - - this.cache = new Cache(); - - /** @type {Map, memCache: WeakTupleMap }> | undefined} */ - this.moduleMemCaches = undefined; - - this.compilerPath = ""; - - /** @type {boolean} */ - this.running = false; - - /** @type {boolean} */ - this.idle = false; - - /** @type {boolean} */ - this.watchMode = false; - - this._backCompat = this.options.experiments.backCompat !== false; - - /** @type {Compilation} */ - this._lastCompilation = undefined; - /** @type {NormalModuleFactory} */ - this._lastNormalModuleFactory = undefined; - - /** @private @type {WeakMap }>} */ - this._assetEmittingSourceCache = new WeakMap(); - /** @private @type {Map} */ - this._assetEmittingWrittenFiles = new Map(); - /** @private @type {Set} */ - this._assetEmittingPreviousFiles = new Set(); - } - - /** - * @param {string} name cache name - * @returns {CacheFacade} the cache facade instance - */ - getCache(name) { - return new CacheFacade( - this.cache, - `${this.compilerPath}${name}`, - this.options.output.hashFunction - ); - } - - /** - * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name - * @returns {Logger} a logger with that name - */ - getInfrastructureLogger(name) { - if (!name) { - throw new TypeError( - "Compiler.getInfrastructureLogger(name) called without a name" - ); - } - return new Logger( - (type, args) => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compiler.getInfrastructureLogger(name) called with a function not returning a name" - ); - } - } - if (this.hooks.infrastructureLog.call(name, type, args) === undefined) { - if (this.infrastructureLogger !== undefined) { - this.infrastructureLogger(name, type, args); - } - } - }, - childName => { - if (typeof name === "function") { - if (typeof childName === "function") { - return this.getInfrastructureLogger(() => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compiler.getInfrastructureLogger(name) called with a function not returning a name" - ); - } - } - if (typeof childName === "function") { - childName = childName(); - if (!childName) { - throw new TypeError( - "Logger.getChildLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } else { - return this.getInfrastructureLogger(() => { - if (typeof name === "function") { - name = name(); - if (!name) { - throw new TypeError( - "Compiler.getInfrastructureLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } - } else { - if (typeof childName === "function") { - return this.getInfrastructureLogger(() => { - if (typeof childName === "function") { - childName = childName(); - if (!childName) { - throw new TypeError( - "Logger.getChildLogger(name) called with a function not returning a name" - ); - } - } - return `${name}/${childName}`; - }); - } else { - return this.getInfrastructureLogger(`${name}/${childName}`); - } - } - } - ); - } - - // TODO webpack 6: solve this in a better way - // e.g. move compilation specific info from Modules into ModuleGraph - _cleanupLastCompilation() { - if (this._lastCompilation !== undefined) { - for (const module of this._lastCompilation.modules) { - ChunkGraph.clearChunkGraphForModule(module); - ModuleGraph.clearModuleGraphForModule(module); - module.cleanupForCache(); - } - for (const chunk of this._lastCompilation.chunks) { - ChunkGraph.clearChunkGraphForChunk(chunk); - } - this._lastCompilation = undefined; - } - } - - // TODO webpack 6: solve this in a better way - _cleanupLastNormalModuleFactory() { - if (this._lastNormalModuleFactory !== undefined) { - this._lastNormalModuleFactory.cleanupForCache(); - this._lastNormalModuleFactory = undefined; - } - } - - /** - * @param {WatchOptions} watchOptions the watcher's options - * @param {Callback} handler signals when the call finishes - * @returns {Watching} a compiler watcher - */ - watch(watchOptions, handler) { - if (this.running) { - return handler(new ConcurrentCompilationError()); - } - - this.running = true; - this.watchMode = true; - this.watching = new Watching(this, watchOptions, handler); - return this.watching; - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - run(callback) { - if (this.running) { - return callback(new ConcurrentCompilationError()); - } - - let logger; - - const finalCallback = (err, stats) => { - if (logger) logger.time("beginIdle"); - this.idle = true; - this.cache.beginIdle(); - this.idle = true; - if (logger) logger.timeEnd("beginIdle"); - this.running = false; - if (err) { - this.hooks.failed.call(err); - } - if (callback !== undefined) callback(err, stats); - this.hooks.afterDone.call(stats); - }; - - const startTime = Date.now(); - - this.running = true; - - const onCompiled = (err, compilation) => { - if (err) return finalCallback(err); - - if (this.hooks.shouldEmit.call(compilation) === false) { - compilation.startTime = startTime; - compilation.endTime = Date.now(); - const stats = new Stats(compilation); - this.hooks.done.callAsync(stats, err => { - if (err) return finalCallback(err); - return finalCallback(null, stats); - }); - return; - } - - process.nextTick(() => { - logger = compilation.getLogger("webpack.Compiler"); - logger.time("emitAssets"); - this.emitAssets(compilation, err => { - logger.timeEnd("emitAssets"); - if (err) return finalCallback(err); - - if (compilation.hooks.needAdditionalPass.call()) { - compilation.needAdditionalPass = true; - - compilation.startTime = startTime; - compilation.endTime = Date.now(); - logger.time("done hook"); - const stats = new Stats(compilation); - this.hooks.done.callAsync(stats, err => { - logger.timeEnd("done hook"); - if (err) return finalCallback(err); - - this.hooks.additionalPass.callAsync(err => { - if (err) return finalCallback(err); - this.compile(onCompiled); - }); - }); - return; - } - - logger.time("emitRecords"); - this.emitRecords(err => { - logger.timeEnd("emitRecords"); - if (err) return finalCallback(err); - - compilation.startTime = startTime; - compilation.endTime = Date.now(); - logger.time("done hook"); - const stats = new Stats(compilation); - this.hooks.done.callAsync(stats, err => { - logger.timeEnd("done hook"); - if (err) return finalCallback(err); - this.cache.storeBuildDependencies( - compilation.buildDependencies, - err => { - if (err) return finalCallback(err); - return finalCallback(null, stats); - } - ); - }); - }); - }); - }); - }; - - const run = () => { - this.hooks.beforeRun.callAsync(this, err => { - if (err) return finalCallback(err); - - this.hooks.run.callAsync(this, err => { - if (err) return finalCallback(err); - - this.readRecords(err => { - if (err) return finalCallback(err); - - this.compile(onCompiled); - }); - }); - }); - }; - - if (this.idle) { - this.cache.endIdle(err => { - if (err) return finalCallback(err); - - this.idle = false; - run(); - }); - } else { - run(); - } - } - - /** - * @param {RunAsChildCallback} callback signals when the call finishes - * @returns {void} - */ - runAsChild(callback) { - const startTime = Date.now(); - - const finalCallback = (err, entries, compilation) => { - try { - callback(err, entries, compilation); - } catch (e) { - const err = new WebpackError( - `compiler.runAsChild callback error: ${e}` - ); - err.details = e.stack; - this.parentCompilation.errors.push(err); - } - }; - - this.compile((err, compilation) => { - if (err) return finalCallback(err); - - this.parentCompilation.children.push(compilation); - for (const { name, source, info } of compilation.getAssets()) { - this.parentCompilation.emitAsset(name, source, info); - } - - const entries = []; - for (const ep of compilation.entrypoints.values()) { - entries.push(...ep.chunks); - } - - compilation.startTime = startTime; - compilation.endTime = Date.now(); - - return finalCallback(null, entries, compilation); - }); - } - - purgeInputFileSystem() { - if (this.inputFileSystem && this.inputFileSystem.purge) { - this.inputFileSystem.purge(); - } - } - - /** - * @param {Compilation} compilation the compilation - * @param {Callback} callback signals when the assets are emitted - * @returns {void} - */ - emitAssets(compilation, callback) { - let outputPath; - - const emitFiles = err => { - if (err) return callback(err); - - const assets = compilation.getAssets(); - compilation.assets = { ...compilation.assets }; - /** @type {Map} */ - const caseInsensitiveMap = new Map(); - /** @type {Set} */ - const allTargetPaths = new Set(); - asyncLib.forEachLimit( - assets, - 15, - ({ name: file, source, info }, callback) => { - let targetFile = file; - let immutable = info.immutable; - const queryStringIdx = targetFile.indexOf("?"); - if (queryStringIdx >= 0) { - targetFile = targetFile.slice(0, queryStringIdx); - // We may remove the hash, which is in the query string - // So we recheck if the file is immutable - // This doesn't cover all cases, but immutable is only a performance optimization anyway - immutable = - immutable && - (includesHash(targetFile, info.contenthash) || - includesHash(targetFile, info.chunkhash) || - includesHash(targetFile, info.modulehash) || - includesHash(targetFile, info.fullhash)); - } - - const writeOut = err => { - if (err) return callback(err); - const targetPath = join( - this.outputFileSystem, - outputPath, - targetFile - ); - allTargetPaths.add(targetPath); - - // check if the target file has already been written by this Compiler - const targetFileGeneration = - this._assetEmittingWrittenFiles.get(targetPath); - - // create an cache entry for this Source if not already existing - let cacheEntry = this._assetEmittingSourceCache.get(source); - if (cacheEntry === undefined) { - cacheEntry = { - sizeOnlySource: undefined, - writtenTo: new Map() - }; - this._assetEmittingSourceCache.set(source, cacheEntry); - } - - let similarEntry; - - const checkSimilarFile = () => { - const caseInsensitiveTargetPath = targetPath.toLowerCase(); - similarEntry = caseInsensitiveMap.get(caseInsensitiveTargetPath); - if (similarEntry !== undefined) { - const { path: other, source: otherSource } = similarEntry; - if (isSourceEqual(otherSource, source)) { - // Size may or may not be available at this point. - // If it's not available add to "waiting" list and it will be updated once available - if (similarEntry.size !== undefined) { - updateWithReplacementSource(similarEntry.size); - } else { - if (!similarEntry.waiting) similarEntry.waiting = []; - similarEntry.waiting.push({ file, cacheEntry }); - } - alreadyWritten(); - } else { - const err = - new WebpackError(`Prevent writing to file that only differs in casing or query string from already written file. -This will lead to a race-condition and corrupted files on case-insensitive file systems. -${targetPath} -${other}`); - err.file = file; - callback(err); - } - return true; - } else { - caseInsensitiveMap.set( - caseInsensitiveTargetPath, - (similarEntry = { - path: targetPath, - source, - size: undefined, - waiting: undefined - }) - ); - return false; - } - }; - - /** - * get the binary (Buffer) content from the Source - * @returns {Buffer} content for the source - */ - const getContent = () => { - if (typeof source.buffer === "function") { - return source.buffer(); - } else { - const bufferOrString = source.source(); - if (Buffer.isBuffer(bufferOrString)) { - return bufferOrString; - } else { - return Buffer.from(bufferOrString, "utf8"); - } - } - }; - - const alreadyWritten = () => { - // cache the information that the Source has been already been written to that location - if (targetFileGeneration === undefined) { - const newGeneration = 1; - this._assetEmittingWrittenFiles.set(targetPath, newGeneration); - cacheEntry.writtenTo.set(targetPath, newGeneration); - } else { - cacheEntry.writtenTo.set(targetPath, targetFileGeneration); - } - callback(); - }; - - /** - * Write the file to output file system - * @param {Buffer} content content to be written - * @returns {void} - */ - const doWrite = content => { - this.outputFileSystem.writeFile(targetPath, content, err => { - if (err) return callback(err); - - // information marker that the asset has been emitted - compilation.emittedAssets.add(file); - - // cache the information that the Source has been written to that location - const newGeneration = - targetFileGeneration === undefined - ? 1 - : targetFileGeneration + 1; - cacheEntry.writtenTo.set(targetPath, newGeneration); - this._assetEmittingWrittenFiles.set(targetPath, newGeneration); - this.hooks.assetEmitted.callAsync( - file, - { - content, - source, - outputPath, - compilation, - targetPath - }, - callback - ); - }); - }; - - const updateWithReplacementSource = size => { - updateFileWithReplacementSource(file, cacheEntry, size); - similarEntry.size = size; - if (similarEntry.waiting !== undefined) { - for (const { file, cacheEntry } of similarEntry.waiting) { - updateFileWithReplacementSource(file, cacheEntry, size); - } - } - }; - - const updateFileWithReplacementSource = ( - file, - cacheEntry, - size - ) => { - // Create a replacement resource which only allows to ask for size - // This allows to GC all memory allocated by the Source - // (expect when the Source is stored in any other cache) - if (!cacheEntry.sizeOnlySource) { - cacheEntry.sizeOnlySource = new SizeOnlySource(size); - } - compilation.updateAsset(file, cacheEntry.sizeOnlySource, { - size - }); - }; - - const processExistingFile = stats => { - // skip emitting if it's already there and an immutable file - if (immutable) { - updateWithReplacementSource(stats.size); - return alreadyWritten(); - } - - const content = getContent(); - - updateWithReplacementSource(content.length); - - // if it exists and content on disk matches content - // skip writing the same content again - // (to keep mtime and don't trigger watchers) - // for a fast negative match file size is compared first - if (content.length === stats.size) { - compilation.comparedForEmitAssets.add(file); - return this.outputFileSystem.readFile( - targetPath, - (err, existingContent) => { - if ( - err || - !content.equals(/** @type {Buffer} */ (existingContent)) - ) { - return doWrite(content); - } else { - return alreadyWritten(); - } - } - ); - } - - return doWrite(content); - }; - - const processMissingFile = () => { - const content = getContent(); - - updateWithReplacementSource(content.length); - - return doWrite(content); - }; - - // if the target file has already been written - if (targetFileGeneration !== undefined) { - // check if the Source has been written to this target file - const writtenGeneration = cacheEntry.writtenTo.get(targetPath); - if (writtenGeneration === targetFileGeneration) { - // if yes, we may skip writing the file - // if it's already there - // (we assume one doesn't modify files while the Compiler is running, other then removing them) - - if (this._assetEmittingPreviousFiles.has(targetPath)) { - // We assume that assets from the last compilation say intact on disk (they are not removed) - compilation.updateAsset(file, cacheEntry.sizeOnlySource, { - size: cacheEntry.sizeOnlySource.size() - }); - - return callback(); - } else { - // Settings immutable will make it accept file content without comparing when file exist - immutable = true; - } - } else if (!immutable) { - if (checkSimilarFile()) return; - // We wrote to this file before which has very likely a different content - // skip comparing and assume content is different for performance - // This case happens often during watch mode. - return processMissingFile(); - } - } - - if (checkSimilarFile()) return; - if (this.options.output.compareBeforeEmit) { - this.outputFileSystem.stat(targetPath, (err, stats) => { - const exists = !err && stats.isFile(); - - if (exists) { - processExistingFile(stats); - } else { - processMissingFile(); - } - }); - } else { - processMissingFile(); - } - }; - - if (targetFile.match(/\/|\\/)) { - const fs = this.outputFileSystem; - const dir = dirname(fs, join(fs, outputPath, targetFile)); - mkdirp(fs, dir, writeOut); - } else { - writeOut(); - } - }, - err => { - // Clear map to free up memory - caseInsensitiveMap.clear(); - if (err) { - this._assetEmittingPreviousFiles.clear(); - return callback(err); - } - - this._assetEmittingPreviousFiles = allTargetPaths; - - this.hooks.afterEmit.callAsync(compilation, err => { - if (err) return callback(err); - - return callback(); - }); - } - ); - }; - - this.hooks.emit.callAsync(compilation, err => { - if (err) return callback(err); - outputPath = compilation.getPath(this.outputPath, {}); - mkdirp(this.outputFileSystem, outputPath, emitFiles); - }); - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - emitRecords(callback) { - if (this.hooks.emitRecords.isUsed()) { - if (this.recordsOutputPath) { - asyncLib.parallel( - [ - cb => this.hooks.emitRecords.callAsync(cb), - this._emitRecords.bind(this) - ], - err => callback(err) - ); - } else { - this.hooks.emitRecords.callAsync(callback); - } - } else { - if (this.recordsOutputPath) { - this._emitRecords(callback); - } else { - callback(); - } - } - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - _emitRecords(callback) { - const writeFile = () => { - this.outputFileSystem.writeFile( - this.recordsOutputPath, - JSON.stringify( - this.records, - (n, value) => { - if ( - typeof value === "object" && - value !== null && - !Array.isArray(value) - ) { - const keys = Object.keys(value); - if (!isSorted(keys)) { - return sortObject(value, keys); - } - } - return value; - }, - 2 - ), - callback - ); - }; - - const recordsOutputPathDirectory = dirname( - this.outputFileSystem, - this.recordsOutputPath - ); - if (!recordsOutputPathDirectory) { - return writeFile(); - } - mkdirp(this.outputFileSystem, recordsOutputPathDirectory, err => { - if (err) return callback(err); - writeFile(); - }); - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - readRecords(callback) { - if (this.hooks.readRecords.isUsed()) { - if (this.recordsInputPath) { - asyncLib.parallel([ - cb => this.hooks.readRecords.callAsync(cb), - this._readRecords.bind(this) - ]); - } else { - this.records = {}; - this.hooks.readRecords.callAsync(callback); - } - } else { - if (this.recordsInputPath) { - this._readRecords(callback); - } else { - this.records = {}; - callback(); - } - } - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - _readRecords(callback) { - if (!this.recordsInputPath) { - this.records = {}; - return callback(); - } - this.inputFileSystem.stat(this.recordsInputPath, err => { - // It doesn't exist - // We can ignore this. - if (err) return callback(); - - this.inputFileSystem.readFile(this.recordsInputPath, (err, content) => { - if (err) return callback(err); - - try { - this.records = parseJson(content.toString("utf-8")); - } catch (e) { - e.message = "Cannot parse records: " + e.message; - return callback(e); - } - - return callback(); - }); - }); - } - - /** - * @param {Compilation} compilation the compilation - * @param {string} compilerName the compiler's name - * @param {number} compilerIndex the compiler's index - * @param {OutputOptions=} outputOptions the output options - * @param {WebpackPluginInstance[]=} plugins the plugins to apply - * @returns {Compiler} a child compiler - */ - createChildCompiler( - compilation, - compilerName, - compilerIndex, - outputOptions, - plugins - ) { - const childCompiler = new Compiler(this.context, { - ...this.options, - output: { - ...this.options.output, - ...outputOptions - } - }); - childCompiler.name = compilerName; - childCompiler.outputPath = this.outputPath; - childCompiler.inputFileSystem = this.inputFileSystem; - childCompiler.outputFileSystem = null; - childCompiler.resolverFactory = this.resolverFactory; - childCompiler.modifiedFiles = this.modifiedFiles; - childCompiler.removedFiles = this.removedFiles; - childCompiler.fileTimestamps = this.fileTimestamps; - childCompiler.contextTimestamps = this.contextTimestamps; - childCompiler.fsStartTime = this.fsStartTime; - childCompiler.cache = this.cache; - childCompiler.compilerPath = `${this.compilerPath}${compilerName}|${compilerIndex}|`; - childCompiler._backCompat = this._backCompat; - - const relativeCompilerName = makePathsRelative( - this.context, - compilerName, - this.root - ); - if (!this.records[relativeCompilerName]) { - this.records[relativeCompilerName] = []; - } - if (this.records[relativeCompilerName][compilerIndex]) { - childCompiler.records = this.records[relativeCompilerName][compilerIndex]; - } else { - this.records[relativeCompilerName].push((childCompiler.records = {})); - } - - childCompiler.parentCompilation = compilation; - childCompiler.root = this.root; - if (Array.isArray(plugins)) { - for (const plugin of plugins) { - plugin.apply(childCompiler); - } - } - for (const name in this.hooks) { - if ( - ![ - "make", - "compile", - "emit", - "afterEmit", - "invalid", - "done", - "thisCompilation" - ].includes(name) - ) { - if (childCompiler.hooks[name]) { - childCompiler.hooks[name].taps = this.hooks[name].taps.slice(); - } - } - } - - compilation.hooks.childCompiler.call( - childCompiler, - compilerName, - compilerIndex - ); - - return childCompiler; - } - - isChild() { - return !!this.parentCompilation; - } - - createCompilation(params) { - this._cleanupLastCompilation(); - return (this._lastCompilation = new Compilation(this, params)); - } - - /** - * @param {CompilationParams} params the compilation parameters - * @returns {Compilation} the created compilation - */ - newCompilation(params) { - const compilation = this.createCompilation(params); - compilation.name = this.name; - compilation.records = this.records; - this.hooks.thisCompilation.call(compilation, params); - this.hooks.compilation.call(compilation, params); - return compilation; - } - - createNormalModuleFactory() { - this._cleanupLastNormalModuleFactory(); - const normalModuleFactory = new NormalModuleFactory({ - context: this.options.context, - fs: this.inputFileSystem, - resolverFactory: this.resolverFactory, - options: this.options.module, - associatedObjectForCache: this.root, - layers: this.options.experiments.layers - }); - this._lastNormalModuleFactory = normalModuleFactory; - this.hooks.normalModuleFactory.call(normalModuleFactory); - return normalModuleFactory; - } - - createContextModuleFactory() { - const contextModuleFactory = new ContextModuleFactory(this.resolverFactory); - this.hooks.contextModuleFactory.call(contextModuleFactory); - return contextModuleFactory; - } - - newCompilationParams() { - const params = { - normalModuleFactory: this.createNormalModuleFactory(), - contextModuleFactory: this.createContextModuleFactory() - }; - return params; - } - - /** - * @param {Callback} callback signals when the compilation finishes - * @returns {void} - */ - compile(callback) { - const params = this.newCompilationParams(); - this.hooks.beforeCompile.callAsync(params, err => { - if (err) return callback(err); - - this.hooks.compile.call(params); - - const compilation = this.newCompilation(params); - - const logger = compilation.getLogger("webpack.Compiler"); - - logger.time("make hook"); - this.hooks.make.callAsync(compilation, err => { - logger.timeEnd("make hook"); - if (err) return callback(err); - - logger.time("finish make hook"); - this.hooks.finishMake.callAsync(compilation, err => { - logger.timeEnd("finish make hook"); - if (err) return callback(err); - - process.nextTick(() => { - logger.time("finish compilation"); - compilation.finish(err => { - logger.timeEnd("finish compilation"); - if (err) return callback(err); - - logger.time("seal compilation"); - compilation.seal(err => { - logger.timeEnd("seal compilation"); - if (err) return callback(err); - - logger.time("afterCompile hook"); - this.hooks.afterCompile.callAsync(compilation, err => { - logger.timeEnd("afterCompile hook"); - if (err) return callback(err); - - return callback(null, compilation); - }); - }); - }); - }); - }); - }); - }); - } - - /** - * @param {Callback} callback signals when the compiler closes - * @returns {void} - */ - close(callback) { - if (this.watching) { - // When there is still an active watching, close this first - this.watching.close(err => { - this.close(callback); - }); - return; - } - this.hooks.shutdown.callAsync(err => { - if (err) return callback(err); - // Get rid of reference to last compilation to avoid leaking memory - // We can't run this._cleanupLastCompilation() as the Stats to this compilation - // might be still in use. We try to get rid of the reference to the cache instead. - this._lastCompilation = undefined; - this._lastNormalModuleFactory = undefined; - this.cache.shutdown(callback); - }); - } -} - -module.exports = Compiler; - - -/***/ }), - -/***/ 81701: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Module")} Module */ - -const MODULE_REFERENCE_REGEXP = - /^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_directImport)?(?:_asiSafe(\d))?__$/; - -const DEFAULT_EXPORT = "__WEBPACK_DEFAULT_EXPORT__"; -const NAMESPACE_OBJECT_EXPORT = "__WEBPACK_NAMESPACE_OBJECT__"; - -/** - * @typedef {Object} ExternalModuleInfo - * @property {number} index - * @property {Module} module - */ - -/** - * @typedef {Object} ConcatenatedModuleInfo - * @property {number} index - * @property {Module} module - * @property {Map} exportMap mapping from export name to symbol - * @property {Map} rawExportMap mapping from export name to symbol - * @property {string=} namespaceExportSymbol - */ - -/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo} ModuleInfo */ - -/** - * @typedef {Object} ModuleReferenceOptions - * @property {string[]} ids the properties/exports of the module - * @property {boolean} call true, when this referenced export is called - * @property {boolean} directImport true, when this referenced export is directly imported (not via property access) - * @property {boolean | undefined} asiSafe if the position is ASI safe or unknown - */ - -class ConcatenationScope { - /** - * @param {ModuleInfo[] | Map} modulesMap all module info by module - * @param {ConcatenatedModuleInfo} currentModule the current module info - */ - constructor(modulesMap, currentModule) { - this._currentModule = currentModule; - if (Array.isArray(modulesMap)) { - const map = new Map(); - for (const info of modulesMap) { - map.set(info.module, info); - } - modulesMap = map; - } - this._modulesMap = modulesMap; - } - - /** - * @param {Module} module the referenced module - * @returns {boolean} true, when it's in the scope - */ - isModuleInScope(module) { - return this._modulesMap.has(module); - } - - /** - * - * @param {string} exportName name of the export - * @param {string} symbol identifier of the export in source code - */ - registerExport(exportName, symbol) { - if (!this._currentModule.exportMap) { - this._currentModule.exportMap = new Map(); - } - if (!this._currentModule.exportMap.has(exportName)) { - this._currentModule.exportMap.set(exportName, symbol); - } - } - - /** - * - * @param {string} exportName name of the export - * @param {string} expression expression to be used - */ - registerRawExport(exportName, expression) { - if (!this._currentModule.rawExportMap) { - this._currentModule.rawExportMap = new Map(); - } - if (!this._currentModule.rawExportMap.has(exportName)) { - this._currentModule.rawExportMap.set(exportName, expression); - } - } - - /** - * @param {string} symbol identifier of the export in source code - */ - registerNamespaceExport(symbol) { - this._currentModule.namespaceExportSymbol = symbol; - } - - /** - * - * @param {Module} module the referenced module - * @param {Partial} options options - * @returns {string} the reference as identifier - */ - createModuleReference( - module, - { ids = undefined, call = false, directImport = false, asiSafe = false } - ) { - const info = this._modulesMap.get(module); - const callFlag = call ? "_call" : ""; - const directImportFlag = directImport ? "_directImport" : ""; - const asiSafeFlag = asiSafe - ? "_asiSafe1" - : asiSafe === false - ? "_asiSafe0" - : ""; - const exportData = ids - ? Buffer.from(JSON.stringify(ids), "utf-8").toString("hex") - : "ns"; - // a "._" is appended to allow "delete ...", which would cause a SyntaxError in strict mode - return `__WEBPACK_MODULE_REFERENCE__${info.index}_${exportData}${callFlag}${directImportFlag}${asiSafeFlag}__._`; - } - - /** - * @param {string} name the identifier - * @returns {boolean} true, when it's an module reference - */ - static isModuleReference(name) { - return MODULE_REFERENCE_REGEXP.test(name); - } - - /** - * @param {string} name the identifier - * @returns {ModuleReferenceOptions & { index: number }} parsed options and index - */ - static matchModuleReference(name) { - const match = MODULE_REFERENCE_REGEXP.exec(name); - if (!match) return null; - const index = +match[1]; - const asiSafe = match[5]; - return { - index, - ids: - match[2] === "ns" - ? [] - : JSON.parse(Buffer.from(match[2], "hex").toString("utf-8")), - call: !!match[3], - directImport: !!match[4], - asiSafe: asiSafe ? asiSafe === "1" : undefined - }; - } -} - -ConcatenationScope.DEFAULT_EXPORT = DEFAULT_EXPORT; -ConcatenationScope.NAMESPACE_OBJECT_EXPORT = NAMESPACE_OBJECT_EXPORT; - -module.exports = ConcatenationScope; - - -/***/ }), - -/***/ 56275: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Maksim Nazarjev @acupofspirt -*/ - - - -const WebpackError = __webpack_require__(27154); - -module.exports = class ConcurrentCompilationError extends WebpackError { - constructor() { - super(); - - this.name = "ConcurrentCompilationError"; - this.message = - "You ran Webpack twice. Each instance only supports a single concurrent compilation at a time."; - } -}; - - -/***/ }), - -/***/ 47146: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, PrefixSource } = __webpack_require__(51255); -const InitFragment = __webpack_require__(64768); -const Template = __webpack_require__(43841); -const { mergeRuntime } = __webpack_require__(47462); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Generator").GenerateContext} GenerateContext */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -const wrapInCondition = (condition, source) => { - if (typeof source === "string") { - return Template.asString([ - `if (${condition}) {`, - Template.indent(source), - "}", - "" - ]); - } else { - return new ConcatSource( - `if (${condition}) {\n`, - new PrefixSource("\t", source), - "}\n" - ); - } -}; - -/** - * @typedef {GenerateContext} Context - */ -class ConditionalInitFragment extends InitFragment { - /** - * @param {string|Source} content the source code that will be included as initialization code - * @param {number} stage category of initialization code (contribute to order) - * @param {number} position position in the category (contribute to order) - * @param {string} key unique key to avoid emitting the same initialization code twice - * @param {RuntimeSpec | boolean} runtimeCondition in which runtime this fragment should be executed - * @param {string|Source=} endContent the source code that will be included at the end of the module - */ - constructor( - content, - stage, - position, - key, - runtimeCondition = true, - endContent - ) { - super(content, stage, position, key, endContent); - this.runtimeCondition = runtimeCondition; - } - - /** - * @param {Context} context context - * @returns {string|Source} the source code that will be included as initialization code - */ - getContent(context) { - if (this.runtimeCondition === false || !this.content) return ""; - if (this.runtimeCondition === true) return this.content; - const expr = context.runtimeTemplate.runtimeConditionExpression({ - chunkGraph: context.chunkGraph, - runtimeRequirements: context.runtimeRequirements, - runtime: context.runtime, - runtimeCondition: this.runtimeCondition - }); - if (expr === "true") return this.content; - return wrapInCondition(expr, this.content); - } - - /** - * @param {Context} context context - * @returns {string|Source=} the source code that will be included at the end of the module - */ - getEndContent(context) { - if (this.runtimeCondition === false || !this.endContent) return ""; - if (this.runtimeCondition === true) return this.endContent; - const expr = context.runtimeTemplate.runtimeConditionExpression({ - chunkGraph: context.chunkGraph, - runtimeRequirements: context.runtimeRequirements, - runtime: context.runtime, - runtimeCondition: this.runtimeCondition - }); - if (expr === "true") return this.endContent; - return wrapInCondition(expr, this.endContent); - } - - merge(other) { - if (this.runtimeCondition === true) return this; - if (other.runtimeCondition === true) return other; - if (this.runtimeCondition === false) return other; - if (other.runtimeCondition === false) return this; - const runtimeCondition = mergeRuntime( - this.runtimeCondition, - other.runtimeCondition - ); - return new ConditionalInitFragment( - this.content, - this.stage, - this.position, - this.key, - runtimeCondition, - this.endContent - ); - } -} - -module.exports = ConditionalInitFragment; - - -/***/ }), - -/***/ 37163: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const CachedConstDependency = __webpack_require__(83106); -const ConstDependency = __webpack_require__(14367); -const { evaluateToString } = __webpack_require__(97574); -const { parseResource } = __webpack_require__(20162); - -/** @typedef {import("estree").Expression} ExpressionNode */ -/** @typedef {import("estree").Super} SuperNode */ -/** @typedef {import("./Compiler")} Compiler */ - -const collectDeclaration = (declarations, pattern) => { - const stack = [pattern]; - while (stack.length > 0) { - const node = stack.pop(); - switch (node.type) { - case "Identifier": - declarations.add(node.name); - break; - case "ArrayPattern": - for (const element of node.elements) { - if (element) { - stack.push(element); - } - } - break; - case "AssignmentPattern": - stack.push(node.left); - break; - case "ObjectPattern": - for (const property of node.properties) { - stack.push(property.value); - } - break; - case "RestElement": - stack.push(node.argument); - break; - } - } -}; - -const getHoistedDeclarations = (branch, includeFunctionDeclarations) => { - const declarations = new Set(); - const stack = [branch]; - while (stack.length > 0) { - const node = stack.pop(); - // Some node could be `null` or `undefined`. - if (!node) continue; - switch (node.type) { - // Walk through control statements to look for hoisted declarations. - // Some branches are skipped since they do not allow declarations. - case "BlockStatement": - for (const stmt of node.body) { - stack.push(stmt); - } - break; - case "IfStatement": - stack.push(node.consequent); - stack.push(node.alternate); - break; - case "ForStatement": - stack.push(node.init); - stack.push(node.body); - break; - case "ForInStatement": - case "ForOfStatement": - stack.push(node.left); - stack.push(node.body); - break; - case "DoWhileStatement": - case "WhileStatement": - case "LabeledStatement": - stack.push(node.body); - break; - case "SwitchStatement": - for (const cs of node.cases) { - for (const consequent of cs.consequent) { - stack.push(consequent); - } - } - break; - case "TryStatement": - stack.push(node.block); - if (node.handler) { - stack.push(node.handler.body); - } - stack.push(node.finalizer); - break; - case "FunctionDeclaration": - if (includeFunctionDeclarations) { - collectDeclaration(declarations, node.id); - } - break; - case "VariableDeclaration": - if (node.kind === "var") { - for (const decl of node.declarations) { - collectDeclaration(declarations, decl.id); - } - } - break; - } - } - return Array.from(declarations); -}; - -class ConstPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const cachedParseResource = parseResource.bindCache(compiler.root); - compiler.hooks.compilation.tap( - "ConstPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - - compilation.dependencyTemplates.set( - CachedConstDependency, - new CachedConstDependency.Template() - ); - - const handler = parser => { - parser.hooks.statementIf.tap("ConstPlugin", statement => { - if (parser.scope.isAsmJs) return; - const param = parser.evaluateExpression(statement.test); - const bool = param.asBool(); - if (typeof bool === "boolean") { - if (!param.couldHaveSideEffects()) { - const dep = new ConstDependency(`${bool}`, param.range); - dep.loc = statement.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - parser.walkExpression(statement.test); - } - const branchToRemove = bool - ? statement.alternate - : statement.consequent; - if (branchToRemove) { - // Before removing the dead branch, the hoisted declarations - // must be collected. - // - // Given the following code: - // - // if (true) f() else g() - // if (false) { - // function f() {} - // const g = function g() {} - // if (someTest) { - // let a = 1 - // var x, {y, z} = obj - // } - // } else { - // … - // } - // - // the generated code is: - // - // if (true) f() else {} - // if (false) { - // var f, x, y, z; (in loose mode) - // var x, y, z; (in strict mode) - // } else { - // … - // } - // - // NOTE: When code runs in strict mode, `var` declarations - // are hoisted but `function` declarations don't. - // - let declarations; - if (parser.scope.isStrict) { - // If the code runs in strict mode, variable declarations - // using `var` must be hoisted. - declarations = getHoistedDeclarations(branchToRemove, false); - } else { - // Otherwise, collect all hoisted declaration. - declarations = getHoistedDeclarations(branchToRemove, true); - } - let replacement; - if (declarations.length > 0) { - replacement = `{ var ${declarations.join(", ")}; }`; - } else { - replacement = "{}"; - } - const dep = new ConstDependency( - replacement, - branchToRemove.range - ); - dep.loc = branchToRemove.loc; - parser.state.module.addPresentationalDependency(dep); - } - return bool; - } - }); - parser.hooks.expressionConditionalOperator.tap( - "ConstPlugin", - expression => { - if (parser.scope.isAsmJs) return; - const param = parser.evaluateExpression(expression.test); - const bool = param.asBool(); - if (typeof bool === "boolean") { - if (!param.couldHaveSideEffects()) { - const dep = new ConstDependency(` ${bool}`, param.range); - dep.loc = expression.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - parser.walkExpression(expression.test); - } - // Expressions do not hoist. - // It is safe to remove the dead branch. - // - // Given the following code: - // - // false ? someExpression() : otherExpression(); - // - // the generated code is: - // - // false ? 0 : otherExpression(); - // - const branchToRemove = bool - ? expression.alternate - : expression.consequent; - const dep = new ConstDependency("0", branchToRemove.range); - dep.loc = branchToRemove.loc; - parser.state.module.addPresentationalDependency(dep); - return bool; - } - } - ); - parser.hooks.expressionLogicalOperator.tap( - "ConstPlugin", - expression => { - if (parser.scope.isAsmJs) return; - if ( - expression.operator === "&&" || - expression.operator === "||" - ) { - const param = parser.evaluateExpression(expression.left); - const bool = param.asBool(); - if (typeof bool === "boolean") { - // Expressions do not hoist. - // It is safe to remove the dead branch. - // - // ------------------------------------------ - // - // Given the following code: - // - // falsyExpression() && someExpression(); - // - // the generated code is: - // - // falsyExpression() && false; - // - // ------------------------------------------ - // - // Given the following code: - // - // truthyExpression() && someExpression(); - // - // the generated code is: - // - // true && someExpression(); - // - // ------------------------------------------ - // - // Given the following code: - // - // truthyExpression() || someExpression(); - // - // the generated code is: - // - // truthyExpression() || false; - // - // ------------------------------------------ - // - // Given the following code: - // - // falsyExpression() || someExpression(); - // - // the generated code is: - // - // false && someExpression(); - // - const keepRight = - (expression.operator === "&&" && bool) || - (expression.operator === "||" && !bool); - - if ( - !param.couldHaveSideEffects() && - (param.isBoolean() || keepRight) - ) { - // for case like - // - // return'development'===process.env.NODE_ENV&&'foo' - // - // we need a space before the bool to prevent result like - // - // returnfalse&&'foo' - // - const dep = new ConstDependency(` ${bool}`, param.range); - dep.loc = expression.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - parser.walkExpression(expression.left); - } - if (!keepRight) { - const dep = new ConstDependency( - "0", - expression.right.range - ); - dep.loc = expression.loc; - parser.state.module.addPresentationalDependency(dep); - } - return keepRight; - } - } else if (expression.operator === "??") { - const param = parser.evaluateExpression(expression.left); - const keepRight = param.asNullish(); - if (typeof keepRight === "boolean") { - // ------------------------------------------ - // - // Given the following code: - // - // nonNullish ?? someExpression(); - // - // the generated code is: - // - // nonNullish ?? 0; - // - // ------------------------------------------ - // - // Given the following code: - // - // nullish ?? someExpression(); - // - // the generated code is: - // - // null ?? someExpression(); - // - if (!param.couldHaveSideEffects() && keepRight) { - // cspell:word returnnull - // for case like - // - // return('development'===process.env.NODE_ENV&&null)??'foo' - // - // we need a space before the bool to prevent result like - // - // returnnull??'foo' - // - const dep = new ConstDependency(" null", param.range); - dep.loc = expression.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - const dep = new ConstDependency( - "0", - expression.right.range - ); - dep.loc = expression.loc; - parser.state.module.addPresentationalDependency(dep); - parser.walkExpression(expression.left); - } - - return keepRight; - } - } - } - ); - parser.hooks.optionalChaining.tap("ConstPlugin", expr => { - /** @type {ExpressionNode[]} */ - const optionalExpressionsStack = []; - /** @type {ExpressionNode|SuperNode} */ - let next = expr.expression; - - while ( - next.type === "MemberExpression" || - next.type === "CallExpression" - ) { - if (next.type === "MemberExpression") { - if (next.optional) { - // SuperNode can not be optional - optionalExpressionsStack.push( - /** @type {ExpressionNode} */ (next.object) - ); - } - next = next.object; - } else { - if (next.optional) { - // SuperNode can not be optional - optionalExpressionsStack.push( - /** @type {ExpressionNode} */ (next.callee) - ); - } - next = next.callee; - } - } - - while (optionalExpressionsStack.length) { - const expression = optionalExpressionsStack.pop(); - const evaluated = parser.evaluateExpression(expression); - - if (evaluated.asNullish()) { - // ------------------------------------------ - // - // Given the following code: - // - // nullishMemberChain?.a.b(); - // - // the generated code is: - // - // undefined; - // - // ------------------------------------------ - // - const dep = new ConstDependency(" undefined", expr.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - }); - parser.hooks.evaluateIdentifier - .for("__resourceQuery") - .tap("ConstPlugin", expr => { - if (parser.scope.isAsmJs) return; - if (!parser.state.module) return; - return evaluateToString( - cachedParseResource(parser.state.module.resource).query - )(expr); - }); - parser.hooks.expression - .for("__resourceQuery") - .tap("ConstPlugin", expr => { - if (parser.scope.isAsmJs) return; - if (!parser.state.module) return; - const dep = new CachedConstDependency( - JSON.stringify( - cachedParseResource(parser.state.module.resource).query - ), - expr.range, - "__resourceQuery" - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - parser.hooks.evaluateIdentifier - .for("__resourceFragment") - .tap("ConstPlugin", expr => { - if (parser.scope.isAsmJs) return; - if (!parser.state.module) return; - return evaluateToString( - cachedParseResource(parser.state.module.resource).fragment - )(expr); - }); - parser.hooks.expression - .for("__resourceFragment") - .tap("ConstPlugin", expr => { - if (parser.scope.isAsmJs) return; - if (!parser.state.module) return; - const dep = new CachedConstDependency( - JSON.stringify( - cachedParseResource(parser.state.module.resource).fragment - ), - expr.range, - "__resourceFragment" - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ConstPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("ConstPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ConstPlugin", handler); - } - ); - } -} - -module.exports = ConstPlugin; - - -/***/ }), - -/***/ 98633: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./ContextModuleFactory")} ContextModuleFactory */ - -class ContextExclusionPlugin { - /** - * @param {RegExp} negativeMatcher Matcher regular expression - */ - constructor(negativeMatcher) { - this.negativeMatcher = negativeMatcher; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", cmf => { - cmf.hooks.contextModuleFiles.tap("ContextExclusionPlugin", files => { - return files.filter(filePath => !this.negativeMatcher.test(filePath)); - }); - }); - } -} - -module.exports = ContextExclusionPlugin; - - -/***/ }), - -/***/ 49994: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { OriginalSource, RawSource } = __webpack_require__(51255); -const AsyncDependenciesBlock = __webpack_require__(42290); -const { makeWebpackError } = __webpack_require__(35230); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const WebpackError = __webpack_require__(27154); -const { - compareLocations, - concatComparators, - compareSelect, - keepOriginalOrder, - compareModulesById -} = __webpack_require__(58792); -const { - contextify, - parseResource, - makePathsRelative -} = __webpack_require__(20162); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./ChunkGroup").RawChunkGroupOptions} RawChunkGroupOptions */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module").BuildMeta} BuildMeta */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ -/** @template T @typedef {import("./util/LazySet")} LazySet */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -/** @typedef {"sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once"} ContextMode Context mode */ - -/** - * @typedef {Object} ContextOptions - * @property {ContextMode} mode - * @property {boolean} recursive - * @property {RegExp} regExp - * @property {"strict"|boolean=} namespaceObject - * @property {string=} addon - * @property {string=} chunkName - * @property {RegExp=} include - * @property {RegExp=} exclude - * @property {RawChunkGroupOptions=} groupOptions - * @property {string=} typePrefix - * @property {string=} category - * @property {string[][]=} referencedExports exports referenced from modules (won't be mangled) - */ - -/** - * @typedef {Object} ContextModuleOptionsExtras - * @property {false|string|string[]} resource - * @property {string=} resourceQuery - * @property {string=} resourceFragment - * @property {TODO} resolveOptions - */ - -/** @typedef {ContextOptions & ContextModuleOptionsExtras} ContextModuleOptions */ - -/** - * @callback ResolveDependenciesCallback - * @param {(Error | null)=} err - * @param {ContextElementDependency[]=} dependencies - */ - -/** - * @callback ResolveDependencies - * @param {InputFileSystem} fs - * @param {ContextModuleOptions} options - * @param {ResolveDependenciesCallback} callback - */ - -const SNAPSHOT_OPTIONS = { timestamp: true }; - -const TYPES = new Set(["javascript"]); - -class ContextModule extends Module { - /** - * @param {ResolveDependencies} resolveDependencies function to get dependencies in this context - * @param {ContextModuleOptions} options options object - */ - constructor(resolveDependencies, options) { - if (!options || typeof options.resource === "string") { - const parsed = parseResource( - options ? /** @type {string} */ (options.resource) : "" - ); - const resource = parsed.path; - const resourceQuery = (options && options.resourceQuery) || parsed.query; - const resourceFragment = - (options && options.resourceFragment) || parsed.fragment; - - super("javascript/dynamic", resource); - /** @type {ContextModuleOptions} */ - this.options = { - ...options, - resource, - resourceQuery, - resourceFragment - }; - } else { - super("javascript/dynamic"); - /** @type {ContextModuleOptions} */ - this.options = { - ...options, - resource: options.resource, - resourceQuery: options.resourceQuery || "", - resourceFragment: options.resourceFragment || "" - }; - } - - // Info from Factory - this.resolveDependencies = resolveDependencies; - if (options && options.resolveOptions !== undefined) { - this.resolveOptions = options.resolveOptions; - } - - if (options && typeof options.mode !== "string") { - throw new Error("options.mode is a required option"); - } - - this._identifier = this._createIdentifier(); - this._forceBuild = true; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - const m = /** @type {ContextModule} */ (module); - this.resolveDependencies = m.resolveDependencies; - this.options = m.options; - } - - /** - * Assuming this module is in the cache. Remove internal references to allow freeing some memory. - */ - cleanupForCache() { - super.cleanupForCache(); - this.resolveDependencies = undefined; - } - - _prettyRegExp(regexString, stripSlash = true) { - const str = (regexString + "").replace(/!/g, "%21").replace(/\|/g, "%7C"); - return stripSlash ? str.substring(1, str.length - 1) : str; - } - - _createIdentifier() { - let identifier = - this.context || - (typeof this.options.resource === "string" || - this.options.resource === false - ? `${this.options.resource}` - : this.options.resource.join("|")); - if (this.options.resourceQuery) { - identifier += `|${this.options.resourceQuery}`; - } - if (this.options.resourceFragment) { - identifier += `|${this.options.resourceFragment}`; - } - if (this.options.mode) { - identifier += `|${this.options.mode}`; - } - if (!this.options.recursive) { - identifier += "|nonrecursive"; - } - if (this.options.addon) { - identifier += `|${this.options.addon}`; - } - if (this.options.regExp) { - identifier += `|${this._prettyRegExp(this.options.regExp, false)}`; - } - if (this.options.include) { - identifier += `|include: ${this._prettyRegExp( - this.options.include, - false - )}`; - } - if (this.options.exclude) { - identifier += `|exclude: ${this._prettyRegExp( - this.options.exclude, - false - )}`; - } - if (this.options.referencedExports) { - identifier += `|referencedExports: ${JSON.stringify( - this.options.referencedExports - )}`; - } - if (this.options.chunkName) { - identifier += `|chunkName: ${this.options.chunkName}`; - } - if (this.options.groupOptions) { - identifier += `|groupOptions: ${JSON.stringify( - this.options.groupOptions - )}`; - } - if (this.options.namespaceObject === "strict") { - identifier += "|strict namespace object"; - } else if (this.options.namespaceObject) { - identifier += "|namespace object"; - } - - return identifier; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this._identifier; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - let identifier; - if (this.context) { - identifier = requestShortener.shorten(this.context) + "/"; - } else if ( - typeof this.options.resource === "string" || - this.options.resource === false - ) { - identifier = requestShortener.shorten(`${this.options.resource}`) + "/"; - } else { - identifier = this.options.resource - .map(r => requestShortener.shorten(r) + "/") - .join(" "); - } - if (this.options.resourceQuery) { - identifier += ` ${this.options.resourceQuery}`; - } - if (this.options.mode) { - identifier += ` ${this.options.mode}`; - } - if (!this.options.recursive) { - identifier += " nonrecursive"; - } - if (this.options.addon) { - identifier += ` ${requestShortener.shorten(this.options.addon)}`; - } - if (this.options.regExp) { - identifier += ` ${this._prettyRegExp(this.options.regExp)}`; - } - if (this.options.include) { - identifier += ` include: ${this._prettyRegExp(this.options.include)}`; - } - if (this.options.exclude) { - identifier += ` exclude: ${this._prettyRegExp(this.options.exclude)}`; - } - if (this.options.referencedExports) { - identifier += ` referencedExports: ${this.options.referencedExports - .map(e => e.join(".")) - .join(", ")}`; - } - if (this.options.chunkName) { - identifier += ` chunkName: ${this.options.chunkName}`; - } - if (this.options.groupOptions) { - const groupOptions = this.options.groupOptions; - for (const key of Object.keys(groupOptions)) { - identifier += ` ${key}: ${groupOptions[key]}`; - } - } - if (this.options.namespaceObject === "strict") { - identifier += " strict namespace object"; - } else if (this.options.namespaceObject) { - identifier += " namespace object"; - } - - return identifier; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - let identifier; - - if (this.context) { - identifier = contextify( - options.context, - this.context, - options.associatedObjectForCache - ); - } else if (typeof this.options.resource === "string") { - identifier = contextify( - options.context, - this.options.resource, - options.associatedObjectForCache - ); - } else if (this.options.resource === false) { - identifier = "false"; - } else { - identifier = this.options.resource - .map(res => - contextify(options.context, res, options.associatedObjectForCache) - ) - .join(" "); - } - - if (this.layer) identifier = `(${this.layer})/${identifier}`; - if (this.options.mode) { - identifier += ` ${this.options.mode}`; - } - if (this.options.recursive) { - identifier += " recursive"; - } - if (this.options.addon) { - identifier += ` ${contextify( - options.context, - this.options.addon, - options.associatedObjectForCache - )}`; - } - if (this.options.regExp) { - identifier += ` ${this._prettyRegExp(this.options.regExp)}`; - } - if (this.options.include) { - identifier += ` include: ${this._prettyRegExp(this.options.include)}`; - } - if (this.options.exclude) { - identifier += ` exclude: ${this._prettyRegExp(this.options.exclude)}`; - } - if (this.options.referencedExports) { - identifier += ` referencedExports: ${this.options.referencedExports - .map(e => e.join(".")) - .join(", ")}`; - } - - return identifier; - } - - /** - * @returns {void} - */ - invalidateBuild() { - this._forceBuild = true; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild({ fileSystemInfo }, callback) { - // build if enforced - if (this._forceBuild) return callback(null, true); - - // always build when we have no snapshot and context - if (!this.buildInfo.snapshot) - return callback(null, Boolean(this.context || this.options.resource)); - - fileSystemInfo.checkSnapshotValid(this.buildInfo.snapshot, (err, valid) => { - callback(err, !valid); - }); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this._forceBuild = false; - /** @type {BuildMeta} */ - this.buildMeta = { - exportsType: "default", - defaultObject: "redirect-warn" - }; - this.buildInfo = { - snapshot: undefined - }; - this.dependencies.length = 0; - this.blocks.length = 0; - const startTime = Date.now(); - this.resolveDependencies(fs, this.options, (err, dependencies) => { - if (err) { - return callback( - makeWebpackError(err, "ContextModule.resolveDependencies") - ); - } - - // abort if something failed - // this will create an empty context - if (!dependencies) { - callback(); - return; - } - - // enhance dependencies with meta info - for (const dep of dependencies) { - dep.loc = { - name: dep.userRequest - }; - dep.request = this.options.addon + dep.request; - } - dependencies.sort( - concatComparators( - compareSelect(a => a.loc, compareLocations), - keepOriginalOrder(this.dependencies) - ) - ); - - if (this.options.mode === "sync" || this.options.mode === "eager") { - // if we have an sync or eager context - // just add all dependencies and continue - this.dependencies = dependencies; - } else if (this.options.mode === "lazy-once") { - // for the lazy-once mode create a new async dependency block - // and add that block to this context - if (dependencies.length > 0) { - const block = new AsyncDependenciesBlock({ - ...this.options.groupOptions, - name: this.options.chunkName - }); - for (const dep of dependencies) { - block.addDependency(dep); - } - this.addBlock(block); - } - } else if ( - this.options.mode === "weak" || - this.options.mode === "async-weak" - ) { - // we mark all dependencies as weak - for (const dep of dependencies) { - dep.weak = true; - } - this.dependencies = dependencies; - } else if (this.options.mode === "lazy") { - // if we are lazy create a new async dependency block per dependency - // and add all blocks to this context - let index = 0; - for (const dep of dependencies) { - let chunkName = this.options.chunkName; - if (chunkName) { - if (!/\[(index|request)\]/.test(chunkName)) { - chunkName += "[index]"; - } - chunkName = chunkName.replace(/\[index\]/g, `${index++}`); - chunkName = chunkName.replace( - /\[request\]/g, - Template.toPath(dep.userRequest) - ); - } - const block = new AsyncDependenciesBlock( - { - ...this.options.groupOptions, - name: chunkName - }, - dep.loc, - dep.userRequest - ); - block.addDependency(dep); - this.addBlock(block); - } - } else { - callback( - new WebpackError(`Unsupported mode "${this.options.mode}" in context`) - ); - return; - } - if (!this.context && !this.options.resource) return callback(); - - compilation.fileSystemInfo.createSnapshot( - startTime, - null, - this.context - ? [this.context] - : typeof this.options.resource === "string" - ? [this.options.resource] - : /** @type {string[]} */ (this.options.resource), - null, - SNAPSHOT_OPTIONS, - (err, snapshot) => { - if (err) return callback(err); - this.buildInfo.snapshot = snapshot; - callback(); - } - ); - }); - } - - /** - * @param {LazySet} fileDependencies set where file dependencies are added to - * @param {LazySet} contextDependencies set where context dependencies are added to - * @param {LazySet} missingDependencies set where missing dependencies are added to - * @param {LazySet} buildDependencies set where build dependencies are added to - */ - addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ) { - if (this.context) { - contextDependencies.add(this.context); - } else if (typeof this.options.resource === "string") { - contextDependencies.add(this.options.resource); - } else if (this.options.resource === false) { - return; - } else { - for (const res of this.options.resource) contextDependencies.add(res); - } - } - - /** - * @param {ContextElementDependency[]} dependencies all dependencies - * @param {ChunkGraph} chunkGraph chunk graph - * @returns {TODO} TODO - */ - getUserRequestMap(dependencies, chunkGraph) { - const moduleGraph = chunkGraph.moduleGraph; - // if we filter first we get a new array - // therefore we don't need to create a clone of dependencies explicitly - // therefore the order of this is !important! - const sortedDependencies = dependencies - .filter(dependency => moduleGraph.getModule(dependency)) - .sort((a, b) => { - if (a.userRequest === b.userRequest) { - return 0; - } - return a.userRequest < b.userRequest ? -1 : 1; - }); - const map = Object.create(null); - for (const dep of sortedDependencies) { - const module = moduleGraph.getModule(dep); - map[dep.userRequest] = chunkGraph.getModuleId(module); - } - return map; - } - - /** - * @param {ContextElementDependency[]} dependencies all dependencies - * @param {ChunkGraph} chunkGraph chunk graph - * @returns {TODO} TODO - */ - getFakeMap(dependencies, chunkGraph) { - if (!this.options.namespaceObject) { - return 9; - } - const moduleGraph = chunkGraph.moduleGraph; - // bitfield - let hasType = 0; - const comparator = compareModulesById(chunkGraph); - // if we filter first we get a new array - // therefore we don't need to create a clone of dependencies explicitly - // therefore the order of this is !important! - const sortedModules = dependencies - .map(dependency => moduleGraph.getModule(dependency)) - .filter(Boolean) - .sort(comparator); - const fakeMap = Object.create(null); - for (const module of sortedModules) { - const exportsType = module.getExportsType( - moduleGraph, - this.options.namespaceObject === "strict" - ); - const id = chunkGraph.getModuleId(module); - switch (exportsType) { - case "namespace": - fakeMap[id] = 9; - hasType |= 1; - break; - case "dynamic": - fakeMap[id] = 7; - hasType |= 2; - break; - case "default-only": - fakeMap[id] = 1; - hasType |= 4; - break; - case "default-with-named": - fakeMap[id] = 3; - hasType |= 8; - break; - default: - throw new Error(`Unexpected exports type ${exportsType}`); - } - } - if (hasType === 1) { - return 9; - } - if (hasType === 2) { - return 7; - } - if (hasType === 4) { - return 1; - } - if (hasType === 8) { - return 3; - } - if (hasType === 0) { - return 9; - } - return fakeMap; - } - - getFakeMapInitStatement(fakeMap) { - return typeof fakeMap === "object" - ? `var fakeMap = ${JSON.stringify(fakeMap, null, "\t")};` - : ""; - } - - getReturn(type, asyncModule) { - if (type === 9) { - return "__webpack_require__(id)"; - } - return `${RuntimeGlobals.createFakeNamespaceObject}(id, ${type}${ - asyncModule ? " | 16" : "" - })`; - } - - getReturnModuleObjectSource( - fakeMap, - asyncModule, - fakeMapDataExpression = "fakeMap[id]" - ) { - if (typeof fakeMap === "number") { - return `return ${this.getReturn(fakeMap, asyncModule)};`; - } - return `return ${ - RuntimeGlobals.createFakeNamespaceObject - }(id, ${fakeMapDataExpression}${asyncModule ? " | 16" : ""})`; - } - - /** - * @param {TODO} dependencies TODO - * @param {TODO} id TODO - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {string} source code - */ - getSyncSource(dependencies, id, chunkGraph) { - const map = this.getUserRequestMap(dependencies, chunkGraph); - const fakeMap = this.getFakeMap(dependencies, chunkGraph); - const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); - - return `var map = ${JSON.stringify(map, null, "\t")}; -${this.getFakeMapInitStatement(fakeMap)} - -function webpackContext(req) { - var id = webpackContextResolve(req); - ${returnModuleObject} -} -function webpackContextResolve(req) { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; -} -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = ${JSON.stringify(id)};`; - } - - /** - * @param {TODO} dependencies TODO - * @param {TODO} id TODO - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {string} source code - */ - getWeakSyncSource(dependencies, id, chunkGraph) { - const map = this.getUserRequestMap(dependencies, chunkGraph); - const fakeMap = this.getFakeMap(dependencies, chunkGraph); - const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); - - return `var map = ${JSON.stringify(map, null, "\t")}; -${this.getFakeMapInitStatement(fakeMap)} - -function webpackContext(req) { - var id = webpackContextResolve(req); - if(!${RuntimeGlobals.moduleFactories}[id]) { - var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - ${returnModuleObject} -} -function webpackContextResolve(req) { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; -} -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -webpackContext.id = ${JSON.stringify(id)}; -module.exports = webpackContext;`; - } - - /** - * @param {TODO} dependencies TODO - * @param {TODO} id TODO - * @param {Object} context context - * @param {ChunkGraph} context.chunkGraph the chunk graph - * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph - * @returns {string} source code - */ - getAsyncWeakSource(dependencies, id, { chunkGraph, runtimeTemplate }) { - const arrow = runtimeTemplate.supportsArrowFunction(); - const map = this.getUserRequestMap(dependencies, chunkGraph); - const fakeMap = this.getFakeMap(dependencies, chunkGraph); - const returnModuleObject = this.getReturnModuleObjectSource(fakeMap, true); - - return `var map = ${JSON.stringify(map, null, "\t")}; -${this.getFakeMapInitStatement(fakeMap)} - -function webpackAsyncContext(req) { - return webpackAsyncContextResolve(req).then(${ - arrow ? "id =>" : "function(id)" - } { - if(!${RuntimeGlobals.moduleFactories}[id]) { - var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - ${returnModuleObject} - }); -} -function webpackAsyncContextResolve(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncaught exception popping up in devtools - return Promise.resolve().then(${arrow ? "() =>" : "function()"} { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; - }); -} -webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( - "Object.keys(map)" - )}; -webpackAsyncContext.resolve = webpackAsyncContextResolve; -webpackAsyncContext.id = ${JSON.stringify(id)}; -module.exports = webpackAsyncContext;`; - } - - /** - * @param {TODO} dependencies TODO - * @param {TODO} id TODO - * @param {Object} context context - * @param {ChunkGraph} context.chunkGraph the chunk graph - * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph - * @returns {string} source code - */ - getEagerSource(dependencies, id, { chunkGraph, runtimeTemplate }) { - const arrow = runtimeTemplate.supportsArrowFunction(); - const map = this.getUserRequestMap(dependencies, chunkGraph); - const fakeMap = this.getFakeMap(dependencies, chunkGraph); - const thenFunction = - fakeMap !== 9 - ? `${arrow ? "id =>" : "function(id)"} { - ${this.getReturnModuleObjectSource(fakeMap)} - }` - : "__webpack_require__"; - return `var map = ${JSON.stringify(map, null, "\t")}; -${this.getFakeMapInitStatement(fakeMap)} - -function webpackAsyncContext(req) { - return webpackAsyncContextResolve(req).then(${thenFunction}); -} -function webpackAsyncContextResolve(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncaught exception popping up in devtools - return Promise.resolve().then(${arrow ? "() =>" : "function()"} { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; - }); -} -webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( - "Object.keys(map)" - )}; -webpackAsyncContext.resolve = webpackAsyncContextResolve; -webpackAsyncContext.id = ${JSON.stringify(id)}; -module.exports = webpackAsyncContext;`; - } - - /** - * @param {TODO} block TODO - * @param {TODO} dependencies TODO - * @param {TODO} id TODO - * @param {Object} options options object - * @param {RuntimeTemplate} options.runtimeTemplate the runtime template - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @returns {string} source code - */ - getLazyOnceSource(block, dependencies, id, { runtimeTemplate, chunkGraph }) { - const promise = runtimeTemplate.blockPromise({ - chunkGraph, - block, - message: "lazy-once context", - runtimeRequirements: new Set() - }); - const arrow = runtimeTemplate.supportsArrowFunction(); - const map = this.getUserRequestMap(dependencies, chunkGraph); - const fakeMap = this.getFakeMap(dependencies, chunkGraph); - const thenFunction = - fakeMap !== 9 - ? `${arrow ? "id =>" : "function(id)"} { - ${this.getReturnModuleObjectSource(fakeMap, true)}; - }` - : "__webpack_require__"; - - return `var map = ${JSON.stringify(map, null, "\t")}; -${this.getFakeMapInitStatement(fakeMap)} - -function webpackAsyncContext(req) { - return webpackAsyncContextResolve(req).then(${thenFunction}); -} -function webpackAsyncContextResolve(req) { - return ${promise}.then(${arrow ? "() =>" : "function()"} { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; - }); -} -webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( - "Object.keys(map)" - )}; -webpackAsyncContext.resolve = webpackAsyncContextResolve; -webpackAsyncContext.id = ${JSON.stringify(id)}; -module.exports = webpackAsyncContext;`; - } - - /** - * @param {TODO} blocks TODO - * @param {TODO} id TODO - * @param {Object} context context - * @param {ChunkGraph} context.chunkGraph the chunk graph - * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph - * @returns {string} source code - */ - getLazySource(blocks, id, { chunkGraph, runtimeTemplate }) { - const moduleGraph = chunkGraph.moduleGraph; - const arrow = runtimeTemplate.supportsArrowFunction(); - let hasMultipleOrNoChunks = false; - let hasNoChunk = true; - const fakeMap = this.getFakeMap( - blocks.map(b => b.dependencies[0]), - chunkGraph - ); - const hasFakeMap = typeof fakeMap === "object"; - const items = blocks - .map(block => { - const dependency = block.dependencies[0]; - return { - dependency: dependency, - module: moduleGraph.getModule(dependency), - block: block, - userRequest: dependency.userRequest, - chunks: undefined - }; - }) - .filter(item => item.module); - for (const item of items) { - const chunkGroup = chunkGraph.getBlockChunkGroup(item.block); - const chunks = (chunkGroup && chunkGroup.chunks) || []; - item.chunks = chunks; - if (chunks.length > 0) { - hasNoChunk = false; - } - if (chunks.length !== 1) { - hasMultipleOrNoChunks = true; - } - } - const shortMode = hasNoChunk && !hasFakeMap; - const sortedItems = items.sort((a, b) => { - if (a.userRequest === b.userRequest) return 0; - return a.userRequest < b.userRequest ? -1 : 1; - }); - const map = Object.create(null); - for (const item of sortedItems) { - const moduleId = chunkGraph.getModuleId(item.module); - if (shortMode) { - map[item.userRequest] = moduleId; - } else { - const arrayStart = [moduleId]; - if (hasFakeMap) { - arrayStart.push(fakeMap[moduleId]); - } - map[item.userRequest] = arrayStart.concat( - item.chunks.map(chunk => chunk.id) - ); - } - } - - const chunksStartPosition = hasFakeMap ? 2 : 1; - const requestPrefix = hasNoChunk - ? "Promise.resolve()" - : hasMultipleOrNoChunks - ? `Promise.all(ids.slice(${chunksStartPosition}).map(${RuntimeGlobals.ensureChunk}))` - : `${RuntimeGlobals.ensureChunk}(ids[${chunksStartPosition}])`; - const returnModuleObject = this.getReturnModuleObjectSource( - fakeMap, - true, - shortMode ? "invalid" : "ids[1]" - ); - - const webpackAsyncContext = - requestPrefix === "Promise.resolve()" - ? ` -function webpackAsyncContext(req) { - return Promise.resolve().then(${arrow ? "() =>" : "function()"} { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - - ${shortMode ? "var id = map[req];" : "var ids = map[req], id = ids[0];"} - ${returnModuleObject} - }); -}` - : `function webpackAsyncContext(req) { - if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { - return Promise.resolve().then(${arrow ? "() =>" : "function()"} { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - }); - } - - var ids = map[req], id = ids[0]; - return ${requestPrefix}.then(${arrow ? "() =>" : "function()"} { - ${returnModuleObject} - }); -}`; - - return `var map = ${JSON.stringify(map, null, "\t")}; -${webpackAsyncContext} -webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( - "Object.keys(map)" - )}; -webpackAsyncContext.id = ${JSON.stringify(id)}; -module.exports = webpackAsyncContext;`; - } - - getSourceForEmptyContext(id, runtimeTemplate) { - return `function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; -} -webpackEmptyContext.keys = ${runtimeTemplate.returningFunction("[]")}; -webpackEmptyContext.resolve = webpackEmptyContext; -webpackEmptyContext.id = ${JSON.stringify(id)}; -module.exports = webpackEmptyContext;`; - } - - getSourceForEmptyAsyncContext(id, runtimeTemplate) { - const arrow = runtimeTemplate.supportsArrowFunction(); - return `function webpackEmptyAsyncContext(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncaught exception popping up in devtools - return Promise.resolve().then(${arrow ? "() =>" : "function()"} { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - }); -} -webpackEmptyAsyncContext.keys = ${runtimeTemplate.returningFunction("[]")}; -webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; -webpackEmptyAsyncContext.id = ${JSON.stringify(id)}; -module.exports = webpackEmptyAsyncContext;`; - } - - /** - * @param {string} asyncMode module mode - * @param {CodeGenerationContext} context context info - * @returns {string} the source code - */ - getSourceString(asyncMode, { runtimeTemplate, chunkGraph }) { - const id = chunkGraph.getModuleId(this); - if (asyncMode === "lazy") { - if (this.blocks && this.blocks.length > 0) { - return this.getLazySource(this.blocks, id, { - runtimeTemplate, - chunkGraph - }); - } - return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); - } - if (asyncMode === "eager") { - if (this.dependencies && this.dependencies.length > 0) { - return this.getEagerSource(this.dependencies, id, { - chunkGraph, - runtimeTemplate - }); - } - return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); - } - if (asyncMode === "lazy-once") { - const block = this.blocks[0]; - if (block) { - return this.getLazyOnceSource(block, block.dependencies, id, { - runtimeTemplate, - chunkGraph - }); - } - return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); - } - if (asyncMode === "async-weak") { - if (this.dependencies && this.dependencies.length > 0) { - return this.getAsyncWeakSource(this.dependencies, id, { - chunkGraph, - runtimeTemplate - }); - } - return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); - } - if (asyncMode === "weak") { - if (this.dependencies && this.dependencies.length > 0) { - return this.getWeakSyncSource(this.dependencies, id, chunkGraph); - } - } - if (this.dependencies && this.dependencies.length > 0) { - return this.getSyncSource(this.dependencies, id, chunkGraph); - } - return this.getSourceForEmptyContext(id, runtimeTemplate); - } - - /** - * @param {string} sourceString source content - * @param {Compilation=} compilation the compilation - * @returns {Source} generated source - */ - getSource(sourceString, compilation) { - if (this.useSourceMap || this.useSimpleSourceMap) { - return new OriginalSource( - sourceString, - `webpack://${makePathsRelative( - (compilation && compilation.compiler.context) || "", - this.identifier(), - compilation && compilation.compiler.root - )}` - ); - } - return new RawSource(sourceString); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - const { chunkGraph, compilation } = context; - const sources = new Map(); - sources.set( - "javascript", - this.getSource( - this.getSourceString(this.options.mode, context), - compilation - ) - ); - const set = new Set(); - const allDeps = - this.dependencies.length > 0 - ? /** @type {ContextElementDependency[]} */ (this.dependencies).slice() - : []; - for (const block of this.blocks) - for (const dep of block.dependencies) - allDeps.push(/** @type {ContextElementDependency} */ (dep)); - set.add(RuntimeGlobals.module); - set.add(RuntimeGlobals.hasOwnProperty); - if (allDeps.length > 0) { - const asyncMode = this.options.mode; - set.add(RuntimeGlobals.require); - if (asyncMode === "weak") { - set.add(RuntimeGlobals.moduleFactories); - } else if (asyncMode === "async-weak") { - set.add(RuntimeGlobals.moduleFactories); - set.add(RuntimeGlobals.ensureChunk); - } else if (asyncMode === "lazy" || asyncMode === "lazy-once") { - set.add(RuntimeGlobals.ensureChunk); - } - if (this.getFakeMap(allDeps, chunkGraph) !== 9) { - set.add(RuntimeGlobals.createFakeNamespaceObject); - } - } - return { - sources, - runtimeRequirements: set - }; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - // base penalty - let size = 160; - - // if we don't have dependencies we stop here. - for (const dependency of this.dependencies) { - const element = /** @type {ContextElementDependency} */ (dependency); - size += 5 + element.userRequest.length; - } - return size; - } - - serialize(context) { - const { write } = context; - write(this._identifier); - write(this._forceBuild); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this._identifier = read(); - this._forceBuild = read(); - super.deserialize(context); - } -} - -makeSerializable(ContextModule, "webpack/lib/ContextModule"); - -module.exports = ContextModule; - - -/***/ }), - -/***/ 5444: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const { AsyncSeriesWaterfallHook, SyncWaterfallHook } = __webpack_require__(44217); -const ContextModule = __webpack_require__(49994); -const ModuleFactory = __webpack_require__(39744); -const ContextElementDependency = __webpack_require__(34192); -const LazySet = __webpack_require__(96522); -const { cachedSetProperty } = __webpack_require__(22093); -const { createFakeHook } = __webpack_require__(99321); -const { join } = __webpack_require__(47077); - -/** @typedef {import("./ContextModule").ContextModuleOptions} ContextModuleOptions */ -/** @typedef {import("./ContextModule").ResolveDependenciesCallback} ResolveDependenciesCallback */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./ResolverFactory")} ResolverFactory */ -/** @typedef {import("./dependencies/ContextDependency")} ContextDependency */ -/** @template T @typedef {import("./util/deprecation").FakeHook} FakeHook */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const EMPTY_RESOLVE_OPTIONS = {}; - -module.exports = class ContextModuleFactory extends ModuleFactory { - /** - * @param {ResolverFactory} resolverFactory resolverFactory - */ - constructor(resolverFactory) { - super(); - /** @type {AsyncSeriesWaterfallHook<[TODO[], ContextModuleOptions]>} */ - const alternativeRequests = new AsyncSeriesWaterfallHook([ - "modules", - "options" - ]); - this.hooks = Object.freeze({ - /** @type {AsyncSeriesWaterfallHook<[TODO]>} */ - beforeResolve: new AsyncSeriesWaterfallHook(["data"]), - /** @type {AsyncSeriesWaterfallHook<[TODO]>} */ - afterResolve: new AsyncSeriesWaterfallHook(["data"]), - /** @type {SyncWaterfallHook<[string[]]>} */ - contextModuleFiles: new SyncWaterfallHook(["files"]), - /** @type {FakeHook, "tap" | "tapAsync" | "tapPromise" | "name">>} */ - alternatives: createFakeHook( - { - name: "alternatives", - /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["intercept"]} */ - intercept: interceptor => { - throw new Error( - "Intercepting fake hook ContextModuleFactory.hooks.alternatives is not possible, use ContextModuleFactory.hooks.alternativeRequests instead" - ); - }, - /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tap"]} */ - tap: (options, fn) => { - alternativeRequests.tap(options, fn); - }, - /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tapAsync"]} */ - tapAsync: (options, fn) => { - alternativeRequests.tapAsync(options, (items, _options, callback) => - fn(items, callback) - ); - }, - /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tapPromise"]} */ - tapPromise: (options, fn) => { - alternativeRequests.tapPromise(options, fn); - } - }, - "ContextModuleFactory.hooks.alternatives has deprecated in favor of ContextModuleFactory.hooks.alternativeRequests with an additional options argument.", - "DEP_WEBPACK_CONTEXT_MODULE_FACTORY_ALTERNATIVES" - ), - alternativeRequests - }); - this.resolverFactory = resolverFactory; - } - - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const context = data.context; - const dependencies = data.dependencies; - const resolveOptions = data.resolveOptions; - const dependency = /** @type {ContextDependency} */ (dependencies[0]); - const fileDependencies = new LazySet(); - const missingDependencies = new LazySet(); - const contextDependencies = new LazySet(); - this.hooks.beforeResolve.callAsync( - { - context: context, - dependencies: dependencies, - resolveOptions, - fileDependencies, - missingDependencies, - contextDependencies, - ...dependency.options - }, - (err, beforeResolveResult) => { - if (err) { - return callback(err, { - fileDependencies, - missingDependencies, - contextDependencies - }); - } - - // Ignored - if (!beforeResolveResult) { - return callback(null, { - fileDependencies, - missingDependencies, - contextDependencies - }); - } - - const context = beforeResolveResult.context; - const request = beforeResolveResult.request; - const resolveOptions = beforeResolveResult.resolveOptions; - - let loaders, - resource, - loadersPrefix = ""; - const idx = request.lastIndexOf("!"); - if (idx >= 0) { - let loadersRequest = request.slice(0, idx + 1); - let i; - for ( - i = 0; - i < loadersRequest.length && loadersRequest[i] === "!"; - i++ - ) { - loadersPrefix += "!"; - } - loadersRequest = loadersRequest - .slice(i) - .replace(/!+$/, "") - .replace(/!!+/g, "!"); - if (loadersRequest === "") { - loaders = []; - } else { - loaders = loadersRequest.split("!"); - } - resource = request.slice(idx + 1); - } else { - loaders = []; - resource = request; - } - - const contextResolver = this.resolverFactory.get( - "context", - dependencies.length > 0 - ? cachedSetProperty( - resolveOptions || EMPTY_RESOLVE_OPTIONS, - "dependencyType", - dependencies[0].category - ) - : resolveOptions - ); - const loaderResolver = this.resolverFactory.get("loader"); - - asyncLib.parallel( - [ - callback => { - const results = []; - const yield_ = obj => results.push(obj); - - contextResolver.resolve( - {}, - context, - resource, - { - fileDependencies, - missingDependencies, - contextDependencies, - yield: yield_ - }, - err => { - if (err) return callback(err); - callback(null, results); - } - ); - }, - callback => { - asyncLib.map( - loaders, - (loader, callback) => { - loaderResolver.resolve( - {}, - context, - loader, - { - fileDependencies, - missingDependencies, - contextDependencies - }, - (err, result) => { - if (err) return callback(err); - callback(null, result); - } - ); - }, - callback - ); - } - ], - (err, result) => { - if (err) { - return callback(err, { - fileDependencies, - missingDependencies, - contextDependencies - }); - } - let [contextResult, loaderResult] = result; - if (contextResult.length > 1) { - const first = contextResult[0]; - contextResult = contextResult.filter(r => r.path); - if (contextResult.length === 0) contextResult.push(first); - } - this.hooks.afterResolve.callAsync( - { - addon: - loadersPrefix + - loaderResult.join("!") + - (loaderResult.length > 0 ? "!" : ""), - resource: - contextResult.length > 1 - ? contextResult.map(r => r.path) - : contextResult[0].path, - resolveDependencies: this.resolveDependencies.bind(this), - resourceQuery: contextResult[0].query, - resourceFragment: contextResult[0].fragment, - ...beforeResolveResult - }, - (err, result) => { - if (err) { - return callback(err, { - fileDependencies, - missingDependencies, - contextDependencies - }); - } - - // Ignored - if (!result) { - return callback(null, { - fileDependencies, - missingDependencies, - contextDependencies - }); - } - - return callback(null, { - module: new ContextModule(result.resolveDependencies, result), - fileDependencies, - missingDependencies, - contextDependencies - }); - } - ); - } - ); - } - ); - } - - /** - * @param {InputFileSystem} fs file system - * @param {ContextModuleOptions} options options - * @param {ResolveDependenciesCallback} callback callback function - * @returns {void} - */ - resolveDependencies(fs, options, callback) { - const cmf = this; - const { - resource, - resourceQuery, - resourceFragment, - recursive, - regExp, - include, - exclude, - referencedExports, - category, - typePrefix - } = options; - if (!regExp || !resource) return callback(null, []); - - const addDirectoryChecked = (ctx, directory, visited, callback) => { - fs.realpath(directory, (err, realPath) => { - if (err) return callback(err); - if (visited.has(realPath)) return callback(null, []); - let recursionStack; - addDirectory( - ctx, - directory, - (_, dir, callback) => { - if (recursionStack === undefined) { - recursionStack = new Set(visited); - recursionStack.add(realPath); - } - addDirectoryChecked(ctx, dir, recursionStack, callback); - }, - callback - ); - }); - }; - - const addDirectory = (ctx, directory, addSubDirectory, callback) => { - fs.readdir(directory, (err, files) => { - if (err) return callback(err); - const processedFiles = cmf.hooks.contextModuleFiles.call( - /** @type {string[]} */ (files).map(file => file.normalize("NFC")) - ); - if (!processedFiles || processedFiles.length === 0) - return callback(null, []); - asyncLib.map( - processedFiles.filter(p => p.indexOf(".") !== 0), - (segment, callback) => { - const subResource = join(fs, directory, segment); - - if (!exclude || !subResource.match(exclude)) { - fs.stat(subResource, (err, stat) => { - if (err) { - if (err.code === "ENOENT") { - // ENOENT is ok here because the file may have been deleted between - // the readdir and stat calls. - return callback(); - } else { - return callback(err); - } - } - - if (stat.isDirectory()) { - if (!recursive) return callback(); - addSubDirectory(ctx, subResource, callback); - } else if ( - stat.isFile() && - (!include || subResource.match(include)) - ) { - const obj = { - context: ctx, - request: - "." + subResource.slice(ctx.length).replace(/\\/g, "/") - }; - - this.hooks.alternativeRequests.callAsync( - [obj], - options, - (err, alternatives) => { - if (err) return callback(err); - alternatives = alternatives - .filter(obj => regExp.test(obj.request)) - .map(obj => { - const dep = new ContextElementDependency( - `${obj.request}${resourceQuery}${resourceFragment}`, - obj.request, - typePrefix, - category, - referencedExports, - obj.context - ); - dep.optional = true; - return dep; - }); - callback(null, alternatives); - } - ); - } else { - callback(); - } - }); - } else { - callback(); - } - }, - (err, result) => { - if (err) return callback(err); - - if (!result) return callback(null, []); - - const flattenedResult = []; - - for (const item of result) { - if (item) flattenedResult.push(...item); - } - - callback(null, flattenedResult); - } - ); - }); - }; - - const addSubDirectory = (ctx, dir, callback) => - addDirectory(ctx, dir, addSubDirectory, callback); - - const visitResource = (resource, callback) => { - if (typeof fs.realpath === "function") { - addDirectoryChecked(resource, resource, new Set(), callback); - } else { - addDirectory(resource, resource, addSubDirectory, callback); - } - }; - - if (typeof resource === "string") { - visitResource(resource, callback); - } else { - asyncLib.map(resource, visitResource, (err, result) => { - if (err) return callback(err); - - // result dependencies should have unique userRequest - // ordered by resolve result - const temp = new Set(); - const res = []; - for (let i = 0; i < result.length; i++) { - const inner = result[i]; - for (const el of inner) { - if (temp.has(el.userRequest)) continue; - res.push(el); - temp.add(el.userRequest); - } - } - callback(null, res); - }); - } - } -}; - - -/***/ }), - -/***/ 31705: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ContextElementDependency = __webpack_require__(34192); -const { join } = __webpack_require__(47077); - -class ContextReplacementPlugin { - constructor( - resourceRegExp, - newContentResource, - newContentRecursive, - newContentRegExp - ) { - this.resourceRegExp = resourceRegExp; - - if (typeof newContentResource === "function") { - this.newContentCallback = newContentResource; - } else if ( - typeof newContentResource === "string" && - typeof newContentRecursive === "object" - ) { - this.newContentResource = newContentResource; - this.newContentCreateContextMap = (fs, callback) => { - callback(null, newContentRecursive); - }; - } else if ( - typeof newContentResource === "string" && - typeof newContentRecursive === "function" - ) { - this.newContentResource = newContentResource; - this.newContentCreateContextMap = newContentRecursive; - } else { - if (typeof newContentResource !== "string") { - newContentRegExp = newContentRecursive; - newContentRecursive = newContentResource; - newContentResource = undefined; - } - if (typeof newContentRecursive !== "boolean") { - newContentRegExp = newContentRecursive; - newContentRecursive = undefined; - } - this.newContentResource = newContentResource; - this.newContentRecursive = newContentRecursive; - this.newContentRegExp = newContentRegExp; - } - } - - apply(compiler) { - const resourceRegExp = this.resourceRegExp; - const newContentCallback = this.newContentCallback; - const newContentResource = this.newContentResource; - const newContentRecursive = this.newContentRecursive; - const newContentRegExp = this.newContentRegExp; - const newContentCreateContextMap = this.newContentCreateContextMap; - - compiler.hooks.contextModuleFactory.tap("ContextReplacementPlugin", cmf => { - cmf.hooks.beforeResolve.tap("ContextReplacementPlugin", result => { - if (!result) return; - if (resourceRegExp.test(result.request)) { - if (newContentResource !== undefined) { - result.request = newContentResource; - } - if (newContentRecursive !== undefined) { - result.recursive = newContentRecursive; - } - if (newContentRegExp !== undefined) { - result.regExp = newContentRegExp; - } - if (typeof newContentCallback === "function") { - newContentCallback(result); - } else { - for (const d of result.dependencies) { - if (d.critical) d.critical = false; - } - } - } - return result; - }); - cmf.hooks.afterResolve.tap("ContextReplacementPlugin", result => { - if (!result) return; - if (resourceRegExp.test(result.resource)) { - if (newContentResource !== undefined) { - if ( - newContentResource.startsWith("/") || - (newContentResource.length > 1 && newContentResource[1] === ":") - ) { - result.resource = newContentResource; - } else { - result.resource = join( - compiler.inputFileSystem, - result.resource, - newContentResource - ); - } - } - if (newContentRecursive !== undefined) { - result.recursive = newContentRecursive; - } - if (newContentRegExp !== undefined) { - result.regExp = newContentRegExp; - } - if (typeof newContentCreateContextMap === "function") { - result.resolveDependencies = - createResolveDependenciesFromContextMap( - newContentCreateContextMap - ); - } - if (typeof newContentCallback === "function") { - const origResource = result.resource; - newContentCallback(result); - if ( - result.resource !== origResource && - !result.resource.startsWith("/") && - (result.resource.length <= 1 || result.resource[1] !== ":") - ) { - // When the function changed it to an relative path - result.resource = join( - compiler.inputFileSystem, - origResource, - result.resource - ); - } - } else { - for (const d of result.dependencies) { - if (d.critical) d.critical = false; - } - } - } - return result; - }); - }); - } -} - -const createResolveDependenciesFromContextMap = createContextMap => { - const resolveDependenciesFromContextMap = (fs, options, callback) => { - createContextMap(fs, (err, map) => { - if (err) return callback(err); - const dependencies = Object.keys(map).map(key => { - return new ContextElementDependency( - map[key] + options.resourceQuery + options.resourceFragment, - key, - options.category, - options.referencedExports - ); - }); - callback(null, dependencies); - }); - }; - return resolveDependenciesFromContextMap; -}; - -module.exports = ContextReplacementPlugin; - - -/***/ }), - -/***/ 5354: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const WebpackError = __webpack_require__(27154); -const ConstDependency = __webpack_require__(14367); -const BasicEvaluatedExpression = __webpack_require__(94844); -const { - evaluateToString, - toConstantDependency -} = __webpack_require__(97574); -const createHash = __webpack_require__(85205); - -/** @typedef {import("estree").Expression} Expression */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./NormalModule")} NormalModule */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -/** @typedef {null|undefined|RegExp|Function|string|number|boolean|bigint|undefined} CodeValuePrimitive */ -/** @typedef {RecursiveArrayOrRecord} CodeValue */ - -/** - * @typedef {Object} RuntimeValueOptions - * @property {string[]=} fileDependencies - * @property {string[]=} contextDependencies - * @property {string[]=} missingDependencies - * @property {string[]=} buildDependencies - * @property {string|function(): string=} version - */ - -class RuntimeValue { - /** - * @param {function({ module: NormalModule, key: string, readonly version: string | undefined }): CodeValuePrimitive} fn generator function - * @param {true | string[] | RuntimeValueOptions=} options options - */ - constructor(fn, options) { - this.fn = fn; - if (Array.isArray(options)) { - options = { - fileDependencies: options - }; - } - this.options = options || {}; - } - - get fileDependencies() { - return this.options === true ? true : this.options.fileDependencies; - } - - /** - * @param {JavascriptParser} parser the parser - * @param {Map>} valueCacheVersions valueCacheVersions - * @param {string} key the defined key - * @returns {CodeValuePrimitive} code - */ - exec(parser, valueCacheVersions, key) { - const buildInfo = parser.state.module.buildInfo; - if (this.options === true) { - buildInfo.cacheable = false; - } else { - if (this.options.fileDependencies) { - for (const dep of this.options.fileDependencies) { - buildInfo.fileDependencies.add(dep); - } - } - if (this.options.contextDependencies) { - for (const dep of this.options.contextDependencies) { - buildInfo.contextDependencies.add(dep); - } - } - if (this.options.missingDependencies) { - for (const dep of this.options.missingDependencies) { - buildInfo.missingDependencies.add(dep); - } - } - if (this.options.buildDependencies) { - for (const dep of this.options.buildDependencies) { - buildInfo.buildDependencies.add(dep); - } - } - } - - return this.fn({ - module: parser.state.module, - key, - get version() { - return /** @type {string} */ ( - valueCacheVersions.get(VALUE_DEP_PREFIX + key) - ); - } - }); - } - - getCacheVersion() { - return this.options === true - ? undefined - : (typeof this.options.version === "function" - ? this.options.version() - : this.options.version) || "unset"; - } -} - -/** - * @param {any[]|{[k: string]: any}} obj obj - * @param {JavascriptParser} parser Parser - * @param {Map>} valueCacheVersions valueCacheVersions - * @param {string} key the defined key - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {boolean|undefined|null=} asiSafe asi safe (undefined: unknown, null: unneeded) - * @returns {string} code converted to string that evaluates - */ -const stringifyObj = ( - obj, - parser, - valueCacheVersions, - key, - runtimeTemplate, - asiSafe -) => { - let code; - let arr = Array.isArray(obj); - if (arr) { - code = `[${obj - .map(code => - toCode(code, parser, valueCacheVersions, key, runtimeTemplate, null) - ) - .join(",")}]`; - } else { - code = `{${Object.keys(obj) - .map(key => { - const code = obj[key]; - return ( - JSON.stringify(key) + - ":" + - toCode(code, parser, valueCacheVersions, key, runtimeTemplate, null) - ); - }) - .join(",")}}`; - } - - switch (asiSafe) { - case null: - return code; - case true: - return arr ? code : `(${code})`; - case false: - return arr ? `;${code}` : `;(${code})`; - default: - return `/*#__PURE__*/Object(${code})`; - } -}; - -/** - * Convert code to a string that evaluates - * @param {CodeValue} code Code to evaluate - * @param {JavascriptParser} parser Parser - * @param {Map>} valueCacheVersions valueCacheVersions - * @param {string} key the defined key - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {boolean|undefined|null=} asiSafe asi safe (undefined: unknown, null: unneeded) - * @returns {string} code converted to string that evaluates - */ -const toCode = ( - code, - parser, - valueCacheVersions, - key, - runtimeTemplate, - asiSafe -) => { - if (code === null) { - return "null"; - } - if (code === undefined) { - return "undefined"; - } - if (Object.is(code, -0)) { - return "-0"; - } - if (code instanceof RuntimeValue) { - return toCode( - code.exec(parser, valueCacheVersions, key), - parser, - valueCacheVersions, - key, - runtimeTemplate, - asiSafe - ); - } - if (code instanceof RegExp && code.toString) { - return code.toString(); - } - if (typeof code === "function" && code.toString) { - return "(" + code.toString() + ")"; - } - if (typeof code === "object") { - return stringifyObj( - code, - parser, - valueCacheVersions, - key, - runtimeTemplate, - asiSafe - ); - } - if (typeof code === "bigint") { - return runtimeTemplate.supportsBigIntLiteral() - ? `${code}n` - : `BigInt("${code}")`; - } - return code + ""; -}; - -const toCacheVersion = code => { - if (code === null) { - return "null"; - } - if (code === undefined) { - return "undefined"; - } - if (Object.is(code, -0)) { - return "-0"; - } - if (code instanceof RuntimeValue) { - return code.getCacheVersion(); - } - if (code instanceof RegExp && code.toString) { - return code.toString(); - } - if (typeof code === "function" && code.toString) { - return "(" + code.toString() + ")"; - } - if (typeof code === "object") { - const items = Object.keys(code).map(key => ({ - key, - value: toCacheVersion(code[key]) - })); - if (items.some(({ value }) => value === undefined)) return undefined; - return `{${items.map(({ key, value }) => `${key}: ${value}`).join(", ")}}`; - } - if (typeof code === "bigint") { - return `${code}n`; - } - return code + ""; -}; - -const VALUE_DEP_PREFIX = "webpack/DefinePlugin "; -const VALUE_DEP_MAIN = "webpack/DefinePlugin_hash"; - -class DefinePlugin { - /** - * Create a new define plugin - * @param {Record} definitions A map of global object definitions - */ - constructor(definitions) { - this.definitions = definitions; - } - - /** - * @param {function({ module: NormalModule, key: string, readonly version: string | undefined }): CodeValuePrimitive} fn generator function - * @param {true | string[] | RuntimeValueOptions=} options options - * @returns {RuntimeValue} runtime value - */ - static runtimeValue(fn, options) { - return new RuntimeValue(fn, options); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const definitions = this.definitions; - compiler.hooks.compilation.tap( - "DefinePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - const { runtimeTemplate } = compilation; - - const mainHash = createHash(compilation.outputOptions.hashFunction); - mainHash.update( - /** @type {string} */ ( - compilation.valueCacheVersions.get(VALUE_DEP_MAIN) - ) || "" - ); - - /** - * Handler - * @param {JavascriptParser} parser Parser - * @returns {void} - */ - const handler = parser => { - const mainValue = compilation.valueCacheVersions.get(VALUE_DEP_MAIN); - parser.hooks.program.tap("DefinePlugin", () => { - const { buildInfo } = parser.state.module; - if (!buildInfo.valueDependencies) - buildInfo.valueDependencies = new Map(); - buildInfo.valueDependencies.set(VALUE_DEP_MAIN, mainValue); - }); - - const addValueDependency = key => { - const { buildInfo } = parser.state.module; - buildInfo.valueDependencies.set( - VALUE_DEP_PREFIX + key, - compilation.valueCacheVersions.get(VALUE_DEP_PREFIX + key) - ); - }; - - const withValueDependency = - (key, fn) => - (...args) => { - addValueDependency(key); - return fn(...args); - }; - - /** - * Walk definitions - * @param {Object} definitions Definitions map - * @param {string} prefix Prefix string - * @returns {void} - */ - const walkDefinitions = (definitions, prefix) => { - Object.keys(definitions).forEach(key => { - const code = definitions[key]; - if ( - code && - typeof code === "object" && - !(code instanceof RuntimeValue) && - !(code instanceof RegExp) - ) { - walkDefinitions(code, prefix + key + "."); - applyObjectDefine(prefix + key, code); - return; - } - applyDefineKey(prefix, key); - applyDefine(prefix + key, code); - }); - }; - - /** - * Apply define key - * @param {string} prefix Prefix - * @param {string} key Key - * @returns {void} - */ - const applyDefineKey = (prefix, key) => { - const splittedKey = key.split("."); - splittedKey.slice(1).forEach((_, i) => { - const fullKey = prefix + splittedKey.slice(0, i + 1).join("."); - parser.hooks.canRename.for(fullKey).tap("DefinePlugin", () => { - addValueDependency(key); - return true; - }); - }); - }; - - /** - * Apply Code - * @param {string} key Key - * @param {CodeValue} code Code - * @returns {void} - */ - const applyDefine = (key, code) => { - const originalKey = key; - const isTypeof = /^typeof\s+/.test(key); - if (isTypeof) key = key.replace(/^typeof\s+/, ""); - let recurse = false; - let recurseTypeof = false; - if (!isTypeof) { - parser.hooks.canRename.for(key).tap("DefinePlugin", () => { - addValueDependency(originalKey); - return true; - }); - parser.hooks.evaluateIdentifier - .for(key) - .tap("DefinePlugin", expr => { - /** - * this is needed in case there is a recursion in the DefinePlugin - * to prevent an endless recursion - * e.g.: new DefinePlugin({ - * "a": "b", - * "b": "a" - * }); - */ - if (recurse) return; - addValueDependency(originalKey); - recurse = true; - const res = parser.evaluate( - toCode( - code, - parser, - compilation.valueCacheVersions, - key, - runtimeTemplate, - null - ) - ); - recurse = false; - res.setRange(expr.range); - return res; - }); - parser.hooks.expression.for(key).tap("DefinePlugin", expr => { - addValueDependency(originalKey); - const strCode = toCode( - code, - parser, - compilation.valueCacheVersions, - originalKey, - runtimeTemplate, - !parser.isAsiPosition(expr.range[0]) - ); - if (/__webpack_require__\s*(!?\.)/.test(strCode)) { - return toConstantDependency(parser, strCode, [ - RuntimeGlobals.require - ])(expr); - } else if (/__webpack_require__/.test(strCode)) { - return toConstantDependency(parser, strCode, [ - RuntimeGlobals.requireScope - ])(expr); - } else { - return toConstantDependency(parser, strCode)(expr); - } - }); - } - parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { - /** - * this is needed in case there is a recursion in the DefinePlugin - * to prevent an endless recursion - * e.g.: new DefinePlugin({ - * "typeof a": "typeof b", - * "typeof b": "typeof a" - * }); - */ - if (recurseTypeof) return; - recurseTypeof = true; - addValueDependency(originalKey); - const codeCode = toCode( - code, - parser, - compilation.valueCacheVersions, - originalKey, - runtimeTemplate, - null - ); - const typeofCode = isTypeof - ? codeCode - : "typeof (" + codeCode + ")"; - const res = parser.evaluate(typeofCode); - recurseTypeof = false; - res.setRange(expr.range); - return res; - }); - parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { - addValueDependency(originalKey); - const codeCode = toCode( - code, - parser, - compilation.valueCacheVersions, - originalKey, - runtimeTemplate, - null - ); - const typeofCode = isTypeof - ? codeCode - : "typeof (" + codeCode + ")"; - const res = parser.evaluate(typeofCode); - if (!res.isString()) return; - return toConstantDependency( - parser, - JSON.stringify(res.string) - ).bind(parser)(expr); - }); - }; - - /** - * Apply Object - * @param {string} key Key - * @param {Object} obj Object - * @returns {void} - */ - const applyObjectDefine = (key, obj) => { - parser.hooks.canRename.for(key).tap("DefinePlugin", () => { - addValueDependency(key); - return true; - }); - parser.hooks.evaluateIdentifier - .for(key) - .tap("DefinePlugin", expr => { - addValueDependency(key); - return new BasicEvaluatedExpression() - .setTruthy() - .setSideEffects(false) - .setRange(expr.range); - }); - parser.hooks.evaluateTypeof - .for(key) - .tap( - "DefinePlugin", - withValueDependency(key, evaluateToString("object")) - ); - parser.hooks.expression.for(key).tap("DefinePlugin", expr => { - addValueDependency(key); - const strCode = stringifyObj( - obj, - parser, - compilation.valueCacheVersions, - key, - runtimeTemplate, - !parser.isAsiPosition(expr.range[0]) - ); - - if (/__webpack_require__\s*(!?\.)/.test(strCode)) { - return toConstantDependency(parser, strCode, [ - RuntimeGlobals.require - ])(expr); - } else if (/__webpack_require__/.test(strCode)) { - return toConstantDependency(parser, strCode, [ - RuntimeGlobals.requireScope - ])(expr); - } else { - return toConstantDependency(parser, strCode)(expr); - } - }); - parser.hooks.typeof - .for(key) - .tap( - "DefinePlugin", - withValueDependency( - key, - toConstantDependency(parser, JSON.stringify("object")) - ) - ); - }; - - walkDefinitions(definitions, ""); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("DefinePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("DefinePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("DefinePlugin", handler); - - /** - * Walk definitions - * @param {Object} definitions Definitions map - * @param {string} prefix Prefix string - * @returns {void} - */ - const walkDefinitionsForValues = (definitions, prefix) => { - Object.keys(definitions).forEach(key => { - const code = definitions[key]; - const version = toCacheVersion(code); - const name = VALUE_DEP_PREFIX + prefix + key; - mainHash.update("|" + prefix + key); - const oldVersion = compilation.valueCacheVersions.get(name); - if (oldVersion === undefined) { - compilation.valueCacheVersions.set(name, version); - } else if (oldVersion !== version) { - const warning = new WebpackError( - `DefinePlugin\nConflicting values for '${prefix + key}'` - ); - warning.details = `'${oldVersion}' !== '${version}'`; - warning.hideStack = true; - compilation.warnings.push(warning); - } - if ( - code && - typeof code === "object" && - !(code instanceof RuntimeValue) && - !(code instanceof RegExp) - ) { - walkDefinitionsForValues(code, prefix + key + "."); - } - }); - }; - - walkDefinitionsForValues(definitions, ""); - - compilation.valueCacheVersions.set( - VALUE_DEP_MAIN, - /** @type {string} */ (mainHash.digest("hex").slice(0, 8)) - ); - } - ); - } -} -module.exports = DefinePlugin; - - -/***/ }), - -/***/ 18481: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { OriginalSource, RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const DelegatedSourceDependency = __webpack_require__(70688); -const StaticExportsDependency = __webpack_require__(19383); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./LibManifestPlugin").ManifestModuleData} ManifestModuleData */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./Module").SourceContext} SourceContext */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["javascript"]); -const RUNTIME_REQUIREMENTS = new Set([ - RuntimeGlobals.module, - RuntimeGlobals.require -]); - -class DelegatedModule extends Module { - constructor(sourceRequest, data, type, userRequest, originalRequest) { - super("javascript/dynamic", null); - - // Info from Factory - this.sourceRequest = sourceRequest; - this.request = data.id; - this.delegationType = type; - this.userRequest = userRequest; - this.originalRequest = originalRequest; - /** @type {ManifestModuleData} */ - this.delegateData = data; - - // Build info - this.delegatedSourceDependency = undefined; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return typeof this.originalRequest === "string" - ? this.originalRequest - : this.originalRequest.libIdent(options); - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `delegated ${JSON.stringify(this.request)} from ${ - this.sourceRequest - }`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `delegated ${this.userRequest} from ${this.sourceRequest}`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = { ...this.delegateData.buildMeta }; - this.buildInfo = {}; - this.dependencies.length = 0; - this.delegatedSourceDependency = new DelegatedSourceDependency( - this.sourceRequest - ); - this.addDependency(this.delegatedSourceDependency); - this.addDependency( - new StaticExportsDependency(this.delegateData.exports || true, false) - ); - callback(); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { - const dep = /** @type {DelegatedSourceDependency} */ (this.dependencies[0]); - const sourceModule = moduleGraph.getModule(dep); - let str; - - if (!sourceModule) { - str = runtimeTemplate.throwMissingModuleErrorBlock({ - request: this.sourceRequest - }); - } else { - str = `module.exports = (${runtimeTemplate.moduleExports({ - module: sourceModule, - chunkGraph, - request: dep.request, - runtimeRequirements: new Set() - })})`; - - switch (this.delegationType) { - case "require": - str += `(${JSON.stringify(this.request)})`; - break; - case "object": - str += `[${JSON.stringify(this.request)}]`; - break; - } - - str += ";"; - } - - const sources = new Map(); - if (this.useSourceMap || this.useSimpleSourceMap) { - sources.set("javascript", new OriginalSource(str, this.identifier())); - } else { - sources.set("javascript", new RawSource(str)); - } - - return { - sources, - runtimeRequirements: RUNTIME_REQUIREMENTS - }; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 42; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(this.delegationType); - hash.update(JSON.stringify(this.request)); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - // constructor - write(this.sourceRequest); - write(this.delegateData); - write(this.delegationType); - write(this.userRequest); - write(this.originalRequest); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new DelegatedModule( - read(), // sourceRequest - read(), // delegateData - read(), // delegationType - read(), // userRequest - read() // originalRequest - ); - obj.deserialize(context); - return obj; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - super.updateCacheModule(module); - const m = /** @type {DelegatedModule} */ (module); - this.delegationType = m.delegationType; - this.userRequest = m.userRequest; - this.originalRequest = m.originalRequest; - this.delegateData = m.delegateData; - } - - /** - * Assuming this module is in the cache. Remove internal references to allow freeing some memory. - */ - cleanupForCache() { - super.cleanupForCache(); - this.delegateData = undefined; - } -} - -makeSerializable(DelegatedModule, "webpack/lib/DelegatedModule"); - -module.exports = DelegatedModule; - - -/***/ }), - -/***/ 33897: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DelegatedModule = __webpack_require__(18481); - -// options.source -// options.type -// options.context -// options.scope -// options.content -// options.associatedObjectForCache -class DelegatedModuleFactoryPlugin { - constructor(options) { - this.options = options; - options.type = options.type || "require"; - options.extensions = options.extensions || ["", ".js", ".json", ".wasm"]; - } - - apply(normalModuleFactory) { - const scope = this.options.scope; - if (scope) { - normalModuleFactory.hooks.factorize.tapAsync( - "DelegatedModuleFactoryPlugin", - (data, callback) => { - const [dependency] = data.dependencies; - const { request } = dependency; - if (request && request.startsWith(`${scope}/`)) { - const innerRequest = "." + request.slice(scope.length); - let resolved; - if (innerRequest in this.options.content) { - resolved = this.options.content[innerRequest]; - return callback( - null, - new DelegatedModule( - this.options.source, - resolved, - this.options.type, - innerRequest, - request - ) - ); - } - for (let i = 0; i < this.options.extensions.length; i++) { - const extension = this.options.extensions[i]; - const requestPlusExt = innerRequest + extension; - if (requestPlusExt in this.options.content) { - resolved = this.options.content[requestPlusExt]; - return callback( - null, - new DelegatedModule( - this.options.source, - resolved, - this.options.type, - requestPlusExt, - request + extension - ) - ); - } - } - } - return callback(); - } - ); - } else { - normalModuleFactory.hooks.module.tap( - "DelegatedModuleFactoryPlugin", - module => { - const request = module.libIdent(this.options); - if (request) { - if (request in this.options.content) { - const resolved = this.options.content[request]; - return new DelegatedModule( - this.options.source, - resolved, - this.options.type, - request, - module - ); - } - } - return module; - } - ); - } - } -} -module.exports = DelegatedModuleFactoryPlugin; - - -/***/ }), - -/***/ 82059: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DelegatedModuleFactoryPlugin = __webpack_require__(33897); -const DelegatedSourceDependency = __webpack_require__(70688); - -/** @typedef {import("./Compiler")} Compiler */ - -class DelegatedPlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "DelegatedPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - DelegatedSourceDependency, - normalModuleFactory - ); - } - ); - - compiler.hooks.compile.tap("DelegatedPlugin", ({ normalModuleFactory }) => { - new DelegatedModuleFactoryPlugin({ - associatedObjectForCache: compiler.root, - ...this.options - }).apply(normalModuleFactory); - }); - } -} - -module.exports = DelegatedPlugin; - - -/***/ }), - -/***/ 82618: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./util/Hash")} Hash */ - -/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ - -class DependenciesBlock { - constructor() { - /** @type {Dependency[]} */ - this.dependencies = []; - /** @type {AsyncDependenciesBlock[]} */ - this.blocks = []; - /** @type {DependenciesBlock} */ - this.parent = undefined; - } - - getRootBlock() { - /** @type {DependenciesBlock} */ - let current = this; - while (current.parent) current = current.parent; - return current; - } - - /** - * Adds a DependencyBlock to DependencyBlock relationship. - * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting) - * - * @param {AsyncDependenciesBlock} block block being added - * @returns {void} - */ - addBlock(block) { - this.blocks.push(block); - block.parent = this; - } - - /** - * @param {Dependency} dependency dependency being tied to block. - * This is an "edge" pointing to another "node" on module graph. - * @returns {void} - */ - addDependency(dependency) { - this.dependencies.push(dependency); - } - - /** - * @param {Dependency} dependency dependency being removed - * @returns {void} - */ - removeDependency(dependency) { - const idx = this.dependencies.indexOf(dependency); - if (idx >= 0) { - this.dependencies.splice(idx, 1); - } - } - - /** - * Removes all dependencies and blocks - * @returns {void} - */ - clearDependenciesAndBlocks() { - this.dependencies.length = 0; - this.blocks.length = 0; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - for (const dep of this.dependencies) { - dep.updateHash(hash, context); - } - for (const block of this.blocks) { - block.updateHash(hash, context); - } - } - - serialize({ write }) { - write(this.dependencies); - write(this.blocks); - } - - deserialize({ read }) { - this.dependencies = read(); - this.blocks = read(); - for (const block of this.blocks) { - block.parent = this; - } - } -} - -makeSerializable(DependenciesBlock, "webpack/lib/DependenciesBlock"); - -module.exports = DependenciesBlock; - - -/***/ }), - -/***/ 87056: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} UpdateHashContext - * @property {ChunkGraph} chunkGraph - * @property {RuntimeSpec} runtime - * @property {RuntimeTemplate=} runtimeTemplate - */ - -/** - * @typedef {Object} SourcePosition - * @property {number} line - * @property {number=} column - */ - -/** - * @typedef {Object} RealDependencyLocation - * @property {SourcePosition} start - * @property {SourcePosition=} end - * @property {number=} index - */ - -/** - * @typedef {Object} SyntheticDependencyLocation - * @property {string} name - * @property {number=} index - */ - -/** @typedef {SyntheticDependencyLocation|RealDependencyLocation} DependencyLocation */ - -/** - * @typedef {Object} ExportSpec - * @property {string} name the name of the export - * @property {boolean=} canMangle can the export be renamed (defaults to true) - * @property {boolean=} terminalBinding is the export a terminal binding that should be checked for export star conflicts - * @property {(string | ExportSpec)[]=} exports nested exports - * @property {ModuleGraphConnection=} from when reexported: from which module - * @property {string[] | null=} export when reexported: from which export - * @property {number=} priority when reexported: with which priority - * @property {boolean=} hidden export is not visible, because another export blends over it - */ - -/** - * @typedef {Object} ExportsSpec - * @property {(string | ExportSpec)[] | true | null} exports exported names, true for unknown exports or null for no exports - * @property {Set=} excludeExports when exports = true, list of unaffected exports - * @property {Set=} hideExports list of maybe prior exposed, but now hidden exports - * @property {ModuleGraphConnection=} from when reexported: from which module - * @property {number=} priority when reexported: with which priority - * @property {boolean=} canMangle can the export be renamed (defaults to true) - * @property {boolean=} terminalBinding are the exports terminal bindings that should be checked for export star conflicts - * @property {Module[]=} dependencies module on which the result depends on - */ - -/** - * @typedef {Object} ReferencedExport - * @property {string[]} name name of the referenced export - * @property {boolean=} canMangle when false, referenced export can not be mangled, defaults to true - */ - -const TRANSITIVE = Symbol("transitive"); - -const getIgnoredModule = memoize(() => { - const RawModule = __webpack_require__(71133); - return new RawModule("/* (ignored) */", `ignored`, `(ignored)`); -}); - -class Dependency { - constructor() { - /** @type {Module} */ - this._parentModule = undefined; - /** @type {DependenciesBlock} */ - this._parentDependenciesBlock = undefined; - /** @type {number} */ - this._parentDependenciesBlockIndex = -1; - // TODO check if this can be moved into ModuleDependency - /** @type {boolean} */ - this.weak = false; - // TODO check if this can be moved into ModuleDependency - /** @type {boolean} */ - this.optional = false; - this._locSL = 0; - this._locSC = 0; - this._locEL = 0; - this._locEC = 0; - this._locI = undefined; - this._locN = undefined; - this._loc = undefined; - } - - /** - * @returns {string} a display name for the type of dependency - */ - get type() { - return "unknown"; - } - - /** - * @returns {string} a dependency category, typical categories are "commonjs", "amd", "esm" - */ - get category() { - return "unknown"; - } - - /** - * @returns {DependencyLocation} location - */ - get loc() { - if (this._loc !== undefined) return this._loc; - /** @type {SyntheticDependencyLocation & RealDependencyLocation} */ - const loc = {}; - if (this._locSL > 0) { - loc.start = { line: this._locSL, column: this._locSC }; - } - if (this._locEL > 0) { - loc.end = { line: this._locEL, column: this._locEC }; - } - if (this._locN !== undefined) { - loc.name = this._locN; - } - if (this._locI !== undefined) { - loc.index = this._locI; - } - return (this._loc = loc); - } - - set loc(loc) { - if ("start" in loc && typeof loc.start === "object") { - this._locSL = loc.start.line || 0; - this._locSC = loc.start.column || 0; - } else { - this._locSL = 0; - this._locSC = 0; - } - if ("end" in loc && typeof loc.end === "object") { - this._locEL = loc.end.line || 0; - this._locEC = loc.end.column || 0; - } else { - this._locEL = 0; - this._locEC = 0; - } - if ("index" in loc) { - this._locI = loc.index; - } else { - this._locI = undefined; - } - if ("name" in loc) { - this._locN = loc.name; - } else { - this._locN = undefined; - } - this._loc = loc; - } - - setLoc(startLine, startColumn, endLine, endColumn) { - this._locSL = startLine; - this._locSC = startColumn; - this._locEL = endLine; - this._locEC = endColumn; - this._locI = undefined; - this._locN = undefined; - this._loc = undefined; - } - - /** - * @returns {string | undefined} a request context - */ - getContext() { - return undefined; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return null; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return TRANSITIVE; - } - - /** - * Returns the referenced module and export - * @deprecated - * @param {ModuleGraph} moduleGraph module graph - * @returns {never} throws error - */ - getReference(moduleGraph) { - throw new Error( - "Dependency.getReference was removed in favor of Dependency.getReferencedExports, ModuleGraph.getModule and ModuleGraph.getConnection().active" - ); - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return Dependency.EXPORTS_OBJECT_REFERENCED; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return null; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - return undefined; - } - - /** - * Returns warnings - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} warnings - */ - getWarnings(moduleGraph) { - return null; - } - - /** - * Returns errors - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} errors - */ - getErrors(moduleGraph) { - return null; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) {} - - /** - * implement this method to allow the occurrence order plugin to count correctly - * @returns {number} count how often the id is used in this dependency - */ - getNumberOfIdOccurrences() { - return 1; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return true; - } - - /** - * @param {string} context context directory - * @returns {Module} a module - */ - createIgnoredModule(context) { - return getIgnoredModule(); - } - - serialize({ write }) { - write(this.weak); - write(this.optional); - write(this._locSL); - write(this._locSC); - write(this._locEL); - write(this._locEC); - write(this._locI); - write(this._locN); - } - - deserialize({ read }) { - this.weak = read(); - this.optional = read(); - this._locSL = read(); - this._locSC = read(); - this._locEL = read(); - this._locEC = read(); - this._locI = read(); - this._locN = read(); - } -} - -/** @type {string[][]} */ -Dependency.NO_EXPORTS_REFERENCED = []; -/** @type {string[][]} */ -Dependency.EXPORTS_OBJECT_REFERENCED = [[]]; - -Object.defineProperty(Dependency.prototype, "module", { - /** - * @deprecated - * @returns {never} throws - */ - get() { - throw new Error( - "module property was removed from Dependency (use compilation.moduleGraph.getModule(dependency) instead)" - ); - }, - - /** - * @deprecated - * @returns {never} throws - */ - set() { - throw new Error( - "module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)" - ); - } -}); - -Object.defineProperty(Dependency.prototype, "disconnect", { - get() { - throw new Error( - "disconnect was removed from Dependency (Dependency no longer carries graph specific information)" - ); - } -}); - -Dependency.TRANSITIVE = TRANSITIVE; - -module.exports = Dependency; - - -/***/ }), - -/***/ 94086: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Dependency").RuntimeSpec} RuntimeSpec */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Generator").GenerateContext} GenerateContext */ -/** @template T @typedef {import("./InitFragment")} InitFragment */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ - -/** - * @typedef {Object} DependencyTemplateContext - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {Set} runtimeRequirements the requirements for runtime - * @property {Module} module current module - * @property {RuntimeSpec} runtime current runtimes, for which code is generated - * @property {InitFragment[]} initFragments mutable array of init fragments for the current module - * @property {ConcatenationScope=} concatenationScope when in a concatenated module, information about other concatenated modules - * @property {CodeGenerationResults} codeGenerationResults the code generation results - */ - -/** - * @typedef {Object} CssDependencyTemplateContextExtras - * @property {Map} cssExports the css exports - */ - -/** @typedef {DependencyTemplateContext & CssDependencyTemplateContextExtras} CssDependencyTemplateContext */ - -class DependencyTemplate { - /* istanbul ignore next */ - /** - * @abstract - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } -} - -module.exports = DependencyTemplate; - - -/***/ }), - -/***/ 97723: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const createHash = __webpack_require__(85205); - -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ -/** @typedef {typeof import("./util/Hash")} Hash */ - -/** @typedef {new (...args: any[]) => Dependency} DependencyConstructor */ - -class DependencyTemplates { - /** - * @param {string | Hash} hashFunction the hash function to use - */ - constructor(hashFunction = "md4") { - /** @type {Map} */ - this._map = new Map(); - /** @type {string} */ - this._hash = "31d6cfe0d16ae931b73c59d7e0c089c0"; - this._hashFunction = hashFunction; - } - - /** - * @param {DependencyConstructor} dependency Constructor of Dependency - * @returns {DependencyTemplate} template for this dependency - */ - get(dependency) { - return this._map.get(dependency); - } - - /** - * @param {DependencyConstructor} dependency Constructor of Dependency - * @param {DependencyTemplate} dependencyTemplate template for this dependency - * @returns {void} - */ - set(dependency, dependencyTemplate) { - this._map.set(dependency, dependencyTemplate); - } - - /** - * @param {string} part additional hash contributor - * @returns {void} - */ - updateHash(part) { - const hash = createHash(this._hashFunction); - hash.update(`${this._hash}${part}`); - this._hash = /** @type {string} */ (hash.digest("hex")); - } - - getHash() { - return this._hash; - } - - clone() { - const newInstance = new DependencyTemplates(this._hashFunction); - newInstance._map = new Map(this._map); - newInstance._hash = this._hash; - return newInstance; - } -} - -module.exports = DependencyTemplates; - - -/***/ }), - -/***/ 51404: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DllModuleFactory = __webpack_require__(61661); -const DllEntryDependency = __webpack_require__(21467); -const EntryDependency = __webpack_require__(17380); - -class DllEntryPlugin { - constructor(context, entries, options) { - this.context = context; - this.entries = entries; - this.options = options; - } - - apply(compiler) { - compiler.hooks.compilation.tap( - "DllEntryPlugin", - (compilation, { normalModuleFactory }) => { - const dllModuleFactory = new DllModuleFactory(); - compilation.dependencyFactories.set( - DllEntryDependency, - dllModuleFactory - ); - compilation.dependencyFactories.set( - EntryDependency, - normalModuleFactory - ); - } - ); - compiler.hooks.make.tapAsync("DllEntryPlugin", (compilation, callback) => { - compilation.addEntry( - this.context, - new DllEntryDependency( - this.entries.map((e, idx) => { - const dep = new EntryDependency(e); - dep.loc = { - name: this.options.name, - index: idx - }; - return dep; - }), - this.options.name - ), - this.options, - callback - ); - }); - } -} - -module.exports = DllEntryPlugin; - - -/***/ }), - -/***/ 28526: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./Module").SourceContext} SourceContext */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["javascript"]); -const RUNTIME_REQUIREMENTS = new Set([ - RuntimeGlobals.require, - RuntimeGlobals.module -]); - -class DllModule extends Module { - constructor(context, dependencies, name) { - super("javascript/dynamic", context); - - // Info from Factory - this.dependencies = dependencies; - this.name = name; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `dll ${this.name}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `dll ${this.name}`; - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = {}; - return callback(); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - const sources = new Map(); - sources.set( - "javascript", - new RawSource("module.exports = __webpack_require__;") - ); - return { - sources, - runtimeRequirements: RUNTIME_REQUIREMENTS - }; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 12; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(`dll module${this.name || ""}`); - super.updateHash(hash, context); - } - - serialize(context) { - context.write(this.name); - super.serialize(context); - } - - deserialize(context) { - this.name = context.read(); - super.deserialize(context); - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - super.updateCacheModule(module); - this.dependencies = module.dependencies; - } - - /** - * Assuming this module is in the cache. Remove internal references to allow freeing some memory. - */ - cleanupForCache() { - super.cleanupForCache(); - this.dependencies = undefined; - } -} - -makeSerializable(DllModule, "webpack/lib/DllModule"); - -module.exports = DllModule; - - -/***/ }), - -/***/ 61661: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DllModule = __webpack_require__(28526); -const ModuleFactory = __webpack_require__(39744); - -/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ - -class DllModuleFactory extends ModuleFactory { - constructor() { - super(); - this.hooks = Object.freeze({}); - } - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const dependency = /** @type {DllEntryDependency} */ (data.dependencies[0]); - callback(null, { - module: new DllModule( - data.context, - dependency.dependencies, - dependency.name - ) - }); - } -} - -module.exports = DllModuleFactory; - - -/***/ }), - -/***/ 89978: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DllEntryPlugin = __webpack_require__(51404); -const FlagAllModulesAsUsedPlugin = __webpack_require__(35922); -const LibManifestPlugin = __webpack_require__(91052); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../declarations/plugins/DllPlugin").DllPluginOptions} DllPluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(51856), - () => __webpack_require__(81419), - { - name: "Dll Plugin", - baseDataPath: "options" - } -); - -class DllPlugin { - /** - * @param {DllPluginOptions} options options object - */ - constructor(options) { - validate(options); - this.options = { - ...options, - entryOnly: options.entryOnly !== false - }; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.entryOption.tap("DllPlugin", (context, entry) => { - if (typeof entry !== "function") { - for (const name of Object.keys(entry)) { - const options = { - name, - filename: entry.filename - }; - new DllEntryPlugin(context, entry[name].import, options).apply( - compiler - ); - } - } else { - throw new Error( - "DllPlugin doesn't support dynamic entry (function) yet" - ); - } - return true; - }); - new LibManifestPlugin(this.options).apply(compiler); - if (!this.options.entryOnly) { - new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler); - } - } -} - -module.exports = DllPlugin; - - -/***/ }), - -/***/ 1282: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const parseJson = __webpack_require__(85685); -const DelegatedModuleFactoryPlugin = __webpack_require__(33897); -const ExternalModuleFactoryPlugin = __webpack_require__(69452); -const WebpackError = __webpack_require__(27154); -const DelegatedSourceDependency = __webpack_require__(70688); -const createSchemaValidation = __webpack_require__(89699); -const makePathsRelative = (__webpack_require__(20162).makePathsRelative); - -/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ -/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptions} DllReferencePluginOptions */ -/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptionsManifest} DllReferencePluginOptionsManifest */ - -const validate = createSchemaValidation( - __webpack_require__(21903), - () => __webpack_require__(53858), - { - name: "Dll Reference Plugin", - baseDataPath: "options" - } -); - -class DllReferencePlugin { - /** - * @param {DllReferencePluginOptions} options options object - */ - constructor(options) { - validate(options); - this.options = options; - /** @type {WeakMap} */ - this._compilationData = new WeakMap(); - } - - apply(compiler) { - compiler.hooks.compilation.tap( - "DllReferencePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - DelegatedSourceDependency, - normalModuleFactory - ); - } - ); - - compiler.hooks.beforeCompile.tapAsync( - "DllReferencePlugin", - (params, callback) => { - if ("manifest" in this.options) { - const manifest = this.options.manifest; - if (typeof manifest === "string") { - compiler.inputFileSystem.readFile(manifest, (err, result) => { - if (err) return callback(err); - const data = { - path: manifest, - data: undefined, - error: undefined - }; - // Catch errors parsing the manifest so that blank - // or malformed manifest files don't kill the process. - try { - data.data = parseJson(result.toString("utf-8")); - } catch (e) { - // Store the error in the params so that it can - // be added as a compilation error later on. - const manifestPath = makePathsRelative( - compiler.options.context, - manifest, - compiler.root - ); - data.error = new DllManifestError(manifestPath, e.message); - } - this._compilationData.set(params, data); - return callback(); - }); - return; - } - } - return callback(); - } - ); - - compiler.hooks.compile.tap("DllReferencePlugin", params => { - let name = this.options.name; - let sourceType = this.options.sourceType; - let content = - "content" in this.options ? this.options.content : undefined; - if ("manifest" in this.options) { - let manifestParameter = this.options.manifest; - let manifest; - if (typeof manifestParameter === "string") { - const data = this._compilationData.get(params); - // If there was an error parsing the manifest - // file, exit now because the error will be added - // as a compilation error in the "compilation" hook. - if (data.error) { - return; - } - manifest = data.data; - } else { - manifest = manifestParameter; - } - if (manifest) { - if (!name) name = manifest.name; - if (!sourceType) sourceType = manifest.type; - if (!content) content = manifest.content; - } - } - /** @type {Externals} */ - const externals = {}; - const source = "dll-reference " + name; - externals[source] = name; - const normalModuleFactory = params.normalModuleFactory; - new ExternalModuleFactoryPlugin(sourceType || "var", externals).apply( - normalModuleFactory - ); - new DelegatedModuleFactoryPlugin({ - source: source, - type: this.options.type, - scope: this.options.scope, - context: this.options.context || compiler.options.context, - content, - extensions: this.options.extensions, - associatedObjectForCache: compiler.root - }).apply(normalModuleFactory); - }); - - compiler.hooks.compilation.tap( - "DllReferencePlugin", - (compilation, params) => { - if ("manifest" in this.options) { - let manifest = this.options.manifest; - if (typeof manifest === "string") { - const data = this._compilationData.get(params); - // If there was an error parsing the manifest file, add the - // error as a compilation error to make the compilation fail. - if (data.error) { - compilation.errors.push(data.error); - } - compilation.fileDependencies.add(manifest); - } - } - } - ); - } -} - -class DllManifestError extends WebpackError { - constructor(filename, message) { - super(); - - this.name = "DllManifestError"; - this.message = `Dll manifest ${filename}\n${message}`; - } -} - -module.exports = DllReferencePlugin; - - -/***/ }), - -/***/ 41924: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Naoyuki Kanezawa @nkzawa -*/ - - - -const EntryOptionPlugin = __webpack_require__(2699); -const EntryPlugin = __webpack_require__(19360); -const EntryDependency = __webpack_require__(17380); - -/** @typedef {import("../declarations/WebpackOptions").EntryDynamicNormalized} EntryDynamic */ -/** @typedef {import("../declarations/WebpackOptions").EntryItem} EntryItem */ -/** @typedef {import("../declarations/WebpackOptions").EntryStaticNormalized} EntryStatic */ -/** @typedef {import("./Compiler")} Compiler */ - -class DynamicEntryPlugin { - /** - * @param {string} context the context path - * @param {EntryDynamic} entry the entry value - */ - constructor(context, entry) { - this.context = context; - this.entry = entry; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "DynamicEntryPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - EntryDependency, - normalModuleFactory - ); - } - ); - - compiler.hooks.make.tapPromise( - "DynamicEntryPlugin", - (compilation, callback) => - Promise.resolve(this.entry()) - .then(entry => { - const promises = []; - for (const name of Object.keys(entry)) { - const desc = entry[name]; - const options = EntryOptionPlugin.entryDescriptionToOptions( - compiler, - name, - desc - ); - for (const entry of desc.import) { - promises.push( - new Promise((resolve, reject) => { - compilation.addEntry( - this.context, - EntryPlugin.createDependency(entry, options), - options, - err => { - if (err) return reject(err); - resolve(); - } - ); - }) - ); - } - } - return Promise.all(promises); - }) - .then(x => {}) - ); - } -} - -module.exports = DynamicEntryPlugin; - - -/***/ }), - -/***/ 2699: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ -/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} Entry */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ - -class EntryOptionPlugin { - /** - * @param {Compiler} compiler the compiler instance one is tapping into - * @returns {void} - */ - apply(compiler) { - compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry) => { - EntryOptionPlugin.applyEntryOption(compiler, context, entry); - return true; - }); - } - - /** - * @param {Compiler} compiler the compiler - * @param {string} context context directory - * @param {Entry} entry request - * @returns {void} - */ - static applyEntryOption(compiler, context, entry) { - if (typeof entry === "function") { - const DynamicEntryPlugin = __webpack_require__(41924); - new DynamicEntryPlugin(context, entry).apply(compiler); - } else { - const EntryPlugin = __webpack_require__(19360); - for (const name of Object.keys(entry)) { - const desc = entry[name]; - const options = EntryOptionPlugin.entryDescriptionToOptions( - compiler, - name, - desc - ); - for (const entry of desc.import) { - new EntryPlugin(context, entry, options).apply(compiler); - } - } - } - } - - /** - * @param {Compiler} compiler the compiler - * @param {string} name entry name - * @param {EntryDescription} desc entry description - * @returns {EntryOptions} options for the entry - */ - static entryDescriptionToOptions(compiler, name, desc) { - /** @type {EntryOptions} */ - const options = { - name, - filename: desc.filename, - runtime: desc.runtime, - layer: desc.layer, - dependOn: desc.dependOn, - baseUri: desc.baseUri, - publicPath: desc.publicPath, - chunkLoading: desc.chunkLoading, - asyncChunks: desc.asyncChunks, - wasmLoading: desc.wasmLoading, - library: desc.library - }; - if (desc.layer !== undefined && !compiler.options.experiments.layers) { - throw new Error( - "'entryOptions.layer' is only allowed when 'experiments.layers' is enabled" - ); - } - if (desc.chunkLoading) { - const EnableChunkLoadingPlugin = __webpack_require__(49548); - EnableChunkLoadingPlugin.checkEnabled(compiler, desc.chunkLoading); - } - if (desc.wasmLoading) { - const EnableWasmLoadingPlugin = __webpack_require__(90115); - EnableWasmLoadingPlugin.checkEnabled(compiler, desc.wasmLoading); - } - if (desc.library) { - const EnableLibraryPlugin = __webpack_require__(7616); - EnableLibraryPlugin.checkEnabled(compiler, desc.library.type); - } - return options; - } -} - -module.exports = EntryOptionPlugin; - - -/***/ }), - -/***/ 19360: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const EntryDependency = __webpack_require__(17380); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ - -class EntryPlugin { - /** - * An entry plugin which will handle - * creation of the EntryDependency - * - * @param {string} context context path - * @param {string} entry entry path - * @param {EntryOptions | string=} options entry options (passing a string is deprecated) - */ - constructor(context, entry, options) { - this.context = context; - this.entry = entry; - this.options = options || ""; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "EntryPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - EntryDependency, - normalModuleFactory - ); - } - ); - - const { entry, options, context } = this; - const dep = EntryPlugin.createDependency(entry, options); - - compiler.hooks.make.tapAsync("EntryPlugin", (compilation, callback) => { - compilation.addEntry(context, dep, options, err => { - callback(err); - }); - }); - } - - /** - * @param {string} entry entry request - * @param {EntryOptions | string} options entry options (passing string is deprecated) - * @returns {EntryDependency} the dependency - */ - static createDependency(entry, options) { - const dep = new EntryDependency(entry); - // TODO webpack 6 remove string option - dep.loc = { name: typeof options === "object" ? options.name : options }; - return dep; - } -} - -module.exports = EntryPlugin; - - -/***/ }), - -/***/ 33546: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ChunkGroup = __webpack_require__(12487); - -/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ -/** @typedef {import("./Chunk")} Chunk */ - -/** @typedef {{ name?: string } & Omit} EntryOptions */ - -/** - * Entrypoint serves as an encapsulation primitive for chunks that are - * a part of a single ChunkGroup. They represent all bundles that need to be loaded for a - * single instance of a page. Multi-page application architectures will typically yield multiple Entrypoint objects - * inside of the compilation, whereas a Single Page App may only contain one with many lazy-loaded chunks. - */ -class Entrypoint extends ChunkGroup { - /** - * Creates an instance of Entrypoint. - * @param {EntryOptions | string} entryOptions the options for the entrypoint (or name) - * @param {boolean=} initial false, when the entrypoint is not initial loaded - */ - constructor(entryOptions, initial = true) { - if (typeof entryOptions === "string") { - entryOptions = { name: entryOptions }; - } - super({ - name: entryOptions.name - }); - this.options = entryOptions; - /** @type {Chunk=} */ - this._runtimeChunk = undefined; - /** @type {Chunk=} */ - this._entrypointChunk = undefined; - /** @type {boolean} */ - this._initial = initial; - } - - /** - * @returns {boolean} true, when this chunk group will be loaded on initial page load - */ - isInitial() { - return this._initial; - } - - /** - * Sets the runtimeChunk for an entrypoint. - * @param {Chunk} chunk the chunk being set as the runtime chunk. - * @returns {void} - */ - setRuntimeChunk(chunk) { - this._runtimeChunk = chunk; - } - - /** - * Fetches the chunk reference containing the webpack bootstrap code - * @returns {Chunk | null} returns the runtime chunk or null if there is none - */ - getRuntimeChunk() { - if (this._runtimeChunk) return this._runtimeChunk; - for (const parent of this.parentsIterable) { - if (parent instanceof Entrypoint) return parent.getRuntimeChunk(); - } - return null; - } - - /** - * Sets the chunk with the entrypoint modules for an entrypoint. - * @param {Chunk} chunk the chunk being set as the entrypoint chunk. - * @returns {void} - */ - setEntrypointChunk(chunk) { - this._entrypointChunk = chunk; - } - - /** - * Returns the chunk which contains the entrypoint modules - * (or at least the execution of them) - * @returns {Chunk} chunk - */ - getEntrypointChunk() { - return this._entrypointChunk; - } - - /** - * @param {Chunk} oldChunk chunk to be replaced - * @param {Chunk} newChunk New chunk that will be replaced with - * @returns {boolean} returns true if the replacement was successful - */ - replaceChunk(oldChunk, newChunk) { - if (this._runtimeChunk === oldChunk) this._runtimeChunk = newChunk; - if (this._entrypointChunk === oldChunk) this._entrypointChunk = newChunk; - return super.replaceChunk(oldChunk, newChunk); - } -} - -module.exports = Entrypoint; - - -/***/ }), - -/***/ 48681: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Authors Simen Brekken @simenbrekken, Einar Löve @einarlove -*/ - - - -const DefinePlugin = __webpack_require__(5354); -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./DefinePlugin").CodeValue} CodeValue */ - -class EnvironmentPlugin { - constructor(...keys) { - if (keys.length === 1 && Array.isArray(keys[0])) { - this.keys = keys[0]; - this.defaultValues = {}; - } else if (keys.length === 1 && keys[0] && typeof keys[0] === "object") { - this.keys = Object.keys(keys[0]); - this.defaultValues = keys[0]; - } else { - this.keys = keys; - this.defaultValues = {}; - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - /** @type {Record} */ - const definitions = {}; - for (const key of this.keys) { - const value = - process.env[key] !== undefined - ? process.env[key] - : this.defaultValues[key]; - - if (value === undefined) { - compiler.hooks.thisCompilation.tap("EnvironmentPlugin", compilation => { - const error = new WebpackError( - `EnvironmentPlugin - ${key} environment variable is undefined.\n\n` + - "You can pass an object with default values to suppress this warning.\n" + - "See https://webpack.js.org/plugins/environment-plugin for example." - ); - - error.name = "EnvVariableNotDefinedError"; - compilation.errors.push(error); - }); - } - - definitions[`process.env.${key}`] = - value === undefined ? "undefined" : JSON.stringify(value); - } - - new DefinePlugin(definitions).apply(compiler); - } -} - -module.exports = EnvironmentPlugin; - - -/***/ }), - -/***/ 8821: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const loaderFlag = "LOADER_EXECUTION"; - -const webpackOptionsFlag = "WEBPACK_OPTIONS"; - -exports.cutOffByFlag = (stack, flag) => { - stack = stack.split("\n"); - for (let i = 0; i < stack.length; i++) { - if (stack[i].includes(flag)) { - stack.length = i; - } - } - return stack.join("\n"); -}; - -exports.cutOffLoaderExecution = stack => - exports.cutOffByFlag(stack, loaderFlag); - -exports.cutOffWebpackOptions = stack => - exports.cutOffByFlag(stack, webpackOptionsFlag); - -exports.cutOffMultilineMessage = (stack, message) => { - stack = stack.split("\n"); - message = message.split("\n"); - - const result = []; - - stack.forEach((line, idx) => { - if (!line.includes(message[idx])) result.push(line); - }); - - return result.join("\n"); -}; - -exports.cutOffMessage = (stack, message) => { - const nextLine = stack.indexOf("\n"); - if (nextLine === -1) { - return stack === message ? "" : stack; - } else { - const firstLine = stack.slice(0, nextLine); - return firstLine === message ? stack.slice(nextLine + 1) : stack; - } -}; - -exports.cleanUp = (stack, message) => { - stack = exports.cutOffLoaderExecution(stack); - stack = exports.cutOffMessage(stack, message); - return stack; -}; - -exports.cleanUpWebpackOptions = (stack, message) => { - stack = exports.cutOffWebpackOptions(stack); - stack = exports.cutOffMultilineMessage(stack, message); - return stack; -}; - - -/***/ }), - -/***/ 76289: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, RawSource } = __webpack_require__(51255); -const ExternalModule = __webpack_require__(73096); -const ModuleFilenameHelpers = __webpack_require__(99523); -const RuntimeGlobals = __webpack_require__(39201); -const JavascriptModulesPlugin = __webpack_require__(36109); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Compiler")} Compiler */ - -/** @type {WeakMap} */ -const cache = new WeakMap(); - -const devtoolWarning = new RawSource(`/* - * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -`); - -class EvalDevToolModulePlugin { - constructor(options) { - this.namespace = options.namespace || ""; - this.sourceUrlComment = options.sourceUrlComment || "\n//# sourceURL=[url]"; - this.moduleFilenameTemplate = - options.moduleFilenameTemplate || - "webpack://[namespace]/[resourcePath]?[loaders]"; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("EvalDevToolModulePlugin", compilation => { - const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); - hooks.renderModuleContent.tap( - "EvalDevToolModulePlugin", - (source, module, { runtimeTemplate, chunkGraph }) => { - const cacheEntry = cache.get(source); - if (cacheEntry !== undefined) return cacheEntry; - if (module instanceof ExternalModule) { - cache.set(source, source); - return source; - } - const content = source.source(); - const str = ModuleFilenameHelpers.createFilename( - module, - { - moduleFilenameTemplate: this.moduleFilenameTemplate, - namespace: this.namespace - }, - { - requestShortener: runtimeTemplate.requestShortener, - chunkGraph, - hashFunction: compilation.outputOptions.hashFunction - } - ); - const footer = - "\n" + - this.sourceUrlComment.replace( - /\[url\]/g, - encodeURI(str) - .replace(/%2F/g, "/") - .replace(/%20/g, "_") - .replace(/%5E/g, "^") - .replace(/%5C/g, "\\") - .replace(/^\//, "") - ); - const result = new RawSource( - `eval(${ - compilation.outputOptions.trustedTypes - ? `${RuntimeGlobals.createScript}(${JSON.stringify( - content + footer - )})` - : JSON.stringify(content + footer) - });` - ); - cache.set(source, result); - return result; - } - ); - hooks.inlineInRuntimeBailout.tap( - "EvalDevToolModulePlugin", - () => "the eval devtool is used." - ); - hooks.render.tap( - "EvalDevToolModulePlugin", - source => new ConcatSource(devtoolWarning, source) - ); - hooks.chunkHash.tap("EvalDevToolModulePlugin", (chunk, hash) => { - hash.update("EvalDevToolModulePlugin"); - hash.update("2"); - }); - if (compilation.outputOptions.trustedTypes) { - compilation.hooks.additionalModuleRuntimeRequirements.tap( - "EvalDevToolModulePlugin", - (module, set, context) => { - set.add(RuntimeGlobals.createScript); - } - ); - } - }); - } -} - -module.exports = EvalDevToolModulePlugin; - - -/***/ }), - -/***/ 67470: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, RawSource } = __webpack_require__(51255); -const ModuleFilenameHelpers = __webpack_require__(99523); -const NormalModule = __webpack_require__(89417); -const RuntimeGlobals = __webpack_require__(39201); -const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(44717); -const JavascriptModulesPlugin = __webpack_require__(36109); -const ConcatenatedModule = __webpack_require__(4272); -const { makePathsAbsolute } = __webpack_require__(20162); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").DevTool} DevToolOptions */ -/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ - -/** @type {WeakMap} */ -const cache = new WeakMap(); - -const devtoolWarning = new RawSource(`/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -`); - -class EvalSourceMapDevToolPlugin { - /** - * @param {SourceMapDevToolPluginOptions|string} inputOptions Options object - */ - constructor(inputOptions) { - /** @type {SourceMapDevToolPluginOptions} */ - let options; - if (typeof inputOptions === "string") { - options = { - append: inputOptions - }; - } else { - options = inputOptions; - } - this.sourceMapComment = - options.append || "//# sourceURL=[module]\n//# sourceMappingURL=[url]"; - this.moduleFilenameTemplate = - options.moduleFilenameTemplate || - "webpack://[namespace]/[resource-path]?[hash]"; - this.namespace = options.namespace || ""; - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap( - "EvalSourceMapDevToolPlugin", - compilation => { - const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); - new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); - const matchModule = ModuleFilenameHelpers.matchObject.bind( - ModuleFilenameHelpers, - options - ); - hooks.renderModuleContent.tap( - "EvalSourceMapDevToolPlugin", - (source, m, { runtimeTemplate, chunkGraph }) => { - const cachedSource = cache.get(source); - if (cachedSource !== undefined) { - return cachedSource; - } - - const result = r => { - cache.set(source, r); - return r; - }; - - if (m instanceof NormalModule) { - const module = /** @type {NormalModule} */ (m); - if (!matchModule(module.resource)) { - return result(source); - } - } else if (m instanceof ConcatenatedModule) { - const concatModule = /** @type {ConcatenatedModule} */ (m); - if (concatModule.rootModule instanceof NormalModule) { - const module = /** @type {NormalModule} */ ( - concatModule.rootModule - ); - if (!matchModule(module.resource)) { - return result(source); - } - } else { - return result(source); - } - } else { - return result(source); - } - - /** @type {{ [key: string]: TODO; }} */ - let sourceMap; - let content; - if (source.sourceAndMap) { - const sourceAndMap = source.sourceAndMap(options); - sourceMap = sourceAndMap.map; - content = sourceAndMap.source; - } else { - sourceMap = source.map(options); - content = source.source(); - } - if (!sourceMap) { - return result(source); - } - - // Clone (flat) the sourcemap to ensure that the mutations below do not persist. - sourceMap = { ...sourceMap }; - const context = compiler.options.context; - const root = compiler.root; - const modules = sourceMap.sources.map(source => { - if (!source.startsWith("webpack://")) return source; - source = makePathsAbsolute(context, source.slice(10), root); - const module = compilation.findModule(source); - return module || source; - }); - let moduleFilenames = modules.map(module => { - return ModuleFilenameHelpers.createFilename( - module, - { - moduleFilenameTemplate: this.moduleFilenameTemplate, - namespace: this.namespace - }, - { - requestShortener: runtimeTemplate.requestShortener, - chunkGraph, - hashFunction: compilation.outputOptions.hashFunction - } - ); - }); - moduleFilenames = ModuleFilenameHelpers.replaceDuplicates( - moduleFilenames, - (filename, i, n) => { - for (let j = 0; j < n; j++) filename += "*"; - return filename; - } - ); - sourceMap.sources = moduleFilenames; - sourceMap.sourceRoot = options.sourceRoot || ""; - const moduleId = chunkGraph.getModuleId(m); - sourceMap.file = `${moduleId}.js`; - - const footer = - this.sourceMapComment.replace( - /\[url\]/g, - `data:application/json;charset=utf-8;base64,${Buffer.from( - JSON.stringify(sourceMap), - "utf8" - ).toString("base64")}` - ) + `\n//# sourceURL=webpack-internal:///${moduleId}\n`; // workaround for chrome bug - - return result( - new RawSource( - `eval(${ - compilation.outputOptions.trustedTypes - ? `${RuntimeGlobals.createScript}(${JSON.stringify( - content + footer - )})` - : JSON.stringify(content + footer) - });` - ) - ); - } - ); - hooks.inlineInRuntimeBailout.tap( - "EvalDevToolModulePlugin", - () => "the eval-source-map devtool is used." - ); - hooks.render.tap( - "EvalSourceMapDevToolPlugin", - source => new ConcatSource(devtoolWarning, source) - ); - hooks.chunkHash.tap("EvalSourceMapDevToolPlugin", (chunk, hash) => { - hash.update("EvalSourceMapDevToolPlugin"); - hash.update("2"); - }); - if (compilation.outputOptions.trustedTypes) { - compilation.hooks.additionalModuleRuntimeRequirements.tap( - "EvalSourceMapDevToolPlugin", - (module, set, context) => { - set.add(RuntimeGlobals.createScript); - } - ); - } - } - ); - } -} - -module.exports = EvalSourceMapDevToolPlugin; - - -/***/ }), - -/***/ 13168: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { equals } = __webpack_require__(28087); -const SortableSet = __webpack_require__(87122); -const makeSerializable = __webpack_require__(65764); -const { forEachRuntime } = __webpack_require__(47462); - -/** @typedef {import("./Dependency").RuntimeSpec} RuntimeSpec */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("./util/Hash")} Hash */ - -/** @typedef {typeof UsageState.OnlyPropertiesUsed | typeof UsageState.NoInfo | typeof UsageState.Unknown | typeof UsageState.Used} RuntimeUsageStateType */ -/** @typedef {typeof UsageState.Unused | RuntimeUsageStateType} UsageStateType */ - -const UsageState = Object.freeze({ - Unused: /** @type {0} */ (0), - OnlyPropertiesUsed: /** @type {1} */ (1), - NoInfo: /** @type {2} */ (2), - Unknown: /** @type {3} */ (3), - Used: /** @type {4} */ (4) -}); - -const RETURNS_TRUE = () => true; - -const CIRCULAR = Symbol("circular target"); - -class RestoreProvidedData { - constructor( - exports, - otherProvided, - otherCanMangleProvide, - otherTerminalBinding - ) { - this.exports = exports; - this.otherProvided = otherProvided; - this.otherCanMangleProvide = otherCanMangleProvide; - this.otherTerminalBinding = otherTerminalBinding; - } - - serialize({ write }) { - write(this.exports); - write(this.otherProvided); - write(this.otherCanMangleProvide); - write(this.otherTerminalBinding); - } - - static deserialize({ read }) { - return new RestoreProvidedData(read(), read(), read(), read()); - } -} - -makeSerializable( - RestoreProvidedData, - "webpack/lib/ModuleGraph", - "RestoreProvidedData" -); - -class ExportsInfo { - constructor() { - /** @type {Map} */ - this._exports = new Map(); - this._otherExportsInfo = new ExportInfo(null); - this._sideEffectsOnlyInfo = new ExportInfo("*side effects only*"); - this._exportsAreOrdered = false; - /** @type {ExportsInfo=} */ - this._redirectTo = undefined; - } - - /** - * @returns {Iterable} all owned exports in any order - */ - get ownedExports() { - return this._exports.values(); - } - - /** - * @returns {Iterable} all owned exports in order - */ - get orderedOwnedExports() { - if (!this._exportsAreOrdered) { - this._sortExports(); - } - return this._exports.values(); - } - - /** - * @returns {Iterable} all exports in any order - */ - get exports() { - if (this._redirectTo !== undefined) { - const map = new Map(this._redirectTo._exports); - for (const [key, value] of this._exports) { - map.set(key, value); - } - return map.values(); - } - return this._exports.values(); - } - - /** - * @returns {Iterable} all exports in order - */ - get orderedExports() { - if (!this._exportsAreOrdered) { - this._sortExports(); - } - if (this._redirectTo !== undefined) { - const map = new Map( - Array.from(this._redirectTo.orderedExports, item => [item.name, item]) - ); - for (const [key, value] of this._exports) { - map.set(key, value); - } - // sorting should be pretty fast as map contains - // a lot of presorted items - this._sortExportsMap(map); - return map.values(); - } - return this._exports.values(); - } - - /** - * @returns {ExportInfo} the export info of unlisted exports - */ - get otherExportsInfo() { - if (this._redirectTo !== undefined) - return this._redirectTo.otherExportsInfo; - return this._otherExportsInfo; - } - - _sortExportsMap(exports) { - if (exports.size > 1) { - const namesInOrder = []; - for (const entry of exports.values()) { - namesInOrder.push(entry.name); - } - namesInOrder.sort(); - let i = 0; - for (const entry of exports.values()) { - const name = namesInOrder[i]; - if (entry.name !== name) break; - i++; - } - for (; i < namesInOrder.length; i++) { - const name = namesInOrder[i]; - const correctEntry = exports.get(name); - exports.delete(name); - exports.set(name, correctEntry); - } - } - } - - _sortExports() { - this._sortExportsMap(this._exports); - this._exportsAreOrdered = true; - } - - setRedirectNamedTo(exportsInfo) { - if (this._redirectTo === exportsInfo) return false; - this._redirectTo = exportsInfo; - return true; - } - - setHasProvideInfo() { - for (const exportInfo of this._exports.values()) { - if (exportInfo.provided === undefined) { - exportInfo.provided = false; - } - if (exportInfo.canMangleProvide === undefined) { - exportInfo.canMangleProvide = true; - } - } - if (this._redirectTo !== undefined) { - this._redirectTo.setHasProvideInfo(); - } else { - if (this._otherExportsInfo.provided === undefined) { - this._otherExportsInfo.provided = false; - } - if (this._otherExportsInfo.canMangleProvide === undefined) { - this._otherExportsInfo.canMangleProvide = true; - } - } - } - - setHasUseInfo() { - for (const exportInfo of this._exports.values()) { - exportInfo.setHasUseInfo(); - } - this._sideEffectsOnlyInfo.setHasUseInfo(); - if (this._redirectTo !== undefined) { - this._redirectTo.setHasUseInfo(); - } else { - this._otherExportsInfo.setHasUseInfo(); - if (this._otherExportsInfo.canMangleUse === undefined) { - this._otherExportsInfo.canMangleUse = true; - } - } - } - - /** - * @param {string} name export name - * @returns {ExportInfo} export info for this name - */ - getOwnExportInfo(name) { - const info = this._exports.get(name); - if (info !== undefined) return info; - const newInfo = new ExportInfo(name, this._otherExportsInfo); - this._exports.set(name, newInfo); - this._exportsAreOrdered = false; - return newInfo; - } - - /** - * @param {string} name export name - * @returns {ExportInfo} export info for this name - */ - getExportInfo(name) { - const info = this._exports.get(name); - if (info !== undefined) return info; - if (this._redirectTo !== undefined) - return this._redirectTo.getExportInfo(name); - const newInfo = new ExportInfo(name, this._otherExportsInfo); - this._exports.set(name, newInfo); - this._exportsAreOrdered = false; - return newInfo; - } - - /** - * @param {string} name export name - * @returns {ExportInfo} export info for this name - */ - getReadOnlyExportInfo(name) { - const info = this._exports.get(name); - if (info !== undefined) return info; - if (this._redirectTo !== undefined) - return this._redirectTo.getReadOnlyExportInfo(name); - return this._otherExportsInfo; - } - - /** - * @param {string[]} name export name - * @returns {ExportInfo | undefined} export info for this name - */ - getReadOnlyExportInfoRecursive(name) { - const exportInfo = this.getReadOnlyExportInfo(name[0]); - if (name.length === 1) return exportInfo; - if (!exportInfo.exportsInfo) return undefined; - return exportInfo.exportsInfo.getReadOnlyExportInfoRecursive(name.slice(1)); - } - - /** - * @param {string[]=} name the export name - * @returns {ExportsInfo | undefined} the nested exports info - */ - getNestedExportsInfo(name) { - if (Array.isArray(name) && name.length > 0) { - const info = this.getReadOnlyExportInfo(name[0]); - if (!info.exportsInfo) return undefined; - return info.exportsInfo.getNestedExportsInfo(name.slice(1)); - } - return this; - } - - /** - * @param {boolean=} canMangle true, if exports can still be mangled (defaults to false) - * @param {Set=} excludeExports list of unaffected exports - * @param {any=} targetKey use this as key for the target - * @param {ModuleGraphConnection=} targetModule set this module as target - * @param {number=} priority priority - * @returns {boolean} true, if this call changed something - */ - setUnknownExportsProvided( - canMangle, - excludeExports, - targetKey, - targetModule, - priority - ) { - let changed = false; - if (excludeExports) { - for (const name of excludeExports) { - // Make sure these entries exist, so they can get different info - this.getExportInfo(name); - } - } - for (const exportInfo of this._exports.values()) { - if (!canMangle && exportInfo.canMangleProvide !== false) { - exportInfo.canMangleProvide = false; - changed = true; - } - if (excludeExports && excludeExports.has(exportInfo.name)) continue; - if (exportInfo.provided !== true && exportInfo.provided !== null) { - exportInfo.provided = null; - changed = true; - } - if (targetKey) { - exportInfo.setTarget(targetKey, targetModule, [exportInfo.name], -1); - } - } - if (this._redirectTo !== undefined) { - if ( - this._redirectTo.setUnknownExportsProvided( - canMangle, - excludeExports, - targetKey, - targetModule, - priority - ) - ) { - changed = true; - } - } else { - if ( - this._otherExportsInfo.provided !== true && - this._otherExportsInfo.provided !== null - ) { - this._otherExportsInfo.provided = null; - changed = true; - } - if (!canMangle && this._otherExportsInfo.canMangleProvide !== false) { - this._otherExportsInfo.canMangleProvide = false; - changed = true; - } - if (targetKey) { - this._otherExportsInfo.setTarget( - targetKey, - targetModule, - undefined, - priority - ); - } - } - return changed; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when something changed - */ - setUsedInUnknownWay(runtime) { - let changed = false; - for (const exportInfo of this._exports.values()) { - if (exportInfo.setUsedInUnknownWay(runtime)) { - changed = true; - } - } - if (this._redirectTo !== undefined) { - if (this._redirectTo.setUsedInUnknownWay(runtime)) { - changed = true; - } - } else { - if ( - this._otherExportsInfo.setUsedConditionally( - used => used < UsageState.Unknown, - UsageState.Unknown, - runtime - ) - ) { - changed = true; - } - if (this._otherExportsInfo.canMangleUse !== false) { - this._otherExportsInfo.canMangleUse = false; - changed = true; - } - } - return changed; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when something changed - */ - setUsedWithoutInfo(runtime) { - let changed = false; - for (const exportInfo of this._exports.values()) { - if (exportInfo.setUsedWithoutInfo(runtime)) { - changed = true; - } - } - if (this._redirectTo !== undefined) { - if (this._redirectTo.setUsedWithoutInfo(runtime)) { - changed = true; - } - } else { - if (this._otherExportsInfo.setUsed(UsageState.NoInfo, runtime)) { - changed = true; - } - if (this._otherExportsInfo.canMangleUse !== false) { - this._otherExportsInfo.canMangleUse = false; - changed = true; - } - } - return changed; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when something changed - */ - setAllKnownExportsUsed(runtime) { - let changed = false; - for (const exportInfo of this._exports.values()) { - if (!exportInfo.provided) continue; - if (exportInfo.setUsed(UsageState.Used, runtime)) { - changed = true; - } - } - return changed; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when something changed - */ - setUsedForSideEffectsOnly(runtime) { - return this._sideEffectsOnlyInfo.setUsedConditionally( - used => used === UsageState.Unused, - UsageState.Used, - runtime - ); - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when the module exports are used in any way - */ - isUsed(runtime) { - if (this._redirectTo !== undefined) { - if (this._redirectTo.isUsed(runtime)) { - return true; - } - } else { - if (this._otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { - return true; - } - } - for (const exportInfo of this._exports.values()) { - if (exportInfo.getUsed(runtime) !== UsageState.Unused) { - return true; - } - } - return false; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, when the module is used in any way - */ - isModuleUsed(runtime) { - if (this.isUsed(runtime)) return true; - if (this._sideEffectsOnlyInfo.getUsed(runtime) !== UsageState.Unused) - return true; - return false; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {SortableSet | boolean | null} set of used exports, or true (when namespace object is used), or false (when unused), or null (when unknown) - */ - getUsedExports(runtime) { - if (!this._redirectTo !== undefined) { - switch (this._otherExportsInfo.getUsed(runtime)) { - case UsageState.NoInfo: - return null; - case UsageState.Unknown: - case UsageState.OnlyPropertiesUsed: - case UsageState.Used: - return true; - } - } - const array = []; - if (!this._exportsAreOrdered) this._sortExports(); - for (const exportInfo of this._exports.values()) { - switch (exportInfo.getUsed(runtime)) { - case UsageState.NoInfo: - return null; - case UsageState.Unknown: - return true; - case UsageState.OnlyPropertiesUsed: - case UsageState.Used: - array.push(exportInfo.name); - } - } - if (this._redirectTo !== undefined) { - const inner = this._redirectTo.getUsedExports(runtime); - if (inner === null) return null; - if (inner === true) return true; - if (inner !== false) { - for (const item of inner) { - array.push(item); - } - } - } - if (array.length === 0) { - switch (this._sideEffectsOnlyInfo.getUsed(runtime)) { - case UsageState.NoInfo: - return null; - case UsageState.Unused: - return false; - } - } - return new SortableSet(array); - } - - /** - * @returns {null | true | string[]} list of exports when known - */ - getProvidedExports() { - if (!this._redirectTo !== undefined) { - switch (this._otherExportsInfo.provided) { - case undefined: - return null; - case null: - return true; - case true: - return true; - } - } - const array = []; - if (!this._exportsAreOrdered) this._sortExports(); - for (const exportInfo of this._exports.values()) { - switch (exportInfo.provided) { - case undefined: - return null; - case null: - return true; - case true: - array.push(exportInfo.name); - } - } - if (this._redirectTo !== undefined) { - const inner = this._redirectTo.getProvidedExports(); - if (inner === null) return null; - if (inner === true) return true; - for (const item of inner) { - if (!array.includes(item)) { - array.push(item); - } - } - } - return array; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {ExportInfo[]} exports that are relevant (not unused and potential provided) - */ - getRelevantExports(runtime) { - const list = []; - for (const exportInfo of this._exports.values()) { - const used = exportInfo.getUsed(runtime); - if (used === UsageState.Unused) continue; - if (exportInfo.provided === false) continue; - list.push(exportInfo); - } - if (this._redirectTo !== undefined) { - for (const exportInfo of this._redirectTo.getRelevantExports(runtime)) { - if (!this._exports.has(exportInfo.name)) list.push(exportInfo); - } - } - if ( - this._otherExportsInfo.provided !== false && - this._otherExportsInfo.getUsed(runtime) !== UsageState.Unused - ) { - list.push(this._otherExportsInfo); - } - return list; - } - - /** - * @param {string | string[]} name the name of the export - * @returns {boolean | undefined | null} if the export is provided - */ - isExportProvided(name) { - if (Array.isArray(name)) { - const info = this.getReadOnlyExportInfo(name[0]); - if (info.exportsInfo && name.length > 1) { - return info.exportsInfo.isExportProvided(name.slice(1)); - } - return info.provided ? name.length === 1 || undefined : info.provided; - } - const info = this.getReadOnlyExportInfo(name); - return info.provided; - } - - /** - * @param {RuntimeSpec} runtime runtime - * @returns {string} key representing the usage - */ - getUsageKey(runtime) { - const key = []; - if (this._redirectTo !== undefined) { - key.push(this._redirectTo.getUsageKey(runtime)); - } else { - key.push(this._otherExportsInfo.getUsed(runtime)); - } - key.push(this._sideEffectsOnlyInfo.getUsed(runtime)); - for (const exportInfo of this.orderedOwnedExports) { - key.push(exportInfo.getUsed(runtime)); - } - return key.join("|"); - } - - /** - * @param {RuntimeSpec} runtimeA first runtime - * @param {RuntimeSpec} runtimeB second runtime - * @returns {boolean} true, when equally used - */ - isEquallyUsed(runtimeA, runtimeB) { - if (this._redirectTo !== undefined) { - if (!this._redirectTo.isEquallyUsed(runtimeA, runtimeB)) return false; - } else { - if ( - this._otherExportsInfo.getUsed(runtimeA) !== - this._otherExportsInfo.getUsed(runtimeB) - ) { - return false; - } - } - if ( - this._sideEffectsOnlyInfo.getUsed(runtimeA) !== - this._sideEffectsOnlyInfo.getUsed(runtimeB) - ) { - return false; - } - for (const exportInfo of this.ownedExports) { - if (exportInfo.getUsed(runtimeA) !== exportInfo.getUsed(runtimeB)) - return false; - } - return true; - } - - /** - * @param {string | string[]} name export name - * @param {RuntimeSpec} runtime check usage for this runtime only - * @returns {UsageStateType} usage status - */ - getUsed(name, runtime) { - if (Array.isArray(name)) { - if (name.length === 0) return this.otherExportsInfo.getUsed(runtime); - let info = this.getReadOnlyExportInfo(name[0]); - if (info.exportsInfo && name.length > 1) { - return info.exportsInfo.getUsed(name.slice(1), runtime); - } - return info.getUsed(runtime); - } - let info = this.getReadOnlyExportInfo(name); - return info.getUsed(runtime); - } - - /** - * @param {string | string[]} name the export name - * @param {RuntimeSpec} runtime check usage for this runtime only - * @returns {string | string[] | false} the used name - */ - getUsedName(name, runtime) { - if (Array.isArray(name)) { - // TODO improve this - if (name.length === 0) { - if (!this.isUsed(runtime)) return false; - return name; - } - let info = this.getReadOnlyExportInfo(name[0]); - const x = info.getUsedName(name[0], runtime); - if (x === false) return false; - const arr = x === name[0] && name.length === 1 ? name : [x]; - if (name.length === 1) { - return arr; - } - if ( - info.exportsInfo && - info.getUsed(runtime) === UsageState.OnlyPropertiesUsed - ) { - const nested = info.exportsInfo.getUsedName(name.slice(1), runtime); - if (!nested) return false; - return arr.concat(nested); - } else { - return arr.concat(name.slice(1)); - } - } else { - let info = this.getReadOnlyExportInfo(name); - const usedName = info.getUsedName(name, runtime); - return usedName; - } - } - - /** - * @param {Hash} hash the hash - * @param {RuntimeSpec} runtime the runtime - * @returns {void} - */ - updateHash(hash, runtime) { - this._updateHash(hash, runtime, new Set()); - } - - /** - * @param {Hash} hash the hash - * @param {RuntimeSpec} runtime the runtime - * @param {Set} alreadyVisitedExportsInfo for circular references - * @returns {void} - */ - _updateHash(hash, runtime, alreadyVisitedExportsInfo) { - const set = new Set(alreadyVisitedExportsInfo); - set.add(this); - for (const exportInfo of this.orderedExports) { - if (exportInfo.hasInfo(this._otherExportsInfo, runtime)) { - exportInfo._updateHash(hash, runtime, set); - } - } - this._sideEffectsOnlyInfo._updateHash(hash, runtime, set); - this._otherExportsInfo._updateHash(hash, runtime, set); - if (this._redirectTo !== undefined) { - this._redirectTo._updateHash(hash, runtime, set); - } - } - - getRestoreProvidedData() { - const otherProvided = this._otherExportsInfo.provided; - const otherCanMangleProvide = this._otherExportsInfo.canMangleProvide; - const otherTerminalBinding = this._otherExportsInfo.terminalBinding; - const exports = []; - for (const exportInfo of this.orderedExports) { - if ( - exportInfo.provided !== otherProvided || - exportInfo.canMangleProvide !== otherCanMangleProvide || - exportInfo.terminalBinding !== otherTerminalBinding || - exportInfo.exportsInfoOwned - ) { - exports.push({ - name: exportInfo.name, - provided: exportInfo.provided, - canMangleProvide: exportInfo.canMangleProvide, - terminalBinding: exportInfo.terminalBinding, - exportsInfo: exportInfo.exportsInfoOwned - ? exportInfo.exportsInfo.getRestoreProvidedData() - : undefined - }); - } - } - return new RestoreProvidedData( - exports, - otherProvided, - otherCanMangleProvide, - otherTerminalBinding - ); - } - - restoreProvided({ - otherProvided, - otherCanMangleProvide, - otherTerminalBinding, - exports - }) { - let wasEmpty = true; - for (const exportInfo of this._exports.values()) { - wasEmpty = false; - exportInfo.provided = otherProvided; - exportInfo.canMangleProvide = otherCanMangleProvide; - exportInfo.terminalBinding = otherTerminalBinding; - } - this._otherExportsInfo.provided = otherProvided; - this._otherExportsInfo.canMangleProvide = otherCanMangleProvide; - this._otherExportsInfo.terminalBinding = otherTerminalBinding; - for (const exp of exports) { - const exportInfo = this.getExportInfo(exp.name); - exportInfo.provided = exp.provided; - exportInfo.canMangleProvide = exp.canMangleProvide; - exportInfo.terminalBinding = exp.terminalBinding; - if (exp.exportsInfo) { - const exportsInfo = exportInfo.createNestedExportsInfo(); - exportsInfo.restoreProvided(exp.exportsInfo); - } - } - if (wasEmpty) this._exportsAreOrdered = true; - } -} - -class ExportInfo { - /** - * @param {string} name the original name of the export - * @param {ExportInfo=} initFrom init values from this ExportInfo - */ - constructor(name, initFrom) { - /** @type {string} */ - this.name = name; - /** @private @type {string | null} */ - this._usedName = initFrom ? initFrom._usedName : null; - /** @private @type {UsageStateType} */ - this._globalUsed = initFrom ? initFrom._globalUsed : undefined; - /** @private @type {Map} */ - this._usedInRuntime = - initFrom && initFrom._usedInRuntime - ? new Map(initFrom._usedInRuntime) - : undefined; - /** @private @type {boolean} */ - this._hasUseInRuntimeInfo = initFrom - ? initFrom._hasUseInRuntimeInfo - : false; - /** - * true: it is provided - * false: it is not provided - * null: only the runtime knows if it is provided - * undefined: it was not determined if it is provided - * @type {boolean | null | undefined} - */ - this.provided = initFrom ? initFrom.provided : undefined; - /** - * is the export a terminal binding that should be checked for export star conflicts - * @type {boolean} - */ - this.terminalBinding = initFrom ? initFrom.terminalBinding : false; - /** - * true: it can be mangled - * false: is can not be mangled - * undefined: it was not determined if it can be mangled - * @type {boolean | undefined} - */ - this.canMangleProvide = initFrom ? initFrom.canMangleProvide : undefined; - /** - * true: it can be mangled - * false: is can not be mangled - * undefined: it was not determined if it can be mangled - * @type {boolean | undefined} - */ - this.canMangleUse = initFrom ? initFrom.canMangleUse : undefined; - /** @type {boolean} */ - this.exportsInfoOwned = false; - /** @type {ExportsInfo=} */ - this.exportsInfo = undefined; - /** @type {Map=} */ - this._target = undefined; - if (initFrom && initFrom._target) { - this._target = new Map(); - for (const [key, value] of initFrom._target) { - this._target.set(key, { - connection: value.connection, - export: value.export || [name], - priority: value.priority - }); - } - } - /** @type {Map=} */ - this._maxTarget = undefined; - } - - // TODO webpack 5 remove - /** @private */ - get used() { - throw new Error("REMOVED"); - } - /** @private */ - get usedName() { - throw new Error("REMOVED"); - } - /** - * @private - * @param {*} v v - */ - set used(v) { - throw new Error("REMOVED"); - } - /** - * @private - * @param {*} v v - */ - set usedName(v) { - throw new Error("REMOVED"); - } - - get canMangle() { - switch (this.canMangleProvide) { - case undefined: - return this.canMangleUse === false ? false : undefined; - case false: - return false; - case true: - switch (this.canMangleUse) { - case undefined: - return undefined; - case false: - return false; - case true: - return true; - } - } - throw new Error( - `Unexpected flags for canMangle ${this.canMangleProvide} ${this.canMangleUse}` - ); - } - - /** - * @param {RuntimeSpec} runtime only apply to this runtime - * @returns {boolean} true, when something changed - */ - setUsedInUnknownWay(runtime) { - let changed = false; - if ( - this.setUsedConditionally( - used => used < UsageState.Unknown, - UsageState.Unknown, - runtime - ) - ) { - changed = true; - } - if (this.canMangleUse !== false) { - this.canMangleUse = false; - changed = true; - } - return changed; - } - - /** - * @param {RuntimeSpec} runtime only apply to this runtime - * @returns {boolean} true, when something changed - */ - setUsedWithoutInfo(runtime) { - let changed = false; - if (this.setUsed(UsageState.NoInfo, runtime)) { - changed = true; - } - if (this.canMangleUse !== false) { - this.canMangleUse = false; - changed = true; - } - return changed; - } - - setHasUseInfo() { - if (!this._hasUseInRuntimeInfo) { - this._hasUseInRuntimeInfo = true; - } - if (this.canMangleUse === undefined) { - this.canMangleUse = true; - } - if (this.exportsInfoOwned) { - this.exportsInfo.setHasUseInfo(); - } - } - - /** - * @param {function(UsageStateType): boolean} condition compare with old value - * @param {UsageStateType} newValue set when condition is true - * @param {RuntimeSpec} runtime only apply to this runtime - * @returns {boolean} true when something has changed - */ - setUsedConditionally(condition, newValue, runtime) { - if (runtime === undefined) { - if (this._globalUsed === undefined) { - this._globalUsed = newValue; - return true; - } else { - if (this._globalUsed !== newValue && condition(this._globalUsed)) { - this._globalUsed = newValue; - return true; - } - } - } else if (this._usedInRuntime === undefined) { - if (newValue !== UsageState.Unused && condition(UsageState.Unused)) { - this._usedInRuntime = new Map(); - forEachRuntime(runtime, runtime => - this._usedInRuntime.set(runtime, newValue) - ); - return true; - } - } else { - let changed = false; - forEachRuntime(runtime, runtime => { - /** @type {UsageStateType} */ - let oldValue = this._usedInRuntime.get(runtime); - if (oldValue === undefined) oldValue = UsageState.Unused; - if (newValue !== oldValue && condition(oldValue)) { - if (newValue === UsageState.Unused) { - this._usedInRuntime.delete(runtime); - } else { - this._usedInRuntime.set(runtime, newValue); - } - changed = true; - } - }); - if (changed) { - if (this._usedInRuntime.size === 0) this._usedInRuntime = undefined; - return true; - } - } - return false; - } - - /** - * @param {UsageStateType} newValue new value of the used state - * @param {RuntimeSpec} runtime only apply to this runtime - * @returns {boolean} true when something has changed - */ - setUsed(newValue, runtime) { - if (runtime === undefined) { - if (this._globalUsed !== newValue) { - this._globalUsed = newValue; - return true; - } - } else if (this._usedInRuntime === undefined) { - if (newValue !== UsageState.Unused) { - this._usedInRuntime = new Map(); - forEachRuntime(runtime, runtime => - this._usedInRuntime.set(runtime, newValue) - ); - return true; - } - } else { - let changed = false; - forEachRuntime(runtime, runtime => { - /** @type {UsageStateType} */ - let oldValue = this._usedInRuntime.get(runtime); - if (oldValue === undefined) oldValue = UsageState.Unused; - if (newValue !== oldValue) { - if (newValue === UsageState.Unused) { - this._usedInRuntime.delete(runtime); - } else { - this._usedInRuntime.set(runtime, newValue); - } - changed = true; - } - }); - if (changed) { - if (this._usedInRuntime.size === 0) this._usedInRuntime = undefined; - return true; - } - } - return false; - } - - /** - * @param {any} key the key - * @returns {boolean} true, if something has changed - */ - unsetTarget(key) { - if (!this._target) return false; - if (this._target.delete(key)) { - this._maxTarget = undefined; - return true; - } - return false; - } - - /** - * @param {any} key the key - * @param {ModuleGraphConnection} connection the target module if a single one - * @param {string[]=} exportName the exported name - * @param {number=} priority priority - * @returns {boolean} true, if something has changed - */ - setTarget(key, connection, exportName, priority = 0) { - if (exportName) exportName = [...exportName]; - if (!this._target) { - this._target = new Map(); - this._target.set(key, { connection, export: exportName, priority }); - return true; - } - const oldTarget = this._target.get(key); - if (!oldTarget) { - if (oldTarget === null && !connection) return false; - this._target.set(key, { connection, export: exportName, priority }); - this._maxTarget = undefined; - return true; - } - if ( - oldTarget.connection !== connection || - oldTarget.priority !== priority || - (exportName - ? !oldTarget.export || !equals(oldTarget.export, exportName) - : oldTarget.export) - ) { - oldTarget.connection = connection; - oldTarget.export = exportName; - oldTarget.priority = priority; - this._maxTarget = undefined; - return true; - } - return false; - } - - /** - * @param {RuntimeSpec} runtime for this runtime - * @returns {UsageStateType} usage state - */ - getUsed(runtime) { - if (!this._hasUseInRuntimeInfo) return UsageState.NoInfo; - if (this._globalUsed !== undefined) return this._globalUsed; - if (this._usedInRuntime === undefined) { - return UsageState.Unused; - } else if (typeof runtime === "string") { - const value = this._usedInRuntime.get(runtime); - return value === undefined ? UsageState.Unused : value; - } else if (runtime === undefined) { - /** @type {UsageStateType} */ - let max = UsageState.Unused; - for (const value of this._usedInRuntime.values()) { - if (value === UsageState.Used) { - return UsageState.Used; - } - if (max < value) max = value; - } - return max; - } else { - /** @type {UsageStateType} */ - let max = UsageState.Unused; - for (const item of runtime) { - const value = this._usedInRuntime.get(item); - if (value !== undefined) { - if (value === UsageState.Used) { - return UsageState.Used; - } - if (max < value) max = value; - } - } - return max; - } - } - - /** - * get used name - * @param {string | undefined} fallbackName fallback name for used exports with no name - * @param {RuntimeSpec} runtime check usage for this runtime only - * @returns {string | false} used name - */ - getUsedName(fallbackName, runtime) { - if (this._hasUseInRuntimeInfo) { - if (this._globalUsed !== undefined) { - if (this._globalUsed === UsageState.Unused) return false; - } else { - if (this._usedInRuntime === undefined) return false; - if (typeof runtime === "string") { - if (!this._usedInRuntime.has(runtime)) { - return false; - } - } else if (runtime !== undefined) { - if ( - Array.from(runtime).every( - runtime => !this._usedInRuntime.has(runtime) - ) - ) { - return false; - } - } - } - } - if (this._usedName !== null) return this._usedName; - return this.name || fallbackName; - } - - /** - * @returns {boolean} true, when a mangled name of this export is set - */ - hasUsedName() { - return this._usedName !== null; - } - - /** - * Sets the mangled name of this export - * @param {string} name the new name - * @returns {void} - */ - setUsedName(name) { - this._usedName = name; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target - * @returns {ExportInfo | ExportsInfo | undefined} the terminal binding export(s) info if known - */ - getTerminalBinding(moduleGraph, resolveTargetFilter = RETURNS_TRUE) { - if (this.terminalBinding) return this; - const target = this.getTarget(moduleGraph, resolveTargetFilter); - if (!target) return undefined; - const exportsInfo = moduleGraph.getExportsInfo(target.module); - if (!target.export) return exportsInfo; - return exportsInfo.getReadOnlyExportInfoRecursive(target.export); - } - - isReexport() { - return !this.terminalBinding && this._target && this._target.size > 0; - } - - _getMaxTarget() { - if (this._maxTarget !== undefined) return this._maxTarget; - if (this._target.size <= 1) return (this._maxTarget = this._target); - let maxPriority = -Infinity; - let minPriority = Infinity; - for (const { priority } of this._target.values()) { - if (maxPriority < priority) maxPriority = priority; - if (minPriority > priority) minPriority = priority; - } - // This should be very common - if (maxPriority === minPriority) return (this._maxTarget = this._target); - - // This is an edge case - const map = new Map(); - for (const [key, value] of this._target) { - if (maxPriority === value.priority) { - map.set(key, value); - } - } - this._maxTarget = map; - return map; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {function(Module): boolean} validTargetModuleFilter a valid target module - * @returns {{ module: Module, export: string[] | undefined } | undefined | false} the target, undefined when there is no target, false when no target is valid - */ - findTarget(moduleGraph, validTargetModuleFilter) { - return this._findTarget(moduleGraph, validTargetModuleFilter, new Set()); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {function(Module): boolean} validTargetModuleFilter a valid target module - * @param {Set | undefined} alreadyVisited set of already visited export info to avoid circular references - * @returns {{ module: Module, export: string[] | undefined } | undefined | false} the target, undefined when there is no target, false when no target is valid - */ - _findTarget(moduleGraph, validTargetModuleFilter, alreadyVisited) { - if (!this._target || this._target.size === 0) return undefined; - let rawTarget = this._getMaxTarget().values().next().value; - if (!rawTarget) return undefined; - /** @type {{ module: Module, export: string[] | undefined }} */ - let target = { - module: rawTarget.connection.module, - export: rawTarget.export - }; - for (;;) { - if (validTargetModuleFilter(target.module)) return target; - const exportsInfo = moduleGraph.getExportsInfo(target.module); - const exportInfo = exportsInfo.getExportInfo(target.export[0]); - if (alreadyVisited.has(exportInfo)) return null; - const newTarget = exportInfo._findTarget( - moduleGraph, - validTargetModuleFilter, - alreadyVisited - ); - if (!newTarget) return false; - if (target.export.length === 1) { - target = newTarget; - } else { - target = { - module: newTarget.module, - export: newTarget.export - ? newTarget.export.concat(target.export.slice(1)) - : target.export.slice(1) - }; - } - } - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target - * @returns {{ module: Module, export: string[] | undefined } | undefined} the target - */ - getTarget(moduleGraph, resolveTargetFilter = RETURNS_TRUE) { - const result = this._getTarget(moduleGraph, resolveTargetFilter, undefined); - if (result === CIRCULAR) return undefined; - return result; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {function({ module: Module, connection: ModuleGraphConnection, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target - * @param {Set | undefined} alreadyVisited set of already visited export info to avoid circular references - * @returns {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined } | CIRCULAR | undefined} the target - */ - _getTarget(moduleGraph, resolveTargetFilter, alreadyVisited) { - /** - * @param {{ connection: ModuleGraphConnection, export: string[] | undefined } | null} inputTarget unresolved target - * @param {Set} alreadyVisited set of already visited export info to avoid circular references - * @returns {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined } | CIRCULAR | null} resolved target - */ - const resolveTarget = (inputTarget, alreadyVisited) => { - if (!inputTarget) return null; - if (!inputTarget.export) { - return { - module: inputTarget.connection.module, - connection: inputTarget.connection, - export: undefined - }; - } - /** @type {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined }} */ - let target = { - module: inputTarget.connection.module, - connection: inputTarget.connection, - export: inputTarget.export - }; - if (!resolveTargetFilter(target)) return target; - let alreadyVisitedOwned = false; - for (;;) { - const exportsInfo = moduleGraph.getExportsInfo(target.module); - const exportInfo = exportsInfo.getExportInfo(target.export[0]); - if (!exportInfo) return target; - if (alreadyVisited.has(exportInfo)) return CIRCULAR; - const newTarget = exportInfo._getTarget( - moduleGraph, - resolveTargetFilter, - alreadyVisited - ); - if (newTarget === CIRCULAR) return CIRCULAR; - if (!newTarget) return target; - if (target.export.length === 1) { - target = newTarget; - if (!target.export) return target; - } else { - target = { - module: newTarget.module, - connection: newTarget.connection, - export: newTarget.export - ? newTarget.export.concat(target.export.slice(1)) - : target.export.slice(1) - }; - } - if (!resolveTargetFilter(target)) return target; - if (!alreadyVisitedOwned) { - alreadyVisited = new Set(alreadyVisited); - alreadyVisitedOwned = true; - } - alreadyVisited.add(exportInfo); - } - }; - - if (!this._target || this._target.size === 0) return undefined; - if (alreadyVisited && alreadyVisited.has(this)) return CIRCULAR; - const newAlreadyVisited = new Set(alreadyVisited); - newAlreadyVisited.add(this); - const values = this._getMaxTarget().values(); - const target = resolveTarget(values.next().value, newAlreadyVisited); - if (target === CIRCULAR) return CIRCULAR; - if (target === null) return undefined; - let result = values.next(); - while (!result.done) { - const t = resolveTarget(result.value, newAlreadyVisited); - if (t === CIRCULAR) return CIRCULAR; - if (t === null) return undefined; - if (t.module !== target.module) return undefined; - if (!t.export !== !target.export) return undefined; - if (target.export && !equals(t.export, target.export)) return undefined; - result = values.next(); - } - return target; - } - - /** - * Move the target forward as long resolveTargetFilter is fulfilled - * @param {ModuleGraph} moduleGraph the module graph - * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target - * @param {function({ module: Module, export: string[] | undefined }): ModuleGraphConnection=} updateOriginalConnection updates the original connection instead of using the target connection - * @returns {{ module: Module, export: string[] | undefined } | undefined} the resolved target when moved - */ - moveTarget(moduleGraph, resolveTargetFilter, updateOriginalConnection) { - const target = this._getTarget(moduleGraph, resolveTargetFilter, undefined); - if (target === CIRCULAR) return undefined; - if (!target) return undefined; - const originalTarget = this._getMaxTarget().values().next().value; - if ( - originalTarget.connection === target.connection && - originalTarget.export === target.export - ) { - return undefined; - } - this._target.clear(); - this._target.set(undefined, { - connection: updateOriginalConnection - ? updateOriginalConnection(target) - : target.connection, - export: target.export, - priority: 0 - }); - return target; - } - - createNestedExportsInfo() { - if (this.exportsInfoOwned) return this.exportsInfo; - this.exportsInfoOwned = true; - const oldExportsInfo = this.exportsInfo; - this.exportsInfo = new ExportsInfo(); - this.exportsInfo.setHasProvideInfo(); - if (oldExportsInfo) { - this.exportsInfo.setRedirectNamedTo(oldExportsInfo); - } - return this.exportsInfo; - } - - getNestedExportsInfo() { - return this.exportsInfo; - } - - hasInfo(baseInfo, runtime) { - return ( - (this._usedName && this._usedName !== this.name) || - this.provided || - this.terminalBinding || - this.getUsed(runtime) !== baseInfo.getUsed(runtime) - ); - } - - updateHash(hash, runtime) { - this._updateHash(hash, runtime, new Set()); - } - - _updateHash(hash, runtime, alreadyVisitedExportsInfo) { - hash.update( - `${this._usedName || this.name}${this.getUsed(runtime)}${this.provided}${ - this.terminalBinding - }` - ); - if (this.exportsInfo && !alreadyVisitedExportsInfo.has(this.exportsInfo)) { - this.exportsInfo._updateHash(hash, runtime, alreadyVisitedExportsInfo); - } - } - - getUsedInfo() { - if (this._globalUsed !== undefined) { - switch (this._globalUsed) { - case UsageState.Unused: - return "unused"; - case UsageState.NoInfo: - return "no usage info"; - case UsageState.Unknown: - return "maybe used (runtime-defined)"; - case UsageState.Used: - return "used"; - case UsageState.OnlyPropertiesUsed: - return "only properties used"; - } - } else if (this._usedInRuntime !== undefined) { - /** @type {Map} */ - const map = new Map(); - for (const [runtime, used] of this._usedInRuntime) { - const list = map.get(used); - if (list !== undefined) list.push(runtime); - else map.set(used, [runtime]); - } - const specificInfo = Array.from(map, ([used, runtimes]) => { - switch (used) { - case UsageState.NoInfo: - return `no usage info in ${runtimes.join(", ")}`; - case UsageState.Unknown: - return `maybe used in ${runtimes.join(", ")} (runtime-defined)`; - case UsageState.Used: - return `used in ${runtimes.join(", ")}`; - case UsageState.OnlyPropertiesUsed: - return `only properties used in ${runtimes.join(", ")}`; - } - }); - if (specificInfo.length > 0) { - return specificInfo.join("; "); - } - } - return this._hasUseInRuntimeInfo ? "unused" : "no usage info"; - } - - getProvidedInfo() { - switch (this.provided) { - case undefined: - return "no provided info"; - case null: - return "maybe provided (runtime-defined)"; - case true: - return "provided"; - case false: - return "not provided"; - } - } - - getRenameInfo() { - if (this._usedName !== null && this._usedName !== this.name) { - return `renamed to ${JSON.stringify(this._usedName).slice(1, -1)}`; - } - switch (this.canMangleProvide) { - case undefined: - switch (this.canMangleUse) { - case undefined: - return "missing provision and use info prevents renaming"; - case false: - return "usage prevents renaming (no provision info)"; - case true: - return "missing provision info prevents renaming"; - } - break; - case true: - switch (this.canMangleUse) { - case undefined: - return "missing usage info prevents renaming"; - case false: - return "usage prevents renaming"; - case true: - return "could be renamed"; - } - break; - case false: - switch (this.canMangleUse) { - case undefined: - return "provision prevents renaming (no use info)"; - case false: - return "usage and provision prevents renaming"; - case true: - return "provision prevents renaming"; - } - break; - } - throw new Error( - `Unexpected flags for getRenameInfo ${this.canMangleProvide} ${this.canMangleUse}` - ); - } -} - -module.exports = ExportsInfo; -module.exports.ExportInfo = ExportInfo; -module.exports.UsageState = UsageState; - - -/***/ }), - -/***/ 38460: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConstDependency = __webpack_require__(14367); -const ExportsInfoDependency = __webpack_require__(36853); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -class ExportsInfoApiPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "ExportsInfoApiPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ExportsInfoDependency, - new ExportsInfoDependency.Template() - ); - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - const handler = parser => { - parser.hooks.expressionMemberChain - .for("__webpack_exports_info__") - .tap("ExportsInfoApiPlugin", (expr, members) => { - const dep = - members.length >= 2 - ? new ExportsInfoDependency( - expr.range, - members.slice(0, -1), - members[members.length - 1] - ) - : new ExportsInfoDependency(expr.range, null, members[0]); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return true; - }); - parser.hooks.expression - .for("__webpack_exports_info__") - .tap("ExportsInfoApiPlugin", expr => { - const dep = new ConstDependency("true", expr.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ExportsInfoApiPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("ExportsInfoApiPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ExportsInfoApiPlugin", handler); - } - ); - } -} - -module.exports = ExportsInfoApiPlugin; - - -/***/ }), - -/***/ 73096: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { OriginalSource, RawSource } = __webpack_require__(51255); -const ConcatenationScope = __webpack_require__(81701); -const { UsageState } = __webpack_require__(13168); -const InitFragment = __webpack_require__(64768); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const StaticExportsDependency = __webpack_require__(19383); -const createHash = __webpack_require__(85205); -const extractUrlAndGlobal = __webpack_require__(45045); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const { register } = __webpack_require__(7591); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./ExportsInfo")} ExportsInfo */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./javascript/JavascriptModulesPlugin").ChunkRenderContext} ChunkRenderContext */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {typeof import("./util/Hash")} HashConstructor */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} SourceData - * @property {boolean=} iife - * @property {string=} init - * @property {string} expression - * @property {InitFragment[]=} chunkInitFragments - * @property {ReadonlySet=} runtimeRequirements - */ - -const TYPES = new Set(["javascript"]); -const CSS_TYPES = new Set(["css-import"]); -const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); -const RUNTIME_REQUIREMENTS_FOR_SCRIPT = new Set([RuntimeGlobals.loadScript]); -const RUNTIME_REQUIREMENTS_FOR_MODULE = new Set([ - RuntimeGlobals.definePropertyGetters -]); -const EMPTY_RUNTIME_REQUIREMENTS = new Set([]); - -/** - * @param {string|string[]} variableName the variable name or path - * @param {string} type the module system - * @returns {SourceData} the generated source - */ -const getSourceForGlobalVariableExternal = (variableName, type) => { - if (!Array.isArray(variableName)) { - // make it an array as the look up works the same basically - variableName = [variableName]; - } - - // needed for e.g. window["some"]["thing"] - const objectLookup = variableName.map(r => `[${JSON.stringify(r)}]`).join(""); - return { - iife: type === "this", - expression: `${type}${objectLookup}` - }; -}; - -/** - * @param {string|string[]} moduleAndSpecifiers the module request - * @returns {SourceData} the generated source - */ -const getSourceForCommonJsExternal = moduleAndSpecifiers => { - if (!Array.isArray(moduleAndSpecifiers)) { - return { - expression: `require(${JSON.stringify(moduleAndSpecifiers)})` - }; - } - const moduleName = moduleAndSpecifiers[0]; - return { - expression: `require(${JSON.stringify(moduleName)})${propertyAccess( - moduleAndSpecifiers, - 1 - )}` - }; -}; - -/** - * @param {string|string[]} moduleAndSpecifiers the module request - * @returns {SourceData} the generated source - */ -const getSourceForCommonJsExternalInNodeModule = moduleAndSpecifiers => { - const chunkInitFragments = [ - new InitFragment( - 'import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";\n', - InitFragment.STAGE_HARMONY_IMPORTS, - 0, - "external module node-commonjs" - ) - ]; - if (!Array.isArray(moduleAndSpecifiers)) { - return { - expression: `__WEBPACK_EXTERNAL_createRequire(import.meta.url)(${JSON.stringify( - moduleAndSpecifiers - )})`, - chunkInitFragments - }; - } - const moduleName = moduleAndSpecifiers[0]; - return { - expression: `__WEBPACK_EXTERNAL_createRequire(import.meta.url)(${JSON.stringify( - moduleName - )})${propertyAccess(moduleAndSpecifiers, 1)}`, - chunkInitFragments - }; -}; - -/** - * @param {string|string[]} moduleAndSpecifiers the module request - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @returns {SourceData} the generated source - */ -const getSourceForImportExternal = (moduleAndSpecifiers, runtimeTemplate) => { - const importName = runtimeTemplate.outputOptions.importFunctionName; - if (!runtimeTemplate.supportsDynamicImport() && importName === "import") { - throw new Error( - "The target environment doesn't support 'import()' so it's not possible to use external type 'import'" - ); - } - if (!Array.isArray(moduleAndSpecifiers)) { - return { - expression: `${importName}(${JSON.stringify(moduleAndSpecifiers)});` - }; - } - if (moduleAndSpecifiers.length === 1) { - return { - expression: `${importName}(${JSON.stringify(moduleAndSpecifiers[0])});` - }; - } - const moduleName = moduleAndSpecifiers[0]; - return { - expression: `${importName}(${JSON.stringify( - moduleName - )}).then(${runtimeTemplate.returningFunction( - `module${propertyAccess(moduleAndSpecifiers, 1)}`, - "module" - )});` - }; -}; - -class ModuleExternalInitFragment extends InitFragment { - /** - * @param {string} request import source - * @param {string=} ident recomputed ident - * @param {string | HashConstructor=} hashFunction the hash function to use - */ - constructor(request, ident, hashFunction = "md4") { - if (ident === undefined) { - ident = Template.toIdentifier(request); - if (ident !== request) { - ident += `_${createHash(hashFunction) - .update(request) - .digest("hex") - .slice(0, 8)}`; - } - } - const identifier = `__WEBPACK_EXTERNAL_MODULE_${ident}__`; - super( - `import * as ${identifier} from ${JSON.stringify(request)};\n`, - InitFragment.STAGE_HARMONY_IMPORTS, - 0, - `external module import ${ident}` - ); - this._ident = ident; - this._identifier = identifier; - this._request = request; - } - - getNamespaceIdentifier() { - return this._identifier; - } -} - -register( - ModuleExternalInitFragment, - "webpack/lib/ExternalModule", - "ModuleExternalInitFragment", - { - serialize(obj, { write }) { - write(obj._request); - write(obj._ident); - }, - deserialize({ read }) { - return new ModuleExternalInitFragment(read(), read()); - } - } -); - -const generateModuleRemapping = (input, exportsInfo, runtime) => { - if (exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused) { - const properties = []; - for (const exportInfo of exportsInfo.orderedExports) { - const used = exportInfo.getUsedName(exportInfo.name, runtime); - if (!used) continue; - const nestedInfo = exportInfo.getNestedExportsInfo(); - if (nestedInfo) { - const nestedExpr = generateModuleRemapping( - `${input}${propertyAccess([exportInfo.name])}`, - nestedInfo - ); - if (nestedExpr) { - properties.push(`[${JSON.stringify(used)}]: y(${nestedExpr})`); - continue; - } - } - properties.push( - `[${JSON.stringify(used)}]: () => ${input}${propertyAccess([ - exportInfo.name - ])}` - ); - } - return `x({ ${properties.join(", ")} })`; - } -}; - -/** - * @param {string|string[]} moduleAndSpecifiers the module request - * @param {ExportsInfo} exportsInfo exports info of this module - * @param {RuntimeSpec} runtime the runtime - * @param {string | HashConstructor=} hashFunction the hash function to use - * @returns {SourceData} the generated source - */ -const getSourceForModuleExternal = ( - moduleAndSpecifiers, - exportsInfo, - runtime, - hashFunction -) => { - if (!Array.isArray(moduleAndSpecifiers)) - moduleAndSpecifiers = [moduleAndSpecifiers]; - const initFragment = new ModuleExternalInitFragment( - moduleAndSpecifiers[0], - undefined, - hashFunction - ); - const baseAccess = `${initFragment.getNamespaceIdentifier()}${propertyAccess( - moduleAndSpecifiers, - 1 - )}`; - const moduleRemapping = generateModuleRemapping( - baseAccess, - exportsInfo, - runtime - ); - let expression = moduleRemapping || baseAccess; - return { - expression, - init: `var x = y => { var x = {}; ${RuntimeGlobals.definePropertyGetters}(x, y); return x; }\nvar y = x => () => x`, - runtimeRequirements: moduleRemapping - ? RUNTIME_REQUIREMENTS_FOR_MODULE - : undefined, - chunkInitFragments: [initFragment] - }; -}; - -/** - * @param {string|string[]} urlAndGlobal the script request - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @returns {SourceData} the generated source - */ -const getSourceForScriptExternal = (urlAndGlobal, runtimeTemplate) => { - if (typeof urlAndGlobal === "string") { - urlAndGlobal = extractUrlAndGlobal(urlAndGlobal); - } - const url = urlAndGlobal[0]; - const globalName = urlAndGlobal[1]; - return { - init: "var __webpack_error__ = new Error();", - expression: `new Promise(${runtimeTemplate.basicFunction( - "resolve, reject", - [ - `if(typeof ${globalName} !== "undefined") return resolve();`, - `${RuntimeGlobals.loadScript}(${JSON.stringify( - url - )}, ${runtimeTemplate.basicFunction("event", [ - `if(typeof ${globalName} !== "undefined") return resolve();`, - "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", - "var realSrc = event && event.target && event.target.src;", - "__webpack_error__.message = 'Loading script failed.\\n(' + errorType + ': ' + realSrc + ')';", - "__webpack_error__.name = 'ScriptExternalLoadError';", - "__webpack_error__.type = errorType;", - "__webpack_error__.request = realSrc;", - "reject(__webpack_error__);" - ])}, ${JSON.stringify(globalName)});` - ] - )}).then(${runtimeTemplate.returningFunction( - `${globalName}${propertyAccess(urlAndGlobal, 2)}` - )})`, - runtimeRequirements: RUNTIME_REQUIREMENTS_FOR_SCRIPT - }; -}; - -/** - * @param {string} variableName the variable name to check - * @param {string} request the request path - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @returns {string} the generated source - */ -const checkExternalVariable = (variableName, request, runtimeTemplate) => { - return `if(typeof ${variableName} === 'undefined') { ${runtimeTemplate.throwMissingModuleErrorBlock( - { request } - )} }\n`; -}; - -/** - * @param {string|number} id the module id - * @param {boolean} optional true, if the module is optional - * @param {string|string[]} request the request path - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @returns {SourceData} the generated source - */ -const getSourceForAmdOrUmdExternal = ( - id, - optional, - request, - runtimeTemplate -) => { - const externalVariable = `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( - `${id}` - )}__`; - return { - init: optional - ? checkExternalVariable( - externalVariable, - Array.isArray(request) ? request.join(".") : request, - runtimeTemplate - ) - : undefined, - expression: externalVariable - }; -}; - -/** - * @param {boolean} optional true, if the module is optional - * @param {string|string[]} request the request path - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @returns {SourceData} the generated source - */ -const getSourceForDefaultCase = (optional, request, runtimeTemplate) => { - if (!Array.isArray(request)) { - // make it an array as the look up works the same basically - request = [request]; - } - - const variableName = request[0]; - const objectLookup = propertyAccess(request, 1); - return { - init: optional - ? checkExternalVariable(variableName, request.join("."), runtimeTemplate) - : undefined, - expression: `${variableName}${objectLookup}` - }; -}; - -class ExternalModule extends Module { - constructor(request, type, userRequest) { - super("javascript/dynamic", null); - - // Info from Factory - /** @type {string | string[] | Record} */ - this.request = request; - /** @type {string} */ - this.externalType = type; - /** @type {string} */ - this.userRequest = userRequest; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return this.externalType === "css-import" ? CSS_TYPES : TYPES; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return this.userRequest; - } - - /** - * @param {Chunk} chunk the chunk which condition should be checked - * @param {Compilation} compilation the compilation - * @returns {boolean} true, if the chunk is ok for the module - */ - chunkCondition(chunk, { chunkGraph }) { - return this.externalType === "css-import" - ? true - : chunkGraph.getNumberOfEntryModules(chunk) > 0; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `external ${this.externalType} ${JSON.stringify(this.request)}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return "external " + JSON.stringify(this.request); - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = { - async: false, - exportsType: undefined - }; - this.buildInfo = { - strict: true, - topLevelDeclarations: new Set(), - module: compilation.outputOptions.module - }; - const { request, externalType } = this._getRequestAndExternalType(); - this.buildMeta.exportsType = "dynamic"; - let canMangle = false; - this.clearDependenciesAndBlocks(); - switch (externalType) { - case "this": - this.buildInfo.strict = false; - break; - case "system": - if (!Array.isArray(request) || request.length === 1) { - this.buildMeta.exportsType = "namespace"; - canMangle = true; - } - break; - case "module": - if (this.buildInfo.module) { - if (!Array.isArray(request) || request.length === 1) { - this.buildMeta.exportsType = "namespace"; - canMangle = true; - } - } else { - this.buildMeta.async = true; - if (!Array.isArray(request) || request.length === 1) { - this.buildMeta.exportsType = "namespace"; - canMangle = false; - } - } - break; - case "script": - case "promise": - this.buildMeta.async = true; - break; - case "import": - this.buildMeta.async = true; - if (!Array.isArray(request) || request.length === 1) { - this.buildMeta.exportsType = "namespace"; - canMangle = false; - } - break; - } - this.addDependency(new StaticExportsDependency(true, canMangle)); - callback(); - } - - restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory) { - this._restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory); - } - - /** - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason({ moduleGraph }) { - switch (this.externalType) { - case "amd": - case "amd-require": - case "umd": - case "umd2": - case "system": - case "jsonp": - return `${this.externalType} externals can't be concatenated`; - } - return undefined; - } - - _getRequestAndExternalType() { - let { request, externalType } = this; - if (typeof request === "object" && !Array.isArray(request)) - request = request[externalType]; - return { request, externalType }; - } - - _getSourceData( - request, - externalType, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime - ) { - switch (externalType) { - case "this": - case "window": - case "self": - return getSourceForGlobalVariableExternal(request, this.externalType); - case "global": - return getSourceForGlobalVariableExternal( - request, - runtimeTemplate.globalObject - ); - case "commonjs": - case "commonjs2": - case "commonjs-module": - case "commonjs-static": - return getSourceForCommonJsExternal(request); - case "node-commonjs": - return this.buildInfo.module - ? getSourceForCommonJsExternalInNodeModule(request) - : getSourceForCommonJsExternal(request); - case "amd": - case "amd-require": - case "umd": - case "umd2": - case "system": - case "jsonp": { - const id = chunkGraph.getModuleId(this); - return getSourceForAmdOrUmdExternal( - id !== null ? id : this.identifier(), - this.isOptional(moduleGraph), - request, - runtimeTemplate - ); - } - case "import": - return getSourceForImportExternal(request, runtimeTemplate); - case "script": - return getSourceForScriptExternal(request, runtimeTemplate); - case "module": { - if (!this.buildInfo.module) { - if (!runtimeTemplate.supportsDynamicImport()) { - throw new Error( - "The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script" + - (runtimeTemplate.supportsEcmaScriptModuleSyntax() - ? "\nDid you mean to build a EcmaScript Module ('output.module: true')?" - : "") - ); - } - return getSourceForImportExternal(request, runtimeTemplate); - } - if (!runtimeTemplate.supportsEcmaScriptModuleSyntax()) { - throw new Error( - "The target environment doesn't support EcmaScriptModule syntax so it's not possible to use external type 'module'" - ); - } - return getSourceForModuleExternal( - request, - moduleGraph.getExportsInfo(this), - runtime, - runtimeTemplate.outputOptions.hashFunction - ); - } - case "var": - case "promise": - case "const": - case "let": - case "assign": - default: - return getSourceForDefaultCase( - this.isOptional(moduleGraph), - request, - runtimeTemplate - ); - } - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime, - concatenationScope - }) { - const { request, externalType } = this._getRequestAndExternalType(); - switch (externalType) { - case "asset": { - const sources = new Map(); - sources.set( - "javascript", - new RawSource(`module.exports = ${JSON.stringify(request)};`) - ); - const data = new Map(); - data.set("url", request); - return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS, data }; - } - case "css-import": { - const sources = new Map(); - sources.set( - "css-import", - new RawSource(`@import url(${JSON.stringify(request)});`) - ); - return { - sources, - runtimeRequirements: EMPTY_RUNTIME_REQUIREMENTS - }; - } - default: { - const sourceData = this._getSourceData( - request, - externalType, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime - ); - - let sourceString = sourceData.expression; - if (sourceData.iife) - sourceString = `(function() { return ${sourceString}; }())`; - if (concatenationScope) { - sourceString = `${ - runtimeTemplate.supportsConst() ? "const" : "var" - } ${ConcatenationScope.NAMESPACE_OBJECT_EXPORT} = ${sourceString};`; - concatenationScope.registerNamespaceExport( - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - ); - } else { - sourceString = `module.exports = ${sourceString};`; - } - if (sourceData.init) - sourceString = `${sourceData.init}\n${sourceString}`; - - let data = undefined; - if (sourceData.chunkInitFragments) { - data = new Map(); - data.set("chunkInitFragments", sourceData.chunkInitFragments); - } - - const sources = new Map(); - if (this.useSourceMap || this.useSimpleSourceMap) { - sources.set( - "javascript", - new OriginalSource(sourceString, this.identifier()) - ); - } else { - sources.set("javascript", new RawSource(sourceString)); - } - - let runtimeRequirements = sourceData.runtimeRequirements; - if (!concatenationScope) { - if (!runtimeRequirements) { - runtimeRequirements = RUNTIME_REQUIREMENTS; - } else { - const set = new Set(runtimeRequirements); - set.add(RuntimeGlobals.module); - runtimeRequirements = set; - } - } - - return { - sources, - runtimeRequirements: - runtimeRequirements || EMPTY_RUNTIME_REQUIREMENTS, - data - }; - } - } - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 42; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - const { chunkGraph } = context; - hash.update( - `${this.externalType}${JSON.stringify(this.request)}${this.isOptional( - chunkGraph.moduleGraph - )}` - ); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - - write(this.request); - write(this.externalType); - write(this.userRequest); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.request = read(); - this.externalType = read(); - this.userRequest = read(); - - super.deserialize(context); - } -} - -makeSerializable(ExternalModule, "webpack/lib/ExternalModule"); - -module.exports = ExternalModule; - - -/***/ }), - -/***/ 69452: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const ExternalModule = __webpack_require__(73096); -const { resolveByProperty, cachedSetProperty } = __webpack_require__(22093); - -/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ -/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ - -const UNSPECIFIED_EXTERNAL_TYPE_REGEXP = /^[a-z0-9-]+ /; -const EMPTY_RESOLVE_OPTIONS = {}; - -// TODO webpack 6 remove this -const callDeprecatedExternals = util.deprecate( - (externalsFunction, context, request, cb) => { - externalsFunction.call(null, context, request, cb); - }, - "The externals-function should be defined like ({context, request}, cb) => { ... }", - "DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS" -); - -const cache = new WeakMap(); - -const resolveLayer = (obj, layer) => { - let map = cache.get(obj); - if (map === undefined) { - map = new Map(); - cache.set(obj, map); - } else { - const cacheEntry = map.get(layer); - if (cacheEntry !== undefined) return cacheEntry; - } - const result = resolveByProperty(obj, "byLayer", layer); - map.set(layer, result); - return result; -}; - -class ExternalModuleFactoryPlugin { - /** - * @param {string | undefined} type default external type - * @param {Externals} externals externals config - */ - constructor(type, externals) { - this.type = type; - this.externals = externals; - } - - /** - * @param {NormalModuleFactory} normalModuleFactory the normal module factory - * @returns {void} - */ - apply(normalModuleFactory) { - const globalType = this.type; - normalModuleFactory.hooks.factorize.tapAsync( - "ExternalModuleFactoryPlugin", - (data, callback) => { - const context = data.context; - const contextInfo = data.contextInfo; - const dependency = data.dependencies[0]; - const dependencyType = data.dependencyType; - - /** - * @param {string|string[]|boolean|Record} value the external config - * @param {string|undefined} type type of external - * @param {function(Error=, ExternalModule=): void} callback callback - * @returns {void} - */ - const handleExternal = (value, type, callback) => { - if (value === false) { - // Not externals, fallback to original factory - return callback(); - } - /** @type {string | string[] | Record} */ - let externalConfig; - if (value === true) { - externalConfig = dependency.request; - } else { - externalConfig = value; - } - // When no explicit type is specified, extract it from the externalConfig - if (type === undefined) { - if ( - typeof externalConfig === "string" && - UNSPECIFIED_EXTERNAL_TYPE_REGEXP.test(externalConfig) - ) { - const idx = externalConfig.indexOf(" "); - type = externalConfig.slice(0, idx); - externalConfig = externalConfig.slice(idx + 1); - } else if ( - Array.isArray(externalConfig) && - externalConfig.length > 0 && - UNSPECIFIED_EXTERNAL_TYPE_REGEXP.test(externalConfig[0]) - ) { - const firstItem = externalConfig[0]; - const idx = firstItem.indexOf(" "); - type = firstItem.slice(0, idx); - externalConfig = [ - firstItem.slice(idx + 1), - ...externalConfig.slice(1) - ]; - } - } - callback( - null, - new ExternalModule( - externalConfig, - type || globalType, - dependency.request - ) - ); - }; - - /** - * @param {Externals} externals externals config - * @param {function((Error | null)=, ExternalModule=): void} callback callback - * @returns {void} - */ - const handleExternals = (externals, callback) => { - if (typeof externals === "string") { - if (externals === dependency.request) { - return handleExternal(dependency.request, undefined, callback); - } - } else if (Array.isArray(externals)) { - let i = 0; - const next = () => { - let asyncFlag; - const handleExternalsAndCallback = (err, module) => { - if (err) return callback(err); - if (!module) { - if (asyncFlag) { - asyncFlag = false; - return; - } - return next(); - } - callback(null, module); - }; - - do { - asyncFlag = true; - if (i >= externals.length) return callback(); - handleExternals(externals[i++], handleExternalsAndCallback); - } while (!asyncFlag); - asyncFlag = false; - }; - - next(); - return; - } else if (externals instanceof RegExp) { - if (externals.test(dependency.request)) { - return handleExternal(dependency.request, undefined, callback); - } - } else if (typeof externals === "function") { - const cb = (err, value, type) => { - if (err) return callback(err); - if (value !== undefined) { - handleExternal(value, type, callback); - } else { - callback(); - } - }; - if (externals.length === 3) { - // TODO webpack 6 remove this - callDeprecatedExternals( - externals, - context, - dependency.request, - cb - ); - } else { - const promise = externals( - { - context, - request: dependency.request, - dependencyType, - contextInfo, - getResolve: options => (context, request, callback) => { - const resolveContext = { - fileDependencies: data.fileDependencies, - missingDependencies: data.missingDependencies, - contextDependencies: data.contextDependencies - }; - let resolver = normalModuleFactory.getResolver( - "normal", - dependencyType - ? cachedSetProperty( - data.resolveOptions || EMPTY_RESOLVE_OPTIONS, - "dependencyType", - dependencyType - ) - : data.resolveOptions - ); - if (options) resolver = resolver.withOptions(options); - if (callback) { - resolver.resolve( - {}, - context, - request, - resolveContext, - callback - ); - } else { - return new Promise((resolve, reject) => { - resolver.resolve( - {}, - context, - request, - resolveContext, - (err, result) => { - if (err) reject(err); - else resolve(result); - } - ); - }); - } - } - }, - cb - ); - if (promise && promise.then) promise.then(r => cb(null, r), cb); - } - return; - } else if (typeof externals === "object") { - const resolvedExternals = resolveLayer( - externals, - contextInfo.issuerLayer - ); - if ( - Object.prototype.hasOwnProperty.call( - resolvedExternals, - dependency.request - ) - ) { - return handleExternal( - resolvedExternals[dependency.request], - undefined, - callback - ); - } - } - callback(); - }; - - handleExternals(this.externals, callback); - } - ); - } -} -module.exports = ExternalModuleFactoryPlugin; - - -/***/ }), - -/***/ 51562: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ExternalModuleFactoryPlugin = __webpack_require__(69452); - -/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ -/** @typedef {import("./Compiler")} Compiler */ - -class ExternalsPlugin { - /** - * @param {string | undefined} type default external type - * @param {Externals} externals externals config - */ - constructor(type, externals) { - this.type = type; - this.externals = externals; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compile.tap("ExternalsPlugin", ({ normalModuleFactory }) => { - new ExternalModuleFactoryPlugin(this.type, this.externals).apply( - normalModuleFactory - ); - }); - } -} - -module.exports = ExternalsPlugin; - - -/***/ }), - -/***/ 67469: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { create: createResolver } = __webpack_require__(958); -const nodeModule = __webpack_require__(98188); -const asyncLib = __webpack_require__(78175); -const { isAbsolute } = __webpack_require__(71017); -const AsyncQueue = __webpack_require__(51491); -const StackedCacheMap = __webpack_require__(91047); -const createHash = __webpack_require__(85205); -const { join, dirname, relative, lstatReadlinkAbsolute } = __webpack_require__(47077); -const makeSerializable = __webpack_require__(65764); -const processAsyncTree = __webpack_require__(64102); - -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./logging/Logger").Logger} Logger */ -/** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").IStats} IStats */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const supportsEsm = +process.versions.modules >= 83; - -const builtinModules = new Set(nodeModule.builtinModules); - -let FS_ACCURACY = 2000; - -const EMPTY_SET = new Set(); - -const RBDT_RESOLVE_CJS = 0; -const RBDT_RESOLVE_ESM = 1; -const RBDT_RESOLVE_DIRECTORY = 2; -const RBDT_RESOLVE_CJS_FILE = 3; -const RBDT_RESOLVE_CJS_FILE_AS_CHILD = 4; -const RBDT_RESOLVE_ESM_FILE = 5; -const RBDT_DIRECTORY = 6; -const RBDT_FILE = 7; -const RBDT_DIRECTORY_DEPENDENCIES = 8; -const RBDT_FILE_DEPENDENCIES = 9; - -const INVALID = Symbol("invalid"); - -/** - * @typedef {Object} FileSystemInfoEntry - * @property {number} safeTime - * @property {number=} timestamp - */ - -/** - * @typedef {Object} ResolvedContextFileSystemInfoEntry - * @property {number} safeTime - * @property {string=} timestampHash - */ - -/** - * @typedef {Object} ContextFileSystemInfoEntry - * @property {number} safeTime - * @property {string=} timestampHash - * @property {ResolvedContextFileSystemInfoEntry=} resolved - * @property {Set=} symlinks - */ - -/** - * @typedef {Object} TimestampAndHash - * @property {number} safeTime - * @property {number=} timestamp - * @property {string} hash - */ - -/** - * @typedef {Object} ResolvedContextTimestampAndHash - * @property {number} safeTime - * @property {string=} timestampHash - * @property {string} hash - */ - -/** - * @typedef {Object} ContextTimestampAndHash - * @property {number} safeTime - * @property {string=} timestampHash - * @property {string} hash - * @property {ResolvedContextTimestampAndHash=} resolved - * @property {Set=} symlinks - */ - -/** - * @typedef {Object} ContextHash - * @property {string} hash - * @property {string=} resolved - * @property {Set=} symlinks - */ - -/** - * @typedef {Object} SnapshotOptimizationEntry - * @property {Snapshot} snapshot - * @property {number} shared - * @property {Set} snapshotContent - * @property {Set} children - */ - -/** - * @typedef {Object} ResolveBuildDependenciesResult - * @property {Set} files list of files - * @property {Set} directories list of directories - * @property {Set} missing list of missing entries - * @property {Map} resolveResults stored resolve results - * @property {Object} resolveDependencies dependencies of the resolving - * @property {Set} resolveDependencies.files list of files - * @property {Set} resolveDependencies.directories list of directories - * @property {Set} resolveDependencies.missing list of missing entries - */ - -const DONE_ITERATOR_RESULT = new Set().keys().next(); - -// cspell:word tshs -// Tsh = Timestamp + Hash -// Tshs = Timestamp + Hash combinations - -class SnapshotIterator { - constructor(next) { - this.next = next; - } -} - -class SnapshotIterable { - constructor(snapshot, getMaps) { - this.snapshot = snapshot; - this.getMaps = getMaps; - } - - [Symbol.iterator]() { - let state = 0; - /** @type {IterableIterator} */ - let it; - /** @type {(Snapshot) => (Map | Set)[]} */ - let getMaps; - /** @type {(Map | Set)[]} */ - let maps; - /** @type {Snapshot} */ - let snapshot; - let queue; - return new SnapshotIterator(() => { - for (;;) { - switch (state) { - case 0: - snapshot = this.snapshot; - getMaps = this.getMaps; - maps = getMaps(snapshot); - state = 1; - /* falls through */ - case 1: - if (maps.length > 0) { - const map = maps.pop(); - if (map !== undefined) { - it = map.keys(); - state = 2; - } else { - break; - } - } else { - state = 3; - break; - } - /* falls through */ - case 2: { - const result = it.next(); - if (!result.done) return result; - state = 1; - break; - } - case 3: { - const children = snapshot.children; - if (children !== undefined) { - if (children.size === 1) { - // shortcut for a single child - // avoids allocation of queue - for (const child of children) snapshot = child; - maps = getMaps(snapshot); - state = 1; - break; - } - if (queue === undefined) queue = []; - for (const child of children) { - queue.push(child); - } - } - if (queue !== undefined && queue.length > 0) { - snapshot = queue.pop(); - maps = getMaps(snapshot); - state = 1; - break; - } else { - state = 4; - } - } - /* falls through */ - case 4: - return DONE_ITERATOR_RESULT; - } - } - }); - } -} - -class Snapshot { - constructor() { - this._flags = 0; - /** @type {Iterable | undefined} */ - this._cachedFileIterable = undefined; - /** @type {Iterable | undefined} */ - this._cachedContextIterable = undefined; - /** @type {Iterable | undefined} */ - this._cachedMissingIterable = undefined; - /** @type {number | undefined} */ - this.startTime = undefined; - /** @type {Map | undefined} */ - this.fileTimestamps = undefined; - /** @type {Map | undefined} */ - this.fileHashes = undefined; - /** @type {Map | undefined} */ - this.fileTshs = undefined; - /** @type {Map | undefined} */ - this.contextTimestamps = undefined; - /** @type {Map | undefined} */ - this.contextHashes = undefined; - /** @type {Map | undefined} */ - this.contextTshs = undefined; - /** @type {Map | undefined} */ - this.missingExistence = undefined; - /** @type {Map | undefined} */ - this.managedItemInfo = undefined; - /** @type {Set | undefined} */ - this.managedFiles = undefined; - /** @type {Set | undefined} */ - this.managedContexts = undefined; - /** @type {Set | undefined} */ - this.managedMissing = undefined; - /** @type {Set | undefined} */ - this.children = undefined; - } - - hasStartTime() { - return (this._flags & 1) !== 0; - } - - setStartTime(value) { - this._flags = this._flags | 1; - this.startTime = value; - } - - setMergedStartTime(value, snapshot) { - if (value) { - if (snapshot.hasStartTime()) { - this.setStartTime(Math.min(value, snapshot.startTime)); - } else { - this.setStartTime(value); - } - } else { - if (snapshot.hasStartTime()) this.setStartTime(snapshot.startTime); - } - } - - hasFileTimestamps() { - return (this._flags & 2) !== 0; - } - - setFileTimestamps(value) { - this._flags = this._flags | 2; - this.fileTimestamps = value; - } - - hasFileHashes() { - return (this._flags & 4) !== 0; - } - - setFileHashes(value) { - this._flags = this._flags | 4; - this.fileHashes = value; - } - - hasFileTshs() { - return (this._flags & 8) !== 0; - } - - setFileTshs(value) { - this._flags = this._flags | 8; - this.fileTshs = value; - } - - hasContextTimestamps() { - return (this._flags & 0x10) !== 0; - } - - setContextTimestamps(value) { - this._flags = this._flags | 0x10; - this.contextTimestamps = value; - } - - hasContextHashes() { - return (this._flags & 0x20) !== 0; - } - - setContextHashes(value) { - this._flags = this._flags | 0x20; - this.contextHashes = value; - } - - hasContextTshs() { - return (this._flags & 0x40) !== 0; - } - - setContextTshs(value) { - this._flags = this._flags | 0x40; - this.contextTshs = value; - } - - hasMissingExistence() { - return (this._flags & 0x80) !== 0; - } - - setMissingExistence(value) { - this._flags = this._flags | 0x80; - this.missingExistence = value; - } - - hasManagedItemInfo() { - return (this._flags & 0x100) !== 0; - } - - setManagedItemInfo(value) { - this._flags = this._flags | 0x100; - this.managedItemInfo = value; - } - - hasManagedFiles() { - return (this._flags & 0x200) !== 0; - } - - setManagedFiles(value) { - this._flags = this._flags | 0x200; - this.managedFiles = value; - } - - hasManagedContexts() { - return (this._flags & 0x400) !== 0; - } - - setManagedContexts(value) { - this._flags = this._flags | 0x400; - this.managedContexts = value; - } - - hasManagedMissing() { - return (this._flags & 0x800) !== 0; - } - - setManagedMissing(value) { - this._flags = this._flags | 0x800; - this.managedMissing = value; - } - - hasChildren() { - return (this._flags & 0x1000) !== 0; - } - - setChildren(value) { - this._flags = this._flags | 0x1000; - this.children = value; - } - - addChild(child) { - if (!this.hasChildren()) { - this.setChildren(new Set()); - } - this.children.add(child); - } - - serialize({ write }) { - write(this._flags); - if (this.hasStartTime()) write(this.startTime); - if (this.hasFileTimestamps()) write(this.fileTimestamps); - if (this.hasFileHashes()) write(this.fileHashes); - if (this.hasFileTshs()) write(this.fileTshs); - if (this.hasContextTimestamps()) write(this.contextTimestamps); - if (this.hasContextHashes()) write(this.contextHashes); - if (this.hasContextTshs()) write(this.contextTshs); - if (this.hasMissingExistence()) write(this.missingExistence); - if (this.hasManagedItemInfo()) write(this.managedItemInfo); - if (this.hasManagedFiles()) write(this.managedFiles); - if (this.hasManagedContexts()) write(this.managedContexts); - if (this.hasManagedMissing()) write(this.managedMissing); - if (this.hasChildren()) write(this.children); - } - - deserialize({ read }) { - this._flags = read(); - if (this.hasStartTime()) this.startTime = read(); - if (this.hasFileTimestamps()) this.fileTimestamps = read(); - if (this.hasFileHashes()) this.fileHashes = read(); - if (this.hasFileTshs()) this.fileTshs = read(); - if (this.hasContextTimestamps()) this.contextTimestamps = read(); - if (this.hasContextHashes()) this.contextHashes = read(); - if (this.hasContextTshs()) this.contextTshs = read(); - if (this.hasMissingExistence()) this.missingExistence = read(); - if (this.hasManagedItemInfo()) this.managedItemInfo = read(); - if (this.hasManagedFiles()) this.managedFiles = read(); - if (this.hasManagedContexts()) this.managedContexts = read(); - if (this.hasManagedMissing()) this.managedMissing = read(); - if (this.hasChildren()) this.children = read(); - } - - /** - * @param {function(Snapshot): (ReadonlyMap | ReadonlySet)[]} getMaps first - * @returns {Iterable} iterable - */ - _createIterable(getMaps) { - return new SnapshotIterable(this, getMaps); - } - - /** - * @returns {Iterable} iterable - */ - getFileIterable() { - if (this._cachedFileIterable === undefined) { - this._cachedFileIterable = this._createIterable(s => [ - s.fileTimestamps, - s.fileHashes, - s.fileTshs, - s.managedFiles - ]); - } - return this._cachedFileIterable; - } - - /** - * @returns {Iterable} iterable - */ - getContextIterable() { - if (this._cachedContextIterable === undefined) { - this._cachedContextIterable = this._createIterable(s => [ - s.contextTimestamps, - s.contextHashes, - s.contextTshs, - s.managedContexts - ]); - } - return this._cachedContextIterable; - } - - /** - * @returns {Iterable} iterable - */ - getMissingIterable() { - if (this._cachedMissingIterable === undefined) { - this._cachedMissingIterable = this._createIterable(s => [ - s.missingExistence, - s.managedMissing - ]); - } - return this._cachedMissingIterable; - } -} - -makeSerializable(Snapshot, "webpack/lib/FileSystemInfo", "Snapshot"); - -const MIN_COMMON_SNAPSHOT_SIZE = 3; - -/** - * @template T - */ -class SnapshotOptimization { - /** - * @param {function(Snapshot): boolean} has has value - * @param {function(Snapshot): Map | Set} get get value - * @param {function(Snapshot, Map | Set): void} set set value - * @param {boolean=} useStartTime use the start time of snapshots - * @param {boolean=} isSet value is an Set instead of a Map - */ - constructor(has, get, set, useStartTime = true, isSet = false) { - this._has = has; - this._get = get; - this._set = set; - this._useStartTime = useStartTime; - this._isSet = isSet; - /** @type {Map} */ - this._map = new Map(); - this._statItemsShared = 0; - this._statItemsUnshared = 0; - this._statSharedSnapshots = 0; - this._statReusedSharedSnapshots = 0; - } - - getStatisticMessage() { - const total = this._statItemsShared + this._statItemsUnshared; - if (total === 0) return undefined; - return `${ - this._statItemsShared && Math.round((this._statItemsShared * 100) / total) - }% (${this._statItemsShared}/${total}) entries shared via ${ - this._statSharedSnapshots - } shared snapshots (${ - this._statReusedSharedSnapshots + this._statSharedSnapshots - } times referenced)`; - } - - clear() { - this._map.clear(); - this._statItemsShared = 0; - this._statItemsUnshared = 0; - this._statSharedSnapshots = 0; - this._statReusedSharedSnapshots = 0; - } - - /** - * @param {Snapshot} newSnapshot snapshot - * @param {Set} capturedFiles files to snapshot/share - * @returns {void} - */ - optimize(newSnapshot, capturedFiles) { - /** - * @param {SnapshotOptimizationEntry} entry optimization entry - * @returns {void} - */ - const increaseSharedAndStoreOptimizationEntry = entry => { - if (entry.children !== undefined) { - entry.children.forEach(increaseSharedAndStoreOptimizationEntry); - } - entry.shared++; - storeOptimizationEntry(entry); - }; - /** - * @param {SnapshotOptimizationEntry} entry optimization entry - * @returns {void} - */ - const storeOptimizationEntry = entry => { - for (const path of entry.snapshotContent) { - const old = this._map.get(path); - if (old.shared < entry.shared) { - this._map.set(path, entry); - } - capturedFiles.delete(path); - } - }; - - /** @type {SnapshotOptimizationEntry} */ - let newOptimizationEntry = undefined; - - const capturedFilesSize = capturedFiles.size; - - /** @type {Set | undefined} */ - const optimizationEntries = new Set(); - - for (const path of capturedFiles) { - const optimizationEntry = this._map.get(path); - if (optimizationEntry === undefined) { - if (newOptimizationEntry === undefined) { - newOptimizationEntry = { - snapshot: newSnapshot, - shared: 0, - snapshotContent: undefined, - children: undefined - }; - } - this._map.set(path, newOptimizationEntry); - continue; - } else { - optimizationEntries.add(optimizationEntry); - } - } - - optimizationEntries: for (const optimizationEntry of optimizationEntries) { - const snapshot = optimizationEntry.snapshot; - if (optimizationEntry.shared > 0) { - // It's a shared snapshot - // We can't change it, so we can only use it when all files match - // and startTime is compatible - if ( - this._useStartTime && - newSnapshot.startTime && - (!snapshot.startTime || snapshot.startTime > newSnapshot.startTime) - ) { - continue; - } - const nonSharedFiles = new Set(); - const snapshotContent = optimizationEntry.snapshotContent; - const snapshotEntries = this._get(snapshot); - for (const path of snapshotContent) { - if (!capturedFiles.has(path)) { - if (!snapshotEntries.has(path)) { - // File is not shared and can't be removed from the snapshot - // because it's in a child of the snapshot - continue optimizationEntries; - } - nonSharedFiles.add(path); - continue; - } - } - if (nonSharedFiles.size === 0) { - // The complete snapshot is shared - // add it as child - newSnapshot.addChild(snapshot); - increaseSharedAndStoreOptimizationEntry(optimizationEntry); - this._statReusedSharedSnapshots++; - } else { - // Only a part of the snapshot is shared - const sharedCount = snapshotContent.size - nonSharedFiles.size; - if (sharedCount < MIN_COMMON_SNAPSHOT_SIZE) { - // Common part it too small - continue optimizationEntries; - } - // Extract common timestamps from both snapshots - let commonMap; - if (this._isSet) { - commonMap = new Set(); - for (const path of /** @type {Set} */ (snapshotEntries)) { - if (nonSharedFiles.has(path)) continue; - commonMap.add(path); - snapshotEntries.delete(path); - } - } else { - commonMap = new Map(); - const map = /** @type {Map} */ (snapshotEntries); - for (const [path, value] of map) { - if (nonSharedFiles.has(path)) continue; - commonMap.set(path, value); - snapshotEntries.delete(path); - } - } - // Create and attach snapshot - const commonSnapshot = new Snapshot(); - if (this._useStartTime) { - commonSnapshot.setMergedStartTime(newSnapshot.startTime, snapshot); - } - this._set(commonSnapshot, commonMap); - newSnapshot.addChild(commonSnapshot); - snapshot.addChild(commonSnapshot); - // Create optimization entry - const newEntry = { - snapshot: commonSnapshot, - shared: optimizationEntry.shared + 1, - snapshotContent: new Set(commonMap.keys()), - children: undefined - }; - if (optimizationEntry.children === undefined) - optimizationEntry.children = new Set(); - optimizationEntry.children.add(newEntry); - storeOptimizationEntry(newEntry); - this._statSharedSnapshots++; - } - } else { - // It's a unshared snapshot - // We can extract a common shared snapshot - // with all common files - const snapshotEntries = this._get(snapshot); - if (snapshotEntries === undefined) { - // Incomplete snapshot, that can't be used - continue optimizationEntries; - } - let commonMap; - if (this._isSet) { - commonMap = new Set(); - const set = /** @type {Set} */ (snapshotEntries); - if (capturedFiles.size < set.size) { - for (const path of capturedFiles) { - if (set.has(path)) commonMap.add(path); - } - } else { - for (const path of set) { - if (capturedFiles.has(path)) commonMap.add(path); - } - } - } else { - commonMap = new Map(); - const map = /** @type {Map} */ (snapshotEntries); - for (const path of capturedFiles) { - const ts = map.get(path); - if (ts === undefined) continue; - commonMap.set(path, ts); - } - } - - if (commonMap.size < MIN_COMMON_SNAPSHOT_SIZE) { - // Common part it too small - continue optimizationEntries; - } - // Create and attach snapshot - const commonSnapshot = new Snapshot(); - if (this._useStartTime) { - commonSnapshot.setMergedStartTime(newSnapshot.startTime, snapshot); - } - this._set(commonSnapshot, commonMap); - newSnapshot.addChild(commonSnapshot); - snapshot.addChild(commonSnapshot); - // Remove files from snapshot - for (const path of commonMap.keys()) snapshotEntries.delete(path); - const sharedCount = commonMap.size; - this._statItemsUnshared -= sharedCount; - this._statItemsShared += sharedCount; - // Create optimization entry - storeOptimizationEntry({ - snapshot: commonSnapshot, - shared: 2, - snapshotContent: new Set(commonMap.keys()), - children: undefined - }); - this._statSharedSnapshots++; - } - } - const unshared = capturedFiles.size; - this._statItemsUnshared += unshared; - this._statItemsShared += capturedFilesSize - unshared; - } -} - -const parseString = str => { - if (str[0] === "'") str = `"${str.slice(1, -1).replace(/"/g, '\\"')}"`; - return JSON.parse(str); -}; - -/* istanbul ignore next */ -/** - * @param {number} mtime mtime - */ -const applyMtime = mtime => { - if (FS_ACCURACY > 1 && mtime % 2 !== 0) FS_ACCURACY = 1; - else if (FS_ACCURACY > 10 && mtime % 20 !== 0) FS_ACCURACY = 10; - else if (FS_ACCURACY > 100 && mtime % 200 !== 0) FS_ACCURACY = 100; - else if (FS_ACCURACY > 1000 && mtime % 2000 !== 0) FS_ACCURACY = 1000; -}; - -/** - * @template T - * @template K - * @param {Map} a source map - * @param {Map} b joining map - * @returns {Map} joined map - */ -const mergeMaps = (a, b) => { - if (!b || b.size === 0) return a; - if (!a || a.size === 0) return b; - const map = new Map(a); - for (const [key, value] of b) { - map.set(key, value); - } - return map; -}; - -/** - * @template T - * @template K - * @param {Set} a source map - * @param {Set} b joining map - * @returns {Set} joined map - */ -const mergeSets = (a, b) => { - if (!b || b.size === 0) return a; - if (!a || a.size === 0) return b; - const map = new Set(a); - for (const item of b) { - map.add(item); - } - return map; -}; - -/** - * Finding file or directory to manage - * @param {string} managedPath path that is managing by {@link FileSystemInfo} - * @param {string} path path to file or directory - * @returns {string|null} managed item - * @example - * getManagedItem( - * '/Users/user/my-project/node_modules/', - * '/Users/user/my-project/node_modules/package/index.js' - * ) === '/Users/user/my-project/node_modules/package' - * getManagedItem( - * '/Users/user/my-project/node_modules/', - * '/Users/user/my-project/node_modules/package1/node_modules/package2' - * ) === '/Users/user/my-project/node_modules/package1/node_modules/package2' - * getManagedItem( - * '/Users/user/my-project/node_modules/', - * '/Users/user/my-project/node_modules/.bin/script.js' - * ) === null // hidden files are disallowed as managed items - * getManagedItem( - * '/Users/user/my-project/node_modules/', - * '/Users/user/my-project/node_modules/package' - * ) === '/Users/user/my-project/node_modules/package' - */ -const getManagedItem = (managedPath, path) => { - let i = managedPath.length; - let slashes = 1; - let startingPosition = true; - loop: while (i < path.length) { - switch (path.charCodeAt(i)) { - case 47: // slash - case 92: // backslash - if (--slashes === 0) break loop; - startingPosition = true; - break; - case 46: // . - // hidden files are disallowed as managed items - // it's probably .yarn-integrity or .cache - if (startingPosition) return null; - break; - case 64: // @ - if (!startingPosition) return null; - slashes++; - break; - default: - startingPosition = false; - break; - } - i++; - } - if (i === path.length) slashes--; - // return null when path is incomplete - if (slashes !== 0) return null; - // if (path.slice(i + 1, i + 13) === "node_modules") - if ( - path.length >= i + 13 && - path.charCodeAt(i + 1) === 110 && - path.charCodeAt(i + 2) === 111 && - path.charCodeAt(i + 3) === 100 && - path.charCodeAt(i + 4) === 101 && - path.charCodeAt(i + 5) === 95 && - path.charCodeAt(i + 6) === 109 && - path.charCodeAt(i + 7) === 111 && - path.charCodeAt(i + 8) === 100 && - path.charCodeAt(i + 9) === 117 && - path.charCodeAt(i + 10) === 108 && - path.charCodeAt(i + 11) === 101 && - path.charCodeAt(i + 12) === 115 - ) { - // if this is the end of the path - if (path.length === i + 13) { - // return the node_modules directory - // it's special - return path; - } - const c = path.charCodeAt(i + 13); - // if next symbol is slash or backslash - if (c === 47 || c === 92) { - // Managed subpath - return getManagedItem(path.slice(0, i + 14), path); - } - } - return path.slice(0, i); -}; - -/** - * @template {ContextFileSystemInfoEntry | ContextTimestampAndHash} T - * @param {T} entry entry - * @returns {T["resolved"] | undefined} the resolved entry - */ -const getResolvedTimestamp = entry => { - if (entry === null) return null; - if (entry.resolved !== undefined) return entry.resolved; - return entry.symlinks === undefined ? entry : undefined; -}; - -/** - * @param {ContextHash} entry entry - * @returns {string | undefined} the resolved entry - */ -const getResolvedHash = entry => { - if (entry === null) return null; - if (entry.resolved !== undefined) return entry.resolved; - return entry.symlinks === undefined ? entry.hash : undefined; -}; - -const addAll = (source, target) => { - for (const key of source) target.add(key); -}; - -/** - * Used to access information about the filesystem in a cached way - */ -class FileSystemInfo { - /** - * @param {InputFileSystem} fs file system - * @param {Object} options options - * @param {Iterable=} options.managedPaths paths that are only managed by a package manager - * @param {Iterable=} options.immutablePaths paths that are immutable - * @param {Logger=} options.logger logger used to log invalid snapshots - * @param {string | Hash=} options.hashFunction the hash function to use - */ - constructor( - fs, - { - managedPaths = [], - immutablePaths = [], - logger, - hashFunction = "md4" - } = {} - ) { - this.fs = fs; - this.logger = logger; - this._remainingLogs = logger ? 40 : 0; - this._loggedPaths = logger ? new Set() : undefined; - this._hashFunction = hashFunction; - /** @type {WeakMap} */ - this._snapshotCache = new WeakMap(); - this._fileTimestampsOptimization = new SnapshotOptimization( - s => s.hasFileTimestamps(), - s => s.fileTimestamps, - (s, v) => s.setFileTimestamps(v) - ); - this._fileHashesOptimization = new SnapshotOptimization( - s => s.hasFileHashes(), - s => s.fileHashes, - (s, v) => s.setFileHashes(v), - false - ); - this._fileTshsOptimization = new SnapshotOptimization( - s => s.hasFileTshs(), - s => s.fileTshs, - (s, v) => s.setFileTshs(v) - ); - this._contextTimestampsOptimization = new SnapshotOptimization( - s => s.hasContextTimestamps(), - s => s.contextTimestamps, - (s, v) => s.setContextTimestamps(v) - ); - this._contextHashesOptimization = new SnapshotOptimization( - s => s.hasContextHashes(), - s => s.contextHashes, - (s, v) => s.setContextHashes(v), - false - ); - this._contextTshsOptimization = new SnapshotOptimization( - s => s.hasContextTshs(), - s => s.contextTshs, - (s, v) => s.setContextTshs(v) - ); - this._missingExistenceOptimization = new SnapshotOptimization( - s => s.hasMissingExistence(), - s => s.missingExistence, - (s, v) => s.setMissingExistence(v), - false - ); - this._managedItemInfoOptimization = new SnapshotOptimization( - s => s.hasManagedItemInfo(), - s => s.managedItemInfo, - (s, v) => s.setManagedItemInfo(v), - false - ); - this._managedFilesOptimization = new SnapshotOptimization( - s => s.hasManagedFiles(), - s => s.managedFiles, - (s, v) => s.setManagedFiles(v), - false, - true - ); - this._managedContextsOptimization = new SnapshotOptimization( - s => s.hasManagedContexts(), - s => s.managedContexts, - (s, v) => s.setManagedContexts(v), - false, - true - ); - this._managedMissingOptimization = new SnapshotOptimization( - s => s.hasManagedMissing(), - s => s.managedMissing, - (s, v) => s.setManagedMissing(v), - false, - true - ); - /** @type {StackedCacheMap} */ - this._fileTimestamps = new StackedCacheMap(); - /** @type {Map} */ - this._fileHashes = new Map(); - /** @type {Map} */ - this._fileTshs = new Map(); - /** @type {StackedCacheMap} */ - this._contextTimestamps = new StackedCacheMap(); - /** @type {Map} */ - this._contextHashes = new Map(); - /** @type {Map} */ - this._contextTshs = new Map(); - /** @type {Map} */ - this._managedItems = new Map(); - /** @type {AsyncQueue} */ - this.fileTimestampQueue = new AsyncQueue({ - name: "file timestamp", - parallelism: 30, - processor: this._readFileTimestamp.bind(this) - }); - /** @type {AsyncQueue} */ - this.fileHashQueue = new AsyncQueue({ - name: "file hash", - parallelism: 10, - processor: this._readFileHash.bind(this) - }); - /** @type {AsyncQueue} */ - this.contextTimestampQueue = new AsyncQueue({ - name: "context timestamp", - parallelism: 2, - processor: this._readContextTimestamp.bind(this) - }); - /** @type {AsyncQueue} */ - this.contextHashQueue = new AsyncQueue({ - name: "context hash", - parallelism: 2, - processor: this._readContextHash.bind(this) - }); - /** @type {AsyncQueue} */ - this.contextTshQueue = new AsyncQueue({ - name: "context hash and timestamp", - parallelism: 2, - processor: this._readContextTimestampAndHash.bind(this) - }); - /** @type {AsyncQueue} */ - this.managedItemQueue = new AsyncQueue({ - name: "managed item info", - parallelism: 10, - processor: this._getManagedItemInfo.bind(this) - }); - /** @type {AsyncQueue>} */ - this.managedItemDirectoryQueue = new AsyncQueue({ - name: "managed item directory info", - parallelism: 10, - processor: this._getManagedItemDirectoryInfo.bind(this) - }); - this.managedPaths = Array.from(managedPaths); - this.managedPathsWithSlash = /** @type {string[]} */ ( - this.managedPaths.filter(p => typeof p === "string") - ).map(p => join(fs, p, "_").slice(0, -1)); - - this.managedPathsRegExps = /** @type {RegExp[]} */ ( - this.managedPaths.filter(p => typeof p !== "string") - ); - this.immutablePaths = Array.from(immutablePaths); - this.immutablePathsWithSlash = /** @type {string[]} */ ( - this.immutablePaths.filter(p => typeof p === "string") - ).map(p => join(fs, p, "_").slice(0, -1)); - this.immutablePathsRegExps = /** @type {RegExp[]} */ ( - this.immutablePaths.filter(p => typeof p !== "string") - ); - - this._cachedDeprecatedFileTimestamps = undefined; - this._cachedDeprecatedContextTimestamps = undefined; - - this._warnAboutExperimentalEsmTracking = false; - - this._statCreatedSnapshots = 0; - this._statTestedSnapshotsCached = 0; - this._statTestedSnapshotsNotCached = 0; - this._statTestedChildrenCached = 0; - this._statTestedChildrenNotCached = 0; - this._statTestedEntries = 0; - } - - logStatistics() { - const logWhenMessage = (header, message) => { - if (message) { - this.logger.log(`${header}: ${message}`); - } - }; - this.logger.log(`${this._statCreatedSnapshots} new snapshots created`); - this.logger.log( - `${ - this._statTestedSnapshotsNotCached && - Math.round( - (this._statTestedSnapshotsNotCached * 100) / - (this._statTestedSnapshotsCached + - this._statTestedSnapshotsNotCached) - ) - }% root snapshot uncached (${this._statTestedSnapshotsNotCached} / ${ - this._statTestedSnapshotsCached + this._statTestedSnapshotsNotCached - })` - ); - this.logger.log( - `${ - this._statTestedChildrenNotCached && - Math.round( - (this._statTestedChildrenNotCached * 100) / - (this._statTestedChildrenCached + this._statTestedChildrenNotCached) - ) - }% children snapshot uncached (${this._statTestedChildrenNotCached} / ${ - this._statTestedChildrenCached + this._statTestedChildrenNotCached - })` - ); - this.logger.log(`${this._statTestedEntries} entries tested`); - this.logger.log( - `File info in cache: ${this._fileTimestamps.size} timestamps ${this._fileHashes.size} hashes ${this._fileTshs.size} timestamp hash combinations` - ); - logWhenMessage( - `File timestamp snapshot optimization`, - this._fileTimestampsOptimization.getStatisticMessage() - ); - logWhenMessage( - `File hash snapshot optimization`, - this._fileHashesOptimization.getStatisticMessage() - ); - logWhenMessage( - `File timestamp hash combination snapshot optimization`, - this._fileTshsOptimization.getStatisticMessage() - ); - this.logger.log( - `Directory info in cache: ${this._contextTimestamps.size} timestamps ${this._contextHashes.size} hashes ${this._contextTshs.size} timestamp hash combinations` - ); - logWhenMessage( - `Directory timestamp snapshot optimization`, - this._contextTimestampsOptimization.getStatisticMessage() - ); - logWhenMessage( - `Directory hash snapshot optimization`, - this._contextHashesOptimization.getStatisticMessage() - ); - logWhenMessage( - `Directory timestamp hash combination snapshot optimization`, - this._contextTshsOptimization.getStatisticMessage() - ); - logWhenMessage( - `Missing items snapshot optimization`, - this._missingExistenceOptimization.getStatisticMessage() - ); - this.logger.log( - `Managed items info in cache: ${this._managedItems.size} items` - ); - logWhenMessage( - `Managed items snapshot optimization`, - this._managedItemInfoOptimization.getStatisticMessage() - ); - logWhenMessage( - `Managed files snapshot optimization`, - this._managedFilesOptimization.getStatisticMessage() - ); - logWhenMessage( - `Managed contexts snapshot optimization`, - this._managedContextsOptimization.getStatisticMessage() - ); - logWhenMessage( - `Managed missing snapshot optimization`, - this._managedMissingOptimization.getStatisticMessage() - ); - } - - _log(path, reason, ...args) { - const key = path + reason; - if (this._loggedPaths.has(key)) return; - this._loggedPaths.add(key); - this.logger.debug(`${path} invalidated because ${reason}`, ...args); - if (--this._remainingLogs === 0) { - this.logger.debug( - "Logging limit has been reached and no further logging will be emitted by FileSystemInfo" - ); - } - } - - clear() { - this._remainingLogs = this.logger ? 40 : 0; - if (this._loggedPaths !== undefined) this._loggedPaths.clear(); - - this._snapshotCache = new WeakMap(); - this._fileTimestampsOptimization.clear(); - this._fileHashesOptimization.clear(); - this._fileTshsOptimization.clear(); - this._contextTimestampsOptimization.clear(); - this._contextHashesOptimization.clear(); - this._contextTshsOptimization.clear(); - this._missingExistenceOptimization.clear(); - this._managedItemInfoOptimization.clear(); - this._managedFilesOptimization.clear(); - this._managedContextsOptimization.clear(); - this._managedMissingOptimization.clear(); - this._fileTimestamps.clear(); - this._fileHashes.clear(); - this._fileTshs.clear(); - this._contextTimestamps.clear(); - this._contextHashes.clear(); - this._contextTshs.clear(); - this._managedItems.clear(); - this._managedItems.clear(); - - this._cachedDeprecatedFileTimestamps = undefined; - this._cachedDeprecatedContextTimestamps = undefined; - - this._statCreatedSnapshots = 0; - this._statTestedSnapshotsCached = 0; - this._statTestedSnapshotsNotCached = 0; - this._statTestedChildrenCached = 0; - this._statTestedChildrenNotCached = 0; - this._statTestedEntries = 0; - } - - /** - * @param {ReadonlyMap} map timestamps - * @param {boolean=} immutable if 'map' is immutable and FileSystemInfo can keep referencing it - * @returns {void} - */ - addFileTimestamps(map, immutable) { - this._fileTimestamps.addAll(map, immutable); - this._cachedDeprecatedFileTimestamps = undefined; - } - - /** - * @param {ReadonlyMap} map timestamps - * @param {boolean=} immutable if 'map' is immutable and FileSystemInfo can keep referencing it - * @returns {void} - */ - addContextTimestamps(map, immutable) { - this._contextTimestamps.addAll(map, immutable); - this._cachedDeprecatedContextTimestamps = undefined; - } - - /** - * @param {string} path file path - * @param {function((WebpackError | null)=, (FileSystemInfoEntry | "ignore" | null)=): void} callback callback function - * @returns {void} - */ - getFileTimestamp(path, callback) { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) return callback(null, cache); - this.fileTimestampQueue.add(path, callback); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, (ResolvedContextFileSystemInfoEntry | "ignore" | null)=): void} callback callback function - * @returns {void} - */ - getContextTimestamp(path, callback) { - const cache = this._contextTimestamps.get(path); - if (cache !== undefined) { - if (cache === "ignore") return callback(null, "ignore"); - const resolved = getResolvedTimestamp(cache); - if (resolved !== undefined) return callback(null, resolved); - return this._resolveContextTimestamp(cache, callback); - } - this.contextTimestampQueue.add(path, (err, entry) => { - if (err) return callback(err); - const resolved = getResolvedTimestamp(entry); - if (resolved !== undefined) return callback(null, resolved); - this._resolveContextTimestamp(entry, callback); - }); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, (ContextFileSystemInfoEntry | "ignore" | null)=): void} callback callback function - * @returns {void} - */ - _getUnresolvedContextTimestamp(path, callback) { - const cache = this._contextTimestamps.get(path); - if (cache !== undefined) return callback(null, cache); - this.contextTimestampQueue.add(path, callback); - } - - /** - * @param {string} path file path - * @param {function((WebpackError | null)=, string=): void} callback callback function - * @returns {void} - */ - getFileHash(path, callback) { - const cache = this._fileHashes.get(path); - if (cache !== undefined) return callback(null, cache); - this.fileHashQueue.add(path, callback); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, string=): void} callback callback function - * @returns {void} - */ - getContextHash(path, callback) { - const cache = this._contextHashes.get(path); - if (cache !== undefined) { - const resolved = getResolvedHash(cache); - if (resolved !== undefined) return callback(null, resolved); - return this._resolveContextHash(cache, callback); - } - this.contextHashQueue.add(path, (err, entry) => { - if (err) return callback(err); - const resolved = getResolvedHash(entry); - if (resolved !== undefined) return callback(null, resolved); - this._resolveContextHash(entry, callback); - }); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, ContextHash=): void} callback callback function - * @returns {void} - */ - _getUnresolvedContextHash(path, callback) { - const cache = this._contextHashes.get(path); - if (cache !== undefined) return callback(null, cache); - this.contextHashQueue.add(path, callback); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, ResolvedContextTimestampAndHash=): void} callback callback function - * @returns {void} - */ - getContextTsh(path, callback) { - const cache = this._contextTshs.get(path); - if (cache !== undefined) { - const resolved = getResolvedTimestamp(cache); - if (resolved !== undefined) return callback(null, resolved); - return this._resolveContextTsh(cache, callback); - } - this.contextTshQueue.add(path, (err, entry) => { - if (err) return callback(err); - const resolved = getResolvedTimestamp(entry); - if (resolved !== undefined) return callback(null, resolved); - this._resolveContextTsh(entry, callback); - }); - } - - /** - * @param {string} path context path - * @param {function((WebpackError | null)=, ContextTimestampAndHash=): void} callback callback function - * @returns {void} - */ - _getUnresolvedContextTsh(path, callback) { - const cache = this._contextTshs.get(path); - if (cache !== undefined) return callback(null, cache); - this.contextTshQueue.add(path, callback); - } - - _createBuildDependenciesResolvers() { - const resolveContext = createResolver({ - resolveToContext: true, - exportsFields: [], - fileSystem: this.fs - }); - const resolveCjs = createResolver({ - extensions: [".js", ".json", ".node"], - conditionNames: ["require", "node"], - exportsFields: ["exports"], - fileSystem: this.fs - }); - const resolveCjsAsChild = createResolver({ - extensions: [".js", ".json", ".node"], - conditionNames: ["require", "node"], - exportsFields: [], - fileSystem: this.fs - }); - const resolveEsm = createResolver({ - extensions: [".js", ".json", ".node"], - fullySpecified: true, - conditionNames: ["import", "node"], - exportsFields: ["exports"], - fileSystem: this.fs - }); - return { resolveContext, resolveEsm, resolveCjs, resolveCjsAsChild }; - } - - /** - * @param {string} context context directory - * @param {Iterable} deps dependencies - * @param {function((Error | null)=, ResolveBuildDependenciesResult=): void} callback callback function - * @returns {void} - */ - resolveBuildDependencies(context, deps, callback) { - const { resolveContext, resolveEsm, resolveCjs, resolveCjsAsChild } = - this._createBuildDependenciesResolvers(); - - /** @type {Set} */ - const files = new Set(); - /** @type {Set} */ - const fileSymlinks = new Set(); - /** @type {Set} */ - const directories = new Set(); - /** @type {Set} */ - const directorySymlinks = new Set(); - /** @type {Set} */ - const missing = new Set(); - /** @type {Set} */ - const resolveFiles = new Set(); - /** @type {Set} */ - const resolveDirectories = new Set(); - /** @type {Set} */ - const resolveMissing = new Set(); - /** @type {Map} */ - const resolveResults = new Map(); - const invalidResolveResults = new Set(); - const resolverContext = { - fileDependencies: resolveFiles, - contextDependencies: resolveDirectories, - missingDependencies: resolveMissing - }; - const expectedToString = expected => { - return expected ? ` (expected ${expected})` : ""; - }; - const jobToString = job => { - switch (job.type) { - case RBDT_RESOLVE_CJS: - return `resolve commonjs ${job.path}${expectedToString( - job.expected - )}`; - case RBDT_RESOLVE_ESM: - return `resolve esm ${job.path}${expectedToString(job.expected)}`; - case RBDT_RESOLVE_DIRECTORY: - return `resolve directory ${job.path}`; - case RBDT_RESOLVE_CJS_FILE: - return `resolve commonjs file ${job.path}${expectedToString( - job.expected - )}`; - case RBDT_RESOLVE_ESM_FILE: - return `resolve esm file ${job.path}${expectedToString( - job.expected - )}`; - case RBDT_DIRECTORY: - return `directory ${job.path}`; - case RBDT_FILE: - return `file ${job.path}`; - case RBDT_DIRECTORY_DEPENDENCIES: - return `directory dependencies ${job.path}`; - case RBDT_FILE_DEPENDENCIES: - return `file dependencies ${job.path}`; - } - return `unknown ${job.type} ${job.path}`; - }; - const pathToString = job => { - let result = ` at ${jobToString(job)}`; - job = job.issuer; - while (job !== undefined) { - result += `\n at ${jobToString(job)}`; - job = job.issuer; - } - return result; - }; - processAsyncTree( - Array.from(deps, dep => ({ - type: RBDT_RESOLVE_CJS, - context, - path: dep, - expected: undefined, - issuer: undefined - })), - 20, - (job, push, callback) => { - const { type, context, path, expected } = job; - const resolveDirectory = path => { - const key = `d\n${context}\n${path}`; - if (resolveResults.has(key)) { - return callback(); - } - resolveResults.set(key, undefined); - resolveContext(context, path, resolverContext, (err, _, result) => { - if (err) { - if (expected === false) { - resolveResults.set(key, false); - return callback(); - } - invalidResolveResults.add(key); - err.message += `\nwhile resolving '${path}' in ${context} to a directory`; - return callback(err); - } - const resultPath = result.path; - resolveResults.set(key, resultPath); - push({ - type: RBDT_DIRECTORY, - context: undefined, - path: resultPath, - expected: undefined, - issuer: job - }); - callback(); - }); - }; - const resolveFile = (path, symbol, resolve) => { - const key = `${symbol}\n${context}\n${path}`; - if (resolveResults.has(key)) { - return callback(); - } - resolveResults.set(key, undefined); - resolve(context, path, resolverContext, (err, _, result) => { - if (typeof expected === "string") { - if (!err && result && result.path === expected) { - resolveResults.set(key, result.path); - } else { - invalidResolveResults.add(key); - this.logger.warn( - `Resolving '${path}' in ${context} for build dependencies doesn't lead to expected result '${expected}', but to '${ - err || (result && result.path) - }' instead. Resolving dependencies are ignored for this path.\n${pathToString( - job - )}` - ); - } - } else { - if (err) { - if (expected === false) { - resolveResults.set(key, false); - return callback(); - } - invalidResolveResults.add(key); - err.message += `\nwhile resolving '${path}' in ${context} as file\n${pathToString( - job - )}`; - return callback(err); - } - const resultPath = result.path; - resolveResults.set(key, resultPath); - push({ - type: RBDT_FILE, - context: undefined, - path: resultPath, - expected: undefined, - issuer: job - }); - } - callback(); - }); - }; - switch (type) { - case RBDT_RESOLVE_CJS: { - const isDirectory = /[\\/]$/.test(path); - if (isDirectory) { - resolveDirectory(path.slice(0, path.length - 1)); - } else { - resolveFile(path, "f", resolveCjs); - } - break; - } - case RBDT_RESOLVE_ESM: { - const isDirectory = /[\\/]$/.test(path); - if (isDirectory) { - resolveDirectory(path.slice(0, path.length - 1)); - } else { - resolveFile(path); - } - break; - } - case RBDT_RESOLVE_DIRECTORY: { - resolveDirectory(path); - break; - } - case RBDT_RESOLVE_CJS_FILE: { - resolveFile(path, "f", resolveCjs); - break; - } - case RBDT_RESOLVE_CJS_FILE_AS_CHILD: { - resolveFile(path, "c", resolveCjsAsChild); - break; - } - case RBDT_RESOLVE_ESM_FILE: { - resolveFile(path, "e", resolveEsm); - break; - } - case RBDT_FILE: { - if (files.has(path)) { - callback(); - break; - } - files.add(path); - this.fs.realpath(path, (err, _realPath) => { - if (err) return callback(err); - const realPath = /** @type {string} */ (_realPath); - if (realPath !== path) { - fileSymlinks.add(path); - resolveFiles.add(path); - if (files.has(realPath)) return callback(); - files.add(realPath); - } - push({ - type: RBDT_FILE_DEPENDENCIES, - context: undefined, - path: realPath, - expected: undefined, - issuer: job - }); - callback(); - }); - break; - } - case RBDT_DIRECTORY: { - if (directories.has(path)) { - callback(); - break; - } - directories.add(path); - this.fs.realpath(path, (err, _realPath) => { - if (err) return callback(err); - const realPath = /** @type {string} */ (_realPath); - if (realPath !== path) { - directorySymlinks.add(path); - resolveFiles.add(path); - if (directories.has(realPath)) return callback(); - directories.add(realPath); - } - push({ - type: RBDT_DIRECTORY_DEPENDENCIES, - context: undefined, - path: realPath, - expected: undefined, - issuer: job - }); - callback(); - }); - break; - } - case RBDT_FILE_DEPENDENCIES: { - // Check for known files without dependencies - if (/\.json5?$|\.yarn-integrity$|yarn\.lock$|\.ya?ml/.test(path)) { - process.nextTick(callback); - break; - } - // Check commonjs cache for the module - /** @type {NodeModule} */ - const module = require.cache[path]; - if (module && Array.isArray(module.children)) { - children: for (const child of module.children) { - let childPath = child.filename; - if (childPath) { - push({ - type: RBDT_FILE, - context: undefined, - path: childPath, - expected: undefined, - issuer: job - }); - const context = dirname(this.fs, path); - for (const modulePath of module.paths) { - if (childPath.startsWith(modulePath)) { - let subPath = childPath.slice(modulePath.length + 1); - const packageMatch = /^(@[^\\/]+[\\/])[^\\/]+/.exec( - subPath - ); - if (packageMatch) { - push({ - type: RBDT_FILE, - context: undefined, - path: - modulePath + - childPath[modulePath.length] + - packageMatch[0] + - childPath[modulePath.length] + - "package.json", - expected: false, - issuer: job - }); - } - let request = subPath.replace(/\\/g, "/"); - if (request.endsWith(".js")) - request = request.slice(0, -3); - push({ - type: RBDT_RESOLVE_CJS_FILE_AS_CHILD, - context, - path: request, - expected: child.filename, - issuer: job - }); - continue children; - } - } - let request = relative(this.fs, context, childPath); - if (request.endsWith(".js")) request = request.slice(0, -3); - request = request.replace(/\\/g, "/"); - if (!request.startsWith("../") && !isAbsolute(request)) { - request = `./${request}`; - } - push({ - type: RBDT_RESOLVE_CJS_FILE, - context, - path: request, - expected: child.filename, - issuer: job - }); - } - } - } else if (supportsEsm && /\.m?js$/.test(path)) { - if (!this._warnAboutExperimentalEsmTracking) { - this.logger.log( - "Node.js doesn't offer a (nice) way to introspect the ESM dependency graph yet.\n" + - "Until a full solution is available webpack uses an experimental ESM tracking based on parsing.\n" + - "As best effort webpack parses the ESM files to guess dependencies. But this can lead to expensive and incorrect tracking." - ); - this._warnAboutExperimentalEsmTracking = true; - } - const lexer = __webpack_require__(4612); - lexer.init.then(() => { - this.fs.readFile(path, (err, content) => { - if (err) return callback(err); - try { - const context = dirname(this.fs, path); - const source = content.toString(); - const [imports] = lexer.parse(source); - for (const imp of imports) { - try { - let dependency; - if (imp.d === -1) { - // import ... from "..." - dependency = parseString( - source.substring(imp.s - 1, imp.e + 1) - ); - } else if (imp.d > -1) { - // import() - let expr = source.substring(imp.s, imp.e).trim(); - dependency = parseString(expr); - } else { - // e.g. import.meta - continue; - } - - // we should not track Node.js build dependencies - if (dependency.startsWith("node:")) continue; - if (builtinModules.has(dependency)) continue; - - push({ - type: RBDT_RESOLVE_ESM_FILE, - context, - path: dependency, - expected: undefined, - issuer: job - }); - } catch (e) { - this.logger.warn( - `Parsing of ${path} for build dependencies failed at 'import(${source.substring( - imp.s, - imp.e - )})'.\n` + - "Build dependencies behind this expression are ignored and might cause incorrect cache invalidation." - ); - this.logger.debug(pathToString(job)); - this.logger.debug(e.stack); - } - } - } catch (e) { - this.logger.warn( - `Parsing of ${path} for build dependencies failed and all dependencies of this file are ignored, which might cause incorrect cache invalidation..` - ); - this.logger.debug(pathToString(job)); - this.logger.debug(e.stack); - } - process.nextTick(callback); - }); - }, callback); - break; - } else { - this.logger.log( - `Assuming ${path} has no dependencies as we were unable to assign it to any module system.` - ); - this.logger.debug(pathToString(job)); - } - process.nextTick(callback); - break; - } - case RBDT_DIRECTORY_DEPENDENCIES: { - const match = - /(^.+[\\/]node_modules[\\/](?:@[^\\/]+[\\/])?[^\\/]+)/.exec(path); - const packagePath = match ? match[1] : path; - const packageJson = join(this.fs, packagePath, "package.json"); - this.fs.readFile(packageJson, (err, content) => { - if (err) { - if (err.code === "ENOENT") { - resolveMissing.add(packageJson); - const parent = dirname(this.fs, packagePath); - if (parent !== packagePath) { - push({ - type: RBDT_DIRECTORY_DEPENDENCIES, - context: undefined, - path: parent, - expected: undefined, - issuer: job - }); - } - callback(); - return; - } - return callback(err); - } - resolveFiles.add(packageJson); - let packageData; - try { - packageData = JSON.parse(content.toString("utf-8")); - } catch (e) { - return callback(e); - } - const depsObject = packageData.dependencies; - const optionalDepsObject = packageData.optionalDependencies; - const allDeps = new Set(); - const optionalDeps = new Set(); - if (typeof depsObject === "object" && depsObject) { - for (const dep of Object.keys(depsObject)) { - allDeps.add(dep); - } - } - if ( - typeof optionalDepsObject === "object" && - optionalDepsObject - ) { - for (const dep of Object.keys(optionalDepsObject)) { - allDeps.add(dep); - optionalDeps.add(dep); - } - } - for (const dep of allDeps) { - push({ - type: RBDT_RESOLVE_DIRECTORY, - context: packagePath, - path: dep, - expected: !optionalDeps.has(dep), - issuer: job - }); - } - callback(); - }); - break; - } - } - }, - err => { - if (err) return callback(err); - for (const l of fileSymlinks) files.delete(l); - for (const l of directorySymlinks) directories.delete(l); - for (const k of invalidResolveResults) resolveResults.delete(k); - callback(null, { - files, - directories, - missing, - resolveResults, - resolveDependencies: { - files: resolveFiles, - directories: resolveDirectories, - missing: resolveMissing - } - }); - } - ); - } - - /** - * @param {Map} resolveResults results from resolving - * @param {function((Error | null)=, boolean=): void} callback callback with true when resolveResults resolve the same way - * @returns {void} - */ - checkResolveResultsValid(resolveResults, callback) { - const { resolveCjs, resolveCjsAsChild, resolveEsm, resolveContext } = - this._createBuildDependenciesResolvers(); - asyncLib.eachLimit( - resolveResults, - 20, - ([key, expectedResult], callback) => { - const [type, context, path] = key.split("\n"); - switch (type) { - case "d": - resolveContext(context, path, {}, (err, _, result) => { - if (expectedResult === false) - return callback(err ? undefined : INVALID); - if (err) return callback(err); - const resultPath = result.path; - if (resultPath !== expectedResult) return callback(INVALID); - callback(); - }); - break; - case "f": - resolveCjs(context, path, {}, (err, _, result) => { - if (expectedResult === false) - return callback(err ? undefined : INVALID); - if (err) return callback(err); - const resultPath = result.path; - if (resultPath !== expectedResult) return callback(INVALID); - callback(); - }); - break; - case "c": - resolveCjsAsChild(context, path, {}, (err, _, result) => { - if (expectedResult === false) - return callback(err ? undefined : INVALID); - if (err) return callback(err); - const resultPath = result.path; - if (resultPath !== expectedResult) return callback(INVALID); - callback(); - }); - break; - case "e": - resolveEsm(context, path, {}, (err, _, result) => { - if (expectedResult === false) - return callback(err ? undefined : INVALID); - if (err) return callback(err); - const resultPath = result.path; - if (resultPath !== expectedResult) return callback(INVALID); - callback(); - }); - break; - default: - callback(new Error("Unexpected type in resolve result key")); - break; - } - }, - /** - * @param {Error | typeof INVALID=} err error or invalid flag - * @returns {void} - */ - err => { - if (err === INVALID) { - return callback(null, false); - } - if (err) { - return callback(err); - } - return callback(null, true); - } - ); - } - - /** - * - * @param {number} startTime when processing the files has started - * @param {Iterable} files all files - * @param {Iterable} directories all directories - * @param {Iterable} missing all missing files or directories - * @param {Object} options options object (for future extensions) - * @param {boolean=} options.hash should use hash to snapshot - * @param {boolean=} options.timestamp should use timestamp to snapshot - * @param {function((WebpackError | null)=, (Snapshot | null)=): void} callback callback function - * @returns {void} - */ - createSnapshot(startTime, files, directories, missing, options, callback) { - /** @type {Map} */ - const fileTimestamps = new Map(); - /** @type {Map} */ - const fileHashes = new Map(); - /** @type {Map} */ - const fileTshs = new Map(); - /** @type {Map} */ - const contextTimestamps = new Map(); - /** @type {Map} */ - const contextHashes = new Map(); - /** @type {Map} */ - const contextTshs = new Map(); - /** @type {Map} */ - const missingExistence = new Map(); - /** @type {Map} */ - const managedItemInfo = new Map(); - /** @type {Set} */ - const managedFiles = new Set(); - /** @type {Set} */ - const managedContexts = new Set(); - /** @type {Set} */ - const managedMissing = new Set(); - /** @type {Set} */ - const children = new Set(); - - const snapshot = new Snapshot(); - if (startTime) snapshot.setStartTime(startTime); - - /** @type {Set} */ - const managedItems = new Set(); - - /** 1 = timestamp, 2 = hash, 3 = timestamp + hash */ - const mode = options && options.hash ? (options.timestamp ? 3 : 2) : 1; - - let jobs = 1; - const jobDone = () => { - if (--jobs === 0) { - if (fileTimestamps.size !== 0) { - snapshot.setFileTimestamps(fileTimestamps); - } - if (fileHashes.size !== 0) { - snapshot.setFileHashes(fileHashes); - } - if (fileTshs.size !== 0) { - snapshot.setFileTshs(fileTshs); - } - if (contextTimestamps.size !== 0) { - snapshot.setContextTimestamps(contextTimestamps); - } - if (contextHashes.size !== 0) { - snapshot.setContextHashes(contextHashes); - } - if (contextTshs.size !== 0) { - snapshot.setContextTshs(contextTshs); - } - if (missingExistence.size !== 0) { - snapshot.setMissingExistence(missingExistence); - } - if (managedItemInfo.size !== 0) { - snapshot.setManagedItemInfo(managedItemInfo); - } - this._managedFilesOptimization.optimize(snapshot, managedFiles); - if (managedFiles.size !== 0) { - snapshot.setManagedFiles(managedFiles); - } - this._managedContextsOptimization.optimize(snapshot, managedContexts); - if (managedContexts.size !== 0) { - snapshot.setManagedContexts(managedContexts); - } - this._managedMissingOptimization.optimize(snapshot, managedMissing); - if (managedMissing.size !== 0) { - snapshot.setManagedMissing(managedMissing); - } - if (children.size !== 0) { - snapshot.setChildren(children); - } - this._snapshotCache.set(snapshot, true); - this._statCreatedSnapshots++; - - callback(null, snapshot); - } - }; - const jobError = () => { - if (jobs > 0) { - // large negative number instead of NaN or something else to keep jobs to stay a SMI (v8) - jobs = -100000000; - callback(null, null); - } - }; - const checkManaged = (path, managedSet) => { - for (const immutablePath of this.immutablePathsRegExps) { - if (immutablePath.test(path)) { - managedSet.add(path); - return true; - } - } - for (const immutablePath of this.immutablePathsWithSlash) { - if (path.startsWith(immutablePath)) { - managedSet.add(path); - return true; - } - } - for (const managedPath of this.managedPathsRegExps) { - const match = managedPath.exec(path); - if (match) { - const managedItem = getManagedItem(match[1], path); - if (managedItem) { - managedItems.add(managedItem); - managedSet.add(path); - return true; - } - } - } - for (const managedPath of this.managedPathsWithSlash) { - if (path.startsWith(managedPath)) { - const managedItem = getManagedItem(managedPath, path); - if (managedItem) { - managedItems.add(managedItem); - managedSet.add(path); - return true; - } - } - } - return false; - }; - const captureNonManaged = (items, managedSet) => { - const capturedItems = new Set(); - for (const path of items) { - if (!checkManaged(path, managedSet)) capturedItems.add(path); - } - return capturedItems; - }; - const processCapturedFiles = capturedFiles => { - switch (mode) { - case 3: - this._fileTshsOptimization.optimize(snapshot, capturedFiles); - for (const path of capturedFiles) { - const cache = this._fileTshs.get(path); - if (cache !== undefined) { - fileTshs.set(path, cache); - } else { - jobs++; - this._getFileTimestampAndHash(path, (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting file timestamp hash combination of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - fileTshs.set(path, entry); - jobDone(); - } - }); - } - } - break; - case 2: - this._fileHashesOptimization.optimize(snapshot, capturedFiles); - for (const path of capturedFiles) { - const cache = this._fileHashes.get(path); - if (cache !== undefined) { - fileHashes.set(path, cache); - } else { - jobs++; - this.fileHashQueue.add(path, (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting file hash of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - fileHashes.set(path, entry); - jobDone(); - } - }); - } - } - break; - case 1: - this._fileTimestampsOptimization.optimize(snapshot, capturedFiles); - for (const path of capturedFiles) { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if (cache !== "ignore") { - fileTimestamps.set(path, cache); - } - } else { - jobs++; - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting file timestamp of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - fileTimestamps.set(path, entry); - jobDone(); - } - }); - } - } - break; - } - }; - if (files) { - processCapturedFiles(captureNonManaged(files, managedFiles)); - } - const processCapturedDirectories = capturedDirectories => { - switch (mode) { - case 3: - this._contextTshsOptimization.optimize(snapshot, capturedDirectories); - for (const path of capturedDirectories) { - const cache = this._contextTshs.get(path); - /** @type {ResolvedContextTimestampAndHash} */ - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedTimestamp(cache)) !== undefined - ) { - contextTshs.set(path, resolved); - } else { - jobs++; - /** - * @param {Error=} err error - * @param {ResolvedContextTimestampAndHash=} entry entry - * @returns {void} - */ - const callback = (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting context timestamp hash combination of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - contextTshs.set(path, entry); - jobDone(); - } - }; - if (cache !== undefined) { - this._resolveContextTsh(cache, callback); - } else { - this.getContextTsh(path, callback); - } - } - } - break; - case 2: - this._contextHashesOptimization.optimize( - snapshot, - capturedDirectories - ); - for (const path of capturedDirectories) { - const cache = this._contextHashes.get(path); - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedHash(cache)) !== undefined - ) { - contextHashes.set(path, resolved); - } else { - jobs++; - const callback = (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting context hash of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - contextHashes.set(path, entry); - jobDone(); - } - }; - if (cache !== undefined) { - this._resolveContextHash(cache, callback); - } else { - this.getContextHash(path, callback); - } - } - } - break; - case 1: - this._contextTimestampsOptimization.optimize( - snapshot, - capturedDirectories - ); - for (const path of capturedDirectories) { - const cache = this._contextTimestamps.get(path); - if (cache === "ignore") continue; - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedTimestamp(cache)) !== undefined - ) { - contextTimestamps.set(path, resolved); - } else { - jobs++; - /** - * @param {Error=} err error - * @param {ResolvedContextFileSystemInfoEntry=} entry entry - * @returns {void} - */ - const callback = (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting context timestamp of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - contextTimestamps.set(path, entry); - jobDone(); - } - }; - if (cache !== undefined) { - this._resolveContextTimestamp(cache, callback); - } else { - this.getContextTimestamp(path, callback); - } - } - } - break; - } - }; - if (directories) { - processCapturedDirectories( - captureNonManaged(directories, managedContexts) - ); - } - const processCapturedMissing = capturedMissing => { - this._missingExistenceOptimization.optimize(snapshot, capturedMissing); - for (const path of capturedMissing) { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if (cache !== "ignore") { - missingExistence.set(path, Boolean(cache)); - } - } else { - jobs++; - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting missing timestamp of ${path}: ${err.stack}` - ); - } - jobError(); - } else { - missingExistence.set(path, Boolean(entry)); - jobDone(); - } - }); - } - } - }; - if (missing) { - processCapturedMissing(captureNonManaged(missing, managedMissing)); - } - this._managedItemInfoOptimization.optimize(snapshot, managedItems); - for (const path of managedItems) { - const cache = this._managedItems.get(path); - if (cache !== undefined) { - if (!cache.startsWith("*")) { - managedFiles.add(join(this.fs, path, "package.json")); - } else if (cache === "*nested") { - managedMissing.add(join(this.fs, path, "package.json")); - } - managedItemInfo.set(path, cache); - } else { - jobs++; - this.managedItemQueue.add(path, (err, entry) => { - if (err) { - if (this.logger) { - this.logger.debug( - `Error snapshotting managed item ${path}: ${err.stack}` - ); - } - jobError(); - } else if (entry) { - if (!entry.startsWith("*")) { - managedFiles.add(join(this.fs, path, "package.json")); - } else if (cache === "*nested") { - managedMissing.add(join(this.fs, path, "package.json")); - } - managedItemInfo.set(path, entry); - jobDone(); - } else { - // Fallback to normal snapshotting - const process = (set, fn) => { - if (set.size === 0) return; - const captured = new Set(); - for (const file of set) { - if (file.startsWith(path)) captured.add(file); - } - if (captured.size > 0) fn(captured); - }; - process(managedFiles, processCapturedFiles); - process(managedContexts, processCapturedDirectories); - process(managedMissing, processCapturedMissing); - jobDone(); - } - }); - } - } - jobDone(); - } - - /** - * @param {Snapshot} snapshot1 a snapshot - * @param {Snapshot} snapshot2 a snapshot - * @returns {Snapshot} merged snapshot - */ - mergeSnapshots(snapshot1, snapshot2) { - const snapshot = new Snapshot(); - if (snapshot1.hasStartTime() && snapshot2.hasStartTime()) - snapshot.setStartTime(Math.min(snapshot1.startTime, snapshot2.startTime)); - else if (snapshot2.hasStartTime()) snapshot.startTime = snapshot2.startTime; - else if (snapshot1.hasStartTime()) snapshot.startTime = snapshot1.startTime; - if (snapshot1.hasFileTimestamps() || snapshot2.hasFileTimestamps()) { - snapshot.setFileTimestamps( - mergeMaps(snapshot1.fileTimestamps, snapshot2.fileTimestamps) - ); - } - if (snapshot1.hasFileHashes() || snapshot2.hasFileHashes()) { - snapshot.setFileHashes( - mergeMaps(snapshot1.fileHashes, snapshot2.fileHashes) - ); - } - if (snapshot1.hasFileTshs() || snapshot2.hasFileTshs()) { - snapshot.setFileTshs(mergeMaps(snapshot1.fileTshs, snapshot2.fileTshs)); - } - if (snapshot1.hasContextTimestamps() || snapshot2.hasContextTimestamps()) { - snapshot.setContextTimestamps( - mergeMaps(snapshot1.contextTimestamps, snapshot2.contextTimestamps) - ); - } - if (snapshot1.hasContextHashes() || snapshot2.hasContextHashes()) { - snapshot.setContextHashes( - mergeMaps(snapshot1.contextHashes, snapshot2.contextHashes) - ); - } - if (snapshot1.hasContextTshs() || snapshot2.hasContextTshs()) { - snapshot.setContextTshs( - mergeMaps(snapshot1.contextTshs, snapshot2.contextTshs) - ); - } - if (snapshot1.hasMissingExistence() || snapshot2.hasMissingExistence()) { - snapshot.setMissingExistence( - mergeMaps(snapshot1.missingExistence, snapshot2.missingExistence) - ); - } - if (snapshot1.hasManagedItemInfo() || snapshot2.hasManagedItemInfo()) { - snapshot.setManagedItemInfo( - mergeMaps(snapshot1.managedItemInfo, snapshot2.managedItemInfo) - ); - } - if (snapshot1.hasManagedFiles() || snapshot2.hasManagedFiles()) { - snapshot.setManagedFiles( - mergeSets(snapshot1.managedFiles, snapshot2.managedFiles) - ); - } - if (snapshot1.hasManagedContexts() || snapshot2.hasManagedContexts()) { - snapshot.setManagedContexts( - mergeSets(snapshot1.managedContexts, snapshot2.managedContexts) - ); - } - if (snapshot1.hasManagedMissing() || snapshot2.hasManagedMissing()) { - snapshot.setManagedMissing( - mergeSets(snapshot1.managedMissing, snapshot2.managedMissing) - ); - } - if (snapshot1.hasChildren() || snapshot2.hasChildren()) { - snapshot.setChildren(mergeSets(snapshot1.children, snapshot2.children)); - } - if ( - this._snapshotCache.get(snapshot1) === true && - this._snapshotCache.get(snapshot2) === true - ) { - this._snapshotCache.set(snapshot, true); - } - return snapshot; - } - - /** - * @param {Snapshot} snapshot the snapshot made - * @param {function((WebpackError | null)=, boolean=): void} callback callback function - * @returns {void} - */ - checkSnapshotValid(snapshot, callback) { - const cachedResult = this._snapshotCache.get(snapshot); - if (cachedResult !== undefined) { - this._statTestedSnapshotsCached++; - if (typeof cachedResult === "boolean") { - callback(null, cachedResult); - } else { - cachedResult.push(callback); - } - return; - } - this._statTestedSnapshotsNotCached++; - this._checkSnapshotValidNoCache(snapshot, callback); - } - - /** - * @param {Snapshot} snapshot the snapshot made - * @param {function((WebpackError | null)=, boolean=): void} callback callback function - * @returns {void} - */ - _checkSnapshotValidNoCache(snapshot, callback) { - /** @type {number | undefined} */ - let startTime = undefined; - if (snapshot.hasStartTime()) { - startTime = snapshot.startTime; - } - let jobs = 1; - const jobDone = () => { - if (--jobs === 0) { - this._snapshotCache.set(snapshot, true); - callback(null, true); - } - }; - const invalid = () => { - if (jobs > 0) { - // large negative number instead of NaN or something else to keep jobs to stay a SMI (v8) - jobs = -100000000; - this._snapshotCache.set(snapshot, false); - callback(null, false); - } - }; - const invalidWithError = (path, err) => { - if (this._remainingLogs > 0) { - this._log(path, `error occurred: %s`, err); - } - invalid(); - }; - /** - * @param {string} path file path - * @param {string} current current hash - * @param {string} snap snapshot hash - * @returns {boolean} true, if ok - */ - const checkHash = (path, current, snap) => { - if (current !== snap) { - // If hash differ it's invalid - if (this._remainingLogs > 0) { - this._log(path, `hashes differ (%s != %s)`, current, snap); - } - return false; - } - return true; - }; - /** - * @param {string} path file path - * @param {boolean} current current entry - * @param {boolean} snap entry from snapshot - * @returns {boolean} true, if ok - */ - const checkExistence = (path, current, snap) => { - if (!current !== !snap) { - // If existence of item differs - // it's invalid - if (this._remainingLogs > 0) { - this._log( - path, - current ? "it didn't exist before" : "it does no longer exist" - ); - } - return false; - } - return true; - }; - /** - * @param {string} path file path - * @param {FileSystemInfoEntry} current current entry - * @param {FileSystemInfoEntry} snap entry from snapshot - * @param {boolean} log log reason - * @returns {boolean} true, if ok - */ - const checkFile = (path, current, snap, log = true) => { - if (current === snap) return true; - if (!checkExistence(path, Boolean(current), Boolean(snap))) return false; - if (current) { - // For existing items only - if (typeof startTime === "number" && current.safeTime > startTime) { - // If a change happened after starting reading the item - // this may no longer be valid - if (log && this._remainingLogs > 0) { - this._log( - path, - `it may have changed (%d) after the start time of the snapshot (%d)`, - current.safeTime, - startTime - ); - } - return false; - } - if ( - snap.timestamp !== undefined && - current.timestamp !== snap.timestamp - ) { - // If we have a timestamp (it was a file or symlink) and it differs from current timestamp - // it's invalid - if (log && this._remainingLogs > 0) { - this._log( - path, - `timestamps differ (%d != %d)`, - current.timestamp, - snap.timestamp - ); - } - return false; - } - } - return true; - }; - /** - * @param {string} path file path - * @param {ResolvedContextFileSystemInfoEntry} current current entry - * @param {ResolvedContextFileSystemInfoEntry} snap entry from snapshot - * @param {boolean} log log reason - * @returns {boolean} true, if ok - */ - const checkContext = (path, current, snap, log = true) => { - if (current === snap) return true; - if (!checkExistence(path, Boolean(current), Boolean(snap))) return false; - if (current) { - // For existing items only - if (typeof startTime === "number" && current.safeTime > startTime) { - // If a change happened after starting reading the item - // this may no longer be valid - if (log && this._remainingLogs > 0) { - this._log( - path, - `it may have changed (%d) after the start time of the snapshot (%d)`, - current.safeTime, - startTime - ); - } - return false; - } - if ( - snap.timestampHash !== undefined && - current.timestampHash !== snap.timestampHash - ) { - // If we have a timestampHash (it was a directory) and it differs from current timestampHash - // it's invalid - if (log && this._remainingLogs > 0) { - this._log( - path, - `timestamps hashes differ (%s != %s)`, - current.timestampHash, - snap.timestampHash - ); - } - return false; - } - } - return true; - }; - if (snapshot.hasChildren()) { - const childCallback = (err, result) => { - if (err || !result) return invalid(); - else jobDone(); - }; - for (const child of snapshot.children) { - const cache = this._snapshotCache.get(child); - if (cache !== undefined) { - this._statTestedChildrenCached++; - /* istanbul ignore else */ - if (typeof cache === "boolean") { - if (cache === false) { - invalid(); - return; - } - } else { - jobs++; - cache.push(childCallback); - } - } else { - this._statTestedChildrenNotCached++; - jobs++; - this._checkSnapshotValidNoCache(child, childCallback); - } - } - } - if (snapshot.hasFileTimestamps()) { - const { fileTimestamps } = snapshot; - this._statTestedEntries += fileTimestamps.size; - for (const [path, ts] of fileTimestamps) { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if (cache !== "ignore" && !checkFile(path, cache, ts)) { - invalid(); - return; - } - } else { - jobs++; - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkFile(path, entry, ts)) { - invalid(); - } else { - jobDone(); - } - }); - } - } - } - const processFileHashSnapshot = (path, hash) => { - const cache = this._fileHashes.get(path); - if (cache !== undefined) { - if (cache !== "ignore" && !checkHash(path, cache, hash)) { - invalid(); - return; - } - } else { - jobs++; - this.fileHashQueue.add(path, (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkHash(path, entry, hash)) { - invalid(); - } else { - jobDone(); - } - }); - } - }; - if (snapshot.hasFileHashes()) { - const { fileHashes } = snapshot; - this._statTestedEntries += fileHashes.size; - for (const [path, hash] of fileHashes) { - processFileHashSnapshot(path, hash); - } - } - if (snapshot.hasFileTshs()) { - const { fileTshs } = snapshot; - this._statTestedEntries += fileTshs.size; - for (const [path, tsh] of fileTshs) { - if (typeof tsh === "string") { - processFileHashSnapshot(path, tsh); - } else { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if (cache === "ignore" || !checkFile(path, cache, tsh, false)) { - processFileHashSnapshot(path, tsh && tsh.hash); - } - } else { - jobs++; - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkFile(path, entry, tsh, false)) { - processFileHashSnapshot(path, tsh && tsh.hash); - } - jobDone(); - }); - } - } - } - } - if (snapshot.hasContextTimestamps()) { - const { contextTimestamps } = snapshot; - this._statTestedEntries += contextTimestamps.size; - for (const [path, ts] of contextTimestamps) { - const cache = this._contextTimestamps.get(path); - if (cache === "ignore") continue; - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedTimestamp(cache)) !== undefined - ) { - if (!checkContext(path, resolved, ts)) { - invalid(); - return; - } - } else { - jobs++; - /** - * @param {Error=} err error - * @param {ResolvedContextFileSystemInfoEntry=} entry entry - * @returns {void} - */ - const callback = (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkContext(path, entry, ts)) { - invalid(); - } else { - jobDone(); - } - }; - if (cache !== undefined) { - this._resolveContextTimestamp(cache, callback); - } else { - this.getContextTimestamp(path, callback); - } - } - } - } - const processContextHashSnapshot = (path, hash) => { - const cache = this._contextHashes.get(path); - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedHash(cache)) !== undefined - ) { - if (!checkHash(path, resolved, hash)) { - invalid(); - return; - } - } else { - jobs++; - const callback = (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkHash(path, entry, hash)) { - invalid(); - } else { - jobDone(); - } - }; - if (cache !== undefined) { - this._resolveContextHash(cache, callback); - } else { - this.getContextHash(path, callback); - } - } - }; - if (snapshot.hasContextHashes()) { - const { contextHashes } = snapshot; - this._statTestedEntries += contextHashes.size; - for (const [path, hash] of contextHashes) { - processContextHashSnapshot(path, hash); - } - } - if (snapshot.hasContextTshs()) { - const { contextTshs } = snapshot; - this._statTestedEntries += contextTshs.size; - for (const [path, tsh] of contextTshs) { - if (typeof tsh === "string") { - processContextHashSnapshot(path, tsh); - } else { - const cache = this._contextTimestamps.get(path); - if (cache === "ignore") continue; - let resolved; - if ( - cache !== undefined && - (resolved = getResolvedTimestamp(cache)) !== undefined - ) { - if (!checkContext(path, resolved, tsh, false)) { - processContextHashSnapshot(path, tsh && tsh.hash); - } - } else { - jobs++; - /** - * @param {Error=} err error - * @param {ResolvedContextFileSystemInfoEntry=} entry entry - * @returns {void} - */ - const callback = (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkContext(path, entry, tsh, false)) { - processContextHashSnapshot(path, tsh && tsh.hash); - } - jobDone(); - }; - if (cache !== undefined) { - this._resolveContextTimestamp(cache, callback); - } else { - this.getContextTimestamp(path, callback); - } - } - } - } - } - if (snapshot.hasMissingExistence()) { - const { missingExistence } = snapshot; - this._statTestedEntries += missingExistence.size; - for (const [path, existence] of missingExistence) { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if ( - cache !== "ignore" && - !checkExistence(path, Boolean(cache), Boolean(existence)) - ) { - invalid(); - return; - } - } else { - jobs++; - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkExistence(path, Boolean(entry), Boolean(existence))) { - invalid(); - } else { - jobDone(); - } - }); - } - } - } - if (snapshot.hasManagedItemInfo()) { - const { managedItemInfo } = snapshot; - this._statTestedEntries += managedItemInfo.size; - for (const [path, info] of managedItemInfo) { - const cache = this._managedItems.get(path); - if (cache !== undefined) { - if (!checkHash(path, cache, info)) { - invalid(); - return; - } - } else { - jobs++; - this.managedItemQueue.add(path, (err, entry) => { - if (err) return invalidWithError(path, err); - if (!checkHash(path, entry, info)) { - invalid(); - } else { - jobDone(); - } - }); - } - } - } - jobDone(); - - // if there was an async action - // try to join multiple concurrent request for this snapshot - if (jobs > 0) { - const callbacks = [callback]; - callback = (err, result) => { - for (const callback of callbacks) callback(err, result); - }; - this._snapshotCache.set(snapshot, callbacks); - } - } - - _readFileTimestamp(path, callback) { - this.fs.stat(path, (err, stat) => { - if (err) { - if (err.code === "ENOENT") { - this._fileTimestamps.set(path, null); - this._cachedDeprecatedFileTimestamps = undefined; - return callback(null, null); - } - return callback(err); - } - - let ts; - if (stat.isDirectory()) { - ts = { - safeTime: 0, - timestamp: undefined - }; - } else { - const mtime = +stat.mtime; - - if (mtime) applyMtime(mtime); - - ts = { - safeTime: mtime ? mtime + FS_ACCURACY : Infinity, - timestamp: mtime - }; - } - - this._fileTimestamps.set(path, ts); - this._cachedDeprecatedFileTimestamps = undefined; - - callback(null, ts); - }); - } - - _readFileHash(path, callback) { - this.fs.readFile(path, (err, content) => { - if (err) { - if (err.code === "EISDIR") { - this._fileHashes.set(path, "directory"); - return callback(null, "directory"); - } - if (err.code === "ENOENT") { - this._fileHashes.set(path, null); - return callback(null, null); - } - if (err.code === "ERR_FS_FILE_TOO_LARGE") { - this.logger.warn(`Ignoring ${path} for hashing as it's very large`); - this._fileHashes.set(path, "too large"); - return callback(null, "too large"); - } - return callback(err); - } - - const hash = createHash(this._hashFunction); - - hash.update(content); - - const digest = /** @type {string} */ (hash.digest("hex")); - - this._fileHashes.set(path, digest); - - callback(null, digest); - }); - } - - _getFileTimestampAndHash(path, callback) { - const continueWithHash = hash => { - const cache = this._fileTimestamps.get(path); - if (cache !== undefined) { - if (cache !== "ignore") { - const result = { - ...cache, - hash - }; - this._fileTshs.set(path, result); - return callback(null, result); - } else { - this._fileTshs.set(path, hash); - return callback(null, hash); - } - } else { - this.fileTimestampQueue.add(path, (err, entry) => { - if (err) { - return callback(err); - } - const result = { - ...entry, - hash - }; - this._fileTshs.set(path, result); - return callback(null, result); - }); - } - }; - - const cache = this._fileHashes.get(path); - if (cache !== undefined) { - continueWithHash(cache); - } else { - this.fileHashQueue.add(path, (err, entry) => { - if (err) { - return callback(err); - } - continueWithHash(entry); - }); - } - } - - /** - * @template T - * @template ItemType - * @param {Object} options options - * @param {string} options.path path - * @param {function(string): ItemType} options.fromImmutablePath called when context item is an immutable path - * @param {function(string): ItemType} options.fromManagedItem called when context item is a managed path - * @param {function(string, string, function(Error=, ItemType=): void): void} options.fromSymlink called when context item is a symlink - * @param {function(string, IStats, function(Error=, ItemType=): void): void} options.fromFile called when context item is a file - * @param {function(string, IStats, function(Error=, ItemType=): void): void} options.fromDirectory called when context item is a directory - * @param {function(string[], ItemType[]): T} options.reduce called from all context items - * @param {function((Error | null)=, (T)=): void} callback callback - */ - _readContext( - { - path, - fromImmutablePath, - fromManagedItem, - fromSymlink, - fromFile, - fromDirectory, - reduce - }, - callback - ) { - this.fs.readdir(path, (err, _files) => { - if (err) { - if (err.code === "ENOENT") { - return callback(null, null); - } - return callback(err); - } - const files = /** @type {string[]} */ (_files) - .map(file => file.normalize("NFC")) - .filter(file => !/^\./.test(file)) - .sort(); - asyncLib.map( - files, - (file, callback) => { - const child = join(this.fs, path, file); - for (const immutablePath of this.immutablePathsRegExps) { - if (immutablePath.test(path)) { - // ignore any immutable path for timestamping - return callback(null, fromImmutablePath(path)); - } - } - for (const immutablePath of this.immutablePathsWithSlash) { - if (path.startsWith(immutablePath)) { - // ignore any immutable path for timestamping - return callback(null, fromImmutablePath(path)); - } - } - for (const managedPath of this.managedPathsRegExps) { - const match = managedPath.exec(path); - if (match) { - const managedItem = getManagedItem(match[1], path); - if (managedItem) { - // construct timestampHash from managed info - return this.managedItemQueue.add(managedItem, (err, info) => { - if (err) return callback(err); - return callback(null, fromManagedItem(info)); - }); - } - } - } - for (const managedPath of this.managedPathsWithSlash) { - if (path.startsWith(managedPath)) { - const managedItem = getManagedItem(managedPath, child); - if (managedItem) { - // construct timestampHash from managed info - return this.managedItemQueue.add(managedItem, (err, info) => { - if (err) return callback(err); - return callback(null, fromManagedItem(info)); - }); - } - } - } - - lstatReadlinkAbsolute(this.fs, child, (err, stat) => { - if (err) return callback(err); - - if (typeof stat === "string") { - return fromSymlink(child, stat, callback); - } - - if (stat.isFile()) { - return fromFile(child, stat, callback); - } - if (stat.isDirectory()) { - return fromDirectory(child, stat, callback); - } - callback(null, null); - }); - }, - (err, results) => { - if (err) return callback(err); - const result = reduce(files, results); - callback(null, result); - } - ); - }); - } - - _readContextTimestamp(path, callback) { - this._readContext( - { - path, - fromImmutablePath: () => null, - fromManagedItem: info => ({ - safeTime: 0, - timestampHash: info - }), - fromSymlink: (file, target, callback) => { - callback(null, { - timestampHash: target, - symlinks: new Set([target]) - }); - }, - fromFile: (file, stat, callback) => { - // Prefer the cached value over our new stat to report consistent results - const cache = this._fileTimestamps.get(file); - if (cache !== undefined) - return callback(null, cache === "ignore" ? null : cache); - - const mtime = +stat.mtime; - - if (mtime) applyMtime(mtime); - - const ts = { - safeTime: mtime ? mtime + FS_ACCURACY : Infinity, - timestamp: mtime - }; - - this._fileTimestamps.set(file, ts); - this._cachedDeprecatedFileTimestamps = undefined; - callback(null, ts); - }, - fromDirectory: (directory, stat, callback) => { - this.contextTimestampQueue.increaseParallelism(); - this._getUnresolvedContextTimestamp(directory, (err, tsEntry) => { - this.contextTimestampQueue.decreaseParallelism(); - callback(err, tsEntry); - }); - }, - reduce: (files, tsEntries) => { - let symlinks = undefined; - - const hash = createHash(this._hashFunction); - - for (const file of files) hash.update(file); - let safeTime = 0; - for (const entry of tsEntries) { - if (!entry) { - hash.update("n"); - continue; - } - if (entry.timestamp) { - hash.update("f"); - hash.update(`${entry.timestamp}`); - } else if (entry.timestampHash) { - hash.update("d"); - hash.update(`${entry.timestampHash}`); - } - if (entry.symlinks !== undefined) { - if (symlinks === undefined) symlinks = new Set(); - addAll(entry.symlinks, symlinks); - } - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - } - - const digest = /** @type {string} */ (hash.digest("hex")); - - const result = { - safeTime, - timestampHash: digest - }; - if (symlinks) result.symlinks = symlinks; - return result; - } - }, - (err, result) => { - if (err) return callback(err); - this._contextTimestamps.set(path, result); - this._cachedDeprecatedContextTimestamps = undefined; - - callback(null, result); - } - ); - } - - /** - * @param {ContextFileSystemInfoEntry} entry entry - * @param {function((Error | null)=, ResolvedContextFileSystemInfoEntry=): void} callback callback - * @returns {void} - */ - _resolveContextTimestamp(entry, callback) { - const hashes = []; - let safeTime = 0; - processAsyncTree( - entry.symlinks, - 10, - (target, push, callback) => { - this._getUnresolvedContextTimestamp(target, (err, entry) => { - if (err) return callback(err); - if (entry && entry !== "ignore") { - hashes.push(entry.timestampHash); - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - if (entry.symlinks !== undefined) { - for (const target of entry.symlinks) push(target); - } - } - callback(); - }); - }, - err => { - if (err) return callback(err); - const hash = createHash(this._hashFunction); - hash.update(entry.timestampHash); - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - hashes.sort(); - for (const h of hashes) { - hash.update(h); - } - callback( - null, - (entry.resolved = { - safeTime, - timestampHash: /** @type {string} */ (hash.digest("hex")) - }) - ); - } - ); - } - - _readContextHash(path, callback) { - this._readContext( - { - path, - fromImmutablePath: () => "", - fromManagedItem: info => info || "", - fromSymlink: (file, target, callback) => { - callback(null, { - hash: target, - symlinks: new Set([target]) - }); - }, - fromFile: (file, stat, callback) => - this.getFileHash(file, (err, hash) => { - callback(err, hash || ""); - }), - fromDirectory: (directory, stat, callback) => { - this.contextHashQueue.increaseParallelism(); - this._getUnresolvedContextHash(directory, (err, hash) => { - this.contextHashQueue.decreaseParallelism(); - callback(err, hash || ""); - }); - }, - /** - * @param {string[]} files files - * @param {(string | ContextHash)[]} fileHashes hashes - * @returns {ContextHash} reduced hash - */ - reduce: (files, fileHashes) => { - let symlinks = undefined; - const hash = createHash(this._hashFunction); - - for (const file of files) hash.update(file); - for (const entry of fileHashes) { - if (typeof entry === "string") { - hash.update(entry); - } else { - hash.update(entry.hash); - if (entry.symlinks) { - if (symlinks === undefined) symlinks = new Set(); - addAll(entry.symlinks, symlinks); - } - } - } - - const result = { - hash: /** @type {string} */ (hash.digest("hex")) - }; - if (symlinks) result.symlinks = symlinks; - return result; - } - }, - (err, result) => { - if (err) return callback(err); - this._contextHashes.set(path, result); - return callback(null, result); - } - ); - } - - /** - * @param {ContextHash} entry context hash - * @param {function((Error | null)=, string=): void} callback callback - * @returns {void} - */ - _resolveContextHash(entry, callback) { - const hashes = []; - processAsyncTree( - entry.symlinks, - 10, - (target, push, callback) => { - this._getUnresolvedContextHash(target, (err, hash) => { - if (err) return callback(err); - if (hash) { - hashes.push(hash.hash); - if (hash.symlinks !== undefined) { - for (const target of hash.symlinks) push(target); - } - } - callback(); - }); - }, - err => { - if (err) return callback(err); - const hash = createHash(this._hashFunction); - hash.update(entry.hash); - hashes.sort(); - for (const h of hashes) { - hash.update(h); - } - callback( - null, - (entry.resolved = /** @type {string} */ (hash.digest("hex"))) - ); - } - ); - } - - _readContextTimestampAndHash(path, callback) { - const finalize = (timestamp, hash) => { - const result = - timestamp === "ignore" - ? hash - : { - ...timestamp, - ...hash - }; - this._contextTshs.set(path, result); - callback(null, result); - }; - const cachedHash = this._contextHashes.get(path); - const cachedTimestamp = this._contextTimestamps.get(path); - if (cachedHash !== undefined) { - if (cachedTimestamp !== undefined) { - finalize(cachedTimestamp, cachedHash); - } else { - this.contextTimestampQueue.add(path, (err, entry) => { - if (err) return callback(err); - finalize(entry, cachedHash); - }); - } - } else { - if (cachedTimestamp !== undefined) { - this.contextHashQueue.add(path, (err, entry) => { - if (err) return callback(err); - finalize(cachedTimestamp, entry); - }); - } else { - this._readContext( - { - path, - fromImmutablePath: () => null, - fromManagedItem: info => ({ - safeTime: 0, - timestampHash: info, - hash: info || "" - }), - fromSymlink: (fle, target, callback) => { - callback(null, { - timestampHash: target, - hash: target, - symlinks: new Set([target]) - }); - }, - fromFile: (file, stat, callback) => { - this._getFileTimestampAndHash(file, callback); - }, - fromDirectory: (directory, stat, callback) => { - this.contextTshQueue.increaseParallelism(); - this.contextTshQueue.add(directory, (err, result) => { - this.contextTshQueue.decreaseParallelism(); - callback(err, result); - }); - }, - /** - * @param {string[]} files files - * @param {(Partial & Partial | string | null)[]} results results - * @returns {ContextTimestampAndHash} tsh - */ - reduce: (files, results) => { - let symlinks = undefined; - - const tsHash = createHash(this._hashFunction); - const hash = createHash(this._hashFunction); - - for (const file of files) { - tsHash.update(file); - hash.update(file); - } - let safeTime = 0; - for (const entry of results) { - if (!entry) { - tsHash.update("n"); - continue; - } - if (typeof entry === "string") { - tsHash.update("n"); - hash.update(entry); - continue; - } - if (entry.timestamp) { - tsHash.update("f"); - tsHash.update(`${entry.timestamp}`); - } else if (entry.timestampHash) { - tsHash.update("d"); - tsHash.update(`${entry.timestampHash}`); - } - if (entry.symlinks !== undefined) { - if (symlinks === undefined) symlinks = new Set(); - addAll(entry.symlinks, symlinks); - } - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - hash.update(entry.hash); - } - - const result = { - safeTime, - timestampHash: /** @type {string} */ (tsHash.digest("hex")), - hash: /** @type {string} */ (hash.digest("hex")) - }; - if (symlinks) result.symlinks = symlinks; - return result; - } - }, - (err, result) => { - if (err) return callback(err); - this._contextTshs.set(path, result); - return callback(null, result); - } - ); - } - } - } - - /** - * @param {ContextTimestampAndHash} entry entry - * @param {function((Error | null)=, ResolvedContextTimestampAndHash=): void} callback callback - * @returns {void} - */ - _resolveContextTsh(entry, callback) { - const hashes = []; - const tsHashes = []; - let safeTime = 0; - processAsyncTree( - entry.symlinks, - 10, - (target, push, callback) => { - this._getUnresolvedContextTsh(target, (err, entry) => { - if (err) return callback(err); - if (entry) { - hashes.push(entry.hash); - if (entry.timestampHash) tsHashes.push(entry.timestampHash); - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - if (entry.symlinks !== undefined) { - for (const target of entry.symlinks) push(target); - } - } - callback(); - }); - }, - err => { - if (err) return callback(err); - const hash = createHash(this._hashFunction); - const tsHash = createHash(this._hashFunction); - hash.update(entry.hash); - if (entry.timestampHash) tsHash.update(entry.timestampHash); - if (entry.safeTime) { - safeTime = Math.max(safeTime, entry.safeTime); - } - hashes.sort(); - for (const h of hashes) { - hash.update(h); - } - tsHashes.sort(); - for (const h of tsHashes) { - tsHash.update(h); - } - callback( - null, - (entry.resolved = { - safeTime, - timestampHash: /** @type {string} */ (tsHash.digest("hex")), - hash: /** @type {string} */ (hash.digest("hex")) - }) - ); - } - ); - } - - _getManagedItemDirectoryInfo(path, callback) { - this.fs.readdir(path, (err, elements) => { - if (err) { - if (err.code === "ENOENT" || err.code === "ENOTDIR") { - return callback(null, EMPTY_SET); - } - return callback(err); - } - const set = new Set( - /** @type {string[]} */ (elements).map(element => - join(this.fs, path, element) - ) - ); - callback(null, set); - }); - } - - _getManagedItemInfo(path, callback) { - const dir = dirname(this.fs, path); - this.managedItemDirectoryQueue.add(dir, (err, elements) => { - if (err) { - return callback(err); - } - if (!elements.has(path)) { - // file or directory doesn't exist - this._managedItems.set(path, "*missing"); - return callback(null, "*missing"); - } - // something exists - // it may be a file or directory - if ( - path.endsWith("node_modules") && - (path.endsWith("/node_modules") || path.endsWith("\\node_modules")) - ) { - // we are only interested in existence of this special directory - this._managedItems.set(path, "*node_modules"); - return callback(null, "*node_modules"); - } - - // we assume it's a directory, as files shouldn't occur in managed paths - const packageJsonPath = join(this.fs, path, "package.json"); - this.fs.readFile(packageJsonPath, (err, content) => { - if (err) { - if (err.code === "ENOENT" || err.code === "ENOTDIR") { - // no package.json or path is not a directory - this.fs.readdir(path, (err, elements) => { - if ( - !err && - elements.length === 1 && - elements[0] === "node_modules" - ) { - // This is only a grouping folder e. g. used by yarn - // we are only interested in existence of this special directory - this._managedItems.set(path, "*nested"); - return callback(null, "*nested"); - } - this.logger.warn( - `Managed item ${path} isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)` - ); - return callback(); - }); - return; - } - return callback(err); - } - let data; - try { - data = JSON.parse(content.toString("utf-8")); - } catch (e) { - return callback(e); - } - if (!data.name) { - this.logger.warn( - `${packageJsonPath} doesn't contain a "name" property (see snapshot.managedPaths option)` - ); - return callback(); - } - const info = `${data.name || ""}@${data.version || ""}`; - this._managedItems.set(path, info); - callback(null, info); - }); - }); - } - - getDeprecatedFileTimestamps() { - if (this._cachedDeprecatedFileTimestamps !== undefined) - return this._cachedDeprecatedFileTimestamps; - const map = new Map(); - for (const [path, info] of this._fileTimestamps) { - if (info) map.set(path, typeof info === "object" ? info.safeTime : null); - } - return (this._cachedDeprecatedFileTimestamps = map); - } - - getDeprecatedContextTimestamps() { - if (this._cachedDeprecatedContextTimestamps !== undefined) - return this._cachedDeprecatedContextTimestamps; - const map = new Map(); - for (const [path, info] of this._contextTimestamps) { - if (info) map.set(path, typeof info === "object" ? info.safeTime : null); - } - return (this._cachedDeprecatedContextTimestamps = map); - } -} - -module.exports = FileSystemInfo; -module.exports.Snapshot = Snapshot; - - -/***/ }), - -/***/ 35922: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { getEntryRuntime, mergeRuntimeOwned } = __webpack_require__(47462); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -class FlagAllModulesAsUsedPlugin { - constructor(explanation) { - this.explanation = explanation; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "FlagAllModulesAsUsedPlugin", - compilation => { - const moduleGraph = compilation.moduleGraph; - compilation.hooks.optimizeDependencies.tap( - "FlagAllModulesAsUsedPlugin", - modules => { - /** @type {RuntimeSpec} */ - let runtime = undefined; - for (const [name, { options }] of compilation.entries) { - runtime = mergeRuntimeOwned( - runtime, - getEntryRuntime(compilation, name, options) - ); - } - for (const module of modules) { - const exportsInfo = moduleGraph.getExportsInfo(module); - exportsInfo.setUsedInUnknownWay(runtime); - moduleGraph.addExtraReason(module, this.explanation); - if (module.factoryMeta === undefined) { - module.factoryMeta = {}; - } - module.factoryMeta.sideEffectFree = false; - } - } - ); - } - ); - } -} - -module.exports = FlagAllModulesAsUsedPlugin; - - -/***/ }), - -/***/ 90124: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const Queue = __webpack_require__(83690); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Dependency").ExportSpec} ExportSpec */ -/** @typedef {import("./Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("./ExportsInfo")} ExportsInfo */ -/** @typedef {import("./Module")} Module */ - -class FlagDependencyExportsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "FlagDependencyExportsPlugin", - compilation => { - const moduleGraph = compilation.moduleGraph; - const cache = compilation.getCache("FlagDependencyExportsPlugin"); - compilation.hooks.finishModules.tapAsync( - "FlagDependencyExportsPlugin", - (modules, callback) => { - const logger = compilation.getLogger( - "webpack.FlagDependencyExportsPlugin" - ); - let statRestoredFromMemCache = 0; - let statRestoredFromCache = 0; - let statNoExports = 0; - let statFlaggedUncached = 0; - let statNotCached = 0; - let statQueueItemsProcessed = 0; - - const { moduleMemCaches } = compilation; - - /** @type {Queue} */ - const queue = new Queue(); - - // Step 1: Try to restore cached provided export info from cache - logger.time("restore cached provided exports"); - asyncLib.each( - modules, - (module, callback) => { - const exportsInfo = moduleGraph.getExportsInfo(module); - if (!module.buildMeta || !module.buildMeta.exportsType) { - if (exportsInfo.otherExportsInfo.provided !== null) { - // It's a module without declared exports - statNoExports++; - exportsInfo.setHasProvideInfo(); - exportsInfo.setUnknownExportsProvided(); - return callback(); - } - } - if (typeof module.buildInfo.hash !== "string") { - statFlaggedUncached++; - // Enqueue uncacheable module for determining the exports - queue.enqueue(module); - exportsInfo.setHasProvideInfo(); - return callback(); - } - const memCache = moduleMemCaches && moduleMemCaches.get(module); - const memCacheValue = memCache && memCache.get(this); - if (memCacheValue !== undefined) { - statRestoredFromMemCache++; - exportsInfo.restoreProvided(memCacheValue); - return callback(); - } - cache.get( - module.identifier(), - module.buildInfo.hash, - (err, result) => { - if (err) return callback(err); - - if (result !== undefined) { - statRestoredFromCache++; - exportsInfo.restoreProvided(result); - } else { - statNotCached++; - // Without cached info enqueue module for determining the exports - queue.enqueue(module); - exportsInfo.setHasProvideInfo(); - } - callback(); - } - ); - }, - err => { - logger.timeEnd("restore cached provided exports"); - if (err) return callback(err); - - /** @type {Set} */ - const modulesToStore = new Set(); - - /** @type {Map>} */ - const dependencies = new Map(); - - /** @type {Module} */ - let module; - - /** @type {ExportsInfo} */ - let exportsInfo; - - /** @type {Map} */ - const exportsSpecsFromDependencies = new Map(); - - let cacheable = true; - let changed = false; - - /** - * @param {DependenciesBlock} depBlock the dependencies block - * @returns {void} - */ - const processDependenciesBlock = depBlock => { - for (const dep of depBlock.dependencies) { - processDependency(dep); - } - for (const block of depBlock.blocks) { - processDependenciesBlock(block); - } - }; - - /** - * @param {Dependency} dep the dependency - * @returns {void} - */ - const processDependency = dep => { - const exportDesc = dep.getExports(moduleGraph); - if (!exportDesc) return; - exportsSpecsFromDependencies.set(dep, exportDesc); - }; - - /** - * @param {Dependency} dep dependency - * @param {ExportsSpec} exportDesc info - * @returns {void} - */ - const processExportsSpec = (dep, exportDesc) => { - const exports = exportDesc.exports; - const globalCanMangle = exportDesc.canMangle; - const globalFrom = exportDesc.from; - const globalPriority = exportDesc.priority; - const globalTerminalBinding = - exportDesc.terminalBinding || false; - const exportDeps = exportDesc.dependencies; - if (exportDesc.hideExports) { - for (const name of exportDesc.hideExports) { - const exportInfo = exportsInfo.getExportInfo(name); - exportInfo.unsetTarget(dep); - } - } - if (exports === true) { - // unknown exports - if ( - exportsInfo.setUnknownExportsProvided( - globalCanMangle, - exportDesc.excludeExports, - globalFrom && dep, - globalFrom, - globalPriority - ) - ) { - changed = true; - } - } else if (Array.isArray(exports)) { - /** - * merge in new exports - * @param {ExportsInfo} exportsInfo own exports info - * @param {(ExportSpec | string)[]} exports list of exports - */ - const mergeExports = (exportsInfo, exports) => { - for (const exportNameOrSpec of exports) { - let name; - let canMangle = globalCanMangle; - let terminalBinding = globalTerminalBinding; - let exports = undefined; - let from = globalFrom; - let fromExport = undefined; - let priority = globalPriority; - let hidden = false; - if (typeof exportNameOrSpec === "string") { - name = exportNameOrSpec; - } else { - name = exportNameOrSpec.name; - if (exportNameOrSpec.canMangle !== undefined) - canMangle = exportNameOrSpec.canMangle; - if (exportNameOrSpec.export !== undefined) - fromExport = exportNameOrSpec.export; - if (exportNameOrSpec.exports !== undefined) - exports = exportNameOrSpec.exports; - if (exportNameOrSpec.from !== undefined) - from = exportNameOrSpec.from; - if (exportNameOrSpec.priority !== undefined) - priority = exportNameOrSpec.priority; - if (exportNameOrSpec.terminalBinding !== undefined) - terminalBinding = exportNameOrSpec.terminalBinding; - if (exportNameOrSpec.hidden !== undefined) - hidden = exportNameOrSpec.hidden; - } - const exportInfo = exportsInfo.getExportInfo(name); - - if ( - exportInfo.provided === false || - exportInfo.provided === null - ) { - exportInfo.provided = true; - changed = true; - } - - if ( - exportInfo.canMangleProvide !== false && - canMangle === false - ) { - exportInfo.canMangleProvide = false; - changed = true; - } - - if (terminalBinding && !exportInfo.terminalBinding) { - exportInfo.terminalBinding = true; - changed = true; - } - - if (exports) { - const nestedExportsInfo = - exportInfo.createNestedExportsInfo(); - mergeExports(nestedExportsInfo, exports); - } - - if ( - from && - (hidden - ? exportInfo.unsetTarget(dep) - : exportInfo.setTarget( - dep, - from, - fromExport === undefined ? [name] : fromExport, - priority - )) - ) { - changed = true; - } - - // Recalculate target exportsInfo - const target = exportInfo.getTarget(moduleGraph); - let targetExportsInfo = undefined; - if (target) { - const targetModuleExportsInfo = - moduleGraph.getExportsInfo(target.module); - targetExportsInfo = - targetModuleExportsInfo.getNestedExportsInfo( - target.export - ); - // add dependency for this module - const set = dependencies.get(target.module); - if (set === undefined) { - dependencies.set(target.module, new Set([module])); - } else { - set.add(module); - } - } - - if (exportInfo.exportsInfoOwned) { - if ( - exportInfo.exportsInfo.setRedirectNamedTo( - targetExportsInfo - ) - ) { - changed = true; - } - } else if ( - exportInfo.exportsInfo !== targetExportsInfo - ) { - exportInfo.exportsInfo = targetExportsInfo; - changed = true; - } - } - }; - mergeExports(exportsInfo, exports); - } - // store dependencies - if (exportDeps) { - cacheable = false; - for (const exportDependency of exportDeps) { - // add dependency for this module - const set = dependencies.get(exportDependency); - if (set === undefined) { - dependencies.set(exportDependency, new Set([module])); - } else { - set.add(module); - } - } - } - }; - - const notifyDependencies = () => { - const deps = dependencies.get(module); - if (deps !== undefined) { - for (const dep of deps) { - queue.enqueue(dep); - } - } - }; - - logger.time("figure out provided exports"); - while (queue.length > 0) { - module = queue.dequeue(); - - statQueueItemsProcessed++; - - exportsInfo = moduleGraph.getExportsInfo(module); - - cacheable = true; - changed = false; - - exportsSpecsFromDependencies.clear(); - moduleGraph.freeze(); - processDependenciesBlock(module); - moduleGraph.unfreeze(); - for (const [ - dep, - exportsSpec - ] of exportsSpecsFromDependencies) { - processExportsSpec(dep, exportsSpec); - } - - if (cacheable) { - modulesToStore.add(module); - } - - if (changed) { - notifyDependencies(); - } - } - logger.timeEnd("figure out provided exports"); - - logger.log( - `${Math.round( - (100 * (statFlaggedUncached + statNotCached)) / - (statRestoredFromMemCache + - statRestoredFromCache + - statNotCached + - statFlaggedUncached + - statNoExports) - )}% of exports of modules have been determined (${statNoExports} no declared exports, ${statNotCached} not cached, ${statFlaggedUncached} flagged uncacheable, ${statRestoredFromCache} from cache, ${statRestoredFromMemCache} from mem cache, ${ - statQueueItemsProcessed - - statNotCached - - statFlaggedUncached - } additional calculations due to dependencies)` - ); - - logger.time("store provided exports into cache"); - asyncLib.each( - modulesToStore, - (module, callback) => { - if (typeof module.buildInfo.hash !== "string") { - // not cacheable - return callback(); - } - const cachedData = moduleGraph - .getExportsInfo(module) - .getRestoreProvidedData(); - const memCache = - moduleMemCaches && moduleMemCaches.get(module); - if (memCache) { - memCache.set(this, cachedData); - } - cache.store( - module.identifier(), - module.buildInfo.hash, - cachedData, - callback - ); - }, - err => { - logger.timeEnd("store provided exports into cache"); - callback(err); - } - ); - } - ); - } - ); - - /** @type {WeakMap} */ - const providedExportsCache = new WeakMap(); - compilation.hooks.rebuildModule.tap( - "FlagDependencyExportsPlugin", - module => { - providedExportsCache.set( - module, - moduleGraph.getExportsInfo(module).getRestoreProvidedData() - ); - } - ); - compilation.hooks.finishRebuildingModule.tap( - "FlagDependencyExportsPlugin", - module => { - moduleGraph - .getExportsInfo(module) - .restoreProvided(providedExportsCache.get(module)); - } - ); - } - ); - } -} - -module.exports = FlagDependencyExportsPlugin; - - -/***/ }), - -/***/ 71768: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const { UsageState } = __webpack_require__(13168); -const ModuleGraphConnection = __webpack_require__(82921); -const { STAGE_DEFAULT } = __webpack_require__(6267); -const ArrayQueue = __webpack_require__(52074); -const TupleQueue = __webpack_require__(22796); -const { getEntryRuntime, mergeRuntimeOwned } = __webpack_require__(47462); - -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("./ExportsInfo")} ExportsInfo */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -const { NO_EXPORTS_REFERENCED, EXPORTS_OBJECT_REFERENCED } = Dependency; - -class FlagDependencyUsagePlugin { - /** - * @param {boolean} global do a global analysis instead of per runtime - */ - constructor(global) { - this.global = global; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("FlagDependencyUsagePlugin", compilation => { - const moduleGraph = compilation.moduleGraph; - compilation.hooks.optimizeDependencies.tap( - { - name: "FlagDependencyUsagePlugin", - stage: STAGE_DEFAULT - }, - modules => { - if (compilation.moduleMemCaches) { - throw new Error( - "optimization.usedExports can't be used with cacheUnaffected as export usage is a global effect" - ); - } - - const logger = compilation.getLogger( - "webpack.FlagDependencyUsagePlugin" - ); - /** @type {Map} */ - const exportInfoToModuleMap = new Map(); - - /** @type {TupleQueue<[Module, RuntimeSpec]>} */ - const queue = new TupleQueue(); - - /** - * @param {Module} module module to process - * @param {(string[] | ReferencedExport)[]} usedExports list of used exports - * @param {RuntimeSpec} runtime part of which runtime - * @param {boolean} forceSideEffects always apply side effects - * @returns {void} - */ - const processReferencedModule = ( - module, - usedExports, - runtime, - forceSideEffects - ) => { - const exportsInfo = moduleGraph.getExportsInfo(module); - if (usedExports.length > 0) { - if (!module.buildMeta || !module.buildMeta.exportsType) { - if (exportsInfo.setUsedWithoutInfo(runtime)) { - queue.enqueue(module, runtime); - } - return; - } - for (const usedExportInfo of usedExports) { - let usedExport; - let canMangle = true; - if (Array.isArray(usedExportInfo)) { - usedExport = usedExportInfo; - } else { - usedExport = usedExportInfo.name; - canMangle = usedExportInfo.canMangle !== false; - } - if (usedExport.length === 0) { - if (exportsInfo.setUsedInUnknownWay(runtime)) { - queue.enqueue(module, runtime); - } - } else { - let currentExportsInfo = exportsInfo; - for (let i = 0; i < usedExport.length; i++) { - const exportInfo = currentExportsInfo.getExportInfo( - usedExport[i] - ); - if (canMangle === false) { - exportInfo.canMangleUse = false; - } - const lastOne = i === usedExport.length - 1; - if (!lastOne) { - const nestedInfo = exportInfo.getNestedExportsInfo(); - if (nestedInfo) { - if ( - exportInfo.setUsedConditionally( - used => used === UsageState.Unused, - UsageState.OnlyPropertiesUsed, - runtime - ) - ) { - const currentModule = - currentExportsInfo === exportsInfo - ? module - : exportInfoToModuleMap.get(currentExportsInfo); - if (currentModule) { - queue.enqueue(currentModule, runtime); - } - } - currentExportsInfo = nestedInfo; - continue; - } - } - if ( - exportInfo.setUsedConditionally( - v => v !== UsageState.Used, - UsageState.Used, - runtime - ) - ) { - const currentModule = - currentExportsInfo === exportsInfo - ? module - : exportInfoToModuleMap.get(currentExportsInfo); - if (currentModule) { - queue.enqueue(currentModule, runtime); - } - } - break; - } - } - } - } else { - // for a module without side effects we stop tracking usage here when no export is used - // This module won't be evaluated in this case - // TODO webpack 6 remove this check - if ( - !forceSideEffects && - module.factoryMeta !== undefined && - module.factoryMeta.sideEffectFree - ) { - return; - } - if (exportsInfo.setUsedForSideEffectsOnly(runtime)) { - queue.enqueue(module, runtime); - } - } - }; - - /** - * @param {DependenciesBlock} module the module - * @param {RuntimeSpec} runtime part of which runtime - * @param {boolean} forceSideEffects always apply side effects - * @returns {void} - */ - const processModule = (module, runtime, forceSideEffects) => { - /** @type {Map>} */ - const map = new Map(); - - /** @type {ArrayQueue} */ - const queue = new ArrayQueue(); - queue.enqueue(module); - for (;;) { - const block = queue.dequeue(); - if (block === undefined) break; - for (const b of block.blocks) { - if ( - !this.global && - b.groupOptions && - b.groupOptions.entryOptions - ) { - processModule( - b, - b.groupOptions.entryOptions.runtime || undefined, - true - ); - } else { - queue.enqueue(b); - } - } - for (const dep of block.dependencies) { - const connection = moduleGraph.getConnection(dep); - if (!connection || !connection.module) { - continue; - } - const activeState = connection.getActiveState(runtime); - if (activeState === false) continue; - const { module } = connection; - if (activeState === ModuleGraphConnection.TRANSITIVE_ONLY) { - processModule(module, runtime, false); - continue; - } - const oldReferencedExports = map.get(module); - if (oldReferencedExports === EXPORTS_OBJECT_REFERENCED) { - continue; - } - const referencedExports = - compilation.getDependencyReferencedExports(dep, runtime); - if ( - oldReferencedExports === undefined || - oldReferencedExports === NO_EXPORTS_REFERENCED || - referencedExports === EXPORTS_OBJECT_REFERENCED - ) { - map.set(module, referencedExports); - } else if ( - oldReferencedExports !== undefined && - referencedExports === NO_EXPORTS_REFERENCED - ) { - continue; - } else { - let exportsMap; - if (Array.isArray(oldReferencedExports)) { - exportsMap = new Map(); - for (const item of oldReferencedExports) { - if (Array.isArray(item)) { - exportsMap.set(item.join("\n"), item); - } else { - exportsMap.set(item.name.join("\n"), item); - } - } - map.set(module, exportsMap); - } else { - exportsMap = oldReferencedExports; - } - for (const item of referencedExports) { - if (Array.isArray(item)) { - const key = item.join("\n"); - const oldItem = exportsMap.get(key); - if (oldItem === undefined) { - exportsMap.set(key, item); - } - // if oldItem is already an array we have to do nothing - // if oldItem is an ReferencedExport object, we don't have to do anything - // as canMangle defaults to true for arrays - } else { - const key = item.name.join("\n"); - const oldItem = exportsMap.get(key); - if (oldItem === undefined || Array.isArray(oldItem)) { - exportsMap.set(key, item); - } else { - exportsMap.set(key, { - name: item.name, - canMangle: item.canMangle && oldItem.canMangle - }); - } - } - } - } - } - } - - for (const [module, referencedExports] of map) { - if (Array.isArray(referencedExports)) { - processReferencedModule( - module, - referencedExports, - runtime, - forceSideEffects - ); - } else { - processReferencedModule( - module, - Array.from(referencedExports.values()), - runtime, - forceSideEffects - ); - } - } - }; - - logger.time("initialize exports usage"); - for (const module of modules) { - const exportsInfo = moduleGraph.getExportsInfo(module); - exportInfoToModuleMap.set(exportsInfo, module); - exportsInfo.setHasUseInfo(); - } - logger.timeEnd("initialize exports usage"); - - logger.time("trace exports usage in graph"); - - /** - * @param {Dependency} dep dependency - * @param {RuntimeSpec} runtime runtime - */ - const processEntryDependency = (dep, runtime) => { - const module = moduleGraph.getModule(dep); - if (module) { - processReferencedModule( - module, - NO_EXPORTS_REFERENCED, - runtime, - true - ); - } - }; - /** @type {RuntimeSpec} */ - let globalRuntime = undefined; - for (const [ - entryName, - { dependencies: deps, includeDependencies: includeDeps, options } - ] of compilation.entries) { - const runtime = this.global - ? undefined - : getEntryRuntime(compilation, entryName, options); - for (const dep of deps) { - processEntryDependency(dep, runtime); - } - for (const dep of includeDeps) { - processEntryDependency(dep, runtime); - } - globalRuntime = mergeRuntimeOwned(globalRuntime, runtime); - } - for (const dep of compilation.globalEntry.dependencies) { - processEntryDependency(dep, globalRuntime); - } - for (const dep of compilation.globalEntry.includeDependencies) { - processEntryDependency(dep, globalRuntime); - } - - while (queue.length) { - const [module, runtime] = queue.dequeue(); - processModule(module, runtime, false); - } - logger.timeEnd("trace exports usage in graph"); - } - ); - }); - } -} - -module.exports = FlagDependencyUsagePlugin; - - -/***/ }), - -/***/ 97152: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ -/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./NormalModule")} NormalModule */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} GenerateContext - * @property {DependencyTemplates} dependencyTemplates mapping from dependencies to templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {Set} runtimeRequirements the requirements for runtime - * @property {RuntimeSpec} runtime the runtime - * @property {ConcatenationScope=} concatenationScope when in concatenated module, information about other concatenated modules - * @property {CodeGenerationResults=} codeGenerationResults code generation results of other modules (need to have a codeGenerationDependency to use that) - * @property {string} type which kind of code should be generated - * @property {function(): Map=} getData get access to the code generation data - */ - -/** - * @typedef {Object} UpdateHashContext - * @property {NormalModule} module the module - * @property {ChunkGraph} chunkGraph - * @property {RuntimeSpec} runtime - * @property {RuntimeTemplate=} runtimeTemplate - */ - -/** - * - */ -class Generator { - static byType(map) { - return new ByTypeGenerator(map); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate( - module, - { dependencyTemplates, runtimeTemplate, moduleGraph, type } - ) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @param {NormalModule} module module for which the bailout reason should be determined - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(module, context) { - return `Module Concatenation is not implemented for ${this.constructor.name}`; - } - - /** - * @param {Hash} hash hash that will be modified - * @param {UpdateHashContext} updateHashContext context for updating hash - */ - updateHash(hash, { module, runtime }) { - // no nothing - } -} - -class ByTypeGenerator extends Generator { - constructor(map) { - super(); - this.map = map; - this._types = new Set(Object.keys(map)); - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return this._types; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const t = type || "javascript"; - const generator = this.map[t]; - return generator ? generator.getSize(module, t) : 0; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const type = generateContext.type; - const generator = this.map[type]; - if (!generator) { - throw new Error(`Generator.byType: no generator specified for ${type}`); - } - return generator.generate(module, generateContext); - } -} - -module.exports = Generator; - - -/***/ }), - -/***/ 37855: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Module")} Module */ - -/** - * @param {ChunkGroup} chunkGroup the ChunkGroup to connect - * @param {Chunk} chunk chunk to tie to ChunkGroup - * @returns {void} - */ -const connectChunkGroupAndChunk = (chunkGroup, chunk) => { - if (chunkGroup.pushChunk(chunk)) { - chunk.addGroup(chunkGroup); - } -}; - -/** - * @param {ChunkGroup} parent parent ChunkGroup to connect - * @param {ChunkGroup} child child ChunkGroup to connect - * @returns {void} - */ -const connectChunkGroupParentAndChild = (parent, child) => { - if (parent.addChild(child)) { - child.addParent(parent); - } -}; - -exports.connectChunkGroupAndChunk = connectChunkGroupAndChunk; -exports.connectChunkGroupParentAndChild = connectChunkGroupParentAndChild; - - -/***/ }), - -/***/ 14330: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const WebpackError = __webpack_require__(27154); - -module.exports = class HarmonyLinkingError extends WebpackError { - /** @param {string} message Error message */ - constructor(message) { - super(message); - this.name = "HarmonyLinkingError"; - this.hideStack = true; - } -}; - - -/***/ }), - -/***/ 35230: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ - -/** - * @template T - * @callback Callback - * @param {Error=} err - * @param {T=} stats - * @returns {void} - */ - -class HookWebpackError extends WebpackError { - /** - * Creates an instance of HookWebpackError. - * @param {Error} error inner error - * @param {string} hook name of hook - */ - constructor(error, hook) { - super(error.message); - - this.name = "HookWebpackError"; - this.hook = hook; - this.error = error; - this.hideStack = true; - this.details = `caused by plugins in ${hook}\n${error.stack}`; - - this.stack += `\n-- inner error --\n${error.stack}`; - } -} - -module.exports = HookWebpackError; - -/** - * @param {Error} error an error - * @param {string} hook name of the hook - * @returns {WebpackError} a webpack error - */ -const makeWebpackError = (error, hook) => { - if (error instanceof WebpackError) return error; - return new HookWebpackError(error, hook); -}; -module.exports.makeWebpackError = makeWebpackError; - -/** - * @template T - * @param {function((WebpackError | null)=, T=): void} callback webpack error callback - * @param {string} hook name of hook - * @returns {Callback} generic callback - */ -const makeWebpackErrorCallback = (callback, hook) => { - return (err, result) => { - if (err) { - if (err instanceof WebpackError) { - callback(err); - return; - } - callback(new HookWebpackError(err, hook)); - return; - } - callback(null, result); - }; -}; - -module.exports.makeWebpackErrorCallback = makeWebpackErrorCallback; - -/** - * @template T - * @param {function(): T} fn function which will be wrapping in try catch - * @param {string} hook name of hook - * @returns {T} the result - */ -const tryRunOrWebpackError = (fn, hook) => { - let r; - try { - r = fn(); - } catch (err) { - if (err instanceof WebpackError) { - throw err; - } - throw new HookWebpackError(err, hook); - } - return r; -}; - -module.exports.tryRunOrWebpackError = tryRunOrWebpackError; - - -/***/ }), - -/***/ 23456: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncBailHook } = __webpack_require__(44217); -const { RawSource } = __webpack_require__(51255); -const ChunkGraph = __webpack_require__(75449); -const Compilation = __webpack_require__(73002); -const HotUpdateChunk = __webpack_require__(23834); -const NormalModule = __webpack_require__(89417); -const RuntimeGlobals = __webpack_require__(39201); -const WebpackError = __webpack_require__(27154); -const ConstDependency = __webpack_require__(14367); -const ImportMetaHotAcceptDependency = __webpack_require__(94717); -const ImportMetaHotDeclineDependency = __webpack_require__(15491); -const ModuleHotAcceptDependency = __webpack_require__(72674); -const ModuleHotDeclineDependency = __webpack_require__(40213); -const HotModuleReplacementRuntimeModule = __webpack_require__(37658); -const JavascriptParser = __webpack_require__(33177); -const { - evaluateToIdentifier -} = __webpack_require__(97574); -const { find, isSubset } = __webpack_require__(73268); -const TupleSet = __webpack_require__(12178); -const { compareModulesById } = __webpack_require__(58792); -const { - getRuntimeKey, - keyToRuntime, - forEachRuntime, - mergeRuntimeOwned, - subtractRuntime, - intersectRuntime -} = __webpack_require__(47462); - -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./RuntimeModule")} RuntimeModule */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} HMRJavascriptParserHooks - * @property {SyncBailHook<[TODO, string[]], void>} hotAcceptCallback - * @property {SyncBailHook<[TODO, string[]], void>} hotAcceptWithoutCallback - */ - -/** @type {WeakMap} */ -const parserHooksMap = new WeakMap(); - -class HotModuleReplacementPlugin { - /** - * @param {JavascriptParser} parser the parser - * @returns {HMRJavascriptParserHooks} the attached hooks - */ - static getParserHooks(parser) { - if (!(parser instanceof JavascriptParser)) { - throw new TypeError( - "The 'parser' argument must be an instance of JavascriptParser" - ); - } - let hooks = parserHooksMap.get(parser); - if (hooks === undefined) { - hooks = { - hotAcceptCallback: new SyncBailHook(["expression", "requests"]), - hotAcceptWithoutCallback: new SyncBailHook(["expression", "requests"]) - }; - parserHooksMap.set(parser, hooks); - } - return hooks; - } - - constructor(options) { - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _backCompat: backCompat } = compiler; - if (compiler.options.output.strictModuleErrorHandling === undefined) - compiler.options.output.strictModuleErrorHandling = true; - const runtimeRequirements = [RuntimeGlobals.module]; - - const createAcceptHandler = (parser, ParamDependency) => { - const { hotAcceptCallback, hotAcceptWithoutCallback } = - HotModuleReplacementPlugin.getParserHooks(parser); - - return expr => { - const module = parser.state.module; - const dep = new ConstDependency( - `${module.moduleArgument}.hot.accept`, - expr.callee.range, - runtimeRequirements - ); - dep.loc = expr.loc; - module.addPresentationalDependency(dep); - module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; - if (expr.arguments.length >= 1) { - const arg = parser.evaluateExpression(expr.arguments[0]); - let params = []; - let requests = []; - if (arg.isString()) { - params = [arg]; - } else if (arg.isArray()) { - params = arg.items.filter(param => param.isString()); - } - if (params.length > 0) { - params.forEach((param, idx) => { - const request = param.string; - const dep = new ParamDependency(request, param.range); - dep.optional = true; - dep.loc = Object.create(expr.loc); - dep.loc.index = idx; - module.addDependency(dep); - requests.push(request); - }); - if (expr.arguments.length > 1) { - hotAcceptCallback.call(expr.arguments[1], requests); - for (let i = 1; i < expr.arguments.length; i++) { - parser.walkExpression(expr.arguments[i]); - } - return true; - } else { - hotAcceptWithoutCallback.call(expr, requests); - return true; - } - } - } - parser.walkExpressions(expr.arguments); - return true; - }; - }; - - const createDeclineHandler = (parser, ParamDependency) => expr => { - const module = parser.state.module; - const dep = new ConstDependency( - `${module.moduleArgument}.hot.decline`, - expr.callee.range, - runtimeRequirements - ); - dep.loc = expr.loc; - module.addPresentationalDependency(dep); - module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; - if (expr.arguments.length === 1) { - const arg = parser.evaluateExpression(expr.arguments[0]); - let params = []; - if (arg.isString()) { - params = [arg]; - } else if (arg.isArray()) { - params = arg.items.filter(param => param.isString()); - } - params.forEach((param, idx) => { - const dep = new ParamDependency(param.string, param.range); - dep.optional = true; - dep.loc = Object.create(expr.loc); - dep.loc.index = idx; - module.addDependency(dep); - }); - } - return true; - }; - - const createHMRExpressionHandler = parser => expr => { - const module = parser.state.module; - const dep = new ConstDependency( - `${module.moduleArgument}.hot`, - expr.range, - runtimeRequirements - ); - dep.loc = expr.loc; - module.addPresentationalDependency(dep); - module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; - return true; - }; - - const applyModuleHot = parser => { - parser.hooks.evaluateIdentifier.for("module.hot").tap( - { - name: "HotModuleReplacementPlugin", - before: "NodeStuffPlugin" - }, - expr => { - return evaluateToIdentifier( - "module.hot", - "module", - () => ["hot"], - true - )(expr); - } - ); - parser.hooks.call - .for("module.hot.accept") - .tap( - "HotModuleReplacementPlugin", - createAcceptHandler(parser, ModuleHotAcceptDependency) - ); - parser.hooks.call - .for("module.hot.decline") - .tap( - "HotModuleReplacementPlugin", - createDeclineHandler(parser, ModuleHotDeclineDependency) - ); - parser.hooks.expression - .for("module.hot") - .tap("HotModuleReplacementPlugin", createHMRExpressionHandler(parser)); - }; - - const applyImportMetaHot = parser => { - parser.hooks.evaluateIdentifier - .for("import.meta.webpackHot") - .tap("HotModuleReplacementPlugin", expr => { - return evaluateToIdentifier( - "import.meta.webpackHot", - "import.meta", - () => ["webpackHot"], - true - )(expr); - }); - parser.hooks.call - .for("import.meta.webpackHot.accept") - .tap( - "HotModuleReplacementPlugin", - createAcceptHandler(parser, ImportMetaHotAcceptDependency) - ); - parser.hooks.call - .for("import.meta.webpackHot.decline") - .tap( - "HotModuleReplacementPlugin", - createDeclineHandler(parser, ImportMetaHotDeclineDependency) - ); - parser.hooks.expression - .for("import.meta.webpackHot") - .tap("HotModuleReplacementPlugin", createHMRExpressionHandler(parser)); - }; - - compiler.hooks.compilation.tap( - "HotModuleReplacementPlugin", - (compilation, { normalModuleFactory }) => { - // This applies the HMR plugin only to the targeted compiler - // It should not affect child compilations - if (compilation.compiler !== compiler) return; - - //#region module.hot.* API - compilation.dependencyFactories.set( - ModuleHotAcceptDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ModuleHotAcceptDependency, - new ModuleHotAcceptDependency.Template() - ); - compilation.dependencyFactories.set( - ModuleHotDeclineDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ModuleHotDeclineDependency, - new ModuleHotDeclineDependency.Template() - ); - //#endregion - - //#region import.meta.webpackHot.* API - compilation.dependencyFactories.set( - ImportMetaHotAcceptDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ImportMetaHotAcceptDependency, - new ImportMetaHotAcceptDependency.Template() - ); - compilation.dependencyFactories.set( - ImportMetaHotDeclineDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ImportMetaHotDeclineDependency, - new ImportMetaHotDeclineDependency.Template() - ); - //#endregion - - let hotIndex = 0; - const fullHashChunkModuleHashes = {}; - const chunkModuleHashes = {}; - - compilation.hooks.record.tap( - "HotModuleReplacementPlugin", - (compilation, records) => { - if (records.hash === compilation.hash) return; - const chunkGraph = compilation.chunkGraph; - records.hash = compilation.hash; - records.hotIndex = hotIndex; - records.fullHashChunkModuleHashes = fullHashChunkModuleHashes; - records.chunkModuleHashes = chunkModuleHashes; - records.chunkHashes = {}; - records.chunkRuntime = {}; - for (const chunk of compilation.chunks) { - records.chunkHashes[chunk.id] = chunk.hash; - records.chunkRuntime[chunk.id] = getRuntimeKey(chunk.runtime); - } - records.chunkModuleIds = {}; - for (const chunk of compilation.chunks) { - records.chunkModuleIds[chunk.id] = Array.from( - chunkGraph.getOrderedChunkModulesIterable( - chunk, - compareModulesById(chunkGraph) - ), - m => chunkGraph.getModuleId(m) - ); - } - } - ); - /** @type {TupleSet<[Module, Chunk]>} */ - const updatedModules = new TupleSet(); - /** @type {TupleSet<[Module, Chunk]>} */ - const fullHashModules = new TupleSet(); - /** @type {TupleSet<[Module, RuntimeSpec]>} */ - const nonCodeGeneratedModules = new TupleSet(); - compilation.hooks.fullHash.tap("HotModuleReplacementPlugin", hash => { - const chunkGraph = compilation.chunkGraph; - const records = compilation.records; - for (const chunk of compilation.chunks) { - const getModuleHash = module => { - if ( - compilation.codeGenerationResults.has(module, chunk.runtime) - ) { - return compilation.codeGenerationResults.getHash( - module, - chunk.runtime - ); - } else { - nonCodeGeneratedModules.add(module, chunk.runtime); - return chunkGraph.getModuleHash(module, chunk.runtime); - } - }; - const fullHashModulesInThisChunk = - chunkGraph.getChunkFullHashModulesSet(chunk); - if (fullHashModulesInThisChunk !== undefined) { - for (const module of fullHashModulesInThisChunk) { - fullHashModules.add(module, chunk); - } - } - const modules = chunkGraph.getChunkModulesIterable(chunk); - if (modules !== undefined) { - if (records.chunkModuleHashes) { - if (fullHashModulesInThisChunk !== undefined) { - for (const module of modules) { - const key = `${chunk.id}|${module.identifier()}`; - const hash = getModuleHash(module); - if ( - fullHashModulesInThisChunk.has( - /** @type {RuntimeModule} */ (module) - ) - ) { - if (records.fullHashChunkModuleHashes[key] !== hash) { - updatedModules.add(module, chunk); - } - fullHashChunkModuleHashes[key] = hash; - } else { - if (records.chunkModuleHashes[key] !== hash) { - updatedModules.add(module, chunk); - } - chunkModuleHashes[key] = hash; - } - } - } else { - for (const module of modules) { - const key = `${chunk.id}|${module.identifier()}`; - const hash = getModuleHash(module); - if (records.chunkModuleHashes[key] !== hash) { - updatedModules.add(module, chunk); - } - chunkModuleHashes[key] = hash; - } - } - } else { - if (fullHashModulesInThisChunk !== undefined) { - for (const module of modules) { - const key = `${chunk.id}|${module.identifier()}`; - const hash = getModuleHash(module); - if ( - fullHashModulesInThisChunk.has( - /** @type {RuntimeModule} */ (module) - ) - ) { - fullHashChunkModuleHashes[key] = hash; - } else { - chunkModuleHashes[key] = hash; - } - } - } else { - for (const module of modules) { - const key = `${chunk.id}|${module.identifier()}`; - const hash = getModuleHash(module); - chunkModuleHashes[key] = hash; - } - } - } - } - } - - hotIndex = records.hotIndex || 0; - if (updatedModules.size > 0) hotIndex++; - - hash.update(`${hotIndex}`); - }); - compilation.hooks.processAssets.tap( - { - name: "HotModuleReplacementPlugin", - stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL - }, - () => { - const chunkGraph = compilation.chunkGraph; - const records = compilation.records; - if (records.hash === compilation.hash) return; - if ( - !records.chunkModuleHashes || - !records.chunkHashes || - !records.chunkModuleIds - ) { - return; - } - for (const [module, chunk] of fullHashModules) { - const key = `${chunk.id}|${module.identifier()}`; - const hash = nonCodeGeneratedModules.has(module, chunk.runtime) - ? chunkGraph.getModuleHash(module, chunk.runtime) - : compilation.codeGenerationResults.getHash( - module, - chunk.runtime - ); - if (records.chunkModuleHashes[key] !== hash) { - updatedModules.add(module, chunk); - } - chunkModuleHashes[key] = hash; - } - - /** @type {Map, removedChunkIds: Set, removedModules: Set, filename: string, assetInfo: AssetInfo }>} */ - const hotUpdateMainContentByRuntime = new Map(); - let allOldRuntime; - for (const key of Object.keys(records.chunkRuntime)) { - const runtime = keyToRuntime(records.chunkRuntime[key]); - allOldRuntime = mergeRuntimeOwned(allOldRuntime, runtime); - } - forEachRuntime(allOldRuntime, runtime => { - const { path: filename, info: assetInfo } = - compilation.getPathWithInfo( - compilation.outputOptions.hotUpdateMainFilename, - { - hash: records.hash, - runtime - } - ); - hotUpdateMainContentByRuntime.set(runtime, { - updatedChunkIds: new Set(), - removedChunkIds: new Set(), - removedModules: new Set(), - filename, - assetInfo - }); - }); - if (hotUpdateMainContentByRuntime.size === 0) return; - - // Create a list of all active modules to verify which modules are removed completely - /** @type {Map} */ - const allModules = new Map(); - for (const module of compilation.modules) { - const id = chunkGraph.getModuleId(module); - allModules.set(id, module); - } - - // List of completely removed modules - /** @type {Set} */ - const completelyRemovedModules = new Set(); - - for (const key of Object.keys(records.chunkHashes)) { - const oldRuntime = keyToRuntime(records.chunkRuntime[key]); - /** @type {Module[]} */ - const remainingModules = []; - // Check which modules are removed - for (const id of records.chunkModuleIds[key]) { - const module = allModules.get(id); - if (module === undefined) { - completelyRemovedModules.add(id); - } else { - remainingModules.push(module); - } - } - - let chunkId; - let newModules; - let newRuntimeModules; - let newFullHashModules; - let newDependentHashModules; - let newRuntime; - let removedFromRuntime; - const currentChunk = find( - compilation.chunks, - chunk => `${chunk.id}` === key - ); - if (currentChunk) { - chunkId = currentChunk.id; - newRuntime = intersectRuntime( - currentChunk.runtime, - allOldRuntime - ); - if (newRuntime === undefined) continue; - newModules = chunkGraph - .getChunkModules(currentChunk) - .filter(module => updatedModules.has(module, currentChunk)); - newRuntimeModules = Array.from( - chunkGraph.getChunkRuntimeModulesIterable(currentChunk) - ).filter(module => updatedModules.has(module, currentChunk)); - const fullHashModules = - chunkGraph.getChunkFullHashModulesIterable(currentChunk); - newFullHashModules = - fullHashModules && - Array.from(fullHashModules).filter(module => - updatedModules.has(module, currentChunk) - ); - const dependentHashModules = - chunkGraph.getChunkDependentHashModulesIterable(currentChunk); - newDependentHashModules = - dependentHashModules && - Array.from(dependentHashModules).filter(module => - updatedModules.has(module, currentChunk) - ); - removedFromRuntime = subtractRuntime(oldRuntime, newRuntime); - } else { - // chunk has completely removed - chunkId = `${+key}` === key ? +key : key; - removedFromRuntime = oldRuntime; - newRuntime = oldRuntime; - } - if (removedFromRuntime) { - // chunk was removed from some runtimes - forEachRuntime(removedFromRuntime, runtime => { - hotUpdateMainContentByRuntime - .get(runtime) - .removedChunkIds.add(chunkId); - }); - // dispose modules from the chunk in these runtimes - // where they are no longer in this runtime - for (const module of remainingModules) { - const moduleKey = `${key}|${module.identifier()}`; - const oldHash = records.chunkModuleHashes[moduleKey]; - const runtimes = chunkGraph.getModuleRuntimes(module); - if (oldRuntime === newRuntime && runtimes.has(newRuntime)) { - // Module is still in the same runtime combination - const hash = nonCodeGeneratedModules.has(module, newRuntime) - ? chunkGraph.getModuleHash(module, newRuntime) - : compilation.codeGenerationResults.getHash( - module, - newRuntime - ); - if (hash !== oldHash) { - if (module.type === "runtime") { - newRuntimeModules = newRuntimeModules || []; - newRuntimeModules.push( - /** @type {RuntimeModule} */ (module) - ); - } else { - newModules = newModules || []; - newModules.push(module); - } - } - } else { - // module is no longer in this runtime combination - // We (incorrectly) assume that it's not in an overlapping runtime combination - // and dispose it from the main runtimes the chunk was removed from - forEachRuntime(removedFromRuntime, runtime => { - // If the module is still used in this runtime, do not dispose it - // This could create a bad runtime state where the module is still loaded, - // but no chunk which contains it. This means we don't receive further HMR updates - // to this module and that's bad. - // TODO force load one of the chunks which contains the module - for (const moduleRuntime of runtimes) { - if (typeof moduleRuntime === "string") { - if (moduleRuntime === runtime) return; - } else if (moduleRuntime !== undefined) { - if (moduleRuntime.has(runtime)) return; - } - } - hotUpdateMainContentByRuntime - .get(runtime) - .removedModules.add(module); - }); - } - } - } - if ( - (newModules && newModules.length > 0) || - (newRuntimeModules && newRuntimeModules.length > 0) - ) { - const hotUpdateChunk = new HotUpdateChunk(); - if (backCompat) - ChunkGraph.setChunkGraphForChunk(hotUpdateChunk, chunkGraph); - hotUpdateChunk.id = chunkId; - hotUpdateChunk.runtime = newRuntime; - if (currentChunk) { - for (const group of currentChunk.groupsIterable) - hotUpdateChunk.addGroup(group); - } - chunkGraph.attachModules(hotUpdateChunk, newModules || []); - chunkGraph.attachRuntimeModules( - hotUpdateChunk, - newRuntimeModules || [] - ); - if (newFullHashModules) { - chunkGraph.attachFullHashModules( - hotUpdateChunk, - newFullHashModules - ); - } - if (newDependentHashModules) { - chunkGraph.attachDependentHashModules( - hotUpdateChunk, - newDependentHashModules - ); - } - const renderManifest = compilation.getRenderManifest({ - chunk: hotUpdateChunk, - hash: records.hash, - fullHash: records.hash, - outputOptions: compilation.outputOptions, - moduleTemplates: compilation.moduleTemplates, - dependencyTemplates: compilation.dependencyTemplates, - codeGenerationResults: compilation.codeGenerationResults, - runtimeTemplate: compilation.runtimeTemplate, - moduleGraph: compilation.moduleGraph, - chunkGraph - }); - for (const entry of renderManifest) { - /** @type {string} */ - let filename; - /** @type {AssetInfo} */ - let assetInfo; - if ("filename" in entry) { - filename = entry.filename; - assetInfo = entry.info; - } else { - ({ path: filename, info: assetInfo } = - compilation.getPathWithInfo( - entry.filenameTemplate, - entry.pathOptions - )); - } - const source = entry.render(); - compilation.additionalChunkAssets.push(filename); - compilation.emitAsset(filename, source, { - hotModuleReplacement: true, - ...assetInfo - }); - if (currentChunk) { - currentChunk.files.add(filename); - compilation.hooks.chunkAsset.call(currentChunk, filename); - } - } - forEachRuntime(newRuntime, runtime => { - hotUpdateMainContentByRuntime - .get(runtime) - .updatedChunkIds.add(chunkId); - }); - } - } - const completelyRemovedModulesArray = Array.from( - completelyRemovedModules - ); - const hotUpdateMainContentByFilename = new Map(); - for (const { - removedChunkIds, - removedModules, - updatedChunkIds, - filename, - assetInfo - } of hotUpdateMainContentByRuntime.values()) { - const old = hotUpdateMainContentByFilename.get(filename); - if ( - old && - (!isSubset(old.removedChunkIds, removedChunkIds) || - !isSubset(old.removedModules, removedModules) || - !isSubset(old.updatedChunkIds, updatedChunkIds)) - ) { - compilation.warnings.push( - new WebpackError(`HotModuleReplacementPlugin -The configured output.hotUpdateMainFilename doesn't lead to unique filenames per runtime and HMR update differs between runtimes. -This might lead to incorrect runtime behavior of the applied update. -To fix this, make sure to include [runtime] in the output.hotUpdateMainFilename option, or use the default config.`) - ); - for (const chunkId of removedChunkIds) - old.removedChunkIds.add(chunkId); - for (const chunkId of removedModules) - old.removedModules.add(chunkId); - for (const chunkId of updatedChunkIds) - old.updatedChunkIds.add(chunkId); - continue; - } - hotUpdateMainContentByFilename.set(filename, { - removedChunkIds, - removedModules, - updatedChunkIds, - assetInfo - }); - } - for (const [ - filename, - { removedChunkIds, removedModules, updatedChunkIds, assetInfo } - ] of hotUpdateMainContentByFilename) { - const hotUpdateMainJson = { - c: Array.from(updatedChunkIds), - r: Array.from(removedChunkIds), - m: - removedModules.size === 0 - ? completelyRemovedModulesArray - : completelyRemovedModulesArray.concat( - Array.from(removedModules, m => - chunkGraph.getModuleId(m) - ) - ) - }; - - const source = new RawSource(JSON.stringify(hotUpdateMainJson)); - compilation.emitAsset(filename, source, { - hotModuleReplacement: true, - ...assetInfo - }); - } - } - ); - - compilation.hooks.additionalTreeRuntimeRequirements.tap( - "HotModuleReplacementPlugin", - (chunk, runtimeRequirements) => { - runtimeRequirements.add(RuntimeGlobals.hmrDownloadManifest); - runtimeRequirements.add(RuntimeGlobals.hmrDownloadUpdateHandlers); - runtimeRequirements.add(RuntimeGlobals.interceptModuleExecution); - runtimeRequirements.add(RuntimeGlobals.moduleCache); - compilation.addRuntimeModule( - chunk, - new HotModuleReplacementRuntimeModule() - ); - } - ); - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("HotModuleReplacementPlugin", parser => { - applyModuleHot(parser); - applyImportMetaHot(parser); - }); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("HotModuleReplacementPlugin", parser => { - applyModuleHot(parser); - }); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("HotModuleReplacementPlugin", parser => { - applyImportMetaHot(parser); - }); - - NormalModule.getCompilationHooks(compilation).loader.tap( - "HotModuleReplacementPlugin", - context => { - context.hot = true; - } - ); - } - ); - } -} - -module.exports = HotModuleReplacementPlugin; - - -/***/ }), - -/***/ 23834: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Chunk = __webpack_require__(84891); - -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./util/Hash")} Hash */ - -class HotUpdateChunk extends Chunk { - constructor() { - super(); - } -} - -module.exports = HotUpdateChunk; - - -/***/ }), - -/***/ 6720: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const ModuleFactory = __webpack_require__(39744); - -/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ - -/** - * Ignores error when module is unresolved - */ -class IgnoreErrorModuleFactory extends ModuleFactory { - /** - * @param {NormalModuleFactory} normalModuleFactory normalModuleFactory instance - */ - constructor(normalModuleFactory) { - super(); - - this.normalModuleFactory = normalModuleFactory; - } - - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - this.normalModuleFactory.create(data, (err, result) => { - return callback(null, result); - }); - } -} - -module.exports = IgnoreErrorModuleFactory; - - -/***/ }), - -/***/ 46683: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../declarations/plugins/IgnorePlugin").IgnorePluginOptions} IgnorePluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./NormalModuleFactory").ResolveData} ResolveData */ - -const validate = createSchemaValidation( - __webpack_require__(89849), - () => __webpack_require__(70229), - { - name: "Ignore Plugin", - baseDataPath: "options" - } -); - -class IgnorePlugin { - /** - * @param {IgnorePluginOptions} options IgnorePlugin options - */ - constructor(options) { - validate(options); - this.options = options; - - /** @private @type {Function} */ - this.checkIgnore = this.checkIgnore.bind(this); - } - - /** - * Note that if "contextRegExp" is given, both the "resourceRegExp" - * and "contextRegExp" have to match. - * - * @param {ResolveData} resolveData resolve data - * @returns {false|undefined} returns false when the request should be ignored, otherwise undefined - */ - checkIgnore(resolveData) { - if ( - "checkResource" in this.options && - this.options.checkResource && - this.options.checkResource(resolveData.request, resolveData.context) - ) { - return false; - } - - if ( - "resourceRegExp" in this.options && - this.options.resourceRegExp && - this.options.resourceRegExp.test(resolveData.request) - ) { - if ("contextRegExp" in this.options && this.options.contextRegExp) { - // if "contextRegExp" is given, - // both the "resourceRegExp" and "contextRegExp" have to match. - if (this.options.contextRegExp.test(resolveData.context)) { - return false; - } - } else { - return false; - } - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.normalModuleFactory.tap("IgnorePlugin", nmf => { - nmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); - }); - compiler.hooks.contextModuleFactory.tap("IgnorePlugin", cmf => { - cmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); - }); - } -} - -module.exports = IgnorePlugin; - - -/***/ }), - -/***/ 51674: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../declarations/WebpackOptions").IgnoreWarningsNormalized} IgnoreWarningsNormalized */ -/** @typedef {import("./Compiler")} Compiler */ - -class IgnoreWarningsPlugin { - /** - * @param {IgnoreWarningsNormalized} ignoreWarnings conditions to ignore warnings - */ - constructor(ignoreWarnings) { - this._ignoreWarnings = ignoreWarnings; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("IgnoreWarningsPlugin", compilation => { - compilation.hooks.processWarnings.tap( - "IgnoreWarningsPlugin", - warnings => { - return warnings.filter(warning => { - return !this._ignoreWarnings.some(ignore => - ignore(warning, compilation) - ); - }); - } - ); - }); - } -} - -module.exports = IgnoreWarningsPlugin; - - -/***/ }), - -/***/ 64768: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Generator").GenerateContext} GenerateContext */ - -/** - * @param {InitFragment} fragment the init fragment - * @param {number} index index - * @returns {[InitFragment, number]} tuple with both - */ -const extractFragmentIndex = (fragment, index) => [fragment, index]; - -/** - * @param {[InitFragment, number]} a first pair - * @param {[InitFragment, number]} b second pair - * @returns {number} sort value - */ -const sortFragmentWithIndex = ([a, i], [b, j]) => { - const stageCmp = a.stage - b.stage; - if (stageCmp !== 0) return stageCmp; - const positionCmp = a.position - b.position; - if (positionCmp !== 0) return positionCmp; - return i - j; -}; - -/** - * @template Context - */ -class InitFragment { - /** - * @param {string|Source} content the source code that will be included as initialization code - * @param {number} stage category of initialization code (contribute to order) - * @param {number} position position in the category (contribute to order) - * @param {string=} key unique key to avoid emitting the same initialization code twice - * @param {string|Source=} endContent the source code that will be included at the end of the module - */ - constructor(content, stage, position, key, endContent) { - this.content = content; - this.stage = stage; - this.position = position; - this.key = key; - this.endContent = endContent; - } - - /** - * @param {Context} context context - * @returns {string|Source} the source code that will be included as initialization code - */ - getContent(context) { - return this.content; - } - - /** - * @param {Context} context context - * @returns {string|Source=} the source code that will be included at the end of the module - */ - getEndContent(context) { - return this.endContent; - } - - static addToSource(source, initFragments, context) { - if (initFragments.length > 0) { - // Sort fragments by position. If 2 fragments have the same position, - // use their index. - const sortedFragments = initFragments - .map(extractFragmentIndex) - .sort(sortFragmentWithIndex); - - // Deduplicate fragments. If a fragment has no key, it is always included. - const keyedFragments = new Map(); - for (const [fragment] of sortedFragments) { - if (typeof fragment.mergeAll === "function") { - if (!fragment.key) { - throw new Error( - `InitFragment with mergeAll function must have a valid key: ${fragment.constructor.name}` - ); - } - const oldValue = keyedFragments.get(fragment.key); - if (oldValue === undefined) { - keyedFragments.set(fragment.key, fragment); - } else if (Array.isArray(oldValue)) { - oldValue.push(fragment); - } else { - keyedFragments.set(fragment.key, [oldValue, fragment]); - } - continue; - } else if (typeof fragment.merge === "function") { - const oldValue = keyedFragments.get(fragment.key); - if (oldValue !== undefined) { - keyedFragments.set(fragment.key, fragment.merge(oldValue)); - continue; - } - } - keyedFragments.set(fragment.key || Symbol(), fragment); - } - - const concatSource = new ConcatSource(); - const endContents = []; - for (let fragment of keyedFragments.values()) { - if (Array.isArray(fragment)) { - fragment = fragment[0].mergeAll(fragment); - } - concatSource.add(fragment.getContent(context)); - const endContent = fragment.getEndContent(context); - if (endContent) { - endContents.push(endContent); - } - } - - concatSource.add(source); - for (const content of endContents.reverse()) { - concatSource.add(content); - } - return concatSource; - } else { - return source; - } - } - - serialize(context) { - const { write } = context; - - write(this.content); - write(this.stage); - write(this.position); - write(this.key); - write(this.endContent); - } - - deserialize(context) { - const { read } = context; - - this.content = read(); - this.stage = read(); - this.position = read(); - this.key = read(); - this.endContent = read(); - } -} - -makeSerializable(InitFragment, "webpack/lib/InitFragment"); - -InitFragment.prototype.merge = undefined; - -InitFragment.STAGE_CONSTANTS = 10; -InitFragment.STAGE_ASYNC_BOUNDARY = 20; -InitFragment.STAGE_HARMONY_EXPORTS = 30; -InitFragment.STAGE_HARMONY_IMPORTS = 40; -InitFragment.STAGE_PROVIDES = 50; -InitFragment.STAGE_ASYNC_DEPENDENCIES = 60; -InitFragment.STAGE_ASYNC_HARMONY_IMPORTS = 70; - -module.exports = InitFragment; - - -/***/ }), - -/***/ 7787: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -class InvalidDependenciesModuleWarning extends WebpackError { - /** - * @param {Module} module module tied to dependency - * @param {Iterable} deps invalid dependencies - */ - constructor(module, deps) { - const orderedDeps = deps ? Array.from(deps).sort() : []; - const depsList = orderedDeps.map(dep => ` * ${JSON.stringify(dep)}`); - super(`Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. -Invalid dependencies may lead to broken watching and caching. -As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. -Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). -Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). -Globs: They are not supported. Pass absolute path to the directory as context dependencies. -The following invalid values have been reported: -${depsList.slice(0, 3).join("\n")}${ - depsList.length > 3 ? "\n * and more ..." : "" - }`); - - this.name = "InvalidDependenciesModuleWarning"; - this.details = depsList.slice(3).join("\n"); - this.module = module; - } -} - -makeSerializable( - InvalidDependenciesModuleWarning, - "webpack/lib/InvalidDependenciesModuleWarning" -); - -module.exports = InvalidDependenciesModuleWarning; - - -/***/ }), - -/***/ 82833: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const InnerGraph = __webpack_require__(39236); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -class JavascriptMetaInfoPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "JavascriptMetaInfoPlugin", - (compilation, { normalModuleFactory }) => { - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - const handler = parser => { - parser.hooks.call.for("eval").tap("JavascriptMetaInfoPlugin", () => { - parser.state.module.buildInfo.moduleConcatenationBailout = "eval()"; - parser.state.module.buildInfo.usingEval = true; - const currentSymbol = InnerGraph.getTopLevelSymbol(parser.state); - if (currentSymbol) { - InnerGraph.addUsage(parser.state, null, currentSymbol); - } else { - InnerGraph.bailout(parser.state); - } - }); - parser.hooks.finish.tap("JavascriptMetaInfoPlugin", () => { - let topLevelDeclarations = - parser.state.module.buildInfo.topLevelDeclarations; - if (topLevelDeclarations === undefined) { - topLevelDeclarations = - parser.state.module.buildInfo.topLevelDeclarations = new Set(); - } - for (const name of parser.scope.definitions.asSet()) { - const freeInfo = parser.getFreeInfoFromVariable(name); - if (freeInfo === undefined) { - topLevelDeclarations.add(name); - } - } - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("JavascriptMetaInfoPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("JavascriptMetaInfoPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("JavascriptMetaInfoPlugin", handler); - } - ); - } -} - -module.exports = JavascriptMetaInfoPlugin; - - -/***/ }), - -/***/ 91052: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const EntryDependency = __webpack_require__(17380); -const { someInIterable } = __webpack_require__(30922); -const { compareModulesById } = __webpack_require__(58792); -const { dirname, mkdirp } = __webpack_require__(47077); - -/** @typedef {import("./Compiler")} Compiler */ - -/** - * @typedef {Object} ManifestModuleData - * @property {string | number} id - * @property {Object} buildMeta - * @property {boolean | string[]} exports - */ - -class LibManifestPlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.emit.tapAsync( - "LibManifestPlugin", - (compilation, callback) => { - const moduleGraph = compilation.moduleGraph; - asyncLib.forEach( - Array.from(compilation.chunks), - (chunk, callback) => { - if (!chunk.canBeInitial()) { - callback(); - return; - } - const chunkGraph = compilation.chunkGraph; - const targetPath = compilation.getPath(this.options.path, { - chunk - }); - const name = - this.options.name && - compilation.getPath(this.options.name, { - chunk - }); - const content = Object.create(null); - for (const module of chunkGraph.getOrderedChunkModulesIterable( - chunk, - compareModulesById(chunkGraph) - )) { - if ( - this.options.entryOnly && - !someInIterable( - moduleGraph.getIncomingConnections(module), - c => c.dependency instanceof EntryDependency - ) - ) { - continue; - } - const ident = module.libIdent({ - context: this.options.context || compiler.options.context, - associatedObjectForCache: compiler.root - }); - if (ident) { - const exportsInfo = moduleGraph.getExportsInfo(module); - const providedExports = exportsInfo.getProvidedExports(); - /** @type {ManifestModuleData} */ - const data = { - id: chunkGraph.getModuleId(module), - buildMeta: module.buildMeta, - exports: Array.isArray(providedExports) - ? providedExports - : undefined - }; - content[ident] = data; - } - } - const manifest = { - name, - type: this.options.type, - content - }; - // Apply formatting to content if format flag is true; - const manifestContent = this.options.format - ? JSON.stringify(manifest, null, 2) - : JSON.stringify(manifest); - const buffer = Buffer.from(manifestContent, "utf8"); - mkdirp( - compiler.intermediateFileSystem, - dirname(compiler.intermediateFileSystem, targetPath), - err => { - if (err) return callback(err); - compiler.intermediateFileSystem.writeFile( - targetPath, - buffer, - callback - ); - } - ); - }, - callback - ); - } - ); - } -} -module.exports = LibManifestPlugin; - - -/***/ }), - -/***/ 59656: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const EnableLibraryPlugin = __webpack_require__(7616); - -/** @typedef {import("../declarations/WebpackOptions").AuxiliaryComment} AuxiliaryComment */ -/** @typedef {import("../declarations/WebpackOptions").LibraryExport} LibraryExport */ -/** @typedef {import("../declarations/WebpackOptions").LibraryName} LibraryName */ -/** @typedef {import("../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../declarations/WebpackOptions").UmdNamedDefine} UmdNamedDefine */ -/** @typedef {import("./Compiler")} Compiler */ - -// TODO webpack 6 remove -class LibraryTemplatePlugin { - /** - * @param {LibraryName} name name of library - * @param {LibraryType} target type of library - * @param {UmdNamedDefine} umdNamedDefine setting this to true will name the UMD module - * @param {AuxiliaryComment} auxiliaryComment comment in the UMD wrapper - * @param {LibraryExport} exportProperty which export should be exposed as library - */ - constructor(name, target, umdNamedDefine, auxiliaryComment, exportProperty) { - this.library = { - type: target || "var", - name, - umdNamedDefine, - auxiliaryComment, - export: exportProperty - }; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { output } = compiler.options; - output.library = this.library; - new EnableLibraryPlugin(this.library.type).apply(compiler); - } -} - -module.exports = LibraryTemplatePlugin; - - -/***/ }), - -/***/ 60634: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleFilenameHelpers = __webpack_require__(99523); -const NormalModule = __webpack_require__(89417); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../declarations/plugins/LoaderOptionsPlugin").LoaderOptionsPluginOptions} LoaderOptionsPluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(67892), - () => __webpack_require__(46425), - { - name: "Loader Options Plugin", - baseDataPath: "options" - } -); -class LoaderOptionsPlugin { - /** - * @param {LoaderOptionsPluginOptions} options options object - */ - constructor(options = {}) { - validate(options); - if (typeof options !== "object") options = {}; - if (!options.test) { - options.test = { - test: () => true - }; - } - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap("LoaderOptionsPlugin", compilation => { - NormalModule.getCompilationHooks(compilation).loader.tap( - "LoaderOptionsPlugin", - (context, module) => { - const resource = module.resource; - if (!resource) return; - const i = resource.indexOf("?"); - if ( - ModuleFilenameHelpers.matchObject( - options, - i < 0 ? resource : resource.slice(0, i) - ) - ) { - for (const key of Object.keys(options)) { - if (key === "include" || key === "exclude" || key === "test") { - continue; - } - context[key] = options[key]; - } - } - } - ); - }); - } -} - -module.exports = LoaderOptionsPlugin; - - -/***/ }), - -/***/ 67181: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NormalModule = __webpack_require__(89417); - -/** @typedef {import("./Compiler")} Compiler */ - -class LoaderTargetPlugin { - /** - * @param {string} target the target - */ - constructor(target) { - this.target = target; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("LoaderTargetPlugin", compilation => { - NormalModule.getCompilationHooks(compilation).loader.tap( - "LoaderTargetPlugin", - loaderContext => { - loaderContext.target = this.target; - } - ); - }); - } -} - -module.exports = LoaderTargetPlugin; - - -/***/ }), - -/***/ 87797: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const util = __webpack_require__(73837); -const RuntimeGlobals = __webpack_require__(39201); -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ -/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Module")} Module} */ -/** @typedef {import("./util/Hash")} Hash} */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates} */ -/** @typedef {import("./javascript/JavascriptModulesPlugin").RenderContext} RenderContext} */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate} */ -/** @typedef {import("./ModuleGraph")} ModuleGraph} */ -/** @typedef {import("./ChunkGraph")} ChunkGraph} */ -/** @typedef {import("./Template").RenderManifestOptions} RenderManifestOptions} */ -/** @typedef {import("./Template").RenderManifestEntry} RenderManifestEntry} */ - -const getJavascriptModulesPlugin = memoize(() => - __webpack_require__(36109) -); -const getJsonpTemplatePlugin = memoize(() => - __webpack_require__(44896) -); -const getLoadScriptRuntimeModule = memoize(() => - __webpack_require__(46750) -); - -// TODO webpack 6 remove this class -class MainTemplate { - /** - * - * @param {OutputOptions} outputOptions output options for the MainTemplate - * @param {Compilation} compilation the compilation - */ - constructor(outputOptions, compilation) { - /** @type {OutputOptions} */ - this._outputOptions = outputOptions || {}; - this.hooks = Object.freeze({ - renderManifest: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.renderManifest.tap( - options, - (entries, options) => { - if (!options.chunk.hasRuntime()) return entries; - return fn(entries, options); - } - ); - }, - "MainTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_MANIFEST" - ) - }, - modules: { - tap: () => { - throw new Error( - "MainTemplate.hooks.modules has been removed (there is no replacement, please create an issue to request that)" - ); - } - }, - moduleObj: { - tap: () => { - throw new Error( - "MainTemplate.hooks.moduleObj has been removed (there is no replacement, please create an issue to request that)" - ); - } - }, - require: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderRequire.tap(options, fn); - }, - "MainTemplate.hooks.require is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderRequire instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE" - ) - }, - beforeStartup: { - tap: () => { - throw new Error( - "MainTemplate.hooks.beforeStartup has been removed (use RuntimeGlobals.startupOnlyBefore instead)" - ); - } - }, - startup: { - tap: () => { - throw new Error( - "MainTemplate.hooks.startup has been removed (use RuntimeGlobals.startup instead)" - ); - } - }, - afterStartup: { - tap: () => { - throw new Error( - "MainTemplate.hooks.afterStartup has been removed (use RuntimeGlobals.startupOnlyAfter instead)" - ); - } - }, - render: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .render.tap(options, (source, renderContext) => { - if ( - renderContext.chunkGraph.getNumberOfEntryModules( - renderContext.chunk - ) === 0 || - !renderContext.chunk.hasRuntime() - ) { - return source; - } - return fn( - source, - renderContext.chunk, - compilation.hash, - compilation.moduleTemplates.javascript, - compilation.dependencyTemplates - ); - }); - }, - "MainTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_RENDER" - ) - }, - renderWithEntry: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .render.tap(options, (source, renderContext) => { - if ( - renderContext.chunkGraph.getNumberOfEntryModules( - renderContext.chunk - ) === 0 || - !renderContext.chunk.hasRuntime() - ) { - return source; - } - return fn(source, renderContext.chunk, compilation.hash); - }); - }, - "MainTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_WITH_ENTRY" - ) - }, - assetPath: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.assetPath.tap(options, fn); - }, - "MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH" - ), - call: util.deprecate( - (filename, options) => { - return compilation.getAssetPath(filename, options); - }, - "MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH" - ) - }, - hash: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.fullHash.tap(options, fn); - }, - "MainTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_HASH" - ) - }, - hashForChunk: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .chunkHash.tap(options, (chunk, hash) => { - if (!chunk.hasRuntime()) return; - return fn(hash, chunk); - }); - }, - "MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" - ) - }, - globalHashPaths: { - tap: util.deprecate( - () => {}, - "MainTemplate.hooks.globalHashPaths has been removed (it's no longer needed)", - "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" - ) - }, - globalHash: { - tap: util.deprecate( - () => {}, - "MainTemplate.hooks.globalHash has been removed (it's no longer needed)", - "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" - ) - }, - hotBootstrap: { - tap: () => { - throw new Error( - "MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)" - ); - } - }, - - // for compatibility: - /** @type {SyncWaterfallHook<[string, Chunk, string, ModuleTemplate, DependencyTemplates]>} */ - bootstrap: new SyncWaterfallHook([ - "source", - "chunk", - "hash", - "moduleTemplate", - "dependencyTemplates" - ]), - /** @type {SyncWaterfallHook<[string, Chunk, string]>} */ - localVars: new SyncWaterfallHook(["source", "chunk", "hash"]), - /** @type {SyncWaterfallHook<[string, Chunk, string]>} */ - requireExtensions: new SyncWaterfallHook(["source", "chunk", "hash"]), - /** @type {SyncWaterfallHook<[string, Chunk, string, string]>} */ - requireEnsure: new SyncWaterfallHook([ - "source", - "chunk", - "hash", - "chunkIdExpression" - ]), - get jsonpScript() { - const hooks = - getLoadScriptRuntimeModule().getCompilationHooks(compilation); - return hooks.createScript; - }, - get linkPrefetch() { - const hooks = getJsonpTemplatePlugin().getCompilationHooks(compilation); - return hooks.linkPrefetch; - }, - get linkPreload() { - const hooks = getJsonpTemplatePlugin().getCompilationHooks(compilation); - return hooks.linkPreload; - } - }); - - this.renderCurrentHashCode = util.deprecate( - /** - * @deprecated - * @param {string} hash the hash - * @param {number=} length length of the hash - * @returns {string} generated code - */ (hash, length) => { - if (length) { - return `${RuntimeGlobals.getFullHash} ? ${ - RuntimeGlobals.getFullHash - }().slice(0, ${length}) : ${hash.slice(0, length)}`; - } - return `${RuntimeGlobals.getFullHash} ? ${RuntimeGlobals.getFullHash}() : ${hash}`; - }, - "MainTemplate.renderCurrentHashCode is deprecated (use RuntimeGlobals.getFullHash runtime function instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_CURRENT_HASH_CODE" - ); - - this.getPublicPath = util.deprecate( - /** - * - * @param {object} options get public path options - * @returns {string} hook call - */ options => { - return compilation.getAssetPath( - compilation.outputOptions.publicPath, - options - ); - }, - "MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH" - ); - - this.getAssetPath = util.deprecate( - (path, options) => { - return compilation.getAssetPath(path, options); - }, - "MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH" - ); - - this.getAssetPathWithInfo = util.deprecate( - (path, options) => { - return compilation.getAssetPathWithInfo(path, options); - }, - "MainTemplate.getAssetPathWithInfo is deprecated (use Compilation.getAssetPath instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH_WITH_INFO" - ); - } -} - -Object.defineProperty(MainTemplate.prototype, "requireFn", { - get: util.deprecate( - () => "__webpack_require__", - 'MainTemplate.requireFn is deprecated (use "__webpack_require__")', - "DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE_FN" - ) -}); - -Object.defineProperty(MainTemplate.prototype, "outputOptions", { - get: util.deprecate( - /** - * @this {MainTemplate} - * @returns {OutputOptions} output options - */ - function () { - return this._outputOptions; - }, - "MainTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", - "DEP_WEBPACK_MAIN_TEMPLATE_OUTPUT_OPTIONS" - ) -}); - -module.exports = MainTemplate; - - -/***/ }), - -/***/ 53840: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const ChunkGraph = __webpack_require__(75449); -const DependenciesBlock = __webpack_require__(82618); -const ModuleGraph = __webpack_require__(13487); -const RuntimeGlobals = __webpack_require__(39201); -const { first } = __webpack_require__(73268); -const { compareChunksById } = __webpack_require__(58792); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./ExportsInfo").UsageStateType} UsageStateType */ -/** @typedef {import("./FileSystemInfo")} FileSystemInfo */ -/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./util/Hash")} Hash */ -/** @template T @typedef {import("./util/LazySet")} LazySet */ -/** @template T @typedef {import("./util/SortableSet")} SortableSet */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} SourceContext - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {RuntimeSpec} runtime the runtimes code should be generated for - * @property {string=} type the type of source that should be generated - */ - -// TODO webpack 6: compilation will be required in CodeGenerationContext -/** - * @typedef {Object} CodeGenerationContext - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {RuntimeSpec} runtime the runtimes code should be generated for - * @property {ConcatenationScope=} concatenationScope when in concatenated module, information about other concatenated modules - * @property {CodeGenerationResults} codeGenerationResults code generation results of other modules (need to have a codeGenerationDependency to use that) - * @property {Compilation=} compilation the compilation - * @property {ReadonlySet=} sourceTypes source types - */ - -/** - * @typedef {Object} ConcatenationBailoutReasonContext - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - */ - -/** - * @typedef {Object} CodeGenerationResult - * @property {Map} sources the resulting sources for all source types - * @property {Map=} data the resulting data for all source types - * @property {ReadonlySet} runtimeRequirements the runtime requirements - * @property {string=} hash a hash of the code generation result (will be automatically calculated from sources and runtimeRequirements if not provided) - */ - -/** - * @typedef {Object} LibIdentOptions - * @property {string} context absolute context path to which lib ident is relative to - * @property {Object=} associatedObjectForCache object for caching - */ - -/** - * @typedef {Object} KnownBuildMeta - * @property {string=} moduleArgument - * @property {string=} exportsArgument - * @property {boolean=} strict - * @property {string=} moduleConcatenationBailout - * @property {("default" | "namespace" | "flagged" | "dynamic")=} exportsType - * @property {(false | "redirect" | "redirect-warn")=} defaultObject - * @property {boolean=} strictHarmonyModule - * @property {boolean=} async - * @property {boolean=} sideEffectFree - */ - -/** - * @typedef {Object} NeedBuildContext - * @property {Compilation} compilation - * @property {FileSystemInfo} fileSystemInfo - * @property {Map>} valueCacheVersions - */ - -/** @typedef {KnownBuildMeta & Record} BuildMeta */ - -const EMPTY_RESOLVE_OPTIONS = {}; - -let debugId = 1000; - -const DEFAULT_TYPES_UNKNOWN = new Set(["unknown"]); -const DEFAULT_TYPES_JS = new Set(["javascript"]); - -const deprecatedNeedRebuild = util.deprecate( - (module, context) => { - return module.needRebuild( - context.fileSystemInfo.getDeprecatedFileTimestamps(), - context.fileSystemInfo.getDeprecatedContextTimestamps() - ); - }, - "Module.needRebuild is deprecated in favor of Module.needBuild", - "DEP_WEBPACK_MODULE_NEED_REBUILD" -); - -/** @typedef {(requestShortener: RequestShortener) => string} OptimizationBailoutFunction */ - -class Module extends DependenciesBlock { - /** - * @param {string} type the module type - * @param {string=} context an optional context - * @param {string=} layer an optional layer in which the module is - */ - constructor(type, context = null, layer = null) { - super(); - - /** @type {string} */ - this.type = type; - /** @type {string | null} */ - this.context = context; - /** @type {string | null} */ - this.layer = layer; - /** @type {boolean} */ - this.needId = true; - - // Unique Id - /** @type {number} */ - this.debugId = debugId++; - - // Info from Factory - /** @type {ResolveOptions} */ - this.resolveOptions = EMPTY_RESOLVE_OPTIONS; - /** @type {object | undefined} */ - this.factoryMeta = undefined; - // TODO refactor this -> options object filled from Factory - // TODO webpack 6: use an enum - /** @type {boolean} */ - this.useSourceMap = false; - /** @type {boolean} */ - this.useSimpleSourceMap = false; - - // Info from Build - /** @type {WebpackError[] | undefined} */ - this._warnings = undefined; - /** @type {WebpackError[] | undefined} */ - this._errors = undefined; - /** @type {BuildMeta} */ - this.buildMeta = undefined; - /** @type {Record} */ - this.buildInfo = undefined; - /** @type {Dependency[] | undefined} */ - this.presentationalDependencies = undefined; - /** @type {Dependency[] | undefined} */ - this.codeGenerationDependencies = undefined; - } - - // TODO remove in webpack 6 - // BACKWARD-COMPAT START - get id() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.id", - "DEP_WEBPACK_MODULE_ID" - ).getModuleId(this); - } - - set id(value) { - if (value === "") { - this.needId = false; - return; - } - ChunkGraph.getChunkGraphForModule( - this, - "Module.id", - "DEP_WEBPACK_MODULE_ID" - ).setModuleId(this, value); - } - - /** - * @returns {string} the hash of the module - */ - get hash() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.hash", - "DEP_WEBPACK_MODULE_HASH" - ).getModuleHash(this, undefined); - } - - /** - * @returns {string} the shortened hash of the module - */ - get renderedHash() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.renderedHash", - "DEP_WEBPACK_MODULE_RENDERED_HASH" - ).getRenderedModuleHash(this, undefined); - } - - get profile() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.profile", - "DEP_WEBPACK_MODULE_PROFILE" - ).getProfile(this); - } - - set profile(value) { - ModuleGraph.getModuleGraphForModule( - this, - "Module.profile", - "DEP_WEBPACK_MODULE_PROFILE" - ).setProfile(this, value); - } - - get index() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.index", - "DEP_WEBPACK_MODULE_INDEX" - ).getPreOrderIndex(this); - } - - set index(value) { - ModuleGraph.getModuleGraphForModule( - this, - "Module.index", - "DEP_WEBPACK_MODULE_INDEX" - ).setPreOrderIndex(this, value); - } - - get index2() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.index2", - "DEP_WEBPACK_MODULE_INDEX2" - ).getPostOrderIndex(this); - } - - set index2(value) { - ModuleGraph.getModuleGraphForModule( - this, - "Module.index2", - "DEP_WEBPACK_MODULE_INDEX2" - ).setPostOrderIndex(this, value); - } - - get depth() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.depth", - "DEP_WEBPACK_MODULE_DEPTH" - ).getDepth(this); - } - - set depth(value) { - ModuleGraph.getModuleGraphForModule( - this, - "Module.depth", - "DEP_WEBPACK_MODULE_DEPTH" - ).setDepth(this, value); - } - - get issuer() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.issuer", - "DEP_WEBPACK_MODULE_ISSUER" - ).getIssuer(this); - } - - set issuer(value) { - ModuleGraph.getModuleGraphForModule( - this, - "Module.issuer", - "DEP_WEBPACK_MODULE_ISSUER" - ).setIssuer(this, value); - } - - get usedExports() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.usedExports", - "DEP_WEBPACK_MODULE_USED_EXPORTS" - ).getUsedExports(this, undefined); - } - - /** - * @deprecated - * @returns {(string | OptimizationBailoutFunction)[]} list - */ - get optimizationBailout() { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.optimizationBailout", - "DEP_WEBPACK_MODULE_OPTIMIZATION_BAILOUT" - ).getOptimizationBailout(this); - } - - get optional() { - return this.isOptional( - ModuleGraph.getModuleGraphForModule( - this, - "Module.optional", - "DEP_WEBPACK_MODULE_OPTIONAL" - ) - ); - } - - addChunk(chunk) { - const chunkGraph = ChunkGraph.getChunkGraphForModule( - this, - "Module.addChunk", - "DEP_WEBPACK_MODULE_ADD_CHUNK" - ); - if (chunkGraph.isModuleInChunk(this, chunk)) return false; - chunkGraph.connectChunkAndModule(chunk, this); - return true; - } - - removeChunk(chunk) { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.removeChunk", - "DEP_WEBPACK_MODULE_REMOVE_CHUNK" - ).disconnectChunkAndModule(chunk, this); - } - - isInChunk(chunk) { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.isInChunk", - "DEP_WEBPACK_MODULE_IS_IN_CHUNK" - ).isModuleInChunk(this, chunk); - } - - isEntryModule() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.isEntryModule", - "DEP_WEBPACK_MODULE_IS_ENTRY_MODULE" - ).isEntryModule(this); - } - - getChunks() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.getChunks", - "DEP_WEBPACK_MODULE_GET_CHUNKS" - ).getModuleChunks(this); - } - - getNumberOfChunks() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.getNumberOfChunks", - "DEP_WEBPACK_MODULE_GET_NUMBER_OF_CHUNKS" - ).getNumberOfModuleChunks(this); - } - - get chunksIterable() { - return ChunkGraph.getChunkGraphForModule( - this, - "Module.chunksIterable", - "DEP_WEBPACK_MODULE_CHUNKS_ITERABLE" - ).getOrderedModuleChunksIterable(this, compareChunksById); - } - - /** - * @param {string} exportName a name of an export - * @returns {boolean | null} true, if the export is provided why the module. - * null, if it's unknown. - * false, if it's not provided. - */ - isProvided(exportName) { - return ModuleGraph.getModuleGraphForModule( - this, - "Module.usedExports", - "DEP_WEBPACK_MODULE_USED_EXPORTS" - ).isExportProvided(this, exportName); - } - // BACKWARD-COMPAT END - - /** - * @returns {string} name of the exports argument - */ - get exportsArgument() { - return (this.buildInfo && this.buildInfo.exportsArgument) || "exports"; - } - - /** - * @returns {string} name of the module argument - */ - get moduleArgument() { - return (this.buildInfo && this.buildInfo.moduleArgument) || "module"; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {boolean} strict the importing module is strict - * @returns {"namespace" | "default-only" | "default-with-named" | "dynamic"} export type - * "namespace": Exports is already a namespace object. namespace = exports. - * "dynamic": Check at runtime if __esModule is set. When set: namespace = { ...exports, default: exports }. When not set: namespace = { default: exports }. - * "default-only": Provide a namespace object with only default export. namespace = { default: exports } - * "default-with-named": Provide a namespace object with named and default export. namespace = { ...exports, default: exports } - */ - getExportsType(moduleGraph, strict) { - switch (this.buildMeta && this.buildMeta.exportsType) { - case "flagged": - return strict ? "default-with-named" : "namespace"; - case "namespace": - return "namespace"; - case "default": - switch (this.buildMeta.defaultObject) { - case "redirect": - return "default-with-named"; - case "redirect-warn": - return strict ? "default-only" : "default-with-named"; - default: - return "default-only"; - } - case "dynamic": { - if (strict) return "default-with-named"; - // Try to figure out value of __esModule by following reexports - const handleDefault = () => { - switch (this.buildMeta.defaultObject) { - case "redirect": - case "redirect-warn": - return "default-with-named"; - default: - return "default-only"; - } - }; - const exportInfo = moduleGraph.getReadOnlyExportInfo( - this, - "__esModule" - ); - if (exportInfo.provided === false) { - return handleDefault(); - } - const target = exportInfo.getTarget(moduleGraph); - if ( - !target || - !target.export || - target.export.length !== 1 || - target.export[0] !== "__esModule" - ) { - return "dynamic"; - } - switch ( - target.module.buildMeta && - target.module.buildMeta.exportsType - ) { - case "flagged": - case "namespace": - return "namespace"; - case "default": - return handleDefault(); - default: - return "dynamic"; - } - } - default: - return strict ? "default-with-named" : "dynamic"; - } - } - - /** - * @param {Dependency} presentationalDependency dependency being tied to module. - * This is a Dependency without edge in the module graph. It's only for presentation. - * @returns {void} - */ - addPresentationalDependency(presentationalDependency) { - if (this.presentationalDependencies === undefined) { - this.presentationalDependencies = []; - } - this.presentationalDependencies.push(presentationalDependency); - } - - /** - * @param {Dependency} codeGenerationDependency dependency being tied to module. - * This is a Dependency where the code generation result of the referenced module is needed during code generation. - * The Dependency should also be added to normal dependencies via addDependency. - * @returns {void} - */ - addCodeGenerationDependency(codeGenerationDependency) { - if (this.codeGenerationDependencies === undefined) { - this.codeGenerationDependencies = []; - } - this.codeGenerationDependencies.push(codeGenerationDependency); - } - - /** - * Removes all dependencies and blocks - * @returns {void} - */ - clearDependenciesAndBlocks() { - if (this.presentationalDependencies !== undefined) { - this.presentationalDependencies.length = 0; - } - if (this.codeGenerationDependencies !== undefined) { - this.codeGenerationDependencies.length = 0; - } - super.clearDependenciesAndBlocks(); - } - - /** - * @param {WebpackError} warning the warning - * @returns {void} - */ - addWarning(warning) { - if (this._warnings === undefined) { - this._warnings = []; - } - this._warnings.push(warning); - } - - /** - * @returns {Iterable | undefined} list of warnings if any - */ - getWarnings() { - return this._warnings; - } - - /** - * @returns {number} number of warnings - */ - getNumberOfWarnings() { - return this._warnings !== undefined ? this._warnings.length : 0; - } - - /** - * @param {WebpackError} error the error - * @returns {void} - */ - addError(error) { - if (this._errors === undefined) { - this._errors = []; - } - this._errors.push(error); - } - - /** - * @returns {Iterable | undefined} list of errors if any - */ - getErrors() { - return this._errors; - } - - /** - * @returns {number} number of errors - */ - getNumberOfErrors() { - return this._errors !== undefined ? this._errors.length : 0; - } - - /** - * removes all warnings and errors - * @returns {void} - */ - clearWarningsAndErrors() { - if (this._warnings !== undefined) { - this._warnings.length = 0; - } - if (this._errors !== undefined) { - this._errors.length = 0; - } - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {boolean} true, if the module is optional - */ - isOptional(moduleGraph) { - let hasConnections = false; - for (const r of moduleGraph.getIncomingConnections(this)) { - if ( - !r.dependency || - !r.dependency.optional || - !r.isTargetActive(undefined) - ) { - return false; - } - hasConnections = true; - } - return hasConnections; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Chunk} chunk a chunk - * @param {Chunk=} ignoreChunk chunk to be ignored - * @returns {boolean} true, if the module is accessible from "chunk" when ignoring "ignoreChunk" - */ - isAccessibleInChunk(chunkGraph, chunk, ignoreChunk) { - // Check if module is accessible in ALL chunk groups - for (const chunkGroup of chunk.groupsIterable) { - if (!this.isAccessibleInChunkGroup(chunkGraph, chunkGroup)) return false; - } - return true; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {ChunkGroup} chunkGroup a chunk group - * @param {Chunk=} ignoreChunk chunk to be ignored - * @returns {boolean} true, if the module is accessible from "chunkGroup" when ignoring "ignoreChunk" - */ - isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk) { - const queue = new Set([chunkGroup]); - - // Check if module is accessible from all items of the queue - queueFor: for (const cg of queue) { - // 1. If module is in one of the chunks of the group we can continue checking the next items - // because it's accessible. - for (const chunk of cg.chunks) { - if (chunk !== ignoreChunk && chunkGraph.isModuleInChunk(this, chunk)) - continue queueFor; - } - // 2. If the chunk group is initial, we can break here because it's not accessible. - if (chunkGroup.isInitial()) return false; - // 3. Enqueue all parents because it must be accessible from ALL parents - for (const parent of chunkGroup.parentsIterable) queue.add(parent); - } - // When we processed through the whole list and we didn't bailout, the module is accessible - return true; - } - - /** - * @param {Chunk} chunk a chunk - * @param {ModuleGraph} moduleGraph the module graph - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {boolean} true, if the module has any reason why "chunk" should be included - */ - hasReasonForChunk(chunk, moduleGraph, chunkGraph) { - // check for each reason if we need the chunk - for (const [ - fromModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(this)) { - if (!connections.some(c => c.isTargetActive(chunk.runtime))) continue; - for (const originChunk of chunkGraph.getModuleChunksIterable( - fromModule - )) { - // return true if module this is not reachable from originChunk when ignoring chunk - if (!this.isAccessibleInChunk(chunkGraph, originChunk, chunk)) - return true; - } - } - return false; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true if at least one other module depends on this module - */ - hasReasons(moduleGraph, runtime) { - for (const c of moduleGraph.getIncomingConnections(this)) { - if (c.isTargetActive(runtime)) return true; - } - return false; - } - - /** - * @returns {string} for debugging - */ - toString() { - return `Module[${this.debugId}: ${this.identifier()}]`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback( - null, - !this.buildMeta || - this.needRebuild === Module.prototype.needRebuild || - deprecatedNeedRebuild(this, context) - ); - } - - /** - * @deprecated Use needBuild instead - * @param {Map} fileTimestamps timestamps of files - * @param {Map} contextTimestamps timestamps of directories - * @returns {boolean} true, if the module needs a rebuild - */ - needRebuild(fileTimestamps, contextTimestamps) { - return true; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash( - hash, - context = { - chunkGraph: ChunkGraph.getChunkGraphForModule( - this, - "Module.updateHash", - "DEP_WEBPACK_MODULE_UPDATE_HASH" - ), - runtime: undefined - } - ) { - const { chunkGraph, runtime } = context; - hash.update(chunkGraph.getModuleGraphHash(this, runtime)); - if (this.presentationalDependencies !== undefined) { - for (const dep of this.presentationalDependencies) { - dep.updateHash(hash, context); - } - } - super.updateHash(hash, context); - } - - /** - * @returns {void} - */ - invalidateBuild() { - // should be overridden to support this feature - } - - /* istanbul ignore next */ - /** - * @abstract - * @returns {string} a unique identifier of the module - */ - identifier() { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @abstract - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - // Better override this method to return the correct types - if (this.source === Module.prototype.source) { - return DEFAULT_TYPES_UNKNOWN; - } else { - return DEFAULT_TYPES_JS; - } - } - - /** - * @abstract - * @deprecated Use codeGeneration() instead - * @param {DependencyTemplates} dependencyTemplates the dependency templates - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {string=} type the type of source that should be generated - * @returns {Source} generated source - */ - source(dependencyTemplates, runtimeTemplate, type = "javascript") { - if (this.codeGeneration === Module.prototype.codeGeneration) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - const chunkGraph = ChunkGraph.getChunkGraphForModule( - this, - "Module.source() is deprecated. Use Compilation.codeGenerationResults.getSource(module, runtime, type) instead", - "DEP_WEBPACK_MODULE_SOURCE" - ); - /** @type {CodeGenerationContext} */ - const codeGenContext = { - dependencyTemplates, - runtimeTemplate, - moduleGraph: chunkGraph.moduleGraph, - chunkGraph, - runtime: undefined, - codeGenerationResults: undefined - }; - const sources = this.codeGeneration(codeGenContext).sources; - return type ? sources.get(type) : sources.get(first(this.getSourceTypes())); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return null; - } - - /** - * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) - */ - nameForCondition() { - return null; - } - - /** - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(context) { - return `Module Concatenation is not implemented for ${this.constructor.name}`; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only - */ - getSideEffectsConnectionState(moduleGraph) { - return true; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - // Best override this method - const sources = new Map(); - for (const type of this.getSourceTypes()) { - if (type !== "unknown") { - sources.set( - type, - this.source( - context.dependencyTemplates, - context.runtimeTemplate, - type - ) - ); - } - } - return { - sources, - runtimeRequirements: new Set([ - RuntimeGlobals.module, - RuntimeGlobals.exports, - RuntimeGlobals.require - ]) - }; - } - - /** - * @param {Chunk} chunk the chunk which condition should be checked - * @param {Compilation} compilation the compilation - * @returns {boolean} true, if the chunk is ok for the module - */ - chunkCondition(chunk, compilation) { - return true; - } - - hasChunkCondition() { - return this.chunkCondition !== Module.prototype.chunkCondition; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - this.type = module.type; - this.layer = module.layer; - this.context = module.context; - this.factoryMeta = module.factoryMeta; - this.resolveOptions = module.resolveOptions; - } - - /** - * Module should be unsafe cached. Get data that's needed for that. - * This data will be passed to restoreFromUnsafeCache later. - * @returns {object} cached data - */ - getUnsafeCacheData() { - return { - factoryMeta: this.factoryMeta, - resolveOptions: this.resolveOptions - }; - } - - /** - * restore unsafe cache data - * @param {object} unsafeCacheData data from getUnsafeCacheData - * @param {NormalModuleFactory} normalModuleFactory the normal module factory handling the unsafe caching - */ - _restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory) { - this.factoryMeta = unsafeCacheData.factoryMeta; - this.resolveOptions = unsafeCacheData.resolveOptions; - } - - /** - * Assuming this module is in the cache. Remove internal references to allow freeing some memory. - */ - cleanupForCache() { - this.factoryMeta = undefined; - this.resolveOptions = undefined; - } - - /** - * @returns {Source | null} the original source for the module before webpack transformation - */ - originalSource() { - return null; - } - - /** - * @param {LazySet} fileDependencies set where file dependencies are added to - * @param {LazySet} contextDependencies set where context dependencies are added to - * @param {LazySet} missingDependencies set where missing dependencies are added to - * @param {LazySet} buildDependencies set where build dependencies are added to - */ - addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ) {} - - serialize(context) { - const { write } = context; - write(this.type); - write(this.layer); - write(this.context); - write(this.resolveOptions); - write(this.factoryMeta); - write(this.useSourceMap); - write(this.useSimpleSourceMap); - write( - this._warnings !== undefined && this._warnings.length === 0 - ? undefined - : this._warnings - ); - write( - this._errors !== undefined && this._errors.length === 0 - ? undefined - : this._errors - ); - write(this.buildMeta); - write(this.buildInfo); - write(this.presentationalDependencies); - write(this.codeGenerationDependencies); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.type = read(); - this.layer = read(); - this.context = read(); - this.resolveOptions = read(); - this.factoryMeta = read(); - this.useSourceMap = read(); - this.useSimpleSourceMap = read(); - this._warnings = read(); - this._errors = read(); - this.buildMeta = read(); - this.buildInfo = read(); - this.presentationalDependencies = read(); - this.codeGenerationDependencies = read(); - super.deserialize(context); - } -} - -makeSerializable(Module, "webpack/lib/Module"); - -// TODO remove in webpack 6 -Object.defineProperty(Module.prototype, "hasEqualsChunks", { - get() { - throw new Error( - "Module.hasEqualsChunks was renamed (use hasEqualChunks instead)" - ); - } -}); - -// TODO remove in webpack 6 -Object.defineProperty(Module.prototype, "isUsed", { - get() { - throw new Error( - "Module.isUsed was renamed (use getUsedName, isExportUsed or isModuleUsed instead)" - ); - } -}); - -// TODO remove in webpack 6 -Object.defineProperty(Module.prototype, "errors", { - get: util.deprecate( - /** - * @this {Module} - * @returns {WebpackError[]} array - */ - function () { - if (this._errors === undefined) { - this._errors = []; - } - return this._errors; - }, - "Module.errors was removed (use getErrors instead)", - "DEP_WEBPACK_MODULE_ERRORS" - ) -}); - -// TODO remove in webpack 6 -Object.defineProperty(Module.prototype, "warnings", { - get: util.deprecate( - /** - * @this {Module} - * @returns {WebpackError[]} array - */ - function () { - if (this._warnings === undefined) { - this._warnings = []; - } - return this._warnings; - }, - "Module.warnings was removed (use getWarnings instead)", - "DEP_WEBPACK_MODULE_WARNINGS" - ) -}); - -// TODO remove in webpack 6 -Object.defineProperty(Module.prototype, "used", { - get() { - throw new Error( - "Module.used was refactored (use ModuleGraph.getUsedExports instead)" - ); - }, - set(value) { - throw new Error( - "Module.used was refactored (use ModuleGraph.setUsedExports instead)" - ); - } -}); - -module.exports = Module; - - -/***/ }), - -/***/ 12530: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { cutOffLoaderExecution } = __webpack_require__(8821); -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -class ModuleBuildError extends WebpackError { - /** - * @param {string | Error&any} err error thrown - * @param {{from?: string|null}} info additional info - */ - constructor(err, { from = null } = {}) { - let message = "Module build failed"; - let details = undefined; - - if (from) { - message += ` (from ${from}):\n`; - } else { - message += ": "; - } - - if (err !== null && typeof err === "object") { - if (typeof err.stack === "string" && err.stack) { - const stack = cutOffLoaderExecution(err.stack); - - if (!err.hideStack) { - message += stack; - } else { - details = stack; - - if (typeof err.message === "string" && err.message) { - message += err.message; - } else { - message += err; - } - } - } else if (typeof err.message === "string" && err.message) { - message += err.message; - } else { - message += String(err); - } - } else { - message += String(err); - } - - super(message); - - this.name = "ModuleBuildError"; - this.details = details; - this.error = err; - } - - serialize(context) { - const { write } = context; - - write(this.error); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.error = read(); - - super.deserialize(context); - } -} - -makeSerializable(ModuleBuildError, "webpack/lib/ModuleBuildError"); - -module.exports = ModuleBuildError; - - -/***/ }), - -/***/ 17799: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -class ModuleDependencyError extends WebpackError { - /** - * Creates an instance of ModuleDependencyError. - * @param {Module} module module tied to dependency - * @param {Error} err error thrown - * @param {DependencyLocation} loc location of dependency - */ - constructor(module, err, loc) { - super(err.message); - - this.name = "ModuleDependencyError"; - this.details = - err && !(/** @type {any} */ (err).hideStack) - ? err.stack.split("\n").slice(1).join("\n") - : undefined; - this.module = module; - this.loc = loc; - /** error is not (de)serialized, so it might be undefined after deserialization */ - this.error = err; - - if (err && /** @type {any} */ (err).hideStack) { - this.stack = - err.stack.split("\n").slice(1).join("\n") + "\n\n" + this.stack; - } - } -} - -module.exports = ModuleDependencyError; - - -/***/ }), - -/***/ 76218: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -class ModuleDependencyWarning extends WebpackError { - /** - * @param {Module} module module tied to dependency - * @param {Error} err error thrown - * @param {DependencyLocation} loc location of dependency - */ - constructor(module, err, loc) { - super(err ? err.message : ""); - - this.name = "ModuleDependencyWarning"; - this.details = - err && !(/** @type {any} */ (err).hideStack) - ? err.stack.split("\n").slice(1).join("\n") - : undefined; - this.module = module; - this.loc = loc; - /** error is not (de)serialized, so it might be undefined after deserialization */ - this.error = err; - - if (err && /** @type {any} */ (err).hideStack) { - this.stack = - err.stack.split("\n").slice(1).join("\n") + "\n\n" + this.stack; - } - } -} - -makeSerializable( - ModuleDependencyWarning, - "webpack/lib/ModuleDependencyWarning" -); - -module.exports = ModuleDependencyWarning; - - -/***/ }), - -/***/ 74938: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { cleanUp } = __webpack_require__(8821); -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -class ModuleError extends WebpackError { - /** - * @param {Error} err error thrown - * @param {{from?: string|null}} info additional info - */ - constructor(err, { from = null } = {}) { - let message = "Module Error"; - - if (from) { - message += ` (from ${from}):\n`; - } else { - message += ": "; - } - - if (err && typeof err === "object" && err.message) { - message += err.message; - } else if (err) { - message += err; - } - - super(message); - - this.name = "ModuleError"; - this.error = err; - this.details = - err && typeof err === "object" && err.stack - ? cleanUp(err.stack, this.message) - : undefined; - } - - serialize(context) { - const { write } = context; - - write(this.error); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.error = read(); - - super.deserialize(context); - } -} - -makeSerializable(ModuleError, "webpack/lib/ModuleError"); - -module.exports = ModuleError; - - -/***/ }), - -/***/ 39744: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Module")} Module */ - -/** - * @typedef {Object} ModuleFactoryResult - * @property {Module=} module the created module or unset if no module was created - * @property {Set=} fileDependencies - * @property {Set=} contextDependencies - * @property {Set=} missingDependencies - * @property {boolean=} cacheable allow to use the unsafe cache - */ - -/** - * @typedef {Object} ModuleFactoryCreateDataContextInfo - * @property {string} issuer - * @property {string | null=} issuerLayer - * @property {string} compiler - */ - -/** - * @typedef {Object} ModuleFactoryCreateData - * @property {ModuleFactoryCreateDataContextInfo} contextInfo - * @property {ResolveOptions=} resolveOptions - * @property {string} context - * @property {Dependency[]} dependencies - */ - -class ModuleFactory { - /* istanbul ignore next */ - /** - * @abstract - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } -} - -module.exports = ModuleFactory; - - -/***/ }), - -/***/ 99523: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NormalModule = __webpack_require__(89417); -const createHash = __webpack_require__(85205); -const memoize = __webpack_require__(61374); - -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {typeof import("./util/Hash")} Hash */ - -const ModuleFilenameHelpers = exports; - -// TODO webpack 6: consider removing these -ModuleFilenameHelpers.ALL_LOADERS_RESOURCE = "[all-loaders][resource]"; -ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE = - /\[all-?loaders\]\[resource\]/gi; -ModuleFilenameHelpers.LOADERS_RESOURCE = "[loaders][resource]"; -ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE = /\[loaders\]\[resource\]/gi; -ModuleFilenameHelpers.RESOURCE = "[resource]"; -ModuleFilenameHelpers.REGEXP_RESOURCE = /\[resource\]/gi; -ModuleFilenameHelpers.ABSOLUTE_RESOURCE_PATH = "[absolute-resource-path]"; -// cSpell:words olute -ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = - /\[abs(olute)?-?resource-?path\]/gi; -ModuleFilenameHelpers.RESOURCE_PATH = "[resource-path]"; -ModuleFilenameHelpers.REGEXP_RESOURCE_PATH = /\[resource-?path\]/gi; -ModuleFilenameHelpers.ALL_LOADERS = "[all-loaders]"; -ModuleFilenameHelpers.REGEXP_ALL_LOADERS = /\[all-?loaders\]/gi; -ModuleFilenameHelpers.LOADERS = "[loaders]"; -ModuleFilenameHelpers.REGEXP_LOADERS = /\[loaders\]/gi; -ModuleFilenameHelpers.QUERY = "[query]"; -ModuleFilenameHelpers.REGEXP_QUERY = /\[query\]/gi; -ModuleFilenameHelpers.ID = "[id]"; -ModuleFilenameHelpers.REGEXP_ID = /\[id\]/gi; -ModuleFilenameHelpers.HASH = "[hash]"; -ModuleFilenameHelpers.REGEXP_HASH = /\[hash\]/gi; -ModuleFilenameHelpers.NAMESPACE = "[namespace]"; -ModuleFilenameHelpers.REGEXP_NAMESPACE = /\[namespace\]/gi; - -const getAfter = (strFn, token) => { - return () => { - const str = strFn(); - const idx = str.indexOf(token); - return idx < 0 ? "" : str.slice(idx); - }; -}; - -const getBefore = (strFn, token) => { - return () => { - const str = strFn(); - const idx = str.lastIndexOf(token); - return idx < 0 ? "" : str.slice(0, idx); - }; -}; - -const getHash = (strFn, hashFunction) => { - return () => { - const hash = createHash(hashFunction); - hash.update(strFn()); - const digest = /** @type {string} */ (hash.digest("hex")); - return digest.slice(0, 4); - }; -}; - -const asRegExp = test => { - if (typeof test === "string") { - test = new RegExp("^" + test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")); - } - return test; -}; - -const lazyObject = obj => { - const newObj = {}; - for (const key of Object.keys(obj)) { - const fn = obj[key]; - Object.defineProperty(newObj, key, { - get: () => fn(), - set: v => { - Object.defineProperty(newObj, key, { - value: v, - enumerable: true, - writable: true - }); - }, - enumerable: true, - configurable: true - }); - } - return newObj; -}; - -const REGEXP = /\[\\*([\w-]+)\\*\]/gi; - -/** - * - * @param {Module | string} module the module - * @param {TODO} options options - * @param {Object} contextInfo context info - * @param {RequestShortener} contextInfo.requestShortener requestShortener - * @param {ChunkGraph} contextInfo.chunkGraph chunk graph - * @param {string | Hash} contextInfo.hashFunction the hash function to use - * @returns {string} the filename - */ -ModuleFilenameHelpers.createFilename = ( - module = "", - options, - { requestShortener, chunkGraph, hashFunction = "md4" } -) => { - const opts = { - namespace: "", - moduleFilenameTemplate: "", - ...(typeof options === "object" - ? options - : { - moduleFilenameTemplate: options - }) - }; - - let absoluteResourcePath; - let hash; - let identifier; - let moduleId; - let shortIdentifier; - if (typeof module === "string") { - shortIdentifier = memoize(() => requestShortener.shorten(module)); - identifier = shortIdentifier; - moduleId = () => ""; - absoluteResourcePath = () => module.split("!").pop(); - hash = getHash(identifier, hashFunction); - } else { - shortIdentifier = memoize(() => - module.readableIdentifier(requestShortener) - ); - identifier = memoize(() => requestShortener.shorten(module.identifier())); - moduleId = () => chunkGraph.getModuleId(module); - absoluteResourcePath = () => - module instanceof NormalModule - ? module.resource - : module.identifier().split("!").pop(); - hash = getHash(identifier, hashFunction); - } - const resource = memoize(() => shortIdentifier().split("!").pop()); - - const loaders = getBefore(shortIdentifier, "!"); - const allLoaders = getBefore(identifier, "!"); - const query = getAfter(resource, "?"); - const resourcePath = () => { - const q = query().length; - return q === 0 ? resource() : resource().slice(0, -q); - }; - if (typeof opts.moduleFilenameTemplate === "function") { - return opts.moduleFilenameTemplate( - lazyObject({ - identifier: identifier, - shortIdentifier: shortIdentifier, - resource: resource, - resourcePath: memoize(resourcePath), - absoluteResourcePath: memoize(absoluteResourcePath), - allLoaders: memoize(allLoaders), - query: memoize(query), - moduleId: memoize(moduleId), - hash: memoize(hash), - namespace: () => opts.namespace - }) - ); - } - - // TODO webpack 6: consider removing alternatives without dashes - /** @type {Map} */ - const replacements = new Map([ - ["identifier", identifier], - ["short-identifier", shortIdentifier], - ["resource", resource], - ["resource-path", resourcePath], - // cSpell:words resourcepath - ["resourcepath", resourcePath], - ["absolute-resource-path", absoluteResourcePath], - ["abs-resource-path", absoluteResourcePath], - // cSpell:words absoluteresource - ["absoluteresource-path", absoluteResourcePath], - // cSpell:words absresource - ["absresource-path", absoluteResourcePath], - // cSpell:words resourcepath - ["absolute-resourcepath", absoluteResourcePath], - // cSpell:words resourcepath - ["abs-resourcepath", absoluteResourcePath], - // cSpell:words absoluteresourcepath - ["absoluteresourcepath", absoluteResourcePath], - // cSpell:words absresourcepath - ["absresourcepath", absoluteResourcePath], - ["all-loaders", allLoaders], - // cSpell:words allloaders - ["allloaders", allLoaders], - ["loaders", loaders], - ["query", query], - ["id", moduleId], - ["hash", hash], - ["namespace", () => opts.namespace] - ]); - - // TODO webpack 6: consider removing weird double placeholders - return opts.moduleFilenameTemplate - .replace(ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE, "[identifier]") - .replace( - ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE, - "[short-identifier]" - ) - .replace(REGEXP, (match, content) => { - if (content.length + 2 === match.length) { - const replacement = replacements.get(content.toLowerCase()); - if (replacement !== undefined) { - return replacement(); - } - } else if (match.startsWith("[\\") && match.endsWith("\\]")) { - return `[${match.slice(2, -2)}]`; - } - return match; - }); -}; - -ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => { - const countMap = Object.create(null); - const posMap = Object.create(null); - array.forEach((item, idx) => { - countMap[item] = countMap[item] || []; - countMap[item].push(idx); - posMap[item] = 0; - }); - if (comparator) { - Object.keys(countMap).forEach(item => { - countMap[item].sort(comparator); - }); - } - return array.map((item, i) => { - if (countMap[item].length > 1) { - if (comparator && countMap[item][0] === i) return item; - return fn(item, i, posMap[item]++); - } else { - return item; - } - }); -}; - -ModuleFilenameHelpers.matchPart = (str, test) => { - if (!test) return true; - test = asRegExp(test); - if (Array.isArray(test)) { - return test.map(asRegExp).some(regExp => regExp.test(str)); - } else { - return test.test(str); - } -}; - -ModuleFilenameHelpers.matchObject = (obj, str) => { - if (obj.test) { - if (!ModuleFilenameHelpers.matchPart(str, obj.test)) { - return false; - } - } - if (obj.include) { - if (!ModuleFilenameHelpers.matchPart(str, obj.include)) { - return false; - } - } - if (obj.exclude) { - if (ModuleFilenameHelpers.matchPart(str, obj.exclude)) { - return false; - } - } - return true; -}; - - -/***/ }), - -/***/ 13487: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const ExportsInfo = __webpack_require__(13168); -const ModuleGraphConnection = __webpack_require__(82921); -const SortableSet = __webpack_require__(87122); -const WeakTupleMap = __webpack_require__(20427); - -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./ExportsInfo").ExportInfo} ExportInfo */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleProfile")} ModuleProfile */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @callback OptimizationBailoutFunction - * @param {RequestShortener} requestShortener - * @returns {string} - */ - -const EMPTY_SET = new Set(); - -/** - * @param {SortableSet} set input - * @returns {readonly Map} mapped by origin module - */ -const getConnectionsByOriginModule = set => { - const map = new Map(); - /** @type {Module | 0} */ - let lastModule = 0; - /** @type {ModuleGraphConnection[]} */ - let lastList = undefined; - for (const connection of set) { - const { originModule } = connection; - if (lastModule === originModule) { - lastList.push(connection); - } else { - lastModule = originModule; - const list = map.get(originModule); - if (list !== undefined) { - lastList = list; - list.push(connection); - } else { - const list = [connection]; - lastList = list; - map.set(originModule, list); - } - } - } - return map; -}; - -/** - * @param {SortableSet} set input - * @returns {readonly Map} mapped by module - */ -const getConnectionsByModule = set => { - const map = new Map(); - /** @type {Module | 0} */ - let lastModule = 0; - /** @type {ModuleGraphConnection[]} */ - let lastList = undefined; - for (const connection of set) { - const { module } = connection; - if (lastModule === module) { - lastList.push(connection); - } else { - lastModule = module; - const list = map.get(module); - if (list !== undefined) { - lastList = list; - list.push(connection); - } else { - const list = [connection]; - lastList = list; - map.set(module, list); - } - } - } - return map; -}; - -class ModuleGraphModule { - constructor() { - /** @type {SortableSet} */ - this.incomingConnections = new SortableSet(); - /** @type {SortableSet | undefined} */ - this.outgoingConnections = undefined; - /** @type {Module | null} */ - this.issuer = undefined; - /** @type {(string | OptimizationBailoutFunction)[]} */ - this.optimizationBailout = []; - /** @type {ExportsInfo} */ - this.exports = new ExportsInfo(); - /** @type {number} */ - this.preOrderIndex = null; - /** @type {number} */ - this.postOrderIndex = null; - /** @type {number} */ - this.depth = null; - /** @type {ModuleProfile} */ - this.profile = undefined; - /** @type {boolean} */ - this.async = false; - /** @type {ModuleGraphConnection[]} */ - this._unassignedConnections = undefined; - } -} - -class ModuleGraph { - constructor() { - /** @type {WeakMap} */ - this._dependencyMap = new WeakMap(); - /** @type {Map} */ - this._moduleMap = new Map(); - /** @type {WeakMap} */ - this._metaMap = new WeakMap(); - - /** @type {WeakTupleMap} */ - this._cache = undefined; - - /** @type {Map>} */ - this._moduleMemCaches = undefined; - } - - /** - * @param {Module} module the module - * @returns {ModuleGraphModule} the internal module - */ - _getModuleGraphModule(module) { - let mgm = this._moduleMap.get(module); - if (mgm === undefined) { - mgm = new ModuleGraphModule(); - this._moduleMap.set(module, mgm); - } - return mgm; - } - - /** - * @param {Dependency} dependency the dependency - * @param {DependenciesBlock} block parent block - * @param {Module} module parent module - * @param {number=} indexInBlock position in block - * @returns {void} - */ - setParents(dependency, block, module, indexInBlock = -1) { - dependency._parentDependenciesBlockIndex = indexInBlock; - dependency._parentDependenciesBlock = block; - dependency._parentModule = module; - } - - /** - * @param {Dependency} dependency the dependency - * @returns {Module} parent module - */ - getParentModule(dependency) { - return dependency._parentModule; - } - - /** - * @param {Dependency} dependency the dependency - * @returns {DependenciesBlock} parent block - */ - getParentBlock(dependency) { - return dependency._parentDependenciesBlock; - } - - /** - * @param {Dependency} dependency the dependency - * @returns {number} index - */ - getParentBlockIndex(dependency) { - return dependency._parentDependenciesBlockIndex; - } - - /** - * @param {Module} originModule the referencing module - * @param {Dependency} dependency the referencing dependency - * @param {Module} module the referenced module - * @returns {void} - */ - setResolvedModule(originModule, dependency, module) { - const connection = new ModuleGraphConnection( - originModule, - dependency, - module, - undefined, - dependency.weak, - dependency.getCondition(this) - ); - const connections = this._getModuleGraphModule(module).incomingConnections; - connections.add(connection); - if (originModule) { - const mgm = this._getModuleGraphModule(originModule); - if (mgm._unassignedConnections === undefined) { - mgm._unassignedConnections = []; - } - mgm._unassignedConnections.push(connection); - if (mgm.outgoingConnections === undefined) { - mgm.outgoingConnections = new SortableSet(); - } - mgm.outgoingConnections.add(connection); - } else { - this._dependencyMap.set(dependency, connection); - } - } - - /** - * @param {Dependency} dependency the referencing dependency - * @param {Module} module the referenced module - * @returns {void} - */ - updateModule(dependency, module) { - const connection = this.getConnection(dependency); - if (connection.module === module) return; - const newConnection = connection.clone(); - newConnection.module = module; - this._dependencyMap.set(dependency, newConnection); - connection.setActive(false); - const originMgm = this._getModuleGraphModule(connection.originModule); - originMgm.outgoingConnections.add(newConnection); - const targetMgm = this._getModuleGraphModule(module); - targetMgm.incomingConnections.add(newConnection); - } - - /** - * @param {Dependency} dependency the referencing dependency - * @returns {void} - */ - removeConnection(dependency) { - const connection = this.getConnection(dependency); - const targetMgm = this._getModuleGraphModule(connection.module); - targetMgm.incomingConnections.delete(connection); - const originMgm = this._getModuleGraphModule(connection.originModule); - originMgm.outgoingConnections.delete(connection); - this._dependencyMap.set(dependency, null); - } - - /** - * @param {Dependency} dependency the referencing dependency - * @param {string} explanation an explanation - * @returns {void} - */ - addExplanation(dependency, explanation) { - const connection = this.getConnection(dependency); - connection.addExplanation(explanation); - } - - /** - * @param {Module} sourceModule the source module - * @param {Module} targetModule the target module - * @returns {void} - */ - cloneModuleAttributes(sourceModule, targetModule) { - const oldMgm = this._getModuleGraphModule(sourceModule); - const newMgm = this._getModuleGraphModule(targetModule); - newMgm.postOrderIndex = oldMgm.postOrderIndex; - newMgm.preOrderIndex = oldMgm.preOrderIndex; - newMgm.depth = oldMgm.depth; - newMgm.exports = oldMgm.exports; - newMgm.async = oldMgm.async; - } - - /** - * @param {Module} module the module - * @returns {void} - */ - removeModuleAttributes(module) { - const mgm = this._getModuleGraphModule(module); - mgm.postOrderIndex = null; - mgm.preOrderIndex = null; - mgm.depth = null; - mgm.async = false; - } - - /** - * @returns {void} - */ - removeAllModuleAttributes() { - for (const mgm of this._moduleMap.values()) { - mgm.postOrderIndex = null; - mgm.preOrderIndex = null; - mgm.depth = null; - mgm.async = false; - } - } - - /** - * @param {Module} oldModule the old referencing module - * @param {Module} newModule the new referencing module - * @param {function(ModuleGraphConnection): boolean} filterConnection filter predicate for replacement - * @returns {void} - */ - moveModuleConnections(oldModule, newModule, filterConnection) { - if (oldModule === newModule) return; - const oldMgm = this._getModuleGraphModule(oldModule); - const newMgm = this._getModuleGraphModule(newModule); - // Outgoing connections - const oldConnections = oldMgm.outgoingConnections; - if (oldConnections !== undefined) { - if (newMgm.outgoingConnections === undefined) { - newMgm.outgoingConnections = new SortableSet(); - } - const newConnections = newMgm.outgoingConnections; - for (const connection of oldConnections) { - if (filterConnection(connection)) { - connection.originModule = newModule; - newConnections.add(connection); - oldConnections.delete(connection); - } - } - } - // Incoming connections - const oldConnections2 = oldMgm.incomingConnections; - const newConnections2 = newMgm.incomingConnections; - for (const connection of oldConnections2) { - if (filterConnection(connection)) { - connection.module = newModule; - newConnections2.add(connection); - oldConnections2.delete(connection); - } - } - } - - /** - * @param {Module} oldModule the old referencing module - * @param {Module} newModule the new referencing module - * @param {function(ModuleGraphConnection): boolean} filterConnection filter predicate for replacement - * @returns {void} - */ - copyOutgoingModuleConnections(oldModule, newModule, filterConnection) { - if (oldModule === newModule) return; - const oldMgm = this._getModuleGraphModule(oldModule); - const newMgm = this._getModuleGraphModule(newModule); - // Outgoing connections - const oldConnections = oldMgm.outgoingConnections; - if (oldConnections !== undefined) { - if (newMgm.outgoingConnections === undefined) { - newMgm.outgoingConnections = new SortableSet(); - } - const newConnections = newMgm.outgoingConnections; - for (const connection of oldConnections) { - if (filterConnection(connection)) { - const newConnection = connection.clone(); - newConnection.originModule = newModule; - newConnections.add(newConnection); - if (newConnection.module !== undefined) { - const otherMgm = this._getModuleGraphModule(newConnection.module); - otherMgm.incomingConnections.add(newConnection); - } - } - } - } - } - - /** - * @param {Module} module the referenced module - * @param {string} explanation an explanation why it's referenced - * @returns {void} - */ - addExtraReason(module, explanation) { - const connections = this._getModuleGraphModule(module).incomingConnections; - connections.add(new ModuleGraphConnection(null, null, module, explanation)); - } - - /** - * @param {Dependency} dependency the dependency to look for a referenced module - * @returns {Module} the referenced module - */ - getResolvedModule(dependency) { - const connection = this.getConnection(dependency); - return connection !== undefined ? connection.resolvedModule : null; - } - - /** - * @param {Dependency} dependency the dependency to look for a referenced module - * @returns {ModuleGraphConnection | undefined} the connection - */ - getConnection(dependency) { - const connection = this._dependencyMap.get(dependency); - if (connection === undefined) { - const module = this.getParentModule(dependency); - if (module !== undefined) { - const mgm = this._getModuleGraphModule(module); - if ( - mgm._unassignedConnections && - mgm._unassignedConnections.length !== 0 - ) { - let foundConnection; - for (const connection of mgm._unassignedConnections) { - this._dependencyMap.set(connection.dependency, connection); - if (connection.dependency === dependency) - foundConnection = connection; - } - mgm._unassignedConnections.length = 0; - if (foundConnection !== undefined) { - return foundConnection; - } - } - } - this._dependencyMap.set(dependency, null); - return undefined; - } - return connection === null ? undefined : connection; - } - - /** - * @param {Dependency} dependency the dependency to look for a referenced module - * @returns {Module} the referenced module - */ - getModule(dependency) { - const connection = this.getConnection(dependency); - return connection !== undefined ? connection.module : null; - } - - /** - * @param {Dependency} dependency the dependency to look for a referencing module - * @returns {Module} the referencing module - */ - getOrigin(dependency) { - const connection = this.getConnection(dependency); - return connection !== undefined ? connection.originModule : null; - } - - /** - * @param {Dependency} dependency the dependency to look for a referencing module - * @returns {Module} the original referencing module - */ - getResolvedOrigin(dependency) { - const connection = this.getConnection(dependency); - return connection !== undefined ? connection.resolvedOriginModule : null; - } - - /** - * @param {Module} module the module - * @returns {Iterable} reasons why a module is included - */ - getIncomingConnections(module) { - const connections = this._getModuleGraphModule(module).incomingConnections; - return connections; - } - - /** - * @param {Module} module the module - * @returns {Iterable} list of outgoing connections - */ - getOutgoingConnections(module) { - const connections = this._getModuleGraphModule(module).outgoingConnections; - return connections === undefined ? EMPTY_SET : connections; - } - - /** - * @param {Module} module the module - * @returns {readonly Map} reasons why a module is included, in a map by source module - */ - getIncomingConnectionsByOriginModule(module) { - const connections = this._getModuleGraphModule(module).incomingConnections; - return connections.getFromUnorderedCache(getConnectionsByOriginModule); - } - - /** - * @param {Module} module the module - * @returns {readonly Map | undefined} connections to modules, in a map by module - */ - getOutgoingConnectionsByModule(module) { - const connections = this._getModuleGraphModule(module).outgoingConnections; - return connections === undefined - ? undefined - : connections.getFromUnorderedCache(getConnectionsByModule); - } - - /** - * @param {Module} module the module - * @returns {ModuleProfile | null} the module profile - */ - getProfile(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.profile; - } - - /** - * @param {Module} module the module - * @param {ModuleProfile | null} profile the module profile - * @returns {void} - */ - setProfile(module, profile) { - const mgm = this._getModuleGraphModule(module); - mgm.profile = profile; - } - - /** - * @param {Module} module the module - * @returns {Module | null} the issuer module - */ - getIssuer(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.issuer; - } - - /** - * @param {Module} module the module - * @param {Module | null} issuer the issuer module - * @returns {void} - */ - setIssuer(module, issuer) { - const mgm = this._getModuleGraphModule(module); - mgm.issuer = issuer; - } - - /** - * @param {Module} module the module - * @param {Module | null} issuer the issuer module - * @returns {void} - */ - setIssuerIfUnset(module, issuer) { - const mgm = this._getModuleGraphModule(module); - if (mgm.issuer === undefined) mgm.issuer = issuer; - } - - /** - * @param {Module} module the module - * @returns {(string | OptimizationBailoutFunction)[]} optimization bailouts - */ - getOptimizationBailout(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.optimizationBailout; - } - - /** - * @param {Module} module the module - * @returns {true | string[] | null} the provided exports - */ - getProvidedExports(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.exports.getProvidedExports(); - } - - /** - * @param {Module} module the module - * @param {string | string[]} exportName a name of an export - * @returns {boolean | null} true, if the export is provided by the module. - * null, if it's unknown. - * false, if it's not provided. - */ - isExportProvided(module, exportName) { - const mgm = this._getModuleGraphModule(module); - const result = mgm.exports.isExportProvided(exportName); - return result === undefined ? null : result; - } - - /** - * @param {Module} module the module - * @returns {ExportsInfo} info about the exports - */ - getExportsInfo(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.exports; - } - - /** - * @param {Module} module the module - * @param {string} exportName the export - * @returns {ExportInfo} info about the export - */ - getExportInfo(module, exportName) { - const mgm = this._getModuleGraphModule(module); - return mgm.exports.getExportInfo(exportName); - } - - /** - * @param {Module} module the module - * @param {string} exportName the export - * @returns {ExportInfo} info about the export (do not modify) - */ - getReadOnlyExportInfo(module, exportName) { - const mgm = this._getModuleGraphModule(module); - return mgm.exports.getReadOnlyExportInfo(exportName); - } - - /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {false | true | SortableSet | null} the used exports - * false: module is not used at all. - * true: the module namespace/object export is used. - * SortableSet: these export names are used. - * empty SortableSet: module is used but no export. - * null: unknown, worst case should be assumed. - */ - getUsedExports(module, runtime) { - const mgm = this._getModuleGraphModule(module); - return mgm.exports.getUsedExports(runtime); - } - - /** - * @param {Module} module the module - * @returns {number} the index of the module - */ - getPreOrderIndex(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.preOrderIndex; - } - - /** - * @param {Module} module the module - * @returns {number} the index of the module - */ - getPostOrderIndex(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.postOrderIndex; - } - - /** - * @param {Module} module the module - * @param {number} index the index of the module - * @returns {void} - */ - setPreOrderIndex(module, index) { - const mgm = this._getModuleGraphModule(module); - mgm.preOrderIndex = index; - } - - /** - * @param {Module} module the module - * @param {number} index the index of the module - * @returns {boolean} true, if the index was set - */ - setPreOrderIndexIfUnset(module, index) { - const mgm = this._getModuleGraphModule(module); - if (mgm.preOrderIndex === null) { - mgm.preOrderIndex = index; - return true; - } - return false; - } - - /** - * @param {Module} module the module - * @param {number} index the index of the module - * @returns {void} - */ - setPostOrderIndex(module, index) { - const mgm = this._getModuleGraphModule(module); - mgm.postOrderIndex = index; - } - - /** - * @param {Module} module the module - * @param {number} index the index of the module - * @returns {boolean} true, if the index was set - */ - setPostOrderIndexIfUnset(module, index) { - const mgm = this._getModuleGraphModule(module); - if (mgm.postOrderIndex === null) { - mgm.postOrderIndex = index; - return true; - } - return false; - } - - /** - * @param {Module} module the module - * @returns {number} the depth of the module - */ - getDepth(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.depth; - } - - /** - * @param {Module} module the module - * @param {number} depth the depth of the module - * @returns {void} - */ - setDepth(module, depth) { - const mgm = this._getModuleGraphModule(module); - mgm.depth = depth; - } - - /** - * @param {Module} module the module - * @param {number} depth the depth of the module - * @returns {boolean} true, if the depth was set - */ - setDepthIfLower(module, depth) { - const mgm = this._getModuleGraphModule(module); - if (mgm.depth === null || mgm.depth > depth) { - mgm.depth = depth; - return true; - } - return false; - } - - /** - * @param {Module} module the module - * @returns {boolean} true, if the module is async - */ - isAsync(module) { - const mgm = this._getModuleGraphModule(module); - return mgm.async; - } - - /** - * @param {Module} module the module - * @returns {void} - */ - setAsync(module) { - const mgm = this._getModuleGraphModule(module); - mgm.async = true; - } - - /** - * @param {any} thing any thing - * @returns {Object} metadata - */ - getMeta(thing) { - let meta = this._metaMap.get(thing); - if (meta === undefined) { - meta = Object.create(null); - this._metaMap.set(thing, meta); - } - return meta; - } - - /** - * @param {any} thing any thing - * @returns {Object} metadata - */ - getMetaIfExisting(thing) { - return this._metaMap.get(thing); - } - - /** - * @param {string=} cacheStage a persistent stage name for caching - */ - freeze(cacheStage) { - this._cache = new WeakTupleMap(); - this._cacheStage = cacheStage; - } - - unfreeze() { - this._cache = undefined; - this._cacheStage = undefined; - } - - /** - * @template {any[]} T - * @template V - * @param {(moduleGraph: ModuleGraph, ...args: T) => V} fn computer - * @param {T} args arguments - * @returns {V} computed value or cached - */ - cached(fn, ...args) { - if (this._cache === undefined) return fn(this, ...args); - return this._cache.provide(fn, ...args, () => fn(this, ...args)); - } - - /** - * @param {Map>} moduleMemCaches mem caches for modules for better caching - */ - setModuleMemCaches(moduleMemCaches) { - this._moduleMemCaches = moduleMemCaches; - } - - /** - * @param {Dependency} dependency dependency - * @param {...any} args arguments, last argument is a function called with moduleGraph, dependency, ...args - * @returns {any} computed value or cached - */ - dependencyCacheProvide(dependency, ...args) { - /** @type {(moduleGraph: ModuleGraph, dependency: Dependency, ...args: any[]) => any} */ - const fn = args.pop(); - if (this._moduleMemCaches && this._cacheStage) { - const memCache = this._moduleMemCaches.get( - this.getParentModule(dependency) - ); - if (memCache !== undefined) { - return memCache.provide(dependency, this._cacheStage, ...args, () => - fn(this, dependency, ...args) - ); - } - } - if (this._cache === undefined) return fn(this, dependency, ...args); - return this._cache.provide(dependency, ...args, () => - fn(this, dependency, ...args) - ); - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @param {string} deprecateMessage message for the deprecation message - * @param {string} deprecationCode code for the deprecation - * @returns {ModuleGraph} the module graph - */ - static getModuleGraphForModule(module, deprecateMessage, deprecationCode) { - const fn = deprecateMap.get(deprecateMessage); - if (fn) return fn(module); - const newFn = util.deprecate( - /** - * @param {Module} module the module - * @returns {ModuleGraph} the module graph - */ - module => { - const moduleGraph = moduleGraphForModuleMap.get(module); - if (!moduleGraph) - throw new Error( - deprecateMessage + - "There was no ModuleGraph assigned to the Module for backward-compat (Use the new API)" - ); - return moduleGraph; - }, - deprecateMessage + ": Use new ModuleGraph API", - deprecationCode - ); - deprecateMap.set(deprecateMessage, newFn); - return newFn(module); - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @param {ModuleGraph} moduleGraph the module graph - * @returns {void} - */ - static setModuleGraphForModule(module, moduleGraph) { - moduleGraphForModuleMap.set(module, moduleGraph); - } - - // TODO remove in webpack 6 - /** - * @param {Module} module the module - * @returns {void} - */ - static clearModuleGraphForModule(module) { - moduleGraphForModuleMap.delete(module); - } -} - -// TODO remove in webpack 6 -/** @type {WeakMap} */ -const moduleGraphForModuleMap = new WeakMap(); - -// TODO remove in webpack 6 -/** @type {Map ModuleGraph>} */ -const deprecateMap = new Map(); - -module.exports = ModuleGraph; -module.exports.ModuleGraphConnection = ModuleGraphConnection; - - -/***/ }), - -/***/ 82921: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * Module itself is not connected, but transitive modules are connected transitively. - */ -const TRANSITIVE_ONLY = Symbol("transitive only"); - -/** - * While determining the active state, this flag is used to signal a circular connection. - */ -const CIRCULAR_CONNECTION = Symbol("circular connection"); - -/** @typedef {boolean | typeof TRANSITIVE_ONLY | typeof CIRCULAR_CONNECTION} ConnectionState */ - -/** - * @param {ConnectionState} a first - * @param {ConnectionState} b second - * @returns {ConnectionState} merged - */ -const addConnectionStates = (a, b) => { - if (a === true || b === true) return true; - if (a === false) return b; - if (b === false) return a; - if (a === TRANSITIVE_ONLY) return b; - if (b === TRANSITIVE_ONLY) return a; - return a; -}; - -/** - * @param {ConnectionState} a first - * @param {ConnectionState} b second - * @returns {ConnectionState} intersected - */ -const intersectConnectionStates = (a, b) => { - if (a === false || b === false) return false; - if (a === true) return b; - if (b === true) return a; - if (a === CIRCULAR_CONNECTION) return b; - if (b === CIRCULAR_CONNECTION) return a; - return a; -}; - -class ModuleGraphConnection { - /** - * @param {Module|null} originModule the referencing module - * @param {Dependency|null} dependency the referencing dependency - * @param {Module} module the referenced module - * @param {string=} explanation some extra detail - * @param {boolean=} weak the reference is weak - * @param {false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState=} condition condition for the connection - */ - constructor( - originModule, - dependency, - module, - explanation, - weak = false, - condition = undefined - ) { - this.originModule = originModule; - this.resolvedOriginModule = originModule; - this.dependency = dependency; - this.resolvedModule = module; - this.module = module; - this.weak = weak; - this.conditional = !!condition; - this._active = condition !== false; - /** @type {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} */ - this.condition = condition || undefined; - /** @type {Set} */ - this.explanations = undefined; - if (explanation) { - this.explanations = new Set(); - this.explanations.add(explanation); - } - } - - clone() { - const clone = new ModuleGraphConnection( - this.resolvedOriginModule, - this.dependency, - this.resolvedModule, - undefined, - this.weak, - this.condition - ); - clone.originModule = this.originModule; - clone.module = this.module; - clone.conditional = this.conditional; - clone._active = this._active; - if (this.explanations) clone.explanations = new Set(this.explanations); - return clone; - } - - /** - * @param {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} condition condition for the connection - * @returns {void} - */ - addCondition(condition) { - if (this.conditional) { - const old = this.condition; - this.condition = (c, r) => - intersectConnectionStates(old(c, r), condition(c, r)); - } else if (this._active) { - this.conditional = true; - this.condition = condition; - } - } - - /** - * @param {string} explanation the explanation to add - * @returns {void} - */ - addExplanation(explanation) { - if (this.explanations === undefined) { - this.explanations = new Set(); - } - this.explanations.add(explanation); - } - - get explanation() { - if (this.explanations === undefined) return ""; - return Array.from(this.explanations).join(" "); - } - - // TODO webpack 5 remove - get active() { - throw new Error("Use getActiveState instead"); - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, if the connection is active - */ - isActive(runtime) { - if (!this.conditional) return this._active; - return this.condition(this, runtime) !== false; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, if the connection is active - */ - isTargetActive(runtime) { - if (!this.conditional) return this._active; - return this.condition(this, runtime) === true; - } - - /** - * @param {RuntimeSpec} runtime the runtime - * @returns {ConnectionState} true: fully active, false: inactive, TRANSITIVE: direct module inactive, but transitive connection maybe active - */ - getActiveState(runtime) { - if (!this.conditional) return this._active; - return this.condition(this, runtime); - } - - /** - * @param {boolean} value active or not - * @returns {void} - */ - setActive(value) { - this.conditional = false; - this._active = value; - } - - set active(value) { - throw new Error("Use setActive instead"); - } -} - -/** @typedef {typeof TRANSITIVE_ONLY} TRANSITIVE_ONLY */ -/** @typedef {typeof CIRCULAR_CONNECTION} CIRCULAR_CONNECTION */ - -module.exports = ModuleGraphConnection; -module.exports.addConnectionStates = addConnectionStates; -module.exports.TRANSITIVE_ONLY = /** @type {typeof TRANSITIVE_ONLY} */ ( - TRANSITIVE_ONLY -); -module.exports.CIRCULAR_CONNECTION = /** @type {typeof CIRCULAR_CONNECTION} */ ( - CIRCULAR_CONNECTION -); - - -/***/ }), - -/***/ 16939: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ - -class ModuleHashingError extends WebpackError { - /** - * Create a new ModuleHashingError - * @param {Module} module related module - * @param {Error} error Original error - */ - constructor(module, error) { - super(); - - this.name = "ModuleHashingError"; - this.error = error; - this.message = error.message; - this.details = error.stack; - this.module = module; - } -} - -module.exports = ModuleHashingError; - - -/***/ }), - -/***/ 56204: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, RawSource, CachedSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const Template = __webpack_require__(43841); -const JavascriptModulesPlugin = __webpack_require__(36109); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./ExportsInfo")} ExportsInfo */ -/** @typedef {import("./ExportsInfo").ExportInfo} ExportInfo */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ -/** @typedef {import("./RequestShortener")} RequestShortener */ - -const joinIterableWithComma = iterable => { - // This is more performant than Array.from().join(", ") - // as it doesn't create an array - let str = ""; - let first = true; - for (const item of iterable) { - if (first) { - first = false; - } else { - str += ", "; - } - str += item; - } - return str; -}; - -/** - * @param {ConcatSource} source output - * @param {string} indent spacing - * @param {ExportsInfo} exportsInfo data - * @param {ModuleGraph} moduleGraph moduleGraph - * @param {RequestShortener} requestShortener requestShortener - * @param {Set} alreadyPrinted deduplication set - * @returns {void} - */ -const printExportsInfoToSource = ( - source, - indent, - exportsInfo, - moduleGraph, - requestShortener, - alreadyPrinted = new Set() -) => { - const otherExportsInfo = exportsInfo.otherExportsInfo; - - let alreadyPrintedExports = 0; - - // determine exports to print - const printedExports = []; - for (const exportInfo of exportsInfo.orderedExports) { - if (!alreadyPrinted.has(exportInfo)) { - alreadyPrinted.add(exportInfo); - printedExports.push(exportInfo); - } else { - alreadyPrintedExports++; - } - } - let showOtherExports = false; - if (!alreadyPrinted.has(otherExportsInfo)) { - alreadyPrinted.add(otherExportsInfo); - showOtherExports = true; - } else { - alreadyPrintedExports++; - } - - // print the exports - for (const exportInfo of printedExports) { - const target = exportInfo.getTarget(moduleGraph); - source.add( - Template.toComment( - `${indent}export ${JSON.stringify(exportInfo.name).slice( - 1, - -1 - )} [${exportInfo.getProvidedInfo()}] [${exportInfo.getUsedInfo()}] [${exportInfo.getRenameInfo()}]${ - target - ? ` -> ${target.module.readableIdentifier(requestShortener)}${ - target.export - ? ` .${target.export - .map(e => JSON.stringify(e).slice(1, -1)) - .join(".")}` - : "" - }` - : "" - }` - ) + "\n" - ); - if (exportInfo.exportsInfo) { - printExportsInfoToSource( - source, - indent + " ", - exportInfo.exportsInfo, - moduleGraph, - requestShortener, - alreadyPrinted - ); - } - } - - if (alreadyPrintedExports) { - source.add( - Template.toComment( - `${indent}... (${alreadyPrintedExports} already listed exports)` - ) + "\n" - ); - } - - if (showOtherExports) { - const target = otherExportsInfo.getTarget(moduleGraph); - if ( - target || - otherExportsInfo.provided !== false || - otherExportsInfo.getUsed(undefined) !== UsageState.Unused - ) { - const title = - printedExports.length > 0 || alreadyPrintedExports > 0 - ? "other exports" - : "exports"; - source.add( - Template.toComment( - `${indent}${title} [${otherExportsInfo.getProvidedInfo()}] [${otherExportsInfo.getUsedInfo()}]${ - target - ? ` -> ${target.module.readableIdentifier(requestShortener)}` - : "" - }` - ) + "\n" - ); - } - } -}; - -/** @type {WeakMap }>>} */ -const caches = new WeakMap(); - -class ModuleInfoHeaderPlugin { - /** - * @param {boolean=} verbose add more information like exports, runtime requirements and bailouts - */ - constructor(verbose = true) { - this._verbose = verbose; - } - /** - * @param {Compiler} compiler the compiler - * @returns {void} - */ - apply(compiler) { - const { _verbose: verbose } = this; - compiler.hooks.compilation.tap("ModuleInfoHeaderPlugin", compilation => { - const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); - hooks.renderModulePackage.tap( - "ModuleInfoHeaderPlugin", - ( - moduleSource, - module, - { chunk, chunkGraph, moduleGraph, runtimeTemplate } - ) => { - const { requestShortener } = runtimeTemplate; - let cacheEntry; - let cache = caches.get(requestShortener); - if (cache === undefined) { - caches.set(requestShortener, (cache = new WeakMap())); - cache.set( - module, - (cacheEntry = { header: undefined, full: new WeakMap() }) - ); - } else { - cacheEntry = cache.get(module); - if (cacheEntry === undefined) { - cache.set( - module, - (cacheEntry = { header: undefined, full: new WeakMap() }) - ); - } else if (!verbose) { - const cachedSource = cacheEntry.full.get(moduleSource); - if (cachedSource !== undefined) return cachedSource; - } - } - const source = new ConcatSource(); - let header = cacheEntry.header; - if (header === undefined) { - const req = module.readableIdentifier(requestShortener); - const reqStr = req.replace(/\*\//g, "*_/"); - const reqStrStar = "*".repeat(reqStr.length); - const headerStr = `/*!****${reqStrStar}****!*\\\n !*** ${reqStr} ***!\n \\****${reqStrStar}****/\n`; - header = new RawSource(headerStr); - cacheEntry.header = header; - } - source.add(header); - if (verbose) { - const exportsType = module.buildMeta.exportsType; - source.add( - Template.toComment( - exportsType - ? `${exportsType} exports` - : "unknown exports (runtime-defined)" - ) + "\n" - ); - if (exportsType) { - const exportsInfo = moduleGraph.getExportsInfo(module); - printExportsInfoToSource( - source, - "", - exportsInfo, - moduleGraph, - requestShortener - ); - } - source.add( - Template.toComment( - `runtime requirements: ${joinIterableWithComma( - chunkGraph.getModuleRuntimeRequirements(module, chunk.runtime) - )}` - ) + "\n" - ); - const optimizationBailout = - moduleGraph.getOptimizationBailout(module); - if (optimizationBailout) { - for (const text of optimizationBailout) { - let code; - if (typeof text === "function") { - code = text(requestShortener); - } else { - code = text; - } - source.add(Template.toComment(`${code}`) + "\n"); - } - } - source.add(moduleSource); - return source; - } else { - source.add(moduleSource); - const cachedSource = new CachedSource(source); - cacheEntry.full.set(moduleSource, cachedSource); - return cachedSource; - } - } - ); - hooks.chunkHash.tap("ModuleInfoHeaderPlugin", (chunk, hash) => { - hash.update("ModuleInfoHeaderPlugin"); - hash.update("1"); - }); - }); - } -} -module.exports = ModuleInfoHeaderPlugin; - - -/***/ }), - -/***/ 16554: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -const previouslyPolyfilledBuiltinModules = { - assert: "assert/", - buffer: "buffer/", - console: "console-browserify", - constants: "constants-browserify", - crypto: "crypto-browserify", - domain: "domain-browser", - events: "events/", - http: "stream-http", - https: "https-browserify", - os: "os-browserify/browser", - path: "path-browserify", - punycode: "punycode/", - process: "process/browser", - querystring: "querystring-es3", - stream: "stream-browserify", - _stream_duplex: "readable-stream/duplex", - _stream_passthrough: "readable-stream/passthrough", - _stream_readable: "readable-stream/readable", - _stream_transform: "readable-stream/transform", - _stream_writable: "readable-stream/writable", - string_decoder: "string_decoder/", - sys: "util/", - timers: "timers-browserify", - tty: "tty-browserify", - url: "url/", - util: "util/", - vm: "vm-browserify", - zlib: "browserify-zlib" -}; - -class ModuleNotFoundError extends WebpackError { - /** - * @param {Module} module module tied to dependency - * @param {Error&any} err error thrown - * @param {DependencyLocation} loc location of dependency - */ - constructor(module, err, loc) { - let message = `Module not found: ${err.toString()}`; - - // TODO remove in webpack 6 - const match = err.message.match(/Can't resolve '([^']+)'/); - if (match) { - const request = match[1]; - const alias = previouslyPolyfilledBuiltinModules[request]; - if (alias) { - const pathIndex = alias.indexOf("/"); - const dependency = pathIndex > 0 ? alias.slice(0, pathIndex) : alias; - message += - "\n\n" + - "BREAKING CHANGE: " + - "webpack < 5 used to include polyfills for node.js core modules by default.\n" + - "This is no longer the case. Verify if you need this module and configure a polyfill for it.\n\n"; - message += - "If you want to include a polyfill, you need to:\n" + - `\t- add a fallback 'resolve.fallback: { "${request}": require.resolve("${alias}") }'\n` + - `\t- install '${dependency}'\n`; - message += - "If you don't want to include a polyfill, you can use an empty module like this:\n" + - `\tresolve.fallback: { "${request}": false }`; - } - } - - super(message); - - this.name = "ModuleNotFoundError"; - this.details = err.details; - this.module = module; - this.error = err; - this.loc = loc; - } -} - -module.exports = ModuleNotFoundError; - - -/***/ }), - -/***/ 30417: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -const WASM_HEADER = Buffer.from([0x00, 0x61, 0x73, 0x6d]); - -class ModuleParseError extends WebpackError { - /** - * @param {string | Buffer} source source code - * @param {Error&any} err the parse error - * @param {string[]} loaders the loaders used - * @param {string} type module type - */ - constructor(source, err, loaders, type) { - let message = "Module parse failed: " + (err && err.message); - let loc = undefined; - - if ( - ((Buffer.isBuffer(source) && source.slice(0, 4).equals(WASM_HEADER)) || - (typeof source === "string" && /^\0asm/.test(source))) && - !type.startsWith("webassembly") - ) { - message += - "\nThe module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack."; - message += - "\nBREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature."; - message += - "\nYou need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated)."; - message += - "\nFor files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: \"webassembly/async\"')."; - } else if (!loaders) { - message += - "\nYou may need an appropriate loader to handle this file type."; - } else if (loaders.length >= 1) { - message += `\nFile was processed with these loaders:${loaders - .map(loader => `\n * ${loader}`) - .join("")}`; - message += - "\nYou may need an additional loader to handle the result of these loaders."; - } else { - message += - "\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders"; - } - - if ( - err && - err.loc && - typeof err.loc === "object" && - typeof err.loc.line === "number" - ) { - var lineNumber = err.loc.line; - - if ( - Buffer.isBuffer(source) || - /[\0\u0001\u0002\u0003\u0004\u0005\u0006\u0007]/.test(source) - ) { - // binary file - message += "\n(Source code omitted for this binary file)"; - } else { - const sourceLines = source.split(/\r?\n/); - const start = Math.max(0, lineNumber - 3); - const linesBefore = sourceLines.slice(start, lineNumber - 1); - const theLine = sourceLines[lineNumber - 1]; - const linesAfter = sourceLines.slice(lineNumber, lineNumber + 2); - - message += - linesBefore.map(l => `\n| ${l}`).join("") + - `\n> ${theLine}` + - linesAfter.map(l => `\n| ${l}`).join(""); - } - - loc = { start: err.loc }; - } else if (err && err.stack) { - message += "\n" + err.stack; - } - - super(message); - - this.name = "ModuleParseError"; - this.loc = loc; - this.error = err; - } - - serialize(context) { - const { write } = context; - - write(this.error); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.error = read(); - - super.deserialize(context); - } -} - -makeSerializable(ModuleParseError, "webpack/lib/ModuleParseError"); - -module.exports = ModuleParseError; - - -/***/ }), - -/***/ 4833: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -class ModuleProfile { - constructor() { - this.startTime = Date.now(); - - this.factoryStartTime = 0; - this.factoryEndTime = 0; - this.factory = 0; - this.factoryParallelismFactor = 0; - - this.restoringStartTime = 0; - this.restoringEndTime = 0; - this.restoring = 0; - this.restoringParallelismFactor = 0; - - this.integrationStartTime = 0; - this.integrationEndTime = 0; - this.integration = 0; - this.integrationParallelismFactor = 0; - - this.buildingStartTime = 0; - this.buildingEndTime = 0; - this.building = 0; - this.buildingParallelismFactor = 0; - - this.storingStartTime = 0; - this.storingEndTime = 0; - this.storing = 0; - this.storingParallelismFactor = 0; - - this.additionalFactoryTimes = undefined; - this.additionalFactories = 0; - this.additionalFactoriesParallelismFactor = 0; - - /** @deprecated */ - this.additionalIntegration = 0; - } - - markFactoryStart() { - this.factoryStartTime = Date.now(); - } - - markFactoryEnd() { - this.factoryEndTime = Date.now(); - this.factory = this.factoryEndTime - this.factoryStartTime; - } - - markRestoringStart() { - this.restoringStartTime = Date.now(); - } - - markRestoringEnd() { - this.restoringEndTime = Date.now(); - this.restoring = this.restoringEndTime - this.restoringStartTime; - } - - markIntegrationStart() { - this.integrationStartTime = Date.now(); - } - - markIntegrationEnd() { - this.integrationEndTime = Date.now(); - this.integration = this.integrationEndTime - this.integrationStartTime; - } - - markBuildingStart() { - this.buildingStartTime = Date.now(); - } - - markBuildingEnd() { - this.buildingEndTime = Date.now(); - this.building = this.buildingEndTime - this.buildingStartTime; - } - - markStoringStart() { - this.storingStartTime = Date.now(); - } - - markStoringEnd() { - this.storingEndTime = Date.now(); - this.storing = this.storingEndTime - this.storingStartTime; - } - - // This depends on timing so we ignore it for coverage - /* istanbul ignore next */ - /** - * Merge this profile into another one - * @param {ModuleProfile} realProfile the profile to merge into - * @returns {void} - */ - mergeInto(realProfile) { - realProfile.additionalFactories = this.factory; - (realProfile.additionalFactoryTimes = - realProfile.additionalFactoryTimes || []).push({ - start: this.factoryStartTime, - end: this.factoryEndTime - }); - } -} - -module.exports = ModuleProfile; - - -/***/ }), - -/***/ 14273: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ - -class ModuleRestoreError extends WebpackError { - /** - * @param {Module} module module tied to dependency - * @param {string | Error} err error thrown - */ - constructor(module, err) { - let message = "Module restore failed: "; - let details = undefined; - if (err !== null && typeof err === "object") { - if (typeof err.stack === "string" && err.stack) { - const stack = err.stack; - message += stack; - } else if (typeof err.message === "string" && err.message) { - message += err.message; - } else { - message += err; - } - } else { - message += String(err); - } - - super(message); - - this.name = "ModuleRestoreError"; - this.details = details; - this.module = module; - this.error = err; - } -} - -module.exports = ModuleRestoreError; - - -/***/ }), - -/***/ 73731: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Module")} Module */ - -class ModuleStoreError extends WebpackError { - /** - * @param {Module} module module tied to dependency - * @param {string | Error} err error thrown - */ - constructor(module, err) { - let message = "Module storing failed: "; - let details = undefined; - if (err !== null && typeof err === "object") { - if (typeof err.stack === "string" && err.stack) { - const stack = err.stack; - message += stack; - } else if (typeof err.message === "string" && err.message) { - message += err.message; - } else { - message += err; - } - } else { - message += String(err); - } - - super(message); - - this.name = "ModuleStoreError"; - this.details = details; - this.module = module; - this.error = err; - } -} - -module.exports = ModuleStoreError; - - -/***/ }), - -/***/ 88367: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./util/Hash")} Hash */ - -const getJavascriptModulesPlugin = memoize(() => - __webpack_require__(36109) -); - -// TODO webpack 6: remove this class -class ModuleTemplate { - /** - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {Compilation} compilation the compilation - */ - constructor(runtimeTemplate, compilation) { - this._runtimeTemplate = runtimeTemplate; - this.type = "javascript"; - this.hooks = Object.freeze({ - content: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderModuleContent.tap( - options, - (source, module, renderContext) => - fn( - source, - module, - renderContext, - renderContext.dependencyTemplates - ) - ); - }, - "ModuleTemplate.hooks.content is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)", - "DEP_MODULE_TEMPLATE_CONTENT" - ) - }, - module: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderModuleContent.tap( - options, - (source, module, renderContext) => - fn( - source, - module, - renderContext, - renderContext.dependencyTemplates - ) - ); - }, - "ModuleTemplate.hooks.module is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)", - "DEP_MODULE_TEMPLATE_MODULE" - ) - }, - render: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderModuleContainer.tap( - options, - (source, module, renderContext) => - fn( - source, - module, - renderContext, - renderContext.dependencyTemplates - ) - ); - }, - "ModuleTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer instead)", - "DEP_MODULE_TEMPLATE_RENDER" - ) - }, - package: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderModulePackage.tap( - options, - (source, module, renderContext) => - fn( - source, - module, - renderContext, - renderContext.dependencyTemplates - ) - ); - }, - "ModuleTemplate.hooks.package is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModulePackage instead)", - "DEP_MODULE_TEMPLATE_PACKAGE" - ) - }, - hash: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.fullHash.tap(options, fn); - }, - "ModuleTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", - "DEP_MODULE_TEMPLATE_HASH" - ) - } - }); - } -} - -Object.defineProperty(ModuleTemplate.prototype, "runtimeTemplate", { - get: util.deprecate( - /** - * @this {ModuleTemplate} - * @returns {TODO} output options - */ - function () { - return this._runtimeTemplate; - }, - "ModuleTemplate.runtimeTemplate is deprecated (use Compilation.runtimeTemplate instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" - ) -}); - -module.exports = ModuleTemplate; - - -/***/ }), - -/***/ 49537: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { cleanUp } = __webpack_require__(8821); -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -class ModuleWarning extends WebpackError { - /** - * @param {Error} warning error thrown - * @param {{from?: string|null}} info additional info - */ - constructor(warning, { from = null } = {}) { - let message = "Module Warning"; - - if (from) { - message += ` (from ${from}):\n`; - } else { - message += ": "; - } - - if (warning && typeof warning === "object" && warning.message) { - message += warning.message; - } else if (warning) { - message += String(warning); - } - - super(message); - - this.name = "ModuleWarning"; - this.warning = warning; - this.details = - warning && typeof warning === "object" && warning.stack - ? cleanUp(warning.stack, this.message) - : undefined; - } - - serialize(context) { - const { write } = context; - - write(this.warning); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.warning = read(); - - super.deserialize(context); - } -} - -makeSerializable(ModuleWarning, "webpack/lib/ModuleWarning"); - -module.exports = ModuleWarning; - - -/***/ }), - -/***/ 39601: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const { SyncHook, MultiHook } = __webpack_require__(44217); - -const ConcurrentCompilationError = __webpack_require__(56275); -const MultiStats = __webpack_require__(15716); -const MultiWatching = __webpack_require__(25995); -const ArrayQueue = __webpack_require__(52074); - -/** @template T @typedef {import("tapable").AsyncSeriesHook} AsyncSeriesHook */ -/** @template T @template R @typedef {import("tapable").SyncBailHook} SyncBailHook */ -/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Stats")} Stats */ -/** @typedef {import("./Watching")} Watching */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */ -/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ -/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */ - -/** - * @template T - * @callback Callback - * @param {(Error | null)=} err - * @param {T=} result - */ - -/** - * @callback RunWithDependenciesHandler - * @param {Compiler} compiler - * @param {Callback} callback - */ - -/** - * @typedef {Object} MultiCompilerOptions - * @property {number=} parallelism how many Compilers are allows to run at the same time in parallel - */ - -module.exports = class MultiCompiler { - /** - * @param {Compiler[] | Record} compilers child compilers - * @param {MultiCompilerOptions} options options - */ - constructor(compilers, options) { - if (!Array.isArray(compilers)) { - compilers = Object.keys(compilers).map(name => { - compilers[name].name = name; - return compilers[name]; - }); - } - - this.hooks = Object.freeze({ - /** @type {SyncHook<[MultiStats]>} */ - done: new SyncHook(["stats"]), - /** @type {MultiHook>} */ - invalid: new MultiHook(compilers.map(c => c.hooks.invalid)), - /** @type {MultiHook>} */ - run: new MultiHook(compilers.map(c => c.hooks.run)), - /** @type {SyncHook<[]>} */ - watchClose: new SyncHook([]), - /** @type {MultiHook>} */ - watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun)), - /** @type {MultiHook>} */ - infrastructureLog: new MultiHook( - compilers.map(c => c.hooks.infrastructureLog) - ) - }); - this.compilers = compilers; - /** @type {MultiCompilerOptions} */ - this._options = { - parallelism: options.parallelism || Infinity - }; - /** @type {WeakMap} */ - this.dependencies = new WeakMap(); - this.running = false; - - /** @type {Stats[]} */ - const compilerStats = this.compilers.map(() => null); - let doneCompilers = 0; - for (let index = 0; index < this.compilers.length; index++) { - const compiler = this.compilers[index]; - const compilerIndex = index; - let compilerDone = false; - compiler.hooks.done.tap("MultiCompiler", stats => { - if (!compilerDone) { - compilerDone = true; - doneCompilers++; - } - compilerStats[compilerIndex] = stats; - if (doneCompilers === this.compilers.length) { - this.hooks.done.call(new MultiStats(compilerStats)); - } - }); - compiler.hooks.invalid.tap("MultiCompiler", () => { - if (compilerDone) { - compilerDone = false; - doneCompilers--; - } - }); - } - } - - get options() { - return Object.assign( - this.compilers.map(c => c.options), - this._options - ); - } - - get outputPath() { - let commonPath = this.compilers[0].outputPath; - for (const compiler of this.compilers) { - while ( - compiler.outputPath.indexOf(commonPath) !== 0 && - /[/\\]/.test(commonPath) - ) { - commonPath = commonPath.replace(/[/\\][^/\\]*$/, ""); - } - } - - if (!commonPath && this.compilers[0].outputPath[0] === "/") return "/"; - return commonPath; - } - - get inputFileSystem() { - throw new Error("Cannot read inputFileSystem of a MultiCompiler"); - } - - get outputFileSystem() { - throw new Error("Cannot read outputFileSystem of a MultiCompiler"); - } - - get watchFileSystem() { - throw new Error("Cannot read watchFileSystem of a MultiCompiler"); - } - - get intermediateFileSystem() { - throw new Error("Cannot read outputFileSystem of a MultiCompiler"); - } - - /** - * @param {InputFileSystem} value the new input file system - */ - set inputFileSystem(value) { - for (const compiler of this.compilers) { - compiler.inputFileSystem = value; - } - } - - /** - * @param {OutputFileSystem} value the new output file system - */ - set outputFileSystem(value) { - for (const compiler of this.compilers) { - compiler.outputFileSystem = value; - } - } - - /** - * @param {WatchFileSystem} value the new watch file system - */ - set watchFileSystem(value) { - for (const compiler of this.compilers) { - compiler.watchFileSystem = value; - } - } - - /** - * @param {IntermediateFileSystem} value the new intermediate file system - */ - set intermediateFileSystem(value) { - for (const compiler of this.compilers) { - compiler.intermediateFileSystem = value; - } - } - - getInfrastructureLogger(name) { - return this.compilers[0].getInfrastructureLogger(name); - } - - /** - * @param {Compiler} compiler the child compiler - * @param {string[]} dependencies its dependencies - * @returns {void} - */ - setDependencies(compiler, dependencies) { - this.dependencies.set(compiler, dependencies); - } - - /** - * @param {Callback} callback signals when the validation is complete - * @returns {boolean} true if the dependencies are valid - */ - validateDependencies(callback) { - /** @type {Set<{source: Compiler, target: Compiler}>} */ - const edges = new Set(); - /** @type {string[]} */ - const missing = []; - const targetFound = compiler => { - for (const edge of edges) { - if (edge.target === compiler) { - return true; - } - } - return false; - }; - const sortEdges = (e1, e2) => { - return ( - e1.source.name.localeCompare(e2.source.name) || - e1.target.name.localeCompare(e2.target.name) - ); - }; - for (const source of this.compilers) { - const dependencies = this.dependencies.get(source); - if (dependencies) { - for (const dep of dependencies) { - const target = this.compilers.find(c => c.name === dep); - if (!target) { - missing.push(dep); - } else { - edges.add({ - source, - target - }); - } - } - } - } - /** @type {string[]} */ - const errors = missing.map(m => `Compiler dependency \`${m}\` not found.`); - const stack = this.compilers.filter(c => !targetFound(c)); - while (stack.length > 0) { - const current = stack.pop(); - for (const edge of edges) { - if (edge.source === current) { - edges.delete(edge); - const target = edge.target; - if (!targetFound(target)) { - stack.push(target); - } - } - } - } - if (edges.size > 0) { - /** @type {string[]} */ - const lines = Array.from(edges) - .sort(sortEdges) - .map(edge => `${edge.source.name} -> ${edge.target.name}`); - lines.unshift("Circular dependency found in compiler dependencies."); - errors.unshift(lines.join("\n")); - } - if (errors.length > 0) { - const message = errors.join("\n"); - callback(new Error(message)); - return false; - } - return true; - } - - // TODO webpack 6 remove - /** - * @deprecated This method should have been private - * @param {Compiler[]} compilers the child compilers - * @param {RunWithDependenciesHandler} fn a handler to run for each compiler - * @param {Callback} callback the compiler's handler - * @returns {void} - */ - runWithDependencies(compilers, fn, callback) { - const fulfilledNames = new Set(); - let remainingCompilers = compilers; - const isDependencyFulfilled = d => fulfilledNames.has(d); - const getReadyCompilers = () => { - let readyCompilers = []; - let list = remainingCompilers; - remainingCompilers = []; - for (const c of list) { - const dependencies = this.dependencies.get(c); - const ready = - !dependencies || dependencies.every(isDependencyFulfilled); - if (ready) { - readyCompilers.push(c); - } else { - remainingCompilers.push(c); - } - } - return readyCompilers; - }; - const runCompilers = callback => { - if (remainingCompilers.length === 0) return callback(); - asyncLib.map( - getReadyCompilers(), - (compiler, callback) => { - fn(compiler, err => { - if (err) return callback(err); - fulfilledNames.add(compiler.name); - runCompilers(callback); - }); - }, - callback - ); - }; - runCompilers(callback); - } - - /** - * @template SetupResult - * @param {function(Compiler, number, Callback, function(): boolean, function(): void, function(): void): SetupResult} setup setup a single compiler - * @param {function(Compiler, SetupResult, Callback): void} run run/continue a single compiler - * @param {Callback} callback callback when all compilers are done, result includes Stats of all changed compilers - * @returns {SetupResult[]} result of setup - */ - _runGraph(setup, run, callback) { - /** @typedef {{ compiler: Compiler, setupResult: SetupResult, result: Stats, state: "pending" | "blocked" | "queued" | "starting" | "running" | "running-outdated" | "done", children: Node[], parents: Node[] }} Node */ - - // State transitions for nodes: - // -> blocked (initial) - // blocked -> starting [running++] (when all parents done) - // queued -> starting [running++] (when processing the queue) - // starting -> running (when run has been called) - // running -> done [running--] (when compilation is done) - // done -> pending (when invalidated from file change) - // pending -> blocked [add to queue] (when invalidated from aggregated changes) - // done -> blocked [add to queue] (when invalidated, from parent invalidation) - // running -> running-outdated (when invalidated, either from change or parent invalidation) - // running-outdated -> blocked [running--] (when compilation is done) - - /** @type {Node[]} */ - const nodes = this.compilers.map(compiler => ({ - compiler, - setupResult: undefined, - result: undefined, - state: "blocked", - children: [], - parents: [] - })); - /** @type {Map} */ - const compilerToNode = new Map(); - for (const node of nodes) compilerToNode.set(node.compiler.name, node); - for (const node of nodes) { - const dependencies = this.dependencies.get(node.compiler); - if (!dependencies) continue; - for (const dep of dependencies) { - const parent = compilerToNode.get(dep); - node.parents.push(parent); - parent.children.push(node); - } - } - /** @type {ArrayQueue} */ - const queue = new ArrayQueue(); - for (const node of nodes) { - if (node.parents.length === 0) { - node.state = "queued"; - queue.enqueue(node); - } - } - let errored = false; - let running = 0; - const parallelism = this._options.parallelism; - /** - * @param {Node} node node - * @param {Error=} err error - * @param {Stats=} stats result - * @returns {void} - */ - const nodeDone = (node, err, stats) => { - if (errored) return; - if (err) { - errored = true; - return asyncLib.each( - nodes, - (node, callback) => { - if (node.compiler.watching) { - node.compiler.watching.close(callback); - } else { - callback(); - } - }, - () => callback(err) - ); - } - node.result = stats; - running--; - if (node.state === "running") { - node.state = "done"; - for (const child of node.children) { - if (child.state === "blocked") queue.enqueue(child); - } - } else if (node.state === "running-outdated") { - node.state = "blocked"; - queue.enqueue(node); - } - processQueue(); - }; - /** - * @param {Node} node node - * @returns {void} - */ - const nodeInvalidFromParent = node => { - if (node.state === "done") { - node.state = "blocked"; - } else if (node.state === "running") { - node.state = "running-outdated"; - } - for (const child of node.children) { - nodeInvalidFromParent(child); - } - }; - /** - * @param {Node} node node - * @returns {void} - */ - const nodeInvalid = node => { - if (node.state === "done") { - node.state = "pending"; - } else if (node.state === "running") { - node.state = "running-outdated"; - } - for (const child of node.children) { - nodeInvalidFromParent(child); - } - }; - /** - * @param {Node} node node - * @returns {void} - */ - const nodeChange = node => { - nodeInvalid(node); - if (node.state === "pending") { - node.state = "blocked"; - } - if (node.state === "blocked") { - queue.enqueue(node); - processQueue(); - } - }; - - const setupResults = []; - nodes.forEach((node, i) => { - setupResults.push( - (node.setupResult = setup( - node.compiler, - i, - nodeDone.bind(null, node), - () => node.state !== "starting" && node.state !== "running", - () => nodeChange(node), - () => nodeInvalid(node) - )) - ); - }); - let processing = true; - const processQueue = () => { - if (processing) return; - processing = true; - process.nextTick(processQueueWorker); - }; - const processQueueWorker = () => { - while (running < parallelism && queue.length > 0 && !errored) { - const node = queue.dequeue(); - if ( - node.state === "queued" || - (node.state === "blocked" && - node.parents.every(p => p.state === "done")) - ) { - running++; - node.state = "starting"; - run(node.compiler, node.setupResult, nodeDone.bind(null, node)); - node.state = "running"; - } - } - processing = false; - if ( - !errored && - running === 0 && - nodes.every(node => node.state === "done") - ) { - const stats = []; - for (const node of nodes) { - const result = node.result; - if (result) { - node.result = undefined; - stats.push(result); - } - } - if (stats.length > 0) { - callback(null, new MultiStats(stats)); - } - } - }; - processQueueWorker(); - return setupResults; - } - - /** - * @param {WatchOptions|WatchOptions[]} watchOptions the watcher's options - * @param {Callback} handler signals when the call finishes - * @returns {MultiWatching} a compiler watcher - */ - watch(watchOptions, handler) { - if (this.running) { - return handler(new ConcurrentCompilationError()); - } - this.running = true; - - if (this.validateDependencies(handler)) { - const watchings = this._runGraph( - (compiler, idx, callback, isBlocked, setChanged, setInvalid) => { - const watching = compiler.watch( - Array.isArray(watchOptions) ? watchOptions[idx] : watchOptions, - callback - ); - if (watching) { - watching._onInvalid = setInvalid; - watching._onChange = setChanged; - watching._isBlocked = isBlocked; - } - return watching; - }, - (compiler, watching, callback) => { - if (compiler.watching !== watching) return; - if (!watching.running) watching.invalidate(); - }, - handler - ); - return new MultiWatching(watchings, this); - } - - return new MultiWatching([], this); - } - - /** - * @param {Callback} callback signals when the call finishes - * @returns {void} - */ - run(callback) { - if (this.running) { - return callback(new ConcurrentCompilationError()); - } - this.running = true; - - if (this.validateDependencies(callback)) { - this._runGraph( - () => {}, - (compiler, setupResult, callback) => compiler.run(callback), - (err, stats) => { - this.running = false; - - if (callback !== undefined) { - return callback(err, stats); - } - } - ); - } - } - - purgeInputFileSystem() { - for (const compiler of this.compilers) { - if (compiler.inputFileSystem && compiler.inputFileSystem.purge) { - compiler.inputFileSystem.purge(); - } - } - } - - /** - * @param {Callback} callback signals when the compiler closes - * @returns {void} - */ - close(callback) { - asyncLib.each( - this.compilers, - (compiler, callback) => { - compiler.close(callback); - }, - callback - ); - } -}; - - -/***/ }), - -/***/ 15716: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const identifierUtils = __webpack_require__(20162); - -/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ -/** @typedef {import("./Stats")} Stats */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").KnownStatsCompilation} KnownStatsCompilation */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsCompilation} StatsCompilation */ - -const indent = (str, prefix) => { - const rem = str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); - return prefix + rem; -}; - -class MultiStats { - /** - * @param {Stats[]} stats the child stats - */ - constructor(stats) { - this.stats = stats; - } - - get hash() { - return this.stats.map(stat => stat.hash).join(""); - } - - /** - * @returns {boolean} true if a child compilation encountered an error - */ - hasErrors() { - return this.stats.some(stat => stat.hasErrors()); - } - - /** - * @returns {boolean} true if a child compilation had a warning - */ - hasWarnings() { - return this.stats.some(stat => stat.hasWarnings()); - } - - _createChildOptions(options, context) { - if (!options) { - options = {}; - } - const { children: childrenOptions = undefined, ...baseOptions } = - typeof options === "string" ? { preset: options } : options; - const children = this.stats.map((stat, idx) => { - const childOptions = Array.isArray(childrenOptions) - ? childrenOptions[idx] - : childrenOptions; - return stat.compilation.createStatsOptions( - { - ...baseOptions, - ...(typeof childOptions === "string" - ? { preset: childOptions } - : childOptions && typeof childOptions === "object" - ? childOptions - : undefined) - }, - context - ); - }); - return { - version: children.every(o => o.version), - hash: children.every(o => o.hash), - errorsCount: children.every(o => o.errorsCount), - warningsCount: children.every(o => o.warningsCount), - errors: children.every(o => o.errors), - warnings: children.every(o => o.warnings), - children - }; - } - - /** - * @param {any} options stats options - * @returns {StatsCompilation} json output - */ - toJson(options) { - options = this._createChildOptions(options, { forToString: false }); - /** @type {KnownStatsCompilation} */ - const obj = {}; - obj.children = this.stats.map((stat, idx) => { - const obj = stat.toJson(options.children[idx]); - const compilationName = stat.compilation.name; - const name = - compilationName && - identifierUtils.makePathsRelative( - options.context, - compilationName, - stat.compilation.compiler.root - ); - obj.name = name; - return obj; - }); - if (options.version) { - obj.version = obj.children[0].version; - } - if (options.hash) { - obj.hash = obj.children.map(j => j.hash).join(""); - } - const mapError = (j, obj) => { - return { - ...obj, - compilerPath: obj.compilerPath - ? `${j.name}.${obj.compilerPath}` - : j.name - }; - }; - if (options.errors) { - obj.errors = []; - for (const j of obj.children) { - for (const i of j.errors) { - obj.errors.push(mapError(j, i)); - } - } - } - if (options.warnings) { - obj.warnings = []; - for (const j of obj.children) { - for (const i of j.warnings) { - obj.warnings.push(mapError(j, i)); - } - } - } - if (options.errorsCount) { - obj.errorsCount = 0; - for (const j of obj.children) { - obj.errorsCount += j.errorsCount; - } - } - if (options.warningsCount) { - obj.warningsCount = 0; - for (const j of obj.children) { - obj.warningsCount += j.warningsCount; - } - } - return obj; - } - - toString(options) { - options = this._createChildOptions(options, { forToString: true }); - const results = this.stats.map((stat, idx) => { - const str = stat.toString(options.children[idx]); - const compilationName = stat.compilation.name; - const name = - compilationName && - identifierUtils - .makePathsRelative( - options.context, - compilationName, - stat.compilation.compiler.root - ) - .replace(/\|/g, " "); - if (!str) return str; - return name ? `${name}:\n${indent(str, " ")}` : str; - }); - return results.filter(Boolean).join("\n\n"); - } -} - -module.exports = MultiStats; - - -/***/ }), - -/***/ 25995: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); - -/** @typedef {import("./MultiCompiler")} MultiCompiler */ -/** @typedef {import("./Watching")} Watching */ - -/** - * @template T - * @callback Callback - * @param {(Error | null)=} err - * @param {T=} result - */ - -class MultiWatching { - /** - * @param {Watching[]} watchings child compilers' watchers - * @param {MultiCompiler} compiler the compiler - */ - constructor(watchings, compiler) { - this.watchings = watchings; - this.compiler = compiler; - } - - invalidate(callback) { - if (callback) { - asyncLib.each( - this.watchings, - (watching, callback) => watching.invalidate(callback), - callback - ); - } else { - for (const watching of this.watchings) { - watching.invalidate(); - } - } - } - - suspend() { - for (const watching of this.watchings) { - watching.suspend(); - } - } - - resume() { - for (const watching of this.watchings) { - watching.resume(); - } - } - - /** - * @param {Callback} callback signals when the watcher is closed - * @returns {void} - */ - close(callback) { - asyncLib.forEach( - this.watchings, - (watching, finishedCallback) => { - watching.close(finishedCallback); - }, - err => { - this.compiler.hooks.watchClose.call(); - if (typeof callback === "function") { - this.compiler.running = false; - callback(err); - } - } - ); - } -} - -module.exports = MultiWatching; - - -/***/ }), - -/***/ 424: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Compiler")} Compiler */ - -class NoEmitOnErrorsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin", compilation => { - if (compilation.getStats().hasErrors()) return false; - }); - compiler.hooks.compilation.tap("NoEmitOnErrorsPlugin", compilation => { - compilation.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin", () => { - if (compilation.getStats().hasErrors()) return false; - }); - }); - } -} - -module.exports = NoEmitOnErrorsPlugin; - - -/***/ }), - -/***/ 95656: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -module.exports = class NoModeWarning extends WebpackError { - constructor() { - super(); - - this.name = "NoModeWarning"; - this.message = - "configuration\n" + - "The 'mode' option has not been set, webpack will fallback to 'production' for this value.\n" + - "Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n" + - "You can also set it to 'none' to disable any default behavior. " + - "Learn more: https://webpack.js.org/configuration/mode/"; - } -}; - - -/***/ }), - -/***/ 75199: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ - -class NodeStuffInWebError extends WebpackError { - /** - * @param {DependencyLocation} loc loc - * @param {string} expression expression - * @param {string} description description - */ - constructor(loc, expression, description) { - super( - `${JSON.stringify( - expression - )} has been used, it will be undefined in next major version. -${description}` - ); - - this.name = "NodeStuffInWebError"; - this.loc = loc; - } -} - -makeSerializable(NodeStuffInWebError, "webpack/lib/NodeStuffInWebError"); - -module.exports = NodeStuffInWebError; - - -/***/ }), - -/***/ 17336: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NodeStuffInWebError = __webpack_require__(75199); -const RuntimeGlobals = __webpack_require__(39201); -const CachedConstDependency = __webpack_require__(83106); -const ConstDependency = __webpack_require__(14367); -const { - evaluateToString, - expressionIsUnsupported -} = __webpack_require__(97574); -const { relative } = __webpack_require__(47077); -const { parseResource } = __webpack_require__(20162); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ - -class NodeStuffPlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap( - "NodeStuffPlugin", - (compilation, { normalModuleFactory }) => { - const handler = (parser, parserOptions) => { - if (parserOptions.node === false) return; - - let localOptions = options; - if (parserOptions.node) { - localOptions = { ...localOptions, ...parserOptions.node }; - } - - if (localOptions.global !== false) { - const withWarning = localOptions.global === "warn"; - parser.hooks.expression - .for("global") - .tap("NodeStuffPlugin", expr => { - const dep = new ConstDependency( - RuntimeGlobals.global, - expr.range, - [RuntimeGlobals.global] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - - // TODO webpack 6 remove - if (withWarning) { - parser.state.module.addWarning( - new NodeStuffInWebError( - dep.loc, - "global", - "The global namespace object is a Node.js feature and isn't available in browsers." - ) - ); - } - }); - parser.hooks.rename.for("global").tap("NodeStuffPlugin", expr => { - const dep = new ConstDependency( - RuntimeGlobals.global, - expr.range, - [RuntimeGlobals.global] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return false; - }); - } - - const setModuleConstant = (expressionName, fn, warning) => { - parser.hooks.expression - .for(expressionName) - .tap("NodeStuffPlugin", expr => { - const dep = new CachedConstDependency( - JSON.stringify(fn(parser.state.module)), - expr.range, - expressionName - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - - // TODO webpack 6 remove - if (warning) { - parser.state.module.addWarning( - new NodeStuffInWebError(dep.loc, expressionName, warning) - ); - } - - return true; - }); - }; - - const setConstant = (expressionName, value, warning) => - setModuleConstant(expressionName, () => value, warning); - - const context = compiler.context; - if (localOptions.__filename) { - switch (localOptions.__filename) { - case "mock": - setConstant("__filename", "/index.js"); - break; - case "warn-mock": - setConstant( - "__filename", - "/index.js", - "__filename is a Node.js feature and isn't available in browsers." - ); - break; - case true: - setModuleConstant("__filename", module => - relative(compiler.inputFileSystem, context, module.resource) - ); - break; - } - - parser.hooks.evaluateIdentifier - .for("__filename") - .tap("NodeStuffPlugin", expr => { - if (!parser.state.module) return; - const resource = parseResource(parser.state.module.resource); - return evaluateToString(resource.path)(expr); - }); - } - if (localOptions.__dirname) { - switch (localOptions.__dirname) { - case "mock": - setConstant("__dirname", "/"); - break; - case "warn-mock": - setConstant( - "__dirname", - "/", - "__dirname is a Node.js feature and isn't available in browsers." - ); - break; - case true: - setModuleConstant("__dirname", module => - relative(compiler.inputFileSystem, context, module.context) - ); - break; - } - - parser.hooks.evaluateIdentifier - .for("__dirname") - .tap("NodeStuffPlugin", expr => { - if (!parser.state.module) return; - return evaluateToString(parser.state.module.context)(expr); - }); - } - parser.hooks.expression - .for("require.extensions") - .tap( - "NodeStuffPlugin", - expressionIsUnsupported( - parser, - "require.extensions is not supported by webpack. Use a loader instead." - ) - ); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("NodeStuffPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("NodeStuffPlugin", handler); - } - ); - } -} - -module.exports = NodeStuffPlugin; - - -/***/ }), - -/***/ 89417: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const parseJson = __webpack_require__(85685); -const { getContext, runLoaders } = __webpack_require__(91256); -const querystring = __webpack_require__(63477); -const { HookMap, SyncHook, AsyncSeriesBailHook } = __webpack_require__(44217); -const { - CachedSource, - OriginalSource, - RawSource, - SourceMapSource -} = __webpack_require__(51255); -const Compilation = __webpack_require__(73002); -const HookWebpackError = __webpack_require__(35230); -const Module = __webpack_require__(53840); -const ModuleBuildError = __webpack_require__(12530); -const ModuleError = __webpack_require__(74938); -const ModuleGraphConnection = __webpack_require__(82921); -const ModuleParseError = __webpack_require__(30417); -const ModuleWarning = __webpack_require__(49537); -const RuntimeGlobals = __webpack_require__(39201); -const UnhandledSchemeError = __webpack_require__(69898); -const WebpackError = __webpack_require__(27154); -const formatLocation = __webpack_require__(24014); -const LazySet = __webpack_require__(96522); -const { isSubset } = __webpack_require__(73268); -const { getScheme } = __webpack_require__(99716); -const { - compareLocations, - concatComparators, - compareSelect, - keepOriginalOrder -} = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const { createFakeHook } = __webpack_require__(99321); -const { join } = __webpack_require__(47077); -const { - contextify, - absolutify, - makePathsRelative -} = __webpack_require__(20162); -const makeSerializable = __webpack_require__(65764); -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/LoaderContext").NormalModuleLoaderContext} NormalModuleLoaderContext */ -/** @typedef {import("../declarations/WebpackOptions").Mode} Mode */ -/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Generator")} Generator */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ -/** @typedef {import("./Parser")} Parser */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./logging/Logger").Logger} WebpackLogger */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} SourceMap - * @property {number} version - * @property {string[]} sources - * @property {string} mappings - * @property {string=} file - * @property {string=} sourceRoot - * @property {string[]=} sourcesContent - * @property {string[]=} names - */ - -const getInvalidDependenciesModuleWarning = memoize(() => - __webpack_require__(7787) -); -const getValidate = memoize(() => (__webpack_require__(38476).validate)); - -const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/; - -/** - * @typedef {Object} LoaderItem - * @property {string} loader - * @property {any} options - * @property {string?} ident - * @property {string?} type - */ - -/** - * @param {string} context absolute context path - * @param {string} source a source path - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} new source path - */ -const contextifySourceUrl = (context, source, associatedObjectForCache) => { - if (source.startsWith("webpack://")) return source; - return `webpack://${makePathsRelative( - context, - source, - associatedObjectForCache - )}`; -}; - -/** - * @param {string} context absolute context path - * @param {SourceMap} sourceMap a source map - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {SourceMap} new source map - */ -const contextifySourceMap = (context, sourceMap, associatedObjectForCache) => { - if (!Array.isArray(sourceMap.sources)) return sourceMap; - const { sourceRoot } = sourceMap; - /** @type {function(string): string} */ - const mapper = !sourceRoot - ? source => source - : sourceRoot.endsWith("/") - ? source => - source.startsWith("/") - ? `${sourceRoot.slice(0, -1)}${source}` - : `${sourceRoot}${source}` - : source => - source.startsWith("/") - ? `${sourceRoot}${source}` - : `${sourceRoot}/${source}`; - const newSources = sourceMap.sources.map(source => - contextifySourceUrl(context, mapper(source), associatedObjectForCache) - ); - return { - ...sourceMap, - file: "x", - sourceRoot: undefined, - sources: newSources - }; -}; - -/** - * @param {string | Buffer} input the input - * @returns {string} the converted string - */ -const asString = input => { - if (Buffer.isBuffer(input)) { - return input.toString("utf-8"); - } - return input; -}; - -/** - * @param {string | Buffer} input the input - * @returns {Buffer} the converted buffer - */ -const asBuffer = input => { - if (!Buffer.isBuffer(input)) { - return Buffer.from(input, "utf-8"); - } - return input; -}; - -class NonErrorEmittedError extends WebpackError { - constructor(error) { - super(); - - this.name = "NonErrorEmittedError"; - this.message = "(Emitted value instead of an instance of Error) " + error; - } -} - -makeSerializable( - NonErrorEmittedError, - "webpack/lib/NormalModule", - "NonErrorEmittedError" -); - -/** - * @typedef {Object} NormalModuleCompilationHooks - * @property {SyncHook<[object, NormalModule]>} loader - * @property {SyncHook<[LoaderItem[], NormalModule, object]>} beforeLoaders - * @property {SyncHook<[NormalModule]>} beforeParse - * @property {SyncHook<[NormalModule]>} beforeSnapshot - * @property {HookMap>} readResourceForScheme - * @property {HookMap>} readResource - * @property {AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>} needBuild - */ - -/** - * @typedef {Object} NormalModuleCreateData - * @property {string=} layer an optional layer in which the module is - * @property {string} type module type - * @property {string} request request string - * @property {string} userRequest request intended by user (without loaders from config) - * @property {string} rawRequest request without resolving - * @property {LoaderItem[]} loaders list of loaders - * @property {string} resource path + query of the real resource - * @property {Record=} resourceResolveData resource resolve data - * @property {string} context context directory for resolving - * @property {string=} matchResource path + query of the matched resource (virtual) - * @property {Parser} parser the parser used - * @property {Record=} parserOptions the options of the parser used - * @property {Generator} generator the generator used - * @property {Record=} generatorOptions the options of the generator used - * @property {ResolveOptions=} resolveOptions options used for resolving requests from this module - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class NormalModule extends Module { - /** - * @param {Compilation} compilation the compilation - * @returns {NormalModuleCompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - loader: new SyncHook(["loaderContext", "module"]), - beforeLoaders: new SyncHook(["loaders", "module", "loaderContext"]), - beforeParse: new SyncHook(["module"]), - beforeSnapshot: new SyncHook(["module"]), - // TODO webpack 6 deprecate - readResourceForScheme: new HookMap(scheme => { - const hook = hooks.readResource.for(scheme); - return createFakeHook( - /** @type {AsyncSeriesBailHook<[string, NormalModule], string | Buffer>} */ ({ - tap: (options, fn) => - hook.tap(options, loaderContext => - fn(loaderContext.resource, loaderContext._module) - ), - tapAsync: (options, fn) => - hook.tapAsync(options, (loaderContext, callback) => - fn(loaderContext.resource, loaderContext._module, callback) - ), - tapPromise: (options, fn) => - hook.tapPromise(options, loaderContext => - fn(loaderContext.resource, loaderContext._module) - ) - }) - ); - }), - readResource: new HookMap( - () => new AsyncSeriesBailHook(["loaderContext"]) - ), - needBuild: new AsyncSeriesBailHook(["module", "context"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - /** - * @param {NormalModuleCreateData} options options object - */ - constructor({ - layer, - type, - request, - userRequest, - rawRequest, - loaders, - resource, - resourceResolveData, - context, - matchResource, - parser, - parserOptions, - generator, - generatorOptions, - resolveOptions - }) { - super(type, context || getContext(resource), layer); - - // Info from Factory - /** @type {string} */ - this.request = request; - /** @type {string} */ - this.userRequest = userRequest; - /** @type {string} */ - this.rawRequest = rawRequest; - /** @type {boolean} */ - this.binary = /^(asset|webassembly)\b/.test(type); - /** @type {Parser} */ - this.parser = parser; - this.parserOptions = parserOptions; - /** @type {Generator} */ - this.generator = generator; - this.generatorOptions = generatorOptions; - /** @type {string} */ - this.resource = resource; - this.resourceResolveData = resourceResolveData; - /** @type {string | undefined} */ - this.matchResource = matchResource; - /** @type {LoaderItem[]} */ - this.loaders = loaders; - if (resolveOptions !== undefined) { - // already declared in super class - this.resolveOptions = resolveOptions; - } - - // Info from Build - /** @type {(WebpackError | null)=} */ - this.error = null; - /** @private @type {Source=} */ - this._source = null; - /** @private @type {Map | undefined} **/ - this._sourceSizes = undefined; - /** @private @type {Set} */ - this._sourceTypes = undefined; - - // Cache - this._lastSuccessfulBuildMeta = {}; - this._forceBuild = true; - this._isEvaluatingSideEffects = false; - /** @type {WeakSet | undefined} */ - this._addedSideEffectsBailout = undefined; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - if (this.layer === null) { - if (this.type === "javascript/auto") { - return this.request; - } else { - return `${this.type}|${this.request}`; - } - } else { - return `${this.type}|${this.request}|${this.layer}`; - } - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return requestShortener.shorten(this.userRequest); - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - let ident = contextify( - options.context, - this.userRequest, - options.associatedObjectForCache - ); - if (this.layer) ident = `(${this.layer})/${ident}`; - return ident; - } - - /** - * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) - */ - nameForCondition() { - const resource = this.matchResource || this.resource; - const idx = resource.indexOf("?"); - if (idx >= 0) return resource.slice(0, idx); - return resource; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - super.updateCacheModule(module); - const m = /** @type {NormalModule} */ (module); - this.binary = m.binary; - this.request = m.request; - this.userRequest = m.userRequest; - this.rawRequest = m.rawRequest; - this.parser = m.parser; - this.parserOptions = m.parserOptions; - this.generator = m.generator; - this.generatorOptions = m.generatorOptions; - this.resource = m.resource; - this.resourceResolveData = m.resourceResolveData; - this.context = m.context; - this.matchResource = m.matchResource; - this.loaders = m.loaders; - } - - /** - * Assuming this module is in the cache. Remove internal references to allow freeing some memory. - */ - cleanupForCache() { - // Make sure to cache types and sizes before cleanup when this module has been built - // They are accessed by the stats and we don't want them to crash after cleanup - // TODO reconsider this for webpack 6 - if (this.buildInfo) { - if (this._sourceTypes === undefined) this.getSourceTypes(); - for (const type of this._sourceTypes) { - this.size(type); - } - } - super.cleanupForCache(); - this.parser = undefined; - this.parserOptions = undefined; - this.generator = undefined; - this.generatorOptions = undefined; - } - - /** - * Module should be unsafe cached. Get data that's needed for that. - * This data will be passed to restoreFromUnsafeCache later. - * @returns {object} cached data - */ - getUnsafeCacheData() { - const data = super.getUnsafeCacheData(); - data.parserOptions = this.parserOptions; - data.generatorOptions = this.generatorOptions; - return data; - } - - restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory) { - this._restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory); - } - - /** - * restore unsafe cache data - * @param {object} unsafeCacheData data from getUnsafeCacheData - * @param {NormalModuleFactory} normalModuleFactory the normal module factory handling the unsafe caching - */ - _restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory) { - super._restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory); - this.parserOptions = unsafeCacheData.parserOptions; - this.parser = normalModuleFactory.getParser(this.type, this.parserOptions); - this.generatorOptions = unsafeCacheData.generatorOptions; - this.generator = normalModuleFactory.getGenerator( - this.type, - this.generatorOptions - ); - // we assume the generator behaves identically and keep cached sourceTypes/Sizes - } - - /** - * @param {string} context the compilation context - * @param {string} name the asset name - * @param {string} content the content - * @param {string | TODO} sourceMap an optional source map - * @param {Object=} associatedObjectForCache object for caching - * @returns {Source} the created source - */ - createSourceForAsset( - context, - name, - content, - sourceMap, - associatedObjectForCache - ) { - if (sourceMap) { - if ( - typeof sourceMap === "string" && - (this.useSourceMap || this.useSimpleSourceMap) - ) { - return new OriginalSource( - content, - contextifySourceUrl(context, sourceMap, associatedObjectForCache) - ); - } - - if (this.useSourceMap) { - return new SourceMapSource( - content, - name, - contextifySourceMap(context, sourceMap, associatedObjectForCache) - ); - } - } - - return new RawSource(content); - } - - /** - * @param {ResolverWithOptions} resolver a resolver - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {InputFileSystem} fs file system from reading - * @param {NormalModuleCompilationHooks} hooks the hooks - * @returns {NormalModuleLoaderContext} loader context - */ - _createLoaderContext(resolver, options, compilation, fs, hooks) { - const { requestShortener } = compilation.runtimeTemplate; - const getCurrentLoaderName = () => { - const currentLoader = this.getCurrentLoader(loaderContext); - if (!currentLoader) return "(not in loader scope)"; - return requestShortener.shorten(currentLoader.loader); - }; - const getResolveContext = () => { - return { - fileDependencies: { - add: d => loaderContext.addDependency(d) - }, - contextDependencies: { - add: d => loaderContext.addContextDependency(d) - }, - missingDependencies: { - add: d => loaderContext.addMissingDependency(d) - } - }; - }; - const getAbsolutify = memoize(() => - absolutify.bindCache(compilation.compiler.root) - ); - const getAbsolutifyInContext = memoize(() => - absolutify.bindContextCache(this.context, compilation.compiler.root) - ); - const getContextify = memoize(() => - contextify.bindCache(compilation.compiler.root) - ); - const getContextifyInContext = memoize(() => - contextify.bindContextCache(this.context, compilation.compiler.root) - ); - const utils = { - absolutify: (context, request) => { - return context === this.context - ? getAbsolutifyInContext()(request) - : getAbsolutify()(context, request); - }, - contextify: (context, request) => { - return context === this.context - ? getContextifyInContext()(request) - : getContextify()(context, request); - }, - createHash: type => { - return createHash(type || compilation.outputOptions.hashFunction); - } - }; - const loaderContext = { - version: 2, - getOptions: schema => { - const loader = this.getCurrentLoader(loaderContext); - - let { options } = loader; - - if (typeof options === "string") { - if (options.startsWith("{") && options.endsWith("}")) { - try { - options = parseJson(options); - } catch (e) { - throw new Error(`Cannot parse string options: ${e.message}`); - } - } else { - options = querystring.parse(options, "&", "=", { - maxKeys: 0 - }); - } - } - - if (options === null || options === undefined) { - options = {}; - } - - if (schema) { - let name = "Loader"; - let baseDataPath = "options"; - let match; - if (schema.title && (match = /^(.+) (.+)$/.exec(schema.title))) { - [, name, baseDataPath] = match; - } - getValidate()(schema, options, { - name, - baseDataPath - }); - } - - return options; - }, - emitWarning: warning => { - if (!(warning instanceof Error)) { - warning = new NonErrorEmittedError(warning); - } - this.addWarning( - new ModuleWarning(warning, { - from: getCurrentLoaderName() - }) - ); - }, - emitError: error => { - if (!(error instanceof Error)) { - error = new NonErrorEmittedError(error); - } - this.addError( - new ModuleError(error, { - from: getCurrentLoaderName() - }) - ); - }, - getLogger: name => { - const currentLoader = this.getCurrentLoader(loaderContext); - return compilation.getLogger(() => - [currentLoader && currentLoader.loader, name, this.identifier()] - .filter(Boolean) - .join("|") - ); - }, - resolve(context, request, callback) { - resolver.resolve({}, context, request, getResolveContext(), callback); - }, - getResolve(options) { - const child = options ? resolver.withOptions(options) : resolver; - return (context, request, callback) => { - if (callback) { - child.resolve({}, context, request, getResolveContext(), callback); - } else { - return new Promise((resolve, reject) => { - child.resolve( - {}, - context, - request, - getResolveContext(), - (err, result) => { - if (err) reject(err); - else resolve(result); - } - ); - }); - } - }; - }, - emitFile: (name, content, sourceMap, assetInfo) => { - if (!this.buildInfo.assets) { - this.buildInfo.assets = Object.create(null); - this.buildInfo.assetsInfo = new Map(); - } - this.buildInfo.assets[name] = this.createSourceForAsset( - options.context, - name, - content, - sourceMap, - compilation.compiler.root - ); - this.buildInfo.assetsInfo.set(name, assetInfo); - }, - addBuildDependency: dep => { - if (this.buildInfo.buildDependencies === undefined) { - this.buildInfo.buildDependencies = new LazySet(); - } - this.buildInfo.buildDependencies.add(dep); - }, - utils, - rootContext: options.context, - webpack: true, - sourceMap: !!this.useSourceMap, - mode: options.mode || "production", - _module: this, - _compilation: compilation, - _compiler: compilation.compiler, - fs: fs - }; - - Object.assign(loaderContext, options.loader); - - hooks.loader.call(loaderContext, this); - - return loaderContext; - } - - getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) { - if ( - this.loaders && - this.loaders.length && - index < this.loaders.length && - index >= 0 && - this.loaders[index] - ) { - return this.loaders[index]; - } - return null; - } - - /** - * @param {string} context the compilation context - * @param {string | Buffer} content the content - * @param {string | TODO} sourceMap an optional source map - * @param {Object=} associatedObjectForCache object for caching - * @returns {Source} the created source - */ - createSource(context, content, sourceMap, associatedObjectForCache) { - if (Buffer.isBuffer(content)) { - return new RawSource(content); - } - - // if there is no identifier return raw source - if (!this.identifier) { - return new RawSource(content); - } - - // from here on we assume we have an identifier - const identifier = this.identifier(); - - if (this.useSourceMap && sourceMap) { - return new SourceMapSource( - content, - contextifySourceUrl(context, identifier, associatedObjectForCache), - contextifySourceMap(context, sourceMap, associatedObjectForCache) - ); - } - - if (this.useSourceMap || this.useSimpleSourceMap) { - return new OriginalSource( - content, - contextifySourceUrl(context, identifier, associatedObjectForCache) - ); - } - - return new RawSource(content); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {NormalModuleCompilationHooks} hooks the hooks - * @param {function((WebpackError | null)=): void} callback callback function - * @returns {void} - */ - _doBuild(options, compilation, resolver, fs, hooks, callback) { - const loaderContext = this._createLoaderContext( - resolver, - options, - compilation, - fs, - hooks - ); - - const processResult = (err, result) => { - if (err) { - if (!(err instanceof Error)) { - err = new NonErrorEmittedError(err); - } - const currentLoader = this.getCurrentLoader(loaderContext); - const error = new ModuleBuildError(err, { - from: - currentLoader && - compilation.runtimeTemplate.requestShortener.shorten( - currentLoader.loader - ) - }); - return callback(error); - } - - const source = result[0]; - const sourceMap = result.length >= 1 ? result[1] : null; - const extraInfo = result.length >= 2 ? result[2] : null; - - if (!Buffer.isBuffer(source) && typeof source !== "string") { - const currentLoader = this.getCurrentLoader(loaderContext, 0); - const err = new Error( - `Final loader (${ - currentLoader - ? compilation.runtimeTemplate.requestShortener.shorten( - currentLoader.loader - ) - : "unknown" - }) didn't return a Buffer or String` - ); - const error = new ModuleBuildError(err); - return callback(error); - } - - this._source = this.createSource( - options.context, - this.binary ? asBuffer(source) : asString(source), - sourceMap, - compilation.compiler.root - ); - if (this._sourceSizes !== undefined) this._sourceSizes.clear(); - this._ast = - typeof extraInfo === "object" && - extraInfo !== null && - extraInfo.webpackAST !== undefined - ? extraInfo.webpackAST - : null; - return callback(); - }; - - this.buildInfo.fileDependencies = new LazySet(); - this.buildInfo.contextDependencies = new LazySet(); - this.buildInfo.missingDependencies = new LazySet(); - this.buildInfo.cacheable = true; - - try { - hooks.beforeLoaders.call(this.loaders, this, loaderContext); - } catch (err) { - processResult(err); - return; - } - - if (this.loaders.length > 0) { - this.buildInfo.buildDependencies = new LazySet(); - } - - runLoaders( - { - resource: this.resource, - loaders: this.loaders, - context: loaderContext, - processResource: (loaderContext, resourcePath, callback) => { - const resource = loaderContext.resource; - const scheme = getScheme(resource); - hooks.readResource - .for(scheme) - .callAsync(loaderContext, (err, result) => { - if (err) return callback(err); - if (typeof result !== "string" && !result) { - return callback(new UnhandledSchemeError(scheme, resource)); - } - return callback(null, result); - }); - } - }, - (err, result) => { - // Cleanup loaderContext to avoid leaking memory in ICs - loaderContext._compilation = - loaderContext._compiler = - loaderContext._module = - loaderContext.fs = - undefined; - - if (!result) { - this.buildInfo.cacheable = false; - return processResult( - err || new Error("No result from loader-runner processing"), - null - ); - } - this.buildInfo.fileDependencies.addAll(result.fileDependencies); - this.buildInfo.contextDependencies.addAll(result.contextDependencies); - this.buildInfo.missingDependencies.addAll(result.missingDependencies); - for (const loader of this.loaders) { - this.buildInfo.buildDependencies.add(loader.loader); - } - this.buildInfo.cacheable = this.buildInfo.cacheable && result.cacheable; - processResult(err, result.result); - } - ); - } - - /** - * @param {WebpackError} error the error - * @returns {void} - */ - markModuleAsErrored(error) { - // Restore build meta from successful build to keep importing state - this.buildMeta = { ...this._lastSuccessfulBuildMeta }; - this.error = error; - this.addError(error); - } - - applyNoParseRule(rule, content) { - // must start with "rule" if rule is a string - if (typeof rule === "string") { - return content.startsWith(rule); - } - - if (typeof rule === "function") { - return rule(content); - } - // we assume rule is a regexp - return rule.test(content); - } - - // check if module should not be parsed - // returns "true" if the module should !not! be parsed - // returns "false" if the module !must! be parsed - shouldPreventParsing(noParseRule, request) { - // if no noParseRule exists, return false - // the module !must! be parsed. - if (!noParseRule) { - return false; - } - - // we only have one rule to check - if (!Array.isArray(noParseRule)) { - // returns "true" if the module is !not! to be parsed - return this.applyNoParseRule(noParseRule, request); - } - - for (let i = 0; i < noParseRule.length; i++) { - const rule = noParseRule[i]; - // early exit on first truthy match - // this module is !not! to be parsed - if (this.applyNoParseRule(rule, request)) { - return true; - } - } - // no match found, so this module !should! be parsed - return false; - } - - _initBuildHash(compilation) { - const hash = createHash(compilation.outputOptions.hashFunction); - if (this._source) { - hash.update("source"); - this._source.updateHash(hash); - } - hash.update("meta"); - hash.update(JSON.stringify(this.buildMeta)); - this.buildInfo.hash = /** @type {string} */ (hash.digest("hex")); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this._forceBuild = false; - this._source = null; - if (this._sourceSizes !== undefined) this._sourceSizes.clear(); - this._sourceTypes = undefined; - this._ast = null; - this.error = null; - this.clearWarningsAndErrors(); - this.clearDependenciesAndBlocks(); - this.buildMeta = {}; - this.buildInfo = { - cacheable: false, - parsed: true, - fileDependencies: undefined, - contextDependencies: undefined, - missingDependencies: undefined, - buildDependencies: undefined, - valueDependencies: undefined, - hash: undefined, - assets: undefined, - assetsInfo: undefined - }; - - const startTime = compilation.compiler.fsStartTime || Date.now(); - - const hooks = NormalModule.getCompilationHooks(compilation); - - return this._doBuild(options, compilation, resolver, fs, hooks, err => { - // if we have an error mark module as failed and exit - if (err) { - this.markModuleAsErrored(err); - this._initBuildHash(compilation); - return callback(); - } - - const handleParseError = e => { - const source = this._source.source(); - const loaders = this.loaders.map(item => - contextify(options.context, item.loader, compilation.compiler.root) - ); - const error = new ModuleParseError(source, e, loaders, this.type); - this.markModuleAsErrored(error); - this._initBuildHash(compilation); - return callback(); - }; - - const handleParseResult = result => { - this.dependencies.sort( - concatComparators( - compareSelect(a => a.loc, compareLocations), - keepOriginalOrder(this.dependencies) - ) - ); - this._initBuildHash(compilation); - this._lastSuccessfulBuildMeta = this.buildMeta; - return handleBuildDone(); - }; - - const handleBuildDone = () => { - try { - hooks.beforeSnapshot.call(this); - } catch (err) { - this.markModuleAsErrored(err); - return callback(); - } - - const snapshotOptions = compilation.options.snapshot.module; - if (!this.buildInfo.cacheable || !snapshotOptions) { - return callback(); - } - // add warning for all non-absolute paths in fileDependencies, etc - // This makes it easier to find problems with watching and/or caching - let nonAbsoluteDependencies = undefined; - const checkDependencies = deps => { - for (const dep of deps) { - if (!ABSOLUTE_PATH_REGEX.test(dep)) { - if (nonAbsoluteDependencies === undefined) - nonAbsoluteDependencies = new Set(); - nonAbsoluteDependencies.add(dep); - deps.delete(dep); - try { - const depWithoutGlob = dep.replace(/[\\/]?\*.*$/, ""); - const absolute = join( - compilation.fileSystemInfo.fs, - this.context, - depWithoutGlob - ); - if (absolute !== dep && ABSOLUTE_PATH_REGEX.test(absolute)) { - (depWithoutGlob !== dep - ? this.buildInfo.contextDependencies - : deps - ).add(absolute); - } - } catch (e) { - // ignore - } - } - } - }; - checkDependencies(this.buildInfo.fileDependencies); - checkDependencies(this.buildInfo.missingDependencies); - checkDependencies(this.buildInfo.contextDependencies); - if (nonAbsoluteDependencies !== undefined) { - const InvalidDependenciesModuleWarning = - getInvalidDependenciesModuleWarning(); - this.addWarning( - new InvalidDependenciesModuleWarning(this, nonAbsoluteDependencies) - ); - } - // convert file/context/missingDependencies into filesystem snapshot - compilation.fileSystemInfo.createSnapshot( - startTime, - this.buildInfo.fileDependencies, - this.buildInfo.contextDependencies, - this.buildInfo.missingDependencies, - snapshotOptions, - (err, snapshot) => { - if (err) { - this.markModuleAsErrored(err); - return; - } - this.buildInfo.fileDependencies = undefined; - this.buildInfo.contextDependencies = undefined; - this.buildInfo.missingDependencies = undefined; - this.buildInfo.snapshot = snapshot; - return callback(); - } - ); - }; - - try { - hooks.beforeParse.call(this); - } catch (err) { - this.markModuleAsErrored(err); - this._initBuildHash(compilation); - return callback(); - } - - // check if this module should !not! be parsed. - // if so, exit here; - const noParseRule = options.module && options.module.noParse; - if (this.shouldPreventParsing(noParseRule, this.request)) { - // We assume that we need module and exports - this.buildInfo.parsed = false; - this._initBuildHash(compilation); - return handleBuildDone(); - } - - let result; - try { - const source = this._source.source(); - result = this.parser.parse(this._ast || source, { - source, - current: this, - module: this, - compilation: compilation, - options: options - }); - } catch (e) { - handleParseError(e); - return; - } - handleParseResult(result); - }); - } - - /** - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(context) { - return this.generator.getConcatenationBailoutReason(this, context); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only - */ - getSideEffectsConnectionState(moduleGraph) { - if (this.factoryMeta !== undefined) { - if (this.factoryMeta.sideEffectFree) return false; - if (this.factoryMeta.sideEffectFree === false) return true; - } - if (this.buildMeta !== undefined && this.buildMeta.sideEffectFree) { - if (this._isEvaluatingSideEffects) - return ModuleGraphConnection.CIRCULAR_CONNECTION; - this._isEvaluatingSideEffects = true; - /** @type {ConnectionState} */ - let current = false; - for (const dep of this.dependencies) { - const state = dep.getModuleEvaluationSideEffectsState(moduleGraph); - if (state === true) { - if ( - this._addedSideEffectsBailout === undefined - ? ((this._addedSideEffectsBailout = new WeakSet()), true) - : !this._addedSideEffectsBailout.has(moduleGraph) - ) { - this._addedSideEffectsBailout.add(moduleGraph); - moduleGraph - .getOptimizationBailout(this) - .push( - () => - `Dependency (${ - dep.type - }) with side effects at ${formatLocation(dep.loc)}` - ); - } - this._isEvaluatingSideEffects = false; - return true; - } else if (state !== ModuleGraphConnection.CIRCULAR_CONNECTION) { - current = ModuleGraphConnection.addConnectionStates(current, state); - } - } - this._isEvaluatingSideEffects = false; - // When caching is implemented here, make sure to not cache when - // at least one circular connection was in the loop above - return current; - } else { - return true; - } - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - if (this._sourceTypes === undefined) { - this._sourceTypes = this.generator.getTypes(this); - } - return this._sourceTypes; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime, - concatenationScope, - codeGenerationResults, - sourceTypes - }) { - /** @type {Set} */ - const runtimeRequirements = new Set(); - - if (!this.buildInfo.parsed) { - runtimeRequirements.add(RuntimeGlobals.module); - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.thisAsExports); - } - - /** @type {Map} */ - let data; - const getData = () => { - if (data === undefined) data = new Map(); - return data; - }; - - const sources = new Map(); - for (const type of sourceTypes || chunkGraph.getModuleSourceTypes(this)) { - const source = this.error - ? new RawSource( - "throw new Error(" + JSON.stringify(this.error.message) + ");" - ) - : this.generator.generate(this, { - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtimeRequirements, - runtime, - concatenationScope, - codeGenerationResults, - getData, - type - }); - - if (source) { - sources.set(type, new CachedSource(source)); - } - } - - /** @type {CodeGenerationResult} */ - const resultEntry = { - sources, - runtimeRequirements, - data - }; - return resultEntry; - } - - /** - * @returns {Source | null} the original source for the module before webpack transformation - */ - originalSource() { - return this._source; - } - - /** - * @returns {void} - */ - invalidateBuild() { - this._forceBuild = true; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - const { fileSystemInfo, compilation, valueCacheVersions } = context; - // build if enforced - if (this._forceBuild) return callback(null, true); - - // always try to build in case of an error - if (this.error) return callback(null, true); - - // always build when module is not cacheable - if (!this.buildInfo.cacheable) return callback(null, true); - - // build when there is no snapshot to check - if (!this.buildInfo.snapshot) return callback(null, true); - - // build when valueDependencies have changed - /** @type {Map>} */ - const valueDependencies = this.buildInfo.valueDependencies; - if (valueDependencies) { - if (!valueCacheVersions) return callback(null, true); - for (const [key, value] of valueDependencies) { - if (value === undefined) return callback(null, true); - const current = valueCacheVersions.get(key); - if ( - value !== current && - (typeof value === "string" || - typeof current === "string" || - current === undefined || - !isSubset(value, current)) - ) { - return callback(null, true); - } - } - } - - // check snapshot for validity - fileSystemInfo.checkSnapshotValid(this.buildInfo.snapshot, (err, valid) => { - if (err) return callback(err); - if (!valid) return callback(null, true); - const hooks = NormalModule.getCompilationHooks(compilation); - hooks.needBuild.callAsync(this, context, (err, needBuild) => { - if (err) { - return callback( - HookWebpackError.makeWebpackError( - err, - "NormalModule.getCompilationHooks().needBuild" - ) - ); - } - callback(null, !!needBuild); - }); - }); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - const cachedSize = - this._sourceSizes === undefined ? undefined : this._sourceSizes.get(type); - if (cachedSize !== undefined) { - return cachedSize; - } - const size = Math.max(1, this.generator.getSize(this, type)); - if (this._sourceSizes === undefined) { - this._sourceSizes = new Map(); - } - this._sourceSizes.set(type, size); - return size; - } - - /** - * @param {LazySet} fileDependencies set where file dependencies are added to - * @param {LazySet} contextDependencies set where context dependencies are added to - * @param {LazySet} missingDependencies set where missing dependencies are added to - * @param {LazySet} buildDependencies set where build dependencies are added to - */ - addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ) { - const { snapshot, buildDependencies: buildDeps } = this.buildInfo; - if (snapshot) { - fileDependencies.addAll(snapshot.getFileIterable()); - contextDependencies.addAll(snapshot.getContextIterable()); - missingDependencies.addAll(snapshot.getMissingIterable()); - } else { - const { - fileDependencies: fileDeps, - contextDependencies: contextDeps, - missingDependencies: missingDeps - } = this.buildInfo; - if (fileDeps !== undefined) fileDependencies.addAll(fileDeps); - if (contextDeps !== undefined) contextDependencies.addAll(contextDeps); - if (missingDeps !== undefined) missingDependencies.addAll(missingDeps); - } - if (buildDeps !== undefined) { - buildDependencies.addAll(buildDeps); - } - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(this.buildInfo.hash); - this.generator.updateHash(hash, { - module: this, - ...context - }); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - // deserialize - write(this._source); - write(this.error); - write(this._lastSuccessfulBuildMeta); - write(this._forceBuild); - super.serialize(context); - } - - static deserialize(context) { - const obj = new NormalModule({ - // will be deserialized by Module - layer: null, - type: "", - // will be filled by updateCacheModule - resource: "", - context: "", - request: null, - userRequest: null, - rawRequest: null, - loaders: null, - matchResource: null, - parser: null, - parserOptions: null, - generator: null, - generatorOptions: null, - resolveOptions: null - }); - obj.deserialize(context); - return obj; - } - - deserialize(context) { - const { read } = context; - this._source = read(); - this.error = read(); - this._lastSuccessfulBuildMeta = read(); - this._forceBuild = read(); - super.deserialize(context); - } -} - -makeSerializable(NormalModule, "webpack/lib/NormalModule"); - -module.exports = NormalModule; - - -/***/ }), - -/***/ 26156: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { getContext } = __webpack_require__(91256); -const asyncLib = __webpack_require__(78175); -const { - AsyncSeriesBailHook, - SyncWaterfallHook, - SyncBailHook, - SyncHook, - HookMap -} = __webpack_require__(44217); -const ChunkGraph = __webpack_require__(75449); -const Module = __webpack_require__(53840); -const ModuleFactory = __webpack_require__(39744); -const ModuleGraph = __webpack_require__(13487); -const NormalModule = __webpack_require__(89417); -const BasicEffectRulePlugin = __webpack_require__(19110); -const BasicMatcherRulePlugin = __webpack_require__(85732); -const ObjectMatcherRulePlugin = __webpack_require__(75802); -const RuleSetCompiler = __webpack_require__(53059); -const UseEffectRulePlugin = __webpack_require__(67859); -const LazySet = __webpack_require__(96522); -const { getScheme } = __webpack_require__(99716); -const { cachedCleverMerge, cachedSetProperty } = __webpack_require__(22093); -const { join } = __webpack_require__(47077); -const { - parseResource, - parseResourceWithoutFragment -} = __webpack_require__(20162); - -/** @typedef {import("../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetRule} RuleSetRule */ -/** @typedef {import("./Generator")} Generator */ -/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./NormalModule").NormalModuleCreateData} NormalModuleCreateData */ -/** @typedef {import("./Parser")} Parser */ -/** @typedef {import("./ResolverFactory")} ResolverFactory */ -/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -/** @typedef {Pick} ModuleSettings */ -/** @typedef {Partial} CreateData */ - -/** - * @typedef {Object} ResolveData - * @property {ModuleFactoryCreateData["contextInfo"]} contextInfo - * @property {ModuleFactoryCreateData["resolveOptions"]} resolveOptions - * @property {string} context - * @property {string} request - * @property {Record | undefined} assertions - * @property {ModuleDependency[]} dependencies - * @property {string} dependencyType - * @property {CreateData} createData - * @property {LazySet} fileDependencies - * @property {LazySet} missingDependencies - * @property {LazySet} contextDependencies - * @property {boolean} cacheable allow to use the unsafe cache - */ - -/** - * @typedef {Object} ResourceData - * @property {string} resource - * @property {string} path - * @property {string} query - * @property {string} fragment - * @property {string=} context - */ - -/** @typedef {ResourceData & { data: Record }} ResourceDataWithData */ - -/** @typedef {Object} ParsedLoaderRequest - * @property {string} loader loader - * @property {string|undefined} options options - */ - -const EMPTY_RESOLVE_OPTIONS = {}; -const EMPTY_PARSER_OPTIONS = {}; -const EMPTY_GENERATOR_OPTIONS = {}; -const EMPTY_ELEMENTS = []; - -const MATCH_RESOURCE_REGEX = /^([^!]+)!=!/; - -const loaderToIdent = data => { - if (!data.options) { - return data.loader; - } - if (typeof data.options === "string") { - return data.loader + "?" + data.options; - } - if (typeof data.options !== "object") { - throw new Error("loader options must be string or object"); - } - if (data.ident) { - return data.loader + "??" + data.ident; - } - return data.loader + "?" + JSON.stringify(data.options); -}; - -const stringifyLoadersAndResource = (loaders, resource) => { - let str = ""; - for (const loader of loaders) { - str += loaderToIdent(loader) + "!"; - } - return str + resource; -}; - -const needCalls = (times, callback) => { - return err => { - if (--times === 0) { - return callback(err); - } - if (err && times > 0) { - times = NaN; - return callback(err); - } - }; -}; - -const mergeGlobalOptions = (globalOptions, type, localOptions) => { - const parts = type.split("/"); - let result; - let current = ""; - for (const part of parts) { - current = current ? `${current}/${part}` : part; - const options = globalOptions[current]; - if (typeof options === "object") { - if (result === undefined) { - result = options; - } else { - result = cachedCleverMerge(result, options); - } - } - } - if (result === undefined) { - return localOptions; - } else { - return cachedCleverMerge(result, localOptions); - } -}; - -// TODO webpack 6 remove -const deprecationChangedHookMessage = (name, hook) => { - const names = hook.taps - .map(tapped => { - return tapped.name; - }) - .join(", "); - - return ( - `NormalModuleFactory.${name} (${names}) is no longer a waterfall hook, but a bailing hook instead. ` + - "Do not return the passed object, but modify it instead. " + - "Returning false will ignore the request and results in no module created." - ); -}; - -const ruleSetCompiler = new RuleSetCompiler([ - new BasicMatcherRulePlugin("test", "resource"), - new BasicMatcherRulePlugin("scheme"), - new BasicMatcherRulePlugin("mimetype"), - new BasicMatcherRulePlugin("dependency"), - new BasicMatcherRulePlugin("include", "resource"), - new BasicMatcherRulePlugin("exclude", "resource", true), - new BasicMatcherRulePlugin("resource"), - new BasicMatcherRulePlugin("resourceQuery"), - new BasicMatcherRulePlugin("resourceFragment"), - new BasicMatcherRulePlugin("realResource"), - new BasicMatcherRulePlugin("issuer"), - new BasicMatcherRulePlugin("compiler"), - new BasicMatcherRulePlugin("issuerLayer"), - new ObjectMatcherRulePlugin("assert", "assertions"), - new ObjectMatcherRulePlugin("descriptionData"), - new BasicEffectRulePlugin("type"), - new BasicEffectRulePlugin("sideEffects"), - new BasicEffectRulePlugin("parser"), - new BasicEffectRulePlugin("resolve"), - new BasicEffectRulePlugin("generator"), - new BasicEffectRulePlugin("layer"), - new UseEffectRulePlugin() -]); - -class NormalModuleFactory extends ModuleFactory { - /** - * @param {Object} param params - * @param {string=} param.context context - * @param {InputFileSystem} param.fs file system - * @param {ResolverFactory} param.resolverFactory resolverFactory - * @param {ModuleOptions} param.options options - * @param {Object=} param.associatedObjectForCache an object to which the cache will be attached - * @param {boolean=} param.layers enable layers - */ - constructor({ - context, - fs, - resolverFactory, - options, - associatedObjectForCache, - layers = false - }) { - super(); - this.hooks = Object.freeze({ - /** @type {AsyncSeriesBailHook<[ResolveData], Module | false | void>} */ - resolve: new AsyncSeriesBailHook(["resolveData"]), - /** @type {HookMap>} */ - resolveForScheme: new HookMap( - () => new AsyncSeriesBailHook(["resourceData", "resolveData"]) - ), - /** @type {HookMap>} */ - resolveInScheme: new HookMap( - () => new AsyncSeriesBailHook(["resourceData", "resolveData"]) - ), - /** @type {AsyncSeriesBailHook<[ResolveData], Module>} */ - factorize: new AsyncSeriesBailHook(["resolveData"]), - /** @type {AsyncSeriesBailHook<[ResolveData], false | void>} */ - beforeResolve: new AsyncSeriesBailHook(["resolveData"]), - /** @type {AsyncSeriesBailHook<[ResolveData], false | void>} */ - afterResolve: new AsyncSeriesBailHook(["resolveData"]), - /** @type {AsyncSeriesBailHook<[ResolveData["createData"], ResolveData], Module | void>} */ - createModule: new AsyncSeriesBailHook(["createData", "resolveData"]), - /** @type {SyncWaterfallHook<[Module, ResolveData["createData"], ResolveData], Module>} */ - module: new SyncWaterfallHook(["module", "createData", "resolveData"]), - createParser: new HookMap(() => new SyncBailHook(["parserOptions"])), - parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])), - createGenerator: new HookMap( - () => new SyncBailHook(["generatorOptions"]) - ), - generator: new HookMap( - () => new SyncHook(["generator", "generatorOptions"]) - ) - }); - this.resolverFactory = resolverFactory; - this.ruleSet = ruleSetCompiler.compile([ - { - rules: options.defaultRules - }, - { - rules: options.rules - } - ]); - this.context = context || ""; - this.fs = fs; - this._globalParserOptions = options.parser; - this._globalGeneratorOptions = options.generator; - /** @type {Map>} */ - this.parserCache = new Map(); - /** @type {Map>} */ - this.generatorCache = new Map(); - /** @type {Set} */ - this._restoredUnsafeCacheEntries = new Set(); - - const cacheParseResource = parseResource.bindCache( - associatedObjectForCache - ); - const cachedParseResourceWithoutFragment = - parseResourceWithoutFragment.bindCache(associatedObjectForCache); - this._parseResourceWithoutFragment = cachedParseResourceWithoutFragment; - - this.hooks.factorize.tapAsync( - { - name: "NormalModuleFactory", - stage: 100 - }, - (resolveData, callback) => { - this.hooks.resolve.callAsync(resolveData, (err, result) => { - if (err) return callback(err); - - // Ignored - if (result === false) return callback(); - - // direct module - if (result instanceof Module) return callback(null, result); - - if (typeof result === "object") - throw new Error( - deprecationChangedHookMessage("resolve", this.hooks.resolve) + - " Returning a Module object will result in this module used as result." - ); - - this.hooks.afterResolve.callAsync(resolveData, (err, result) => { - if (err) return callback(err); - - if (typeof result === "object") - throw new Error( - deprecationChangedHookMessage( - "afterResolve", - this.hooks.afterResolve - ) - ); - - // Ignored - if (result === false) return callback(); - - const createData = resolveData.createData; - - this.hooks.createModule.callAsync( - createData, - resolveData, - (err, createdModule) => { - if (!createdModule) { - if (!resolveData.request) { - return callback(new Error("Empty dependency (no request)")); - } - - createdModule = new NormalModule( - /** @type {NormalModuleCreateData} */ (createData) - ); - } - - createdModule = this.hooks.module.call( - createdModule, - createData, - resolveData - ); - - return callback(null, createdModule); - } - ); - }); - }); - } - ); - this.hooks.resolve.tapAsync( - { - name: "NormalModuleFactory", - stage: 100 - }, - (data, callback) => { - const { - contextInfo, - context, - dependencies, - dependencyType, - request, - assertions, - resolveOptions, - fileDependencies, - missingDependencies, - contextDependencies - } = data; - const loaderResolver = this.getResolver("loader"); - - /** @type {ResourceData | undefined} */ - let matchResourceData = undefined; - /** @type {string} */ - let unresolvedResource; - /** @type {ParsedLoaderRequest[]} */ - let elements; - let noPreAutoLoaders = false; - let noAutoLoaders = false; - let noPrePostAutoLoaders = false; - - const contextScheme = getScheme(context); - /** @type {string | undefined} */ - let scheme = getScheme(request); - - if (!scheme) { - /** @type {string} */ - let requestWithoutMatchResource = request; - const matchResourceMatch = MATCH_RESOURCE_REGEX.exec(request); - if (matchResourceMatch) { - let matchResource = matchResourceMatch[1]; - if (matchResource.charCodeAt(0) === 46) { - // 46 === ".", 47 === "/" - const secondChar = matchResource.charCodeAt(1); - if ( - secondChar === 47 || - (secondChar === 46 && matchResource.charCodeAt(2) === 47) - ) { - // if matchResources startsWith ../ or ./ - matchResource = join(this.fs, context, matchResource); - } - } - matchResourceData = { - resource: matchResource, - ...cacheParseResource(matchResource) - }; - requestWithoutMatchResource = request.slice( - matchResourceMatch[0].length - ); - } - - scheme = getScheme(requestWithoutMatchResource); - - if (!scheme && !contextScheme) { - const firstChar = requestWithoutMatchResource.charCodeAt(0); - const secondChar = requestWithoutMatchResource.charCodeAt(1); - noPreAutoLoaders = firstChar === 45 && secondChar === 33; // startsWith "-!" - noAutoLoaders = noPreAutoLoaders || firstChar === 33; // startsWith "!" - noPrePostAutoLoaders = firstChar === 33 && secondChar === 33; // startsWith "!!"; - const rawElements = requestWithoutMatchResource - .slice( - noPreAutoLoaders || noPrePostAutoLoaders - ? 2 - : noAutoLoaders - ? 1 - : 0 - ) - .split(/!+/); - unresolvedResource = rawElements.pop(); - elements = rawElements.map(el => { - const { path, query } = cachedParseResourceWithoutFragment(el); - return { - loader: path, - options: query ? query.slice(1) : undefined - }; - }); - scheme = getScheme(unresolvedResource); - } else { - unresolvedResource = requestWithoutMatchResource; - elements = EMPTY_ELEMENTS; - } - } else { - unresolvedResource = request; - elements = EMPTY_ELEMENTS; - } - - const resolveContext = { - fileDependencies, - missingDependencies, - contextDependencies - }; - - /** @type {ResourceDataWithData} */ - let resourceData; - - let loaders; - - const continueCallback = needCalls(2, err => { - if (err) return callback(err); - - // translate option idents - try { - for (const item of loaders) { - if (typeof item.options === "string" && item.options[0] === "?") { - const ident = item.options.slice(1); - if (ident === "[[missing ident]]") { - throw new Error( - "No ident is provided by referenced loader. " + - "When using a function for Rule.use in config you need to " + - "provide an 'ident' property for referenced loader options." - ); - } - item.options = this.ruleSet.references.get(ident); - if (item.options === undefined) { - throw new Error( - "Invalid ident is provided by referenced loader" - ); - } - item.ident = ident; - } - } - } catch (e) { - return callback(e); - } - - if (!resourceData) { - // ignored - return callback(null, dependencies[0].createIgnoredModule(context)); - } - - const userRequest = - (matchResourceData !== undefined - ? `${matchResourceData.resource}!=!` - : "") + - stringifyLoadersAndResource(loaders, resourceData.resource); - - const settings = {}; - const useLoadersPost = []; - const useLoaders = []; - const useLoadersPre = []; - - // handle .webpack[] suffix - let resource; - let match; - if ( - matchResourceData && - typeof (resource = matchResourceData.resource) === "string" && - (match = /\.webpack\[([^\]]+)\]$/.exec(resource)) - ) { - settings.type = match[1]; - matchResourceData.resource = matchResourceData.resource.slice( - 0, - -settings.type.length - 10 - ); - } else { - settings.type = "javascript/auto"; - const resourceDataForRules = matchResourceData || resourceData; - const result = this.ruleSet.exec({ - resource: resourceDataForRules.path, - realResource: resourceData.path, - resourceQuery: resourceDataForRules.query, - resourceFragment: resourceDataForRules.fragment, - scheme, - assertions, - mimetype: matchResourceData - ? "" - : resourceData.data.mimetype || "", - dependency: dependencyType, - descriptionData: matchResourceData - ? undefined - : resourceData.data.descriptionFileData, - issuer: contextInfo.issuer, - compiler: contextInfo.compiler, - issuerLayer: contextInfo.issuerLayer || "" - }); - for (const r of result) { - if (r.type === "use") { - if (!noAutoLoaders && !noPrePostAutoLoaders) { - useLoaders.push(r.value); - } - } else if (r.type === "use-post") { - if (!noPrePostAutoLoaders) { - useLoadersPost.push(r.value); - } - } else if (r.type === "use-pre") { - if (!noPreAutoLoaders && !noPrePostAutoLoaders) { - useLoadersPre.push(r.value); - } - } else if ( - typeof r.value === "object" && - r.value !== null && - typeof settings[r.type] === "object" && - settings[r.type] !== null - ) { - settings[r.type] = cachedCleverMerge(settings[r.type], r.value); - } else { - settings[r.type] = r.value; - } - } - } - - let postLoaders, normalLoaders, preLoaders; - - const continueCallback = needCalls(3, err => { - if (err) { - return callback(err); - } - const allLoaders = postLoaders; - if (matchResourceData === undefined) { - for (const loader of loaders) allLoaders.push(loader); - for (const loader of normalLoaders) allLoaders.push(loader); - } else { - for (const loader of normalLoaders) allLoaders.push(loader); - for (const loader of loaders) allLoaders.push(loader); - } - for (const loader of preLoaders) allLoaders.push(loader); - let type = settings.type; - const resolveOptions = settings.resolve; - const layer = settings.layer; - if (layer !== undefined && !layers) { - return callback( - new Error( - "'Rule.layer' is only allowed when 'experiments.layers' is enabled" - ) - ); - } - try { - Object.assign(data.createData, { - layer: - layer === undefined ? contextInfo.issuerLayer || null : layer, - request: stringifyLoadersAndResource( - allLoaders, - resourceData.resource - ), - userRequest, - rawRequest: request, - loaders: allLoaders, - resource: resourceData.resource, - context: - resourceData.context || getContext(resourceData.resource), - matchResource: matchResourceData - ? matchResourceData.resource - : undefined, - resourceResolveData: resourceData.data, - settings, - type, - parser: this.getParser(type, settings.parser), - parserOptions: settings.parser, - generator: this.getGenerator(type, settings.generator), - generatorOptions: settings.generator, - resolveOptions - }); - } catch (e) { - return callback(e); - } - callback(); - }); - this.resolveRequestArray( - contextInfo, - this.context, - useLoadersPost, - loaderResolver, - resolveContext, - (err, result) => { - postLoaders = result; - continueCallback(err); - } - ); - this.resolveRequestArray( - contextInfo, - this.context, - useLoaders, - loaderResolver, - resolveContext, - (err, result) => { - normalLoaders = result; - continueCallback(err); - } - ); - this.resolveRequestArray( - contextInfo, - this.context, - useLoadersPre, - loaderResolver, - resolveContext, - (err, result) => { - preLoaders = result; - continueCallback(err); - } - ); - }); - - this.resolveRequestArray( - contextInfo, - contextScheme ? this.context : context, - elements, - loaderResolver, - resolveContext, - (err, result) => { - if (err) return continueCallback(err); - loaders = result; - continueCallback(); - } - ); - - const defaultResolve = context => { - if (/^($|\?)/.test(unresolvedResource)) { - resourceData = { - resource: unresolvedResource, - data: {}, - ...cacheParseResource(unresolvedResource) - }; - continueCallback(); - } - - // resource without scheme and with path - else { - const normalResolver = this.getResolver( - "normal", - dependencyType - ? cachedSetProperty( - resolveOptions || EMPTY_RESOLVE_OPTIONS, - "dependencyType", - dependencyType - ) - : resolveOptions - ); - this.resolveResource( - contextInfo, - context, - unresolvedResource, - normalResolver, - resolveContext, - (err, resolvedResource, resolvedResourceResolveData) => { - if (err) return continueCallback(err); - if (resolvedResource !== false) { - resourceData = { - resource: resolvedResource, - data: resolvedResourceResolveData, - ...cacheParseResource(resolvedResource) - }; - } - continueCallback(); - } - ); - } - }; - - // resource with scheme - if (scheme) { - resourceData = { - resource: unresolvedResource, - data: {}, - path: undefined, - query: undefined, - fragment: undefined, - context: undefined - }; - this.hooks.resolveForScheme - .for(scheme) - .callAsync(resourceData, data, err => { - if (err) return continueCallback(err); - continueCallback(); - }); - } - - // resource within scheme - else if (contextScheme) { - resourceData = { - resource: unresolvedResource, - data: {}, - path: undefined, - query: undefined, - fragment: undefined, - context: undefined - }; - this.hooks.resolveInScheme - .for(contextScheme) - .callAsync(resourceData, data, (err, handled) => { - if (err) return continueCallback(err); - if (!handled) return defaultResolve(this.context); - continueCallback(); - }); - } - - // resource without scheme and without path - else defaultResolve(context); - } - ); - } - - cleanupForCache() { - for (const module of this._restoredUnsafeCacheEntries) { - ChunkGraph.clearChunkGraphForModule(module); - ModuleGraph.clearModuleGraphForModule(module); - module.cleanupForCache(); - } - } - - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const dependencies = /** @type {ModuleDependency[]} */ (data.dependencies); - const context = data.context || this.context; - const resolveOptions = data.resolveOptions || EMPTY_RESOLVE_OPTIONS; - const dependency = dependencies[0]; - const request = dependency.request; - const assertions = dependency.assertions; - const contextInfo = data.contextInfo; - const fileDependencies = new LazySet(); - const missingDependencies = new LazySet(); - const contextDependencies = new LazySet(); - const dependencyType = - (dependencies.length > 0 && dependencies[0].category) || ""; - /** @type {ResolveData} */ - const resolveData = { - contextInfo, - resolveOptions, - context, - request, - assertions, - dependencies, - dependencyType, - fileDependencies, - missingDependencies, - contextDependencies, - createData: {}, - cacheable: true - }; - this.hooks.beforeResolve.callAsync(resolveData, (err, result) => { - if (err) { - return callback(err, { - fileDependencies, - missingDependencies, - contextDependencies, - cacheable: false - }); - } - - // Ignored - if (result === false) { - return callback(null, { - fileDependencies, - missingDependencies, - contextDependencies, - cacheable: resolveData.cacheable - }); - } - - if (typeof result === "object") - throw new Error( - deprecationChangedHookMessage( - "beforeResolve", - this.hooks.beforeResolve - ) - ); - - this.hooks.factorize.callAsync(resolveData, (err, module) => { - if (err) { - return callback(err, { - fileDependencies, - missingDependencies, - contextDependencies, - cacheable: false - }); - } - - const factoryResult = { - module, - fileDependencies, - missingDependencies, - contextDependencies, - cacheable: resolveData.cacheable - }; - - callback(null, factoryResult); - }); - }); - } - - resolveResource( - contextInfo, - context, - unresolvedResource, - resolver, - resolveContext, - callback - ) { - resolver.resolve( - contextInfo, - context, - unresolvedResource, - resolveContext, - (err, resolvedResource, resolvedResourceResolveData) => { - if (err) { - return this._resolveResourceErrorHints( - err, - contextInfo, - context, - unresolvedResource, - resolver, - resolveContext, - (err2, hints) => { - if (err2) { - err.message += ` -An fatal error happened during resolving additional hints for this error: ${err2.message}`; - err.stack += ` - -An fatal error happened during resolving additional hints for this error: -${err2.stack}`; - return callback(err); - } - if (hints && hints.length > 0) { - err.message += ` -${hints.join("\n\n")}`; - } - callback(err); - } - ); - } - callback(err, resolvedResource, resolvedResourceResolveData); - } - ); - } - - _resolveResourceErrorHints( - error, - contextInfo, - context, - unresolvedResource, - resolver, - resolveContext, - callback - ) { - asyncLib.parallel( - [ - callback => { - if (!resolver.options.fullySpecified) return callback(); - resolver - .withOptions({ - fullySpecified: false - }) - .resolve( - contextInfo, - context, - unresolvedResource, - resolveContext, - (err, resolvedResource) => { - if (!err && resolvedResource) { - const resource = parseResource(resolvedResource).path.replace( - /^.*[\\/]/, - "" - ); - return callback( - null, - `Did you mean '${resource}'? -BREAKING CHANGE: The request '${unresolvedResource}' failed to resolve only because it was resolved as fully specified -(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). -The extension in the request is mandatory for it to be fully specified. -Add the extension to the request.` - ); - } - callback(); - } - ); - }, - callback => { - if (!resolver.options.enforceExtension) return callback(); - resolver - .withOptions({ - enforceExtension: false, - extensions: [] - }) - .resolve( - contextInfo, - context, - unresolvedResource, - resolveContext, - (err, resolvedResource) => { - if (!err && resolvedResource) { - let hint = ""; - const match = /(\.[^.]+)(\?|$)/.exec(unresolvedResource); - if (match) { - const fixedRequest = unresolvedResource.replace( - /(\.[^.]+)(\?|$)/, - "$2" - ); - if (resolver.options.extensions.has(match[1])) { - hint = `Did you mean '${fixedRequest}'?`; - } else { - hint = `Did you mean '${fixedRequest}'? Also note that '${match[1]}' is not in 'resolve.extensions' yet and need to be added for this to work?`; - } - } else { - hint = `Did you mean to omit the extension or to remove 'resolve.enforceExtension'?`; - } - return callback( - null, - `The request '${unresolvedResource}' failed to resolve only because 'resolve.enforceExtension' was specified. -${hint} -Including the extension in the request is no longer possible. Did you mean to enforce including the extension in requests with 'resolve.extensions: []' instead?` - ); - } - callback(); - } - ); - }, - callback => { - if ( - /^\.\.?\//.test(unresolvedResource) || - resolver.options.preferRelative - ) { - return callback(); - } - resolver.resolve( - contextInfo, - context, - `./${unresolvedResource}`, - resolveContext, - (err, resolvedResource) => { - if (err || !resolvedResource) return callback(); - const moduleDirectories = resolver.options.modules - .map(m => (Array.isArray(m) ? m.join(", ") : m)) - .join(", "); - callback( - null, - `Did you mean './${unresolvedResource}'? -Requests that should resolve in the current directory need to start with './'. -Requests that start with a name are treated as module requests and resolve within module directories (${moduleDirectories}). -If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.` - ); - } - ); - } - ], - (err, hints) => { - if (err) return callback(err); - callback(null, hints.filter(Boolean)); - } - ); - } - - resolveRequestArray( - contextInfo, - context, - array, - resolver, - resolveContext, - callback - ) { - if (array.length === 0) return callback(null, array); - asyncLib.map( - array, - (item, callback) => { - resolver.resolve( - contextInfo, - context, - item.loader, - resolveContext, - (err, result) => { - if ( - err && - /^[^/]*$/.test(item.loader) && - !/-loader$/.test(item.loader) - ) { - return resolver.resolve( - contextInfo, - context, - item.loader + "-loader", - resolveContext, - err2 => { - if (!err2) { - err.message = - err.message + - "\n" + - "BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n" + - ` You need to specify '${item.loader}-loader' instead of '${item.loader}',\n` + - " see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed"; - } - callback(err); - } - ); - } - if (err) return callback(err); - - const parsedResult = this._parseResourceWithoutFragment(result); - const resolved = { - loader: parsedResult.path, - options: - item.options === undefined - ? parsedResult.query - ? parsedResult.query.slice(1) - : undefined - : item.options, - ident: item.options === undefined ? undefined : item.ident - }; - return callback(null, resolved); - } - ); - }, - callback - ); - } - - getParser(type, parserOptions = EMPTY_PARSER_OPTIONS) { - let cache = this.parserCache.get(type); - - if (cache === undefined) { - cache = new WeakMap(); - this.parserCache.set(type, cache); - } - - let parser = cache.get(parserOptions); - - if (parser === undefined) { - parser = this.createParser(type, parserOptions); - cache.set(parserOptions, parser); - } - - return parser; - } - - /** - * @param {string} type type - * @param {{[k: string]: any}} parserOptions parser options - * @returns {Parser} parser - */ - createParser(type, parserOptions = {}) { - parserOptions = mergeGlobalOptions( - this._globalParserOptions, - type, - parserOptions - ); - const parser = this.hooks.createParser.for(type).call(parserOptions); - if (!parser) { - throw new Error(`No parser registered for ${type}`); - } - this.hooks.parser.for(type).call(parser, parserOptions); - return parser; - } - - getGenerator(type, generatorOptions = EMPTY_GENERATOR_OPTIONS) { - let cache = this.generatorCache.get(type); - - if (cache === undefined) { - cache = new WeakMap(); - this.generatorCache.set(type, cache); - } - - let generator = cache.get(generatorOptions); - - if (generator === undefined) { - generator = this.createGenerator(type, generatorOptions); - cache.set(generatorOptions, generator); - } - - return generator; - } - - createGenerator(type, generatorOptions = {}) { - generatorOptions = mergeGlobalOptions( - this._globalGeneratorOptions, - type, - generatorOptions - ); - const generator = this.hooks.createGenerator - .for(type) - .call(generatorOptions); - if (!generator) { - throw new Error(`No generator registered for ${type}`); - } - this.hooks.generator.for(type).call(generator, generatorOptions); - return generator; - } - - getResolver(type, resolveOptions) { - return this.resolverFactory.get(type, resolveOptions); - } -} - -module.exports = NormalModuleFactory; - - -/***/ }), - -/***/ 25755: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { join, dirname } = __webpack_require__(47077); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {function(TODO): void} ModuleReplacer */ - -class NormalModuleReplacementPlugin { - /** - * Create an instance of the plugin - * @param {RegExp} resourceRegExp the resource matcher - * @param {string|ModuleReplacer} newResource the resource replacement - */ - constructor(resourceRegExp, newResource) { - this.resourceRegExp = resourceRegExp; - this.newResource = newResource; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const resourceRegExp = this.resourceRegExp; - const newResource = this.newResource; - compiler.hooks.normalModuleFactory.tap( - "NormalModuleReplacementPlugin", - nmf => { - nmf.hooks.beforeResolve.tap("NormalModuleReplacementPlugin", result => { - if (resourceRegExp.test(result.request)) { - if (typeof newResource === "function") { - newResource(result); - } else { - result.request = newResource; - } - } - }); - nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", result => { - const createData = result.createData; - if (resourceRegExp.test(createData.resource)) { - if (typeof newResource === "function") { - newResource(result); - } else { - const fs = compiler.inputFileSystem; - if ( - newResource.startsWith("/") || - (newResource.length > 1 && newResource[1] === ":") - ) { - createData.resource = newResource; - } else { - createData.resource = join( - fs, - dirname(fs, createData.resource), - newResource - ); - } - } - } - }); - } - ); - } -} - -module.exports = NormalModuleReplacementPlugin; - - -/***/ }), - -/***/ 6267: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -exports.STAGE_BASIC = -10; -exports.STAGE_DEFAULT = 0; -exports.STAGE_ADVANCED = 10; - - -/***/ }), - -/***/ 23787: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -class OptionsApply { - process(options, compiler) {} -} -module.exports = OptionsApply; - - -/***/ }), - -/***/ 68646: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./NormalModule")} NormalModule */ - -/** @typedef {Record} PreparsedAst */ - -/** - * @typedef {Object} ParserStateBase - * @property {string | Buffer} source - * @property {NormalModule} current - * @property {NormalModule} module - * @property {Compilation} compilation - * @property {{[k: string]: any}} options - */ - -/** @typedef {Record & ParserStateBase} ParserState */ - -class Parser { - /* istanbul ignore next */ - /** - * @abstract - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } -} - -module.exports = Parser; - - -/***/ }), - -/***/ 82353: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const PrefetchDependency = __webpack_require__(45851); - -/** @typedef {import("./Compiler")} Compiler */ - -class PrefetchPlugin { - constructor(context, request) { - if (request) { - this.context = context; - this.request = request; - } else { - this.context = null; - this.request = context; - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "PrefetchPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - PrefetchDependency, - normalModuleFactory - ); - } - ); - compiler.hooks.make.tapAsync("PrefetchPlugin", (compilation, callback) => { - compilation.addModuleChain( - this.context || compiler.context, - new PrefetchDependency(this.request), - err => { - callback(err); - } - ); - }); - } -} - -module.exports = PrefetchPlugin; - - -/***/ }), - -/***/ 67317: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Compiler = __webpack_require__(37912); -const MultiCompiler = __webpack_require__(39601); -const NormalModule = __webpack_require__(89417); -const createSchemaValidation = __webpack_require__(89699); -const { contextify } = __webpack_require__(20162); - -/** @typedef {import("../declarations/plugins/ProgressPlugin").HandlerFunction} HandlerFunction */ -/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */ -/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */ - -const validate = createSchemaValidation( - __webpack_require__(49196), - () => __webpack_require__(18273), - { - name: "Progress Plugin", - baseDataPath: "options" - } -); -const median3 = (a, b, c) => { - return a + b + c - Math.max(a, b, c) - Math.min(a, b, c); -}; - -const createDefaultHandler = (profile, logger) => { - /** @type {{ value: string, time: number }[]} */ - const lastStateInfo = []; - - const defaultHandler = (percentage, msg, ...args) => { - if (profile) { - if (percentage === 0) { - lastStateInfo.length = 0; - } - const fullState = [msg, ...args]; - const state = fullState.map(s => s.replace(/\d+\/\d+ /g, "")); - const now = Date.now(); - const len = Math.max(state.length, lastStateInfo.length); - for (let i = len; i >= 0; i--) { - const stateItem = i < state.length ? state[i] : undefined; - const lastStateItem = - i < lastStateInfo.length ? lastStateInfo[i] : undefined; - if (lastStateItem) { - if (stateItem !== lastStateItem.value) { - const diff = now - lastStateItem.time; - if (lastStateItem.value) { - let reportState = lastStateItem.value; - if (i > 0) { - reportState = lastStateInfo[i - 1].value + " > " + reportState; - } - const stateMsg = `${" | ".repeat(i)}${diff} ms ${reportState}`; - const d = diff; - // This depends on timing so we ignore it for coverage - /* istanbul ignore next */ - { - if (d > 10000) { - logger.error(stateMsg); - } else if (d > 1000) { - logger.warn(stateMsg); - } else if (d > 10) { - logger.info(stateMsg); - } else if (d > 5) { - logger.log(stateMsg); - } else { - logger.debug(stateMsg); - } - } - } - if (stateItem === undefined) { - lastStateInfo.length = i; - } else { - lastStateItem.value = stateItem; - lastStateItem.time = now; - lastStateInfo.length = i + 1; - } - } - } else { - lastStateInfo[i] = { - value: stateItem, - time: now - }; - } - } - } - logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args); - if (percentage === 1 || (!msg && args.length === 0)) logger.status(); - }; - - return defaultHandler; -}; - -/** - * @callback ReportProgress - * @param {number} p - * @param {...string} [args] - * @returns {void} - */ - -/** @type {WeakMap} */ -const progressReporters = new WeakMap(); - -class ProgressPlugin { - /** - * @param {Compiler} compiler the current compiler - * @returns {ReportProgress} a progress reporter, if any - */ - static getReporter(compiler) { - return progressReporters.get(compiler); - } - - /** - * @param {ProgressPluginArgument} options options - */ - constructor(options = {}) { - if (typeof options === "function") { - options = { - handler: options - }; - } - - validate(options); - options = { ...ProgressPlugin.defaultOptions, ...options }; - - this.profile = options.profile; - this.handler = options.handler; - this.modulesCount = options.modulesCount; - this.dependenciesCount = options.dependenciesCount; - this.showEntries = options.entries; - this.showModules = options.modules; - this.showDependencies = options.dependencies; - this.showActiveModules = options.activeModules; - this.percentBy = options.percentBy; - } - - /** - * @param {Compiler | MultiCompiler} compiler webpack compiler - * @returns {void} - */ - apply(compiler) { - const handler = - this.handler || - createDefaultHandler( - this.profile, - compiler.getInfrastructureLogger("webpack.Progress") - ); - if (compiler instanceof MultiCompiler) { - this._applyOnMultiCompiler(compiler, handler); - } else if (compiler instanceof Compiler) { - this._applyOnCompiler(compiler, handler); - } - } - - /** - * @param {MultiCompiler} compiler webpack multi-compiler - * @param {HandlerFunction} handler function that executes for every progress step - * @returns {void} - */ - _applyOnMultiCompiler(compiler, handler) { - const states = compiler.compilers.map( - () => /** @type {[number, ...string[]]} */ ([0]) - ); - compiler.compilers.forEach((compiler, idx) => { - new ProgressPlugin((p, msg, ...args) => { - states[idx] = [p, msg, ...args]; - let sum = 0; - for (const [p] of states) sum += p; - handler(sum / states.length, `[${idx}] ${msg}`, ...args); - }).apply(compiler); - }); - } - - /** - * @param {Compiler} compiler webpack compiler - * @param {HandlerFunction} handler function that executes for every progress step - * @returns {void} - */ - _applyOnCompiler(compiler, handler) { - const showEntries = this.showEntries; - const showModules = this.showModules; - const showDependencies = this.showDependencies; - const showActiveModules = this.showActiveModules; - let lastActiveModule = ""; - let currentLoader = ""; - let lastModulesCount = 0; - let lastDependenciesCount = 0; - let lastEntriesCount = 0; - let modulesCount = 0; - let dependenciesCount = 0; - let entriesCount = 1; - let doneModules = 0; - let doneDependencies = 0; - let doneEntries = 0; - const activeModules = new Set(); - let lastUpdate = 0; - - const updateThrottled = () => { - if (lastUpdate + 500 < Date.now()) update(); - }; - - const update = () => { - /** @type {string[]} */ - const items = []; - const percentByModules = - doneModules / - Math.max(lastModulesCount || this.modulesCount || 1, modulesCount); - const percentByEntries = - doneEntries / - Math.max(lastEntriesCount || this.dependenciesCount || 1, entriesCount); - const percentByDependencies = - doneDependencies / - Math.max(lastDependenciesCount || 1, dependenciesCount); - let percentageFactor; - - switch (this.percentBy) { - case "entries": - percentageFactor = percentByEntries; - break; - case "dependencies": - percentageFactor = percentByDependencies; - break; - case "modules": - percentageFactor = percentByModules; - break; - default: - percentageFactor = median3( - percentByModules, - percentByEntries, - percentByDependencies - ); - } - - const percentage = 0.1 + percentageFactor * 0.55; - - if (currentLoader) { - items.push( - `import loader ${contextify( - compiler.context, - currentLoader, - compiler.root - )}` - ); - } else { - const statItems = []; - if (showEntries) { - statItems.push(`${doneEntries}/${entriesCount} entries`); - } - if (showDependencies) { - statItems.push( - `${doneDependencies}/${dependenciesCount} dependencies` - ); - } - if (showModules) { - statItems.push(`${doneModules}/${modulesCount} modules`); - } - if (showActiveModules) { - statItems.push(`${activeModules.size} active`); - } - if (statItems.length > 0) { - items.push(statItems.join(" ")); - } - if (showActiveModules) { - items.push(lastActiveModule); - } - } - handler(percentage, "building", ...items); - lastUpdate = Date.now(); - }; - - const factorizeAdd = () => { - dependenciesCount++; - if (dependenciesCount < 50 || dependenciesCount % 100 === 0) - updateThrottled(); - }; - - const factorizeDone = () => { - doneDependencies++; - if (doneDependencies < 50 || doneDependencies % 100 === 0) - updateThrottled(); - }; - - const moduleAdd = () => { - modulesCount++; - if (modulesCount < 50 || modulesCount % 100 === 0) updateThrottled(); - }; - - // only used when showActiveModules is set - const moduleBuild = module => { - const ident = module.identifier(); - if (ident) { - activeModules.add(ident); - lastActiveModule = ident; - update(); - } - }; - - const entryAdd = (entry, options) => { - entriesCount++; - if (entriesCount < 5 || entriesCount % 10 === 0) updateThrottled(); - }; - - const moduleDone = module => { - doneModules++; - if (showActiveModules) { - const ident = module.identifier(); - if (ident) { - activeModules.delete(ident); - if (lastActiveModule === ident) { - lastActiveModule = ""; - for (const m of activeModules) { - lastActiveModule = m; - } - update(); - return; - } - } - } - if (doneModules < 50 || doneModules % 100 === 0) updateThrottled(); - }; - - const entryDone = (entry, options) => { - doneEntries++; - update(); - }; - - const cache = compiler - .getCache("ProgressPlugin") - .getItemCache("counts", null); - - let cacheGetPromise; - - compiler.hooks.beforeCompile.tap("ProgressPlugin", () => { - if (!cacheGetPromise) { - cacheGetPromise = cache.getPromise().then( - data => { - if (data) { - lastModulesCount = lastModulesCount || data.modulesCount; - lastDependenciesCount = - lastDependenciesCount || data.dependenciesCount; - } - return data; - }, - err => { - // Ignore error - } - ); - } - }); - - compiler.hooks.afterCompile.tapPromise("ProgressPlugin", compilation => { - if (compilation.compiler.isChild()) return Promise.resolve(); - return cacheGetPromise.then(async oldData => { - if ( - !oldData || - oldData.modulesCount !== modulesCount || - oldData.dependenciesCount !== dependenciesCount - ) { - await cache.storePromise({ modulesCount, dependenciesCount }); - } - }); - }); - - compiler.hooks.compilation.tap("ProgressPlugin", compilation => { - if (compilation.compiler.isChild()) return; - lastModulesCount = modulesCount; - lastEntriesCount = entriesCount; - lastDependenciesCount = dependenciesCount; - modulesCount = dependenciesCount = entriesCount = 0; - doneModules = doneDependencies = doneEntries = 0; - - compilation.factorizeQueue.hooks.added.tap( - "ProgressPlugin", - factorizeAdd - ); - compilation.factorizeQueue.hooks.result.tap( - "ProgressPlugin", - factorizeDone - ); - - compilation.addModuleQueue.hooks.added.tap("ProgressPlugin", moduleAdd); - compilation.processDependenciesQueue.hooks.result.tap( - "ProgressPlugin", - moduleDone - ); - - if (showActiveModules) { - compilation.hooks.buildModule.tap("ProgressPlugin", moduleBuild); - } - - compilation.hooks.addEntry.tap("ProgressPlugin", entryAdd); - compilation.hooks.failedEntry.tap("ProgressPlugin", entryDone); - compilation.hooks.succeedEntry.tap("ProgressPlugin", entryDone); - - // avoid dynamic require if bundled with webpack - // @ts-expect-error - if (false) {} - - const hooks = { - finishModules: "finish module graph", - seal: "plugins", - optimizeDependencies: "dependencies optimization", - afterOptimizeDependencies: "after dependencies optimization", - beforeChunks: "chunk graph", - afterChunks: "after chunk graph", - optimize: "optimizing", - optimizeModules: "module optimization", - afterOptimizeModules: "after module optimization", - optimizeChunks: "chunk optimization", - afterOptimizeChunks: "after chunk optimization", - optimizeTree: "module and chunk tree optimization", - afterOptimizeTree: "after module and chunk tree optimization", - optimizeChunkModules: "chunk modules optimization", - afterOptimizeChunkModules: "after chunk modules optimization", - reviveModules: "module reviving", - beforeModuleIds: "before module ids", - moduleIds: "module ids", - optimizeModuleIds: "module id optimization", - afterOptimizeModuleIds: "module id optimization", - reviveChunks: "chunk reviving", - beforeChunkIds: "before chunk ids", - chunkIds: "chunk ids", - optimizeChunkIds: "chunk id optimization", - afterOptimizeChunkIds: "after chunk id optimization", - recordModules: "record modules", - recordChunks: "record chunks", - beforeModuleHash: "module hashing", - beforeCodeGeneration: "code generation", - beforeRuntimeRequirements: "runtime requirements", - beforeHash: "hashing", - afterHash: "after hashing", - recordHash: "record hash", - beforeModuleAssets: "module assets processing", - beforeChunkAssets: "chunk assets processing", - processAssets: "asset processing", - afterProcessAssets: "after asset optimization", - record: "recording", - afterSeal: "after seal" - }; - const numberOfHooks = Object.keys(hooks).length; - Object.keys(hooks).forEach((name, idx) => { - const title = hooks[name]; - const percentage = (idx / numberOfHooks) * 0.25 + 0.7; - compilation.hooks[name].intercept({ - name: "ProgressPlugin", - call() { - handler(percentage, "sealing", title); - }, - done() { - progressReporters.set(compiler, undefined); - handler(percentage, "sealing", title); - }, - result() { - handler(percentage, "sealing", title); - }, - error() { - handler(percentage, "sealing", title); - }, - tap(tap) { - // p is percentage from 0 to 1 - // args is any number of messages in a hierarchical matter - progressReporters.set(compilation.compiler, (p, ...args) => { - handler(percentage, "sealing", title, tap.name, ...args); - }); - handler(percentage, "sealing", title, tap.name); - } - }); - }); - }); - compiler.hooks.make.intercept({ - name: "ProgressPlugin", - call() { - handler(0.1, "building"); - }, - done() { - handler(0.65, "building"); - } - }); - const interceptHook = (hook, progress, category, name) => { - hook.intercept({ - name: "ProgressPlugin", - call() { - handler(progress, category, name); - }, - done() { - progressReporters.set(compiler, undefined); - handler(progress, category, name); - }, - result() { - handler(progress, category, name); - }, - error() { - handler(progress, category, name); - }, - tap(tap) { - progressReporters.set(compiler, (p, ...args) => { - handler(progress, category, name, tap.name, ...args); - }); - handler(progress, category, name, tap.name); - } - }); - }; - compiler.cache.hooks.endIdle.intercept({ - name: "ProgressPlugin", - call() { - handler(0, ""); - } - }); - interceptHook(compiler.cache.hooks.endIdle, 0.01, "cache", "end idle"); - compiler.hooks.beforeRun.intercept({ - name: "ProgressPlugin", - call() { - handler(0, ""); - } - }); - interceptHook(compiler.hooks.beforeRun, 0.01, "setup", "before run"); - interceptHook(compiler.hooks.run, 0.02, "setup", "run"); - interceptHook(compiler.hooks.watchRun, 0.03, "setup", "watch run"); - interceptHook( - compiler.hooks.normalModuleFactory, - 0.04, - "setup", - "normal module factory" - ); - interceptHook( - compiler.hooks.contextModuleFactory, - 0.05, - "setup", - "context module factory" - ); - interceptHook( - compiler.hooks.beforeCompile, - 0.06, - "setup", - "before compile" - ); - interceptHook(compiler.hooks.compile, 0.07, "setup", "compile"); - interceptHook(compiler.hooks.thisCompilation, 0.08, "setup", "compilation"); - interceptHook(compiler.hooks.compilation, 0.09, "setup", "compilation"); - interceptHook(compiler.hooks.finishMake, 0.69, "building", "finish"); - interceptHook(compiler.hooks.emit, 0.95, "emitting", "emit"); - interceptHook(compiler.hooks.afterEmit, 0.98, "emitting", "after emit"); - interceptHook(compiler.hooks.done, 0.99, "done", "plugins"); - compiler.hooks.done.intercept({ - name: "ProgressPlugin", - done() { - handler(0.99, ""); - } - }); - interceptHook( - compiler.cache.hooks.storeBuildDependencies, - 0.99, - "cache", - "store build dependencies" - ); - interceptHook(compiler.cache.hooks.shutdown, 0.99, "cache", "shutdown"); - interceptHook(compiler.cache.hooks.beginIdle, 0.99, "cache", "begin idle"); - interceptHook( - compiler.hooks.watchClose, - 0.99, - "end", - "closing watch compilation" - ); - compiler.cache.hooks.beginIdle.intercept({ - name: "ProgressPlugin", - done() { - handler(1, ""); - } - }); - compiler.cache.hooks.shutdown.intercept({ - name: "ProgressPlugin", - done() { - handler(1, ""); - } - }); - } -} - -ProgressPlugin.defaultOptions = { - profile: false, - modulesCount: 5000, - dependenciesCount: 10000, - modules: true, - dependencies: true, - activeModules: false, - entries: true -}; - -module.exports = ProgressPlugin; - - -/***/ }), - -/***/ 79426: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConstDependency = __webpack_require__(14367); -const ProvidedDependency = __webpack_require__(13996); -const { approve } = __webpack_require__(97574); - -/** @typedef {import("./Compiler")} Compiler */ - -class ProvidePlugin { - /** - * @param {Record} definitions the provided identifiers - */ - constructor(definitions) { - this.definitions = definitions; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const definitions = this.definitions; - compiler.hooks.compilation.tap( - "ProvidePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - compilation.dependencyFactories.set( - ProvidedDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ProvidedDependency, - new ProvidedDependency.Template() - ); - const handler = (parser, parserOptions) => { - Object.keys(definitions).forEach(name => { - const request = [].concat(definitions[name]); - const splittedName = name.split("."); - if (splittedName.length > 0) { - splittedName.slice(1).forEach((_, i) => { - const name = splittedName.slice(0, i + 1).join("."); - parser.hooks.canRename.for(name).tap("ProvidePlugin", approve); - }); - } - - parser.hooks.expression.for(name).tap("ProvidePlugin", expr => { - const nameIdentifier = name.includes(".") - ? `__webpack_provided_${name.replace(/\./g, "_dot_")}` - : name; - const dep = new ProvidedDependency( - request[0], - nameIdentifier, - request.slice(1), - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return true; - }); - - parser.hooks.call.for(name).tap("ProvidePlugin", expr => { - const nameIdentifier = name.includes(".") - ? `__webpack_provided_${name.replace(/\./g, "_dot_")}` - : name; - const dep = new ProvidedDependency( - request[0], - nameIdentifier, - request.slice(1), - expr.callee.range - ); - dep.loc = expr.callee.loc; - parser.state.module.addDependency(dep); - parser.walkExpressions(expr.arguments); - return true; - }); - }); - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ProvidePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("ProvidePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ProvidePlugin", handler); - } - ); - } -} - -module.exports = ProvidePlugin; - - -/***/ }), - -/***/ 71133: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { OriginalSource, RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["javascript"]); - -class RawModule extends Module { - /** - * @param {string} source source code - * @param {string} identifier unique identifier - * @param {string=} readableIdentifier readable identifier - * @param {ReadonlySet=} runtimeRequirements runtime requirements needed for the source code - */ - constructor(source, identifier, readableIdentifier, runtimeRequirements) { - super("javascript/dynamic", null); - this.sourceStr = source; - this.identifierStr = identifier || this.sourceStr; - this.readableIdentifierStr = readableIdentifier || this.identifierStr; - this.runtimeRequirements = runtimeRequirements || null; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this.identifierStr; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return Math.max(1, this.sourceStr.length); - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return requestShortener.shorten(this.readableIdentifierStr); - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - cacheable: true - }; - callback(); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - const sources = new Map(); - if (this.useSourceMap || this.useSimpleSourceMap) { - sources.set( - "javascript", - new OriginalSource(this.sourceStr, this.identifier()) - ); - } else { - sources.set("javascript", new RawSource(this.sourceStr)); - } - return { sources, runtimeRequirements: this.runtimeRequirements }; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(this.sourceStr); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - - write(this.sourceStr); - write(this.identifierStr); - write(this.readableIdentifierStr); - write(this.runtimeRequirements); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.sourceStr = read(); - this.identifierStr = read(); - this.readableIdentifierStr = read(); - this.runtimeRequirements = read(); - - super.deserialize(context); - } -} - -makeSerializable(RawModule, "webpack/lib/RawModule"); - -module.exports = RawModule; - - -/***/ }), - -/***/ 91060: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareNumbers } = __webpack_require__(58792); -const identifierUtils = __webpack_require__(20162); - -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ - -/** - * @typedef {Object} RecordsChunks - * @property {Record=} byName - * @property {Record=} bySource - * @property {number[]=} usedIds - */ - -/** - * @typedef {Object} RecordsModules - * @property {Record=} byIdentifier - * @property {Record=} bySource - * @property {number[]=} usedIds - */ - -/** - * @typedef {Object} Records - * @property {RecordsChunks=} chunks - * @property {RecordsModules=} modules - */ - -class RecordIdsPlugin { - /** - * @param {Object} options Options object - * @param {boolean=} options.portableIds true, when ids need to be portable - */ - constructor(options) { - this.options = options || {}; - } - - /** - * @param {Compiler} compiler the Compiler - * @returns {void} - */ - apply(compiler) { - const portableIds = this.options.portableIds; - - const makePathsRelative = - identifierUtils.makePathsRelative.bindContextCache( - compiler.context, - compiler.root - ); - - /** - * @param {Module} module the module - * @returns {string} the (portable) identifier - */ - const getModuleIdentifier = module => { - if (portableIds) { - return makePathsRelative(module.identifier()); - } - return module.identifier(); - }; - - compiler.hooks.compilation.tap("RecordIdsPlugin", compilation => { - compilation.hooks.recordModules.tap( - "RecordIdsPlugin", - /** - * @param {Module[]} modules the modules array - * @param {Records} records the records object - * @returns {void} - */ - (modules, records) => { - const chunkGraph = compilation.chunkGraph; - if (!records.modules) records.modules = {}; - if (!records.modules.byIdentifier) records.modules.byIdentifier = {}; - /** @type {Set} */ - const usedIds = new Set(); - for (const module of modules) { - const moduleId = chunkGraph.getModuleId(module); - if (typeof moduleId !== "number") continue; - const identifier = getModuleIdentifier(module); - records.modules.byIdentifier[identifier] = moduleId; - usedIds.add(moduleId); - } - records.modules.usedIds = Array.from(usedIds).sort(compareNumbers); - } - ); - compilation.hooks.reviveModules.tap( - "RecordIdsPlugin", - /** - * @param {Module[]} modules the modules array - * @param {Records} records the records object - * @returns {void} - */ - (modules, records) => { - if (!records.modules) return; - if (records.modules.byIdentifier) { - const chunkGraph = compilation.chunkGraph; - /** @type {Set} */ - const usedIds = new Set(); - for (const module of modules) { - const moduleId = chunkGraph.getModuleId(module); - if (moduleId !== null) continue; - const identifier = getModuleIdentifier(module); - const id = records.modules.byIdentifier[identifier]; - if (id === undefined) continue; - if (usedIds.has(id)) continue; - usedIds.add(id); - chunkGraph.setModuleId(module, id); - } - } - if (Array.isArray(records.modules.usedIds)) { - compilation.usedModuleIds = new Set(records.modules.usedIds); - } - } - ); - - /** - * @param {Chunk} chunk the chunk - * @returns {string[]} sources of the chunk - */ - const getChunkSources = chunk => { - /** @type {string[]} */ - const sources = []; - for (const chunkGroup of chunk.groupsIterable) { - const index = chunkGroup.chunks.indexOf(chunk); - if (chunkGroup.name) { - sources.push(`${index} ${chunkGroup.name}`); - } else { - for (const origin of chunkGroup.origins) { - if (origin.module) { - if (origin.request) { - sources.push( - `${index} ${getModuleIdentifier(origin.module)} ${ - origin.request - }` - ); - } else if (typeof origin.loc === "string") { - sources.push( - `${index} ${getModuleIdentifier(origin.module)} ${ - origin.loc - }` - ); - } else if ( - origin.loc && - typeof origin.loc === "object" && - "start" in origin.loc - ) { - sources.push( - `${index} ${getModuleIdentifier( - origin.module - )} ${JSON.stringify(origin.loc.start)}` - ); - } - } - } - } - } - return sources; - }; - - compilation.hooks.recordChunks.tap( - "RecordIdsPlugin", - /** - * @param {Chunk[]} chunks the chunks array - * @param {Records} records the records object - * @returns {void} - */ - (chunks, records) => { - if (!records.chunks) records.chunks = {}; - if (!records.chunks.byName) records.chunks.byName = {}; - if (!records.chunks.bySource) records.chunks.bySource = {}; - /** @type {Set} */ - const usedIds = new Set(); - for (const chunk of chunks) { - if (typeof chunk.id !== "number") continue; - const name = chunk.name; - if (name) records.chunks.byName[name] = chunk.id; - const sources = getChunkSources(chunk); - for (const source of sources) { - records.chunks.bySource[source] = chunk.id; - } - usedIds.add(chunk.id); - } - records.chunks.usedIds = Array.from(usedIds).sort(compareNumbers); - } - ); - compilation.hooks.reviveChunks.tap( - "RecordIdsPlugin", - /** - * @param {Chunk[]} chunks the chunks array - * @param {Records} records the records object - * @returns {void} - */ - (chunks, records) => { - if (!records.chunks) return; - /** @type {Set} */ - const usedIds = new Set(); - if (records.chunks.byName) { - for (const chunk of chunks) { - if (chunk.id !== null) continue; - if (!chunk.name) continue; - const id = records.chunks.byName[chunk.name]; - if (id === undefined) continue; - if (usedIds.has(id)) continue; - usedIds.add(id); - chunk.id = id; - chunk.ids = [id]; - } - } - if (records.chunks.bySource) { - for (const chunk of chunks) { - if (chunk.id !== null) continue; - const sources = getChunkSources(chunk); - for (const source of sources) { - const id = records.chunks.bySource[source]; - if (id === undefined) continue; - if (usedIds.has(id)) continue; - usedIds.add(id); - chunk.id = id; - chunk.ids = [id]; - break; - } - } - } - if (Array.isArray(records.chunks.usedIds)) { - compilation.usedChunkIds = new Set(records.chunks.usedIds); - } - } - ); - }); - } -} -module.exports = RecordIdsPlugin; - - -/***/ }), - -/***/ 41483: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { contextify } = __webpack_require__(20162); - -class RequestShortener { - /** - * @param {string} dir the directory - * @param {object=} associatedObjectForCache an object to which the cache will be attached - */ - constructor(dir, associatedObjectForCache) { - this.contextify = contextify.bindContextCache( - dir, - associatedObjectForCache - ); - } - - /** - * @param {string | undefined | null} request the request to shorten - * @returns {string | undefined | null} the shortened request - */ - shorten(request) { - if (!request) { - return request; - } - return this.contextify(request); - } -} - -module.exports = RequestShortener; - - -/***/ }), - -/***/ 95173: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const ConstDependency = __webpack_require__(14367); -const { - toConstantDependency -} = __webpack_require__(97574); - -/** @typedef {import("./Compiler")} Compiler */ - -module.exports = class RequireJsStuffPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "RequireJsStuffPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - const handler = (parser, parserOptions) => { - if ( - parserOptions.requireJs === undefined || - !parserOptions.requireJs - ) { - return; - } - - parser.hooks.call - .for("require.config") - .tap( - "RequireJsStuffPlugin", - toConstantDependency(parser, "undefined") - ); - parser.hooks.call - .for("requirejs.config") - .tap( - "RequireJsStuffPlugin", - toConstantDependency(parser, "undefined") - ); - - parser.hooks.expression - .for("require.version") - .tap( - "RequireJsStuffPlugin", - toConstantDependency(parser, JSON.stringify("0.0.0")) - ); - parser.hooks.expression - .for("requirejs.onError") - .tap( - "RequireJsStuffPlugin", - toConstantDependency( - parser, - RuntimeGlobals.uncaughtErrorHandler, - [RuntimeGlobals.uncaughtErrorHandler] - ) - ); - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("RequireJsStuffPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("RequireJsStuffPlugin", handler); - } - ); - } -}; - - -/***/ }), - -/***/ 34001: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Factory = (__webpack_require__(958).ResolverFactory); -const { HookMap, SyncHook, SyncWaterfallHook } = __webpack_require__(44217); -const { - cachedCleverMerge, - removeOperations, - resolveByProperty -} = __webpack_require__(22093); - -/** @typedef {import("enhanced-resolve").ResolveOptions} ResolveOptions */ -/** @typedef {import("enhanced-resolve").Resolver} Resolver */ -/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} WebpackResolveOptions */ -/** @typedef {import("../declarations/WebpackOptions").ResolvePluginInstance} ResolvePluginInstance */ - -/** @typedef {WebpackResolveOptions & {dependencyType?: string, resolveToContext?: boolean }} ResolveOptionsWithDependencyType */ -/** - * @typedef {Object} WithOptions - * @property {function(Partial): ResolverWithOptions} withOptions create a resolver with additional/different options - */ - -/** @typedef {Resolver & WithOptions} ResolverWithOptions */ - -// need to be hoisted on module level for caching identity -const EMPTY_RESOLVE_OPTIONS = {}; - -/** - * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType enhanced options - * @returns {ResolveOptions} merged options - */ -const convertToResolveOptions = resolveOptionsWithDepType => { - const { dependencyType, plugins, ...remaining } = resolveOptionsWithDepType; - - // check type compat - /** @type {Partial} */ - const partialOptions = { - ...remaining, - plugins: - plugins && - /** @type {ResolvePluginInstance[]} */ ( - plugins.filter(item => item !== "...") - ) - }; - - if (!partialOptions.fileSystem) { - throw new Error( - "fileSystem is missing in resolveOptions, but it's required for enhanced-resolve" - ); - } - // These weird types validate that we checked all non-optional properties - const options = - /** @type {Partial & Pick} */ ( - partialOptions - ); - - return removeOperations( - resolveByProperty(options, "byDependency", dependencyType) - ); -}; - -/** - * @typedef {Object} ResolverCache - * @property {WeakMap} direct - * @property {Map} stringified - */ - -module.exports = class ResolverFactory { - constructor() { - this.hooks = Object.freeze({ - /** @type {HookMap>} */ - resolveOptions: new HookMap( - () => new SyncWaterfallHook(["resolveOptions"]) - ), - /** @type {HookMap>} */ - resolver: new HookMap( - () => new SyncHook(["resolver", "resolveOptions", "userResolveOptions"]) - ) - }); - /** @type {Map} */ - this.cache = new Map(); - } - - /** - * @param {string} type type of resolver - * @param {ResolveOptionsWithDependencyType=} resolveOptions options - * @returns {ResolverWithOptions} the resolver - */ - get(type, resolveOptions = EMPTY_RESOLVE_OPTIONS) { - let typedCaches = this.cache.get(type); - if (!typedCaches) { - typedCaches = { - direct: new WeakMap(), - stringified: new Map() - }; - this.cache.set(type, typedCaches); - } - const cachedResolver = typedCaches.direct.get(resolveOptions); - if (cachedResolver) { - return cachedResolver; - } - const ident = JSON.stringify(resolveOptions); - const resolver = typedCaches.stringified.get(ident); - if (resolver) { - typedCaches.direct.set(resolveOptions, resolver); - return resolver; - } - const newResolver = this._create(type, resolveOptions); - typedCaches.direct.set(resolveOptions, newResolver); - typedCaches.stringified.set(ident, newResolver); - return newResolver; - } - - /** - * @param {string} type type of resolver - * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType options - * @returns {ResolverWithOptions} the resolver - */ - _create(type, resolveOptionsWithDepType) { - /** @type {ResolveOptionsWithDependencyType} */ - const originalResolveOptions = { ...resolveOptionsWithDepType }; - - const resolveOptions = convertToResolveOptions( - this.hooks.resolveOptions.for(type).call(resolveOptionsWithDepType) - ); - const resolver = /** @type {ResolverWithOptions} */ ( - Factory.createResolver(resolveOptions) - ); - if (!resolver) { - throw new Error("No resolver created"); - } - /** @type {WeakMap, ResolverWithOptions>} */ - const childCache = new WeakMap(); - resolver.withOptions = options => { - const cacheEntry = childCache.get(options); - if (cacheEntry !== undefined) return cacheEntry; - const mergedOptions = cachedCleverMerge(originalResolveOptions, options); - const resolver = this.get(type, mergedOptions); - childCache.set(options, resolver); - return resolver; - }; - this.hooks.resolver - .for(type) - .call(resolver, resolveOptions, originalResolveOptions); - return resolver; - } -}; - - -/***/ }), - -/***/ 39201: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * the internal require function - */ -exports.require = "__webpack_require__"; - -/** - * access to properties of the internal require function/object - */ -exports.requireScope = "__webpack_require__.*"; - -/** - * the internal exports object - */ -exports.exports = "__webpack_exports__"; - -/** - * top-level this need to be the exports object - */ -exports.thisAsExports = "top-level-this-exports"; - -/** - * runtime need to return the exports of the last entry module - */ -exports.returnExportsFromRuntime = "return-exports-from-runtime"; - -/** - * the internal module object - */ -exports.module = "module"; - -/** - * the internal module object - */ -exports.moduleId = "module.id"; - -/** - * the internal module object - */ -exports.moduleLoaded = "module.loaded"; - -/** - * the bundle public path - */ -exports.publicPath = "__webpack_require__.p"; - -/** - * the module id of the entry point - */ -exports.entryModuleId = "__webpack_require__.s"; - -/** - * the module cache - */ -exports.moduleCache = "__webpack_require__.c"; - -/** - * the module functions - */ -exports.moduleFactories = "__webpack_require__.m"; - -/** - * the module functions, with only write access - */ -exports.moduleFactoriesAddOnly = "__webpack_require__.m (add only)"; - -/** - * the chunk ensure function - */ -exports.ensureChunk = "__webpack_require__.e"; - -/** - * an object with handlers to ensure a chunk - */ -exports.ensureChunkHandlers = "__webpack_require__.f"; - -/** - * a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries - */ -exports.ensureChunkIncludeEntries = "__webpack_require__.f (include entries)"; - -/** - * the chunk prefetch function - */ -exports.prefetchChunk = "__webpack_require__.E"; - -/** - * an object with handlers to prefetch a chunk - */ -exports.prefetchChunkHandlers = "__webpack_require__.F"; - -/** - * the chunk preload function - */ -exports.preloadChunk = "__webpack_require__.G"; - -/** - * an object with handlers to preload a chunk - */ -exports.preloadChunkHandlers = "__webpack_require__.H"; - -/** - * the exported property define getters function - */ -exports.definePropertyGetters = "__webpack_require__.d"; - -/** - * define compatibility on export - */ -exports.makeNamespaceObject = "__webpack_require__.r"; - -/** - * create a fake namespace object - */ -exports.createFakeNamespaceObject = "__webpack_require__.t"; - -/** - * compatibility get default export - */ -exports.compatGetDefaultExport = "__webpack_require__.n"; - -/** - * harmony module decorator - */ -exports.harmonyModuleDecorator = "__webpack_require__.hmd"; - -/** - * node.js module decorator - */ -exports.nodeModuleDecorator = "__webpack_require__.nmd"; - -/** - * the webpack hash - */ -exports.getFullHash = "__webpack_require__.h"; - -/** - * an object containing all installed WebAssembly.Instance export objects keyed by module id - */ -exports.wasmInstances = "__webpack_require__.w"; - -/** - * instantiate a wasm instance from module exports object, id, hash and importsObject - */ -exports.instantiateWasm = "__webpack_require__.v"; - -/** - * the uncaught error handler for the webpack runtime - */ -exports.uncaughtErrorHandler = "__webpack_require__.oe"; - -/** - * the script nonce - */ -exports.scriptNonce = "__webpack_require__.nc"; - -/** - * function to load a script tag. - * Arguments: (url: string, done: (event) => void), key?: string | number, chunkId?: string | number) => void - * done function is called when loading has finished or timeout occurred. - * It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url. - */ -exports.loadScript = "__webpack_require__.l"; - -/** - * function to promote a string to a TrustedScript using webpack's Trusted - * Types policy - * Arguments: (script: string) => TrustedScript - */ -exports.createScript = "__webpack_require__.ts"; - -/** - * function to promote a string to a TrustedScriptURL using webpack's Trusted - * Types policy - * Arguments: (url: string) => TrustedScriptURL - */ -exports.createScriptUrl = "__webpack_require__.tu"; - -/** - * function to return webpack's Trusted Types policy - * Arguments: () => TrustedTypePolicy - */ -exports.getTrustedTypesPolicy = "__webpack_require__.tt"; - -/** - * the chunk name of the chunk with the runtime - */ -exports.chunkName = "__webpack_require__.cn"; - -/** - * the runtime id of the current runtime - */ -exports.runtimeId = "__webpack_require__.j"; - -/** - * the filename of the script part of the chunk - */ -exports.getChunkScriptFilename = "__webpack_require__.u"; - -/** - * the filename of the css part of the chunk - */ -exports.getChunkCssFilename = "__webpack_require__.k"; - -/** - * a flag when a module/chunk/tree has css modules - */ -exports.hasCssModules = "has css modules"; - -/** - * the filename of the script part of the hot update chunk - */ -exports.getChunkUpdateScriptFilename = "__webpack_require__.hu"; - -/** - * the filename of the css part of the hot update chunk - */ -exports.getChunkUpdateCssFilename = "__webpack_require__.hk"; - -/** - * startup signal from runtime - * This will be called when the runtime chunk has been loaded. - */ -exports.startup = "__webpack_require__.x"; - -/** - * @deprecated - * creating a default startup function with the entry modules - */ -exports.startupNoDefault = "__webpack_require__.x (no default handler)"; - -/** - * startup signal from runtime but only used to add logic after the startup - */ -exports.startupOnlyAfter = "__webpack_require__.x (only after)"; - -/** - * startup signal from runtime but only used to add sync logic before the startup - */ -exports.startupOnlyBefore = "__webpack_require__.x (only before)"; - -/** - * global callback functions for installing chunks - */ -exports.chunkCallback = "webpackChunk"; - -/** - * method to startup an entrypoint with needed chunks. - * Signature: (moduleId: Id, chunkIds: Id[]) => any. - * Returns the exports of the module or a Promise - */ -exports.startupEntrypoint = "__webpack_require__.X"; - -/** - * register deferred code, which will run when certain - * chunks are loaded. - * Signature: (chunkIds: Id[], fn: () => any, priority: int >= 0 = 0) => any - * Returned value will be returned directly when all chunks are already loaded - * When (priority & 1) it will wait for all other handlers with lower priority to - * be executed before itself is executed - */ -exports.onChunksLoaded = "__webpack_require__.O"; - -/** - * method to install a chunk that was loaded somehow - * Signature: ({ id, ids, modules, runtime }) => void - */ -exports.externalInstallChunk = "__webpack_require__.C"; - -/** - * interceptor for module executions - */ -exports.interceptModuleExecution = "__webpack_require__.i"; - -/** - * the global object - */ -exports.global = "__webpack_require__.g"; - -/** - * an object with all share scopes - */ -exports.shareScopeMap = "__webpack_require__.S"; - -/** - * The sharing init sequence function (only runs once per share scope). - * Has one argument, the name of the share scope. - * Creates a share scope if not existing - */ -exports.initializeSharing = "__webpack_require__.I"; - -/** - * The current scope when getting a module from a remote - */ -exports.currentRemoteGetScope = "__webpack_require__.R"; - -/** - * the filename of the HMR manifest - */ -exports.getUpdateManifestFilename = "__webpack_require__.hmrF"; - -/** - * function downloading the update manifest - */ -exports.hmrDownloadManifest = "__webpack_require__.hmrM"; - -/** - * array with handler functions to download chunk updates - */ -exports.hmrDownloadUpdateHandlers = "__webpack_require__.hmrC"; - -/** - * object with all hmr module data for all modules - */ -exports.hmrModuleData = "__webpack_require__.hmrD"; - -/** - * array with handler functions when a module should be invalidated - */ -exports.hmrInvalidateModuleHandlers = "__webpack_require__.hmrI"; - -/** - * the prefix for storing state of runtime modules when hmr is enabled - */ -exports.hmrRuntimeStatePrefix = "__webpack_require__.hmrS"; - -/** - * the AMD define function - */ -exports.amdDefine = "__webpack_require__.amdD"; - -/** - * the AMD options - */ -exports.amdOptions = "__webpack_require__.amdO"; - -/** - * the System polyfill object - */ -exports.system = "__webpack_require__.System"; - -/** - * the shorthand for Object.prototype.hasOwnProperty - * using of it decreases the compiled bundle size - */ -exports.hasOwnProperty = "__webpack_require__.o"; - -/** - * the System.register context object - */ -exports.systemContext = "__webpack_require__.y"; - -/** - * the baseURI of current document - */ -exports.baseURI = "__webpack_require__.b"; - -/** - * a RelativeURL class when relative URLs are used - */ -exports.relativeUrl = "__webpack_require__.U"; - -/** - * Creates an async module. The body function must be a async function. - * "module.exports" will be decorated with an AsyncModulePromise. - * The body function will be called. - * To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));". - * If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function. - * Signature: function( - * module: Module, - * body: (handleDependencies: (deps: AsyncModulePromise[]) => Promise & () => void, - * hasAwaitAfterDependencies?: boolean - * ) => void - */ -exports.asyncModule = "__webpack_require__.a"; - - -/***/ }), - -/***/ 93496: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const OriginalSource = (__webpack_require__(51255).OriginalSource); -const Module = __webpack_require__(53840); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["runtime"]); - -class RuntimeModule extends Module { - /** - * @param {string} name a readable name - * @param {number=} stage an optional stage - */ - constructor(name, stage = 0) { - super("runtime"); - this.name = name; - this.stage = stage; - this.buildMeta = {}; - this.buildInfo = {}; - /** @type {Compilation} */ - this.compilation = undefined; - /** @type {Chunk} */ - this.chunk = undefined; - /** @type {ChunkGraph} */ - this.chunkGraph = undefined; - this.fullHash = false; - this.dependentHash = false; - /** @type {string} */ - this._cachedGeneratedCode = undefined; - } - - /** - * @param {Compilation} compilation the compilation - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - attach(compilation, chunk, chunkGraph = compilation.chunkGraph) { - this.compilation = compilation; - this.chunk = chunk; - this.chunkGraph = chunkGraph; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `webpack/runtime/${this.name}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `webpack/runtime/${this.name}`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, false); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - // do nothing - // should not be called as runtime modules are added later to the compilation - callback(); - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(this.name); - hash.update(`${this.stage}`); - try { - if (this.fullHash || this.dependentHash) { - // Do not use getGeneratedCode here, because i. e. compilation hash might be not - // ready at this point. We will cache it later instead. - hash.update(this.generate()); - } else { - hash.update(this.getGeneratedCode()); - } - } catch (err) { - hash.update(err.message); - } - super.updateHash(hash, context); - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - const sources = new Map(); - const generatedCode = this.getGeneratedCode(); - if (generatedCode) { - sources.set( - "runtime", - this.useSourceMap || this.useSimpleSourceMap - ? new OriginalSource(generatedCode, this.identifier()) - : new RawSource(generatedCode) - ); - } - return { - sources, - runtimeRequirements: null - }; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - try { - const source = this.getGeneratedCode(); - return source ? source.length : 0; - } catch (e) { - return 0; - } - } - - /* istanbul ignore next */ - /** - * @abstract - * @returns {string} runtime code - */ - generate() { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @returns {string} runtime code - */ - getGeneratedCode() { - if (this._cachedGeneratedCode) { - return this._cachedGeneratedCode; - } - return (this._cachedGeneratedCode = this.generate()); - } - - /** - * @returns {boolean} true, if the runtime module should get it's own scope - */ - shouldIsolate() { - return true; - } -} - -/** - * Runtime modules without any dependencies to other runtime modules - */ -RuntimeModule.STAGE_NORMAL = 0; - -/** - * Runtime modules with simple dependencies on other runtime modules - */ -RuntimeModule.STAGE_BASIC = 5; - -/** - * Runtime modules which attach to handlers of other runtime modules - */ -RuntimeModule.STAGE_ATTACH = 10; - -/** - * Runtime modules which trigger actions on bootstrap - */ -RuntimeModule.STAGE_TRIGGER = 20; - -module.exports = RuntimeModule; - - -/***/ }), - -/***/ 92419: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const { getChunkFilenameTemplate } = __webpack_require__(39693); -const RuntimeRequirementsDependency = __webpack_require__(12446); -const JavascriptModulesPlugin = __webpack_require__(36109); -const AsyncModuleRuntimeModule = __webpack_require__(57969); -const AutoPublicPathRuntimeModule = __webpack_require__(48178); -const BaseUriRuntimeModule = __webpack_require__(60758); -const CompatGetDefaultExportRuntimeModule = __webpack_require__(75410); -const CompatRuntimeModule = __webpack_require__(28349); -const CreateFakeNamespaceObjectRuntimeModule = __webpack_require__(82865); -const CreateScriptRuntimeModule = __webpack_require__(44263); -const CreateScriptUrlRuntimeModule = __webpack_require__(71822); -const DefinePropertyGettersRuntimeModule = __webpack_require__(62277); -const EnsureChunkRuntimeModule = __webpack_require__(5079); -const GetChunkFilenameRuntimeModule = __webpack_require__(44033); -const GetMainFilenameRuntimeModule = __webpack_require__(69496); -const GetTrustedTypesPolicyRuntimeModule = __webpack_require__(36011); -const GlobalRuntimeModule = __webpack_require__(91164); -const HasOwnPropertyRuntimeModule = __webpack_require__(9698); -const LoadScriptRuntimeModule = __webpack_require__(46750); -const MakeNamespaceObjectRuntimeModule = __webpack_require__(77159); -const NonceRuntimeModule = __webpack_require__(85856); -const OnChunksLoadedRuntimeModule = __webpack_require__(94800); -const PublicPathRuntimeModule = __webpack_require__(86747); -const RelativeUrlRuntimeModule = __webpack_require__(89926); -const RuntimeIdRuntimeModule = __webpack_require__(86841); -const SystemContextRuntimeModule = __webpack_require__(63135); -const ShareRuntimeModule = __webpack_require__(59694); -const StringXor = __webpack_require__(8382); - -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ - -const GLOBALS_ON_REQUIRE = [ - RuntimeGlobals.chunkName, - RuntimeGlobals.runtimeId, - RuntimeGlobals.compatGetDefaultExport, - RuntimeGlobals.createFakeNamespaceObject, - RuntimeGlobals.createScript, - RuntimeGlobals.createScriptUrl, - RuntimeGlobals.getTrustedTypesPolicy, - RuntimeGlobals.definePropertyGetters, - RuntimeGlobals.ensureChunk, - RuntimeGlobals.entryModuleId, - RuntimeGlobals.getFullHash, - RuntimeGlobals.global, - RuntimeGlobals.makeNamespaceObject, - RuntimeGlobals.moduleCache, - RuntimeGlobals.moduleFactories, - RuntimeGlobals.moduleFactoriesAddOnly, - RuntimeGlobals.interceptModuleExecution, - RuntimeGlobals.publicPath, - RuntimeGlobals.baseURI, - RuntimeGlobals.relativeUrl, - RuntimeGlobals.scriptNonce, - RuntimeGlobals.uncaughtErrorHandler, - RuntimeGlobals.asyncModule, - RuntimeGlobals.wasmInstances, - RuntimeGlobals.instantiateWasm, - RuntimeGlobals.shareScopeMap, - RuntimeGlobals.initializeSharing, - RuntimeGlobals.loadScript, - RuntimeGlobals.systemContext, - RuntimeGlobals.onChunksLoaded -]; - -const MODULE_DEPENDENCIES = { - [RuntimeGlobals.moduleLoaded]: [RuntimeGlobals.module], - [RuntimeGlobals.moduleId]: [RuntimeGlobals.module] -}; - -const TREE_DEPENDENCIES = { - [RuntimeGlobals.definePropertyGetters]: [RuntimeGlobals.hasOwnProperty], - [RuntimeGlobals.compatGetDefaultExport]: [ - RuntimeGlobals.definePropertyGetters - ], - [RuntimeGlobals.createFakeNamespaceObject]: [ - RuntimeGlobals.definePropertyGetters, - RuntimeGlobals.makeNamespaceObject, - RuntimeGlobals.require - ], - [RuntimeGlobals.initializeSharing]: [RuntimeGlobals.shareScopeMap], - [RuntimeGlobals.shareScopeMap]: [RuntimeGlobals.hasOwnProperty] -}; - -class RuntimePlugin { - /** - * @param {Compiler} compiler the Compiler - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("RuntimePlugin", compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isChunkLoadingDisabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === false; - }; - compilation.dependencyTemplates.set( - RuntimeRequirementsDependency, - new RuntimeRequirementsDependency.Template() - ); - for (const req of GLOBALS_ON_REQUIRE) { - compilation.hooks.runtimeRequirementInModule - .for(req) - .tap("RuntimePlugin", (module, set) => { - set.add(RuntimeGlobals.requireScope); - }); - compilation.hooks.runtimeRequirementInTree - .for(req) - .tap("RuntimePlugin", (module, set) => { - set.add(RuntimeGlobals.requireScope); - }); - } - for (const req of Object.keys(TREE_DEPENDENCIES)) { - const deps = TREE_DEPENDENCIES[req]; - compilation.hooks.runtimeRequirementInTree - .for(req) - .tap("RuntimePlugin", (chunk, set) => { - for (const dep of deps) set.add(dep); - }); - } - for (const req of Object.keys(MODULE_DEPENDENCIES)) { - const deps = MODULE_DEPENDENCIES[req]; - compilation.hooks.runtimeRequirementInModule - .for(req) - .tap("RuntimePlugin", (chunk, set) => { - for (const dep of deps) set.add(dep); - }); - } - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.definePropertyGetters) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new DefinePropertyGettersRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.makeNamespaceObject) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new MakeNamespaceObjectRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.createFakeNamespaceObject) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new CreateFakeNamespaceObjectRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hasOwnProperty) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new HasOwnPropertyRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.compatGetDefaultExport) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new CompatGetDefaultExportRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.runtimeId) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule(chunk, new RuntimeIdRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.publicPath) - .tap("RuntimePlugin", (chunk, set) => { - const { outputOptions } = compilation; - const { publicPath: globalPublicPath, scriptType } = outputOptions; - const entryOptions = chunk.getEntryOptions(); - const publicPath = - entryOptions && entryOptions.publicPath !== undefined - ? entryOptions.publicPath - : globalPublicPath; - - if (publicPath === "auto") { - const module = new AutoPublicPathRuntimeModule(); - if (scriptType !== "module") set.add(RuntimeGlobals.global); - compilation.addRuntimeModule(chunk, module); - } else { - const module = new PublicPathRuntimeModule(publicPath); - - if ( - typeof publicPath !== "string" || - /\[(full)?hash\]/.test(publicPath) - ) { - module.fullHash = true; - } - - compilation.addRuntimeModule(chunk, module); - } - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.global) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule(chunk, new GlobalRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.asyncModule) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule(chunk, new AsyncModuleRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.systemContext) - .tap("RuntimePlugin", chunk => { - const { outputOptions } = compilation; - const { library: globalLibrary } = outputOptions; - const entryOptions = chunk.getEntryOptions(); - const libraryType = - entryOptions && entryOptions.library !== undefined - ? entryOptions.library.type - : globalLibrary.type; - - if (libraryType === "system") { - compilation.addRuntimeModule( - chunk, - new SystemContextRuntimeModule() - ); - } - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getChunkScriptFilename) - .tap("RuntimePlugin", (chunk, set) => { - if ( - typeof compilation.outputOptions.chunkFilename === "string" && - /\[(full)?hash(:\d+)?\]/.test( - compilation.outputOptions.chunkFilename - ) - ) { - set.add(RuntimeGlobals.getFullHash); - } - compilation.addRuntimeModule( - chunk, - new GetChunkFilenameRuntimeModule( - "javascript", - "javascript", - RuntimeGlobals.getChunkScriptFilename, - chunk => - chunk.filenameTemplate || - (chunk.canBeInitial() - ? compilation.outputOptions.filename - : compilation.outputOptions.chunkFilename), - false - ) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getChunkCssFilename) - .tap("RuntimePlugin", (chunk, set) => { - if ( - typeof compilation.outputOptions.cssChunkFilename === "string" && - /\[(full)?hash(:\d+)?\]/.test( - compilation.outputOptions.cssChunkFilename - ) - ) { - set.add(RuntimeGlobals.getFullHash); - } - compilation.addRuntimeModule( - chunk, - new GetChunkFilenameRuntimeModule( - "css", - "css", - RuntimeGlobals.getChunkCssFilename, - chunk => - getChunkFilenameTemplate(chunk, compilation.outputOptions), - set.has(RuntimeGlobals.hmrDownloadUpdateHandlers) - ) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getChunkUpdateScriptFilename) - .tap("RuntimePlugin", (chunk, set) => { - if ( - /\[(full)?hash(:\d+)?\]/.test( - compilation.outputOptions.hotUpdateChunkFilename - ) - ) - set.add(RuntimeGlobals.getFullHash); - compilation.addRuntimeModule( - chunk, - new GetChunkFilenameRuntimeModule( - "javascript", - "javascript update", - RuntimeGlobals.getChunkUpdateScriptFilename, - c => compilation.outputOptions.hotUpdateChunkFilename, - true - ) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getUpdateManifestFilename) - .tap("RuntimePlugin", (chunk, set) => { - if ( - /\[(full)?hash(:\d+)?\]/.test( - compilation.outputOptions.hotUpdateMainFilename - ) - ) { - set.add(RuntimeGlobals.getFullHash); - } - compilation.addRuntimeModule( - chunk, - new GetMainFilenameRuntimeModule( - "update manifest", - RuntimeGlobals.getUpdateManifestFilename, - compilation.outputOptions.hotUpdateMainFilename - ) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunk) - .tap("RuntimePlugin", (chunk, set) => { - const hasAsyncChunks = chunk.hasAsyncChunks(); - if (hasAsyncChunks) { - set.add(RuntimeGlobals.ensureChunkHandlers); - } - compilation.addRuntimeModule( - chunk, - new EnsureChunkRuntimeModule(set) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkIncludeEntries) - .tap("RuntimePlugin", (chunk, set) => { - set.add(RuntimeGlobals.ensureChunkHandlers); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.shareScopeMap) - .tap("RuntimePlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new ShareRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.loadScript) - .tap("RuntimePlugin", (chunk, set) => { - const withCreateScriptUrl = !!compilation.outputOptions.trustedTypes; - if (withCreateScriptUrl) { - set.add(RuntimeGlobals.createScriptUrl); - } - compilation.addRuntimeModule( - chunk, - new LoadScriptRuntimeModule(withCreateScriptUrl) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.createScript) - .tap("RuntimePlugin", (chunk, set) => { - if (compilation.outputOptions.trustedTypes) { - set.add(RuntimeGlobals.getTrustedTypesPolicy); - } - compilation.addRuntimeModule(chunk, new CreateScriptRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.createScriptUrl) - .tap("RuntimePlugin", (chunk, set) => { - if (compilation.outputOptions.trustedTypes) { - set.add(RuntimeGlobals.getTrustedTypesPolicy); - } - compilation.addRuntimeModule( - chunk, - new CreateScriptUrlRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getTrustedTypesPolicy) - .tap("RuntimePlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new GetTrustedTypesPolicyRuntimeModule(set) - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.relativeUrl) - .tap("RuntimePlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new RelativeUrlRuntimeModule()); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.onChunksLoaded) - .tap("RuntimePlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new OnChunksLoadedRuntimeModule() - ); - return true; - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.baseURI) - .tap("RuntimePlugin", chunk => { - if (isChunkLoadingDisabledForChunk(chunk)) { - compilation.addRuntimeModule(chunk, new BaseUriRuntimeModule()); - return true; - } - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.scriptNonce) - .tap("RuntimePlugin", chunk => { - compilation.addRuntimeModule(chunk, new NonceRuntimeModule()); - return true; - }); - // TODO webpack 6: remove CompatRuntimeModule - compilation.hooks.additionalTreeRuntimeRequirements.tap( - "RuntimePlugin", - (chunk, set) => { - const { mainTemplate } = compilation; - if ( - mainTemplate.hooks.bootstrap.isUsed() || - mainTemplate.hooks.localVars.isUsed() || - mainTemplate.hooks.requireEnsure.isUsed() || - mainTemplate.hooks.requireExtensions.isUsed() - ) { - compilation.addRuntimeModule(chunk, new CompatRuntimeModule()); - } - } - ); - JavascriptModulesPlugin.getCompilationHooks(compilation).chunkHash.tap( - "RuntimePlugin", - (chunk, hash, { chunkGraph }) => { - const xor = new StringXor(); - for (const m of chunkGraph.getChunkRuntimeModulesIterable(chunk)) { - xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); - } - xor.updateHash(hash); - } - ); - }); - } -} -module.exports = RuntimePlugin; - - -/***/ }), - -/***/ 30514: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const { equals } = __webpack_require__(28087); -const compileBooleanMatcher = __webpack_require__(73897); -const propertyAccess = __webpack_require__(67603); -const { forEachRuntime, subtractRuntime } = __webpack_require__(47462); - -/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @param {Module} module the module - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {string} error message - */ -const noModuleIdErrorMessage = (module, chunkGraph) => { - return `Module ${module.identifier()} has no id assigned. -This should not happen. -It's in these chunks: ${ - Array.from( - chunkGraph.getModuleChunksIterable(module), - c => c.name || c.id || c.debugId - ).join(", ") || "none" - } (If module is in no chunk this indicates a bug in some chunk/module optimization logic) -Module has these incoming connections: ${Array.from( - chunkGraph.moduleGraph.getIncomingConnections(module), - connection => - `\n - ${ - connection.originModule && connection.originModule.identifier() - } ${connection.dependency && connection.dependency.type} ${ - (connection.explanations && - Array.from(connection.explanations).join(", ")) || - "" - }` - ).join("")}`; -}; - -/** - * @param {string|undefined} definition global object definition - * @returns {string} save to use global object - */ -function getGlobalObject(definition) { - if (!definition) return definition; - const trimmed = definition.trim(); - - if ( - // identifier, we do not need real identifier regarding ECMAScript/Unicode - trimmed.match(/^[_\p{L}][_0-9\p{L}]*$/iu) || - // iife - // call expression - // expression in parentheses - trimmed.match(/^([_\p{L}][_0-9\p{L}]*)?\(.*\)$/iu) - ) - return trimmed; - - return `Object(${trimmed})`; -} - -class RuntimeTemplate { - /** - * @param {Compilation} compilation the compilation - * @param {OutputOptions} outputOptions the compilation output options - * @param {RequestShortener} requestShortener the request shortener - */ - constructor(compilation, outputOptions, requestShortener) { - this.compilation = compilation; - this.outputOptions = outputOptions || {}; - this.requestShortener = requestShortener; - this.globalObject = getGlobalObject(outputOptions.globalObject); - this.contentHashReplacement = "X".repeat(outputOptions.hashDigestLength); - } - - isIIFE() { - return this.outputOptions.iife; - } - - isModule() { - return this.outputOptions.module; - } - - supportsConst() { - return this.outputOptions.environment.const; - } - - supportsArrowFunction() { - return this.outputOptions.environment.arrowFunction; - } - - supportsOptionalChaining() { - return this.outputOptions.environment.optionalChaining; - } - - supportsForOf() { - return this.outputOptions.environment.forOf; - } - - supportsDestructuring() { - return this.outputOptions.environment.destructuring; - } - - supportsBigIntLiteral() { - return this.outputOptions.environment.bigIntLiteral; - } - - supportsDynamicImport() { - return this.outputOptions.environment.dynamicImport; - } - - supportsEcmaScriptModuleSyntax() { - return this.outputOptions.environment.module; - } - - supportTemplateLiteral() { - return this.outputOptions.environment.templateLiteral; - } - - returningFunction(returnValue, args = "") { - return this.supportsArrowFunction() - ? `(${args}) => (${returnValue})` - : `function(${args}) { return ${returnValue}; }`; - } - - basicFunction(args, body) { - return this.supportsArrowFunction() - ? `(${args}) => {\n${Template.indent(body)}\n}` - : `function(${args}) {\n${Template.indent(body)}\n}`; - } - - /** - * @param {Array} args args - * @returns {string} result expression - */ - concatenation(...args) { - const len = args.length; - - if (len === 2) return this._es5Concatenation(args); - if (len === 0) return '""'; - if (len === 1) { - return typeof args[0] === "string" - ? JSON.stringify(args[0]) - : `"" + ${args[0].expr}`; - } - if (!this.supportTemplateLiteral()) return this._es5Concatenation(args); - - // cost comparison between template literal and concatenation: - // both need equal surroundings: `xxx` vs "xxx" - // template literal has constant cost of 3 chars for each expression - // es5 concatenation has cost of 3 + n chars for n expressions in row - // when a es5 concatenation ends with an expression it reduces cost by 3 - // when a es5 concatenation starts with an single expression it reduces cost by 3 - // e. g. `${a}${b}${c}` (3*3 = 9) is longer than ""+a+b+c ((3+3)-3 = 3) - // e. g. `x${a}x${b}x${c}x` (3*3 = 9) is shorter than "x"+a+"x"+b+"x"+c+"x" (4+4+4 = 12) - - let templateCost = 0; - let concatenationCost = 0; - - let lastWasExpr = false; - for (const arg of args) { - const isExpr = typeof arg !== "string"; - if (isExpr) { - templateCost += 3; - concatenationCost += lastWasExpr ? 1 : 4; - } - lastWasExpr = isExpr; - } - if (lastWasExpr) concatenationCost -= 3; - if (typeof args[0] !== "string" && typeof args[1] === "string") - concatenationCost -= 3; - - if (concatenationCost <= templateCost) return this._es5Concatenation(args); - - return `\`${args - .map(arg => (typeof arg === "string" ? arg : `\${${arg.expr}}`)) - .join("")}\``; - } - - /** - * @param {Array} args args (len >= 2) - * @returns {string} result expression - * @private - */ - _es5Concatenation(args) { - const str = args - .map(arg => (typeof arg === "string" ? JSON.stringify(arg) : arg.expr)) - .join(" + "); - - // when the first two args are expression, we need to prepend "" + to force string - // concatenation instead of number addition. - return typeof args[0] !== "string" && typeof args[1] !== "string" - ? `"" + ${str}` - : str; - } - - expressionFunction(expression, args = "") { - return this.supportsArrowFunction() - ? `(${args}) => (${expression})` - : `function(${args}) { ${expression}; }`; - } - - emptyFunction() { - return this.supportsArrowFunction() ? "x => {}" : "function() {}"; - } - - destructureArray(items, value) { - return this.supportsDestructuring() - ? `var [${items.join(", ")}] = ${value};` - : Template.asString( - items.map((item, i) => `var ${item} = ${value}[${i}];`) - ); - } - - destructureObject(items, value) { - return this.supportsDestructuring() - ? `var {${items.join(", ")}} = ${value};` - : Template.asString( - items.map(item => `var ${item} = ${value}${propertyAccess([item])};`) - ); - } - - iife(args, body) { - return `(${this.basicFunction(args, body)})()`; - } - - forEach(variable, array, body) { - return this.supportsForOf() - ? `for(const ${variable} of ${array}) {\n${Template.indent(body)}\n}` - : `${array}.forEach(function(${variable}) {\n${Template.indent( - body - )}\n});`; - } - - /** - * Add a comment - * @param {object} options Information content of the comment - * @param {string=} options.request request string used originally - * @param {string=} options.chunkName name of the chunk referenced - * @param {string=} options.chunkReason reason information of the chunk - * @param {string=} options.message additional message - * @param {string=} options.exportName name of the export - * @returns {string} comment - */ - comment({ request, chunkName, chunkReason, message, exportName }) { - let content; - if (this.outputOptions.pathinfo) { - content = [message, request, chunkName, chunkReason] - .filter(Boolean) - .map(item => this.requestShortener.shorten(item)) - .join(" | "); - } else { - content = [message, chunkName, chunkReason] - .filter(Boolean) - .map(item => this.requestShortener.shorten(item)) - .join(" | "); - } - if (!content) return ""; - if (this.outputOptions.pathinfo) { - return Template.toComment(content) + " "; - } else { - return Template.toNormalComment(content) + " "; - } - } - - /** - * @param {object} options generation options - * @param {string=} options.request request string used originally - * @returns {string} generated error block - */ - throwMissingModuleErrorBlock({ request }) { - const err = `Cannot find module '${request}'`; - return `var e = new Error(${JSON.stringify( - err - )}); e.code = 'MODULE_NOT_FOUND'; throw e;`; - } - - /** - * @param {object} options generation options - * @param {string=} options.request request string used originally - * @returns {string} generated error function - */ - throwMissingModuleErrorFunction({ request }) { - return `function webpackMissingModule() { ${this.throwMissingModuleErrorBlock( - { request } - )} }`; - } - - /** - * @param {object} options generation options - * @param {string=} options.request request string used originally - * @returns {string} generated error IIFE - */ - missingModule({ request }) { - return `Object(${this.throwMissingModuleErrorFunction({ request })}())`; - } - - /** - * @param {object} options generation options - * @param {string=} options.request request string used originally - * @returns {string} generated error statement - */ - missingModuleStatement({ request }) { - return `${this.missingModule({ request })};\n`; - } - - /** - * @param {object} options generation options - * @param {string=} options.request request string used originally - * @returns {string} generated error code - */ - missingModulePromise({ request }) { - return `Promise.resolve().then(${this.throwMissingModuleErrorFunction({ - request - })})`; - } - - /** - * @param {Object} options options object - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {Module} options.module the module - * @param {string} options.request the request that should be printed as comment - * @param {string=} options.idExpr expression to use as id expression - * @param {"expression" | "promise" | "statements"} options.type which kind of code should be returned - * @returns {string} the code - */ - weakError({ module, chunkGraph, request, idExpr, type }) { - const moduleId = chunkGraph.getModuleId(module); - const errorMessage = - moduleId === null - ? JSON.stringify("Module is not available (weak dependency)") - : idExpr - ? `"Module '" + ${idExpr} + "' is not available (weak dependency)"` - : JSON.stringify( - `Module '${moduleId}' is not available (weak dependency)` - ); - const comment = request ? Template.toNormalComment(request) + " " : ""; - const errorStatements = - `var e = new Error(${errorMessage}); ` + - comment + - "e.code = 'MODULE_NOT_FOUND'; throw e;"; - switch (type) { - case "statements": - return errorStatements; - case "promise": - return `Promise.resolve().then(${this.basicFunction( - "", - errorStatements - )})`; - case "expression": - return this.iife("", errorStatements); - } - } - - /** - * @param {Object} options options object - * @param {Module} options.module the module - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {string} options.request the request that should be printed as comment - * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) - * @returns {string} the expression - */ - moduleId({ module, chunkGraph, request, weak }) { - if (!module) { - return this.missingModule({ - request - }); - } - const moduleId = chunkGraph.getModuleId(module); - if (moduleId === null) { - if (weak) { - return "null /* weak dependency, without id */"; - } - throw new Error( - `RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage( - module, - chunkGraph - )}` - ); - } - return `${this.comment({ request })}${JSON.stringify(moduleId)}`; - } - - /** - * @param {Object} options options object - * @param {Module} options.module the module - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {string} options.request the request that should be printed as comment - * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} the expression - */ - moduleRaw({ module, chunkGraph, request, weak, runtimeRequirements }) { - if (!module) { - return this.missingModule({ - request - }); - } - const moduleId = chunkGraph.getModuleId(module); - if (moduleId === null) { - if (weak) { - // only weak referenced modules don't get an id - // we can always emit an error emitting code here - return this.weakError({ - module, - chunkGraph, - request, - type: "expression" - }); - } - throw new Error( - `RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage( - module, - chunkGraph - )}` - ); - } - runtimeRequirements.add(RuntimeGlobals.require); - return `__webpack_require__(${this.moduleId({ - module, - chunkGraph, - request, - weak - })})`; - } - - /** - * @param {Object} options options object - * @param {Module} options.module the module - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {string} options.request the request that should be printed as comment - * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} the expression - */ - moduleExports({ module, chunkGraph, request, weak, runtimeRequirements }) { - return this.moduleRaw({ - module, - chunkGraph, - request, - weak, - runtimeRequirements - }); - } - - /** - * @param {Object} options options object - * @param {Module} options.module the module - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {string} options.request the request that should be printed as comment - * @param {boolean=} options.strict if the current module is in strict esm mode - * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} the expression - */ - moduleNamespace({ - module, - chunkGraph, - request, - strict, - weak, - runtimeRequirements - }) { - if (!module) { - return this.missingModule({ - request - }); - } - if (chunkGraph.getModuleId(module) === null) { - if (weak) { - // only weak referenced modules don't get an id - // we can always emit an error emitting code here - return this.weakError({ - module, - chunkGraph, - request, - type: "expression" - }); - } - throw new Error( - `RuntimeTemplate.moduleNamespace(): ${noModuleIdErrorMessage( - module, - chunkGraph - )}` - ); - } - const moduleId = this.moduleId({ - module, - chunkGraph, - request, - weak - }); - const exportsType = module.getExportsType(chunkGraph.moduleGraph, strict); - switch (exportsType) { - case "namespace": - return this.moduleRaw({ - module, - chunkGraph, - request, - weak, - runtimeRequirements - }); - case "default-with-named": - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 3)`; - case "default-only": - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 1)`; - case "dynamic": - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 7)`; - } - } - - /** - * @param {Object} options options object - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {AsyncDependenciesBlock=} options.block the current dependencies block - * @param {Module} options.module the module - * @param {string} options.request the request that should be printed as comment - * @param {string} options.message a message for the comment - * @param {boolean=} options.strict if the current module is in strict esm mode - * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} the promise expression - */ - moduleNamespacePromise({ - chunkGraph, - block, - module, - request, - message, - strict, - weak, - runtimeRequirements - }) { - if (!module) { - return this.missingModulePromise({ - request - }); - } - const moduleId = chunkGraph.getModuleId(module); - if (moduleId === null) { - if (weak) { - // only weak referenced modules don't get an id - // we can always emit an error emitting code here - return this.weakError({ - module, - chunkGraph, - request, - type: "promise" - }); - } - throw new Error( - `RuntimeTemplate.moduleNamespacePromise(): ${noModuleIdErrorMessage( - module, - chunkGraph - )}` - ); - } - const promise = this.blockPromise({ - chunkGraph, - block, - message, - runtimeRequirements - }); - - let appending; - let idExpr = JSON.stringify(chunkGraph.getModuleId(module)); - const comment = this.comment({ - request - }); - let header = ""; - if (weak) { - if (idExpr.length > 8) { - // 'var x="nnnnnn";x,"+x+",x' vs '"nnnnnn",nnnnnn,"nnnnnn"' - header += `var id = ${idExpr}; `; - idExpr = "id"; - } - runtimeRequirements.add(RuntimeGlobals.moduleFactories); - header += `if(!${ - RuntimeGlobals.moduleFactories - }[${idExpr}]) { ${this.weakError({ - module, - chunkGraph, - request, - idExpr, - type: "statements" - })} } `; - } - const moduleIdExpr = this.moduleId({ - module, - chunkGraph, - request, - weak - }); - const exportsType = module.getExportsType(chunkGraph.moduleGraph, strict); - let fakeType = 16; - switch (exportsType) { - case "namespace": - if (header) { - const rawModule = this.moduleRaw({ - module, - chunkGraph, - request, - weak, - runtimeRequirements - }); - appending = `.then(${this.basicFunction( - "", - `${header}return ${rawModule};` - )})`; - } else { - runtimeRequirements.add(RuntimeGlobals.require); - appending = `.then(__webpack_require__.bind(__webpack_require__, ${comment}${idExpr}))`; - } - break; - case "dynamic": - fakeType |= 4; - /* fall through */ - case "default-with-named": - fakeType |= 2; - /* fall through */ - case "default-only": - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - if (chunkGraph.moduleGraph.isAsync(module)) { - if (header) { - const rawModule = this.moduleRaw({ - module, - chunkGraph, - request, - weak, - runtimeRequirements - }); - appending = `.then(${this.basicFunction( - "", - `${header}return ${rawModule};` - )})`; - } else { - runtimeRequirements.add(RuntimeGlobals.require); - appending = `.then(__webpack_require__.bind(__webpack_require__, ${comment}${idExpr}))`; - } - appending += `.then(${this.returningFunction( - `${RuntimeGlobals.createFakeNamespaceObject}(m, ${fakeType})`, - "m" - )})`; - } else { - fakeType |= 1; - if (header) { - const returnExpression = `${RuntimeGlobals.createFakeNamespaceObject}(${moduleIdExpr}, ${fakeType})`; - appending = `.then(${this.basicFunction( - "", - `${header}return ${returnExpression};` - )})`; - } else { - appending = `.then(${RuntimeGlobals.createFakeNamespaceObject}.bind(__webpack_require__, ${comment}${idExpr}, ${fakeType}))`; - } - } - break; - } - - return `${promise || "Promise.resolve()"}${appending}`; - } - - /** - * @param {Object} options options object - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {RuntimeSpec=} options.runtime runtime for which this code will be generated - * @param {RuntimeSpec | boolean=} options.runtimeCondition only execute the statement in some runtimes - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} expression - */ - runtimeConditionExpression({ - chunkGraph, - runtimeCondition, - runtime, - runtimeRequirements - }) { - if (runtimeCondition === undefined) return "true"; - if (typeof runtimeCondition === "boolean") return `${runtimeCondition}`; - /** @type {Set} */ - const positiveRuntimeIds = new Set(); - forEachRuntime(runtimeCondition, runtime => - positiveRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`) - ); - /** @type {Set} */ - const negativeRuntimeIds = new Set(); - forEachRuntime(subtractRuntime(runtime, runtimeCondition), runtime => - negativeRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`) - ); - runtimeRequirements.add(RuntimeGlobals.runtimeId); - return compileBooleanMatcher.fromLists( - Array.from(positiveRuntimeIds), - Array.from(negativeRuntimeIds) - )(RuntimeGlobals.runtimeId); - } - - /** - * - * @param {Object} options options object - * @param {boolean=} options.update whether a new variable should be created or the existing one updated - * @param {Module} options.module the module - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {string} options.request the request that should be printed as comment - * @param {string} options.importVar name of the import variable - * @param {Module} options.originModule module in which the statement is emitted - * @param {boolean=} options.weak true, if this is a weak dependency - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {[string, string]} the import statement and the compat statement - */ - importStatement({ - update, - module, - chunkGraph, - request, - importVar, - originModule, - weak, - runtimeRequirements - }) { - if (!module) { - return [ - this.missingModuleStatement({ - request - }), - "" - ]; - } - if (chunkGraph.getModuleId(module) === null) { - if (weak) { - // only weak referenced modules don't get an id - // we can always emit an error emitting code here - return [ - this.weakError({ - module, - chunkGraph, - request, - type: "statements" - }), - "" - ]; - } - throw new Error( - `RuntimeTemplate.importStatement(): ${noModuleIdErrorMessage( - module, - chunkGraph - )}` - ); - } - const moduleId = this.moduleId({ - module, - chunkGraph, - request, - weak - }); - const optDeclaration = update ? "" : "var "; - - const exportsType = module.getExportsType( - chunkGraph.moduleGraph, - originModule.buildMeta.strictHarmonyModule - ); - runtimeRequirements.add(RuntimeGlobals.require); - const importContent = `/* harmony import */ ${optDeclaration}${importVar} = __webpack_require__(${moduleId});\n`; - - if (exportsType === "dynamic") { - runtimeRequirements.add(RuntimeGlobals.compatGetDefaultExport); - return [ - importContent, - `/* harmony import */ ${optDeclaration}${importVar}_default = /*#__PURE__*/${RuntimeGlobals.compatGetDefaultExport}(${importVar});\n` - ]; - } - return [importContent, ""]; - } - - /** - * @param {Object} options options - * @param {ModuleGraph} options.moduleGraph the module graph - * @param {Module} options.module the module - * @param {string} options.request the request - * @param {string | string[]} options.exportName the export name - * @param {Module} options.originModule the origin module - * @param {boolean|undefined} options.asiSafe true, if location is safe for ASI, a bracket can be emitted - * @param {boolean} options.isCall true, if expression will be called - * @param {boolean} options.callContext when false, call context will not be preserved - * @param {boolean} options.defaultInterop when true and accessing the default exports, interop code will be generated - * @param {string} options.importVar the identifier name of the import variable - * @param {InitFragment[]} options.initFragments init fragments will be added here - * @param {RuntimeSpec} options.runtime runtime for which this code will be generated - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} expression - */ - exportFromImport({ - moduleGraph, - module, - request, - exportName, - originModule, - asiSafe, - isCall, - callContext, - defaultInterop, - importVar, - initFragments, - runtime, - runtimeRequirements - }) { - if (!module) { - return this.missingModule({ - request - }); - } - if (!Array.isArray(exportName)) { - exportName = exportName ? [exportName] : []; - } - const exportsType = module.getExportsType( - moduleGraph, - originModule.buildMeta.strictHarmonyModule - ); - - if (defaultInterop) { - if (exportName.length > 0 && exportName[0] === "default") { - switch (exportsType) { - case "dynamic": - if (isCall) { - return `${importVar}_default()${propertyAccess(exportName, 1)}`; - } else { - return asiSafe - ? `(${importVar}_default()${propertyAccess(exportName, 1)})` - : asiSafe === false - ? `;(${importVar}_default()${propertyAccess(exportName, 1)})` - : `${importVar}_default.a${propertyAccess(exportName, 1)}`; - } - case "default-only": - case "default-with-named": - exportName = exportName.slice(1); - break; - } - } else if (exportName.length > 0) { - if (exportsType === "default-only") { - return ( - "/* non-default import from non-esm module */undefined" + - propertyAccess(exportName, 1) - ); - } else if ( - exportsType !== "namespace" && - exportName[0] === "__esModule" - ) { - return "/* __esModule */true"; - } - } else if ( - exportsType === "default-only" || - exportsType === "default-with-named" - ) { - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - initFragments.push( - new InitFragment( - `var ${importVar}_namespace_cache;\n`, - InitFragment.STAGE_CONSTANTS, - -1, - `${importVar}_namespace_cache` - ) - ); - return `/*#__PURE__*/ ${ - asiSafe ? "" : asiSafe === false ? ";" : "Object" - }(${importVar}_namespace_cache || (${importVar}_namespace_cache = ${ - RuntimeGlobals.createFakeNamespaceObject - }(${importVar}${exportsType === "default-only" ? "" : ", 2"})))`; - } - } - - if (exportName.length > 0) { - const exportsInfo = moduleGraph.getExportsInfo(module); - const used = exportsInfo.getUsedName(exportName, runtime); - if (!used) { - const comment = Template.toNormalComment( - `unused export ${propertyAccess(exportName)}` - ); - return `${comment} undefined`; - } - const comment = equals(used, exportName) - ? "" - : Template.toNormalComment(propertyAccess(exportName)) + " "; - const access = `${importVar}${comment}${propertyAccess(used)}`; - if (isCall && callContext === false) { - return asiSafe - ? `(0,${access})` - : asiSafe === false - ? `;(0,${access})` - : `/*#__PURE__*/Object(${access})`; - } - return access; - } else { - return importVar; - } - } - - /** - * @param {Object} options options - * @param {AsyncDependenciesBlock} options.block the async block - * @param {string} options.message the message - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} expression - */ - blockPromise({ block, message, chunkGraph, runtimeRequirements }) { - if (!block) { - const comment = this.comment({ - message - }); - return `Promise.resolve(${comment.trim()})`; - } - const chunkGroup = chunkGraph.getBlockChunkGroup(block); - if (!chunkGroup || chunkGroup.chunks.length === 0) { - const comment = this.comment({ - message - }); - return `Promise.resolve(${comment.trim()})`; - } - const chunks = chunkGroup.chunks.filter( - chunk => !chunk.hasRuntime() && chunk.id !== null - ); - const comment = this.comment({ - message, - chunkName: block.chunkName - }); - if (chunks.length === 1) { - const chunkId = JSON.stringify(chunks[0].id); - runtimeRequirements.add(RuntimeGlobals.ensureChunk); - return `${RuntimeGlobals.ensureChunk}(${comment}${chunkId})`; - } else if (chunks.length > 0) { - runtimeRequirements.add(RuntimeGlobals.ensureChunk); - const requireChunkId = chunk => - `${RuntimeGlobals.ensureChunk}(${JSON.stringify(chunk.id)})`; - return `Promise.all(${comment.trim()}[${chunks - .map(requireChunkId) - .join(", ")}])`; - } else { - return `Promise.resolve(${comment.trim()})`; - } - } - - /** - * @param {Object} options options - * @param {AsyncDependenciesBlock} options.block the async block - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @param {string=} options.request request string used originally - * @returns {string} expression - */ - asyncModuleFactory({ block, chunkGraph, runtimeRequirements, request }) { - const dep = block.dependencies[0]; - const module = chunkGraph.moduleGraph.getModule(dep); - const ensureChunk = this.blockPromise({ - block, - message: "", - chunkGraph, - runtimeRequirements - }); - const factory = this.returningFunction( - this.moduleRaw({ - module, - chunkGraph, - request, - runtimeRequirements - }) - ); - return this.returningFunction( - ensureChunk.startsWith("Promise.resolve(") - ? `${factory}` - : `${ensureChunk}.then(${this.returningFunction(factory)})` - ); - } - - /** - * @param {Object} options options - * @param {Dependency} options.dependency the dependency - * @param {ChunkGraph} options.chunkGraph the chunk graph - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @param {string=} options.request request string used originally - * @returns {string} expression - */ - syncModuleFactory({ dependency, chunkGraph, runtimeRequirements, request }) { - const module = chunkGraph.moduleGraph.getModule(dependency); - const factory = this.returningFunction( - this.moduleRaw({ - module, - chunkGraph, - request, - runtimeRequirements - }) - ); - return this.returningFunction(factory); - } - - /** - * @param {Object} options options - * @param {string} options.exportsArgument the name of the exports object - * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements - * @returns {string} statement - */ - defineEsModuleFlagStatement({ exportsArgument, runtimeRequirements }) { - runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); - runtimeRequirements.add(RuntimeGlobals.exports); - return `${RuntimeGlobals.makeNamespaceObject}(${exportsArgument});\n`; - } - - /** - * @param {Object} options options object - * @param {Module} options.module the module - * @param {string} options.publicPath the public path - * @param {RuntimeSpec=} options.runtime runtime - * @param {CodeGenerationResults} options.codeGenerationResults the code generation results - * @returns {string} the url of the asset - */ - assetUrl({ publicPath, runtime, module, codeGenerationResults }) { - if (!module) { - return "data:,"; - } - const codeGen = codeGenerationResults.get(module, runtime); - const { data } = codeGen; - const url = data.get("url"); - if (url) return url.toString(); - const filename = data.get("filename"); - return publicPath + filename; - } -} - -module.exports = RuntimeTemplate; - - -/***/ }), - -/***/ 75193: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -class SelfModuleFactory { - constructor(moduleGraph) { - this.moduleGraph = moduleGraph; - } - - create(data, callback) { - const module = this.moduleGraph.getParentModule(data.dependencies[0]); - callback(null, { - module - }); - } -} - -module.exports = SelfModuleFactory; - - -/***/ }), - -/***/ 25928: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -module.exports = __webpack_require__(19360); - - -/***/ }), - -/***/ 67309: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -/** - * @param {number} size the size in bytes - * @returns {string} the formatted size - */ -exports.formatSize = size => { - if (typeof size !== "number" || Number.isNaN(size) === true) { - return "unknown size"; - } - - if (size <= 0) { - return "0 bytes"; - } - - const abbreviations = ["bytes", "KiB", "MiB", "GiB"]; - const index = Math.floor(Math.log(size) / Math.log(1024)); - - return `${+(size / Math.pow(1024, index)).toPrecision(3)} ${ - abbreviations[index] - }`; -}; - - -/***/ }), - -/***/ 44717: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const JavascriptModulesPlugin = __webpack_require__(36109); - -/** @typedef {import("./Compilation")} Compilation */ - -class SourceMapDevToolModuleOptionsPlugin { - constructor(options) { - this.options = options; - } - - /** - * @param {Compilation} compilation the compiler instance - * @returns {void} - */ - apply(compilation) { - const options = this.options; - if (options.module !== false) { - compilation.hooks.buildModule.tap( - "SourceMapDevToolModuleOptionsPlugin", - module => { - module.useSourceMap = true; - } - ); - compilation.hooks.runtimeModule.tap( - "SourceMapDevToolModuleOptionsPlugin", - module => { - module.useSourceMap = true; - } - ); - } else { - compilation.hooks.buildModule.tap( - "SourceMapDevToolModuleOptionsPlugin", - module => { - module.useSimpleSourceMap = true; - } - ); - compilation.hooks.runtimeModule.tap( - "SourceMapDevToolModuleOptionsPlugin", - module => { - module.useSimpleSourceMap = true; - } - ); - } - JavascriptModulesPlugin.getCompilationHooks(compilation).useSourceMap.tap( - "SourceMapDevToolModuleOptionsPlugin", - () => true - ); - } -} - -module.exports = SourceMapDevToolModuleOptionsPlugin; - - -/***/ }), - -/***/ 63645: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const { ConcatSource, RawSource } = __webpack_require__(51255); -const Compilation = __webpack_require__(73002); -const ModuleFilenameHelpers = __webpack_require__(99523); -const ProgressPlugin = __webpack_require__(67317); -const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(44717); -const createSchemaValidation = __webpack_require__(89699); -const createHash = __webpack_require__(85205); -const { relative, dirname } = __webpack_require__(47077); -const { makePathsAbsolute } = __webpack_require__(20162); - -/** @typedef {import("webpack-sources").MapOptions} MapOptions */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */ -/** @typedef {import("./Cache").Etag} Etag */ -/** @typedef {import("./CacheFacade").ItemCacheFacade} ItemCacheFacade */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./NormalModule").SourceMap} SourceMap */ -/** @typedef {import("./util/Hash")} Hash */ - -const validate = createSchemaValidation( - __webpack_require__(74633), - () => __webpack_require__(52816), - { - name: "SourceMap DevTool Plugin", - baseDataPath: "options" - } -); -/** - * @typedef {object} SourceMapTask - * @property {Source} asset - * @property {AssetInfo} assetInfo - * @property {(string | Module)[]} modules - * @property {string} source - * @property {string} file - * @property {SourceMap} sourceMap - * @property {ItemCacheFacade} cacheItem cache item - */ - -/** - * Escapes regular expression metacharacters - * @param {string} str String to quote - * @returns {string} Escaped string - */ -const quoteMeta = str => { - return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); -}; - -/** - * Creating {@link SourceMapTask} for given file - * @param {string} file current compiled file - * @param {Source} asset the asset - * @param {AssetInfo} assetInfo the asset info - * @param {MapOptions} options source map options - * @param {Compilation} compilation compilation instance - * @param {ItemCacheFacade} cacheItem cache item - * @returns {SourceMapTask | undefined} created task instance or `undefined` - */ -const getTaskForFile = ( - file, - asset, - assetInfo, - options, - compilation, - cacheItem -) => { - let source; - /** @type {SourceMap} */ - let sourceMap; - /** - * Check if asset can build source map - */ - if (asset.sourceAndMap) { - const sourceAndMap = asset.sourceAndMap(options); - sourceMap = /** @type {SourceMap} */ (sourceAndMap.map); - source = sourceAndMap.source; - } else { - sourceMap = /** @type {SourceMap} */ (asset.map(options)); - source = asset.source(); - } - if (!sourceMap || typeof source !== "string") return; - const context = compilation.options.context; - const root = compilation.compiler.root; - const cachedAbsolutify = makePathsAbsolute.bindContextCache(context, root); - const modules = sourceMap.sources.map(source => { - if (!source.startsWith("webpack://")) return source; - source = cachedAbsolutify(source.slice(10)); - const module = compilation.findModule(source); - return module || source; - }); - - return { - file, - asset, - source, - assetInfo, - sourceMap, - modules, - cacheItem - }; -}; - -class SourceMapDevToolPlugin { - /** - * @param {SourceMapDevToolPluginOptions} [options] options object - * @throws {Error} throws error, if got more than 1 arguments - */ - constructor(options = {}) { - validate(options); - - /** @type {string | false} */ - this.sourceMapFilename = options.filename; - /** @type {string | false} */ - this.sourceMappingURLComment = - options.append === false - ? false - : options.append || "\n//# source" + "MappingURL=[url]"; - /** @type {string | Function} */ - this.moduleFilenameTemplate = - options.moduleFilenameTemplate || "webpack://[namespace]/[resourcePath]"; - /** @type {string | Function} */ - this.fallbackModuleFilenameTemplate = - options.fallbackModuleFilenameTemplate || - "webpack://[namespace]/[resourcePath]?[hash]"; - /** @type {string} */ - this.namespace = options.namespace || ""; - /** @type {SourceMapDevToolPluginOptions} */ - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler compiler instance - * @returns {void} - */ - apply(compiler) { - const outputFs = compiler.outputFileSystem; - const sourceMapFilename = this.sourceMapFilename; - const sourceMappingURLComment = this.sourceMappingURLComment; - const moduleFilenameTemplate = this.moduleFilenameTemplate; - const namespace = this.namespace; - const fallbackModuleFilenameTemplate = this.fallbackModuleFilenameTemplate; - const requestShortener = compiler.requestShortener; - const options = this.options; - options.test = options.test || /\.((c|m)?js|css)($|\?)/i; - - const matchObject = ModuleFilenameHelpers.matchObject.bind( - undefined, - options - ); - - compiler.hooks.compilation.tap("SourceMapDevToolPlugin", compilation => { - new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); - - compilation.hooks.processAssets.tapAsync( - { - name: "SourceMapDevToolPlugin", - stage: Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING, - additionalAssets: true - }, - (assets, callback) => { - const chunkGraph = compilation.chunkGraph; - const cache = compilation.getCache("SourceMapDevToolPlugin"); - /** @type {Map} */ - const moduleToSourceNameMapping = new Map(); - /** - * @type {Function} - * @returns {void} - */ - const reportProgress = - ProgressPlugin.getReporter(compilation.compiler) || (() => {}); - - /** @type {Map} */ - const fileToChunk = new Map(); - for (const chunk of compilation.chunks) { - for (const file of chunk.files) { - fileToChunk.set(file, chunk); - } - for (const file of chunk.auxiliaryFiles) { - fileToChunk.set(file, chunk); - } - } - - /** @type {string[]} */ - const files = []; - for (const file of Object.keys(assets)) { - if (matchObject(file)) { - files.push(file); - } - } - - reportProgress(0.0); - /** @type {SourceMapTask[]} */ - const tasks = []; - let fileIndex = 0; - - asyncLib.each( - files, - (file, callback) => { - const asset = compilation.getAsset(file); - if (asset.info.related && asset.info.related.sourceMap) { - fileIndex++; - return callback(); - } - const cacheItem = cache.getItemCache( - file, - cache.mergeEtags( - cache.getLazyHashedEtag(asset.source), - namespace - ) - ); - - cacheItem.get((err, cacheEntry) => { - if (err) { - return callback(err); - } - /** - * If presented in cache, reassigns assets. Cache assets already have source maps. - */ - if (cacheEntry) { - const { assets, assetsInfo } = cacheEntry; - for (const cachedFile of Object.keys(assets)) { - if (cachedFile === file) { - compilation.updateAsset( - cachedFile, - assets[cachedFile], - assetsInfo[cachedFile] - ); - } else { - compilation.emitAsset( - cachedFile, - assets[cachedFile], - assetsInfo[cachedFile] - ); - } - /** - * Add file to chunk, if not presented there - */ - if (cachedFile !== file) { - const chunk = fileToChunk.get(file); - if (chunk !== undefined) - chunk.auxiliaryFiles.add(cachedFile); - } - } - - reportProgress( - (0.5 * ++fileIndex) / files.length, - file, - "restored cached SourceMap" - ); - - return callback(); - } - - reportProgress( - (0.5 * fileIndex) / files.length, - file, - "generate SourceMap" - ); - - /** @type {SourceMapTask | undefined} */ - const task = getTaskForFile( - file, - asset.source, - asset.info, - { - module: options.module, - columns: options.columns - }, - compilation, - cacheItem - ); - - if (task) { - const modules = task.modules; - - for (let idx = 0; idx < modules.length; idx++) { - const module = modules[idx]; - if (!moduleToSourceNameMapping.get(module)) { - moduleToSourceNameMapping.set( - module, - ModuleFilenameHelpers.createFilename( - module, - { - moduleFilenameTemplate: moduleFilenameTemplate, - namespace: namespace - }, - { - requestShortener, - chunkGraph, - hashFunction: compilation.outputOptions.hashFunction - } - ) - ); - } - } - - tasks.push(task); - } - - reportProgress( - (0.5 * ++fileIndex) / files.length, - file, - "generated SourceMap" - ); - - callback(); - }); - }, - err => { - if (err) { - return callback(err); - } - - reportProgress(0.5, "resolve sources"); - /** @type {Set} */ - const usedNamesSet = new Set(moduleToSourceNameMapping.values()); - /** @type {Set} */ - const conflictDetectionSet = new Set(); - - /** - * all modules in defined order (longest identifier first) - * @type {Array} - */ - const allModules = Array.from( - moduleToSourceNameMapping.keys() - ).sort((a, b) => { - const ai = typeof a === "string" ? a : a.identifier(); - const bi = typeof b === "string" ? b : b.identifier(); - return ai.length - bi.length; - }); - - // find modules with conflicting source names - for (let idx = 0; idx < allModules.length; idx++) { - const module = allModules[idx]; - let sourceName = moduleToSourceNameMapping.get(module); - let hasName = conflictDetectionSet.has(sourceName); - if (!hasName) { - conflictDetectionSet.add(sourceName); - continue; - } - - // try the fallback name first - sourceName = ModuleFilenameHelpers.createFilename( - module, - { - moduleFilenameTemplate: fallbackModuleFilenameTemplate, - namespace: namespace - }, - { - requestShortener, - chunkGraph, - hashFunction: compilation.outputOptions.hashFunction - } - ); - hasName = usedNamesSet.has(sourceName); - if (!hasName) { - moduleToSourceNameMapping.set(module, sourceName); - usedNamesSet.add(sourceName); - continue; - } - - // otherwise just append stars until we have a valid name - while (hasName) { - sourceName += "*"; - hasName = usedNamesSet.has(sourceName); - } - moduleToSourceNameMapping.set(module, sourceName); - usedNamesSet.add(sourceName); - } - - let taskIndex = 0; - - asyncLib.each( - tasks, - (task, callback) => { - const assets = Object.create(null); - const assetsInfo = Object.create(null); - const file = task.file; - const chunk = fileToChunk.get(file); - const sourceMap = task.sourceMap; - const source = task.source; - const modules = task.modules; - - reportProgress( - 0.5 + (0.5 * taskIndex) / tasks.length, - file, - "attach SourceMap" - ); - - const moduleFilenames = modules.map(m => - moduleToSourceNameMapping.get(m) - ); - sourceMap.sources = moduleFilenames; - if (options.noSources) { - sourceMap.sourcesContent = undefined; - } - sourceMap.sourceRoot = options.sourceRoot || ""; - sourceMap.file = file; - const usesContentHash = - sourceMapFilename && - /\[contenthash(:\w+)?\]/.test(sourceMapFilename); - - // If SourceMap and asset uses contenthash, avoid a circular dependency by hiding hash in `file` - if (usesContentHash && task.assetInfo.contenthash) { - const contenthash = task.assetInfo.contenthash; - let pattern; - if (Array.isArray(contenthash)) { - pattern = contenthash.map(quoteMeta).join("|"); - } else { - pattern = quoteMeta(contenthash); - } - sourceMap.file = sourceMap.file.replace( - new RegExp(pattern, "g"), - m => "x".repeat(m.length) - ); - } - - /** @type {string | false} */ - let currentSourceMappingURLComment = sourceMappingURLComment; - if ( - currentSourceMappingURLComment !== false && - /\.css($|\?)/i.test(file) - ) { - currentSourceMappingURLComment = - currentSourceMappingURLComment.replace( - /^\n\/\/(.*)$/, - "\n/*$1*/" - ); - } - const sourceMapString = JSON.stringify(sourceMap); - if (sourceMapFilename) { - let filename = file; - const sourceMapContentHash = - usesContentHash && - /** @type {string} */ ( - createHash(compilation.outputOptions.hashFunction) - .update(sourceMapString) - .digest("hex") - ); - const pathParams = { - chunk, - filename: options.fileContext - ? relative( - outputFs, - `/${options.fileContext}`, - `/${filename}` - ) - : filename, - contentHash: sourceMapContentHash - }; - const { path: sourceMapFile, info: sourceMapInfo } = - compilation.getPathWithInfo( - sourceMapFilename, - pathParams - ); - const sourceMapUrl = options.publicPath - ? options.publicPath + sourceMapFile - : relative( - outputFs, - dirname(outputFs, `/${file}`), - `/${sourceMapFile}` - ); - /** @type {Source} */ - let asset = new RawSource(source); - if (currentSourceMappingURLComment !== false) { - // Add source map url to compilation asset, if currentSourceMappingURLComment is set - asset = new ConcatSource( - asset, - compilation.getPath( - currentSourceMappingURLComment, - Object.assign({ url: sourceMapUrl }, pathParams) - ) - ); - } - const assetInfo = { - related: { sourceMap: sourceMapFile } - }; - assets[file] = asset; - assetsInfo[file] = assetInfo; - compilation.updateAsset(file, asset, assetInfo); - // Add source map file to compilation assets and chunk files - const sourceMapAsset = new RawSource(sourceMapString); - const sourceMapAssetInfo = { - ...sourceMapInfo, - development: true - }; - assets[sourceMapFile] = sourceMapAsset; - assetsInfo[sourceMapFile] = sourceMapAssetInfo; - compilation.emitAsset( - sourceMapFile, - sourceMapAsset, - sourceMapAssetInfo - ); - if (chunk !== undefined) - chunk.auxiliaryFiles.add(sourceMapFile); - } else { - if (currentSourceMappingURLComment === false) { - throw new Error( - "SourceMapDevToolPlugin: append can't be false when no filename is provided" - ); - } - /** - * Add source map as data url to asset - */ - const asset = new ConcatSource( - new RawSource(source), - currentSourceMappingURLComment - .replace(/\[map\]/g, () => sourceMapString) - .replace( - /\[url\]/g, - () => - `data:application/json;charset=utf-8;base64,${Buffer.from( - sourceMapString, - "utf-8" - ).toString("base64")}` - ) - ); - assets[file] = asset; - assetsInfo[file] = undefined; - compilation.updateAsset(file, asset); - } - - task.cacheItem.store({ assets, assetsInfo }, err => { - reportProgress( - 0.5 + (0.5 * ++taskIndex) / tasks.length, - task.file, - "attached SourceMap" - ); - - if (err) { - return callback(err); - } - callback(); - }); - }, - err => { - reportProgress(1.0); - callback(err); - } - ); - } - ); - } - ); - }); - } -} - -module.exports = SourceMapDevToolPlugin; - - -/***/ }), - -/***/ 47158: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsCompilation} StatsCompilation */ - -class Stats { - /** - * @param {Compilation} compilation webpack compilation - */ - constructor(compilation) { - this.compilation = compilation; - } - - get hash() { - return this.compilation.hash; - } - - get startTime() { - return this.compilation.startTime; - } - - get endTime() { - return this.compilation.endTime; - } - - /** - * @returns {boolean} true if the compilation had a warning - */ - hasWarnings() { - return ( - this.compilation.warnings.length > 0 || - this.compilation.children.some(child => child.getStats().hasWarnings()) - ); - } - - /** - * @returns {boolean} true if the compilation encountered an error - */ - hasErrors() { - return ( - this.compilation.errors.length > 0 || - this.compilation.children.some(child => child.getStats().hasErrors()) - ); - } - - /** - * @param {(string|StatsOptions)=} options stats options - * @returns {StatsCompilation} json output - */ - toJson(options) { - options = this.compilation.createStatsOptions(options, { - forToString: false - }); - - const statsFactory = this.compilation.createStatsFactory(options); - - return statsFactory.create("compilation", this.compilation, { - compilation: this.compilation - }); - } - - toString(options) { - options = this.compilation.createStatsOptions(options, { - forToString: true - }); - - const statsFactory = this.compilation.createStatsFactory(options); - const statsPrinter = this.compilation.createStatsPrinter(options); - - const data = statsFactory.create("compilation", this.compilation, { - compilation: this.compilation - }); - const result = statsPrinter.print("compilation", data); - return result === undefined ? "" : result; - } -} - -module.exports = Stats; - - -/***/ }), - -/***/ 43841: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, PrefixSource } = __webpack_require__(51255); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compilation").PathData} PathData */ -/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ -/** @typedef {import("./RuntimeModule")} RuntimeModule */ -/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("./javascript/JavascriptModulesPlugin").ChunkRenderContext} ChunkRenderContext */ -/** @typedef {import("./javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ - -const START_LOWERCASE_ALPHABET_CODE = "a".charCodeAt(0); -const START_UPPERCASE_ALPHABET_CODE = "A".charCodeAt(0); -const DELTA_A_TO_Z = "z".charCodeAt(0) - START_LOWERCASE_ALPHABET_CODE + 1; -const NUMBER_OF_IDENTIFIER_START_CHARS = DELTA_A_TO_Z * 2 + 2; // a-z A-Z _ $ -const NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = - NUMBER_OF_IDENTIFIER_START_CHARS + 10; // a-z A-Z _ $ 0-9 -const FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g; -const INDENT_MULTILINE_REGEX = /^\t/gm; -const LINE_SEPARATOR_REGEX = /\r?\n/g; -const IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/; -const IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g; -const COMMENT_END_REGEX = /\*\//g; -const PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g; -const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; - -/** - * @typedef {Object} RenderManifestOptions - * @property {Chunk} chunk the chunk used to render - * @property {string} hash - * @property {string} fullHash - * @property {OutputOptions} outputOptions - * @property {CodeGenerationResults} codeGenerationResults - * @property {{javascript: ModuleTemplate}} moduleTemplates - * @property {DependencyTemplates} dependencyTemplates - * @property {RuntimeTemplate} runtimeTemplate - * @property {ModuleGraph} moduleGraph - * @property {ChunkGraph} chunkGraph - */ - -/** @typedef {RenderManifestEntryTemplated | RenderManifestEntryStatic} RenderManifestEntry */ - -/** - * @typedef {Object} RenderManifestEntryTemplated - * @property {function(): Source} render - * @property {string | function(PathData, AssetInfo=): string} filenameTemplate - * @property {PathData=} pathOptions - * @property {AssetInfo=} info - * @property {string} identifier - * @property {string=} hash - * @property {boolean=} auxiliary - */ - -/** - * @typedef {Object} RenderManifestEntryStatic - * @property {function(): Source} render - * @property {string} filename - * @property {AssetInfo} info - * @property {string} identifier - * @property {string=} hash - * @property {boolean=} auxiliary - */ - -/** - * @typedef {Object} HasId - * @property {number | string} id - */ - -/** - * @typedef {function(Module, number): boolean} ModuleFilterPredicate - */ - -class Template { - /** - * - * @param {Function} fn a runtime function (.runtime.js) "template" - * @returns {string} the updated and normalized function string - */ - static getFunctionContent(fn) { - return fn - .toString() - .replace(FUNCTION_CONTENT_REGEX, "") - .replace(INDENT_MULTILINE_REGEX, "") - .replace(LINE_SEPARATOR_REGEX, "\n"); - } - - /** - * @param {string} str the string converted to identifier - * @returns {string} created identifier - */ - static toIdentifier(str) { - if (typeof str !== "string") return ""; - return str - .replace(IDENTIFIER_NAME_REPLACE_REGEX, "_$1") - .replace(IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX, "_"); - } - /** - * - * @param {string} str string to be converted to commented in bundle code - * @returns {string} returns a commented version of string - */ - static toComment(str) { - if (!str) return ""; - return `/*! ${str.replace(COMMENT_END_REGEX, "* /")} */`; - } - - /** - * - * @param {string} str string to be converted to "normal comment" - * @returns {string} returns a commented version of string - */ - static toNormalComment(str) { - if (!str) return ""; - return `/* ${str.replace(COMMENT_END_REGEX, "* /")} */`; - } - - /** - * @param {string} str string path to be normalized - * @returns {string} normalized bundle-safe path - */ - static toPath(str) { - if (typeof str !== "string") return ""; - return str - .replace(PATH_NAME_NORMALIZE_REPLACE_REGEX, "-") - .replace(MATCH_PADDED_HYPHENS_REPLACE_REGEX, ""); - } - - // map number to a single character a-z, A-Z or multiple characters if number is too big - /** - * @param {number} n number to convert to ident - * @returns {string} returns single character ident - */ - static numberToIdentifier(n) { - if (n >= NUMBER_OF_IDENTIFIER_START_CHARS) { - // use multiple letters - return ( - Template.numberToIdentifier(n % NUMBER_OF_IDENTIFIER_START_CHARS) + - Template.numberToIdentifierContinuation( - Math.floor(n / NUMBER_OF_IDENTIFIER_START_CHARS) - ) - ); - } - - // lower case - if (n < DELTA_A_TO_Z) { - return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n); - } - n -= DELTA_A_TO_Z; - - // upper case - if (n < DELTA_A_TO_Z) { - return String.fromCharCode(START_UPPERCASE_ALPHABET_CODE + n); - } - - if (n === DELTA_A_TO_Z) return "_"; - return "$"; - } - - /** - * @param {number} n number to convert to ident - * @returns {string} returns single character ident - */ - static numberToIdentifierContinuation(n) { - if (n >= NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS) { - // use multiple letters - return ( - Template.numberToIdentifierContinuation( - n % NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS - ) + - Template.numberToIdentifierContinuation( - Math.floor(n / NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS) - ) - ); - } - - // lower case - if (n < DELTA_A_TO_Z) { - return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n); - } - n -= DELTA_A_TO_Z; - - // upper case - if (n < DELTA_A_TO_Z) { - return String.fromCharCode(START_UPPERCASE_ALPHABET_CODE + n); - } - n -= DELTA_A_TO_Z; - - // numbers - if (n < 10) { - return `${n}`; - } - - if (n === 10) return "_"; - return "$"; - } - - /** - * - * @param {string | string[]} s string to convert to identity - * @returns {string} converted identity - */ - static indent(s) { - if (Array.isArray(s)) { - return s.map(Template.indent).join("\n"); - } else { - const str = s.trimRight(); - if (!str) return ""; - const ind = str[0] === "\n" ? "" : "\t"; - return ind + str.replace(/\n([^\n])/g, "\n\t$1"); - } - } - - /** - * - * @param {string|string[]} s string to create prefix for - * @param {string} prefix prefix to compose - * @returns {string} returns new prefix string - */ - static prefix(s, prefix) { - const str = Template.asString(s).trim(); - if (!str) return ""; - const ind = str[0] === "\n" ? "" : prefix; - return ind + str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); - } - - /** - * - * @param {string|string[]} str string or string collection - * @returns {string} returns a single string from array - */ - static asString(str) { - if (Array.isArray(str)) { - return str.join("\n"); - } - return str; - } - - /** - * @typedef {Object} WithId - * @property {string|number} id - */ - - /** - * @param {WithId[]} modules a collection of modules to get array bounds for - * @returns {[number, number] | false} returns the upper and lower array bounds - * or false if not every module has a number based id - */ - static getModulesArrayBounds(modules) { - let maxId = -Infinity; - let minId = Infinity; - for (const module of modules) { - const moduleId = module.id; - if (typeof moduleId !== "number") return false; - if (maxId < moduleId) maxId = moduleId; - if (minId > moduleId) minId = moduleId; - } - if (minId < 16 + ("" + minId).length) { - // add minId x ',' instead of 'Array(minId).concat(…)' - minId = 0; - } - // start with -1 because the first module needs no comma - let objectOverhead = -1; - for (const module of modules) { - // module id + colon + comma - objectOverhead += `${module.id}`.length + 2; - } - // number of commas, or when starting non-zero the length of Array(minId).concat() - const arrayOverhead = minId === 0 ? maxId : 16 + `${minId}`.length + maxId; - return arrayOverhead < objectOverhead ? [minId, maxId] : false; - } - - /** - * @param {ChunkRenderContext} renderContext render context - * @param {Module[]} modules modules to render (should be ordered by identifier) - * @param {function(Module): Source} renderModule function to render a module - * @param {string=} prefix applying prefix strings - * @returns {Source} rendered chunk modules in a Source object - */ - static renderChunkModules(renderContext, modules, renderModule, prefix = "") { - const { chunkGraph } = renderContext; - var source = new ConcatSource(); - if (modules.length === 0) { - return null; - } - /** @type {{id: string|number, source: Source|string}[]} */ - const allModules = modules.map(module => { - return { - id: chunkGraph.getModuleId(module), - source: renderModule(module) || "false" - }; - }); - const bounds = Template.getModulesArrayBounds(allModules); - if (bounds) { - // Render a spare array - const minId = bounds[0]; - const maxId = bounds[1]; - if (minId !== 0) { - source.add(`Array(${minId}).concat(`); - } - source.add("[\n"); - /** @type {Map} */ - const modules = new Map(); - for (const module of allModules) { - modules.set(module.id, module); - } - for (let idx = minId; idx <= maxId; idx++) { - const module = modules.get(idx); - if (idx !== minId) { - source.add(",\n"); - } - source.add(`/* ${idx} */`); - if (module) { - source.add("\n"); - source.add(module.source); - } - } - source.add("\n" + prefix + "]"); - if (minId !== 0) { - source.add(")"); - } - } else { - // Render an object - source.add("{\n"); - for (let i = 0; i < allModules.length; i++) { - const module = allModules[i]; - if (i !== 0) { - source.add(",\n"); - } - source.add(`\n/***/ ${JSON.stringify(module.id)}:\n`); - source.add(module.source); - } - source.add(`\n\n${prefix}}`); - } - return source; - } - - /** - * @param {RuntimeModule[]} runtimeModules array of runtime modules in order - * @param {RenderContext & { codeGenerationResults?: CodeGenerationResults }} renderContext render context - * @returns {Source} rendered runtime modules in a Source object - */ - static renderRuntimeModules(runtimeModules, renderContext) { - const source = new ConcatSource(); - for (const module of runtimeModules) { - const codeGenerationResults = renderContext.codeGenerationResults; - let runtimeSource; - if (codeGenerationResults) { - runtimeSource = codeGenerationResults.getSource( - module, - renderContext.chunk.runtime, - "runtime" - ); - } else { - const codeGenResult = module.codeGeneration({ - chunkGraph: renderContext.chunkGraph, - dependencyTemplates: renderContext.dependencyTemplates, - moduleGraph: renderContext.moduleGraph, - runtimeTemplate: renderContext.runtimeTemplate, - runtime: renderContext.chunk.runtime, - codeGenerationResults - }); - if (!codeGenResult) continue; - runtimeSource = codeGenResult.sources.get("runtime"); - } - if (runtimeSource) { - source.add(Template.toNormalComment(module.identifier()) + "\n"); - if (!module.shouldIsolate()) { - source.add(runtimeSource); - source.add("\n\n"); - } else if (renderContext.runtimeTemplate.supportsArrowFunction()) { - source.add("(() => {\n"); - source.add(new PrefixSource("\t", runtimeSource)); - source.add("\n})();\n\n"); - } else { - source.add("!function() {\n"); - source.add(new PrefixSource("\t", runtimeSource)); - source.add("\n}();\n\n"); - } - } - } - return source; - } - - /** - * @param {RuntimeModule[]} runtimeModules array of runtime modules in order - * @param {RenderContext} renderContext render context - * @returns {Source} rendered chunk runtime modules in a Source object - */ - static renderChunkRuntimeModules(runtimeModules, renderContext) { - return new PrefixSource( - "/******/ ", - new ConcatSource( - "function(__webpack_require__) { // webpackRuntimeModules\n", - this.renderRuntimeModules(runtimeModules, renderContext), - "}\n" - ) - ); - } -} - -module.exports = Template; -module.exports.NUMBER_OF_IDENTIFIER_START_CHARS = - NUMBER_OF_IDENTIFIER_START_CHARS; -module.exports.NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = - NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS; - - -/***/ }), - -/***/ 78055: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Jason Anderson @diurnalist -*/ - - - -const mime = __webpack_require__(92414); -const { basename, extname } = __webpack_require__(71017); -const util = __webpack_require__(73837); -const Chunk = __webpack_require__(84891); -const Module = __webpack_require__(53840); -const { parseResource } = __webpack_require__(20162); - -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compilation").PathData} PathData */ -/** @typedef {import("./Compiler")} Compiler */ - -const REGEXP = /\[\\*([\w:]+)\\*\]/gi; - -const prepareId = id => { - if (typeof id !== "string") return id; - - if (/^"\s\+*.*\+\s*"$/.test(id)) { - const match = /^"\s\+*\s*(.*)\s*\+\s*"$/.exec(id); - - return `" + (${match[1]} + "").replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_") + "`; - } - - return id.replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_"); -}; - -const hashLength = (replacer, handler, assetInfo, hashName) => { - const fn = (match, arg, input) => { - let result; - const length = arg && parseInt(arg, 10); - - if (length && handler) { - result = handler(length); - } else { - const hash = replacer(match, arg, input); - - result = length ? hash.slice(0, length) : hash; - } - if (assetInfo) { - assetInfo.immutable = true; - if (Array.isArray(assetInfo[hashName])) { - assetInfo[hashName] = [...assetInfo[hashName], result]; - } else if (assetInfo[hashName]) { - assetInfo[hashName] = [assetInfo[hashName], result]; - } else { - assetInfo[hashName] = result; - } - } - return result; - }; - - return fn; -}; - -const replacer = (value, allowEmpty) => { - const fn = (match, arg, input) => { - if (typeof value === "function") { - value = value(); - } - if (value === null || value === undefined) { - if (!allowEmpty) { - throw new Error( - `Path variable ${match} not implemented in this context: ${input}` - ); - } - - return ""; - } else { - return `${value}`; - } - }; - - return fn; -}; - -const deprecationCache = new Map(); -const deprecatedFunction = (() => () => {})(); -const deprecated = (fn, message, code) => { - let d = deprecationCache.get(message); - if (d === undefined) { - d = util.deprecate(deprecatedFunction, message, code); - deprecationCache.set(message, d); - } - return (...args) => { - d(); - return fn(...args); - }; -}; - -/** - * @param {string | function(PathData, AssetInfo=): string} path the raw path - * @param {PathData} data context data - * @param {AssetInfo} assetInfo extra info about the asset (will be written to) - * @returns {string} the interpolated path - */ -const replacePathVariables = (path, data, assetInfo) => { - const chunkGraph = data.chunkGraph; - - /** @type {Map} */ - const replacements = new Map(); - - // Filename context - // - // Placeholders - // - // for /some/path/file.js?query#fragment: - // [file] - /some/path/file.js - // [query] - ?query - // [fragment] - #fragment - // [base] - file.js - // [path] - /some/path/ - // [name] - file - // [ext] - .js - if (typeof data.filename === "string") { - // check that filename is data uri - let match = data.filename.match(/^data:([^;,]+)/); - if (match) { - const ext = mime.extension(match[1]); - const emptyReplacer = replacer("", true); - - replacements.set("file", emptyReplacer); - replacements.set("query", emptyReplacer); - replacements.set("fragment", emptyReplacer); - replacements.set("path", emptyReplacer); - replacements.set("base", emptyReplacer); - replacements.set("name", emptyReplacer); - replacements.set("ext", replacer(ext ? `.${ext}` : "", true)); - // Legacy - replacements.set( - "filebase", - deprecated( - emptyReplacer, - "[filebase] is now [base]", - "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_FILENAME" - ) - ); - } else { - const { path: file, query, fragment } = parseResource(data.filename); - - const ext = extname(file); - const base = basename(file); - const name = base.slice(0, base.length - ext.length); - const path = file.slice(0, file.length - base.length); - - replacements.set("file", replacer(file)); - replacements.set("query", replacer(query, true)); - replacements.set("fragment", replacer(fragment, true)); - replacements.set("path", replacer(path, true)); - replacements.set("base", replacer(base)); - replacements.set("name", replacer(name)); - replacements.set("ext", replacer(ext, true)); - // Legacy - replacements.set( - "filebase", - deprecated( - replacer(base), - "[filebase] is now [base]", - "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_FILENAME" - ) - ); - } - } - - // Compilation context - // - // Placeholders - // - // [fullhash] - data.hash (3a4b5c6e7f) - // - // Legacy Placeholders - // - // [hash] - data.hash (3a4b5c6e7f) - if (data.hash) { - const hashReplacer = hashLength( - replacer(data.hash), - data.hashWithLength, - assetInfo, - "fullhash" - ); - - replacements.set("fullhash", hashReplacer); - - // Legacy - replacements.set( - "hash", - deprecated( - hashReplacer, - "[hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)", - "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH" - ) - ); - } - - // Chunk Context - // - // Placeholders - // - // [id] - chunk.id (0.js) - // [name] - chunk.name (app.js) - // [chunkhash] - chunk.hash (7823t4t4.js) - // [contenthash] - chunk.contentHash[type] (3256u3zg.js) - if (data.chunk) { - const chunk = data.chunk; - - const contentHashType = data.contentHashType; - - const idReplacer = replacer(chunk.id); - const nameReplacer = replacer(chunk.name || chunk.id); - const chunkhashReplacer = hashLength( - replacer(chunk instanceof Chunk ? chunk.renderedHash : chunk.hash), - "hashWithLength" in chunk ? chunk.hashWithLength : undefined, - assetInfo, - "chunkhash" - ); - const contenthashReplacer = hashLength( - replacer( - data.contentHash || - (contentHashType && - chunk.contentHash && - chunk.contentHash[contentHashType]) - ), - data.contentHashWithLength || - ("contentHashWithLength" in chunk && chunk.contentHashWithLength - ? chunk.contentHashWithLength[contentHashType] - : undefined), - assetInfo, - "contenthash" - ); - - replacements.set("id", idReplacer); - replacements.set("name", nameReplacer); - replacements.set("chunkhash", chunkhashReplacer); - replacements.set("contenthash", contenthashReplacer); - } - - // Module Context - // - // Placeholders - // - // [id] - module.id (2.png) - // [hash] - module.hash (6237543873.png) - // - // Legacy Placeholders - // - // [moduleid] - module.id (2.png) - // [modulehash] - module.hash (6237543873.png) - if (data.module) { - const module = data.module; - - const idReplacer = replacer(() => - prepareId( - module instanceof Module ? chunkGraph.getModuleId(module) : module.id - ) - ); - const moduleHashReplacer = hashLength( - replacer(() => - module instanceof Module - ? chunkGraph.getRenderedModuleHash(module, data.runtime) - : module.hash - ), - "hashWithLength" in module ? module.hashWithLength : undefined, - assetInfo, - "modulehash" - ); - const contentHashReplacer = hashLength( - replacer(data.contentHash), - undefined, - assetInfo, - "contenthash" - ); - - replacements.set("id", idReplacer); - replacements.set("modulehash", moduleHashReplacer); - replacements.set("contenthash", contentHashReplacer); - replacements.set( - "hash", - data.contentHash ? contentHashReplacer : moduleHashReplacer - ); - // Legacy - replacements.set( - "moduleid", - deprecated( - idReplacer, - "[moduleid] is now [id]", - "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_MODULE_ID" - ) - ); - } - - // Other things - if (data.url) { - replacements.set("url", replacer(data.url)); - } - if (typeof data.runtime === "string") { - replacements.set( - "runtime", - replacer(() => prepareId(data.runtime)) - ); - } else { - replacements.set("runtime", replacer("_")); - } - - if (typeof path === "function") { - path = path(data, assetInfo); - } - - path = path.replace(REGEXP, (match, content) => { - if (content.length + 2 === match.length) { - const contentMatch = /^(\w+)(?::(\w+))?$/.exec(content); - if (!contentMatch) return match; - const [, kind, arg] = contentMatch; - const replacer = replacements.get(kind); - if (replacer !== undefined) { - return replacer(match, arg, path); - } - } else if (match.startsWith("[\\") && match.endsWith("\\]")) { - return `[${match.slice(2, -2)}]`; - } - return match; - }); - - return path; -}; - -const plugin = "TemplatedPathPlugin"; - -class TemplatedPathPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap(plugin, compilation => { - compilation.hooks.assetPath.tap(plugin, replacePathVariables); - }); - } -} - -module.exports = TemplatedPathPlugin; - - -/***/ }), - -/***/ 69898: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -class UnhandledSchemeError extends WebpackError { - /** - * @param {string} scheme scheme - * @param {string} resource resource - */ - constructor(scheme, resource) { - super( - `Reading from "${resource}" is not handled by plugins (Unhandled scheme).` + - '\nWebpack supports "data:" and "file:" URIs by default.' + - `\nYou may need an additional plugin to handle "${scheme}:" URIs.` - ); - this.file = resource; - this.name = "UnhandledSchemeError"; - } -} - -makeSerializable( - UnhandledSchemeError, - "webpack/lib/UnhandledSchemeError", - "UnhandledSchemeError" -); - -module.exports = UnhandledSchemeError; - - -/***/ }), - -/***/ 17623: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ - -class UnsupportedFeatureWarning extends WebpackError { - /** - * @param {string} message description of warning - * @param {DependencyLocation} loc location start and end positions of the module - */ - constructor(message, loc) { - super(message); - - this.name = "UnsupportedFeatureWarning"; - this.loc = loc; - this.hideStack = true; - } -} - -makeSerializable( - UnsupportedFeatureWarning, - "webpack/lib/UnsupportedFeatureWarning" -); - -module.exports = UnsupportedFeatureWarning; - - -/***/ }), - -/***/ 67142: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConstDependency = __webpack_require__(14367); - -/** @typedef {import("./Compiler")} Compiler */ - -class UseStrictPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "UseStrictPlugin", - (compilation, { normalModuleFactory }) => { - const handler = parser => { - parser.hooks.program.tap("UseStrictPlugin", ast => { - const firstNode = ast.body[0]; - if ( - firstNode && - firstNode.type === "ExpressionStatement" && - firstNode.expression.type === "Literal" && - firstNode.expression.value === "use strict" - ) { - // Remove "use strict" expression. It will be added later by the renderer again. - // This is necessary in order to not break the strict mode when webpack prepends code. - // @see https://github.com/webpack/webpack/issues/1970 - const dep = new ConstDependency("", firstNode.range); - dep.loc = firstNode.loc; - parser.state.module.addPresentationalDependency(dep); - parser.state.module.buildInfo.strict = true; - } - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("UseStrictPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("UseStrictPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("UseStrictPlugin", handler); - } - ); - } -} - -module.exports = UseStrictPlugin; - - -/***/ }), - -/***/ 57804: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const CaseSensitiveModulesWarning = __webpack_require__(36715); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ - -class WarnCaseSensitiveModulesPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "WarnCaseSensitiveModulesPlugin", - compilation => { - compilation.hooks.seal.tap("WarnCaseSensitiveModulesPlugin", () => { - /** @type {Map>} */ - const moduleWithoutCase = new Map(); - for (const module of compilation.modules) { - const identifier = module.identifier(); - const lowerIdentifier = identifier.toLowerCase(); - let map = moduleWithoutCase.get(lowerIdentifier); - if (map === undefined) { - map = new Map(); - moduleWithoutCase.set(lowerIdentifier, map); - } - map.set(identifier, module); - } - for (const pair of moduleWithoutCase) { - const map = pair[1]; - if (map.size > 1) { - compilation.warnings.push( - new CaseSensitiveModulesWarning( - map.values(), - compilation.moduleGraph - ) - ); - } - } - }); - } - ); - } -} - -module.exports = WarnCaseSensitiveModulesPlugin; - - -/***/ }), - -/***/ 31481: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./Compiler")} Compiler */ - -class WarnDeprecatedOptionPlugin { - /** - * Create an instance of the plugin - * @param {string} option the target option - * @param {string | number} value the deprecated option value - * @param {string} suggestion the suggestion replacement - */ - constructor(option, value, suggestion) { - this.option = option; - this.value = value; - this.suggestion = suggestion; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "WarnDeprecatedOptionPlugin", - compilation => { - compilation.warnings.push( - new DeprecatedOptionWarning(this.option, this.value, this.suggestion) - ); - } - ); - } -} - -class DeprecatedOptionWarning extends WebpackError { - constructor(option, value, suggestion) { - super(); - - this.name = "DeprecatedOptionWarning"; - this.message = - "configuration\n" + - `The value '${value}' for option '${option}' is deprecated. ` + - `Use '${suggestion}' instead.`; - } -} - -module.exports = WarnDeprecatedOptionPlugin; - - -/***/ }), - -/***/ 28763: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NoModeWarning = __webpack_require__(95656); - -/** @typedef {import("./Compiler")} Compiler */ - -class WarnNoModeSetPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap("WarnNoModeSetPlugin", compilation => { - compilation.warnings.push(new NoModeWarning()); - }); - } -} - -module.exports = WarnNoModeSetPlugin; - - -/***/ }), - -/***/ 4179: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { groupBy } = __webpack_require__(28087); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../declarations/plugins/WatchIgnorePlugin").WatchIgnorePluginOptions} WatchIgnorePluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */ - -const validate = createSchemaValidation( - __webpack_require__(1553), - () => __webpack_require__(14814), - { - name: "Watch Ignore Plugin", - baseDataPath: "options" - } -); - -const IGNORE_TIME_ENTRY = "ignore"; - -class IgnoringWatchFileSystem { - /** - * @param {WatchFileSystem} wfs original file system - * @param {(string|RegExp)[]} paths ignored paths - */ - constructor(wfs, paths) { - this.wfs = wfs; - this.paths = paths; - } - - watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) { - files = Array.from(files); - dirs = Array.from(dirs); - const ignored = path => - this.paths.some(p => - p instanceof RegExp ? p.test(path) : path.indexOf(p) === 0 - ); - - const [ignoredFiles, notIgnoredFiles] = groupBy(files, ignored); - const [ignoredDirs, notIgnoredDirs] = groupBy(dirs, ignored); - - const watcher = this.wfs.watch( - notIgnoredFiles, - notIgnoredDirs, - missing, - startTime, - options, - (err, fileTimestamps, dirTimestamps, changedFiles, removedFiles) => { - if (err) return callback(err); - for (const path of ignoredFiles) { - fileTimestamps.set(path, IGNORE_TIME_ENTRY); - } - - for (const path of ignoredDirs) { - dirTimestamps.set(path, IGNORE_TIME_ENTRY); - } - - callback( - err, - fileTimestamps, - dirTimestamps, - changedFiles, - removedFiles - ); - }, - callbackUndelayed - ); - - return { - close: () => watcher.close(), - pause: () => watcher.pause(), - getContextTimeInfoEntries: () => { - const dirTimestamps = watcher.getContextTimeInfoEntries(); - for (const path of ignoredDirs) { - dirTimestamps.set(path, IGNORE_TIME_ENTRY); - } - return dirTimestamps; - }, - getFileTimeInfoEntries: () => { - const fileTimestamps = watcher.getFileTimeInfoEntries(); - for (const path of ignoredFiles) { - fileTimestamps.set(path, IGNORE_TIME_ENTRY); - } - return fileTimestamps; - }, - getInfo: - watcher.getInfo && - (() => { - const info = watcher.getInfo(); - const { fileTimeInfoEntries, contextTimeInfoEntries } = info; - for (const path of ignoredFiles) { - fileTimeInfoEntries.set(path, IGNORE_TIME_ENTRY); - } - for (const path of ignoredDirs) { - contextTimeInfoEntries.set(path, IGNORE_TIME_ENTRY); - } - return info; - }) - }; - } -} - -class WatchIgnorePlugin { - /** - * @param {WatchIgnorePluginOptions} options options - */ - constructor(options) { - validate(options); - this.paths = options.paths; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.afterEnvironment.tap("WatchIgnorePlugin", () => { - compiler.watchFileSystem = new IgnoringWatchFileSystem( - compiler.watchFileSystem, - this.paths - ); - }); - } -} - -module.exports = WatchIgnorePlugin; - - -/***/ }), - -/***/ 50313: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Stats = __webpack_require__(47158); - -/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ - -/** - * @template T - * @callback Callback - * @param {(Error | null)=} err - * @param {T=} result - */ - -class Watching { - /** - * @param {Compiler} compiler the compiler - * @param {WatchOptions} watchOptions options - * @param {Callback} handler completion handler - */ - constructor(compiler, watchOptions, handler) { - this.startTime = null; - this.invalid = false; - this.handler = handler; - /** @type {Callback[]} */ - this.callbacks = []; - /** @type {Callback[] | undefined} */ - this._closeCallbacks = undefined; - this.closed = false; - this.suspended = false; - this.blocked = false; - this._isBlocked = () => false; - this._onChange = () => {}; - this._onInvalid = () => {}; - if (typeof watchOptions === "number") { - this.watchOptions = { - aggregateTimeout: watchOptions - }; - } else if (watchOptions && typeof watchOptions === "object") { - this.watchOptions = { ...watchOptions }; - } else { - this.watchOptions = {}; - } - if (typeof this.watchOptions.aggregateTimeout !== "number") { - this.watchOptions.aggregateTimeout = 20; - } - this.compiler = compiler; - this.running = false; - this._initial = true; - this._invalidReported = true; - this._needRecords = true; - this.watcher = undefined; - this.pausedWatcher = undefined; - /** @type {Set} */ - this._collectedChangedFiles = undefined; - /** @type {Set} */ - this._collectedRemovedFiles = undefined; - this._done = this._done.bind(this); - process.nextTick(() => { - if (this._initial) this._invalidate(); - }); - } - - /** - * @param {ReadonlySet} changedFiles changed files - * @param {ReadonlySet} removedFiles removed files - */ - _mergeWithCollected(changedFiles, removedFiles) { - if (!changedFiles) return; - if (!this._collectedChangedFiles) { - this._collectedChangedFiles = new Set(changedFiles); - this._collectedRemovedFiles = new Set(removedFiles); - } else { - for (const file of changedFiles) { - this._collectedChangedFiles.add(file); - this._collectedRemovedFiles.delete(file); - } - for (const file of removedFiles) { - this._collectedChangedFiles.delete(file); - this._collectedRemovedFiles.add(file); - } - } - } - - /** - * @param {ReadonlyMap=} fileTimeInfoEntries info for files - * @param {ReadonlyMap=} contextTimeInfoEntries info for directories - * @param {ReadonlySet=} changedFiles changed files - * @param {ReadonlySet=} removedFiles removed files - * @returns {void} - */ - _go(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) { - this._initial = false; - if (this.startTime === null) this.startTime = Date.now(); - this.running = true; - if (this.watcher) { - this.pausedWatcher = this.watcher; - this.lastWatcherStartTime = Date.now(); - this.watcher.pause(); - this.watcher = null; - } else if (!this.lastWatcherStartTime) { - this.lastWatcherStartTime = Date.now(); - } - this.compiler.fsStartTime = Date.now(); - if ( - changedFiles && - removedFiles && - fileTimeInfoEntries && - contextTimeInfoEntries - ) { - this._mergeWithCollected(changedFiles, removedFiles); - this.compiler.fileTimestamps = fileTimeInfoEntries; - this.compiler.contextTimestamps = contextTimeInfoEntries; - } else if (this.pausedWatcher) { - if (this.pausedWatcher.getInfo) { - const { - changes, - removals, - fileTimeInfoEntries, - contextTimeInfoEntries - } = this.pausedWatcher.getInfo(); - this._mergeWithCollected(changes, removals); - this.compiler.fileTimestamps = fileTimeInfoEntries; - this.compiler.contextTimestamps = contextTimeInfoEntries; - } else { - this._mergeWithCollected( - this.pausedWatcher.getAggregatedChanges && - this.pausedWatcher.getAggregatedChanges(), - this.pausedWatcher.getAggregatedRemovals && - this.pausedWatcher.getAggregatedRemovals() - ); - this.compiler.fileTimestamps = - this.pausedWatcher.getFileTimeInfoEntries(); - this.compiler.contextTimestamps = - this.pausedWatcher.getContextTimeInfoEntries(); - } - } - this.compiler.modifiedFiles = this._collectedChangedFiles; - this._collectedChangedFiles = undefined; - this.compiler.removedFiles = this._collectedRemovedFiles; - this._collectedRemovedFiles = undefined; - - const run = () => { - if (this.compiler.idle) { - return this.compiler.cache.endIdle(err => { - if (err) return this._done(err); - this.compiler.idle = false; - run(); - }); - } - if (this._needRecords) { - return this.compiler.readRecords(err => { - if (err) return this._done(err); - - this._needRecords = false; - run(); - }); - } - this.invalid = false; - this._invalidReported = false; - this.compiler.hooks.watchRun.callAsync(this.compiler, err => { - if (err) return this._done(err); - const onCompiled = (err, compilation) => { - if (err) return this._done(err, compilation); - if (this.invalid) return this._done(null, compilation); - - if (this.compiler.hooks.shouldEmit.call(compilation) === false) { - return this._done(null, compilation); - } - - process.nextTick(() => { - const logger = compilation.getLogger("webpack.Compiler"); - logger.time("emitAssets"); - this.compiler.emitAssets(compilation, err => { - logger.timeEnd("emitAssets"); - if (err) return this._done(err, compilation); - if (this.invalid) return this._done(null, compilation); - - logger.time("emitRecords"); - this.compiler.emitRecords(err => { - logger.timeEnd("emitRecords"); - if (err) return this._done(err, compilation); - - if (compilation.hooks.needAdditionalPass.call()) { - compilation.needAdditionalPass = true; - - compilation.startTime = this.startTime; - compilation.endTime = Date.now(); - logger.time("done hook"); - const stats = new Stats(compilation); - this.compiler.hooks.done.callAsync(stats, err => { - logger.timeEnd("done hook"); - if (err) return this._done(err, compilation); - - this.compiler.hooks.additionalPass.callAsync(err => { - if (err) return this._done(err, compilation); - this.compiler.compile(onCompiled); - }); - }); - return; - } - return this._done(null, compilation); - }); - }); - }); - }; - this.compiler.compile(onCompiled); - }); - }; - - run(); - } - - /** - * @param {Compilation} compilation the compilation - * @returns {Stats} the compilation stats - */ - _getStats(compilation) { - const stats = new Stats(compilation); - return stats; - } - - /** - * @param {Error=} err an optional error - * @param {Compilation=} compilation the compilation - * @returns {void} - */ - _done(err, compilation) { - this.running = false; - - const logger = compilation && compilation.getLogger("webpack.Watching"); - - let stats = null; - - const handleError = (err, cbs) => { - this.compiler.hooks.failed.call(err); - this.compiler.cache.beginIdle(); - this.compiler.idle = true; - this.handler(err, stats); - if (!cbs) { - cbs = this.callbacks; - this.callbacks = []; - } - for (const cb of cbs) cb(err); - }; - - if ( - this.invalid && - !this.suspended && - !this.blocked && - !(this._isBlocked() && (this.blocked = true)) - ) { - if (compilation) { - logger.time("storeBuildDependencies"); - this.compiler.cache.storeBuildDependencies( - compilation.buildDependencies, - err => { - logger.timeEnd("storeBuildDependencies"); - if (err) return handleError(err); - this._go(); - } - ); - } else { - this._go(); - } - return; - } - - if (compilation) { - compilation.startTime = this.startTime; - compilation.endTime = Date.now(); - stats = new Stats(compilation); - } - this.startTime = null; - if (err) return handleError(err); - - const cbs = this.callbacks; - this.callbacks = []; - logger.time("done hook"); - this.compiler.hooks.done.callAsync(stats, err => { - logger.timeEnd("done hook"); - if (err) return handleError(err, cbs); - this.handler(null, stats); - logger.time("storeBuildDependencies"); - this.compiler.cache.storeBuildDependencies( - compilation.buildDependencies, - err => { - logger.timeEnd("storeBuildDependencies"); - if (err) return handleError(err, cbs); - logger.time("beginIdle"); - this.compiler.cache.beginIdle(); - this.compiler.idle = true; - logger.timeEnd("beginIdle"); - process.nextTick(() => { - if (!this.closed) { - this.watch( - compilation.fileDependencies, - compilation.contextDependencies, - compilation.missingDependencies - ); - } - }); - for (const cb of cbs) cb(null); - this.compiler.hooks.afterDone.call(stats); - } - ); - }); - } - - /** - * @param {Iterable} files watched files - * @param {Iterable} dirs watched directories - * @param {Iterable} missing watched existence entries - * @returns {void} - */ - watch(files, dirs, missing) { - this.pausedWatcher = null; - this.watcher = this.compiler.watchFileSystem.watch( - files, - dirs, - missing, - this.lastWatcherStartTime, - this.watchOptions, - ( - err, - fileTimeInfoEntries, - contextTimeInfoEntries, - changedFiles, - removedFiles - ) => { - if (err) { - this.compiler.modifiedFiles = undefined; - this.compiler.removedFiles = undefined; - this.compiler.fileTimestamps = undefined; - this.compiler.contextTimestamps = undefined; - this.compiler.fsStartTime = undefined; - return this.handler(err); - } - this._invalidate( - fileTimeInfoEntries, - contextTimeInfoEntries, - changedFiles, - removedFiles - ); - this._onChange(); - }, - (fileName, changeTime) => { - if (!this._invalidReported) { - this._invalidReported = true; - this.compiler.hooks.invalid.call(fileName, changeTime); - } - this._onInvalid(); - } - ); - } - - /** - * @param {Callback=} callback signals when the build has completed again - * @returns {void} - */ - invalidate(callback) { - if (callback) { - this.callbacks.push(callback); - } - if (!this._invalidReported) { - this._invalidReported = true; - this.compiler.hooks.invalid.call(null, Date.now()); - } - this._onChange(); - this._invalidate(); - } - - _invalidate( - fileTimeInfoEntries, - contextTimeInfoEntries, - changedFiles, - removedFiles - ) { - if (this.suspended || (this._isBlocked() && (this.blocked = true))) { - this._mergeWithCollected(changedFiles, removedFiles); - return; - } - - if (this.running) { - this._mergeWithCollected(changedFiles, removedFiles); - this.invalid = true; - } else { - this._go( - fileTimeInfoEntries, - contextTimeInfoEntries, - changedFiles, - removedFiles - ); - } - } - - suspend() { - this.suspended = true; - } - - resume() { - if (this.suspended) { - this.suspended = false; - this._invalidate(); - } - } - - /** - * @param {Callback} callback signals when the watcher is closed - * @returns {void} - */ - close(callback) { - if (this._closeCallbacks) { - if (callback) { - this._closeCallbacks.push(callback); - } - return; - } - const finalCallback = (err, compilation) => { - this.running = false; - this.compiler.running = false; - this.compiler.watching = undefined; - this.compiler.watchMode = false; - this.compiler.modifiedFiles = undefined; - this.compiler.removedFiles = undefined; - this.compiler.fileTimestamps = undefined; - this.compiler.contextTimestamps = undefined; - this.compiler.fsStartTime = undefined; - const shutdown = err => { - this.compiler.hooks.watchClose.call(); - const closeCallbacks = this._closeCallbacks; - this._closeCallbacks = undefined; - for (const cb of closeCallbacks) cb(err); - }; - if (compilation) { - const logger = compilation.getLogger("webpack.Watching"); - logger.time("storeBuildDependencies"); - this.compiler.cache.storeBuildDependencies( - compilation.buildDependencies, - err2 => { - logger.timeEnd("storeBuildDependencies"); - shutdown(err || err2); - } - ); - } else { - shutdown(err); - } - }; - - this.closed = true; - if (this.watcher) { - this.watcher.close(); - this.watcher = null; - } - if (this.pausedWatcher) { - this.pausedWatcher.close(); - this.pausedWatcher = null; - } - this._closeCallbacks = []; - if (callback) { - this._closeCallbacks.push(callback); - } - if (this.running) { - this.invalid = true; - this._done = finalCallback; - } else { - finalCallback(); - } - } -} - -module.exports = Watching; - - -/***/ }), - -/***/ 27154: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Jarid Margolin @jaridmargolin -*/ - - - -const inspect = (__webpack_require__(73837).inspect.custom); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ - -class WebpackError extends Error { - /** - * Creates an instance of WebpackError. - * @param {string=} message error message - */ - constructor(message) { - super(message); - - this.details = undefined; - /** @type {Module} */ - this.module = undefined; - /** @type {DependencyLocation} */ - this.loc = undefined; - /** @type {boolean} */ - this.hideStack = undefined; - /** @type {Chunk} */ - this.chunk = undefined; - /** @type {string} */ - this.file = undefined; - } - - [inspect]() { - return this.stack + (this.details ? `\n${this.details}` : ""); - } - - serialize({ write }) { - write(this.name); - write(this.message); - write(this.stack); - write(this.details); - write(this.loc); - write(this.hideStack); - } - - deserialize({ read }) { - this.name = read(); - this.message = read(); - this.stack = read(); - this.details = read(); - this.loc = read(); - this.hideStack = read(); - } -} - -makeSerializable(WebpackError, "webpack/lib/WebpackError"); - -module.exports = WebpackError; - - -/***/ }), - -/***/ 3756: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const IgnoreErrorModuleFactory = __webpack_require__(6720); -const WebpackIsIncludedDependency = __webpack_require__(64111); -const { - toConstantDependency -} = __webpack_require__(97574); - -/** @typedef {import("enhanced-resolve/lib/Resolver")} Resolver */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -class WebpackIsIncludedPlugin { - /** - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "WebpackIsIncludedPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - WebpackIsIncludedDependency, - new IgnoreErrorModuleFactory(normalModuleFactory) - ); - compilation.dependencyTemplates.set( - WebpackIsIncludedDependency, - new WebpackIsIncludedDependency.Template() - ); - - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - const handler = parser => { - parser.hooks.call - .for("__webpack_is_included__") - .tap("WebpackIsIncludedPlugin", expr => { - if ( - expr.type !== "CallExpression" || - expr.arguments.length !== 1 || - expr.arguments[0].type === "SpreadElement" - ) - return; - - const request = parser.evaluateExpression(expr.arguments[0]); - - if (!request.isString()) return; - - const dep = new WebpackIsIncludedDependency( - request.string, - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return true; - }); - parser.hooks.typeof - .for("__webpack_is_included__") - .tap( - "WebpackIsIncludedPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("WebpackIsIncludedPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("WebpackIsIncludedPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("WebpackIsIncludedPlugin", handler); - } - ); - } -} - -module.exports = WebpackIsIncludedPlugin; - - -/***/ }), - -/***/ 73305: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const OptionsApply = __webpack_require__(23787); - -const AssetModulesPlugin = __webpack_require__(53694); -const JavascriptModulesPlugin = __webpack_require__(36109); -const JsonModulesPlugin = __webpack_require__(61014); - -const ChunkPrefetchPreloadPlugin = __webpack_require__(7006); - -const EntryOptionPlugin = __webpack_require__(2699); -const RecordIdsPlugin = __webpack_require__(91060); - -const RuntimePlugin = __webpack_require__(92419); - -const APIPlugin = __webpack_require__(77661); -const CompatibilityPlugin = __webpack_require__(39220); -const ConstPlugin = __webpack_require__(37163); -const ExportsInfoApiPlugin = __webpack_require__(38460); -const WebpackIsIncludedPlugin = __webpack_require__(3756); - -const TemplatedPathPlugin = __webpack_require__(78055); -const UseStrictPlugin = __webpack_require__(67142); -const WarnCaseSensitiveModulesPlugin = __webpack_require__(57804); - -const DataUriPlugin = __webpack_require__(36435); -const FileUriPlugin = __webpack_require__(17613); - -const ResolverCachePlugin = __webpack_require__(94834); - -const CommonJsPlugin = __webpack_require__(93075); -const HarmonyModulesPlugin = __webpack_require__(43047); -const ImportMetaContextPlugin = __webpack_require__(87790); -const ImportMetaPlugin = __webpack_require__(23009); -const ImportPlugin = __webpack_require__(7604); -const LoaderPlugin = __webpack_require__(21422); -const RequireContextPlugin = __webpack_require__(52138); -const RequireEnsurePlugin = __webpack_require__(26278); -const RequireIncludePlugin = __webpack_require__(75061); -const SystemPlugin = __webpack_require__(90020); -const URLPlugin = __webpack_require__(34822); -const WorkerPlugin = __webpack_require__(70298); - -const InferAsyncModulesPlugin = __webpack_require__(57396); - -const JavascriptMetaInfoPlugin = __webpack_require__(82833); -const DefaultStatsFactoryPlugin = __webpack_require__(11285); -const DefaultStatsPresetPlugin = __webpack_require__(16478); -const DefaultStatsPrinterPlugin = __webpack_require__(7058); - -const { cleverMerge } = __webpack_require__(22093); - -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./Compiler")} Compiler */ - -class WebpackOptionsApply extends OptionsApply { - constructor() { - super(); - } - - /** - * @param {WebpackOptions} options options object - * @param {Compiler} compiler compiler object - * @returns {WebpackOptions} options object - */ - process(options, compiler) { - compiler.outputPath = options.output.path; - compiler.recordsInputPath = options.recordsInputPath || null; - compiler.recordsOutputPath = options.recordsOutputPath || null; - compiler.name = options.name; - - if (options.externals) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ExternalsPlugin = __webpack_require__(51562); - new ExternalsPlugin(options.externalsType, options.externals).apply( - compiler - ); - } - - if (options.externalsPresets.node) { - const NodeTargetPlugin = __webpack_require__(23066); - new NodeTargetPlugin().apply(compiler); - } - if (options.externalsPresets.electronMain) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ElectronTargetPlugin = __webpack_require__(83290); - new ElectronTargetPlugin("main").apply(compiler); - } - if (options.externalsPresets.electronPreload) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ElectronTargetPlugin = __webpack_require__(83290); - new ElectronTargetPlugin("preload").apply(compiler); - } - if (options.externalsPresets.electronRenderer) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ElectronTargetPlugin = __webpack_require__(83290); - new ElectronTargetPlugin("renderer").apply(compiler); - } - if ( - options.externalsPresets.electron && - !options.externalsPresets.electronMain && - !options.externalsPresets.electronPreload && - !options.externalsPresets.electronRenderer - ) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ElectronTargetPlugin = __webpack_require__(83290); - new ElectronTargetPlugin().apply(compiler); - } - if (options.externalsPresets.nwjs) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ExternalsPlugin = __webpack_require__(51562); - new ExternalsPlugin("node-commonjs", "nw.gui").apply(compiler); - } - if (options.externalsPresets.webAsync) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ExternalsPlugin = __webpack_require__(51562); - new ExternalsPlugin( - "import", - options.experiments.css - ? ({ request, dependencyType }, callback) => { - if (dependencyType === "url") { - if (/^(\/\/|https?:\/\/)/.test(request)) - return callback(null, `asset ${request}`); - } else if (dependencyType === "css-import") { - if (/^(\/\/|https?:\/\/)/.test(request)) - return callback(null, `css-import ${request}`); - } else if (/^(\/\/|https?:\/\/|std:)/.test(request)) { - if (/^\.css(\?|$)/.test(request)) - return callback(null, `css-import ${request}`); - return callback(null, `import ${request}`); - } - callback(); - } - : /^(\/\/|https?:\/\/|std:)/ - ).apply(compiler); - } else if (options.externalsPresets.web) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const ExternalsPlugin = __webpack_require__(51562); - new ExternalsPlugin( - "module", - options.experiments.css - ? ({ request, dependencyType }, callback) => { - if (dependencyType === "url") { - if (/^(\/\/|https?:\/\/)/.test(request)) - return callback(null, `asset ${request}`); - } else if (dependencyType === "css-import") { - if (/^(\/\/|https?:\/\/)/.test(request)) - return callback(null, `css-import ${request}`); - } else if (/^(\/\/|https?:\/\/|std:)/.test(request)) { - if (/^\.css(\?|$)/.test(request)) - return callback(null, `css-import ${request}`); - return callback(null, `module ${request}`); - } - callback(); - } - : /^(\/\/|https?:\/\/|std:)/ - ).apply(compiler); - } - - new ChunkPrefetchPreloadPlugin().apply(compiler); - - if (typeof options.output.chunkFormat === "string") { - switch (options.output.chunkFormat) { - case "array-push": { - const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(54433); - new ArrayPushCallbackChunkFormatPlugin().apply(compiler); - break; - } - case "commonjs": { - const CommonJsChunkFormatPlugin = __webpack_require__(93547); - new CommonJsChunkFormatPlugin().apply(compiler); - break; - } - case "module": { - const ModuleChunkFormatPlugin = __webpack_require__(94270); - new ModuleChunkFormatPlugin().apply(compiler); - break; - } - default: - throw new Error( - "Unsupported chunk format '" + options.output.chunkFormat + "'." - ); - } - } - - if (options.output.enabledChunkLoadingTypes.length > 0) { - for (const type of options.output.enabledChunkLoadingTypes) { - const EnableChunkLoadingPlugin = __webpack_require__(49548); - new EnableChunkLoadingPlugin(type).apply(compiler); - } - } - - if (options.output.enabledWasmLoadingTypes.length > 0) { - for (const type of options.output.enabledWasmLoadingTypes) { - const EnableWasmLoadingPlugin = __webpack_require__(90115); - new EnableWasmLoadingPlugin(type).apply(compiler); - } - } - - if (options.output.enabledLibraryTypes.length > 0) { - for (const type of options.output.enabledLibraryTypes) { - const EnableLibraryPlugin = __webpack_require__(7616); - new EnableLibraryPlugin(type).apply(compiler); - } - } - - if (options.output.pathinfo) { - const ModuleInfoHeaderPlugin = __webpack_require__(56204); - new ModuleInfoHeaderPlugin(options.output.pathinfo !== true).apply( - compiler - ); - } - - if (options.output.clean) { - const CleanPlugin = __webpack_require__(40135); - new CleanPlugin( - options.output.clean === true ? {} : options.output.clean - ).apply(compiler); - } - - if (options.devtool) { - if (options.devtool.includes("source-map")) { - const hidden = options.devtool.includes("hidden"); - const inline = options.devtool.includes("inline"); - const evalWrapped = options.devtool.includes("eval"); - const cheap = options.devtool.includes("cheap"); - const moduleMaps = options.devtool.includes("module"); - const noSources = options.devtool.includes("nosources"); - const Plugin = evalWrapped - ? __webpack_require__(67470) - : __webpack_require__(63645); - new Plugin({ - filename: inline ? null : options.output.sourceMapFilename, - moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, - fallbackModuleFilenameTemplate: - options.output.devtoolFallbackModuleFilenameTemplate, - append: hidden ? false : undefined, - module: moduleMaps ? true : cheap ? false : true, - columns: cheap ? false : true, - noSources: noSources, - namespace: options.output.devtoolNamespace - }).apply(compiler); - } else if (options.devtool.includes("eval")) { - const EvalDevToolModulePlugin = __webpack_require__(76289); - new EvalDevToolModulePlugin({ - moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, - namespace: options.output.devtoolNamespace - }).apply(compiler); - } - } - - new JavascriptModulesPlugin().apply(compiler); - new JsonModulesPlugin().apply(compiler); - new AssetModulesPlugin().apply(compiler); - - if (!options.experiments.outputModule) { - if (options.output.module) { - throw new Error( - "'output.module: true' is only allowed when 'experiments.outputModule' is enabled" - ); - } - if (options.output.enabledLibraryTypes.includes("module")) { - throw new Error( - "library type \"module\" is only allowed when 'experiments.outputModule' is enabled" - ); - } - if (options.externalsType === "module") { - throw new Error( - "'externalsType: \"module\"' is only allowed when 'experiments.outputModule' is enabled" - ); - } - } - - if (options.experiments.syncWebAssembly) { - const WebAssemblyModulesPlugin = __webpack_require__(38372); - new WebAssemblyModulesPlugin({ - mangleImports: options.optimization.mangleWasmImports - }).apply(compiler); - } - - if (options.experiments.asyncWebAssembly) { - const AsyncWebAssemblyModulesPlugin = __webpack_require__(24979); - new AsyncWebAssemblyModulesPlugin({ - mangleImports: options.optimization.mangleWasmImports - }).apply(compiler); - } - - if (options.experiments.css) { - const CssModulesPlugin = __webpack_require__(39693); - new CssModulesPlugin(options.experiments.css).apply(compiler); - } - - if (options.experiments.lazyCompilation) { - const LazyCompilationPlugin = __webpack_require__(94798); - const lazyOptions = - typeof options.experiments.lazyCompilation === "object" - ? options.experiments.lazyCompilation - : null; - new LazyCompilationPlugin({ - backend: - typeof lazyOptions.backend === "function" - ? lazyOptions.backend - : __webpack_require__(10867)({ - ...lazyOptions.backend, - client: - (lazyOptions.backend && lazyOptions.backend.client) || - options.externalsPresets.node ? __webpack_require__.ab + "lazy-compilation-node.js" : __webpack_require__.ab + "lazy-compilation-web.js" - }), - entries: !lazyOptions || lazyOptions.entries !== false, - imports: !lazyOptions || lazyOptions.imports !== false, - test: (lazyOptions && lazyOptions.test) || undefined - }).apply(compiler); - } - - if (options.experiments.buildHttp) { - const HttpUriPlugin = __webpack_require__(89674); - const httpOptions = options.experiments.buildHttp; - new HttpUriPlugin(httpOptions).apply(compiler); - } - - new EntryOptionPlugin().apply(compiler); - compiler.hooks.entryOption.call(options.context, options.entry); - - new RuntimePlugin().apply(compiler); - - new InferAsyncModulesPlugin().apply(compiler); - - new DataUriPlugin().apply(compiler); - new FileUriPlugin().apply(compiler); - - new CompatibilityPlugin().apply(compiler); - new HarmonyModulesPlugin({ - topLevelAwait: options.experiments.topLevelAwait - }).apply(compiler); - if (options.amd !== false) { - const AMDPlugin = __webpack_require__(88646); - const RequireJsStuffPlugin = __webpack_require__(95173); - new AMDPlugin(options.amd || {}).apply(compiler); - new RequireJsStuffPlugin().apply(compiler); - } - new CommonJsPlugin().apply(compiler); - new LoaderPlugin({}).apply(compiler); - if (options.node !== false) { - const NodeStuffPlugin = __webpack_require__(17336); - new NodeStuffPlugin(options.node).apply(compiler); - } - new APIPlugin().apply(compiler); - new ExportsInfoApiPlugin().apply(compiler); - new WebpackIsIncludedPlugin().apply(compiler); - new ConstPlugin().apply(compiler); - new UseStrictPlugin().apply(compiler); - new RequireIncludePlugin().apply(compiler); - new RequireEnsurePlugin().apply(compiler); - new RequireContextPlugin().apply(compiler); - new ImportPlugin().apply(compiler); - new ImportMetaContextPlugin().apply(compiler); - new SystemPlugin().apply(compiler); - new ImportMetaPlugin().apply(compiler); - new URLPlugin().apply(compiler); - new WorkerPlugin( - options.output.workerChunkLoading, - options.output.workerWasmLoading, - options.output.module - ).apply(compiler); - - new DefaultStatsFactoryPlugin().apply(compiler); - new DefaultStatsPresetPlugin().apply(compiler); - new DefaultStatsPrinterPlugin().apply(compiler); - - new JavascriptMetaInfoPlugin().apply(compiler); - - if (typeof options.mode !== "string") { - const WarnNoModeSetPlugin = __webpack_require__(28763); - new WarnNoModeSetPlugin().apply(compiler); - } - - const EnsureChunkConditionsPlugin = __webpack_require__(59869); - new EnsureChunkConditionsPlugin().apply(compiler); - if (options.optimization.removeAvailableModules) { - const RemoveParentModulesPlugin = __webpack_require__(19906); - new RemoveParentModulesPlugin().apply(compiler); - } - if (options.optimization.removeEmptyChunks) { - const RemoveEmptyChunksPlugin = __webpack_require__(88876); - new RemoveEmptyChunksPlugin().apply(compiler); - } - if (options.optimization.mergeDuplicateChunks) { - const MergeDuplicateChunksPlugin = __webpack_require__(88831); - new MergeDuplicateChunksPlugin().apply(compiler); - } - if (options.optimization.flagIncludedChunks) { - const FlagIncludedChunksPlugin = __webpack_require__(58794); - new FlagIncludedChunksPlugin().apply(compiler); - } - if (options.optimization.sideEffects) { - const SideEffectsFlagPlugin = __webpack_require__(94281); - new SideEffectsFlagPlugin( - options.optimization.sideEffects === true - ).apply(compiler); - } - if (options.optimization.providedExports) { - const FlagDependencyExportsPlugin = __webpack_require__(90124); - new FlagDependencyExportsPlugin().apply(compiler); - } - if (options.optimization.usedExports) { - const FlagDependencyUsagePlugin = __webpack_require__(71768); - new FlagDependencyUsagePlugin( - options.optimization.usedExports === "global" - ).apply(compiler); - } - if (options.optimization.innerGraph) { - const InnerGraphPlugin = __webpack_require__(69129); - new InnerGraphPlugin().apply(compiler); - } - if (options.optimization.mangleExports) { - const MangleExportsPlugin = __webpack_require__(41199); - new MangleExportsPlugin( - options.optimization.mangleExports !== "size" - ).apply(compiler); - } - if (options.optimization.concatenateModules) { - const ModuleConcatenationPlugin = __webpack_require__(5279); - new ModuleConcatenationPlugin().apply(compiler); - } - if (options.optimization.splitChunks) { - const SplitChunksPlugin = __webpack_require__(61167); - new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler); - } - if (options.optimization.runtimeChunk) { - const RuntimeChunkPlugin = __webpack_require__(57105); - new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler); - } - if (!options.optimization.emitOnErrors) { - const NoEmitOnErrorsPlugin = __webpack_require__(424); - new NoEmitOnErrorsPlugin().apply(compiler); - } - if (options.optimization.realContentHash) { - const RealContentHashPlugin = __webpack_require__(33347); - new RealContentHashPlugin({ - hashFunction: options.output.hashFunction, - hashDigest: options.output.hashDigest - }).apply(compiler); - } - if (options.optimization.checkWasmTypes) { - const WasmFinalizeExportsPlugin = __webpack_require__(15578); - new WasmFinalizeExportsPlugin().apply(compiler); - } - const moduleIds = options.optimization.moduleIds; - if (moduleIds) { - switch (moduleIds) { - case "natural": { - const NaturalModuleIdsPlugin = __webpack_require__(74040); - new NaturalModuleIdsPlugin().apply(compiler); - break; - } - case "named": { - const NamedModuleIdsPlugin = __webpack_require__(23405); - new NamedModuleIdsPlugin().apply(compiler); - break; - } - case "hashed": { - const WarnDeprecatedOptionPlugin = __webpack_require__(31481); - const HashedModuleIdsPlugin = __webpack_require__(13340); - new WarnDeprecatedOptionPlugin( - "optimization.moduleIds", - "hashed", - "deterministic" - ).apply(compiler); - new HashedModuleIdsPlugin({ - hashFunction: options.output.hashFunction - }).apply(compiler); - break; - } - case "deterministic": { - const DeterministicModuleIdsPlugin = __webpack_require__(49335); - new DeterministicModuleIdsPlugin().apply(compiler); - break; - } - case "size": { - const OccurrenceModuleIdsPlugin = __webpack_require__(12202); - new OccurrenceModuleIdsPlugin({ - prioritiseInitial: true - }).apply(compiler); - break; - } - default: - throw new Error( - `webpack bug: moduleIds: ${moduleIds} is not implemented` - ); - } - } - const chunkIds = options.optimization.chunkIds; - if (chunkIds) { - switch (chunkIds) { - case "natural": { - const NaturalChunkIdsPlugin = __webpack_require__(34697); - new NaturalChunkIdsPlugin().apply(compiler); - break; - } - case "named": { - const NamedChunkIdsPlugin = __webpack_require__(23750); - new NamedChunkIdsPlugin().apply(compiler); - break; - } - case "deterministic": { - const DeterministicChunkIdsPlugin = __webpack_require__(6777); - new DeterministicChunkIdsPlugin().apply(compiler); - break; - } - case "size": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const OccurrenceChunkIdsPlugin = __webpack_require__(4955); - new OccurrenceChunkIdsPlugin({ - prioritiseInitial: true - }).apply(compiler); - break; - } - case "total-size": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const OccurrenceChunkIdsPlugin = __webpack_require__(4955); - new OccurrenceChunkIdsPlugin({ - prioritiseInitial: false - }).apply(compiler); - break; - } - default: - throw new Error( - `webpack bug: chunkIds: ${chunkIds} is not implemented` - ); - } - } - if (options.optimization.nodeEnv) { - const DefinePlugin = __webpack_require__(5354); - new DefinePlugin({ - "process.env.NODE_ENV": JSON.stringify(options.optimization.nodeEnv) - }).apply(compiler); - } - if (options.optimization.minimize) { - for (const minimizer of options.optimization.minimizer) { - if (typeof minimizer === "function") { - minimizer.call(compiler, compiler); - } else if (minimizer !== "...") { - minimizer.apply(compiler); - } - } - } - - if (options.performance) { - const SizeLimitsPlugin = __webpack_require__(96740); - new SizeLimitsPlugin(options.performance).apply(compiler); - } - - new TemplatedPathPlugin().apply(compiler); - - new RecordIdsPlugin({ - portableIds: options.optimization.portableRecords - }).apply(compiler); - - new WarnCaseSensitiveModulesPlugin().apply(compiler); - - const AddManagedPathsPlugin = __webpack_require__(9652); - new AddManagedPathsPlugin( - options.snapshot.managedPaths, - options.snapshot.immutablePaths - ).apply(compiler); - - if (options.cache && typeof options.cache === "object") { - const cacheOptions = options.cache; - switch (cacheOptions.type) { - case "memory": { - if (isFinite(cacheOptions.maxGenerations)) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const MemoryWithGcCachePlugin = __webpack_require__(56171); - new MemoryWithGcCachePlugin({ - maxGenerations: cacheOptions.maxGenerations - }).apply(compiler); - } else { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const MemoryCachePlugin = __webpack_require__(64542); - new MemoryCachePlugin().apply(compiler); - } - if (cacheOptions.cacheUnaffected) { - if (!options.experiments.cacheUnaffected) { - throw new Error( - "'cache.cacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled" - ); - } - compiler.moduleMemCaches = new Map(); - } - break; - } - case "filesystem": { - const AddBuildDependenciesPlugin = __webpack_require__(81887); - for (const key in cacheOptions.buildDependencies) { - const list = cacheOptions.buildDependencies[key]; - new AddBuildDependenciesPlugin(list).apply(compiler); - } - if (!isFinite(cacheOptions.maxMemoryGenerations)) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const MemoryCachePlugin = __webpack_require__(64542); - new MemoryCachePlugin().apply(compiler); - } else if (cacheOptions.maxMemoryGenerations !== 0) { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const MemoryWithGcCachePlugin = __webpack_require__(56171); - new MemoryWithGcCachePlugin({ - maxGenerations: cacheOptions.maxMemoryGenerations - }).apply(compiler); - } - if (cacheOptions.memoryCacheUnaffected) { - if (!options.experiments.cacheUnaffected) { - throw new Error( - "'cache.memoryCacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled" - ); - } - compiler.moduleMemCaches = new Map(); - } - switch (cacheOptions.store) { - case "pack": { - const IdleFileCachePlugin = __webpack_require__(97079); - const PackFileCacheStrategy = __webpack_require__(26174); - new IdleFileCachePlugin( - new PackFileCacheStrategy({ - compiler, - fs: compiler.intermediateFileSystem, - context: options.context, - cacheLocation: cacheOptions.cacheLocation, - version: cacheOptions.version, - logger: compiler.getInfrastructureLogger( - "webpack.cache.PackFileCacheStrategy" - ), - snapshot: options.snapshot, - maxAge: cacheOptions.maxAge, - profile: cacheOptions.profile, - allowCollectingMemory: cacheOptions.allowCollectingMemory, - compression: cacheOptions.compression - }), - cacheOptions.idleTimeout, - cacheOptions.idleTimeoutForInitialStore, - cacheOptions.idleTimeoutAfterLargeChanges - ).apply(compiler); - break; - } - default: - throw new Error("Unhandled value for cache.store"); - } - break; - } - default: - // @ts-expect-error Property 'type' does not exist on type 'never'. ts(2339) - throw new Error(`Unknown cache type ${cacheOptions.type}`); - } - } - new ResolverCachePlugin().apply(compiler); - - if (options.ignoreWarnings && options.ignoreWarnings.length > 0) { - const IgnoreWarningsPlugin = __webpack_require__(51674); - new IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler); - } - - compiler.hooks.afterPlugins.call(compiler); - if (!compiler.inputFileSystem) { - throw new Error("No input filesystem provided"); - } - compiler.resolverFactory.hooks.resolveOptions - .for("normal") - .tap("WebpackOptionsApply", resolveOptions => { - resolveOptions = cleverMerge(options.resolve, resolveOptions); - resolveOptions.fileSystem = compiler.inputFileSystem; - return resolveOptions; - }); - compiler.resolverFactory.hooks.resolveOptions - .for("context") - .tap("WebpackOptionsApply", resolveOptions => { - resolveOptions = cleverMerge(options.resolve, resolveOptions); - resolveOptions.fileSystem = compiler.inputFileSystem; - resolveOptions.resolveToContext = true; - return resolveOptions; - }); - compiler.resolverFactory.hooks.resolveOptions - .for("loader") - .tap("WebpackOptionsApply", resolveOptions => { - resolveOptions = cleverMerge(options.resolveLoader, resolveOptions); - resolveOptions.fileSystem = compiler.inputFileSystem; - return resolveOptions; - }); - compiler.hooks.afterResolvers.call(compiler); - return options; - } -} - -module.exports = WebpackOptionsApply; - - -/***/ }), - -/***/ 42163: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { applyWebpackOptionsDefaults } = __webpack_require__(64395); -const { getNormalizedWebpackOptions } = __webpack_require__(80593); - -class WebpackOptionsDefaulter { - process(options) { - options = getNormalizedWebpackOptions(options); - applyWebpackOptionsDefaults(options); - return options; - } -} - -module.exports = WebpackOptionsDefaulter; - - -/***/ }), - -/***/ 23836: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const mimeTypes = __webpack_require__(92414); -const path = __webpack_require__(71017); -const { RawSource } = __webpack_require__(51255); -const ConcatenationScope = __webpack_require__(81701); -const Generator = __webpack_require__(97152); -const RuntimeGlobals = __webpack_require__(39201); -const createHash = __webpack_require__(85205); -const { makePathsRelative } = __webpack_require__(20162); -const nonNumericOnlyHash = __webpack_require__(46849); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").AssetGeneratorOptions} AssetGeneratorOptions */ -/** @typedef {import("../../declarations/WebpackOptions").AssetModuleOutputPath} AssetModuleOutputPath */ -/** @typedef {import("../../declarations/WebpackOptions").RawPublicPath} RawPublicPath */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../util/Hash")} Hash */ - -const mergeMaybeArrays = (a, b) => { - const set = new Set(); - if (Array.isArray(a)) for (const item of a) set.add(item); - else set.add(a); - if (Array.isArray(b)) for (const item of b) set.add(item); - else set.add(b); - return Array.from(set); -}; - -const mergeAssetInfo = (a, b) => { - const result = { ...a, ...b }; - for (const key of Object.keys(a)) { - if (key in b) { - if (a[key] === b[key]) continue; - switch (key) { - case "fullhash": - case "chunkhash": - case "modulehash": - case "contenthash": - result[key] = mergeMaybeArrays(a[key], b[key]); - break; - case "immutable": - case "development": - case "hotModuleReplacement": - case "javascriptModule": - result[key] = a[key] || b[key]; - break; - case "related": - result[key] = mergeRelatedInfo(a[key], b[key]); - break; - default: - throw new Error(`Can't handle conflicting asset info for ${key}`); - } - } - } - return result; -}; - -const mergeRelatedInfo = (a, b) => { - const result = { ...a, ...b }; - for (const key of Object.keys(a)) { - if (key in b) { - if (a[key] === b[key]) continue; - result[key] = mergeMaybeArrays(a[key], b[key]); - } - } - return result; -}; - -const encodeDataUri = (encoding, source) => { - let encodedContent; - - switch (encoding) { - case "base64": { - encodedContent = source.buffer().toString("base64"); - break; - } - case false: { - const content = source.source(); - - if (typeof content !== "string") { - encodedContent = content.toString("utf-8"); - } - - encodedContent = encodeURIComponent(encodedContent).replace( - /[!'()*]/g, - character => "%" + character.codePointAt(0).toString(16) - ); - break; - } - default: - throw new Error(`Unsupported encoding '${encoding}'`); - } - - return encodedContent; -}; - -const decodeDataUriContent = (encoding, content) => { - const isBase64 = encoding === "base64"; - return isBase64 - ? Buffer.from(content, "base64") - : Buffer.from(decodeURIComponent(content), "ascii"); -}; - -const JS_TYPES = new Set(["javascript"]); -const JS_AND_ASSET_TYPES = new Set(["javascript", "asset"]); -const DEFAULT_ENCODING = "base64"; - -class AssetGenerator extends Generator { - /** - * @param {AssetGeneratorOptions["dataUrl"]=} dataUrlOptions the options for the data url - * @param {string=} filename override for output.assetModuleFilename - * @param {RawPublicPath=} publicPath override for output.assetModulePublicPath - * @param {AssetModuleOutputPath=} outputPath the output path for the emitted file which is not included in the runtime import - * @param {boolean=} emit generate output asset - */ - constructor(dataUrlOptions, filename, publicPath, outputPath, emit) { - super(); - this.dataUrlOptions = dataUrlOptions; - this.filename = filename; - this.publicPath = publicPath; - this.outputPath = outputPath; - this.emit = emit; - } - - /** - * @param {NormalModule} module module - * @param {RuntimeTemplate} runtimeTemplate runtime template - * @returns {string} source file name - */ - getSourceFileName(module, runtimeTemplate) { - return makePathsRelative( - runtimeTemplate.compilation.compiler.context, - module.matchResource || module.resource, - runtimeTemplate.compilation.compiler.root - ).replace(/^\.\//, ""); - } - - /** - * @param {NormalModule} module module for which the bailout reason should be determined - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(module, context) { - return undefined; - } - - /** - * @param {NormalModule} module module - * @returns {string} mime type - */ - getMimeType(module) { - if (typeof this.dataUrlOptions === "function") { - throw new Error( - "This method must not be called when dataUrlOptions is a function" - ); - } - - let mimeType = this.dataUrlOptions.mimetype; - if (mimeType === undefined) { - const ext = path.extname(module.nameForCondition()); - if ( - module.resourceResolveData && - module.resourceResolveData.mimetype !== undefined - ) { - mimeType = - module.resourceResolveData.mimetype + - module.resourceResolveData.parameters; - } else if (ext) { - mimeType = mimeTypes.lookup(ext); - - if (typeof mimeType !== "string") { - throw new Error( - "DataUrl can't be generated automatically, " + - `because there is no mimetype for "${ext}" in mimetype database. ` + - 'Either pass a mimetype via "generator.mimetype" or ' + - 'use type: "asset/resource" to create a resource file instead of a DataUrl' - ); - } - } - } - - if (typeof mimeType !== "string") { - throw new Error( - "DataUrl can't be generated automatically. " + - 'Either pass a mimetype via "generator.mimetype" or ' + - 'use type: "asset/resource" to create a resource file instead of a DataUrl' - ); - } - - return mimeType; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate( - module, - { - runtime, - concatenationScope, - chunkGraph, - runtimeTemplate, - runtimeRequirements, - type, - getData - } - ) { - switch (type) { - case "asset": - return module.originalSource(); - default: { - let content; - const originalSource = module.originalSource(); - if (module.buildInfo.dataUrl) { - let encodedSource; - if (typeof this.dataUrlOptions === "function") { - encodedSource = this.dataUrlOptions.call( - null, - originalSource.source(), - { - filename: module.matchResource || module.resource, - module - } - ); - } else { - /** @type {string | false | undefined} */ - let encoding = this.dataUrlOptions.encoding; - if (encoding === undefined) { - if ( - module.resourceResolveData && - module.resourceResolveData.encoding !== undefined - ) { - encoding = module.resourceResolveData.encoding; - } - } - if (encoding === undefined) { - encoding = DEFAULT_ENCODING; - } - const mimeType = this.getMimeType(module); - - let encodedContent; - - if ( - module.resourceResolveData && - module.resourceResolveData.encoding === encoding && - decodeDataUriContent( - module.resourceResolveData.encoding, - module.resourceResolveData.encodedContent - ).equals(originalSource.buffer()) - ) { - encodedContent = module.resourceResolveData.encodedContent; - } else { - encodedContent = encodeDataUri(encoding, originalSource); - } - - encodedSource = `data:${mimeType}${ - encoding ? `;${encoding}` : "" - },${encodedContent}`; - } - const data = getData(); - data.set("url", Buffer.from(encodedSource)); - content = JSON.stringify(encodedSource); - } else { - const assetModuleFilename = - this.filename || runtimeTemplate.outputOptions.assetModuleFilename; - const hash = createHash(runtimeTemplate.outputOptions.hashFunction); - if (runtimeTemplate.outputOptions.hashSalt) { - hash.update(runtimeTemplate.outputOptions.hashSalt); - } - hash.update(originalSource.buffer()); - const fullHash = /** @type {string} */ ( - hash.digest(runtimeTemplate.outputOptions.hashDigest) - ); - const contentHash = nonNumericOnlyHash( - fullHash, - runtimeTemplate.outputOptions.hashDigestLength - ); - module.buildInfo.fullContentHash = fullHash; - const sourceFilename = this.getSourceFileName( - module, - runtimeTemplate - ); - let { path: filename, info: assetInfo } = - runtimeTemplate.compilation.getAssetPathWithInfo( - assetModuleFilename, - { - module, - runtime, - filename: sourceFilename, - chunkGraph, - contentHash - } - ); - let assetPath; - if (this.publicPath !== undefined) { - const { path, info } = - runtimeTemplate.compilation.getAssetPathWithInfo( - this.publicPath, - { - module, - runtime, - filename: sourceFilename, - chunkGraph, - contentHash - } - ); - assetInfo = mergeAssetInfo(assetInfo, info); - assetPath = JSON.stringify(path + filename); - } else { - runtimeRequirements.add(RuntimeGlobals.publicPath); // add __webpack_require__.p - assetPath = runtimeTemplate.concatenation( - { expr: RuntimeGlobals.publicPath }, - filename - ); - } - assetInfo = { - sourceFilename, - ...assetInfo - }; - if (this.outputPath) { - const { path: outputPath, info } = - runtimeTemplate.compilation.getAssetPathWithInfo( - this.outputPath, - { - module, - runtime, - filename: sourceFilename, - chunkGraph, - contentHash - } - ); - assetInfo = mergeAssetInfo(assetInfo, info); - filename = path.posix.join(outputPath, filename); - } - module.buildInfo.filename = filename; - module.buildInfo.assetInfo = assetInfo; - if (getData) { - // Due to code generation caching module.buildInfo.XXX can't used to store such information - // It need to be stored in the code generation results instead, where it's cached too - // TODO webpack 6 For back-compat reasons we also store in on module.buildInfo - const data = getData(); - data.set("fullContentHash", fullHash); - data.set("filename", filename); - data.set("assetInfo", assetInfo); - } - content = assetPath; - } - - if (concatenationScope) { - concatenationScope.registerNamespaceExport( - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - ); - return new RawSource( - `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - } = ${content};` - ); - } else { - runtimeRequirements.add(RuntimeGlobals.module); - return new RawSource( - `${RuntimeGlobals.module}.exports = ${content};` - ); - } - } - } - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - if ((module.buildInfo && module.buildInfo.dataUrl) || this.emit === false) { - return JS_TYPES; - } else { - return JS_AND_ASSET_TYPES; - } - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - switch (type) { - case "asset": { - const originalSource = module.originalSource(); - - if (!originalSource) { - return 0; - } - - return originalSource.size(); - } - default: - if (module.buildInfo && module.buildInfo.dataUrl) { - const originalSource = module.originalSource(); - - if (!originalSource) { - return 0; - } - - // roughly for data url - // Example: m.exports="data:image/png;base64,ag82/f+2==" - // 4/3 = base64 encoding - // 34 = ~ data url header + footer + rounding - return originalSource.size() * 1.34 + 36; - } else { - // it's only estimated so this number is probably fine - // Example: m.exports=r.p+"0123456789012345678901.ext" - return 42; - } - } - } - - /** - * @param {Hash} hash hash that will be modified - * @param {UpdateHashContext} updateHashContext context for updating hash - */ - updateHash(hash, { module, runtime, runtimeTemplate, chunkGraph }) { - if (module.buildInfo.dataUrl) { - hash.update("data-url"); - // this.dataUrlOptions as function should be pure and only depend on input source and filename - // therefore it doesn't need to be hashed - if (typeof this.dataUrlOptions === "function") { - const ident = /** @type {{ ident?: string }} */ (this.dataUrlOptions) - .ident; - if (ident) hash.update(ident); - } else { - if ( - this.dataUrlOptions.encoding && - this.dataUrlOptions.encoding !== DEFAULT_ENCODING - ) { - hash.update(this.dataUrlOptions.encoding); - } - if (this.dataUrlOptions.mimetype) - hash.update(this.dataUrlOptions.mimetype); - // computed mimetype depends only on module filename which is already part of the hash - } - } else { - hash.update("resource"); - - const pathData = { - module, - runtime, - filename: this.getSourceFileName(module, runtimeTemplate), - chunkGraph, - contentHash: runtimeTemplate.contentHashReplacement - }; - - if (typeof this.publicPath === "function") { - hash.update("path"); - const assetInfo = {}; - hash.update(this.publicPath(pathData, assetInfo)); - hash.update(JSON.stringify(assetInfo)); - } else if (this.publicPath) { - hash.update("path"); - hash.update(this.publicPath); - } else { - hash.update("no-path"); - } - - const assetModuleFilename = - this.filename || runtimeTemplate.outputOptions.assetModuleFilename; - const { path: filename, info } = - runtimeTemplate.compilation.getAssetPathWithInfo( - assetModuleFilename, - pathData - ); - hash.update(filename); - hash.update(JSON.stringify(info)); - } - } -} - -module.exports = AssetGenerator; - - -/***/ }), - -/***/ 53694: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Yuta Hiroto @hiroppy -*/ - - - -const { cleverMerge } = __webpack_require__(22093); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -const getSchema = name => { - const { definitions } = __webpack_require__(13954); - return { - definitions, - oneOf: [{ $ref: `#/definitions/${name}` }] - }; -}; - -const generatorValidationOptions = { - name: "Asset Modules Plugin", - baseDataPath: "generator" -}; -const validateGeneratorOptions = { - asset: createSchemaValidation( - __webpack_require__(12666), - () => getSchema("AssetGeneratorOptions"), - generatorValidationOptions - ), - "asset/resource": createSchemaValidation( - __webpack_require__(9730), - () => getSchema("AssetResourceGeneratorOptions"), - generatorValidationOptions - ), - "asset/inline": createSchemaValidation( - __webpack_require__(59117), - () => getSchema("AssetInlineGeneratorOptions"), - generatorValidationOptions - ) -}; - -const validateParserOptions = createSchemaValidation( - __webpack_require__(1700), - () => getSchema("AssetParserOptions"), - { - name: "Asset Modules Plugin", - baseDataPath: "parser" - } -); - -const getAssetGenerator = memoize(() => __webpack_require__(23836)); -const getAssetParser = memoize(() => __webpack_require__(38933)); -const getAssetSourceParser = memoize(() => __webpack_require__(83191)); -const getAssetSourceGenerator = memoize(() => - __webpack_require__(98530) -); - -const type = "asset"; -const plugin = "AssetModulesPlugin"; - -class AssetModulesPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - plugin, - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.createParser - .for("asset") - .tap(plugin, parserOptions => { - validateParserOptions(parserOptions); - parserOptions = cleverMerge( - compiler.options.module.parser.asset, - parserOptions - ); - - let dataUrlCondition = parserOptions.dataUrlCondition; - if (!dataUrlCondition || typeof dataUrlCondition === "object") { - dataUrlCondition = { - maxSize: 8096, - ...dataUrlCondition - }; - } - - const AssetParser = getAssetParser(); - - return new AssetParser(dataUrlCondition); - }); - normalModuleFactory.hooks.createParser - .for("asset/inline") - .tap(plugin, parserOptions => { - const AssetParser = getAssetParser(); - - return new AssetParser(true); - }); - normalModuleFactory.hooks.createParser - .for("asset/resource") - .tap(plugin, parserOptions => { - const AssetParser = getAssetParser(); - - return new AssetParser(false); - }); - normalModuleFactory.hooks.createParser - .for("asset/source") - .tap(plugin, parserOptions => { - const AssetSourceParser = getAssetSourceParser(); - - return new AssetSourceParser(); - }); - - for (const type of ["asset", "asset/inline", "asset/resource"]) { - normalModuleFactory.hooks.createGenerator - .for(type) - .tap(plugin, generatorOptions => { - validateGeneratorOptions[type](generatorOptions); - - let dataUrl = undefined; - if (type !== "asset/resource") { - dataUrl = generatorOptions.dataUrl; - if (!dataUrl || typeof dataUrl === "object") { - dataUrl = { - encoding: undefined, - mimetype: undefined, - ...dataUrl - }; - } - } - - let filename = undefined; - let publicPath = undefined; - let outputPath = undefined; - if (type !== "asset/inline") { - filename = generatorOptions.filename; - publicPath = generatorOptions.publicPath; - outputPath = generatorOptions.outputPath; - } - - const AssetGenerator = getAssetGenerator(); - - return new AssetGenerator( - dataUrl, - filename, - publicPath, - outputPath, - generatorOptions.emit !== false - ); - }); - } - normalModuleFactory.hooks.createGenerator - .for("asset/source") - .tap(plugin, () => { - const AssetSourceGenerator = getAssetSourceGenerator(); - - return new AssetSourceGenerator(); - }); - - compilation.hooks.renderManifest.tap(plugin, (result, options) => { - const { chunkGraph } = compilation; - const { chunk, codeGenerationResults } = options; - - const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "asset", - compareModulesByIdentifier - ); - if (modules) { - for (const module of modules) { - try { - const codeGenResult = codeGenerationResults.get( - module, - chunk.runtime - ); - result.push({ - render: () => codeGenResult.sources.get(type), - filename: - module.buildInfo.filename || - codeGenResult.data.get("filename"), - info: - module.buildInfo.assetInfo || - codeGenResult.data.get("assetInfo"), - auxiliary: true, - identifier: `assetModule${chunkGraph.getModuleId(module)}`, - hash: - module.buildInfo.fullContentHash || - codeGenResult.data.get("fullContentHash") - }); - } catch (e) { - e.message += `\nduring rendering of asset ${module.identifier()}`; - throw e; - } - } - } - - return result; - }); - - compilation.hooks.prepareModuleExecution.tap( - "AssetModulesPlugin", - (options, context) => { - const { codeGenerationResult } = options; - const source = codeGenerationResult.sources.get("asset"); - if (source === undefined) return; - context.assets.set(codeGenerationResult.data.get("filename"), { - source, - info: codeGenerationResult.data.get("assetInfo") - }); - } - ); - } - ); - } -} - -module.exports = AssetModulesPlugin; - - -/***/ }), - -/***/ 38933: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Yuta Hiroto @hiroppy -*/ - - - -const Parser = __webpack_require__(68646); - -/** @typedef {import("../../declarations/WebpackOptions").AssetParserOptions} AssetParserOptions */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -class AssetParser extends Parser { - /** - * @param {AssetParserOptions["dataUrlCondition"] | boolean} dataUrlCondition condition for inlining as DataUrl - */ - constructor(dataUrlCondition) { - super(); - this.dataUrlCondition = dataUrlCondition; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (typeof source === "object" && !Buffer.isBuffer(source)) { - throw new Error("AssetParser doesn't accept preparsed AST"); - } - state.module.buildInfo.strict = true; - state.module.buildMeta.exportsType = "default"; - state.module.buildMeta.defaultObject = false; - - if (typeof this.dataUrlCondition === "function") { - state.module.buildInfo.dataUrl = this.dataUrlCondition(source, { - filename: state.module.matchResource || state.module.resource, - module: state.module - }); - } else if (typeof this.dataUrlCondition === "boolean") { - state.module.buildInfo.dataUrl = this.dataUrlCondition; - } else if ( - this.dataUrlCondition && - typeof this.dataUrlCondition === "object" - ) { - state.module.buildInfo.dataUrl = - Buffer.byteLength(source) <= this.dataUrlCondition.maxSize; - } else { - throw new Error("Unexpected dataUrlCondition type"); - } - - return state; - } -} - -module.exports = AssetParser; - - -/***/ }), - -/***/ 98530: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const { RawSource } = __webpack_require__(51255); -const ConcatenationScope = __webpack_require__(81701); -const Generator = __webpack_require__(97152); -const RuntimeGlobals = __webpack_require__(39201); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("../NormalModule")} NormalModule */ - -const TYPES = new Set(["javascript"]); - -class AssetSourceGenerator extends Generator { - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate( - module, - { concatenationScope, chunkGraph, runtimeTemplate, runtimeRequirements } - ) { - const originalSource = module.originalSource(); - - if (!originalSource) { - return new RawSource(""); - } - - const content = originalSource.source(); - - let encodedSource; - if (typeof content === "string") { - encodedSource = content; - } else { - encodedSource = content.toString("utf-8"); - } - - let sourceContent; - if (concatenationScope) { - concatenationScope.registerNamespaceExport( - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - ); - sourceContent = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - } = ${JSON.stringify(encodedSource)};`; - } else { - runtimeRequirements.add(RuntimeGlobals.module); - sourceContent = `${RuntimeGlobals.module}.exports = ${JSON.stringify( - encodedSource - )};`; - } - return new RawSource(sourceContent); - } - - /** - * @param {NormalModule} module module for which the bailout reason should be determined - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(module, context) { - return undefined; - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const originalSource = module.originalSource(); - - if (!originalSource) { - return 0; - } - - // Example: m.exports="abcd" - return originalSource.size() + 12; - } -} - -module.exports = AssetSourceGenerator; - - -/***/ }), - -/***/ 83191: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Yuta Hiroto @hiroppy -*/ - - - -const Parser = __webpack_require__(68646); - -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -class AssetSourceParser extends Parser { - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (typeof source === "object" && !Buffer.isBuffer(source)) { - throw new Error("AssetSourceParser doesn't accept preparsed AST"); - } - const { module } = state; - module.buildInfo.strict = true; - module.buildMeta.exportsType = "default"; - state.module.buildMeta.defaultObject = false; - - return state; - } -} - -module.exports = AssetSourceParser; - - -/***/ }), - -/***/ 66788: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["javascript"]); - -class RawDataUrlModule extends Module { - /** - * @param {string} url raw url - * @param {string} identifier unique identifier - * @param {string=} readableIdentifier readable identifier - */ - constructor(url, identifier, readableIdentifier) { - super("asset/raw-data-url", null); - this.url = url; - this.urlBuffer = url ? Buffer.from(url) : undefined; - this.identifierStr = identifier || this.url; - this.readableIdentifierStr = readableIdentifier || this.identifierStr; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this.identifierStr; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - if (this.url === undefined) this.url = this.urlBuffer.toString(); - return Math.max(1, this.url.length); - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return requestShortener.shorten(this.readableIdentifierStr); - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - cacheable: true - }; - callback(); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration(context) { - if (this.url === undefined) this.url = this.urlBuffer.toString(); - const sources = new Map(); - sources.set( - "javascript", - new RawSource(`module.exports = ${JSON.stringify(this.url)};`) - ); - const data = new Map(); - data.set("url", this.urlBuffer); - const runtimeRequirements = new Set(); - runtimeRequirements.add(RuntimeGlobals.module); - return { sources, runtimeRequirements, data }; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(this.urlBuffer); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - - write(this.urlBuffer); - write(this.identifierStr); - write(this.readableIdentifierStr); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.urlBuffer = read(); - this.identifierStr = read(); - this.readableIdentifierStr = read(); - - super.deserialize(context); - } -} - -makeSerializable(RawDataUrlModule, "webpack/lib/asset/RawDataUrlModule"); - -module.exports = RawDataUrlModule; - - -/***/ }), - -/***/ 14989: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ - -/** - * @typedef {GenerateContext} Context - */ -class AwaitDependenciesInitFragment extends InitFragment { - /** - * @param {Set} promises the promises that should be awaited - */ - constructor(promises) { - super( - undefined, - InitFragment.STAGE_ASYNC_DEPENDENCIES, - 0, - "await-dependencies" - ); - this.promises = promises; - } - - merge(other) { - const promises = new Set(other.promises); - for (const p of this.promises) { - promises.add(p); - } - return new AwaitDependenciesInitFragment(promises); - } - - /** - * @param {Context} context context - * @returns {string|Source} the source code that will be included as initialization code - */ - getContent({ runtimeRequirements }) { - runtimeRequirements.add(RuntimeGlobals.module); - const promises = this.promises; - if (promises.size === 0) { - return ""; - } - if (promises.size === 1) { - for (const p of promises) { - return Template.asString([ - `var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${p}]);`, - `${p} = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];`, - "" - ]); - } - } - const sepPromises = Array.from(promises).join(", "); - // TODO check if destructuring is supported - return Template.asString([ - `var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${sepPromises}]);`, - `([${sepPromises}] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);`, - "" - ]); - } -} - -module.exports = AwaitDependenciesInitFragment; - - -/***/ }), - -/***/ 57396: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const HarmonyImportDependency = __webpack_require__(58668); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class InferAsyncModulesPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("InferAsyncModulesPlugin", compilation => { - const { moduleGraph } = compilation; - compilation.hooks.finishModules.tap( - "InferAsyncModulesPlugin", - modules => { - /** @type {Set} */ - const queue = new Set(); - for (const module of modules) { - if (module.buildMeta && module.buildMeta.async) { - queue.add(module); - } - } - for (const module of queue) { - moduleGraph.setAsync(module); - for (const [ - originModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { - if ( - connections.some( - c => - c.dependency instanceof HarmonyImportDependency && - c.isTargetActive(undefined) - ) - ) { - queue.add(originModule); - } - } - } - } - ); - }); - } -} - -module.exports = InferAsyncModulesPlugin; - - -/***/ }), - -/***/ 21078: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const AsyncDependencyToInitialChunkError = __webpack_require__(51558); -const { connectChunkGroupParentAndChild } = __webpack_require__(37855); -const ModuleGraphConnection = __webpack_require__(82921); -const { getEntryRuntime, mergeRuntime } = __webpack_require__(47462); - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("./Dependency")} Dependency */ -/** @typedef {import("./Entrypoint")} Entrypoint */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("./logging/Logger").Logger} Logger */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} QueueItem - * @property {number} action - * @property {DependenciesBlock} block - * @property {Module} module - * @property {Chunk} chunk - * @property {ChunkGroup} chunkGroup - * @property {ChunkGroupInfo} chunkGroupInfo - */ - -/** @typedef {Set & { plus: Set }} ModuleSetPlus */ - -/** - * @typedef {Object} ChunkGroupInfo - * @property {ChunkGroup} chunkGroup the chunk group - * @property {RuntimeSpec} runtime the runtimes - * @property {ModuleSetPlus} minAvailableModules current minimal set of modules available at this point - * @property {boolean} minAvailableModulesOwned true, if minAvailableModules is owned and can be modified - * @property {ModuleSetPlus[]} availableModulesToBeMerged enqueued updates to the minimal set of available modules - * @property {Set=} skippedItems modules that were skipped because module is already available in parent chunks (need to reconsider when minAvailableModules is shrinking) - * @property {Set<[Module, ConnectionState]>=} skippedModuleConnections referenced modules that where skipped because they were not active in this runtime - * @property {ModuleSetPlus} resultingAvailableModules set of modules available including modules from this chunk group - * @property {Set} children set of children chunk groups, that will be revisited when availableModules shrink - * @property {Set} availableSources set of chunk groups that are the source for minAvailableModules - * @property {Set} availableChildren set of chunk groups which depend on the this chunk group as availableSource - * @property {number} preOrderIndex next pre order index - * @property {number} postOrderIndex next post order index - * @property {boolean} chunkLoading has a chunk loading mechanism - * @property {boolean} asyncChunks create async chunks - */ - -/** - * @typedef {Object} BlockChunkGroupConnection - * @property {ChunkGroupInfo} originChunkGroupInfo origin chunk group - * @property {ChunkGroup} chunkGroup referenced chunk group - */ - -const EMPTY_SET = /** @type {ModuleSetPlus} */ (new Set()); -EMPTY_SET.plus = EMPTY_SET; - -/** - * @param {ModuleSetPlus} a first set - * @param {ModuleSetPlus} b second set - * @returns {number} cmp - */ -const bySetSize = (a, b) => { - return b.size + b.plus.size - a.size - a.plus.size; -}; - -const extractBlockModules = (module, moduleGraph, runtime, blockModulesMap) => { - let blockCache; - let modules; - - const arrays = []; - - const queue = [module]; - while (queue.length > 0) { - const block = queue.pop(); - const arr = []; - arrays.push(arr); - blockModulesMap.set(block, arr); - for (const b of block.blocks) { - queue.push(b); - } - } - - for (const connection of moduleGraph.getOutgoingConnections(module)) { - const d = connection.dependency; - // We skip connections without dependency - if (!d) continue; - const m = connection.module; - // We skip connections without Module pointer - if (!m) continue; - // We skip weak connections - if (connection.weak) continue; - const state = connection.getActiveState(runtime); - // We skip inactive connections - if (state === false) continue; - - const block = moduleGraph.getParentBlock(d); - let index = moduleGraph.getParentBlockIndex(d); - - // deprecated fallback - if (index < 0) { - index = block.dependencies.indexOf(d); - } - - if (blockCache !== block) { - modules = blockModulesMap.get((blockCache = block)); - } - - const i = index << 2; - modules[i] = m; - modules[i + 1] = state; - } - - for (const modules of arrays) { - if (modules.length === 0) continue; - let indexMap; - let length = 0; - outer: for (let j = 0; j < modules.length; j += 2) { - const m = modules[j]; - if (m === undefined) continue; - const state = modules[j + 1]; - if (indexMap === undefined) { - let i = 0; - for (; i < length; i += 2) { - if (modules[i] === m) { - const merged = modules[i + 1]; - if (merged === true) continue outer; - modules[i + 1] = ModuleGraphConnection.addConnectionStates( - merged, - state - ); - } - } - modules[length] = m; - length++; - modules[length] = state; - length++; - if (length > 30) { - // To avoid worse case performance, we will use an index map for - // linear cost access, which allows to maintain O(n) complexity - // while keeping allocations down to a minimum - indexMap = new Map(); - for (let i = 0; i < length; i += 2) { - indexMap.set(modules[i], i + 1); - } - } - } else { - const idx = indexMap.get(m); - if (idx !== undefined) { - const merged = modules[idx]; - if (merged === true) continue outer; - modules[idx] = ModuleGraphConnection.addConnectionStates( - merged, - state - ); - } else { - modules[length] = m; - length++; - modules[length] = state; - indexMap.set(m, length); - length++; - } - } - } - modules.length = length; - } -}; - -/** - * - * @param {Logger} logger a logger - * @param {Compilation} compilation the compilation - * @param {Map} inputEntrypointsAndModules chunk groups which are processed with the modules - * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules - * @param {Map} blockConnections connection for blocks - * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks - * @param {Set} allCreatedChunkGroups filled with all chunk groups that are created here - */ -const visitModules = ( - logger, - compilation, - inputEntrypointsAndModules, - chunkGroupInfoMap, - blockConnections, - blocksWithNestedBlocks, - allCreatedChunkGroups -) => { - const { moduleGraph, chunkGraph, moduleMemCaches } = compilation; - - const blockModulesRuntimeMap = new Map(); - - /** @type {RuntimeSpec | false} */ - let blockModulesMapRuntime = false; - let blockModulesMap; - - /** - * - * @param {DependenciesBlock} block block - * @param {RuntimeSpec} runtime runtime - * @returns {(Module | ConnectionState)[]} block modules in flatten tuples - */ - const getBlockModules = (block, runtime) => { - if (blockModulesMapRuntime !== runtime) { - blockModulesMap = blockModulesRuntimeMap.get(runtime); - if (blockModulesMap === undefined) { - blockModulesMap = new Map(); - blockModulesRuntimeMap.set(runtime, blockModulesMap); - } - } - let blockModules = blockModulesMap.get(block); - if (blockModules !== undefined) return blockModules; - const module = /** @type {Module} */ (block.getRootBlock()); - const memCache = moduleMemCaches && moduleMemCaches.get(module); - if (memCache !== undefined) { - const map = memCache.provide( - "bundleChunkGraph.blockModules", - runtime, - () => { - logger.time("visitModules: prepare"); - const map = new Map(); - extractBlockModules(module, moduleGraph, runtime, map); - logger.timeAggregate("visitModules: prepare"); - return map; - } - ); - for (const [block, blockModules] of map) - blockModulesMap.set(block, blockModules); - return map.get(block); - } else { - logger.time("visitModules: prepare"); - extractBlockModules(module, moduleGraph, runtime, blockModulesMap); - blockModules = blockModulesMap.get(block); - logger.timeAggregate("visitModules: prepare"); - return blockModules; - } - }; - - let statProcessedQueueItems = 0; - let statProcessedBlocks = 0; - let statConnectedChunkGroups = 0; - let statProcessedChunkGroupsForMerging = 0; - let statMergedAvailableModuleSets = 0; - let statForkedAvailableModules = 0; - let statForkedAvailableModulesCount = 0; - let statForkedAvailableModulesCountPlus = 0; - let statForkedMergedModulesCount = 0; - let statForkedMergedModulesCountPlus = 0; - let statForkedResultModulesCount = 0; - let statChunkGroupInfoUpdated = 0; - let statChildChunkGroupsReconnected = 0; - - let nextChunkGroupIndex = 0; - let nextFreeModulePreOrderIndex = 0; - let nextFreeModulePostOrderIndex = 0; - - /** @type {Map} */ - const blockChunkGroups = new Map(); - - /** @type {Map} */ - const namedChunkGroups = new Map(); - - /** @type {Map} */ - const namedAsyncEntrypoints = new Map(); - - const ADD_AND_ENTER_ENTRY_MODULE = 0; - const ADD_AND_ENTER_MODULE = 1; - const ENTER_MODULE = 2; - const PROCESS_BLOCK = 3; - const PROCESS_ENTRY_BLOCK = 4; - const LEAVE_MODULE = 5; - - /** @type {QueueItem[]} */ - let queue = []; - - /** @type {Map>} */ - const queueConnect = new Map(); - /** @type {Set} */ - const chunkGroupsForCombining = new Set(); - - // Fill queue with entrypoint modules - // Create ChunkGroupInfo for entrypoints - for (const [chunkGroup, modules] of inputEntrypointsAndModules) { - const runtime = getEntryRuntime( - compilation, - chunkGroup.name, - chunkGroup.options - ); - /** @type {ChunkGroupInfo} */ - const chunkGroupInfo = { - chunkGroup, - runtime, - minAvailableModules: undefined, - minAvailableModulesOwned: false, - availableModulesToBeMerged: [], - skippedItems: undefined, - resultingAvailableModules: undefined, - children: undefined, - availableSources: undefined, - availableChildren: undefined, - preOrderIndex: 0, - postOrderIndex: 0, - chunkLoading: - chunkGroup.options.chunkLoading !== undefined - ? chunkGroup.options.chunkLoading !== false - : compilation.outputOptions.chunkLoading !== false, - asyncChunks: - chunkGroup.options.asyncChunks !== undefined - ? chunkGroup.options.asyncChunks - : compilation.outputOptions.asyncChunks !== false - }; - chunkGroup.index = nextChunkGroupIndex++; - if (chunkGroup.getNumberOfParents() > 0) { - // minAvailableModules for child entrypoints are unknown yet, set to undefined. - // This means no module is added until other sets are merged into - // this minAvailableModules (by the parent entrypoints) - const skippedItems = new Set(); - for (const module of modules) { - skippedItems.add(module); - } - chunkGroupInfo.skippedItems = skippedItems; - chunkGroupsForCombining.add(chunkGroupInfo); - } else { - // The application may start here: We start with an empty list of available modules - chunkGroupInfo.minAvailableModules = EMPTY_SET; - const chunk = chunkGroup.getEntrypointChunk(); - for (const module of modules) { - queue.push({ - action: ADD_AND_ENTER_MODULE, - block: module, - module, - chunk, - chunkGroup, - chunkGroupInfo - }); - } - } - chunkGroupInfoMap.set(chunkGroup, chunkGroupInfo); - if (chunkGroup.name) { - namedChunkGroups.set(chunkGroup.name, chunkGroupInfo); - } - } - // Fill availableSources with parent-child dependencies between entrypoints - for (const chunkGroupInfo of chunkGroupsForCombining) { - const { chunkGroup } = chunkGroupInfo; - chunkGroupInfo.availableSources = new Set(); - for (const parent of chunkGroup.parentsIterable) { - const parentChunkGroupInfo = chunkGroupInfoMap.get(parent); - chunkGroupInfo.availableSources.add(parentChunkGroupInfo); - if (parentChunkGroupInfo.availableChildren === undefined) { - parentChunkGroupInfo.availableChildren = new Set(); - } - parentChunkGroupInfo.availableChildren.add(chunkGroupInfo); - } - } - // pop() is used to read from the queue - // so it need to be reversed to be iterated in - // correct order - queue.reverse(); - - /** @type {Set} */ - const outdatedChunkGroupInfo = new Set(); - /** @type {Set} */ - const chunkGroupsForMerging = new Set(); - /** @type {QueueItem[]} */ - let queueDelayed = []; - - /** @type {[Module, ConnectionState][]} */ - const skipConnectionBuffer = []; - /** @type {Module[]} */ - const skipBuffer = []; - /** @type {QueueItem[]} */ - const queueBuffer = []; - - /** @type {Module} */ - let module; - /** @type {Chunk} */ - let chunk; - /** @type {ChunkGroup} */ - let chunkGroup; - /** @type {DependenciesBlock} */ - let block; - /** @type {ChunkGroupInfo} */ - let chunkGroupInfo; - - // For each async Block in graph - /** - * @param {AsyncDependenciesBlock} b iterating over each Async DepBlock - * @returns {void} - */ - const iteratorBlock = b => { - // 1. We create a chunk group with single chunk in it for this Block - // but only once (blockChunkGroups map) - let cgi = blockChunkGroups.get(b); - /** @type {ChunkGroup} */ - let c; - /** @type {Entrypoint} */ - let entrypoint; - const entryOptions = b.groupOptions && b.groupOptions.entryOptions; - if (cgi === undefined) { - const chunkName = (b.groupOptions && b.groupOptions.name) || b.chunkName; - if (entryOptions) { - cgi = namedAsyncEntrypoints.get(chunkName); - if (!cgi) { - entrypoint = compilation.addAsyncEntrypoint( - entryOptions, - module, - b.loc, - b.request - ); - entrypoint.index = nextChunkGroupIndex++; - cgi = { - chunkGroup: entrypoint, - runtime: entrypoint.options.runtime || entrypoint.name, - minAvailableModules: EMPTY_SET, - minAvailableModulesOwned: false, - availableModulesToBeMerged: [], - skippedItems: undefined, - resultingAvailableModules: undefined, - children: undefined, - availableSources: undefined, - availableChildren: undefined, - preOrderIndex: 0, - postOrderIndex: 0, - chunkLoading: - entryOptions.chunkLoading !== undefined - ? entryOptions.chunkLoading !== false - : chunkGroupInfo.chunkLoading, - asyncChunks: - entryOptions.asyncChunks !== undefined - ? entryOptions.asyncChunks - : chunkGroupInfo.asyncChunks - }; - chunkGroupInfoMap.set(entrypoint, cgi); - - chunkGraph.connectBlockAndChunkGroup(b, entrypoint); - if (chunkName) { - namedAsyncEntrypoints.set(chunkName, cgi); - } - } else { - entrypoint = /** @type {Entrypoint} */ (cgi.chunkGroup); - // TODO merge entryOptions - entrypoint.addOrigin(module, b.loc, b.request); - chunkGraph.connectBlockAndChunkGroup(b, entrypoint); - } - - // 2. We enqueue the DependenciesBlock for traversal - queueDelayed.push({ - action: PROCESS_ENTRY_BLOCK, - block: b, - module: module, - chunk: entrypoint.chunks[0], - chunkGroup: entrypoint, - chunkGroupInfo: cgi - }); - } else if (!chunkGroupInfo.asyncChunks || !chunkGroupInfo.chunkLoading) { - // Just queue the block into the current chunk group - queue.push({ - action: PROCESS_BLOCK, - block: b, - module: module, - chunk, - chunkGroup, - chunkGroupInfo - }); - } else { - cgi = chunkName && namedChunkGroups.get(chunkName); - if (!cgi) { - c = compilation.addChunkInGroup( - b.groupOptions || b.chunkName, - module, - b.loc, - b.request - ); - c.index = nextChunkGroupIndex++; - cgi = { - chunkGroup: c, - runtime: chunkGroupInfo.runtime, - minAvailableModules: undefined, - minAvailableModulesOwned: undefined, - availableModulesToBeMerged: [], - skippedItems: undefined, - resultingAvailableModules: undefined, - children: undefined, - availableSources: undefined, - availableChildren: undefined, - preOrderIndex: 0, - postOrderIndex: 0, - chunkLoading: chunkGroupInfo.chunkLoading, - asyncChunks: chunkGroupInfo.asyncChunks - }; - allCreatedChunkGroups.add(c); - chunkGroupInfoMap.set(c, cgi); - if (chunkName) { - namedChunkGroups.set(chunkName, cgi); - } - } else { - c = cgi.chunkGroup; - if (c.isInitial()) { - compilation.errors.push( - new AsyncDependencyToInitialChunkError(chunkName, module, b.loc) - ); - c = chunkGroup; - } - c.addOptions(b.groupOptions); - c.addOrigin(module, b.loc, b.request); - } - blockConnections.set(b, []); - } - blockChunkGroups.set(b, cgi); - } else if (entryOptions) { - entrypoint = /** @type {Entrypoint} */ (cgi.chunkGroup); - } else { - c = cgi.chunkGroup; - } - - if (c !== undefined) { - // 2. We store the connection for the block - // to connect it later if needed - blockConnections.get(b).push({ - originChunkGroupInfo: chunkGroupInfo, - chunkGroup: c - }); - - // 3. We enqueue the chunk group info creation/updating - let connectList = queueConnect.get(chunkGroupInfo); - if (connectList === undefined) { - connectList = new Set(); - queueConnect.set(chunkGroupInfo, connectList); - } - connectList.add(cgi); - - // TODO check if this really need to be done for each traversal - // or if it is enough when it's queued when created - // 4. We enqueue the DependenciesBlock for traversal - queueDelayed.push({ - action: PROCESS_BLOCK, - block: b, - module: module, - chunk: c.chunks[0], - chunkGroup: c, - chunkGroupInfo: cgi - }); - } else if (entrypoint !== undefined) { - chunkGroupInfo.chunkGroup.addAsyncEntrypoint(entrypoint); - } - }; - - /** - * @param {DependenciesBlock} block the block - * @returns {void} - */ - const processBlock = block => { - statProcessedBlocks++; - // get prepared block info - const blockModules = getBlockModules(block, chunkGroupInfo.runtime); - - if (blockModules !== undefined) { - const { minAvailableModules } = chunkGroupInfo; - // Buffer items because order need to be reversed to get indices correct - // Traverse all referenced modules - for (let i = 0; i < blockModules.length; i += 2) { - const refModule = /** @type {Module} */ (blockModules[i]); - if (chunkGraph.isModuleInChunk(refModule, chunk)) { - // skip early if already connected - continue; - } - const activeState = /** @type {ConnectionState} */ ( - blockModules[i + 1] - ); - if (activeState !== true) { - skipConnectionBuffer.push([refModule, activeState]); - if (activeState === false) continue; - } - if ( - activeState === true && - (minAvailableModules.has(refModule) || - minAvailableModules.plus.has(refModule)) - ) { - // already in parent chunks, skip it for now - skipBuffer.push(refModule); - continue; - } - // enqueue, then add and enter to be in the correct order - // this is relevant with circular dependencies - queueBuffer.push({ - action: activeState === true ? ADD_AND_ENTER_MODULE : PROCESS_BLOCK, - block: refModule, - module: refModule, - chunk, - chunkGroup, - chunkGroupInfo - }); - } - // Add buffered items in reverse order - if (skipConnectionBuffer.length > 0) { - let { skippedModuleConnections } = chunkGroupInfo; - if (skippedModuleConnections === undefined) { - chunkGroupInfo.skippedModuleConnections = skippedModuleConnections = - new Set(); - } - for (let i = skipConnectionBuffer.length - 1; i >= 0; i--) { - skippedModuleConnections.add(skipConnectionBuffer[i]); - } - skipConnectionBuffer.length = 0; - } - if (skipBuffer.length > 0) { - let { skippedItems } = chunkGroupInfo; - if (skippedItems === undefined) { - chunkGroupInfo.skippedItems = skippedItems = new Set(); - } - for (let i = skipBuffer.length - 1; i >= 0; i--) { - skippedItems.add(skipBuffer[i]); - } - skipBuffer.length = 0; - } - if (queueBuffer.length > 0) { - for (let i = queueBuffer.length - 1; i >= 0; i--) { - queue.push(queueBuffer[i]); - } - queueBuffer.length = 0; - } - } - - // Traverse all Blocks - for (const b of block.blocks) { - iteratorBlock(b); - } - - if (block.blocks.length > 0 && module !== block) { - blocksWithNestedBlocks.add(block); - } - }; - - /** - * @param {DependenciesBlock} block the block - * @returns {void} - */ - const processEntryBlock = block => { - statProcessedBlocks++; - // get prepared block info - const blockModules = getBlockModules(block, chunkGroupInfo.runtime); - - if (blockModules !== undefined) { - // Traverse all referenced modules - for (let i = 0; i < blockModules.length; i += 2) { - const refModule = /** @type {Module} */ (blockModules[i]); - const activeState = /** @type {ConnectionState} */ ( - blockModules[i + 1] - ); - // enqueue, then add and enter to be in the correct order - // this is relevant with circular dependencies - queueBuffer.push({ - action: - activeState === true ? ADD_AND_ENTER_ENTRY_MODULE : PROCESS_BLOCK, - block: refModule, - module: refModule, - chunk, - chunkGroup, - chunkGroupInfo - }); - } - // Add buffered items in reverse order - if (queueBuffer.length > 0) { - for (let i = queueBuffer.length - 1; i >= 0; i--) { - queue.push(queueBuffer[i]); - } - queueBuffer.length = 0; - } - } - - // Traverse all Blocks - for (const b of block.blocks) { - iteratorBlock(b); - } - - if (block.blocks.length > 0 && module !== block) { - blocksWithNestedBlocks.add(block); - } - }; - - const processQueue = () => { - while (queue.length) { - statProcessedQueueItems++; - const queueItem = queue.pop(); - module = queueItem.module; - block = queueItem.block; - chunk = queueItem.chunk; - chunkGroup = queueItem.chunkGroup; - chunkGroupInfo = queueItem.chunkGroupInfo; - - switch (queueItem.action) { - case ADD_AND_ENTER_ENTRY_MODULE: - chunkGraph.connectChunkAndEntryModule( - chunk, - module, - /** @type {Entrypoint} */ (chunkGroup) - ); - // fallthrough - case ADD_AND_ENTER_MODULE: { - if (chunkGraph.isModuleInChunk(module, chunk)) { - // already connected, skip it - break; - } - // We connect Module and Chunk - chunkGraph.connectChunkAndModule(chunk, module); - } - // fallthrough - case ENTER_MODULE: { - const index = chunkGroup.getModulePreOrderIndex(module); - if (index === undefined) { - chunkGroup.setModulePreOrderIndex( - module, - chunkGroupInfo.preOrderIndex++ - ); - } - - if ( - moduleGraph.setPreOrderIndexIfUnset( - module, - nextFreeModulePreOrderIndex - ) - ) { - nextFreeModulePreOrderIndex++; - } - - // reuse queueItem - queueItem.action = LEAVE_MODULE; - queue.push(queueItem); - } - // fallthrough - case PROCESS_BLOCK: { - processBlock(block); - break; - } - case PROCESS_ENTRY_BLOCK: { - processEntryBlock(block); - break; - } - case LEAVE_MODULE: { - const index = chunkGroup.getModulePostOrderIndex(module); - if (index === undefined) { - chunkGroup.setModulePostOrderIndex( - module, - chunkGroupInfo.postOrderIndex++ - ); - } - - if ( - moduleGraph.setPostOrderIndexIfUnset( - module, - nextFreeModulePostOrderIndex - ) - ) { - nextFreeModulePostOrderIndex++; - } - break; - } - } - } - }; - - const calculateResultingAvailableModules = chunkGroupInfo => { - if (chunkGroupInfo.resultingAvailableModules) - return chunkGroupInfo.resultingAvailableModules; - - const minAvailableModules = chunkGroupInfo.minAvailableModules; - - // Create a new Set of available modules at this point - // We want to be as lazy as possible. There are multiple ways doing this: - // Note that resultingAvailableModules is stored as "(a) + (b)" as it's a ModuleSetPlus - // - resultingAvailableModules = (modules of chunk) + (minAvailableModules + minAvailableModules.plus) - // - resultingAvailableModules = (minAvailableModules + modules of chunk) + (minAvailableModules.plus) - // We choose one depending on the size of minAvailableModules vs minAvailableModules.plus - - let resultingAvailableModules; - if (minAvailableModules.size > minAvailableModules.plus.size) { - // resultingAvailableModules = (modules of chunk) + (minAvailableModules + minAvailableModules.plus) - resultingAvailableModules = - /** @type {Set & {plus: Set}} */ (new Set()); - for (const module of minAvailableModules.plus) - minAvailableModules.add(module); - minAvailableModules.plus = EMPTY_SET; - resultingAvailableModules.plus = minAvailableModules; - chunkGroupInfo.minAvailableModulesOwned = false; - } else { - // resultingAvailableModules = (minAvailableModules + modules of chunk) + (minAvailableModules.plus) - resultingAvailableModules = - /** @type {Set & {plus: Set}} */ ( - new Set(minAvailableModules) - ); - resultingAvailableModules.plus = minAvailableModules.plus; - } - - // add the modules from the chunk group to the set - for (const chunk of chunkGroupInfo.chunkGroup.chunks) { - for (const m of chunkGraph.getChunkModulesIterable(chunk)) { - resultingAvailableModules.add(m); - } - } - return (chunkGroupInfo.resultingAvailableModules = - resultingAvailableModules); - }; - - const processConnectQueue = () => { - // Figure out new parents for chunk groups - // to get new available modules for these children - for (const [chunkGroupInfo, targets] of queueConnect) { - // 1. Add new targets to the list of children - if (chunkGroupInfo.children === undefined) { - chunkGroupInfo.children = targets; - } else { - for (const target of targets) { - chunkGroupInfo.children.add(target); - } - } - - // 2. Calculate resulting available modules - const resultingAvailableModules = - calculateResultingAvailableModules(chunkGroupInfo); - - const runtime = chunkGroupInfo.runtime; - - // 3. Update chunk group info - for (const target of targets) { - target.availableModulesToBeMerged.push(resultingAvailableModules); - chunkGroupsForMerging.add(target); - const oldRuntime = target.runtime; - const newRuntime = mergeRuntime(oldRuntime, runtime); - if (oldRuntime !== newRuntime) { - target.runtime = newRuntime; - outdatedChunkGroupInfo.add(target); - } - } - - statConnectedChunkGroups += targets.size; - } - queueConnect.clear(); - }; - - const processChunkGroupsForMerging = () => { - statProcessedChunkGroupsForMerging += chunkGroupsForMerging.size; - - // Execute the merge - for (const info of chunkGroupsForMerging) { - const availableModulesToBeMerged = info.availableModulesToBeMerged; - let cachedMinAvailableModules = info.minAvailableModules; - - statMergedAvailableModuleSets += availableModulesToBeMerged.length; - - // 1. Get minimal available modules - // It doesn't make sense to traverse a chunk again with more available modules. - // This step calculates the minimal available modules and skips traversal when - // the list didn't shrink. - if (availableModulesToBeMerged.length > 1) { - availableModulesToBeMerged.sort(bySetSize); - } - let changed = false; - merge: for (const availableModules of availableModulesToBeMerged) { - if (cachedMinAvailableModules === undefined) { - cachedMinAvailableModules = availableModules; - info.minAvailableModules = cachedMinAvailableModules; - info.minAvailableModulesOwned = false; - changed = true; - } else { - if (info.minAvailableModulesOwned) { - // We own it and can modify it - if (cachedMinAvailableModules.plus === availableModules.plus) { - for (const m of cachedMinAvailableModules) { - if (!availableModules.has(m)) { - cachedMinAvailableModules.delete(m); - changed = true; - } - } - } else { - for (const m of cachedMinAvailableModules) { - if (!availableModules.has(m) && !availableModules.plus.has(m)) { - cachedMinAvailableModules.delete(m); - changed = true; - } - } - for (const m of cachedMinAvailableModules.plus) { - if (!availableModules.has(m) && !availableModules.plus.has(m)) { - // We can't remove modules from the plus part - // so we need to merge plus into the normal part to allow modifying it - const iterator = - cachedMinAvailableModules.plus[Symbol.iterator](); - // fast forward add all modules until m - /** @type {IteratorResult} */ - let it; - while (!(it = iterator.next()).done) { - const module = it.value; - if (module === m) break; - cachedMinAvailableModules.add(module); - } - // check the remaining modules before adding - while (!(it = iterator.next()).done) { - const module = it.value; - if ( - availableModules.has(module) || - availableModules.plus.has(module) - ) { - cachedMinAvailableModules.add(module); - } - } - cachedMinAvailableModules.plus = EMPTY_SET; - changed = true; - continue merge; - } - } - } - } else if (cachedMinAvailableModules.plus === availableModules.plus) { - // Common and fast case when the plus part is shared - // We only need to care about the normal part - if (availableModules.size < cachedMinAvailableModules.size) { - // the new availableModules is smaller so it's faster to - // fork from the new availableModules - statForkedAvailableModules++; - statForkedAvailableModulesCount += availableModules.size; - statForkedMergedModulesCount += cachedMinAvailableModules.size; - // construct a new Set as intersection of cachedMinAvailableModules and availableModules - const newSet = /** @type {ModuleSetPlus} */ (new Set()); - newSet.plus = availableModules.plus; - for (const m of availableModules) { - if (cachedMinAvailableModules.has(m)) { - newSet.add(m); - } - } - statForkedResultModulesCount += newSet.size; - cachedMinAvailableModules = newSet; - info.minAvailableModulesOwned = true; - info.minAvailableModules = newSet; - changed = true; - continue merge; - } - for (const m of cachedMinAvailableModules) { - if (!availableModules.has(m)) { - // cachedMinAvailableModules need to be modified - // but we don't own it - statForkedAvailableModules++; - statForkedAvailableModulesCount += - cachedMinAvailableModules.size; - statForkedMergedModulesCount += availableModules.size; - // construct a new Set as intersection of cachedMinAvailableModules and availableModules - // as the plus part is equal we can just take over this one - const newSet = /** @type {ModuleSetPlus} */ (new Set()); - newSet.plus = availableModules.plus; - const iterator = cachedMinAvailableModules[Symbol.iterator](); - // fast forward add all modules until m - /** @type {IteratorResult} */ - let it; - while (!(it = iterator.next()).done) { - const module = it.value; - if (module === m) break; - newSet.add(module); - } - // check the remaining modules before adding - while (!(it = iterator.next()).done) { - const module = it.value; - if (availableModules.has(module)) { - newSet.add(module); - } - } - statForkedResultModulesCount += newSet.size; - cachedMinAvailableModules = newSet; - info.minAvailableModulesOwned = true; - info.minAvailableModules = newSet; - changed = true; - continue merge; - } - } - } else { - for (const m of cachedMinAvailableModules) { - if (!availableModules.has(m) && !availableModules.plus.has(m)) { - // cachedMinAvailableModules need to be modified - // but we don't own it - statForkedAvailableModules++; - statForkedAvailableModulesCount += - cachedMinAvailableModules.size; - statForkedAvailableModulesCountPlus += - cachedMinAvailableModules.plus.size; - statForkedMergedModulesCount += availableModules.size; - statForkedMergedModulesCountPlus += availableModules.plus.size; - // construct a new Set as intersection of cachedMinAvailableModules and availableModules - const newSet = /** @type {ModuleSetPlus} */ (new Set()); - newSet.plus = EMPTY_SET; - const iterator = cachedMinAvailableModules[Symbol.iterator](); - // fast forward add all modules until m - /** @type {IteratorResult} */ - let it; - while (!(it = iterator.next()).done) { - const module = it.value; - if (module === m) break; - newSet.add(module); - } - // check the remaining modules before adding - while (!(it = iterator.next()).done) { - const module = it.value; - if ( - availableModules.has(module) || - availableModules.plus.has(module) - ) { - newSet.add(module); - } - } - // also check all modules in cachedMinAvailableModules.plus - for (const module of cachedMinAvailableModules.plus) { - if ( - availableModules.has(module) || - availableModules.plus.has(module) - ) { - newSet.add(module); - } - } - statForkedResultModulesCount += newSet.size; - cachedMinAvailableModules = newSet; - info.minAvailableModulesOwned = true; - info.minAvailableModules = newSet; - changed = true; - continue merge; - } - } - for (const m of cachedMinAvailableModules.plus) { - if (!availableModules.has(m) && !availableModules.plus.has(m)) { - // cachedMinAvailableModules need to be modified - // but we don't own it - statForkedAvailableModules++; - statForkedAvailableModulesCount += - cachedMinAvailableModules.size; - statForkedAvailableModulesCountPlus += - cachedMinAvailableModules.plus.size; - statForkedMergedModulesCount += availableModules.size; - statForkedMergedModulesCountPlus += availableModules.plus.size; - // construct a new Set as intersection of cachedMinAvailableModules and availableModules - // we already know that all modules directly from cachedMinAvailableModules are in availableModules too - const newSet = /** @type {ModuleSetPlus} */ ( - new Set(cachedMinAvailableModules) - ); - newSet.plus = EMPTY_SET; - const iterator = - cachedMinAvailableModules.plus[Symbol.iterator](); - // fast forward add all modules until m - /** @type {IteratorResult} */ - let it; - while (!(it = iterator.next()).done) { - const module = it.value; - if (module === m) break; - newSet.add(module); - } - // check the remaining modules before adding - while (!(it = iterator.next()).done) { - const module = it.value; - if ( - availableModules.has(module) || - availableModules.plus.has(module) - ) { - newSet.add(module); - } - } - statForkedResultModulesCount += newSet.size; - cachedMinAvailableModules = newSet; - info.minAvailableModulesOwned = true; - info.minAvailableModules = newSet; - changed = true; - continue merge; - } - } - } - } - } - availableModulesToBeMerged.length = 0; - if (changed) { - info.resultingAvailableModules = undefined; - outdatedChunkGroupInfo.add(info); - } - } - chunkGroupsForMerging.clear(); - }; - - const processChunkGroupsForCombining = () => { - for (const info of chunkGroupsForCombining) { - for (const source of info.availableSources) { - if (!source.minAvailableModules) { - chunkGroupsForCombining.delete(info); - break; - } - } - } - for (const info of chunkGroupsForCombining) { - const availableModules = /** @type {ModuleSetPlus} */ (new Set()); - availableModules.plus = EMPTY_SET; - const mergeSet = set => { - if (set.size > availableModules.plus.size) { - for (const item of availableModules.plus) availableModules.add(item); - availableModules.plus = set; - } else { - for (const item of set) availableModules.add(item); - } - }; - // combine minAvailableModules from all resultingAvailableModules - for (const source of info.availableSources) { - const resultingAvailableModules = - calculateResultingAvailableModules(source); - mergeSet(resultingAvailableModules); - mergeSet(resultingAvailableModules.plus); - } - info.minAvailableModules = availableModules; - info.minAvailableModulesOwned = false; - info.resultingAvailableModules = undefined; - outdatedChunkGroupInfo.add(info); - } - chunkGroupsForCombining.clear(); - }; - - const processOutdatedChunkGroupInfo = () => { - statChunkGroupInfoUpdated += outdatedChunkGroupInfo.size; - // Revisit skipped elements - for (const info of outdatedChunkGroupInfo) { - // 1. Reconsider skipped items - if (info.skippedItems !== undefined) { - const { minAvailableModules } = info; - for (const module of info.skippedItems) { - if ( - !minAvailableModules.has(module) && - !minAvailableModules.plus.has(module) - ) { - queue.push({ - action: ADD_AND_ENTER_MODULE, - block: module, - module, - chunk: info.chunkGroup.chunks[0], - chunkGroup: info.chunkGroup, - chunkGroupInfo: info - }); - info.skippedItems.delete(module); - } - } - } - - // 2. Reconsider skipped connections - if (info.skippedModuleConnections !== undefined) { - const { minAvailableModules } = info; - for (const entry of info.skippedModuleConnections) { - const [module, activeState] = entry; - if (activeState === false) continue; - if (activeState === true) { - info.skippedModuleConnections.delete(entry); - } - if ( - activeState === true && - (minAvailableModules.has(module) || - minAvailableModules.plus.has(module)) - ) { - info.skippedItems.add(module); - continue; - } - queue.push({ - action: activeState === true ? ADD_AND_ENTER_MODULE : PROCESS_BLOCK, - block: module, - module, - chunk: info.chunkGroup.chunks[0], - chunkGroup: info.chunkGroup, - chunkGroupInfo: info - }); - } - } - - // 2. Reconsider children chunk groups - if (info.children !== undefined) { - statChildChunkGroupsReconnected += info.children.size; - for (const cgi of info.children) { - let connectList = queueConnect.get(info); - if (connectList === undefined) { - connectList = new Set(); - queueConnect.set(info, connectList); - } - connectList.add(cgi); - } - } - - // 3. Reconsider chunk groups for combining - if (info.availableChildren !== undefined) { - for (const cgi of info.availableChildren) { - chunkGroupsForCombining.add(cgi); - } - } - } - outdatedChunkGroupInfo.clear(); - }; - - // Iterative traversal of the Module graph - // Recursive would be simpler to write but could result in Stack Overflows - while (queue.length || queueConnect.size) { - logger.time("visitModules: visiting"); - processQueue(); - logger.timeAggregateEnd("visitModules: prepare"); - logger.timeEnd("visitModules: visiting"); - - if (chunkGroupsForCombining.size > 0) { - logger.time("visitModules: combine available modules"); - processChunkGroupsForCombining(); - logger.timeEnd("visitModules: combine available modules"); - } - - if (queueConnect.size > 0) { - logger.time("visitModules: calculating available modules"); - processConnectQueue(); - logger.timeEnd("visitModules: calculating available modules"); - - if (chunkGroupsForMerging.size > 0) { - logger.time("visitModules: merging available modules"); - processChunkGroupsForMerging(); - logger.timeEnd("visitModules: merging available modules"); - } - } - - if (outdatedChunkGroupInfo.size > 0) { - logger.time("visitModules: check modules for revisit"); - processOutdatedChunkGroupInfo(); - logger.timeEnd("visitModules: check modules for revisit"); - } - - // Run queueDelayed when all items of the queue are processed - // This is important to get the global indexing correct - // Async blocks should be processed after all sync blocks are processed - if (queue.length === 0) { - const tempQueue = queue; - queue = queueDelayed.reverse(); - queueDelayed = tempQueue; - } - } - - logger.log( - `${statProcessedQueueItems} queue items processed (${statProcessedBlocks} blocks)` - ); - logger.log(`${statConnectedChunkGroups} chunk groups connected`); - logger.log( - `${statProcessedChunkGroupsForMerging} chunk groups processed for merging (${statMergedAvailableModuleSets} module sets, ${statForkedAvailableModules} forked, ${statForkedAvailableModulesCount} + ${statForkedAvailableModulesCountPlus} modules forked, ${statForkedMergedModulesCount} + ${statForkedMergedModulesCountPlus} modules merged into fork, ${statForkedResultModulesCount} resulting modules)` - ); - logger.log( - `${statChunkGroupInfoUpdated} chunk group info updated (${statChildChunkGroupsReconnected} already connected chunk groups reconnected)` - ); -}; - -/** - * - * @param {Compilation} compilation the compilation - * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks - * @param {Map} blockConnections connection for blocks - * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules - */ -const connectChunkGroups = ( - compilation, - blocksWithNestedBlocks, - blockConnections, - chunkGroupInfoMap -) => { - const { chunkGraph } = compilation; - - /** - * Helper function to check if all modules of a chunk are available - * - * @param {ChunkGroup} chunkGroup the chunkGroup to scan - * @param {ModuleSetPlus} availableModules the comparator set - * @returns {boolean} return true if all modules of a chunk are available - */ - const areModulesAvailable = (chunkGroup, availableModules) => { - for (const chunk of chunkGroup.chunks) { - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (!availableModules.has(module) && !availableModules.plus.has(module)) - return false; - } - } - return true; - }; - - // For each edge in the basic chunk graph - for (const [block, connections] of blockConnections) { - // 1. Check if connection is needed - // When none of the dependencies need to be connected - // we can skip all of them - // It's not possible to filter each item so it doesn't create inconsistent - // connections and modules can only create one version - // TODO maybe decide this per runtime - if ( - // TODO is this needed? - !blocksWithNestedBlocks.has(block) && - connections.every(({ chunkGroup, originChunkGroupInfo }) => - areModulesAvailable( - chunkGroup, - originChunkGroupInfo.resultingAvailableModules - ) - ) - ) { - continue; - } - - // 2. Foreach edge - for (let i = 0; i < connections.length; i++) { - const { chunkGroup, originChunkGroupInfo } = connections[i]; - - // 3. Connect block with chunk - chunkGraph.connectBlockAndChunkGroup(block, chunkGroup); - - // 4. Connect chunk with parent - connectChunkGroupParentAndChild( - originChunkGroupInfo.chunkGroup, - chunkGroup - ); - } - } -}; - -/** - * Remove all unconnected chunk groups - * @param {Compilation} compilation the compilation - * @param {Iterable} allCreatedChunkGroups all chunk groups that where created before - */ -const cleanupUnconnectedGroups = (compilation, allCreatedChunkGroups) => { - const { chunkGraph } = compilation; - - for (const chunkGroup of allCreatedChunkGroups) { - if (chunkGroup.getNumberOfParents() === 0) { - for (const chunk of chunkGroup.chunks) { - compilation.chunks.delete(chunk); - chunkGraph.disconnectChunk(chunk); - } - chunkGraph.disconnectChunkGroup(chunkGroup); - chunkGroup.remove(); - } - } -}; - -/** - * This method creates the Chunk graph from the Module graph - * @param {Compilation} compilation the compilation - * @param {Map} inputEntrypointsAndModules chunk groups which are processed with the modules - * @returns {void} - */ -const buildChunkGraph = (compilation, inputEntrypointsAndModules) => { - const logger = compilation.getLogger("webpack.buildChunkGraph"); - - // SHARED STATE - - /** @type {Map} */ - const blockConnections = new Map(); - - /** @type {Set} */ - const allCreatedChunkGroups = new Set(); - - /** @type {Map} */ - const chunkGroupInfoMap = new Map(); - - /** @type {Set} */ - const blocksWithNestedBlocks = new Set(); - - // PART ONE - - logger.time("visitModules"); - visitModules( - logger, - compilation, - inputEntrypointsAndModules, - chunkGroupInfoMap, - blockConnections, - blocksWithNestedBlocks, - allCreatedChunkGroups - ); - logger.timeEnd("visitModules"); - - // PART TWO - - logger.time("connectChunkGroups"); - connectChunkGroups( - compilation, - blocksWithNestedBlocks, - blockConnections, - chunkGroupInfoMap - ); - logger.timeEnd("connectChunkGroups"); - - for (const [chunkGroup, chunkGroupInfo] of chunkGroupInfoMap) { - for (const chunk of chunkGroup.chunks) - chunk.runtime = mergeRuntime(chunk.runtime, chunkGroupInfo.runtime); - } - - // Cleanup work - - logger.time("cleanup"); - cleanupUnconnectedGroups(compilation, allCreatedChunkGroups); - logger.timeEnd("cleanup"); -}; - -module.exports = buildChunkGraph; - - -/***/ }), - -/***/ 81887: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Compiler")} Compiler */ - -class AddBuildDependenciesPlugin { - /** - * @param {Iterable} buildDependencies list of build dependencies - */ - constructor(buildDependencies) { - this.buildDependencies = new Set(buildDependencies); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "AddBuildDependenciesPlugin", - compilation => { - compilation.buildDependencies.addAll(this.buildDependencies); - } - ); - } -} - -module.exports = AddBuildDependenciesPlugin; - - -/***/ }), - -/***/ 9652: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Compiler")} Compiler */ - -class AddManagedPathsPlugin { - /** - * @param {Iterable} managedPaths list of managed paths - * @param {Iterable} immutablePaths list of immutable paths - */ - constructor(managedPaths, immutablePaths) { - this.managedPaths = new Set(managedPaths); - this.immutablePaths = new Set(immutablePaths); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - for (const managedPath of this.managedPaths) { - compiler.managedPaths.add(managedPath); - } - for (const immutablePath of this.immutablePaths) { - compiler.immutablePaths.add(immutablePath); - } - } -} - -module.exports = AddManagedPathsPlugin; - - -/***/ }), - -/***/ 97079: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Cache = __webpack_require__(25363); -const ProgressPlugin = __webpack_require__(67317); - -/** @typedef {import("../Compiler")} Compiler */ - -const BUILD_DEPENDENCIES_KEY = Symbol(); - -class IdleFileCachePlugin { - /** - * @param {TODO} strategy cache strategy - * @param {number} idleTimeout timeout - * @param {number} idleTimeoutForInitialStore initial timeout - * @param {number} idleTimeoutAfterLargeChanges timeout after changes - */ - constructor( - strategy, - idleTimeout, - idleTimeoutForInitialStore, - idleTimeoutAfterLargeChanges - ) { - this.strategy = strategy; - this.idleTimeout = idleTimeout; - this.idleTimeoutForInitialStore = idleTimeoutForInitialStore; - this.idleTimeoutAfterLargeChanges = idleTimeoutAfterLargeChanges; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - let strategy = this.strategy; - const idleTimeout = this.idleTimeout; - const idleTimeoutForInitialStore = Math.min( - idleTimeout, - this.idleTimeoutForInitialStore - ); - const idleTimeoutAfterLargeChanges = this.idleTimeoutAfterLargeChanges; - const resolvedPromise = Promise.resolve(); - - let timeSpendInBuild = 0; - let timeSpendInStore = 0; - let avgTimeSpendInStore = 0; - - /** @type {Map Promise>} */ - const pendingIdleTasks = new Map(); - - compiler.cache.hooks.store.tap( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - (identifier, etag, data) => { - pendingIdleTasks.set(identifier, () => - strategy.store(identifier, etag, data) - ); - } - ); - - compiler.cache.hooks.get.tapPromise( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - (identifier, etag, gotHandlers) => { - const restore = () => - strategy.restore(identifier, etag).then(cacheEntry => { - if (cacheEntry === undefined) { - gotHandlers.push((result, callback) => { - if (result !== undefined) { - pendingIdleTasks.set(identifier, () => - strategy.store(identifier, etag, result) - ); - } - callback(); - }); - } else { - return cacheEntry; - } - }); - const pendingTask = pendingIdleTasks.get(identifier); - if (pendingTask !== undefined) { - pendingIdleTasks.delete(identifier); - return pendingTask().then(restore); - } - return restore(); - } - ); - - compiler.cache.hooks.storeBuildDependencies.tap( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - dependencies => { - pendingIdleTasks.set(BUILD_DEPENDENCIES_KEY, () => - strategy.storeBuildDependencies(dependencies) - ); - } - ); - - compiler.cache.hooks.shutdown.tapPromise( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - () => { - if (idleTimer) { - clearTimeout(idleTimer); - idleTimer = undefined; - } - isIdle = false; - const reportProgress = ProgressPlugin.getReporter(compiler); - const jobs = Array.from(pendingIdleTasks.values()); - if (reportProgress) reportProgress(0, "process pending cache items"); - const promises = jobs.map(fn => fn()); - pendingIdleTasks.clear(); - promises.push(currentIdlePromise); - const promise = Promise.all(promises); - currentIdlePromise = promise.then(() => strategy.afterAllStored()); - if (reportProgress) { - currentIdlePromise = currentIdlePromise.then(() => { - reportProgress(1, `stored`); - }); - } - return currentIdlePromise.then(() => { - // Reset strategy - if (strategy.clear) strategy.clear(); - }); - } - ); - - /** @type {Promise} */ - let currentIdlePromise = resolvedPromise; - let isIdle = false; - let isInitialStore = true; - const processIdleTasks = () => { - if (isIdle) { - const startTime = Date.now(); - if (pendingIdleTasks.size > 0) { - const promises = [currentIdlePromise]; - const maxTime = startTime + 100; - let maxCount = 100; - for (const [filename, factory] of pendingIdleTasks) { - pendingIdleTasks.delete(filename); - promises.push(factory()); - if (maxCount-- <= 0 || Date.now() > maxTime) break; - } - currentIdlePromise = Promise.all(promises); - currentIdlePromise.then(() => { - timeSpendInStore += Date.now() - startTime; - // Allow to exit the process between - idleTimer = setTimeout(processIdleTasks, 0); - idleTimer.unref(); - }); - return; - } - currentIdlePromise = currentIdlePromise - .then(async () => { - await strategy.afterAllStored(); - timeSpendInStore += Date.now() - startTime; - avgTimeSpendInStore = - Math.max(avgTimeSpendInStore, timeSpendInStore) * 0.9 + - timeSpendInStore * 0.1; - timeSpendInStore = 0; - timeSpendInBuild = 0; - }) - .catch(err => { - const logger = compiler.getInfrastructureLogger( - "IdleFileCachePlugin" - ); - logger.warn(`Background tasks during idle failed: ${err.message}`); - logger.debug(err.stack); - }); - isInitialStore = false; - } - }; - let idleTimer = undefined; - compiler.cache.hooks.beginIdle.tap( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - () => { - const isLargeChange = timeSpendInBuild > avgTimeSpendInStore * 2; - if (isInitialStore && idleTimeoutForInitialStore < idleTimeout) { - compiler - .getInfrastructureLogger("IdleFileCachePlugin") - .log( - `Initial cache was generated and cache will be persisted in ${ - idleTimeoutForInitialStore / 1000 - }s.` - ); - } else if ( - isLargeChange && - idleTimeoutAfterLargeChanges < idleTimeout - ) { - compiler - .getInfrastructureLogger("IdleFileCachePlugin") - .log( - `Spend ${Math.round(timeSpendInBuild) / 1000}s in build and ${ - Math.round(avgTimeSpendInStore) / 1000 - }s in average in cache store. This is considered as large change and cache will be persisted in ${ - idleTimeoutAfterLargeChanges / 1000 - }s.` - ); - } - idleTimer = setTimeout(() => { - idleTimer = undefined; - isIdle = true; - resolvedPromise.then(processIdleTasks); - }, Math.min(isInitialStore ? idleTimeoutForInitialStore : Infinity, isLargeChange ? idleTimeoutAfterLargeChanges : Infinity, idleTimeout)); - idleTimer.unref(); - } - ); - compiler.cache.hooks.endIdle.tap( - { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, - () => { - if (idleTimer) { - clearTimeout(idleTimer); - idleTimer = undefined; - } - isIdle = false; - } - ); - compiler.hooks.done.tap("IdleFileCachePlugin", stats => { - // 10% build overhead is ignored, as it's not cacheable - timeSpendInBuild *= 0.9; - timeSpendInBuild += stats.endTime - stats.startTime; - }); - } -} - -module.exports = IdleFileCachePlugin; - - -/***/ }), - -/***/ 64542: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Cache = __webpack_require__(25363); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Cache").Etag} Etag */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class MemoryCachePlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - /** @type {Map} */ - const cache = new Map(); - compiler.cache.hooks.store.tap( - { name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY }, - (identifier, etag, data) => { - cache.set(identifier, { etag, data }); - } - ); - compiler.cache.hooks.get.tap( - { name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY }, - (identifier, etag, gotHandlers) => { - const cacheEntry = cache.get(identifier); - if (cacheEntry === null) { - return null; - } else if (cacheEntry !== undefined) { - return cacheEntry.etag === etag ? cacheEntry.data : null; - } - gotHandlers.push((result, callback) => { - if (result === undefined) { - cache.set(identifier, null); - } else { - cache.set(identifier, { etag, data: result }); - } - return callback(); - }); - } - ); - compiler.cache.hooks.shutdown.tap( - { name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY }, - () => { - cache.clear(); - } - ); - } -} -module.exports = MemoryCachePlugin; - - -/***/ }), - -/***/ 56171: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Cache = __webpack_require__(25363); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Cache").Etag} Etag */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class MemoryWithGcCachePlugin { - constructor({ maxGenerations }) { - this._maxGenerations = maxGenerations; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const maxGenerations = this._maxGenerations; - /** @type {Map} */ - const cache = new Map(); - /** @type {Map} */ - const oldCache = new Map(); - let generation = 0; - let cachePosition = 0; - const logger = compiler.getInfrastructureLogger("MemoryWithGcCachePlugin"); - compiler.hooks.afterDone.tap("MemoryWithGcCachePlugin", () => { - generation++; - let clearedEntries = 0; - let lastClearedIdentifier; - for (const [identifier, entry] of oldCache) { - if (entry.until > generation) break; - - oldCache.delete(identifier); - if (cache.get(identifier) === undefined) { - cache.delete(identifier); - clearedEntries++; - lastClearedIdentifier = identifier; - } - } - if (clearedEntries > 0 || oldCache.size > 0) { - logger.log( - `${cache.size - oldCache.size} active entries, ${ - oldCache.size - } recently unused cached entries${ - clearedEntries > 0 - ? `, ${clearedEntries} old unused cache entries removed e. g. ${lastClearedIdentifier}` - : "" - }` - ); - } - let i = (cache.size / maxGenerations) | 0; - let j = cachePosition >= cache.size ? 0 : cachePosition; - cachePosition = j + i; - for (const [identifier, entry] of cache) { - if (j !== 0) { - j--; - continue; - } - if (entry !== undefined) { - // We don't delete the cache entry, but set it to undefined instead - // This reserves the location in the data table and avoids rehashing - // when constantly adding and removing entries. - // It will be deleted when removed from oldCache. - cache.set(identifier, undefined); - oldCache.delete(identifier); - oldCache.set(identifier, { - entry, - until: generation + maxGenerations - }); - if (i-- === 0) break; - } - } - }); - compiler.cache.hooks.store.tap( - { name: "MemoryWithGcCachePlugin", stage: Cache.STAGE_MEMORY }, - (identifier, etag, data) => { - cache.set(identifier, { etag, data }); - } - ); - compiler.cache.hooks.get.tap( - { name: "MemoryWithGcCachePlugin", stage: Cache.STAGE_MEMORY }, - (identifier, etag, gotHandlers) => { - const cacheEntry = cache.get(identifier); - if (cacheEntry === null) { - return null; - } else if (cacheEntry !== undefined) { - return cacheEntry.etag === etag ? cacheEntry.data : null; - } - const oldCacheEntry = oldCache.get(identifier); - if (oldCacheEntry !== undefined) { - const cacheEntry = oldCacheEntry.entry; - if (cacheEntry === null) { - oldCache.delete(identifier); - cache.set(identifier, cacheEntry); - return null; - } else { - if (cacheEntry.etag !== etag) return null; - oldCache.delete(identifier); - cache.set(identifier, cacheEntry); - return cacheEntry.data; - } - } - gotHandlers.push((result, callback) => { - if (result === undefined) { - cache.set(identifier, null); - } else { - cache.set(identifier, { etag, data: result }); - } - return callback(); - }); - } - ); - compiler.cache.hooks.shutdown.tap( - { name: "MemoryWithGcCachePlugin", stage: Cache.STAGE_MEMORY }, - () => { - cache.clear(); - oldCache.clear(); - } - ); - } -} -module.exports = MemoryWithGcCachePlugin; - - -/***/ }), - -/***/ 26174: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const FileSystemInfo = __webpack_require__(67469); -const ProgressPlugin = __webpack_require__(67317); -const { formatSize } = __webpack_require__(67309); -const SerializerMiddleware = __webpack_require__(51947); -const LazySet = __webpack_require__(96522); -const makeSerializable = __webpack_require__(65764); -const memoize = __webpack_require__(61374); -const { - createFileSerializer, - NOT_SERIALIZABLE -} = __webpack_require__(7591); - -/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */ -/** @typedef {import("../Cache").Etag} Etag */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../FileSystemInfo").Snapshot} Snapshot */ -/** @typedef {import("../logging/Logger").Logger} Logger */ -/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ - -class PackContainer { - /** - * @param {Object} data stored data - * @param {string} version version identifier - * @param {Snapshot} buildSnapshot snapshot of all build dependencies - * @param {Set} buildDependencies list of all unresolved build dependencies captured - * @param {Map} resolveResults result of the resolved build dependencies - * @param {Snapshot} resolveBuildDependenciesSnapshot snapshot of the dependencies of the build dependencies resolving - */ - constructor( - data, - version, - buildSnapshot, - buildDependencies, - resolveResults, - resolveBuildDependenciesSnapshot - ) { - this.data = data; - this.version = version; - this.buildSnapshot = buildSnapshot; - this.buildDependencies = buildDependencies; - this.resolveResults = resolveResults; - this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot; - } - - serialize({ write, writeLazy }) { - write(this.version); - write(this.buildSnapshot); - write(this.buildDependencies); - write(this.resolveResults); - write(this.resolveBuildDependenciesSnapshot); - writeLazy(this.data); - } - - deserialize({ read }) { - this.version = read(); - this.buildSnapshot = read(); - this.buildDependencies = read(); - this.resolveResults = read(); - this.resolveBuildDependenciesSnapshot = read(); - this.data = read(); - } -} - -makeSerializable( - PackContainer, - "webpack/lib/cache/PackFileCacheStrategy", - "PackContainer" -); - -const MIN_CONTENT_SIZE = 1024 * 1024; // 1 MB -const CONTENT_COUNT_TO_MERGE = 10; -const MIN_ITEMS_IN_FRESH_PACK = 100; -const MAX_ITEMS_IN_FRESH_PACK = 50000; -const MAX_TIME_IN_FRESH_PACK = 1 * 60 * 1000; // 1 min - -class PackItemInfo { - /** - * @param {string} identifier identifier of item - * @param {string | null} etag etag of item - * @param {any} value fresh value of item - */ - constructor(identifier, etag, value) { - this.identifier = identifier; - this.etag = etag; - this.location = -1; - this.lastAccess = Date.now(); - this.freshValue = value; - } -} - -class Pack { - constructor(logger, maxAge) { - /** @type {Map} */ - this.itemInfo = new Map(); - /** @type {string[]} */ - this.requests = []; - this.requestsTimeout = undefined; - /** @type {Map} */ - this.freshContent = new Map(); - /** @type {(undefined | PackContent)[]} */ - this.content = []; - this.invalid = false; - this.logger = logger; - this.maxAge = maxAge; - } - - _addRequest(identifier) { - this.requests.push(identifier); - if (this.requestsTimeout === undefined) { - this.requestsTimeout = setTimeout(() => { - this.requests.push(undefined); - this.requestsTimeout = undefined; - }, MAX_TIME_IN_FRESH_PACK); - if (this.requestsTimeout.unref) this.requestsTimeout.unref(); - } - } - - stopCapturingRequests() { - if (this.requestsTimeout !== undefined) { - clearTimeout(this.requestsTimeout); - this.requestsTimeout = undefined; - } - } - - /** - * @param {string} identifier unique name for the resource - * @param {string | null} etag etag of the resource - * @returns {any} cached content - */ - get(identifier, etag) { - const info = this.itemInfo.get(identifier); - this._addRequest(identifier); - if (info === undefined) { - return undefined; - } - if (info.etag !== etag) return null; - info.lastAccess = Date.now(); - const loc = info.location; - if (loc === -1) { - return info.freshValue; - } else { - if (!this.content[loc]) { - return undefined; - } - return this.content[loc].get(identifier); - } - } - - /** - * @param {string} identifier unique name for the resource - * @param {string | null} etag etag of the resource - * @param {any} data cached content - * @returns {void} - */ - set(identifier, etag, data) { - if (!this.invalid) { - this.invalid = true; - this.logger.log(`Pack got invalid because of write to: ${identifier}`); - } - const info = this.itemInfo.get(identifier); - if (info === undefined) { - const newInfo = new PackItemInfo(identifier, etag, data); - this.itemInfo.set(identifier, newInfo); - this._addRequest(identifier); - this.freshContent.set(identifier, newInfo); - } else { - const loc = info.location; - if (loc >= 0) { - this._addRequest(identifier); - this.freshContent.set(identifier, info); - const content = this.content[loc]; - content.delete(identifier); - if (content.items.size === 0) { - this.content[loc] = undefined; - this.logger.debug("Pack %d got empty and is removed", loc); - } - } - info.freshValue = data; - info.lastAccess = Date.now(); - info.etag = etag; - info.location = -1; - } - } - - getContentStats() { - let count = 0; - let size = 0; - for (const content of this.content) { - if (content !== undefined) { - count++; - const s = content.getSize(); - if (s > 0) { - size += s; - } - } - } - return { count, size }; - } - - /** - * @returns {number} new location of data entries - */ - _findLocation() { - let i; - for (i = 0; i < this.content.length && this.content[i] !== undefined; i++); - return i; - } - - _gcAndUpdateLocation(items, usedItems, newLoc) { - let count = 0; - let lastGC; - const now = Date.now(); - for (const identifier of items) { - const info = this.itemInfo.get(identifier); - if (now - info.lastAccess > this.maxAge) { - this.itemInfo.delete(identifier); - items.delete(identifier); - usedItems.delete(identifier); - count++; - lastGC = identifier; - } else { - info.location = newLoc; - } - } - if (count > 0) { - this.logger.log( - "Garbage Collected %d old items at pack %d (%d items remaining) e. g. %s", - count, - newLoc, - items.size, - lastGC - ); - } - } - - _persistFreshContent() { - const itemsCount = this.freshContent.size; - if (itemsCount > 0) { - const packCount = Math.ceil(itemsCount / MAX_ITEMS_IN_FRESH_PACK); - const itemsPerPack = Math.ceil(itemsCount / packCount); - const packs = []; - let i = 0; - let ignoreNextTimeTick = false; - const createNextPack = () => { - const loc = this._findLocation(); - this.content[loc] = null; // reserve - const pack = { - /** @type {Set} */ - items: new Set(), - /** @type {Map} */ - map: new Map(), - loc - }; - packs.push(pack); - return pack; - }; - let pack = createNextPack(); - if (this.requestsTimeout !== undefined) - clearTimeout(this.requestsTimeout); - for (const identifier of this.requests) { - if (identifier === undefined) { - if (ignoreNextTimeTick) { - ignoreNextTimeTick = false; - } else if (pack.items.size >= MIN_ITEMS_IN_FRESH_PACK) { - i = 0; - pack = createNextPack(); - } - continue; - } - const info = this.freshContent.get(identifier); - if (info === undefined) continue; - pack.items.add(identifier); - pack.map.set(identifier, info.freshValue); - info.location = pack.loc; - info.freshValue = undefined; - this.freshContent.delete(identifier); - if (++i > itemsPerPack) { - i = 0; - pack = createNextPack(); - ignoreNextTimeTick = true; - } - } - this.requests.length = 0; - for (const pack of packs) { - this.content[pack.loc] = new PackContent( - pack.items, - new Set(pack.items), - new PackContentItems(pack.map) - ); - } - this.logger.log( - `${itemsCount} fresh items in cache put into pack ${ - packs.length > 1 - ? packs - .map(pack => `${pack.loc} (${pack.items.size} items)`) - .join(", ") - : packs[0].loc - }` - ); - } - } - - /** - * Merges small content files to a single content file - */ - _optimizeSmallContent() { - // 1. Find all small content files - // Treat unused content files separately to avoid - // a merge-split cycle - /** @type {number[]} */ - const smallUsedContents = []; - /** @type {number} */ - let smallUsedContentSize = 0; - /** @type {number[]} */ - const smallUnusedContents = []; - /** @type {number} */ - let smallUnusedContentSize = 0; - for (let i = 0; i < this.content.length; i++) { - const content = this.content[i]; - if (content === undefined) continue; - if (content.outdated) continue; - const size = content.getSize(); - if (size < 0 || size > MIN_CONTENT_SIZE) continue; - if (content.used.size > 0) { - smallUsedContents.push(i); - smallUsedContentSize += size; - } else { - smallUnusedContents.push(i); - smallUnusedContentSize += size; - } - } - - // 2. Check if minimum number is reached - let mergedIndices; - if ( - smallUsedContents.length >= CONTENT_COUNT_TO_MERGE || - smallUsedContentSize > MIN_CONTENT_SIZE - ) { - mergedIndices = smallUsedContents; - } else if ( - smallUnusedContents.length >= CONTENT_COUNT_TO_MERGE || - smallUnusedContentSize > MIN_CONTENT_SIZE - ) { - mergedIndices = smallUnusedContents; - } else return; - - const mergedContent = []; - - // 3. Remove old content entries - for (const i of mergedIndices) { - mergedContent.push(this.content[i]); - this.content[i] = undefined; - } - - // 4. Determine merged items - /** @type {Set} */ - const mergedItems = new Set(); - /** @type {Set} */ - const mergedUsedItems = new Set(); - /** @type {(function(Map): Promise)[]} */ - const addToMergedMap = []; - for (const content of mergedContent) { - for (const identifier of content.items) { - mergedItems.add(identifier); - } - for (const identifier of content.used) { - mergedUsedItems.add(identifier); - } - addToMergedMap.push(async map => { - // unpack existing content - // after that values are accessible in .content - await content.unpack( - "it should be merged with other small pack contents" - ); - for (const [identifier, value] of content.content) { - map.set(identifier, value); - } - }); - } - - // 5. GC and update location of merged items - const newLoc = this._findLocation(); - this._gcAndUpdateLocation(mergedItems, mergedUsedItems, newLoc); - - // 6. If not empty, store content somewhere - if (mergedItems.size > 0) { - this.content[newLoc] = new PackContent( - mergedItems, - mergedUsedItems, - memoize(async () => { - /** @type {Map} */ - const map = new Map(); - await Promise.all(addToMergedMap.map(fn => fn(map))); - return new PackContentItems(map); - }) - ); - this.logger.log( - "Merged %d small files with %d cache items into pack %d", - mergedContent.length, - mergedItems.size, - newLoc - ); - } - } - - /** - * Split large content files with used and unused items - * into two parts to separate used from unused items - */ - _optimizeUnusedContent() { - // 1. Find a large content file with used and unused items - for (let i = 0; i < this.content.length; i++) { - const content = this.content[i]; - if (content === undefined) continue; - const size = content.getSize(); - if (size < MIN_CONTENT_SIZE) continue; - const used = content.used.size; - const total = content.items.size; - if (used > 0 && used < total) { - // 2. Remove this content - this.content[i] = undefined; - - // 3. Determine items for the used content file - const usedItems = new Set(content.used); - const newLoc = this._findLocation(); - this._gcAndUpdateLocation(usedItems, usedItems, newLoc); - - // 4. Create content file for used items - if (usedItems.size > 0) { - this.content[newLoc] = new PackContent( - usedItems, - new Set(usedItems), - async () => { - await content.unpack( - "it should be splitted into used and unused items" - ); - const map = new Map(); - for (const identifier of usedItems) { - map.set(identifier, content.content.get(identifier)); - } - return new PackContentItems(map); - } - ); - } - - // 5. Determine items for the unused content file - const unusedItems = new Set(content.items); - const usedOfUnusedItems = new Set(); - for (const identifier of usedItems) { - unusedItems.delete(identifier); - } - const newUnusedLoc = this._findLocation(); - this._gcAndUpdateLocation(unusedItems, usedOfUnusedItems, newUnusedLoc); - - // 6. Create content file for unused items - if (unusedItems.size > 0) { - this.content[newUnusedLoc] = new PackContent( - unusedItems, - usedOfUnusedItems, - async () => { - await content.unpack( - "it should be splitted into used and unused items" - ); - const map = new Map(); - for (const identifier of unusedItems) { - map.set(identifier, content.content.get(identifier)); - } - return new PackContentItems(map); - } - ); - } - - this.logger.log( - "Split pack %d into pack %d with %d used items and pack %d with %d unused items", - i, - newLoc, - usedItems.size, - newUnusedLoc, - unusedItems.size - ); - - // optimizing only one of them is good enough and - // reduces the amount of serialization needed - return; - } - } - } - - /** - * Find the content with the oldest item and run GC on that. - * Only runs for one content to avoid large invalidation. - */ - _gcOldestContent() { - /** @type {PackItemInfo} */ - let oldest = undefined; - for (const info of this.itemInfo.values()) { - if (oldest === undefined || info.lastAccess < oldest.lastAccess) { - oldest = info; - } - } - if (Date.now() - oldest.lastAccess > this.maxAge) { - const loc = oldest.location; - if (loc < 0) return; - const content = this.content[loc]; - const items = new Set(content.items); - const usedItems = new Set(content.used); - this._gcAndUpdateLocation(items, usedItems, loc); - - this.content[loc] = - items.size > 0 - ? new PackContent(items, usedItems, async () => { - await content.unpack( - "it contains old items that should be garbage collected" - ); - const map = new Map(); - for (const identifier of items) { - map.set(identifier, content.content.get(identifier)); - } - return new PackContentItems(map); - }) - : undefined; - } - } - - serialize({ write, writeSeparate }) { - this._persistFreshContent(); - this._optimizeSmallContent(); - this._optimizeUnusedContent(); - this._gcOldestContent(); - for (const identifier of this.itemInfo.keys()) { - write(identifier); - } - write(null); // null as marker of the end of keys - for (const info of this.itemInfo.values()) { - write(info.etag); - } - for (const info of this.itemInfo.values()) { - write(info.lastAccess); - } - for (let i = 0; i < this.content.length; i++) { - const content = this.content[i]; - if (content !== undefined) { - write(content.items); - content.writeLazy(lazy => writeSeparate(lazy, { name: `${i}` })); - } else { - write(undefined); // undefined marks an empty content slot - } - } - write(null); // null as marker of the end of items - } - - deserialize({ read, logger }) { - this.logger = logger; - { - const items = []; - let item = read(); - while (item !== null) { - items.push(item); - item = read(); - } - this.itemInfo.clear(); - const infoItems = items.map(identifier => { - const info = new PackItemInfo(identifier, undefined, undefined); - this.itemInfo.set(identifier, info); - return info; - }); - for (const info of infoItems) { - info.etag = read(); - } - for (const info of infoItems) { - info.lastAccess = read(); - } - } - this.content.length = 0; - let items = read(); - while (items !== null) { - if (items === undefined) { - this.content.push(items); - } else { - const idx = this.content.length; - const lazy = read(); - this.content.push( - new PackContent( - items, - new Set(), - lazy, - logger, - `${this.content.length}` - ) - ); - for (const identifier of items) { - this.itemInfo.get(identifier).location = idx; - } - } - items = read(); - } - } -} - -makeSerializable(Pack, "webpack/lib/cache/PackFileCacheStrategy", "Pack"); - -class PackContentItems { - /** - * @param {Map} map items - */ - constructor(map) { - this.map = map; - } - - serialize({ write, snapshot, rollback, logger, profile }) { - if (profile) { - write(false); - for (const [key, value] of this.map) { - const s = snapshot(); - try { - write(key); - const start = process.hrtime(); - write(value); - const durationHr = process.hrtime(start); - const duration = durationHr[0] * 1000 + durationHr[1] / 1e6; - if (duration > 1) { - if (duration > 500) - logger.error(`Serialization of '${key}': ${duration} ms`); - else if (duration > 50) - logger.warn(`Serialization of '${key}': ${duration} ms`); - else if (duration > 10) - logger.info(`Serialization of '${key}': ${duration} ms`); - else if (duration > 5) - logger.log(`Serialization of '${key}': ${duration} ms`); - else logger.debug(`Serialization of '${key}': ${duration} ms`); - } - } catch (e) { - rollback(s); - if (e === NOT_SERIALIZABLE) continue; - const msg = "Skipped not serializable cache item"; - if (e.message.includes("ModuleBuildError")) { - logger.log(`${msg} (in build error): ${e.message}`); - logger.debug(`${msg} '${key}' (in build error): ${e.stack}`); - } else { - logger.warn(`${msg}: ${e.message}`); - logger.debug(`${msg} '${key}': ${e.stack}`); - } - } - } - write(null); - return; - } - // Try to serialize all at once - const s = snapshot(); - try { - write(true); - write(this.map); - } catch (e) { - rollback(s); - - // Try to serialize each item on it's own - write(false); - for (const [key, value] of this.map) { - const s = snapshot(); - try { - write(key); - write(value); - } catch (e) { - rollback(s); - if (e === NOT_SERIALIZABLE) continue; - logger.warn( - `Skipped not serializable cache item '${key}': ${e.message}` - ); - logger.debug(e.stack); - } - } - write(null); - } - } - - deserialize({ read, logger, profile }) { - if (read()) { - this.map = read(); - } else if (profile) { - const map = new Map(); - let key = read(); - while (key !== null) { - const start = process.hrtime(); - const value = read(); - const durationHr = process.hrtime(start); - const duration = durationHr[0] * 1000 + durationHr[1] / 1e6; - if (duration > 1) { - if (duration > 100) - logger.error(`Deserialization of '${key}': ${duration} ms`); - else if (duration > 20) - logger.warn(`Deserialization of '${key}': ${duration} ms`); - else if (duration > 5) - logger.info(`Deserialization of '${key}': ${duration} ms`); - else if (duration > 2) - logger.log(`Deserialization of '${key}': ${duration} ms`); - else logger.debug(`Deserialization of '${key}': ${duration} ms`); - } - map.set(key, value); - key = read(); - } - this.map = map; - } else { - const map = new Map(); - let key = read(); - while (key !== null) { - map.set(key, read()); - key = read(); - } - this.map = map; - } - } -} - -makeSerializable( - PackContentItems, - "webpack/lib/cache/PackFileCacheStrategy", - "PackContentItems" -); - -class PackContent { - /* - This class can be in these states: - | this.lazy | this.content | this.outdated | state - A1 | undefined | Map | false | fresh content - A2 | undefined | Map | true | (will not happen) - B1 | lazy () => {} | undefined | false | not deserialized - B2 | lazy () => {} | undefined | true | not deserialized, but some items has been removed - C1 | lazy* () => {} | Map | false | deserialized - C2 | lazy* () => {} | Map | true | deserialized, and some items has been removed - - this.used is a subset of this.items. - this.items is a subset of this.content.keys() resp. this.lazy().map.keys() - When this.outdated === false, this.items === this.content.keys() resp. this.lazy().map.keys() - When this.outdated === true, this.items should be used to recreated this.lazy/this.content. - When this.lazy and this.content is set, they contain the same data. - this.get must only be called with a valid item from this.items. - In state C this.lazy is unMemoized - */ - - /** - * @param {Set} items keys - * @param {Set} usedItems used keys - * @param {PackContentItems | function(): Promise} dataOrFn sync or async content - * @param {Logger=} logger logger for logging - * @param {string=} lazyName name of dataOrFn for logging - */ - constructor(items, usedItems, dataOrFn, logger, lazyName) { - this.items = items; - /** @type {function(): Promise | PackContentItems} */ - this.lazy = typeof dataOrFn === "function" ? dataOrFn : undefined; - /** @type {Map} */ - this.content = typeof dataOrFn === "function" ? undefined : dataOrFn.map; - this.outdated = false; - this.used = usedItems; - this.logger = logger; - this.lazyName = lazyName; - } - - get(identifier) { - this.used.add(identifier); - if (this.content) { - return this.content.get(identifier); - } - - // We are in state B - const { lazyName } = this; - let timeMessage; - if (lazyName) { - // only log once - this.lazyName = undefined; - timeMessage = `restore cache content ${lazyName} (${formatSize( - this.getSize() - )})`; - this.logger.log( - `starting to restore cache content ${lazyName} (${formatSize( - this.getSize() - )}) because of request to: ${identifier}` - ); - this.logger.time(timeMessage); - } - const value = this.lazy(); - if ("then" in value) { - return value.then(data => { - const map = data.map; - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - // Move to state C - this.content = map; - this.lazy = SerializerMiddleware.unMemoizeLazy(this.lazy); - return map.get(identifier); - }); - } else { - const map = value.map; - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - // Move to state C - this.content = map; - this.lazy = SerializerMiddleware.unMemoizeLazy(this.lazy); - return map.get(identifier); - } - } - - /** - * @param {string} reason explanation why unpack is necessary - * @returns {void | Promise} maybe a promise if lazy - */ - unpack(reason) { - if (this.content) return; - - // Move from state B to C - if (this.lazy) { - const { lazyName } = this; - let timeMessage; - if (lazyName) { - // only log once - this.lazyName = undefined; - timeMessage = `unpack cache content ${lazyName} (${formatSize( - this.getSize() - )})`; - this.logger.log( - `starting to unpack cache content ${lazyName} (${formatSize( - this.getSize() - )}) because ${reason}` - ); - this.logger.time(timeMessage); - } - const value = this.lazy(); - if ("then" in value) { - return value.then(data => { - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - this.content = data.map; - }); - } else { - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - this.content = value.map; - } - } - } - - /** - * @returns {number} size of the content or -1 if not known - */ - getSize() { - if (!this.lazy) return -1; - const options = /** @type {any} */ (this.lazy).options; - if (!options) return -1; - const size = options.size; - if (typeof size !== "number") return -1; - return size; - } - - delete(identifier) { - this.items.delete(identifier); - this.used.delete(identifier); - this.outdated = true; - } - - /** - * @template T - * @param {function(any): function(): Promise | PackContentItems} write write function - * @returns {void} - */ - writeLazy(write) { - if (!this.outdated && this.lazy) { - // State B1 or C1 - // this.lazy is still the valid deserialized version - write(this.lazy); - return; - } - if (!this.outdated && this.content) { - // State A1 - const map = new Map(this.content); - // Move to state C1 - this.lazy = SerializerMiddleware.unMemoizeLazy( - write(() => new PackContentItems(map)) - ); - return; - } - if (this.content) { - // State A2 or C2 - /** @type {Map} */ - const map = new Map(); - for (const item of this.items) { - map.set(item, this.content.get(item)); - } - // Move to state C1 - this.outdated = false; - this.content = map; - this.lazy = SerializerMiddleware.unMemoizeLazy( - write(() => new PackContentItems(map)) - ); - return; - } - // State B2 - const { lazyName } = this; - let timeMessage; - if (lazyName) { - // only log once - this.lazyName = undefined; - timeMessage = `unpack cache content ${lazyName} (${formatSize( - this.getSize() - )})`; - this.logger.log( - `starting to unpack cache content ${lazyName} (${formatSize( - this.getSize() - )}) because it's outdated and need to be serialized` - ); - this.logger.time(timeMessage); - } - const value = this.lazy(); - this.outdated = false; - if ("then" in value) { - // Move to state B1 - this.lazy = write(() => - value.then(data => { - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - const oldMap = data.map; - /** @type {Map} */ - const map = new Map(); - for (const item of this.items) { - map.set(item, oldMap.get(item)); - } - // Move to state C1 (or maybe C2) - this.content = map; - this.lazy = SerializerMiddleware.unMemoizeLazy(this.lazy); - - return new PackContentItems(map); - }) - ); - } else { - // Move to state C1 - if (timeMessage) { - this.logger.timeEnd(timeMessage); - } - const oldMap = value.map; - /** @type {Map} */ - const map = new Map(); - for (const item of this.items) { - map.set(item, oldMap.get(item)); - } - this.content = map; - this.lazy = write(() => new PackContentItems(map)); - } - } -} - -const allowCollectingMemory = buf => { - const wasted = buf.buffer.byteLength - buf.byteLength; - if (wasted > 8192 && (wasted > 1048576 || wasted > buf.byteLength)) { - return Buffer.from(buf); - } - return buf; -}; - -class PackFileCacheStrategy { - /** - * @param {Object} options options - * @param {Compiler} options.compiler the compiler - * @param {IntermediateFileSystem} options.fs the filesystem - * @param {string} options.context the context directory - * @param {string} options.cacheLocation the location of the cache data - * @param {string} options.version version identifier - * @param {Logger} options.logger a logger - * @param {SnapshotOptions} options.snapshot options regarding snapshotting - * @param {number} options.maxAge max age of cache items - * @param {boolean} options.profile track and log detailed timing information for individual cache items - * @param {boolean} options.allowCollectingMemory allow to collect unused memory created during deserialization - * @param {false | "gzip" | "brotli"} options.compression compression used - */ - constructor({ - compiler, - fs, - context, - cacheLocation, - version, - logger, - snapshot, - maxAge, - profile, - allowCollectingMemory, - compression - }) { - this.fileSerializer = createFileSerializer( - fs, - compiler.options.output.hashFunction - ); - this.fileSystemInfo = new FileSystemInfo(fs, { - managedPaths: snapshot.managedPaths, - immutablePaths: snapshot.immutablePaths, - logger: logger.getChildLogger("webpack.FileSystemInfo"), - hashFunction: compiler.options.output.hashFunction - }); - this.compiler = compiler; - this.context = context; - this.cacheLocation = cacheLocation; - this.version = version; - this.logger = logger; - this.maxAge = maxAge; - this.profile = profile; - this.allowCollectingMemory = allowCollectingMemory; - this.compression = compression; - this._extension = - compression === "brotli" - ? ".pack.br" - : compression === "gzip" - ? ".pack.gz" - : ".pack"; - this.snapshot = snapshot; - /** @type {Set} */ - this.buildDependencies = new Set(); - /** @type {LazySet} */ - this.newBuildDependencies = new LazySet(); - /** @type {Snapshot} */ - this.resolveBuildDependenciesSnapshot = undefined; - /** @type {Map} */ - this.resolveResults = undefined; - /** @type {Snapshot} */ - this.buildSnapshot = undefined; - /** @type {Promise} */ - this.packPromise = this._openPack(); - this.storePromise = Promise.resolve(); - } - - _getPack() { - if (this.packPromise === undefined) { - this.packPromise = this.storePromise.then(() => this._openPack()); - } - return this.packPromise; - } - - /** - * @returns {Promise} the pack - */ - _openPack() { - const { logger, profile, cacheLocation, version } = this; - /** @type {Snapshot} */ - let buildSnapshot; - /** @type {Set} */ - let buildDependencies; - /** @type {Set} */ - let newBuildDependencies; - /** @type {Snapshot} */ - let resolveBuildDependenciesSnapshot; - /** @type {Map} */ - let resolveResults; - logger.time("restore cache container"); - return this.fileSerializer - .deserialize(null, { - filename: `${cacheLocation}/index${this._extension}`, - extension: `${this._extension}`, - logger, - profile, - retainedBuffer: this.allowCollectingMemory - ? allowCollectingMemory - : undefined - }) - .catch(err => { - if (err.code !== "ENOENT") { - logger.warn( - `Restoring pack failed from ${cacheLocation}${this._extension}: ${err}` - ); - logger.debug(err.stack); - } else { - logger.debug( - `No pack exists at ${cacheLocation}${this._extension}: ${err}` - ); - } - return undefined; - }) - .then(packContainer => { - logger.timeEnd("restore cache container"); - if (!packContainer) return undefined; - if (!(packContainer instanceof PackContainer)) { - logger.warn( - `Restored pack from ${cacheLocation}${this._extension}, but contained content is unexpected.`, - packContainer - ); - return undefined; - } - if (packContainer.version !== version) { - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but version doesn't match.` - ); - return undefined; - } - logger.time("check build dependencies"); - return Promise.all([ - new Promise((resolve, reject) => { - this.fileSystemInfo.checkSnapshotValid( - packContainer.buildSnapshot, - (err, valid) => { - if (err) { - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but checking snapshot of build dependencies errored: ${err}.` - ); - logger.debug(err.stack); - return resolve(false); - } - if (!valid) { - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but build dependencies have changed.` - ); - return resolve(false); - } - buildSnapshot = packContainer.buildSnapshot; - return resolve(true); - } - ); - }), - new Promise((resolve, reject) => { - this.fileSystemInfo.checkSnapshotValid( - packContainer.resolveBuildDependenciesSnapshot, - (err, valid) => { - if (err) { - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but checking snapshot of resolving of build dependencies errored: ${err}.` - ); - logger.debug(err.stack); - return resolve(false); - } - if (valid) { - resolveBuildDependenciesSnapshot = - packContainer.resolveBuildDependenciesSnapshot; - buildDependencies = packContainer.buildDependencies; - resolveResults = packContainer.resolveResults; - return resolve(true); - } - logger.log( - "resolving of build dependencies is invalid, will re-resolve build dependencies" - ); - this.fileSystemInfo.checkResolveResultsValid( - packContainer.resolveResults, - (err, valid) => { - if (err) { - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but resolving of build dependencies errored: ${err}.` - ); - logger.debug(err.stack); - return resolve(false); - } - if (valid) { - newBuildDependencies = packContainer.buildDependencies; - resolveResults = packContainer.resolveResults; - return resolve(true); - } - logger.log( - `Restored pack from ${cacheLocation}${this._extension}, but build dependencies resolve to different locations.` - ); - return resolve(false); - } - ); - } - ); - }) - ]) - .catch(err => { - logger.timeEnd("check build dependencies"); - throw err; - }) - .then(([buildSnapshotValid, resolveValid]) => { - logger.timeEnd("check build dependencies"); - if (buildSnapshotValid && resolveValid) { - logger.time("restore cache content metadata"); - const d = packContainer.data(); - logger.timeEnd("restore cache content metadata"); - return d; - } - return undefined; - }); - }) - .then(pack => { - if (pack) { - pack.maxAge = this.maxAge; - this.buildSnapshot = buildSnapshot; - if (buildDependencies) this.buildDependencies = buildDependencies; - if (newBuildDependencies) - this.newBuildDependencies.addAll(newBuildDependencies); - this.resolveResults = resolveResults; - this.resolveBuildDependenciesSnapshot = - resolveBuildDependenciesSnapshot; - return pack; - } - return new Pack(logger, this.maxAge); - }) - .catch(err => { - this.logger.warn( - `Restoring pack from ${cacheLocation}${this._extension} failed: ${err}` - ); - this.logger.debug(err.stack); - return new Pack(logger, this.maxAge); - }); - } - - /** - * @param {string} identifier unique name for the resource - * @param {Etag | null} etag etag of the resource - * @param {any} data cached content - * @returns {Promise} promise - */ - store(identifier, etag, data) { - return this._getPack().then(pack => { - pack.set(identifier, etag === null ? null : etag.toString(), data); - }); - } - - /** - * @param {string} identifier unique name for the resource - * @param {Etag | null} etag etag of the resource - * @returns {Promise} promise to the cached content - */ - restore(identifier, etag) { - return this._getPack() - .then(pack => - pack.get(identifier, etag === null ? null : etag.toString()) - ) - .catch(err => { - if (err && err.code !== "ENOENT") { - this.logger.warn( - `Restoring failed for ${identifier} from pack: ${err}` - ); - this.logger.debug(err.stack); - } - }); - } - - storeBuildDependencies(dependencies) { - this.newBuildDependencies.addAll(dependencies); - } - - afterAllStored() { - const packPromise = this.packPromise; - if (packPromise === undefined) return Promise.resolve(); - const reportProgress = ProgressPlugin.getReporter(this.compiler); - return (this.storePromise = packPromise - .then(pack => { - pack.stopCapturingRequests(); - if (!pack.invalid) return; - this.packPromise = undefined; - this.logger.log(`Storing pack...`); - let promise; - const newBuildDependencies = new Set(); - for (const dep of this.newBuildDependencies) { - if (!this.buildDependencies.has(dep)) { - newBuildDependencies.add(dep); - } - } - if (newBuildDependencies.size > 0 || !this.buildSnapshot) { - if (reportProgress) reportProgress(0.5, "resolve build dependencies"); - this.logger.debug( - `Capturing build dependencies... (${Array.from( - newBuildDependencies - ).join(", ")})` - ); - promise = new Promise((resolve, reject) => { - this.logger.time("resolve build dependencies"); - this.fileSystemInfo.resolveBuildDependencies( - this.context, - newBuildDependencies, - (err, result) => { - this.logger.timeEnd("resolve build dependencies"); - if (err) return reject(err); - - this.logger.time("snapshot build dependencies"); - const { - files, - directories, - missing, - resolveResults, - resolveDependencies - } = result; - if (this.resolveResults) { - for (const [key, value] of resolveResults) { - this.resolveResults.set(key, value); - } - } else { - this.resolveResults = resolveResults; - } - if (reportProgress) { - reportProgress( - 0.6, - "snapshot build dependencies", - "resolving" - ); - } - this.fileSystemInfo.createSnapshot( - undefined, - resolveDependencies.files, - resolveDependencies.directories, - resolveDependencies.missing, - this.snapshot.resolveBuildDependencies, - (err, snapshot) => { - if (err) { - this.logger.timeEnd("snapshot build dependencies"); - return reject(err); - } - if (!snapshot) { - this.logger.timeEnd("snapshot build dependencies"); - return reject( - new Error("Unable to snapshot resolve dependencies") - ); - } - if (this.resolveBuildDependenciesSnapshot) { - this.resolveBuildDependenciesSnapshot = - this.fileSystemInfo.mergeSnapshots( - this.resolveBuildDependenciesSnapshot, - snapshot - ); - } else { - this.resolveBuildDependenciesSnapshot = snapshot; - } - if (reportProgress) { - reportProgress( - 0.7, - "snapshot build dependencies", - "modules" - ); - } - this.fileSystemInfo.createSnapshot( - undefined, - files, - directories, - missing, - this.snapshot.buildDependencies, - (err, snapshot) => { - this.logger.timeEnd("snapshot build dependencies"); - if (err) return reject(err); - if (!snapshot) { - return reject( - new Error("Unable to snapshot build dependencies") - ); - } - this.logger.debug("Captured build dependencies"); - - if (this.buildSnapshot) { - this.buildSnapshot = - this.fileSystemInfo.mergeSnapshots( - this.buildSnapshot, - snapshot - ); - } else { - this.buildSnapshot = snapshot; - } - - resolve(); - } - ); - } - ); - } - ); - }); - } else { - promise = Promise.resolve(); - } - return promise.then(() => { - if (reportProgress) reportProgress(0.8, "serialize pack"); - this.logger.time(`store pack`); - const updatedBuildDependencies = new Set(this.buildDependencies); - for (const dep of newBuildDependencies) { - updatedBuildDependencies.add(dep); - } - const content = new PackContainer( - pack, - this.version, - this.buildSnapshot, - updatedBuildDependencies, - this.resolveResults, - this.resolveBuildDependenciesSnapshot - ); - return this.fileSerializer - .serialize(content, { - filename: `${this.cacheLocation}/index${this._extension}`, - extension: `${this._extension}`, - logger: this.logger, - profile: this.profile - }) - .then(() => { - for (const dep of newBuildDependencies) { - this.buildDependencies.add(dep); - } - this.newBuildDependencies.clear(); - this.logger.timeEnd(`store pack`); - const stats = pack.getContentStats(); - this.logger.log( - "Stored pack (%d items, %d files, %d MiB)", - pack.itemInfo.size, - stats.count, - Math.round(stats.size / 1024 / 1024) - ); - }) - .catch(err => { - this.logger.timeEnd(`store pack`); - this.logger.warn(`Caching failed for pack: ${err}`); - this.logger.debug(err.stack); - }); - }); - }) - .catch(err => { - this.logger.warn(`Caching failed for pack: ${err}`); - this.logger.debug(err.stack); - })); - } - - clear() { - this.fileSystemInfo.clear(); - this.buildDependencies.clear(); - this.newBuildDependencies.clear(); - this.resolveBuildDependenciesSnapshot = undefined; - this.resolveResults = undefined; - this.buildSnapshot = undefined; - this.packPromise = undefined; - } -} - -module.exports = PackFileCacheStrategy; - - -/***/ }), - -/***/ 94834: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const LazySet = __webpack_require__(96522); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("enhanced-resolve/lib/Resolver")} Resolver */ -/** @typedef {import("../CacheFacade").ItemCacheFacade} ItemCacheFacade */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../FileSystemInfo")} FileSystemInfo */ -/** @typedef {import("../FileSystemInfo").Snapshot} Snapshot */ - -class CacheEntry { - constructor(result, snapshot) { - this.result = result; - this.snapshot = snapshot; - } - - serialize({ write }) { - write(this.result); - write(this.snapshot); - } - - deserialize({ read }) { - this.result = read(); - this.snapshot = read(); - } -} - -makeSerializable(CacheEntry, "webpack/lib/cache/ResolverCachePlugin"); - -/** - * @template T - * @param {Set | LazySet} set set to add items to - * @param {Set | LazySet} otherSet set to add items from - * @returns {void} - */ -const addAllToSet = (set, otherSet) => { - if (set instanceof LazySet) { - set.addAll(otherSet); - } else { - for (const item of otherSet) { - set.add(item); - } - } -}; - -/** - * @param {Object} object an object - * @param {boolean} excludeContext if true, context is not included in string - * @returns {string} stringified version - */ -const objectToString = (object, excludeContext) => { - let str = ""; - for (const key in object) { - if (excludeContext && key === "context") continue; - const value = object[key]; - if (typeof value === "object" && value !== null) { - str += `|${key}=[${objectToString(value, false)}|]`; - } else { - str += `|${key}=|${value}`; - } - } - return str; -}; - -class ResolverCachePlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const cache = compiler.getCache("ResolverCachePlugin"); - /** @type {FileSystemInfo} */ - let fileSystemInfo; - let snapshotOptions; - let realResolves = 0; - let cachedResolves = 0; - let cacheInvalidResolves = 0; - let concurrentResolves = 0; - compiler.hooks.thisCompilation.tap("ResolverCachePlugin", compilation => { - snapshotOptions = compilation.options.snapshot.resolve; - fileSystemInfo = compilation.fileSystemInfo; - compilation.hooks.finishModules.tap("ResolverCachePlugin", () => { - if (realResolves + cachedResolves > 0) { - const logger = compilation.getLogger("webpack.ResolverCachePlugin"); - logger.log( - `${Math.round( - (100 * realResolves) / (realResolves + cachedResolves) - )}% really resolved (${realResolves} real resolves with ${cacheInvalidResolves} cached but invalid, ${cachedResolves} cached valid, ${concurrentResolves} concurrent)` - ); - realResolves = 0; - cachedResolves = 0; - cacheInvalidResolves = 0; - concurrentResolves = 0; - } - }); - }); - /** - * @param {ItemCacheFacade} itemCache cache - * @param {Resolver} resolver the resolver - * @param {Object} resolveContext context for resolving meta info - * @param {Object} request the request info object - * @param {function((Error | null)=, Object=): void} callback callback function - * @returns {void} - */ - const doRealResolve = ( - itemCache, - resolver, - resolveContext, - request, - callback - ) => { - realResolves++; - const newRequest = { - _ResolverCachePluginCacheMiss: true, - ...request - }; - const newResolveContext = { - ...resolveContext, - stack: new Set(), - missingDependencies: new LazySet(), - fileDependencies: new LazySet(), - contextDependencies: new LazySet() - }; - let yieldResult; - let withYield = false; - if (typeof newResolveContext.yield === "function") { - yieldResult = []; - withYield = true; - newResolveContext.yield = obj => yieldResult.push(obj); - } - const propagate = key => { - if (resolveContext[key]) { - addAllToSet(resolveContext[key], newResolveContext[key]); - } - }; - const resolveTime = Date.now(); - resolver.doResolve( - resolver.hooks.resolve, - newRequest, - "Cache miss", - newResolveContext, - (err, result) => { - propagate("fileDependencies"); - propagate("contextDependencies"); - propagate("missingDependencies"); - if (err) return callback(err); - const fileDependencies = newResolveContext.fileDependencies; - const contextDependencies = newResolveContext.contextDependencies; - const missingDependencies = newResolveContext.missingDependencies; - fileSystemInfo.createSnapshot( - resolveTime, - fileDependencies, - contextDependencies, - missingDependencies, - snapshotOptions, - (err, snapshot) => { - if (err) return callback(err); - const resolveResult = withYield ? yieldResult : result; - // since we intercept resolve hook - // we still can get result in callback - if (withYield && result) yieldResult.push(result); - if (!snapshot) { - if (resolveResult) return callback(null, resolveResult); - return callback(); - } - itemCache.store( - new CacheEntry(resolveResult, snapshot), - storeErr => { - if (storeErr) return callback(storeErr); - if (resolveResult) return callback(null, resolveResult); - callback(); - } - ); - } - ); - } - ); - }; - compiler.resolverFactory.hooks.resolver.intercept({ - factory(type, hook) { - /** @type {Map} */ - const activeRequests = new Map(); - /** @type {Map} */ - const activeRequestsWithYield = new Map(); - hook.tap( - "ResolverCachePlugin", - /** - * @param {Resolver} resolver the resolver - * @param {Object} options resolve options - * @param {Object} userOptions resolve options passed by the user - * @returns {void} - */ - (resolver, options, userOptions) => { - if (options.cache !== true) return; - const optionsIdent = objectToString(userOptions, false); - const cacheWithContext = - options.cacheWithContext !== undefined - ? options.cacheWithContext - : false; - resolver.hooks.resolve.tapAsync( - { - name: "ResolverCachePlugin", - stage: -100 - }, - (request, resolveContext, callback) => { - if (request._ResolverCachePluginCacheMiss || !fileSystemInfo) { - return callback(); - } - const withYield = typeof resolveContext.yield === "function"; - const identifier = `${type}${ - withYield ? "|yield" : "|default" - }${optionsIdent}${objectToString(request, !cacheWithContext)}`; - - if (withYield) { - const activeRequest = activeRequestsWithYield.get(identifier); - if (activeRequest) { - activeRequest[0].push(callback); - activeRequest[1].push(resolveContext.yield); - return; - } - } else { - const activeRequest = activeRequests.get(identifier); - if (activeRequest) { - activeRequest.push(callback); - return; - } - } - const itemCache = cache.getItemCache(identifier, null); - let callbacks, yields; - const done = withYield - ? (err, result) => { - if (callbacks === undefined) { - if (err) { - callback(err); - } else { - if (result) - for (const r of result) resolveContext.yield(r); - callback(null, null); - } - yields = undefined; - callbacks = false; - } else { - if (err) { - for (const cb of callbacks) cb(err); - } else { - for (let i = 0; i < callbacks.length; i++) { - const cb = callbacks[i]; - const yield_ = yields[i]; - if (result) for (const r of result) yield_(r); - cb(null, null); - } - } - activeRequestsWithYield.delete(identifier); - yields = undefined; - callbacks = false; - } - } - : (err, result) => { - if (callbacks === undefined) { - callback(err, result); - callbacks = false; - } else { - for (const callback of callbacks) { - callback(err, result); - } - activeRequests.delete(identifier); - callbacks = false; - } - }; - /** - * @param {Error=} err error if any - * @param {CacheEntry=} cacheEntry cache entry - * @returns {void} - */ - const processCacheResult = (err, cacheEntry) => { - if (err) return done(err); - - if (cacheEntry) { - const { snapshot, result } = cacheEntry; - fileSystemInfo.checkSnapshotValid( - snapshot, - (err, valid) => { - if (err || !valid) { - cacheInvalidResolves++; - return doRealResolve( - itemCache, - resolver, - resolveContext, - request, - done - ); - } - cachedResolves++; - if (resolveContext.missingDependencies) { - addAllToSet( - resolveContext.missingDependencies, - snapshot.getMissingIterable() - ); - } - if (resolveContext.fileDependencies) { - addAllToSet( - resolveContext.fileDependencies, - snapshot.getFileIterable() - ); - } - if (resolveContext.contextDependencies) { - addAllToSet( - resolveContext.contextDependencies, - snapshot.getContextIterable() - ); - } - done(null, result); - } - ); - } else { - doRealResolve( - itemCache, - resolver, - resolveContext, - request, - done - ); - } - }; - itemCache.get(processCacheResult); - if (withYield && callbacks === undefined) { - callbacks = [callback]; - yields = [resolveContext.yield]; - activeRequestsWithYield.set( - identifier, - /** @type {[any, any]} */ ([callbacks, yields]) - ); - } else if (callbacks === undefined) { - callbacks = [callback]; - activeRequests.set(identifier, callbacks); - } - } - ); - } - ); - return hook; - } - }); - } -} - -module.exports = ResolverCachePlugin; - - -/***/ }), - -/***/ 84059: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const createHash = __webpack_require__(85205); - -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {typeof import("../util/Hash")} HashConstructor */ - -/** - * @typedef {Object} HashableObject - * @property {function(Hash): void} updateHash - */ - -class LazyHashedEtag { - /** - * @param {HashableObject} obj object with updateHash method - * @param {string | HashConstructor} hashFunction the hash function to use - */ - constructor(obj, hashFunction = "md4") { - this._obj = obj; - this._hash = undefined; - this._hashFunction = hashFunction; - } - - /** - * @returns {string} hash of object - */ - toString() { - if (this._hash === undefined) { - const hash = createHash(this._hashFunction); - this._obj.updateHash(hash); - this._hash = /** @type {string} */ (hash.digest("base64")); - } - return this._hash; - } -} - -/** @type {Map>} */ -const mapStrings = new Map(); - -/** @type {WeakMap>} */ -const mapObjects = new WeakMap(); - -/** - * @param {HashableObject} obj object with updateHash method - * @param {string | HashConstructor} hashFunction the hash function to use - * @returns {LazyHashedEtag} etag - */ -const getter = (obj, hashFunction = "md4") => { - let innerMap; - if (typeof hashFunction === "string") { - innerMap = mapStrings.get(hashFunction); - if (innerMap === undefined) { - const newHash = new LazyHashedEtag(obj, hashFunction); - innerMap = new WeakMap(); - innerMap.set(obj, newHash); - mapStrings.set(hashFunction, innerMap); - return newHash; - } - } else { - innerMap = mapObjects.get(hashFunction); - if (innerMap === undefined) { - const newHash = new LazyHashedEtag(obj, hashFunction); - innerMap = new WeakMap(); - innerMap.set(obj, newHash); - mapObjects.set(hashFunction, innerMap); - return newHash; - } - } - const hash = innerMap.get(obj); - if (hash !== undefined) return hash; - const newHash = new LazyHashedEtag(obj, hashFunction); - innerMap.set(obj, newHash); - return newHash; -}; - -module.exports = getter; - - -/***/ }), - -/***/ 81053: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Cache").Etag} Etag */ - -class MergedEtag { - /** - * @param {Etag} a first - * @param {Etag} b second - */ - constructor(a, b) { - this.a = a; - this.b = b; - } - - toString() { - return `${this.a.toString()}|${this.b.toString()}`; - } -} - -const dualObjectMap = new WeakMap(); -const objectStringMap = new WeakMap(); - -/** - * @param {Etag} a first - * @param {Etag} b second - * @returns {Etag} result - */ -const mergeEtags = (a, b) => { - if (typeof a === "string") { - if (typeof b === "string") { - return `${a}|${b}`; - } else { - const temp = b; - b = a; - a = temp; - } - } else { - if (typeof b !== "string") { - // both a and b are objects - let map = dualObjectMap.get(a); - if (map === undefined) { - dualObjectMap.set(a, (map = new WeakMap())); - } - const mergedEtag = map.get(b); - if (mergedEtag === undefined) { - const newMergedEtag = new MergedEtag(a, b); - map.set(b, newMergedEtag); - return newMergedEtag; - } else { - return mergedEtag; - } - } - } - // a is object, b is string - let map = objectStringMap.get(a); - if (map === undefined) { - objectStringMap.set(a, (map = new Map())); - } - const mergedEtag = map.get(b); - if (mergedEtag === undefined) { - const newMergedEtag = new MergedEtag(a, b); - map.set(b, newMergedEtag); - return newMergedEtag; - } else { - return mergedEtag; - } -}; - -module.exports = mergeEtags; - - -/***/ }), - -/***/ 12218: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const path = __webpack_require__(71017); -const webpackSchema = __webpack_require__(13954); - -// TODO add originPath to PathItem for better errors -/** - * @typedef {Object} PathItem - * @property {any} schema the part of the schema - * @property {string} path the path in the config - */ - -/** @typedef {"unknown-argument" | "unexpected-non-array-in-path" | "unexpected-non-object-in-path" | "multiple-values-unexpected" | "invalid-value"} ProblemType */ - -/** - * @typedef {Object} Problem - * @property {ProblemType} type - * @property {string} path - * @property {string} argument - * @property {any=} value - * @property {number=} index - * @property {string=} expected - */ - -/** - * @typedef {Object} LocalProblem - * @property {ProblemType} type - * @property {string} path - * @property {string=} expected - */ - -/** - * @typedef {Object} ArgumentConfig - * @property {string} description - * @property {string} [negatedDescription] - * @property {string} path - * @property {boolean} multiple - * @property {"enum"|"string"|"path"|"number"|"boolean"|"RegExp"|"reset"} type - * @property {any[]=} values - */ - -/** - * @typedef {Object} Argument - * @property {string} description - * @property {"string"|"number"|"boolean"} simpleType - * @property {boolean} multiple - * @property {ArgumentConfig[]} configs - */ - -/** - * @param {any=} schema a json schema to create arguments for (by default webpack schema is used) - * @returns {Record} object of arguments - */ -const getArguments = (schema = webpackSchema) => { - /** @type {Record} */ - const flags = {}; - - const pathToArgumentName = input => { - return input - .replace(/\./g, "-") - .replace(/\[\]/g, "") - .replace( - /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/gu, - "$1-$2" - ) - .replace(/-?[^\p{Uppercase_Letter}\p{Lowercase_Letter}\d]+/gu, "-") - .toLowerCase(); - }; - - const getSchemaPart = path => { - const newPath = path.split("/"); - - let schemaPart = schema; - - for (let i = 1; i < newPath.length; i++) { - const inner = schemaPart[newPath[i]]; - - if (!inner) { - break; - } - - schemaPart = inner; - } - - return schemaPart; - }; - - /** - * - * @param {PathItem[]} path path in the schema - * @returns {string | undefined} description - */ - const getDescription = path => { - for (const { schema } of path) { - if (schema.cli) { - if (schema.cli.helper) continue; - if (schema.cli.description) return schema.cli.description; - } - if (schema.description) return schema.description; - } - }; - - /** - * - * @param {PathItem[]} path path in the schema - * @returns {string | undefined} negative description - */ - const getNegatedDescription = path => { - for (const { schema } of path) { - if (schema.cli) { - if (schema.cli.helper) continue; - if (schema.cli.negatedDescription) return schema.cli.negatedDescription; - } - } - }; - - /** - * - * @param {PathItem[]} path path in the schema - * @returns {string | undefined} reset description - */ - const getResetDescription = path => { - for (const { schema } of path) { - if (schema.cli) { - if (schema.cli.helper) continue; - if (schema.cli.resetDescription) return schema.cli.resetDescription; - } - } - }; - - /** - * - * @param {any} schemaPart schema - * @returns {Pick} partial argument config - */ - const schemaToArgumentConfig = schemaPart => { - if (schemaPart.enum) { - return { - type: "enum", - values: schemaPart.enum - }; - } - switch (schemaPart.type) { - case "number": - return { - type: "number" - }; - case "string": - return { - type: schemaPart.absolutePath ? "path" : "string" - }; - case "boolean": - return { - type: "boolean" - }; - } - if (schemaPart.instanceof === "RegExp") { - return { - type: "RegExp" - }; - } - return undefined; - }; - - /** - * @param {PathItem[]} path path in the schema - * @returns {void} - */ - const addResetFlag = path => { - const schemaPath = path[0].path; - const name = pathToArgumentName(`${schemaPath}.reset`); - const description = - getResetDescription(path) || - `Clear all items provided in '${schemaPath}' configuration. ${getDescription( - path - )}`; - flags[name] = { - configs: [ - { - type: "reset", - multiple: false, - description, - path: schemaPath - } - ], - description: undefined, - simpleType: undefined, - multiple: undefined - }; - }; - - /** - * @param {PathItem[]} path full path in schema - * @param {boolean} multiple inside of an array - * @returns {number} number of arguments added - */ - const addFlag = (path, multiple) => { - const argConfigBase = schemaToArgumentConfig(path[0].schema); - if (!argConfigBase) return 0; - - const negatedDescription = getNegatedDescription(path); - const name = pathToArgumentName(path[0].path); - /** @type {ArgumentConfig} */ - const argConfig = { - ...argConfigBase, - multiple, - description: getDescription(path), - path: path[0].path - }; - - if (negatedDescription) { - argConfig.negatedDescription = negatedDescription; - } - - if (!flags[name]) { - flags[name] = { - configs: [], - description: undefined, - simpleType: undefined, - multiple: undefined - }; - } - - if ( - flags[name].configs.some( - item => JSON.stringify(item) === JSON.stringify(argConfig) - ) - ) { - return 0; - } - - if ( - flags[name].configs.some( - item => item.type === argConfig.type && item.multiple !== multiple - ) - ) { - if (multiple) { - throw new Error( - `Conflicting schema for ${path[0].path} with ${argConfig.type} type (array type must be before single item type)` - ); - } - return 0; - } - - flags[name].configs.push(argConfig); - - return 1; - }; - - // TODO support `not` and `if/then/else` - // TODO support `const`, but we don't use it on our schema - /** - * - * @param {object} schemaPart the current schema - * @param {string} schemaPath the current path in the schema - * @param {{schema: object, path: string}[]} path all previous visited schemaParts - * @param {string | null} inArray if inside of an array, the path to the array - * @returns {number} added arguments - */ - const traverse = (schemaPart, schemaPath = "", path = [], inArray = null) => { - while (schemaPart.$ref) { - schemaPart = getSchemaPart(schemaPart.$ref); - } - - const repetitions = path.filter(({ schema }) => schema === schemaPart); - if ( - repetitions.length >= 2 || - repetitions.some(({ path }) => path === schemaPath) - ) { - return 0; - } - - if (schemaPart.cli && schemaPart.cli.exclude) return 0; - - const fullPath = [{ schema: schemaPart, path: schemaPath }, ...path]; - - let addedArguments = 0; - - addedArguments += addFlag(fullPath, !!inArray); - - if (schemaPart.type === "object") { - if (schemaPart.properties) { - for (const property of Object.keys(schemaPart.properties)) { - addedArguments += traverse( - schemaPart.properties[property], - schemaPath ? `${schemaPath}.${property}` : property, - fullPath, - inArray - ); - } - } - - return addedArguments; - } - - if (schemaPart.type === "array") { - if (inArray) { - return 0; - } - if (Array.isArray(schemaPart.items)) { - let i = 0; - for (const item of schemaPart.items) { - addedArguments += traverse( - item, - `${schemaPath}.${i}`, - fullPath, - schemaPath - ); - } - - return addedArguments; - } - - addedArguments += traverse( - schemaPart.items, - `${schemaPath}[]`, - fullPath, - schemaPath - ); - - if (addedArguments > 0) { - addResetFlag(fullPath); - addedArguments++; - } - - return addedArguments; - } - - const maybeOf = schemaPart.oneOf || schemaPart.anyOf || schemaPart.allOf; - - if (maybeOf) { - const items = maybeOf; - - for (let i = 0; i < items.length; i++) { - addedArguments += traverse(items[i], schemaPath, fullPath, inArray); - } - - return addedArguments; - } - - return addedArguments; - }; - - traverse(schema); - - // Summarize flags - for (const name of Object.keys(flags)) { - const argument = flags[name]; - argument.description = argument.configs.reduce((desc, { description }) => { - if (!desc) return description; - if (!description) return desc; - if (desc.includes(description)) return desc; - return `${desc} ${description}`; - }, /** @type {string | undefined} */ (undefined)); - argument.simpleType = argument.configs.reduce((t, argConfig) => { - /** @type {"string" | "number" | "boolean"} */ - let type = "string"; - switch (argConfig.type) { - case "number": - type = "number"; - break; - case "reset": - case "boolean": - type = "boolean"; - break; - case "enum": - if (argConfig.values.every(v => typeof v === "boolean")) - type = "boolean"; - if (argConfig.values.every(v => typeof v === "number")) - type = "number"; - break; - } - if (t === undefined) return type; - return t === type ? t : "string"; - }, /** @type {"string" | "number" | "boolean" | undefined} */ (undefined)); - argument.multiple = argument.configs.some(c => c.multiple); - } - - return flags; -}; - -const cliAddedItems = new WeakMap(); - -/** - * @param {any} config configuration - * @param {string} schemaPath path in the config - * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined - * @returns {{ problem?: LocalProblem, object?: any, property?: string | number, value?: any }} problem or object with property and value - */ -const getObjectAndProperty = (config, schemaPath, index = 0) => { - if (!schemaPath) return { value: config }; - const parts = schemaPath.split("."); - let property = parts.pop(); - let current = config; - let i = 0; - for (const part of parts) { - const isArray = part.endsWith("[]"); - const name = isArray ? part.slice(0, -2) : part; - let value = current[name]; - if (isArray) { - if (value === undefined) { - value = {}; - current[name] = [...Array.from({ length: index }), value]; - cliAddedItems.set(current[name], index + 1); - } else if (!Array.isArray(value)) { - return { - problem: { - type: "unexpected-non-array-in-path", - path: parts.slice(0, i).join(".") - } - }; - } else { - let addedItems = cliAddedItems.get(value) || 0; - while (addedItems <= index) { - value.push(undefined); - addedItems++; - } - cliAddedItems.set(value, addedItems); - const x = value.length - addedItems + index; - if (value[x] === undefined) { - value[x] = {}; - } else if (value[x] === null || typeof value[x] !== "object") { - return { - problem: { - type: "unexpected-non-object-in-path", - path: parts.slice(0, i).join(".") - } - }; - } - value = value[x]; - } - } else { - if (value === undefined) { - value = current[name] = {}; - } else if (value === null || typeof value !== "object") { - return { - problem: { - type: "unexpected-non-object-in-path", - path: parts.slice(0, i).join(".") - } - }; - } - } - current = value; - i++; - } - let value = current[property]; - if (property.endsWith("[]")) { - const name = property.slice(0, -2); - const value = current[name]; - if (value === undefined) { - current[name] = [...Array.from({ length: index }), undefined]; - cliAddedItems.set(current[name], index + 1); - return { object: current[name], property: index, value: undefined }; - } else if (!Array.isArray(value)) { - current[name] = [value, ...Array.from({ length: index }), undefined]; - cliAddedItems.set(current[name], index + 1); - return { object: current[name], property: index + 1, value: undefined }; - } else { - let addedItems = cliAddedItems.get(value) || 0; - while (addedItems <= index) { - value.push(undefined); - addedItems++; - } - cliAddedItems.set(value, addedItems); - const x = value.length - addedItems + index; - if (value[x] === undefined) { - value[x] = {}; - } else if (value[x] === null || typeof value[x] !== "object") { - return { - problem: { - type: "unexpected-non-object-in-path", - path: schemaPath - } - }; - } - return { - object: value, - property: x, - value: value[x] - }; - } - } - return { object: current, property, value }; -}; - -/** - * @param {any} config configuration - * @param {string} schemaPath path in the config - * @param {any} value parsed value - * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined - * @returns {LocalProblem | null} problem or null for success - */ -const setValue = (config, schemaPath, value, index) => { - const { problem, object, property } = getObjectAndProperty( - config, - schemaPath, - index - ); - if (problem) return problem; - object[property] = value; - return null; -}; - -/** - * @param {ArgumentConfig} argConfig processing instructions - * @param {any} config configuration - * @param {any} value the value - * @param {number | undefined} index the index if multiple values provided - * @returns {LocalProblem | null} a problem if any - */ -const processArgumentConfig = (argConfig, config, value, index) => { - if (index !== undefined && !argConfig.multiple) { - return { - type: "multiple-values-unexpected", - path: argConfig.path - }; - } - const parsed = parseValueForArgumentConfig(argConfig, value); - if (parsed === undefined) { - return { - type: "invalid-value", - path: argConfig.path, - expected: getExpectedValue(argConfig) - }; - } - const problem = setValue(config, argConfig.path, parsed, index); - if (problem) return problem; - return null; -}; - -/** - * @param {ArgumentConfig} argConfig processing instructions - * @returns {string | undefined} expected message - */ -const getExpectedValue = argConfig => { - switch (argConfig.type) { - default: - return argConfig.type; - case "boolean": - return "true | false"; - case "RegExp": - return "regular expression (example: /ab?c*/)"; - case "enum": - return argConfig.values.map(v => `${v}`).join(" | "); - case "reset": - return "true (will reset the previous value to an empty array)"; - } -}; - -/** - * @param {ArgumentConfig} argConfig processing instructions - * @param {any} value the value - * @returns {any | undefined} parsed value - */ -const parseValueForArgumentConfig = (argConfig, value) => { - switch (argConfig.type) { - case "string": - if (typeof value === "string") { - return value; - } - break; - case "path": - if (typeof value === "string") { - return path.resolve(value); - } - break; - case "number": - if (typeof value === "number") return value; - if (typeof value === "string" && /^[+-]?\d*(\.\d*)[eE]\d+$/) { - const n = +value; - if (!isNaN(n)) return n; - } - break; - case "boolean": - if (typeof value === "boolean") return value; - if (value === "true") return true; - if (value === "false") return false; - break; - case "RegExp": - if (value instanceof RegExp) return value; - if (typeof value === "string") { - // cspell:word yugi - const match = /^\/(.*)\/([yugi]*)$/.exec(value); - if (match && !/[^\\]\//.test(match[1])) - return new RegExp(match[1], match[2]); - } - break; - case "enum": - if (argConfig.values.includes(value)) return value; - for (const item of argConfig.values) { - if (`${item}` === value) return item; - } - break; - case "reset": - if (value === true) return []; - break; - } -}; - -/** - * @param {Record} args object of arguments - * @param {any} config configuration - * @param {Record} values object with values - * @returns {Problem[] | null} problems or null for success - */ -const processArguments = (args, config, values) => { - /** @type {Problem[]} */ - const problems = []; - for (const key of Object.keys(values)) { - const arg = args[key]; - if (!arg) { - problems.push({ - type: "unknown-argument", - path: "", - argument: key - }); - continue; - } - const processValue = (value, i) => { - const currentProblems = []; - for (const argConfig of arg.configs) { - const problem = processArgumentConfig(argConfig, config, value, i); - if (!problem) { - return; - } - currentProblems.push({ - ...problem, - argument: key, - value: value, - index: i - }); - } - problems.push(...currentProblems); - }; - let value = values[key]; - if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - processValue(value[i], i); - } - } else { - processValue(value, undefined); - } - } - if (problems.length === 0) return null; - return problems; -}; - -exports.getArguments = getArguments; -exports.processArguments = processArguments; - - -/***/ }), - -/***/ 13980: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const browserslist = __webpack_require__(14907); -const path = __webpack_require__(71017); - -/** @typedef {import("./target").ApiTargetProperties} ApiTargetProperties */ -/** @typedef {import("./target").EcmaTargetProperties} EcmaTargetProperties */ -/** @typedef {import("./target").PlatformTargetProperties} PlatformTargetProperties */ - -// [[C:]/path/to/config][:env] -const inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i; - -/** - * @typedef {Object} BrowserslistHandlerConfig - * @property {string=} configPath - * @property {string=} env - * @property {string=} query - */ - -/** - * @param {string} input input string - * @param {string} context the context directory - * @returns {BrowserslistHandlerConfig} config - */ -const parse = (input, context) => { - if (!input) { - return {}; - } - - if (path.isAbsolute(input)) { - const [, configPath, env] = inputRx.exec(input) || []; - return { configPath, env }; - } - - const config = browserslist.findConfig(context); - - if (config && Object.keys(config).includes(input)) { - return { env: input }; - } - - return { query: input }; -}; - -/** - * @param {string} input input string - * @param {string} context the context directory - * @returns {string[] | undefined} selected browsers - */ -const load = (input, context) => { - const { configPath, env, query } = parse(input, context); - - // if a query is specified, then use it, else - // if a path to a config is specified then load it, else - // find a nearest config - const config = query - ? query - : configPath - ? browserslist.loadConfig({ - config: configPath, - env - }) - : browserslist.loadConfig({ path: context, env }); - - if (!config) return null; - return browserslist(config); -}; - -/** - * @param {string[]} browsers supported browsers list - * @returns {EcmaTargetProperties & PlatformTargetProperties & ApiTargetProperties} target properties - */ -const resolve = browsers => { - /** - * Checks all against a version number - * @param {Record} versions first supported version - * @returns {boolean} true if supports - */ - const rawChecker = versions => { - return browsers.every(v => { - const [name, parsedVersion] = v.split(" "); - if (!name) return false; - const requiredVersion = versions[name]; - if (!requiredVersion) return false; - const [parsedMajor, parserMinor] = - // safari TP supports all features for normal safari - parsedVersion === "TP" - ? [Infinity, Infinity] - : parsedVersion.split("."); - if (typeof requiredVersion === "number") { - return +parsedMajor >= requiredVersion; - } - return requiredVersion[0] === +parsedMajor - ? +parserMinor >= requiredVersion[1] - : +parsedMajor > requiredVersion[0]; - }); - }; - const anyNode = browsers.some(b => /^node /.test(b)); - const anyBrowser = browsers.some(b => /^(?!node)/.test(b)); - const browserProperty = !anyBrowser ? false : anyNode ? null : true; - const nodeProperty = !anyNode ? false : anyBrowser ? null : true; - // Internet Explorer Mobile, Blackberry browser and Opera Mini are very old browsers, they do not support new features - const es6DynamicImport = rawChecker({ - chrome: 63, - and_chr: 63, - edge: 79, - firefox: 67, - and_ff: 67, - // ie: Not supported - opera: 50, - op_mob: 46, - safari: [11, 1], - ios_saf: [11, 3], - samsung: [8, 2], - android: 63, - and_qq: [10, 4], - // baidu: Not supported - // and_uc: Not supported - // kaios: Not supported - node: [12, 17] - }); - - return { - const: rawChecker({ - chrome: 49, - and_chr: 49, - edge: 12, - // Prior to Firefox 13, const is implemented, but re-assignment is not failing. - // Prior to Firefox 46, a TypeError was thrown on redeclaration instead of a SyntaxError. - firefox: 36, - and_ff: 36, - // Not supported in for-in and for-of loops - // ie: Not supported - opera: 36, - op_mob: 36, - safari: [10, 0], - ios_saf: [10, 0], - // Before 5.0 supported correctly in strict mode, otherwise supported without block scope - samsung: [5, 0], - android: 37, - and_qq: [10, 4], - // Supported correctly in strict mode, otherwise supported without block scope - // baidu: Not supported - and_uc: [12, 12], - kaios: [2, 5], - node: [6, 0] - }), - arrowFunction: rawChecker({ - chrome: 45, - and_chr: 45, - edge: 12, - // The initial implementation of arrow functions in Firefox made them automatically strict. This has been changed as of Firefox 24. The use of 'use strict'; is now required. - // Prior to Firefox 39, a line terminator (\\n) was incorrectly allowed after arrow function arguments. This has been fixed to conform to the ES2015 specification and code like () \\n => {} will now throw a SyntaxError in this and later versions. - firefox: 39, - and_ff: 39, - // ie: Not supported, - opera: 32, - op_mob: 32, - safari: 10, - ios_saf: 10, - samsung: [5, 0], - android: 45, - and_qq: [10, 4], - baidu: [7, 12], - and_uc: [12, 12], - kaios: [2, 5], - node: [6, 0] - }), - forOf: rawChecker({ - chrome: 38, - and_chr: 38, - edge: 12, - // Prior to Firefox 51, using the for...of loop construct with the const keyword threw a SyntaxError ("missing = in const declaration"). - firefox: 51, - and_ff: 51, - // ie: Not supported, - opera: 25, - op_mob: 25, - safari: 7, - ios_saf: 7, - samsung: [3, 0], - android: 38, - // and_qq: Unknown support - // baidu: Unknown support - // and_uc: Unknown support - // kaios: Unknown support - node: [0, 12] - }), - destructuring: rawChecker({ - chrome: 49, - and_chr: 49, - edge: 14, - firefox: 41, - and_ff: 41, - // ie: Not supported, - opera: 36, - op_mob: 36, - safari: 8, - ios_saf: 8, - samsung: [5, 0], - android: 49, - // and_qq: Unknown support - // baidu: Unknown support - // and_uc: Unknown support - // kaios: Unknown support - node: [6, 0] - }), - bigIntLiteral: rawChecker({ - chrome: 67, - and_chr: 67, - edge: 79, - firefox: 68, - and_ff: 68, - // ie: Not supported, - opera: 54, - op_mob: 48, - safari: 14, - ios_saf: 14, - samsung: [9, 2], - android: 67, - // and_qq: Not supported - // baidu: Not supported - // and_uc: Not supported - // kaios: Not supported - node: [10, 4] - }), - // Support syntax `import` and `export` and no limitations and bugs on Node.js - // Not include `export * as namespace` - module: rawChecker({ - chrome: 61, - and_chr: 61, - edge: 16, - firefox: 60, - and_ff: 60, - // ie: Not supported, - opera: 48, - op_mob: 45, - safari: [10, 1], - ios_saf: [10, 3], - samsung: [8, 0], - android: 61, - and_qq: [10, 4], - // baidu: Not supported - // and_uc: Not supported - // kaios: Not supported - node: [12, 17] - }), - dynamicImport: es6DynamicImport, - dynamicImportInWorker: es6DynamicImport && !anyNode, - // browserslist does not have info about globalThis - // so this is based on mdn-browser-compat-data - globalThis: rawChecker({ - chrome: 71, - and_chr: 71, - edge: 79, - firefox: 65, - and_ff: 65, - // ie: Not supported, - opera: 58, - op_mob: 50, - safari: [12, 1], - ios_saf: [12, 2], - samsung: [10, 1], - android: 71, - // and_qq: Unknown support - // baidu: Unknown support - // and_uc: Unknown support - // kaios: Unknown support - node: 12 - }), - optionalChaining: rawChecker({ - chrome: 80, - and_chr: 80, - edge: 80, - firefox: 74, - and_ff: 79, - // ie: Not supported, - opera: 67, - op_mob: 64, - safari: [13, 1], - ios_saf: [13, 4], - samsung: 13, - android: 80, - // and_qq: Not supported - // baidu: Not supported - // and_uc: Not supported - // kaios: Not supported - node: 14 - }), - templateLiteral: rawChecker({ - chrome: 41, - and_chr: 41, - edge: 13, - firefox: 34, - and_ff: 34, - // ie: Not supported, - opera: 29, - op_mob: 64, - safari: [9, 1], - ios_saf: 9, - samsung: 4, - android: 41, - and_qq: [10, 4], - baidu: [7, 12], - and_uc: [12, 12], - kaios: [2, 5], - node: 4 - }), - browser: browserProperty, - electron: false, - node: nodeProperty, - nwjs: false, - web: browserProperty, - webworker: false, - - document: browserProperty, - fetchWasm: browserProperty, - global: nodeProperty, - importScripts: false, - importScriptsInWorker: true, - nodeBuiltins: nodeProperty, - require: nodeProperty - }; -}; - -module.exports = { - resolve, - load -}; - - -/***/ }), - -/***/ 64395: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const fs = __webpack_require__(57147); -const path = __webpack_require__(71017); -const Template = __webpack_require__(43841); -const { cleverMerge } = __webpack_require__(22093); -const { - getTargetsProperties, - getTargetProperties, - getDefaultTarget -} = __webpack_require__(60065); - -/** @typedef {import("../../declarations/WebpackOptions").CacheOptionsNormalized} CacheOptions */ -/** @typedef {import("../../declarations/WebpackOptions").CssExperimentOptions} CssExperimentOptions */ -/** @typedef {import("../../declarations/WebpackOptions").EntryDescription} EntryDescription */ -/** @typedef {import("../../declarations/WebpackOptions").EntryNormalized} Entry */ -/** @typedef {import("../../declarations/WebpackOptions").Experiments} Experiments */ -/** @typedef {import("../../declarations/WebpackOptions").ExperimentsNormalized} ExperimentsNormalized */ -/** @typedef {import("../../declarations/WebpackOptions").ExternalsPresets} ExternalsPresets */ -/** @typedef {import("../../declarations/WebpackOptions").ExternalsType} ExternalsType */ -/** @typedef {import("../../declarations/WebpackOptions").InfrastructureLogging} InfrastructureLogging */ -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ -/** @typedef {import("../../declarations/WebpackOptions").Library} Library */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").Loader} Loader */ -/** @typedef {import("../../declarations/WebpackOptions").Mode} Mode */ -/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */ -/** @typedef {import("../../declarations/WebpackOptions").Node} WebpackNode */ -/** @typedef {import("../../declarations/WebpackOptions").Optimization} Optimization */ -/** @typedef {import("../../declarations/WebpackOptions").OutputNormalized} Output */ -/** @typedef {import("../../declarations/WebpackOptions").Performance} Performance */ -/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../../declarations/WebpackOptions").RuleSetRules} RuleSetRules */ -/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */ -/** @typedef {import("../../declarations/WebpackOptions").Target} Target */ -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("./target").TargetProperties} TargetProperties */ - -const NODE_MODULES_REGEXP = /[\\/]node_modules[\\/]/i; - -/** - * Sets a constant default value when undefined - * @template T - * @template {keyof T} P - * @param {T} obj an object - * @param {P} prop a property of this object - * @param {T[P]} value a default value of the property - * @returns {void} - */ -const D = (obj, prop, value) => { - if (obj[prop] === undefined) { - obj[prop] = value; - } -}; - -/** - * Sets a dynamic default value when undefined, by calling the factory function - * @template T - * @template {keyof T} P - * @param {T} obj an object - * @param {P} prop a property of this object - * @param {function(): T[P]} factory a default value factory for the property - * @returns {void} - */ -const F = (obj, prop, factory) => { - if (obj[prop] === undefined) { - obj[prop] = factory(); - } -}; - -/** - * Sets a dynamic default value when undefined, by calling the factory function. - * factory must return an array or undefined - * When the current value is already an array an contains "..." it's replaced with - * the result of the factory function - * @template T - * @template {keyof T} P - * @param {T} obj an object - * @param {P} prop a property of this object - * @param {function(): T[P]} factory a default value factory for the property - * @returns {void} - */ -const A = (obj, prop, factory) => { - const value = obj[prop]; - if (value === undefined) { - obj[prop] = factory(); - } else if (Array.isArray(value)) { - /** @type {any[]} */ - let newArray = undefined; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - if (item === "...") { - if (newArray === undefined) { - newArray = value.slice(0, i); - obj[prop] = /** @type {T[P]} */ (/** @type {unknown} */ (newArray)); - } - const items = /** @type {any[]} */ (/** @type {unknown} */ (factory())); - if (items !== undefined) { - for (const item of items) { - newArray.push(item); - } - } - } else if (newArray !== undefined) { - newArray.push(item); - } - } - } -}; - -/** - * @param {WebpackOptions} options options to be modified - * @returns {void} - */ -const applyWebpackOptionsBaseDefaults = options => { - F(options, "context", () => process.cwd()); - applyInfrastructureLoggingDefaults(options.infrastructureLogging); -}; - -/** - * @param {WebpackOptions} options options to be modified - * @returns {void} - */ -const applyWebpackOptionsDefaults = options => { - F(options, "context", () => process.cwd()); - F(options, "target", () => { - return getDefaultTarget(options.context); - }); - - const { mode, name, target } = options; - - let targetProperties = - target === false - ? /** @type {false} */ (false) - : typeof target === "string" - ? getTargetProperties(target, options.context) - : getTargetsProperties(target, options.context); - - const development = mode === "development"; - const production = mode === "production" || !mode; - - if (typeof options.entry !== "function") { - for (const key of Object.keys(options.entry)) { - F( - options.entry[key], - "import", - () => /** @type {[string]} */ (["./src"]) - ); - } - } - - F(options, "devtool", () => (development ? "eval" : false)); - D(options, "watch", false); - D(options, "profile", false); - D(options, "parallelism", 100); - D(options, "recordsInputPath", false); - D(options, "recordsOutputPath", false); - - applyExperimentsDefaults(options.experiments, { - production, - development, - targetProperties - }); - - const futureDefaults = options.experiments.futureDefaults; - - F(options, "cache", () => - development ? { type: /** @type {"memory"} */ ("memory") } : false - ); - applyCacheDefaults(options.cache, { - name: name || "default", - mode: mode || "production", - development, - cacheUnaffected: options.experiments.cacheUnaffected - }); - const cache = !!options.cache; - - applySnapshotDefaults(options.snapshot, { - production, - futureDefaults - }); - - applyModuleDefaults(options.module, { - cache, - syncWebAssembly: options.experiments.syncWebAssembly, - asyncWebAssembly: options.experiments.asyncWebAssembly, - css: options.experiments.css, - futureDefaults, - isNode: targetProperties && targetProperties.node === true - }); - - applyOutputDefaults(options.output, { - context: options.context, - targetProperties, - isAffectedByBrowserslist: - target === undefined || - (typeof target === "string" && target.startsWith("browserslist")) || - (Array.isArray(target) && - target.some(target => target.startsWith("browserslist"))), - outputModule: options.experiments.outputModule, - development, - entry: options.entry, - module: options.module, - futureDefaults - }); - - applyExternalsPresetsDefaults(options.externalsPresets, { - targetProperties, - buildHttp: !!options.experiments.buildHttp - }); - - applyLoaderDefaults(options.loader, { targetProperties }); - - F(options, "externalsType", () => { - const validExternalTypes = (__webpack_require__(13954).definitions.ExternalsType["enum"]); - return options.output.library && - validExternalTypes.includes(options.output.library.type) - ? /** @type {ExternalsType} */ (options.output.library.type) - : options.output.module - ? "module" - : "var"; - }); - - applyNodeDefaults(options.node, { - futureDefaults: options.experiments.futureDefaults, - targetProperties - }); - - F(options, "performance", () => - production && - targetProperties && - (targetProperties.browser || targetProperties.browser === null) - ? {} - : false - ); - applyPerformanceDefaults(options.performance, { - production - }); - - applyOptimizationDefaults(options.optimization, { - development, - production, - css: options.experiments.css, - records: !!(options.recordsInputPath || options.recordsOutputPath) - }); - - options.resolve = cleverMerge( - getResolveDefaults({ - cache, - context: options.context, - targetProperties, - mode: options.mode - }), - options.resolve - ); - - options.resolveLoader = cleverMerge( - getResolveLoaderDefaults({ cache }), - options.resolveLoader - ); -}; - -/** - * @param {ExperimentsNormalized} experiments options - * @param {Object} options options - * @param {boolean} options.production is production - * @param {boolean} options.development is development mode - * @param {TargetProperties | false} options.targetProperties target properties - * @returns {void} - */ -const applyExperimentsDefaults = ( - experiments, - { production, development, targetProperties } -) => { - D(experiments, "futureDefaults", false); - D(experiments, "backCompat", !experiments.futureDefaults); - D(experiments, "topLevelAwait", experiments.futureDefaults); - D(experiments, "syncWebAssembly", false); - D(experiments, "asyncWebAssembly", experiments.futureDefaults); - D(experiments, "outputModule", false); - D(experiments, "layers", false); - D(experiments, "lazyCompilation", undefined); - D(experiments, "buildHttp", undefined); - D(experiments, "cacheUnaffected", experiments.futureDefaults); - F(experiments, "css", () => (experiments.futureDefaults ? {} : undefined)); - - if (typeof experiments.buildHttp === "object") { - D(experiments.buildHttp, "frozen", production); - D(experiments.buildHttp, "upgrade", false); - } - - if (typeof experiments.css === "object") { - D( - experiments.css, - "exportsOnly", - !targetProperties || !targetProperties.document - ); - } -}; - -/** - * @param {CacheOptions} cache options - * @param {Object} options options - * @param {string} options.name name - * @param {string} options.mode mode - * @param {boolean} options.development is development mode - * @param {boolean} options.cacheUnaffected the cacheUnaffected experiment is enabled - * @returns {void} - */ -const applyCacheDefaults = ( - cache, - { name, mode, development, cacheUnaffected } -) => { - if (cache === false) return; - switch (cache.type) { - case "filesystem": - F(cache, "name", () => name + "-" + mode); - D(cache, "version", ""); - F(cache, "cacheDirectory", () => { - const cwd = process.cwd(); - let dir = cwd; - for (;;) { - try { - if (fs.statSync(path.join(dir, "package.json")).isFile()) break; - // eslint-disable-next-line no-empty - } catch (e) {} - const parent = path.dirname(dir); - if (dir === parent) { - dir = undefined; - break; - } - dir = parent; - } - if (!dir) { - return path.resolve(cwd, ".cache/webpack"); - } else if (process.versions.pnp === "1") { - return path.resolve(dir, ".pnp/.cache/webpack"); - } else if (process.versions.pnp === "3") { - return path.resolve(dir, ".yarn/.cache/webpack"); - } else { - return path.resolve(dir, "node_modules/.cache/webpack"); - } - }); - F(cache, "cacheLocation", () => - path.resolve(cache.cacheDirectory, cache.name) - ); - D(cache, "hashAlgorithm", "md4"); - D(cache, "store", "pack"); - D(cache, "compression", false); - D(cache, "profile", false); - D(cache, "idleTimeout", 60000); - D(cache, "idleTimeoutForInitialStore", 5000); - D(cache, "idleTimeoutAfterLargeChanges", 1000); - D(cache, "maxMemoryGenerations", development ? 5 : Infinity); - D(cache, "maxAge", 1000 * 60 * 60 * 24 * 60); // 1 month - D(cache, "allowCollectingMemory", development); - D(cache, "memoryCacheUnaffected", development && cacheUnaffected); - D(cache.buildDependencies, "defaultWebpack", [ - path.resolve(__dirname, "..") + path.sep - ]); - break; - case "memory": - D(cache, "maxGenerations", Infinity); - D(cache, "cacheUnaffected", development && cacheUnaffected); - break; - } -}; - -/** - * @param {SnapshotOptions} snapshot options - * @param {Object} options options - * @param {boolean} options.production is production - * @param {boolean} options.futureDefaults is future defaults enabled - * @returns {void} - */ -const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { - if (futureDefaults) { - F(snapshot, "managedPaths", () => - process.versions.pnp === "3" - ? [ - /^(.+?(?:[\\/]\.yarn[\\/]unplugged[\\/][^\\/]+)?[\\/]node_modules[\\/])/ - ] - : [/^(.+?[\\/]node_modules[\\/])/] - ); - F(snapshot, "immutablePaths", () => - process.versions.pnp === "3" - ? [/^(.+?[\\/]cache[\\/][^\\/]+\.zip[\\/]node_modules[\\/])/] - : [] - ); - } else { - A(snapshot, "managedPaths", () => { - if (process.versions.pnp === "3") { - const match = - /^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36871) - ); - if (match) { - return [path.resolve(match[1], "unplugged")]; - } - } else { - const match = /^(.+?[\\/]node_modules[\\/])/.exec( - // eslint-disable-next-line node/no-extraneous-require - /*require.resolve*/(36871) - ); - if (match) { - return [match[1]]; - } - } - return []; - }); - A(snapshot, "immutablePaths", () => { - if (process.versions.pnp === "1") { - const match = - /^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36871) - ); - if (match) { - return [match[1]]; - } - } else if (process.versions.pnp === "3") { - const match = - /^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36871) - ); - if (match) { - return [match[1]]; - } - } - return []; - }); - } - F(snapshot, "resolveBuildDependencies", () => ({ - timestamp: true, - hash: true - })); - F(snapshot, "buildDependencies", () => ({ timestamp: true, hash: true })); - F(snapshot, "module", () => - production ? { timestamp: true, hash: true } : { timestamp: true } - ); - F(snapshot, "resolve", () => - production ? { timestamp: true, hash: true } : { timestamp: true } - ); -}; - -/** - * @param {JavascriptParserOptions} parserOptions parser options - * @param {Object} options options - * @param {boolean} options.futureDefaults is future defaults enabled - * @param {boolean} options.isNode is node target platform - * @returns {void} - */ -const applyJavascriptParserOptionsDefaults = ( - parserOptions, - { futureDefaults, isNode } -) => { - D(parserOptions, "unknownContextRequest", "."); - D(parserOptions, "unknownContextRegExp", false); - D(parserOptions, "unknownContextRecursive", true); - D(parserOptions, "unknownContextCritical", true); - D(parserOptions, "exprContextRequest", "."); - D(parserOptions, "exprContextRegExp", false); - D(parserOptions, "exprContextRecursive", true); - D(parserOptions, "exprContextCritical", true); - D(parserOptions, "wrappedContextRegExp", /.*/); - D(parserOptions, "wrappedContextRecursive", true); - D(parserOptions, "wrappedContextCritical", false); - D(parserOptions, "strictThisContextOnImports", false); - D(parserOptions, "importMeta", true); - D(parserOptions, "dynamicImportMode", "lazy"); - D(parserOptions, "dynamicImportPrefetch", false); - D(parserOptions, "dynamicImportPreload", false); - D(parserOptions, "createRequire", isNode); - if (futureDefaults) D(parserOptions, "exportsPresence", "error"); -}; - -/** - * @param {ModuleOptions} module options - * @param {Object} options options - * @param {boolean} options.cache is caching enabled - * @param {boolean} options.syncWebAssembly is syncWebAssembly enabled - * @param {boolean} options.asyncWebAssembly is asyncWebAssembly enabled - * @param {CssExperimentOptions} options.css is css enabled - * @param {boolean} options.futureDefaults is future defaults enabled - * @param {boolean} options.isNode is node target platform - * @returns {void} - */ -const applyModuleDefaults = ( - module, - { cache, syncWebAssembly, asyncWebAssembly, css, futureDefaults, isNode } -) => { - if (cache) { - D(module, "unsafeCache", module => { - const name = module.nameForCondition(); - return name && NODE_MODULES_REGEXP.test(name); - }); - } else { - D(module, "unsafeCache", false); - } - - F(module.parser, "asset", () => ({})); - F(module.parser.asset, "dataUrlCondition", () => ({})); - if (typeof module.parser.asset.dataUrlCondition === "object") { - D(module.parser.asset.dataUrlCondition, "maxSize", 8096); - } - - F(module.parser, "javascript", () => ({})); - applyJavascriptParserOptionsDefaults(module.parser.javascript, { - futureDefaults, - isNode - }); - - A(module, "defaultRules", () => { - const esm = { - type: "javascript/esm", - resolve: { - byDependency: { - esm: { - fullySpecified: true - } - } - } - }; - const commonjs = { - type: "javascript/dynamic" - }; - /** @type {RuleSetRules} */ - const rules = [ - { - mimetype: "application/node", - type: "javascript/auto" - }, - { - test: /\.json$/i, - type: "json" - }, - { - mimetype: "application/json", - type: "json" - }, - { - test: /\.mjs$/i, - ...esm - }, - { - test: /\.js$/i, - descriptionData: { - type: "module" - }, - ...esm - }, - { - test: /\.cjs$/i, - ...commonjs - }, - { - test: /\.js$/i, - descriptionData: { - type: "commonjs" - }, - ...commonjs - }, - { - mimetype: { - or: ["text/javascript", "application/javascript"] - }, - ...esm - } - ]; - if (asyncWebAssembly) { - const wasm = { - type: "webassembly/async", - rules: [ - { - descriptionData: { - type: "module" - }, - resolve: { - fullySpecified: true - } - } - ] - }; - rules.push({ - test: /\.wasm$/i, - ...wasm - }); - rules.push({ - mimetype: "application/wasm", - ...wasm - }); - } else if (syncWebAssembly) { - const wasm = { - type: "webassembly/sync", - rules: [ - { - descriptionData: { - type: "module" - }, - resolve: { - fullySpecified: true - } - } - ] - }; - rules.push({ - test: /\.wasm$/i, - ...wasm - }); - rules.push({ - mimetype: "application/wasm", - ...wasm - }); - } - if (css) { - const cssRule = { - type: "css", - resolve: { - fullySpecified: true, - preferRelative: true - } - }; - const cssModulesRule = { - type: "css/module", - resolve: { - fullySpecified: true - } - }; - rules.push({ - test: /\.css$/i, - oneOf: [ - { - test: /\.module\.css$/i, - ...cssModulesRule - }, - { - ...cssRule - } - ] - }); - rules.push({ - mimetype: "text/css+module", - ...cssModulesRule - }); - rules.push({ - mimetype: "text/css", - ...cssRule - }); - } - rules.push( - { - dependency: "url", - oneOf: [ - { - scheme: /^data$/, - type: "asset/inline" - }, - { - type: "asset/resource" - } - ] - }, - { - assert: { type: "json" }, - type: "json" - } - ); - return rules; - }); -}; - -/** - * @param {Output} output options - * @param {Object} options options - * @param {string} options.context context - * @param {TargetProperties | false} options.targetProperties target properties - * @param {boolean} options.isAffectedByBrowserslist is affected by browserslist - * @param {boolean} options.outputModule is outputModule experiment enabled - * @param {boolean} options.development is development mode - * @param {Entry} options.entry entry option - * @param {ModuleOptions} options.module module option - * @param {boolean} options.futureDefaults is future defaults enabled - * @returns {void} - */ -const applyOutputDefaults = ( - output, - { - context, - targetProperties: tp, - isAffectedByBrowserslist, - outputModule, - development, - entry, - module, - futureDefaults - } -) => { - /** - * @param {Library=} library the library option - * @returns {string} a readable library name - */ - const getLibraryName = library => { - const libraryName = - typeof library === "object" && - library && - !Array.isArray(library) && - "type" in library - ? library.name - : /** @type {LibraryName=} */ (library); - if (Array.isArray(libraryName)) { - return libraryName.join("."); - } else if (typeof libraryName === "object") { - return getLibraryName(libraryName.root); - } else if (typeof libraryName === "string") { - return libraryName; - } - return ""; - }; - - F(output, "uniqueName", () => { - const libraryName = getLibraryName(output.library).replace( - /^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, - (m, a, d1, d2, b, c) => { - const content = a || b || c; - return content.startsWith("\\") && content.endsWith("\\") - ? `${d2 || ""}[${content.slice(1, -1)}]${d1 || ""}` - : ""; - } - ); - if (libraryName) return libraryName; - const pkgPath = path.resolve(context, "package.json"); - try { - const packageInfo = JSON.parse(fs.readFileSync(pkgPath, "utf-8")); - return packageInfo.name || ""; - } catch (e) { - if (e.code !== "ENOENT") { - e.message += `\nwhile determining default 'output.uniqueName' from 'name' in ${pkgPath}`; - throw e; - } - return ""; - } - }); - - F(output, "module", () => !!outputModule); - D(output, "filename", output.module ? "[name].mjs" : "[name].js"); - F(output, "iife", () => !output.module); - D(output, "importFunctionName", "import"); - D(output, "importMetaName", "import.meta"); - F(output, "chunkFilename", () => { - const filename = output.filename; - if (typeof filename !== "function") { - const hasName = filename.includes("[name]"); - const hasId = filename.includes("[id]"); - const hasChunkHash = filename.includes("[chunkhash]"); - const hasContentHash = filename.includes("[contenthash]"); - // Anything changing depending on chunk is fine - if (hasChunkHash || hasContentHash || hasName || hasId) return filename; - // Otherwise prefix "[id]." in front of the basename to make it changing - return filename.replace(/(^|\/)([^/]*(?:\?|$))/, "$1[id].$2"); - } - return output.module ? "[id].mjs" : "[id].js"; - }); - F(output, "cssFilename", () => { - const filename = output.filename; - if (typeof filename !== "function") { - return filename.replace(/\.[mc]?js(\?|$)/, ".css$1"); - } - return "[id].css"; - }); - F(output, "cssChunkFilename", () => { - const chunkFilename = output.chunkFilename; - if (typeof chunkFilename !== "function") { - return chunkFilename.replace(/\.[mc]?js(\?|$)/, ".css$1"); - } - return "[id].css"; - }); - D(output, "assetModuleFilename", "[hash][ext][query]"); - D(output, "webassemblyModuleFilename", "[hash].module.wasm"); - D(output, "compareBeforeEmit", true); - D(output, "charset", true); - F(output, "hotUpdateGlobal", () => - Template.toIdentifier( - "webpackHotUpdate" + Template.toIdentifier(output.uniqueName) - ) - ); - F(output, "chunkLoadingGlobal", () => - Template.toIdentifier( - "webpackChunk" + Template.toIdentifier(output.uniqueName) - ) - ); - F(output, "globalObject", () => { - if (tp) { - if (tp.global) return "global"; - if (tp.globalThis) return "globalThis"; - } - return "self"; - }); - F(output, "chunkFormat", () => { - if (tp) { - const helpMessage = isAffectedByBrowserslist - ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." - : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly."; - if (output.module) { - if (tp.dynamicImport) return "module"; - if (tp.document) return "array-push"; - throw new Error( - "For the selected environment is no default ESM chunk format available:\n" + - "ESM exports can be chosen when 'import()' is available.\n" + - "JSONP Array push can be chosen when 'document' is available.\n" + - helpMessage - ); - } else { - if (tp.document) return "array-push"; - if (tp.require) return "commonjs"; - if (tp.nodeBuiltins) return "commonjs"; - if (tp.importScripts) return "array-push"; - throw new Error( - "For the selected environment is no default script chunk format available:\n" + - "JSONP Array push can be chosen when 'document' or 'importScripts' is available.\n" + - "CommonJs exports can be chosen when 'require' or node builtins are available.\n" + - helpMessage - ); - } - } - throw new Error( - "Chunk format can't be selected by default when no target is specified" - ); - }); - D(output, "asyncChunks", true); - F(output, "chunkLoading", () => { - if (tp) { - switch (output.chunkFormat) { - case "array-push": - if (tp.document) return "jsonp"; - if (tp.importScripts) return "import-scripts"; - break; - case "commonjs": - if (tp.require) return "require"; - if (tp.nodeBuiltins) return "async-node"; - break; - case "module": - if (tp.dynamicImport) return "import"; - break; - } - if ( - tp.require === null || - tp.nodeBuiltins === null || - tp.document === null || - tp.importScripts === null - ) { - return "universal"; - } - } - return false; - }); - F(output, "workerChunkLoading", () => { - if (tp) { - switch (output.chunkFormat) { - case "array-push": - if (tp.importScriptsInWorker) return "import-scripts"; - break; - case "commonjs": - if (tp.require) return "require"; - if (tp.nodeBuiltins) return "async-node"; - break; - case "module": - if (tp.dynamicImportInWorker) return "import"; - break; - } - if ( - tp.require === null || - tp.nodeBuiltins === null || - tp.importScriptsInWorker === null - ) { - return "universal"; - } - } - return false; - }); - F(output, "wasmLoading", () => { - if (tp) { - if (tp.fetchWasm) return "fetch"; - if (tp.nodeBuiltins) - return output.module ? "async-node-module" : "async-node"; - if (tp.nodeBuiltins === null || tp.fetchWasm === null) { - return "universal"; - } - } - return false; - }); - F(output, "workerWasmLoading", () => output.wasmLoading); - F(output, "devtoolNamespace", () => output.uniqueName); - if (output.library) { - F(output.library, "type", () => (output.module ? "module" : "var")); - } - F(output, "path", () => path.join(process.cwd(), "dist")); - F(output, "pathinfo", () => development); - D(output, "sourceMapFilename", "[file].map[query]"); - D( - output, - "hotUpdateChunkFilename", - `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}` - ); - D(output, "hotUpdateMainFilename", "[runtime].[fullhash].hot-update.json"); - D(output, "crossOriginLoading", false); - F(output, "scriptType", () => (output.module ? "module" : false)); - D( - output, - "publicPath", - (tp && (tp.document || tp.importScripts)) || output.scriptType === "module" - ? "auto" - : "" - ); - D(output, "chunkLoadTimeout", 120000); - D(output, "hashFunction", futureDefaults ? "xxhash64" : "md4"); - D(output, "hashDigest", "hex"); - D(output, "hashDigestLength", futureDefaults ? 16 : 20); - D(output, "strictModuleExceptionHandling", false); - - const optimistic = v => v || v === undefined; - const conditionallyOptimistic = (v, c) => (v === undefined && c) || v; - F( - output.environment, - "arrowFunction", - () => tp && optimistic(tp.arrowFunction) - ); - F(output.environment, "const", () => tp && optimistic(tp.const)); - F( - output.environment, - "destructuring", - () => tp && optimistic(tp.destructuring) - ); - F(output.environment, "forOf", () => tp && optimistic(tp.forOf)); - F(output.environment, "bigIntLiteral", () => tp && tp.bigIntLiteral); - F(output.environment, "dynamicImport", () => - conditionallyOptimistic(tp && tp.dynamicImport, output.module) - ); - F(output.environment, "module", () => - conditionallyOptimistic(tp && tp.module, output.module) - ); - - const { trustedTypes } = output; - if (trustedTypes) { - F( - trustedTypes, - "policyName", - () => - output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack" - ); - } - - /** - * @param {function(EntryDescription): void} fn iterator - * @returns {void} - */ - const forEachEntry = fn => { - for (const name of Object.keys(entry)) { - fn(entry[name]); - } - }; - A(output, "enabledLibraryTypes", () => { - const enabledLibraryTypes = []; - if (output.library) { - enabledLibraryTypes.push(output.library.type); - } - forEachEntry(desc => { - if (desc.library) { - enabledLibraryTypes.push(desc.library.type); - } - }); - return enabledLibraryTypes; - }); - - A(output, "enabledChunkLoadingTypes", () => { - const enabledChunkLoadingTypes = new Set(); - if (output.chunkLoading) { - enabledChunkLoadingTypes.add(output.chunkLoading); - } - if (output.workerChunkLoading) { - enabledChunkLoadingTypes.add(output.workerChunkLoading); - } - forEachEntry(desc => { - if (desc.chunkLoading) { - enabledChunkLoadingTypes.add(desc.chunkLoading); - } - }); - return Array.from(enabledChunkLoadingTypes); - }); - - A(output, "enabledWasmLoadingTypes", () => { - const enabledWasmLoadingTypes = new Set(); - if (output.wasmLoading) { - enabledWasmLoadingTypes.add(output.wasmLoading); - } - if (output.workerWasmLoading) { - enabledWasmLoadingTypes.add(output.workerWasmLoading); - } - forEachEntry(desc => { - if (desc.wasmLoading) { - enabledWasmLoadingTypes.add(desc.wasmLoading); - } - }); - return Array.from(enabledWasmLoadingTypes); - }); -}; - -/** - * @param {ExternalsPresets} externalsPresets options - * @param {Object} options options - * @param {TargetProperties | false} options.targetProperties target properties - * @param {boolean} options.buildHttp buildHttp experiment enabled - * @returns {void} - */ -const applyExternalsPresetsDefaults = ( - externalsPresets, - { targetProperties, buildHttp } -) => { - D( - externalsPresets, - "web", - !buildHttp && targetProperties && targetProperties.web - ); - D(externalsPresets, "node", targetProperties && targetProperties.node); - D(externalsPresets, "nwjs", targetProperties && targetProperties.nwjs); - D( - externalsPresets, - "electron", - targetProperties && targetProperties.electron - ); - D( - externalsPresets, - "electronMain", - targetProperties && - targetProperties.electron && - targetProperties.electronMain - ); - D( - externalsPresets, - "electronPreload", - targetProperties && - targetProperties.electron && - targetProperties.electronPreload - ); - D( - externalsPresets, - "electronRenderer", - targetProperties && - targetProperties.electron && - targetProperties.electronRenderer - ); -}; - -/** - * @param {Loader} loader options - * @param {Object} options options - * @param {TargetProperties | false} options.targetProperties target properties - * @returns {void} - */ -const applyLoaderDefaults = (loader, { targetProperties }) => { - F(loader, "target", () => { - if (targetProperties) { - if (targetProperties.electron) { - if (targetProperties.electronMain) return "electron-main"; - if (targetProperties.electronPreload) return "electron-preload"; - if (targetProperties.electronRenderer) return "electron-renderer"; - return "electron"; - } - if (targetProperties.nwjs) return "nwjs"; - if (targetProperties.node) return "node"; - if (targetProperties.web) return "web"; - } - }); -}; - -/** - * @param {WebpackNode} node options - * @param {Object} options options - * @param {TargetProperties | false} options.targetProperties target properties - * @param {boolean} options.futureDefaults is future defaults enabled - * @returns {void} - */ -const applyNodeDefaults = (node, { futureDefaults, targetProperties }) => { - if (node === false) return; - - F(node, "global", () => { - if (targetProperties && targetProperties.global) return false; - // TODO webpack 6 should always default to false - return futureDefaults ? "warn" : true; - }); - F(node, "__filename", () => { - if (targetProperties && targetProperties.node) return "eval-only"; - // TODO webpack 6 should always default to false - return futureDefaults ? "warn-mock" : "mock"; - }); - F(node, "__dirname", () => { - if (targetProperties && targetProperties.node) return "eval-only"; - // TODO webpack 6 should always default to false - return futureDefaults ? "warn-mock" : "mock"; - }); -}; - -/** - * @param {Performance} performance options - * @param {Object} options options - * @param {boolean} options.production is production - * @returns {void} - */ -const applyPerformanceDefaults = (performance, { production }) => { - if (performance === false) return; - D(performance, "maxAssetSize", 250000); - D(performance, "maxEntrypointSize", 250000); - F(performance, "hints", () => (production ? "warning" : false)); -}; - -/** - * @param {Optimization} optimization options - * @param {Object} options options - * @param {boolean} options.production is production - * @param {boolean} options.development is development - * @param {CssExperimentOptions} options.css is css enabled - * @param {boolean} options.records using records - * @returns {void} - */ -const applyOptimizationDefaults = ( - optimization, - { production, development, css, records } -) => { - D(optimization, "removeAvailableModules", false); - D(optimization, "removeEmptyChunks", true); - D(optimization, "mergeDuplicateChunks", true); - D(optimization, "flagIncludedChunks", production); - F(optimization, "moduleIds", () => { - if (production) return "deterministic"; - if (development) return "named"; - return "natural"; - }); - F(optimization, "chunkIds", () => { - if (production) return "deterministic"; - if (development) return "named"; - return "natural"; - }); - F(optimization, "sideEffects", () => (production ? true : "flag")); - D(optimization, "providedExports", true); - D(optimization, "usedExports", production); - D(optimization, "innerGraph", production); - D(optimization, "mangleExports", production); - D(optimization, "concatenateModules", production); - D(optimization, "runtimeChunk", false); - D(optimization, "emitOnErrors", !production); - D(optimization, "checkWasmTypes", production); - D(optimization, "mangleWasmImports", false); - D(optimization, "portableRecords", records); - D(optimization, "realContentHash", production); - D(optimization, "minimize", production); - A(optimization, "minimizer", () => [ - { - apply: compiler => { - // Lazy load the Terser plugin - const TerserPlugin = __webpack_require__(55302); - new TerserPlugin({ - terserOptions: { - compress: { - passes: 2 - } - } - }).apply(compiler); - } - } - ]); - F(optimization, "nodeEnv", () => { - if (production) return "production"; - if (development) return "development"; - return false; - }); - const { splitChunks } = optimization; - if (splitChunks) { - A(splitChunks, "defaultSizeTypes", () => - css ? ["javascript", "css", "unknown"] : ["javascript", "unknown"] - ); - D(splitChunks, "hidePathInfo", production); - D(splitChunks, "chunks", "async"); - D(splitChunks, "usedExports", optimization.usedExports === true); - D(splitChunks, "minChunks", 1); - F(splitChunks, "minSize", () => (production ? 20000 : 10000)); - F(splitChunks, "minRemainingSize", () => (development ? 0 : undefined)); - F(splitChunks, "enforceSizeThreshold", () => (production ? 50000 : 30000)); - F(splitChunks, "maxAsyncRequests", () => (production ? 30 : Infinity)); - F(splitChunks, "maxInitialRequests", () => (production ? 30 : Infinity)); - D(splitChunks, "automaticNameDelimiter", "-"); - const { cacheGroups } = splitChunks; - F(cacheGroups, "default", () => ({ - idHint: "", - reuseExistingChunk: true, - minChunks: 2, - priority: -20 - })); - F(cacheGroups, "defaultVendors", () => ({ - idHint: "vendors", - reuseExistingChunk: true, - test: NODE_MODULES_REGEXP, - priority: -10 - })); - } -}; - -/** - * @param {Object} options options - * @param {boolean} options.cache is cache enable - * @param {string} options.context build context - * @param {TargetProperties | false} options.targetProperties target properties - * @param {Mode} options.mode mode - * @returns {ResolveOptions} resolve options - */ -const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { - /** @type {string[]} */ - const conditions = ["webpack"]; - - conditions.push(mode === "development" ? "development" : "production"); - - if (targetProperties) { - if (targetProperties.webworker) conditions.push("worker"); - if (targetProperties.node) conditions.push("node"); - if (targetProperties.web) conditions.push("browser"); - if (targetProperties.electron) conditions.push("electron"); - if (targetProperties.nwjs) conditions.push("nwjs"); - } - - const jsExtensions = [".js", ".json", ".wasm"]; - - const tp = targetProperties; - const browserField = - tp && tp.web && (!tp.node || (tp.electron && tp.electronRenderer)); - - /** @type {function(): ResolveOptions} */ - const cjsDeps = () => ({ - aliasFields: browserField ? ["browser"] : [], - mainFields: browserField ? ["browser", "module", "..."] : ["module", "..."], - conditionNames: ["require", "module", "..."], - extensions: [...jsExtensions] - }); - /** @type {function(): ResolveOptions} */ - const esmDeps = () => ({ - aliasFields: browserField ? ["browser"] : [], - mainFields: browserField ? ["browser", "module", "..."] : ["module", "..."], - conditionNames: ["import", "module", "..."], - extensions: [...jsExtensions] - }); - - /** @type {ResolveOptions} */ - const resolveOptions = { - cache, - modules: ["node_modules"], - conditionNames: conditions, - mainFiles: ["index"], - extensions: [], - aliasFields: [], - exportsFields: ["exports"], - roots: [context], - mainFields: ["main"], - byDependency: { - wasm: esmDeps(), - esm: esmDeps(), - loaderImport: esmDeps(), - url: { - preferRelative: true - }, - worker: { - ...esmDeps(), - preferRelative: true - }, - commonjs: cjsDeps(), - amd: cjsDeps(), - // for backward-compat: loadModule - loader: cjsDeps(), - // for backward-compat: Custom Dependency - unknown: cjsDeps(), - // for backward-compat: getResolve without dependencyType - undefined: cjsDeps() - } - }; - - return resolveOptions; -}; - -/** - * @param {Object} options options - * @param {boolean} options.cache is cache enable - * @returns {ResolveOptions} resolve options - */ -const getResolveLoaderDefaults = ({ cache }) => { - /** @type {ResolveOptions} */ - const resolveOptions = { - cache, - conditionNames: ["loader", "require", "node"], - exportsFields: ["exports"], - mainFields: ["loader", "main"], - extensions: [".js"], - mainFiles: ["index"] - }; - - return resolveOptions; -}; - -/** - * @param {InfrastructureLogging} infrastructureLogging options - * @returns {void} - */ -const applyInfrastructureLoggingDefaults = infrastructureLogging => { - F(infrastructureLogging, "stream", () => process.stderr); - const tty = - /** @type {any} */ (infrastructureLogging.stream).isTTY && - process.env.TERM !== "dumb"; - D(infrastructureLogging, "level", "info"); - D(infrastructureLogging, "debug", false); - D(infrastructureLogging, "colors", tty); - D(infrastructureLogging, "appendOnly", !tty); -}; - -exports.applyWebpackOptionsBaseDefaults = applyWebpackOptionsBaseDefaults; -exports.applyWebpackOptionsDefaults = applyWebpackOptionsDefaults; - - -/***/ }), - -/***/ 80593: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); - -/** @typedef {import("../../declarations/WebpackOptions").EntryStatic} EntryStatic */ -/** @typedef {import("../../declarations/WebpackOptions").EntryStaticNormalized} EntryStaticNormalized */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").OptimizationRuntimeChunk} OptimizationRuntimeChunk */ -/** @typedef {import("../../declarations/WebpackOptions").OptimizationRuntimeChunkNormalized} OptimizationRuntimeChunkNormalized */ -/** @typedef {import("../../declarations/WebpackOptions").OutputNormalized} OutputNormalized */ -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ - -const handledDeprecatedNoEmitOnErrors = util.deprecate( - (noEmitOnErrors, emitOnErrors) => { - if (emitOnErrors !== undefined && !noEmitOnErrors === !emitOnErrors) { - throw new Error( - "Conflicting use of 'optimization.noEmitOnErrors' and 'optimization.emitOnErrors'. Remove deprecated 'optimization.noEmitOnErrors' from config." - ); - } - return !noEmitOnErrors; - }, - "optimization.noEmitOnErrors is deprecated in favor of optimization.emitOnErrors", - "DEP_WEBPACK_CONFIGURATION_OPTIMIZATION_NO_EMIT_ON_ERRORS" -); - -/** - * @template T - * @template R - * @param {T|undefined} value value or not - * @param {function(T): R} fn nested handler - * @returns {R} result value - */ -const nestedConfig = (value, fn) => - value === undefined ? fn(/** @type {T} */ ({})) : fn(value); - -/** - * @template T - * @param {T|undefined} value value or not - * @returns {T} result value - */ -const cloneObject = value => { - return /** @type {T} */ ({ ...value }); -}; - -/** - * @template T - * @template R - * @param {T|undefined} value value or not - * @param {function(T): R} fn nested handler - * @returns {R|undefined} result value - */ -const optionalNestedConfig = (value, fn) => - value === undefined ? undefined : fn(value); - -/** - * @template T - * @template R - * @param {T[]|undefined} value array or not - * @param {function(T[]): R[]} fn nested handler - * @returns {R[]|undefined} cloned value - */ -const nestedArray = (value, fn) => (Array.isArray(value) ? fn(value) : fn([])); - -/** - * @template T - * @template R - * @param {T[]|undefined} value array or not - * @param {function(T[]): R[]} fn nested handler - * @returns {R[]|undefined} cloned value - */ -const optionalNestedArray = (value, fn) => - Array.isArray(value) ? fn(value) : undefined; - -/** - * @template T - * @template R - * @param {Record|undefined} value value or not - * @param {function(T): R} fn nested handler - * @param {Record=} customKeys custom nested handler for some keys - * @returns {Record} result value - */ -const keyedNestedConfig = (value, fn, customKeys) => { - const result = - value === undefined - ? {} - : Object.keys(value).reduce( - (obj, key) => ( - (obj[key] = ( - customKeys && key in customKeys ? customKeys[key] : fn - )(value[key])), - obj - ), - /** @type {Record} */ ({}) - ); - if (customKeys) { - for (const key of Object.keys(customKeys)) { - if (!(key in result)) { - result[key] = customKeys[key](/** @type {T} */ ({})); - } - } - } - return result; -}; - -/** - * @param {WebpackOptions} config input config - * @returns {WebpackOptionsNormalized} normalized options - */ -const getNormalizedWebpackOptions = config => { - return { - amd: config.amd, - bail: config.bail, - cache: optionalNestedConfig(config.cache, cache => { - if (cache === false) return false; - if (cache === true) { - return { - type: "memory", - maxGenerations: undefined - }; - } - switch (cache.type) { - case "filesystem": - return { - type: "filesystem", - allowCollectingMemory: cache.allowCollectingMemory, - maxMemoryGenerations: cache.maxMemoryGenerations, - maxAge: cache.maxAge, - profile: cache.profile, - buildDependencies: cloneObject(cache.buildDependencies), - cacheDirectory: cache.cacheDirectory, - cacheLocation: cache.cacheLocation, - hashAlgorithm: cache.hashAlgorithm, - compression: cache.compression, - idleTimeout: cache.idleTimeout, - idleTimeoutForInitialStore: cache.idleTimeoutForInitialStore, - idleTimeoutAfterLargeChanges: cache.idleTimeoutAfterLargeChanges, - name: cache.name, - store: cache.store, - version: cache.version - }; - case undefined: - case "memory": - return { - type: "memory", - maxGenerations: cache.maxGenerations - }; - default: - // @ts-expect-error Property 'type' does not exist on type 'never'. ts(2339) - throw new Error(`Not implemented cache.type ${cache.type}`); - } - }), - context: config.context, - dependencies: config.dependencies, - devServer: optionalNestedConfig(config.devServer, devServer => ({ - ...devServer - })), - devtool: config.devtool, - entry: - config.entry === undefined - ? { main: {} } - : typeof config.entry === "function" - ? ( - fn => () => - Promise.resolve().then(fn).then(getNormalizedEntryStatic) - )(config.entry) - : getNormalizedEntryStatic(config.entry), - experiments: nestedConfig(config.experiments, experiments => ({ - ...experiments, - buildHttp: optionalNestedConfig(experiments.buildHttp, options => - Array.isArray(options) ? { allowedUris: options } : options - ), - lazyCompilation: optionalNestedConfig( - experiments.lazyCompilation, - options => - options === true ? {} : options === false ? undefined : options - ), - css: optionalNestedConfig(experiments.css, options => - options === true ? {} : options === false ? undefined : options - ) - })), - externals: config.externals, - externalsPresets: cloneObject(config.externalsPresets), - externalsType: config.externalsType, - ignoreWarnings: config.ignoreWarnings - ? config.ignoreWarnings.map(ignore => { - if (typeof ignore === "function") return ignore; - const i = ignore instanceof RegExp ? { message: ignore } : ignore; - return (warning, { requestShortener }) => { - if (!i.message && !i.module && !i.file) return false; - if (i.message && !i.message.test(warning.message)) { - return false; - } - if ( - i.module && - (!warning.module || - !i.module.test( - warning.module.readableIdentifier(requestShortener) - )) - ) { - return false; - } - if (i.file && (!warning.file || !i.file.test(warning.file))) { - return false; - } - return true; - }; - }) - : undefined, - infrastructureLogging: cloneObject(config.infrastructureLogging), - loader: cloneObject(config.loader), - mode: config.mode, - module: nestedConfig(config.module, module => ({ - noParse: module.noParse, - unsafeCache: module.unsafeCache, - parser: keyedNestedConfig(module.parser, cloneObject, { - javascript: parserOptions => ({ - unknownContextRequest: module.unknownContextRequest, - unknownContextRegExp: module.unknownContextRegExp, - unknownContextRecursive: module.unknownContextRecursive, - unknownContextCritical: module.unknownContextCritical, - exprContextRequest: module.exprContextRequest, - exprContextRegExp: module.exprContextRegExp, - exprContextRecursive: module.exprContextRecursive, - exprContextCritical: module.exprContextCritical, - wrappedContextRegExp: module.wrappedContextRegExp, - wrappedContextRecursive: module.wrappedContextRecursive, - wrappedContextCritical: module.wrappedContextCritical, - // TODO webpack 6 remove - strictExportPresence: module.strictExportPresence, - strictThisContextOnImports: module.strictThisContextOnImports, - ...parserOptions - }) - }), - generator: cloneObject(module.generator), - defaultRules: optionalNestedArray(module.defaultRules, r => [...r]), - rules: nestedArray(module.rules, r => [...r]) - })), - name: config.name, - node: nestedConfig( - config.node, - node => - node && { - ...node - } - ), - optimization: nestedConfig(config.optimization, optimization => { - return { - ...optimization, - runtimeChunk: getNormalizedOptimizationRuntimeChunk( - optimization.runtimeChunk - ), - splitChunks: nestedConfig( - optimization.splitChunks, - splitChunks => - splitChunks && { - ...splitChunks, - defaultSizeTypes: splitChunks.defaultSizeTypes - ? [...splitChunks.defaultSizeTypes] - : ["..."], - cacheGroups: cloneObject(splitChunks.cacheGroups) - } - ), - emitOnErrors: - optimization.noEmitOnErrors !== undefined - ? handledDeprecatedNoEmitOnErrors( - optimization.noEmitOnErrors, - optimization.emitOnErrors - ) - : optimization.emitOnErrors - }; - }), - output: nestedConfig(config.output, output => { - const { library } = output; - const libraryAsName = /** @type {LibraryName} */ (library); - const libraryBase = - typeof library === "object" && - library && - !Array.isArray(library) && - "type" in library - ? library - : libraryAsName || output.libraryTarget - ? /** @type {LibraryOptions} */ ({ - name: libraryAsName - }) - : undefined; - /** @type {OutputNormalized} */ - const result = { - assetModuleFilename: output.assetModuleFilename, - asyncChunks: output.asyncChunks, - charset: output.charset, - chunkFilename: output.chunkFilename, - chunkFormat: output.chunkFormat, - chunkLoading: output.chunkLoading, - chunkLoadingGlobal: output.chunkLoadingGlobal, - chunkLoadTimeout: output.chunkLoadTimeout, - cssFilename: output.cssFilename, - cssChunkFilename: output.cssChunkFilename, - clean: output.clean, - compareBeforeEmit: output.compareBeforeEmit, - crossOriginLoading: output.crossOriginLoading, - devtoolFallbackModuleFilenameTemplate: - output.devtoolFallbackModuleFilenameTemplate, - devtoolModuleFilenameTemplate: output.devtoolModuleFilenameTemplate, - devtoolNamespace: output.devtoolNamespace, - environment: cloneObject(output.environment), - enabledChunkLoadingTypes: output.enabledChunkLoadingTypes - ? [...output.enabledChunkLoadingTypes] - : ["..."], - enabledLibraryTypes: output.enabledLibraryTypes - ? [...output.enabledLibraryTypes] - : ["..."], - enabledWasmLoadingTypes: output.enabledWasmLoadingTypes - ? [...output.enabledWasmLoadingTypes] - : ["..."], - filename: output.filename, - globalObject: output.globalObject, - hashDigest: output.hashDigest, - hashDigestLength: output.hashDigestLength, - hashFunction: output.hashFunction, - hashSalt: output.hashSalt, - hotUpdateChunkFilename: output.hotUpdateChunkFilename, - hotUpdateGlobal: output.hotUpdateGlobal, - hotUpdateMainFilename: output.hotUpdateMainFilename, - iife: output.iife, - importFunctionName: output.importFunctionName, - importMetaName: output.importMetaName, - scriptType: output.scriptType, - library: libraryBase && { - type: - output.libraryTarget !== undefined - ? output.libraryTarget - : libraryBase.type, - auxiliaryComment: - output.auxiliaryComment !== undefined - ? output.auxiliaryComment - : libraryBase.auxiliaryComment, - export: - output.libraryExport !== undefined - ? output.libraryExport - : libraryBase.export, - name: libraryBase.name, - umdNamedDefine: - output.umdNamedDefine !== undefined - ? output.umdNamedDefine - : libraryBase.umdNamedDefine - }, - module: output.module, - path: output.path, - pathinfo: output.pathinfo, - publicPath: output.publicPath, - sourceMapFilename: output.sourceMapFilename, - sourcePrefix: output.sourcePrefix, - strictModuleExceptionHandling: output.strictModuleExceptionHandling, - trustedTypes: optionalNestedConfig( - output.trustedTypes, - trustedTypes => { - if (trustedTypes === true) return {}; - if (typeof trustedTypes === "string") - return { policyName: trustedTypes }; - return { ...trustedTypes }; - } - ), - uniqueName: output.uniqueName, - wasmLoading: output.wasmLoading, - webassemblyModuleFilename: output.webassemblyModuleFilename, - workerChunkLoading: output.workerChunkLoading, - workerWasmLoading: output.workerWasmLoading - }; - return result; - }), - parallelism: config.parallelism, - performance: optionalNestedConfig(config.performance, performance => { - if (performance === false) return false; - return { - ...performance - }; - }), - plugins: nestedArray(config.plugins, p => [...p]), - profile: config.profile, - recordsInputPath: - config.recordsInputPath !== undefined - ? config.recordsInputPath - : config.recordsPath, - recordsOutputPath: - config.recordsOutputPath !== undefined - ? config.recordsOutputPath - : config.recordsPath, - resolve: nestedConfig(config.resolve, resolve => ({ - ...resolve, - byDependency: keyedNestedConfig(resolve.byDependency, cloneObject) - })), - resolveLoader: cloneObject(config.resolveLoader), - snapshot: nestedConfig(config.snapshot, snapshot => ({ - resolveBuildDependencies: optionalNestedConfig( - snapshot.resolveBuildDependencies, - resolveBuildDependencies => ({ - timestamp: resolveBuildDependencies.timestamp, - hash: resolveBuildDependencies.hash - }) - ), - buildDependencies: optionalNestedConfig( - snapshot.buildDependencies, - buildDependencies => ({ - timestamp: buildDependencies.timestamp, - hash: buildDependencies.hash - }) - ), - resolve: optionalNestedConfig(snapshot.resolve, resolve => ({ - timestamp: resolve.timestamp, - hash: resolve.hash - })), - module: optionalNestedConfig(snapshot.module, module => ({ - timestamp: module.timestamp, - hash: module.hash - })), - immutablePaths: optionalNestedArray(snapshot.immutablePaths, p => [...p]), - managedPaths: optionalNestedArray(snapshot.managedPaths, p => [...p]) - })), - stats: nestedConfig(config.stats, stats => { - if (stats === false) { - return { - preset: "none" - }; - } - if (stats === true) { - return { - preset: "normal" - }; - } - if (typeof stats === "string") { - return { - preset: stats - }; - } - return { - ...stats - }; - }), - target: config.target, - watch: config.watch, - watchOptions: cloneObject(config.watchOptions) - }; -}; - -/** - * @param {EntryStatic} entry static entry options - * @returns {EntryStaticNormalized} normalized static entry options - */ -const getNormalizedEntryStatic = entry => { - if (typeof entry === "string") { - return { - main: { - import: [entry] - } - }; - } - if (Array.isArray(entry)) { - return { - main: { - import: entry - } - }; - } - /** @type {EntryStaticNormalized} */ - const result = {}; - for (const key of Object.keys(entry)) { - const value = entry[key]; - if (typeof value === "string") { - result[key] = { - import: [value] - }; - } else if (Array.isArray(value)) { - result[key] = { - import: value - }; - } else { - result[key] = { - import: - value.import && - (Array.isArray(value.import) ? value.import : [value.import]), - filename: value.filename, - layer: value.layer, - runtime: value.runtime, - baseUri: value.baseUri, - publicPath: value.publicPath, - chunkLoading: value.chunkLoading, - asyncChunks: value.asyncChunks, - wasmLoading: value.wasmLoading, - dependOn: - value.dependOn && - (Array.isArray(value.dependOn) ? value.dependOn : [value.dependOn]), - library: value.library - }; - } - } - return result; -}; - -/** - * @param {OptimizationRuntimeChunk=} runtimeChunk runtimeChunk option - * @returns {OptimizationRuntimeChunkNormalized=} normalized runtimeChunk option - */ -const getNormalizedOptimizationRuntimeChunk = runtimeChunk => { - if (runtimeChunk === undefined) return undefined; - if (runtimeChunk === false) return false; - if (runtimeChunk === "single") { - return { - name: () => "runtime" - }; - } - if (runtimeChunk === true || runtimeChunk === "multiple") { - return { - name: entrypoint => `runtime~${entrypoint.name}` - }; - } - const { name } = runtimeChunk; - return { - name: typeof name === "function" ? name : () => name - }; -}; - -exports.getNormalizedWebpackOptions = getNormalizedWebpackOptions; - - -/***/ }), - -/***/ 60065: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const memoize = __webpack_require__(61374); - -const getBrowserslistTargetHandler = memoize(() => - __webpack_require__(13980) -); - -/** - * @param {string} context the context directory - * @returns {string} default target - */ -const getDefaultTarget = context => { - const browsers = getBrowserslistTargetHandler().load(null, context); - return browsers ? "browserslist" : "web"; -}; - -/** - * @typedef {Object} PlatformTargetProperties - * @property {boolean | null} web web platform, importing of http(s) and std: is available - * @property {boolean | null} browser browser platform, running in a normal web browser - * @property {boolean | null} webworker (Web)Worker platform, running in a web/shared/service worker - * @property {boolean | null} node node platform, require of node built-in modules is available - * @property {boolean | null} nwjs nwjs platform, require of legacy nw.gui is available - * @property {boolean | null} electron electron platform, require of some electron built-in modules is available - */ - -/** - * @typedef {Object} ElectronContextTargetProperties - * @property {boolean | null} electronMain in main context - * @property {boolean | null} electronPreload in preload context - * @property {boolean | null} electronRenderer in renderer context with node integration - */ - -/** - * @typedef {Object} ApiTargetProperties - * @property {boolean | null} require has require function available - * @property {boolean | null} nodeBuiltins has node.js built-in modules available - * @property {boolean | null} document has document available (allows script tags) - * @property {boolean | null} importScripts has importScripts available - * @property {boolean | null} importScriptsInWorker has importScripts available when creating a worker - * @property {boolean | null} fetchWasm has fetch function available for WebAssembly - * @property {boolean | null} global has global variable available - */ - -/** - * @typedef {Object} EcmaTargetProperties - * @property {boolean | null} globalThis has globalThis variable available - * @property {boolean | null} bigIntLiteral big int literal syntax is available - * @property {boolean | null} const const and let variable declarations are available - * @property {boolean | null} arrowFunction arrow functions are available - * @property {boolean | null} forOf for of iteration is available - * @property {boolean | null} destructuring destructuring is available - * @property {boolean | null} dynamicImport async import() is available - * @property {boolean | null} dynamicImportInWorker async import() is available when creating a worker - * @property {boolean | null} module ESM syntax is available (when in module) - * @property {boolean | null} optionalChaining optional chaining is available - * @property {boolean | null} templateLiteral template literal is available - */ - -///** @typedef {PlatformTargetProperties | ApiTargetProperties | EcmaTargetProperties | PlatformTargetProperties & ApiTargetProperties | PlatformTargetProperties & EcmaTargetProperties | ApiTargetProperties & EcmaTargetProperties} TargetProperties */ -/** @template T @typedef {{ [P in keyof T]?: never }} Never */ -/** @template A @template B @typedef {(A & Never) | (Never & B) | (A & B)} Mix */ -/** @typedef {Mix, Mix>} TargetProperties */ - -const versionDependent = (major, minor) => { - if (!major) return () => /** @type {undefined} */ (undefined); - major = +major; - minor = minor ? +minor : 0; - return (vMajor, vMinor = 0) => { - return major > vMajor || (major === vMajor && minor >= vMinor); - }; -}; - -/** @type {[string, string, RegExp, (...args: string[]) => TargetProperties | false][]} */ -const TARGETS = [ - [ - "browserslist / browserslist:env / browserslist:query / browserslist:path-to-config / browserslist:path-to-config:env", - "Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config", - /^browserslist(?::(.+))?$/, - (rest, context) => { - const browserslistTargetHandler = getBrowserslistTargetHandler(); - const browsers = browserslistTargetHandler.load( - rest ? rest.trim() : null, - context - ); - if (!browsers) { - throw new Error(`No browserslist config found to handle the 'browserslist' target. -See https://github.com/browserslist/browserslist#queries for possible ways to provide a config. -The recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions). -You can also more options via the 'target' option: 'browserslist' / 'browserslist:env' / 'browserslist:query' / 'browserslist:path-to-config' / 'browserslist:path-to-config:env'`); - } - return browserslistTargetHandler.resolve(browsers); - } - ], - [ - "web", - "Web browser.", - /^web$/, - () => { - return { - web: true, - browser: true, - webworker: null, - node: false, - electron: false, - nwjs: false, - - document: true, - importScriptsInWorker: true, - fetchWasm: true, - nodeBuiltins: false, - importScripts: false, - require: false, - global: false - }; - } - ], - [ - "webworker", - "Web Worker, SharedWorker or Service Worker.", - /^webworker$/, - () => { - return { - web: true, - browser: true, - webworker: true, - node: false, - electron: false, - nwjs: false, - - importScripts: true, - importScriptsInWorker: true, - fetchWasm: true, - nodeBuiltins: false, - require: false, - document: false, - global: false - }; - } - ], - [ - "[async-]node[X[.Y]]", - "Node.js in version X.Y. The 'async-' prefix will load chunks asynchronously via 'fs' and 'vm' instead of 'require()'. Examples: node14.5, async-node10.", - /^(async-)?node(\d+(?:\.(\d+))?)?$/, - (asyncFlag, major, minor) => { - const v = versionDependent(major, minor); - // see https://node.green/ - return { - node: true, - electron: false, - nwjs: false, - web: false, - webworker: false, - browser: false, - - require: !asyncFlag, - nodeBuiltins: true, - global: true, - document: false, - fetchWasm: false, - importScripts: false, - importScriptsInWorker: false, - - globalThis: v(12), - const: v(6), - templateLiteral: v(4), - optionalChaining: v(14), - arrowFunction: v(6), - forOf: v(5), - destructuring: v(6), - bigIntLiteral: v(10, 4), - dynamicImport: v(12, 17), - dynamicImportInWorker: major ? false : undefined, - module: v(12, 17) - }; - } - ], - [ - "electron[X[.Y]]-main/preload/renderer", - "Electron in version X.Y. Script is running in main, preload resp. renderer context.", - /^electron(\d+(?:\.(\d+))?)?-(main|preload|renderer)$/, - (major, minor, context) => { - const v = versionDependent(major, minor); - // see https://node.green/ + https://github.com/electron/releases - return { - node: true, - electron: true, - web: context !== "main", - webworker: false, - browser: false, - nwjs: false, - - electronMain: context === "main", - electronPreload: context === "preload", - electronRenderer: context === "renderer", - - global: true, - nodeBuiltins: true, - require: true, - document: context === "renderer", - fetchWasm: context === "renderer", - importScripts: false, - importScriptsInWorker: true, - - globalThis: v(5), - const: v(1, 1), - templateLiteral: v(1, 1), - optionalChaining: v(8), - arrowFunction: v(1, 1), - forOf: v(0, 36), - destructuring: v(1, 1), - bigIntLiteral: v(4), - dynamicImport: v(11), - dynamicImportInWorker: major ? false : undefined, - module: v(11) - }; - } - ], - [ - "nwjs[X[.Y]] / node-webkit[X[.Y]]", - "NW.js in version X.Y.", - /^(?:nwjs|node-webkit)(\d+(?:\.(\d+))?)?$/, - (major, minor) => { - const v = versionDependent(major, minor); - // see https://node.green/ + https://github.com/nwjs/nw.js/blob/nw48/CHANGELOG.md - return { - node: true, - web: true, - nwjs: true, - webworker: null, - browser: false, - electron: false, - - global: true, - nodeBuiltins: true, - document: false, - importScriptsInWorker: false, - fetchWasm: false, - importScripts: false, - require: false, - - globalThis: v(0, 43), - const: v(0, 15), - templateLiteral: v(0, 13), - optionalChaining: v(0, 44), - arrowFunction: v(0, 15), - forOf: v(0, 13), - destructuring: v(0, 15), - bigIntLiteral: v(0, 32), - dynamicImport: v(0, 43), - dynamicImportInWorker: major ? false : undefined, - module: v(0, 43) - }; - } - ], - [ - "esX", - "EcmaScript in this version. Examples: es2020, es5.", - /^es(\d+)$/, - version => { - let v = +version; - if (v < 1000) v = v + 2009; - return { - const: v >= 2015, - templateLiteral: v >= 2015, - optionalChaining: v >= 2020, - arrowFunction: v >= 2015, - forOf: v >= 2015, - destructuring: v >= 2015, - module: v >= 2015, - globalThis: v >= 2020, - bigIntLiteral: v >= 2020, - dynamicImport: v >= 2020, - dynamicImportInWorker: v >= 2020 - }; - } - ] -]; - -/** - * @param {string} target the target - * @param {string} context the context directory - * @returns {TargetProperties} target properties - */ -const getTargetProperties = (target, context) => { - for (const [, , regExp, handler] of TARGETS) { - const match = regExp.exec(target); - if (match) { - const [, ...args] = match; - const result = handler(...args, context); - if (result) return result; - } - } - throw new Error( - `Unknown target '${target}'. The following targets are supported:\n${TARGETS.map( - ([name, description]) => `* ${name}: ${description}` - ).join("\n")}` - ); -}; - -const mergeTargetProperties = targetProperties => { - const keys = new Set(); - for (const tp of targetProperties) { - for (const key of Object.keys(tp)) { - keys.add(key); - } - } - const result = {}; - for (const key of keys) { - let hasTrue = false; - let hasFalse = false; - for (const tp of targetProperties) { - const value = tp[key]; - switch (value) { - case true: - hasTrue = true; - break; - case false: - hasFalse = true; - break; - } - } - if (hasTrue || hasFalse) - result[key] = hasFalse && hasTrue ? null : hasTrue ? true : false; - } - return /** @type {TargetProperties} */ (result); -}; - -/** - * @param {string[]} targets the targets - * @param {string} context the context directory - * @returns {TargetProperties} target properties - */ -const getTargetsProperties = (targets, context) => { - return mergeTargetProperties( - targets.map(t => getTargetProperties(t, context)) - ); -}; - -exports.getDefaultTarget = getDefaultTarget; -exports.getTargetProperties = getTargetProperties; -exports.getTargetsProperties = getTargetsProperties; - - -/***/ }), - -/***/ 77033: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); - -/** @typedef {import("./ContainerEntryModule").ExposeOptions} ExposeOptions */ - -class ContainerEntryDependency extends Dependency { - /** - * @param {string} name entry name - * @param {[string, ExposeOptions][]} exposes list of exposed modules - * @param {string} shareScope name of the share scope - */ - constructor(name, exposes, shareScope) { - super(); - this.name = name; - this.exposes = exposes; - this.shareScope = shareScope; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `container-entry-${this.name}`; - } - - get type() { - return "container entry"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ContainerEntryDependency, - "webpack/lib/container/ContainerEntryDependency" -); - -module.exports = ContainerEntryDependency; - - -/***/ }), - -/***/ 17438: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const { OriginalSource, RawSource } = __webpack_require__(51255); -const AsyncDependenciesBlock = __webpack_require__(42290); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const StaticExportsDependency = __webpack_require__(19383); -const makeSerializable = __webpack_require__(65764); -const ContainerExposedDependency = __webpack_require__(91571); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */ - -/** - * @typedef {Object} ExposeOptions - * @property {string[]} import requests to exposed modules (last one is exported) - * @property {string} name custom chunk name for the exposed module - */ - -const SOURCE_TYPES = new Set(["javascript"]); - -class ContainerEntryModule extends Module { - /** - * @param {string} name container entry name - * @param {[string, ExposeOptions][]} exposes list of exposed modules - * @param {string} shareScope name of the share scope - */ - constructor(name, exposes, shareScope) { - super("javascript/dynamic", null); - this._name = name; - this._exposes = exposes; - this._shareScope = shareScope; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return SOURCE_TYPES; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `container entry (${this._shareScope}) ${JSON.stringify( - this._exposes - )}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `container entry`; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return `${this.layer ? `(${this.layer})/` : ""}webpack/container/entry/${ - this._name - }`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - return callback(null, !this.buildMeta); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - strict: true, - topLevelDeclarations: new Set(["moduleMap", "get", "init"]) - }; - this.buildMeta.exportsType = "namespace"; - - this.clearDependenciesAndBlocks(); - - for (const [name, options] of this._exposes) { - const block = new AsyncDependenciesBlock( - { - name: options.name - }, - { name }, - options.import[options.import.length - 1] - ); - let idx = 0; - for (const request of options.import) { - const dep = new ContainerExposedDependency(name, request); - dep.loc = { - name, - index: idx++ - }; - - block.addDependency(dep); - } - this.addBlock(block); - } - this.addDependency(new StaticExportsDependency(["get", "init"], false)); - - callback(); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }) { - const sources = new Map(); - const runtimeRequirements = new Set([ - RuntimeGlobals.definePropertyGetters, - RuntimeGlobals.hasOwnProperty, - RuntimeGlobals.exports - ]); - const getters = []; - - for (const block of this.blocks) { - const { dependencies } = block; - - const modules = dependencies.map(dependency => { - const dep = /** @type {ContainerExposedDependency} */ (dependency); - return { - name: dep.exposedName, - module: moduleGraph.getModule(dep), - request: dep.userRequest - }; - }); - - let str; - - if (modules.some(m => !m.module)) { - str = runtimeTemplate.throwMissingModuleErrorBlock({ - request: modules.map(m => m.request).join(", ") - }); - } else { - str = `return ${runtimeTemplate.blockPromise({ - block, - message: "", - chunkGraph, - runtimeRequirements - })}.then(${runtimeTemplate.returningFunction( - runtimeTemplate.returningFunction( - `(${modules - .map(({ module, request }) => - runtimeTemplate.moduleRaw({ - module, - chunkGraph, - request, - weak: false, - runtimeRequirements - }) - ) - .join(", ")})` - ) - )});`; - } - - getters.push( - `${JSON.stringify(modules[0].name)}: ${runtimeTemplate.basicFunction( - "", - str - )}` - ); - } - - const source = Template.asString([ - `var moduleMap = {`, - Template.indent(getters.join(",\n")), - "};", - `var get = ${runtimeTemplate.basicFunction("module, getScope", [ - `${RuntimeGlobals.currentRemoteGetScope} = getScope;`, - // reusing the getScope variable to avoid creating a new var (and module is also used later) - "getScope = (", - Template.indent([ - `${RuntimeGlobals.hasOwnProperty}(moduleMap, module)`, - Template.indent([ - "? moduleMap[module]()", - `: Promise.resolve().then(${runtimeTemplate.basicFunction( - "", - "throw new Error('Module \"' + module + '\" does not exist in container.');" - )})` - ]) - ]), - ");", - `${RuntimeGlobals.currentRemoteGetScope} = undefined;`, - "return getScope;" - ])};`, - `var init = ${runtimeTemplate.basicFunction("shareScope, initScope", [ - `if (!${RuntimeGlobals.shareScopeMap}) return;`, - `var name = ${JSON.stringify(this._shareScope)}`, - `var oldScope = ${RuntimeGlobals.shareScopeMap}[name];`, - `if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope");`, - `${RuntimeGlobals.shareScopeMap}[name] = shareScope;`, - `return ${RuntimeGlobals.initializeSharing}(name, initScope);` - ])};`, - "", - "// This exports getters to disallow modifications", - `${RuntimeGlobals.definePropertyGetters}(exports, {`, - Template.indent([ - `get: ${runtimeTemplate.returningFunction("get")},`, - `init: ${runtimeTemplate.returningFunction("init")}` - ]), - "});" - ]); - - sources.set( - "javascript", - this.useSourceMap || this.useSimpleSourceMap - ? new OriginalSource(source, "webpack/container-entry") - : new RawSource(source) - ); - - return { - sources, - runtimeRequirements - }; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 42; - } - - serialize(context) { - const { write } = context; - write(this._name); - write(this._exposes); - write(this._shareScope); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new ContainerEntryModule(read(), read(), read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - ContainerEntryModule, - "webpack/lib/container/ContainerEntryModule" -); - -module.exports = ContainerEntryModule; - - -/***/ }), - -/***/ 52898: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const ModuleFactory = __webpack_require__(39744); -const ContainerEntryModule = __webpack_require__(17438); - -/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */ - -module.exports = class ContainerEntryModuleFactory extends ModuleFactory { - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create({ dependencies: [dependency] }, callback) { - const dep = /** @type {ContainerEntryDependency} */ (dependency); - callback(null, { - module: new ContainerEntryModule(dep.name, dep.exposes, dep.shareScope) - }); - } -}; - - -/***/ }), - -/***/ 91571: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const ModuleDependency = __webpack_require__(99809); -const makeSerializable = __webpack_require__(65764); - -class ContainerExposedDependency extends ModuleDependency { - /** - * @param {string} exposedName public name - * @param {string} request request to module - */ - constructor(exposedName, request) { - super(request); - this.exposedName = exposedName; - } - - get type() { - return "container exposed"; - } - - get category() { - return "esm"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `exposed dependency ${this.exposedName}=${this.request}`; - } - - serialize(context) { - context.write(this.exposedName); - super.serialize(context); - } - - deserialize(context) { - this.exposedName = context.read(); - super.deserialize(context); - } -} - -makeSerializable( - ContainerExposedDependency, - "webpack/lib/container/ContainerExposedDependency" -); - -module.exports = ContainerExposedDependency; - - -/***/ }), - -/***/ 90005: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const createSchemaValidation = __webpack_require__(89699); -const ContainerEntryDependency = __webpack_require__(77033); -const ContainerEntryModuleFactory = __webpack_require__(52898); -const ContainerExposedDependency = __webpack_require__(91571); -const { parseOptions } = __webpack_require__(58491); - -/** @typedef {import("../../declarations/plugins/container/ContainerPlugin").ContainerPluginOptions} ContainerPluginOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(74484), - () => __webpack_require__(57030), - { - name: "Container Plugin", - baseDataPath: "options" - } -); - -const PLUGIN_NAME = "ContainerPlugin"; - -class ContainerPlugin { - /** - * @param {ContainerPluginOptions} options options - */ - constructor(options) { - validate(options); - - this._options = { - name: options.name, - shareScope: options.shareScope || "default", - library: options.library || { - type: "var", - name: options.name - }, - runtime: options.runtime, - filename: options.filename || undefined, - exposes: parseOptions( - options.exposes, - item => ({ - import: Array.isArray(item) ? item : [item], - name: undefined - }), - item => ({ - import: Array.isArray(item.import) ? item.import : [item.import], - name: item.name || undefined - }) - ) - }; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { name, exposes, shareScope, filename, library, runtime } = - this._options; - - compiler.options.output.enabledLibraryTypes.push(library.type); - - compiler.hooks.make.tapAsync(PLUGIN_NAME, (compilation, callback) => { - const dep = new ContainerEntryDependency(name, exposes, shareScope); - dep.loc = { name }; - compilation.addEntry( - compilation.options.context, - dep, - { - name, - filename, - runtime, - library - }, - error => { - if (error) return callback(error); - callback(); - } - ); - }); - - compiler.hooks.thisCompilation.tap( - PLUGIN_NAME, - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - ContainerEntryDependency, - new ContainerEntryModuleFactory() - ); - - compilation.dependencyFactories.set( - ContainerExposedDependency, - normalModuleFactory - ); - } - ); - } -} - -module.exports = ContainerPlugin; - - -/***/ }), - -/***/ 25405: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const ExternalsPlugin = __webpack_require__(51562); -const RuntimeGlobals = __webpack_require__(39201); -const createSchemaValidation = __webpack_require__(89699); -const FallbackDependency = __webpack_require__(65917); -const FallbackItemDependency = __webpack_require__(25742); -const FallbackModuleFactory = __webpack_require__(71958); -const RemoteModule = __webpack_require__(40452); -const RemoteRuntimeModule = __webpack_require__(36296); -const RemoteToExternalDependency = __webpack_require__(21290); -const { parseOptions } = __webpack_require__(58491); - -/** @typedef {import("../../declarations/plugins/container/ContainerReferencePlugin").ContainerReferencePluginOptions} ContainerReferencePluginOptions */ -/** @typedef {import("../../declarations/plugins/container/ContainerReferencePlugin").RemotesConfig} RemotesConfig */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(47290), - () => - __webpack_require__(34290), - { - name: "Container Reference Plugin", - baseDataPath: "options" - } -); - -const slashCode = "/".charCodeAt(0); - -class ContainerReferencePlugin { - /** - * @param {ContainerReferencePluginOptions} options options - */ - constructor(options) { - validate(options); - - this._remoteType = options.remoteType; - this._remotes = parseOptions( - options.remotes, - item => ({ - external: Array.isArray(item) ? item : [item], - shareScope: options.shareScope || "default" - }), - item => ({ - external: Array.isArray(item.external) - ? item.external - : [item.external], - shareScope: item.shareScope || options.shareScope || "default" - }) - ); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _remotes: remotes, _remoteType: remoteType } = this; - - /** @type {Record} */ - const remoteExternals = {}; - for (const [key, config] of remotes) { - let i = 0; - for (const external of config.external) { - if (external.startsWith("internal ")) continue; - remoteExternals[ - `webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}` - ] = external; - i++; - } - } - - new ExternalsPlugin(remoteType, remoteExternals).apply(compiler); - - compiler.hooks.compilation.tap( - "ContainerReferencePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - RemoteToExternalDependency, - normalModuleFactory - ); - - compilation.dependencyFactories.set( - FallbackItemDependency, - normalModuleFactory - ); - - compilation.dependencyFactories.set( - FallbackDependency, - new FallbackModuleFactory() - ); - - normalModuleFactory.hooks.factorize.tap( - "ContainerReferencePlugin", - data => { - if (!data.request.includes("!")) { - for (const [key, config] of remotes) { - if ( - data.request.startsWith(`${key}`) && - (data.request.length === key.length || - data.request.charCodeAt(key.length) === slashCode) - ) { - return new RemoteModule( - data.request, - config.external.map((external, i) => - external.startsWith("internal ") - ? external.slice(9) - : `webpack/container/reference/${key}${ - i ? `/fallback-${i}` : "" - }` - ), - `.${data.request.slice(key.length)}`, - config.shareScope - ); - } - } - } - } - ); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ContainerReferencePlugin", (chunk, set) => { - set.add(RuntimeGlobals.module); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.hasOwnProperty); - set.add(RuntimeGlobals.initializeSharing); - set.add(RuntimeGlobals.shareScopeMap); - compilation.addRuntimeModule(chunk, new RemoteRuntimeModule()); - }); - } - ); - } -} - -module.exports = ContainerReferencePlugin; - - -/***/ }), - -/***/ 65917: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); - -class FallbackDependency extends Dependency { - constructor(requests) { - super(); - this.requests = requests; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `fallback ${this.requests.join(" ")}`; - } - - get type() { - return "fallback"; - } - - get category() { - return "esm"; - } - - serialize(context) { - const { write } = context; - write(this.requests); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new FallbackDependency(read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - FallbackDependency, - "webpack/lib/container/FallbackDependency" -); - -module.exports = FallbackDependency; - - -/***/ }), - -/***/ 25742: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); -const makeSerializable = __webpack_require__(65764); - -class FallbackItemDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "fallback item"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - FallbackItemDependency, - "webpack/lib/container/FallbackItemDependency" -); - -module.exports = FallbackItemDependency; - - -/***/ }), - -/***/ 39387: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const makeSerializable = __webpack_require__(65764); -const FallbackItemDependency = __webpack_require__(25742); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["javascript"]); -const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); - -class FallbackModule extends Module { - /** - * @param {string[]} requests list of requests to choose one - */ - constructor(requests) { - super("fallback-module"); - this.requests = requests; - this._identifier = `fallback ${this.requests.join(" ")}`; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this._identifier; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return this._identifier; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return `${this.layer ? `(${this.layer})/` : ""}webpack/container/fallback/${ - this.requests[0] - }/and ${this.requests.length - 1} more`; - } - - /** - * @param {Chunk} chunk the chunk which condition should be checked - * @param {Compilation} compilation the compilation - * @returns {boolean} true, if the chunk is ok for the module - */ - chunkCondition(chunk, { chunkGraph }) { - return chunkGraph.getNumberOfEntryModules(chunk) > 0; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback(null, !this.buildInfo); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - strict: true - }; - - this.clearDependenciesAndBlocks(); - for (const request of this.requests) - this.addDependency(new FallbackItemDependency(request)); - - callback(); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return this.requests.length * 5 + 42; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { - const ids = this.dependencies.map(dep => - chunkGraph.getModuleId(moduleGraph.getModule(dep)) - ); - const code = Template.asString([ - `var ids = ${JSON.stringify(ids)};`, - "var error, result, i = 0;", - `var loop = ${runtimeTemplate.basicFunction("next", [ - "while(i < ids.length) {", - Template.indent([ - "try { next = __webpack_require__(ids[i++]); } catch(e) { return handleError(e); }", - "if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);" - ]), - "}", - "if(error) throw error;" - ])}`, - `var handleResult = ${runtimeTemplate.basicFunction("result", [ - "if(result) return result;", - "return loop();" - ])};`, - `var handleError = ${runtimeTemplate.basicFunction("e", [ - "error = e;", - "return loop();" - ])};`, - "module.exports = loop();" - ]); - const sources = new Map(); - sources.set("javascript", new RawSource(code)); - return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS }; - } - - serialize(context) { - const { write } = context; - write(this.requests); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new FallbackModule(read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable(FallbackModule, "webpack/lib/container/FallbackModule"); - -module.exports = FallbackModule; - - -/***/ }), - -/***/ 71958: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr -*/ - - - -const ModuleFactory = __webpack_require__(39744); -const FallbackModule = __webpack_require__(39387); - -/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./FallbackDependency")} FallbackDependency */ - -module.exports = class FallbackModuleFactory extends ModuleFactory { - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create({ dependencies: [dependency] }, callback) { - const dep = /** @type {FallbackDependency} */ (dependency); - callback(null, { - module: new FallbackModule(dep.requests) - }); - } -}; - - -/***/ }), - -/***/ 45124: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const isValidExternalsType = __webpack_require__(49183); -const SharePlugin = __webpack_require__(77443); -const createSchemaValidation = __webpack_require__(89699); -const ContainerPlugin = __webpack_require__(90005); -const ContainerReferencePlugin = __webpack_require__(25405); - -/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").ExternalsType} ExternalsType */ -/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").ModuleFederationPluginOptions} ModuleFederationPluginOptions */ -/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").Shared} Shared */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(44166), - () => __webpack_require__(46413), - { - name: "Module Federation Plugin", - baseDataPath: "options" - } -); -class ModuleFederationPlugin { - /** - * @param {ModuleFederationPluginOptions} options options - */ - constructor(options) { - validate(options); - - this._options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _options: options } = this; - const library = options.library || { type: "var", name: options.name }; - const remoteType = - options.remoteType || - (options.library && isValidExternalsType(options.library.type) - ? /** @type {ExternalsType} */ (options.library.type) - : "script"); - if ( - library && - !compiler.options.output.enabledLibraryTypes.includes(library.type) - ) { - compiler.options.output.enabledLibraryTypes.push(library.type); - } - compiler.hooks.afterPlugins.tap("ModuleFederationPlugin", () => { - if ( - options.exposes && - (Array.isArray(options.exposes) - ? options.exposes.length > 0 - : Object.keys(options.exposes).length > 0) - ) { - new ContainerPlugin({ - name: options.name, - library, - filename: options.filename, - runtime: options.runtime, - shareScope: options.shareScope, - exposes: options.exposes - }).apply(compiler); - } - if ( - options.remotes && - (Array.isArray(options.remotes) - ? options.remotes.length > 0 - : Object.keys(options.remotes).length > 0) - ) { - new ContainerReferencePlugin({ - remoteType, - shareScope: options.shareScope, - remotes: options.remotes - }).apply(compiler); - } - if (options.shared) { - new SharePlugin({ - shared: options.shared, - shareScope: options.shareScope - }).apply(compiler); - } - }); - } -} - -module.exports = ModuleFederationPlugin; - - -/***/ }), - -/***/ 40452: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const FallbackDependency = __webpack_require__(65917); -const RemoteToExternalDependency = __webpack_require__(21290); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["remote", "share-init"]); -const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); - -class RemoteModule extends Module { - /** - * @param {string} request request string - * @param {string[]} externalRequests list of external requests to containers - * @param {string} internalRequest name of exposed module in container - * @param {string} shareScope the used share scope name - */ - constructor(request, externalRequests, internalRequest, shareScope) { - super("remote-module"); - this.request = request; - this.externalRequests = externalRequests; - this.internalRequest = internalRequest; - this.shareScope = shareScope; - this._identifier = `remote (${shareScope}) ${this.externalRequests.join( - " " - )} ${this.internalRequest}`; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this._identifier; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `remote ${this.request}`; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return `${this.layer ? `(${this.layer})/` : ""}webpack/container/remote/${ - this.request - }`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback(null, !this.buildInfo); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - strict: true - }; - - this.clearDependenciesAndBlocks(); - if (this.externalRequests.length === 1) { - this.addDependency( - new RemoteToExternalDependency(this.externalRequests[0]) - ); - } else { - this.addDependency(new FallbackDependency(this.externalRequests)); - } - - callback(); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 6; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) - */ - nameForCondition() { - return this.request; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { - const module = moduleGraph.getModule(this.dependencies[0]); - const id = module && chunkGraph.getModuleId(module); - const sources = new Map(); - sources.set("remote", new RawSource("")); - const data = new Map(); - data.set("share-init", [ - { - shareScope: this.shareScope, - initStage: 20, - init: id === undefined ? "" : `initExternal(${JSON.stringify(id)});` - } - ]); - return { sources, data, runtimeRequirements: RUNTIME_REQUIREMENTS }; - } - - serialize(context) { - const { write } = context; - write(this.request); - write(this.externalRequests); - write(this.internalRequest); - write(this.shareScope); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new RemoteModule(read(), read(), read(), read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable(RemoteModule, "webpack/lib/container/RemoteModule"); - -module.exports = RemoteModule; - - -/***/ }), - -/***/ 36296: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("./RemoteModule")} RemoteModule */ - -class RemoteRuntimeModule extends RuntimeModule { - constructor() { - super("remotes loading"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunkGraph } = this; - const { runtimeTemplate, moduleGraph } = compilation; - const chunkToRemotesMapping = {}; - const idToExternalAndNameMapping = {}; - for (const chunk of this.chunk.getAllAsyncChunks()) { - const modules = chunkGraph.getChunkModulesIterableBySourceType( - chunk, - "remote" - ); - if (!modules) continue; - const remotes = (chunkToRemotesMapping[chunk.id] = []); - for (const m of modules) { - const module = /** @type {RemoteModule} */ (m); - const name = module.internalRequest; - const id = chunkGraph.getModuleId(module); - const shareScope = module.shareScope; - const dep = module.dependencies[0]; - const externalModule = moduleGraph.getModule(dep); - const externalModuleId = - externalModule && chunkGraph.getModuleId(externalModule); - remotes.push(id); - idToExternalAndNameMapping[id] = [shareScope, name, externalModuleId]; - } - } - return Template.asString([ - `var chunkMapping = ${JSON.stringify( - chunkToRemotesMapping, - null, - "\t" - )};`, - `var idToExternalAndNameMapping = ${JSON.stringify( - idToExternalAndNameMapping, - null, - "\t" - )};`, - `${ - RuntimeGlobals.ensureChunkHandlers - }.remotes = ${runtimeTemplate.basicFunction("chunkId, promises", [ - `if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`, - Template.indent([ - `chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction("id", [ - `var getScope = ${RuntimeGlobals.currentRemoteGetScope};`, - "if(!getScope) getScope = [];", - "var data = idToExternalAndNameMapping[id];", - "if(getScope.indexOf(data) >= 0) return;", - "getScope.push(data);", - `if(data.p) return promises.push(data.p);`, - `var onError = ${runtimeTemplate.basicFunction("error", [ - 'if(!error) error = new Error("Container missing");', - 'if(typeof error.message === "string")', - Template.indent( - `error.message += '\\nwhile loading "' + data[1] + '" from ' + data[2];` - ), - `${ - RuntimeGlobals.moduleFactories - }[id] = ${runtimeTemplate.basicFunction("", ["throw error;"])}`, - "data.p = 0;" - ])};`, - `var handleFunction = ${runtimeTemplate.basicFunction( - "fn, arg1, arg2, d, next, first", - [ - "try {", - Template.indent([ - "var promise = fn(arg1, arg2);", - "if(promise && promise.then) {", - Template.indent([ - `var p = promise.then(${runtimeTemplate.returningFunction( - "next(result, d)", - "result" - )}, onError);`, - `if(first) promises.push(data.p = p); else return p;` - ]), - "} else {", - Template.indent(["return next(promise, d, first);"]), - "}" - ]), - "} catch(error) {", - Template.indent(["onError(error);"]), - "}" - ] - )}`, - `var onExternal = ${runtimeTemplate.returningFunction( - `external ? handleFunction(${RuntimeGlobals.initializeSharing}, data[0], 0, external, onInitialized, first) : onError()`, - "external, _, first" - )};`, - `var onInitialized = ${runtimeTemplate.returningFunction( - `handleFunction(external.get, data[1], getScope, 0, onFactory, first)`, - "_, external, first" - )};`, - `var onFactory = ${runtimeTemplate.basicFunction("factory", [ - "data.p = 1;", - `${ - RuntimeGlobals.moduleFactories - }[id] = ${runtimeTemplate.basicFunction("module", [ - "module.exports = factory();" - ])}` - ])};`, - "handleFunction(__webpack_require__, data[2], 0, 0, onExternal, 1);" - ])});` - ]), - "}" - ])}` - ]); - } -} - -module.exports = RemoteRuntimeModule; - - -/***/ }), - -/***/ 21290: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); -const makeSerializable = __webpack_require__(65764); - -class RemoteToExternalDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "remote to external"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - RemoteToExternalDependency, - "webpack/lib/container/RemoteToExternalDependency" -); - -module.exports = RemoteToExternalDependency; - - -/***/ }), - -/***/ 58491: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @template T @typedef {(string | Record)[] | Record} ContainerOptionsFormat */ - -/** - * @template T - * @template N - * @param {ContainerOptionsFormat} options options passed by the user - * @param {function(string | string[], string) : N} normalizeSimple normalize a simple item - * @param {function(T, string) : N} normalizeOptions normalize a complex item - * @param {function(string, N): void} fn processing function - * @returns {void} - */ -const process = (options, normalizeSimple, normalizeOptions, fn) => { - const array = items => { - for (const item of items) { - if (typeof item === "string") { - fn(item, normalizeSimple(item, item)); - } else if (item && typeof item === "object") { - object(item); - } else { - throw new Error("Unexpected options format"); - } - } - }; - const object = obj => { - for (const [key, value] of Object.entries(obj)) { - if (typeof value === "string" || Array.isArray(value)) { - fn(key, normalizeSimple(value, key)); - } else { - fn(key, normalizeOptions(value, key)); - } - } - }; - if (!options) { - return; - } else if (Array.isArray(options)) { - array(options); - } else if (typeof options === "object") { - object(options); - } else { - throw new Error("Unexpected options format"); - } -}; - -/** - * @template T - * @template R - * @param {ContainerOptionsFormat} options options passed by the user - * @param {function(string | string[], string) : R} normalizeSimple normalize a simple item - * @param {function(T, string) : R} normalizeOptions normalize a complex item - * @returns {[string, R][]} parsed options - */ -const parseOptions = (options, normalizeSimple, normalizeOptions) => { - /** @type {[string, R][]} */ - const items = []; - process(options, normalizeSimple, normalizeOptions, (key, value) => { - items.push([key, value]); - }); - return items; -}; - -/** - * @template T - * @param {string} scope scope name - * @param {ContainerOptionsFormat} options options passed by the user - * @returns {Record} options to spread or pass - */ -const scope = (scope, options) => { - /** @type {Record} */ - const obj = {}; - process( - options, - item => /** @type {string | string[] | T} */ (item), - item => /** @type {string | string[] | T} */ (item), - (key, value) => { - obj[ - key.startsWith("./") ? `${scope}${key.slice(1)}` : `${scope}/${key}` - ] = value; - } - ); - return obj; -}; - -exports.parseOptions = parseOptions; -exports.scope = scope; - - -/***/ }), - -/***/ 73841: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const { ReplaceSource, RawSource, ConcatSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const Generator = __webpack_require__(97152); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../util/Hash")} Hash */ - -const TYPES = new Set(["javascript"]); - -class CssExportsGenerator extends Generator { - constructor() { - super(); - } - - // TODO add getConcatenationBailoutReason to allow concatenation - // but how to make it have a module id - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const source = new ReplaceSource(new RawSource("")); - const initFragments = []; - const cssExports = new Map(); - - generateContext.runtimeRequirements.add(RuntimeGlobals.module); - - const runtimeRequirements = new Set(); - - const templateContext = { - runtimeTemplate: generateContext.runtimeTemplate, - dependencyTemplates: generateContext.dependencyTemplates, - moduleGraph: generateContext.moduleGraph, - chunkGraph: generateContext.chunkGraph, - module, - runtime: generateContext.runtime, - runtimeRequirements: runtimeRequirements, - concatenationScope: generateContext.concatenationScope, - codeGenerationResults: generateContext.codeGenerationResults, - initFragments, - cssExports - }; - - const handleDependency = dependency => { - const constructor = /** @type {new (...args: any[]) => Dependency} */ ( - dependency.constructor - ); - const template = generateContext.dependencyTemplates.get(constructor); - if (!template) { - throw new Error( - "No template for dependency: " + dependency.constructor.name - ); - } - - template.apply(dependency, source, templateContext); - }; - module.dependencies.forEach(handleDependency); - - if (generateContext.concatenationScope) { - const source = new ConcatSource(); - const usedIdentifiers = new Set(); - for (const [k, v] of cssExports) { - let identifier = Template.toIdentifier(k); - let i = 0; - while (usedIdentifiers.has(identifier)) { - identifier = Template.toIdentifier(k + i); - } - usedIdentifiers.add(identifier); - generateContext.concatenationScope.registerExport(k, identifier); - source.add( - `${ - generateContext.runtimeTemplate.supportsConst ? "const" : "var" - } ${identifier} = ${JSON.stringify(v)};\n` - ); - } - return source; - } else { - const otherUsed = - generateContext.moduleGraph - .getExportsInfo(module) - .otherExportsInfo.getUsed(generateContext.runtime) !== - UsageState.Unused; - if (otherUsed) { - generateContext.runtimeRequirements.add( - RuntimeGlobals.makeNamespaceObject - ); - } - return new RawSource( - `${otherUsed ? `${RuntimeGlobals.makeNamespaceObject}(` : ""}${ - module.moduleArgument - }.exports = {\n${Array.from( - cssExports, - ([k, v]) => `\t${JSON.stringify(k)}: ${JSON.stringify(v)}` - ).join(",\n")}\n}${otherUsed ? ")" : ""};` - ); - } - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - return 42; - } - - /** - * @param {Hash} hash hash that will be modified - * @param {UpdateHashContext} updateHashContext context for updating hash - */ - updateHash(hash, { module }) {} -} - -module.exports = CssExportsGenerator; - - -/***/ }), - -/***/ 46559: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const { ReplaceSource } = __webpack_require__(51255); -const Generator = __webpack_require__(97152); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../util/Hash")} Hash */ - -const TYPES = new Set(["css"]); - -class CssGenerator extends Generator { - constructor() { - super(); - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const originalSource = module.originalSource(); - const source = new ReplaceSource(originalSource); - const initFragments = []; - const cssExports = new Map(); - - generateContext.runtimeRequirements.add(RuntimeGlobals.hasCssModules); - - const templateContext = { - runtimeTemplate: generateContext.runtimeTemplate, - dependencyTemplates: generateContext.dependencyTemplates, - moduleGraph: generateContext.moduleGraph, - chunkGraph: generateContext.chunkGraph, - module, - runtime: generateContext.runtime, - runtimeRequirements: generateContext.runtimeRequirements, - concatenationScope: generateContext.concatenationScope, - codeGenerationResults: generateContext.codeGenerationResults, - initFragments, - cssExports - }; - - const handleDependency = dependency => { - const constructor = /** @type {new (...args: any[]) => Dependency} */ ( - dependency.constructor - ); - const template = generateContext.dependencyTemplates.get(constructor); - if (!template) { - throw new Error( - "No template for dependency: " + dependency.constructor.name - ); - } - - template.apply(dependency, source, templateContext); - }; - module.dependencies.forEach(handleDependency); - if (module.presentationalDependencies !== undefined) - module.presentationalDependencies.forEach(handleDependency); - - if (cssExports.size > 0) { - const data = generateContext.getData(); - data.set("css-exports", cssExports); - } - - return InitFragment.addToSource(source, initFragments, generateContext); - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const originalSource = module.originalSource(); - - if (!originalSource) { - return 0; - } - - return originalSource.size(); - } - - /** - * @param {Hash} hash hash that will be modified - * @param {UpdateHashContext} updateHashContext context for updating hash - */ - updateHash(hash, { module }) {} -} - -module.exports = CssGenerator; - - -/***/ }), - -/***/ 58013: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const compileBooleanMatcher = __webpack_require__(73897); -const { chunkHasCss } = __webpack_require__(39693); - -/** @typedef {import("../Chunk")} Chunk */ - -/** - * @typedef {Object} JsonpCompilationPluginHooks - * @property {SyncWaterfallHook<[string, Chunk]>} createStylesheet - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class CssLoadingRuntimeModule extends RuntimeModule { - /** - * @param {Compilation} compilation the compilation - * @returns {JsonpCompilationPluginHooks} hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - createStylesheet: new SyncWaterfallHook(["source", "chunk"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor(runtimeRequirements, runtimeOptions) { - super("css loading", 10); - - this._runtimeRequirements = runtimeRequirements; - this.runtimeOptions = runtimeOptions; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunk, _runtimeRequirements } = this; - const { - chunkGraph, - runtimeTemplate, - outputOptions: { - crossOriginLoading, - uniqueName, - chunkLoadTimeout: loadTimeout - } - } = compilation; - const fn = RuntimeGlobals.ensureChunkHandlers; - const conditionMap = chunkGraph.getChunkConditionMap( - chunk, - (chunk, chunkGraph) => - !!chunkGraph.getChunkModulesIterableBySourceType(chunk, "css") - ); - const hasCssMatcher = compileBooleanMatcher(conditionMap); - - const withLoading = - _runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers) && - hasCssMatcher !== false; - const withHmr = _runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const initialChunkIdsWithCss = new Set(); - const initialChunkIdsWithoutCss = new Set(); - for (const c of chunk.getAllInitialChunks()) { - (chunkHasCss(c, chunkGraph) - ? initialChunkIdsWithCss - : initialChunkIdsWithoutCss - ).add(c.id); - } - - if (!withLoading && !withHmr && initialChunkIdsWithCss.size === 0) { - return null; - } - - const { createStylesheet } = - CssLoadingRuntimeModule.getCompilationHooks(compilation); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_css` - : undefined; - - const code = Template.asString([ - "link = document.createElement('link');", - uniqueName - ? 'link.setAttribute("data-webpack", uniqueName + ":" + key);' - : "", - "link.setAttribute(loadingAttribute, 1);", - 'link.rel = "stylesheet";', - "link.href = url;", - crossOriginLoading - ? crossOriginLoading === "use-credentials" - ? 'link.crossOrigin = "use-credentials";' - : Template.asString([ - "if (link.src.indexOf(window.location.origin + '/') !== 0) {", - Template.indent( - `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` - ), - "}" - ]) - : "" - ]); - - const cc = str => str.charCodeAt(0); - - return Template.asString([ - "// object to store loaded and loading chunks", - "// undefined = chunk not loaded, null = chunk preloaded/prefetched", - "// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded", - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{${Array.from( - initialChunkIdsWithoutCss, - id => `${JSON.stringify(id)}:0` - ).join(",")}};`, - "", - uniqueName - ? `var uniqueName = ${JSON.stringify( - runtimeTemplate.outputOptions.uniqueName - )};` - : "// data-webpack is not used as build has no uniqueName", - `var loadCssChunkData = ${runtimeTemplate.basicFunction( - "target, link, chunkId", - [ - `var data, token = "", token2, exports = {}, exportsWithId = [], exportsWithDashes = [], ${ - withHmr ? "moduleIds = [], " : "" - }i = 0, cc = 1;`, - "try { if(!link) link = loadStylesheet(chunkId); data = link.sheet.cssRules; data = data[data.length - 1].style; } catch(e) { data = getComputedStyle(document.head); }", - `data = data.getPropertyValue(${ - uniqueName - ? runtimeTemplate.concatenation( - "--webpack-", - { expr: "uniqueName" }, - "-", - { expr: "chunkId" } - ) - : runtimeTemplate.concatenation("--webpack-", { expr: "chunkId" }) - });`, - "if(!data) return [];", - "for(; cc; i++) {", - Template.indent([ - "cc = data.charCodeAt(i);", - `if(cc == ${cc("(")}) { token2 = token; token = ""; }`, - `else if(cc == ${cc( - ")" - )}) { exports[token2.replace(/^_/, "")] = token.replace(/^_/, ""); token = ""; }`, - `else if(cc == ${cc("/")} || cc == ${cc( - "%" - )}) { token = token.replace(/^_/, ""); exports[token] = token; exportsWithId.push(token); if(cc == ${cc( - "%" - )}) exportsWithDashes.push(token); token = ""; }`, - `else if(!cc || cc == ${cc( - "," - )}) { token = token.replace(/^_/, ""); exportsWithId.forEach(${runtimeTemplate.expressionFunction( - `exports[x] = ${ - uniqueName - ? runtimeTemplate.concatenation( - { expr: "uniqueName" }, - "-", - { expr: "token" }, - "-", - { expr: "exports[x]" } - ) - : runtimeTemplate.concatenation({ expr: "token" }, "-", { - expr: "exports[x]" - }) - }`, - "x" - )}); exportsWithDashes.forEach(${runtimeTemplate.expressionFunction( - `exports[x] = "--" + exports[x]`, - "x" - )}); ${ - RuntimeGlobals.makeNamespaceObject - }(exports); target[token] = (${runtimeTemplate.basicFunction( - "exports, module", - `module.exports = exports;` - )}).bind(null, exports); ${ - withHmr ? "moduleIds.push(token); " : "" - }token = ""; exports = {}; exportsWithId.length = 0; }`, - `else if(cc == ${cc("\\")}) { token += data[++i] }`, - `else { token += data[i]; }` - ]), - "}", - `${ - withHmr ? `if(target == ${RuntimeGlobals.moduleFactories}) ` : "" - }installedChunks[chunkId] = 0;`, - withHmr ? "return moduleIds;" : "" - ] - )}`, - 'var loadingAttribute = "data-webpack-loading";', - `var loadStylesheet = ${runtimeTemplate.basicFunction( - "chunkId, url, done" + (withHmr ? ", hmr" : ""), - [ - 'var link, needAttach, key = "chunk-" + chunkId;', - withHmr ? "if(!hmr) {" : "", - 'var links = document.getElementsByTagName("link");', - "for(var i = 0; i < links.length; i++) {", - Template.indent([ - "var l = links[i];", - `if(l.rel == "stylesheet" && (${ - withHmr - ? 'l.href.startsWith(url) || l.getAttribute("href").startsWith(url)' - : 'l.href == url || l.getAttribute("href") == url' - }${ - uniqueName - ? ' || l.getAttribute("data-webpack") == uniqueName + ":" + key' - : "" - })) { link = l; break; }` - ]), - "}", - "if(!done) return link;", - withHmr ? "}" : "", - "if(!link) {", - Template.indent([ - "needAttach = true;", - createStylesheet.call(code, this.chunk) - ]), - "}", - `var onLinkComplete = ${runtimeTemplate.basicFunction( - "prev, event", - Template.asString([ - "link.onerror = link.onload = null;", - "link.removeAttribute(loadingAttribute);", - "clearTimeout(timeout);", - 'if(event && event.type != "load") link.parentNode.removeChild(link)', - "done(event);", - "if(prev) return prev(event);" - ]) - )};`, - "if(link.getAttribute(loadingAttribute)) {", - Template.indent([ - `var timeout = setTimeout(onLinkComplete.bind(null, undefined, { type: 'timeout', target: link }), ${loadTimeout});`, - "link.onerror = onLinkComplete.bind(null, link.onerror);", - "link.onload = onLinkComplete.bind(null, link.onload);" - ]), - "} else onLinkComplete(undefined, { type: 'load', target: link });", // We assume any existing stylesheet is render blocking - withHmr ? "hmr ? document.head.insertBefore(link, hmr) :" : "", - "needAttach && document.head.appendChild(link);", - "return link;" - ] - )};`, - initialChunkIdsWithCss.size > 2 - ? `${JSON.stringify( - Array.from(initialChunkIdsWithCss) - )}.forEach(loadCssChunkData.bind(null, ${ - RuntimeGlobals.moduleFactories - }, 0));` - : initialChunkIdsWithCss.size > 0 - ? `${Array.from( - initialChunkIdsWithCss, - id => - `loadCssChunkData(${ - RuntimeGlobals.moduleFactories - }, 0, ${JSON.stringify(id)});` - ).join("")}` - : "// no initial css", - "", - withLoading - ? Template.asString([ - `${fn}.css = ${runtimeTemplate.basicFunction("chunkId, promises", [ - "// css chunk loading", - `var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`, - 'if(installedChunkData !== 0) { // 0 means "already installed".', - Template.indent([ - "", - '// a Promise means "currently loading".', - "if(installedChunkData) {", - Template.indent(["promises.push(installedChunkData[2]);"]), - "} else {", - Template.indent([ - hasCssMatcher === true - ? "if(true) { // all chunks have CSS" - : `if(${hasCssMatcher("chunkId")}) {`, - Template.indent([ - "// setup Promise in chunk cache", - `var promise = new Promise(${runtimeTemplate.expressionFunction( - `installedChunkData = installedChunks[chunkId] = [resolve, reject]`, - "resolve, reject" - )});`, - "promises.push(installedChunkData[2] = promise);", - "", - "// start chunk loading", - `var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkCssFilename}(chunkId);`, - "// create error before stack unwound to get useful stacktrace later", - "var error = new Error();", - `var loadingEnded = ${runtimeTemplate.basicFunction( - "event", - [ - `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId)) {`, - Template.indent([ - "installedChunkData = installedChunks[chunkId];", - "if(installedChunkData !== 0) installedChunks[chunkId] = undefined;", - "if(installedChunkData) {", - Template.indent([ - 'if(event.type !== "load") {', - Template.indent([ - "var errorType = event && event.type;", - "var realSrc = event && event.target && event.target.src;", - "error.message = 'Loading css chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", - "error.name = 'ChunkLoadError';", - "error.type = errorType;", - "error.request = realSrc;", - "installedChunkData[1](error);" - ]), - "} else {", - Template.indent([ - `loadCssChunkData(${RuntimeGlobals.moduleFactories}, link, chunkId);`, - "installedChunkData[0]();" - ]), - "}" - ]), - "}" - ]), - "}" - ] - )};`, - "var link = loadStylesheet(chunkId, url, loadingEnded);" - ]), - "} else installedChunks[chunkId] = 0;" - ]), - "}" - ]), - "}" - ])};` - ]) - : "// no chunk loading", - "", - withHmr - ? Template.asString([ - "var oldTags = [];", - "var newTags = [];", - `var applyHandler = ${runtimeTemplate.basicFunction("options", [ - `return { dispose: ${runtimeTemplate.basicFunction( - "", - [] - )}, apply: ${runtimeTemplate.basicFunction("", [ - "var moduleIds = [];", - `newTags.forEach(${runtimeTemplate.expressionFunction( - "info[1].sheet.disabled = false", - "info" - )});`, - "while(oldTags.length) {", - Template.indent([ - "var oldTag = oldTags.pop();", - "if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);" - ]), - "}", - "while(newTags.length) {", - Template.indent([ - `var info = newTags.pop();`, - `var chunkModuleIds = loadCssChunkData(${RuntimeGlobals.moduleFactories}, info[1], info[0]);`, - `chunkModuleIds.forEach(${runtimeTemplate.expressionFunction( - "moduleIds.push(id)", - "id" - )});` - ]), - "}", - "return moduleIds;" - ])} };` - ])}`, - `var cssTextKey = ${runtimeTemplate.returningFunction( - `Array.from(link.sheet.cssRules, ${runtimeTemplate.returningFunction( - "r.cssText", - "r" - )}).join()`, - "link" - )}`, - `${ - RuntimeGlobals.hmrDownloadUpdateHandlers - }.css = ${runtimeTemplate.basicFunction( - "chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList", - [ - "applyHandlers.push(applyHandler);", - `chunkIds.forEach(${runtimeTemplate.basicFunction("chunkId", [ - `var filename = ${RuntimeGlobals.getChunkCssFilename}(chunkId);`, - `var url = ${RuntimeGlobals.publicPath} + filename;`, - "var oldTag = loadStylesheet(chunkId, url);", - "if(!oldTag) return;", - `promises.push(new Promise(${runtimeTemplate.basicFunction( - "resolve, reject", - [ - `var link = loadStylesheet(chunkId, url + (url.indexOf("?") < 0 ? "?" : "&") + "hmr=" + Date.now(), ${runtimeTemplate.basicFunction( - "event", - [ - 'if(event.type !== "load") {', - Template.indent([ - "var errorType = event && event.type;", - "var realSrc = event && event.target && event.target.src;", - "error.message = 'Loading css hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", - "error.name = 'ChunkLoadError';", - "error.type = errorType;", - "error.request = realSrc;", - "reject(error);" - ]), - "} else {", - Template.indent([ - "try { if(cssTextKey(oldTag) == cssTextKey(link)) { if(link.parentNode) link.parentNode.removeChild(link); return resolve(); } } catch(e) {}", - "var factories = {};", - "loadCssChunkData(factories, link, chunkId);", - `Object.keys(factories).forEach(${runtimeTemplate.expressionFunction( - "updatedModulesList.push(id)", - "id" - )})`, - "link.sheet.disabled = true;", - "oldTags.push(oldTag);", - "newTags.push([chunkId, link]);", - "resolve();" - ]), - "}" - ] - )}, oldTag);` - ] - )}));` - ])});` - ] - )}` - ]) - : "// no hmr" - ]); - } -} - -module.exports = CssLoadingRuntimeModule; - - -/***/ }), - -/***/ 39693: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const HotUpdateChunk = __webpack_require__(23834); -const RuntimeGlobals = __webpack_require__(39201); -const SelfModuleFactory = __webpack_require__(75193); -const CssExportDependency = __webpack_require__(12778); -const CssImportDependency = __webpack_require__(2951); -const CssLocalIdentifierDependency = __webpack_require__(75689); -const CssSelfLocalIdentifierDependency = __webpack_require__(24769); -const CssUrlDependency = __webpack_require__(75178); -const StaticExportsDependency = __webpack_require__(19383); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const createHash = __webpack_require__(85205); -const memoize = __webpack_require__(61374); -const nonNumericOnlyHash = __webpack_require__(46849); -const CssExportsGenerator = __webpack_require__(73841); -const CssGenerator = __webpack_require__(46559); -const CssParser = __webpack_require__(43522); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").CssExperimentOptions} CssExperimentOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -const getCssLoadingRuntimeModule = memoize(() => - __webpack_require__(58013) -); - -const getSchema = name => { - const { definitions } = __webpack_require__(13954); - return { - definitions, - oneOf: [{ $ref: `#/definitions/${name}` }] - }; -}; - -const validateGeneratorOptions = createSchemaValidation( - __webpack_require__(30035), - () => getSchema("CssGeneratorOptions"), - { - name: "Css Modules Plugin", - baseDataPath: "parser" - } -); -const validateParserOptions = createSchemaValidation( - __webpack_require__(33694), - () => getSchema("CssParserOptions"), - { - name: "Css Modules Plugin", - baseDataPath: "parser" - } -); - -const escapeCss = (str, omitOptionalUnderscore) => { - const escaped = `${str}`.replace( - // cspell:word uffff - /[^a-zA-Z0-9_\u0081-\uffff-]/g, - s => `\\${s}` - ); - return !omitOptionalUnderscore && /^(?!--)[0-9_-]/.test(escaped) - ? `_${escaped}` - : escaped; -}; - -const plugin = "CssModulesPlugin"; - -class CssModulesPlugin { - /** - * @param {CssExperimentOptions} options options - */ - constructor({ exportsOnly = false }) { - this._exportsOnly = exportsOnly; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - plugin, - (compilation, { normalModuleFactory }) => { - const selfFactory = new SelfModuleFactory(compilation.moduleGraph); - compilation.dependencyFactories.set( - CssUrlDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - CssUrlDependency, - new CssUrlDependency.Template() - ); - compilation.dependencyTemplates.set( - CssLocalIdentifierDependency, - new CssLocalIdentifierDependency.Template() - ); - compilation.dependencyFactories.set( - CssSelfLocalIdentifierDependency, - selfFactory - ); - compilation.dependencyTemplates.set( - CssSelfLocalIdentifierDependency, - new CssSelfLocalIdentifierDependency.Template() - ); - compilation.dependencyTemplates.set( - CssExportDependency, - new CssExportDependency.Template() - ); - compilation.dependencyFactories.set( - CssImportDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - CssImportDependency, - new CssImportDependency.Template() - ); - compilation.dependencyTemplates.set( - StaticExportsDependency, - new StaticExportsDependency.Template() - ); - normalModuleFactory.hooks.createParser - .for("css") - .tap(plugin, parserOptions => { - validateParserOptions(parserOptions); - return new CssParser(); - }); - normalModuleFactory.hooks.createParser - .for("css/global") - .tap(plugin, parserOptions => { - validateParserOptions(parserOptions); - return new CssParser({ - allowPseudoBlocks: false, - allowModeSwitch: false - }); - }); - normalModuleFactory.hooks.createParser - .for("css/module") - .tap(plugin, parserOptions => { - validateParserOptions(parserOptions); - return new CssParser({ - defaultMode: "local" - }); - }); - normalModuleFactory.hooks.createGenerator - .for("css") - .tap(plugin, generatorOptions => { - validateGeneratorOptions(generatorOptions); - return this._exportsOnly - ? new CssExportsGenerator() - : new CssGenerator(); - }); - normalModuleFactory.hooks.createGenerator - .for("css/global") - .tap(plugin, generatorOptions => { - validateGeneratorOptions(generatorOptions); - return this._exportsOnly - ? new CssExportsGenerator() - : new CssGenerator(); - }); - normalModuleFactory.hooks.createGenerator - .for("css/module") - .tap(plugin, generatorOptions => { - validateGeneratorOptions(generatorOptions); - return this._exportsOnly - ? new CssExportsGenerator() - : new CssGenerator(); - }); - const orderedCssModulesPerChunk = new WeakMap(); - compilation.hooks.afterCodeGeneration.tap("CssModulesPlugin", () => { - const { chunkGraph } = compilation; - for (const chunk of compilation.chunks) { - if (CssModulesPlugin.chunkHasCss(chunk, chunkGraph)) { - orderedCssModulesPerChunk.set( - chunk, - this.getOrderedChunkCssModules(chunk, chunkGraph, compilation) - ); - } - } - }); - compilation.hooks.contentHash.tap("CssModulesPlugin", chunk => { - const { - chunkGraph, - outputOptions: { - hashSalt, - hashDigest, - hashDigestLength, - hashFunction - } - } = compilation; - const modules = orderedCssModulesPerChunk.get(chunk); - if (modules === undefined) return; - const hash = createHash(hashFunction); - if (hashSalt) hash.update(hashSalt); - for (const module of modules) { - hash.update(chunkGraph.getModuleHash(module, chunk.runtime)); - } - const digest = /** @type {string} */ (hash.digest(hashDigest)); - chunk.contentHash.css = nonNumericOnlyHash(digest, hashDigestLength); - }); - compilation.hooks.renderManifest.tap(plugin, (result, options) => { - const { chunkGraph } = compilation; - const { hash, chunk, codeGenerationResults } = options; - - if (chunk instanceof HotUpdateChunk) return result; - - const modules = orderedCssModulesPerChunk.get(chunk); - if (modules !== undefined) { - result.push({ - render: () => - this.renderChunk({ - chunk, - chunkGraph, - codeGenerationResults, - uniqueName: compilation.outputOptions.uniqueName, - modules - }), - filenameTemplate: CssModulesPlugin.getChunkFilenameTemplate( - chunk, - compilation.outputOptions - ), - pathOptions: { - hash, - runtime: chunk.runtime, - chunk, - contentHashType: "css" - }, - identifier: `css${chunk.id}`, - hash: chunk.contentHash.css - }); - } - return result; - }); - const enabledChunks = new WeakSet(); - const handler = (chunk, set) => { - if (enabledChunks.has(chunk)) { - return; - } - enabledChunks.add(chunk); - - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.getChunkCssFilename); - set.add(RuntimeGlobals.hasOwnProperty); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.makeNamespaceObject); - - const CssLoadingRuntimeModule = getCssLoadingRuntimeModule(); - compilation.addRuntimeModule(chunk, new CssLoadingRuntimeModule(set)); - }; - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hasCssModules) - .tap(plugin, handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap(plugin, handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap(plugin, handler); - } - ); - } - - getModulesInOrder(chunk, modules, compilation) { - if (!modules) return []; - - const modulesList = [...modules]; - - // Get ordered list of modules per chunk group - // Lists are in reverse order to allow to use Array.pop() - const modulesByChunkGroup = Array.from(chunk.groupsIterable, chunkGroup => { - const sortedModules = modulesList - .map(module => { - return { - module, - index: chunkGroup.getModulePostOrderIndex(module) - }; - }) - .filter(item => item.index !== undefined) - .sort((a, b) => b.index - a.index) - .map(item => item.module); - - return { list: sortedModules, set: new Set(sortedModules) }; - }); - - if (modulesByChunkGroup.length === 1) - return modulesByChunkGroup[0].list.reverse(); - - const compareModuleLists = ({ list: a }, { list: b }) => { - if (a.length === 0) { - return b.length === 0 ? 0 : 1; - } else { - if (b.length === 0) return -1; - return compareModulesByIdentifier(a[a.length - 1], b[b.length - 1]); - } - }; - - modulesByChunkGroup.sort(compareModuleLists); - - const finalModules = []; - - for (;;) { - const failedModules = new Set(); - const list = modulesByChunkGroup[0].list; - if (list.length === 0) { - // done, everything empty - break; - } - let selectedModule = list[list.length - 1]; - let hasFailed = undefined; - outer: for (;;) { - for (const { list, set } of modulesByChunkGroup) { - if (list.length === 0) continue; - const lastModule = list[list.length - 1]; - if (lastModule === selectedModule) continue; - if (!set.has(selectedModule)) continue; - failedModules.add(selectedModule); - if (failedModules.has(lastModule)) { - // There is a conflict, try other alternatives - hasFailed = lastModule; - continue; - } - selectedModule = lastModule; - hasFailed = false; - continue outer; // restart - } - break; - } - if (hasFailed) { - // There is a not resolve-able conflict with the selectedModule - if (compilation) { - // TODO print better warning - compilation.warnings.push( - new Error( - `chunk ${ - chunk.name || chunk.id - }\nConflicting order between ${hasFailed.readableIdentifier( - compilation.requestShortener - )} and ${selectedModule.readableIdentifier( - compilation.requestShortener - )}` - ) - ); - } - selectedModule = hasFailed; - } - // Insert the selected module into the final modules list - finalModules.push(selectedModule); - // Remove the selected module from all lists - for (const { list, set } of modulesByChunkGroup) { - const lastModule = list[list.length - 1]; - if (lastModule === selectedModule) list.pop(); - else if (hasFailed && set.has(selectedModule)) { - const idx = list.indexOf(selectedModule); - if (idx >= 0) list.splice(idx, 1); - } - } - modulesByChunkGroup.sort(compareModuleLists); - } - return finalModules; - } - - getOrderedChunkCssModules(chunk, chunkGraph, compilation) { - return [ - ...this.getModulesInOrder( - chunk, - chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "css-import", - compareModulesByIdentifier - ), - compilation - ), - ...this.getModulesInOrder( - chunk, - chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "css", - compareModulesByIdentifier - ), - compilation - ) - ]; - } - - renderChunk({ - uniqueName, - chunk, - chunkGraph, - codeGenerationResults, - modules - }) { - const source = new ConcatSource(); - const metaData = []; - for (const module of modules) { - try { - const codeGenResult = codeGenerationResults.get(module, chunk.runtime); - - const s = - codeGenResult.sources.get("css") || - codeGenResult.sources.get("css-import"); - if (s) { - source.add(s); - source.add("\n"); - } - const exports = - codeGenResult.data && codeGenResult.data.get("css-exports"); - const moduleId = chunkGraph.getModuleId(module) + ""; - metaData.push( - `${ - exports - ? Array.from(exports, ([n, v]) => { - const shortcutValue = `${ - uniqueName ? uniqueName + "-" : "" - }${moduleId}-${n}`; - return v === shortcutValue - ? `${escapeCss(n)}/` - : v === "--" + shortcutValue - ? `${escapeCss(n)}%` - : `${escapeCss(n)}(${escapeCss(v)})`; - }).join("") - : "" - }${escapeCss(moduleId)}` - ); - } catch (e) { - e.message += `\nduring rendering of css ${module.identifier()}`; - throw e; - } - } - source.add( - `head{--webpack-${escapeCss( - (uniqueName ? uniqueName + "-" : "") + chunk.id, - true - )}:${metaData.join(",")};}` - ); - return source; - } - - static getChunkFilenameTemplate(chunk, outputOptions) { - if (chunk.cssFilenameTemplate) { - return chunk.cssFilenameTemplate; - } else if (chunk.canBeInitial()) { - return outputOptions.cssFilename; - } else { - return outputOptions.cssChunkFilename; - } - } - - static chunkHasCss(chunk, chunkGraph) { - return ( - !!chunkGraph.getChunkModulesIterableBySourceType(chunk, "css") || - !!chunkGraph.getChunkModulesIterableBySourceType(chunk, "css-import") - ); - } -} - -module.exports = CssModulesPlugin; - - -/***/ }), - -/***/ 43522: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Parser = __webpack_require__(68646); -const ConstDependency = __webpack_require__(14367); -const CssExportDependency = __webpack_require__(12778); -const CssImportDependency = __webpack_require__(2951); -const CssLocalIdentifierDependency = __webpack_require__(75689); -const CssSelfLocalIdentifierDependency = __webpack_require__(24769); -const CssUrlDependency = __webpack_require__(75178); -const StaticExportsDependency = __webpack_require__(19383); -const walkCssTokens = __webpack_require__(62465); - -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -const CC_LEFT_CURLY = "{".charCodeAt(0); -const CC_RIGHT_CURLY = "}".charCodeAt(0); -const CC_COLON = ":".charCodeAt(0); -const CC_SLASH = "/".charCodeAt(0); -const CC_SEMICOLON = ";".charCodeAt(0); - -const cssUnescape = str => { - return str.replace(/\\([0-9a-fA-F]{1,6}[ \t\n\r\f]?|[\s\S])/g, match => { - if (match.length > 2) { - return String.fromCharCode(parseInt(match.slice(1).trim(), 16)); - } else { - return match[1]; - } - }); -}; - -class LocConverter { - constructor(input) { - this._input = input; - this.line = 1; - this.column = 0; - this.pos = 0; - } - - get(pos) { - if (this.pos !== pos) { - if (this.pos < pos) { - const str = this._input.slice(this.pos, pos); - let i = str.lastIndexOf("\n"); - if (i === -1) { - this.column += str.length; - } else { - this.column = str.length - i - 1; - this.line++; - while (i > 0 && (i = str.lastIndexOf("\n", i - 1)) !== -1) - this.line++; - } - } else { - let i = this._input.lastIndexOf("\n", this.pos); - while (i >= pos) { - this.line--; - i = i > 0 ? this._input.lastIndexOf("\n", i - 1) : -1; - } - this.column = pos - i; - } - this.pos = pos; - } - return this; - } -} - -const CSS_MODE_TOP_LEVEL = 0; -const CSS_MODE_IN_RULE = 1; -const CSS_MODE_IN_LOCAL_RULE = 2; -const CSS_MODE_AT_IMPORT_EXPECT_URL = 3; -// TODO implement layer and supports for @import -const CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS = 4; -const CSS_MODE_AT_IMPORT_EXPECT_MEDIA = 5; -const CSS_MODE_AT_OTHER = 6; - -const explainMode = mode => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: - return "parsing top level css"; - case CSS_MODE_IN_RULE: - return "parsing css rule content (global)"; - case CSS_MODE_IN_LOCAL_RULE: - return "parsing css rule content (local)"; - case CSS_MODE_AT_IMPORT_EXPECT_URL: - return "parsing @import (expecting url)"; - case CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS: - return "parsing @import (expecting optionally supports or media query)"; - case CSS_MODE_AT_IMPORT_EXPECT_MEDIA: - return "parsing @import (expecting optionally media query)"; - case CSS_MODE_AT_OTHER: - return "parsing at-rule"; - default: - return mode; - } -}; - -class CssParser extends Parser { - constructor({ - allowPseudoBlocks = true, - allowModeSwitch = true, - defaultMode = "global" - } = {}) { - super(); - this.allowPseudoBlocks = allowPseudoBlocks; - this.allowModeSwitch = allowModeSwitch; - this.defaultMode = defaultMode; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (Buffer.isBuffer(source)) { - source = source.toString("utf-8"); - } else if (typeof source === "object") { - throw new Error("webpackAst is unexpected for the CssParser"); - } - if (source[0] === "\ufeff") { - source = source.slice(1); - } - - const module = state.module; - - const declaredCssVariables = new Set(); - - const locConverter = new LocConverter(source); - let mode = CSS_MODE_TOP_LEVEL; - let modePos = 0; - let modeNestingLevel = 0; - let modeData = undefined; - let singleClassSelector = undefined; - let lastIdentifier = undefined; - const modeStack = []; - const isTopLevelLocal = () => - modeData === "local" || - (this.defaultMode === "local" && modeData === undefined); - const eatWhiteLine = (input, pos) => { - for (;;) { - const cc = input.charCodeAt(pos); - if (cc === 32 || cc === 9) { - pos++; - continue; - } - if (cc === 10) pos++; - break; - } - return pos; - }; - const eatUntil = chars => { - const charCodes = Array.from({ length: chars.length }, (_, i) => - chars.charCodeAt(i) - ); - const arr = Array.from( - { length: charCodes.reduce((a, b) => Math.max(a, b), 0) + 1 }, - () => false - ); - charCodes.forEach(cc => (arr[cc] = true)); - return (input, pos) => { - for (;;) { - const cc = input.charCodeAt(pos); - if (cc < arr.length && arr[cc]) { - return pos; - } - pos++; - if (pos === input.length) return pos; - } - }; - }; - const eatText = (input, pos, eater) => { - let text = ""; - for (;;) { - if (input.charCodeAt(pos) === CC_SLASH) { - const newPos = walkCssTokens.eatComments(input, pos); - if (pos !== newPos) { - pos = newPos; - if (pos === input.length) break; - } else { - text += "/"; - pos++; - if (pos === input.length) break; - } - } - const newPos = eater(input, pos); - if (pos !== newPos) { - text += input.slice(pos, newPos); - pos = newPos; - } else { - break; - } - if (pos === input.length) break; - } - return [pos, text.trimRight()]; - }; - const eatExportName = eatUntil(":};/"); - const eatExportValue = eatUntil("};/"); - const parseExports = (input, pos) => { - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - const cc = input.charCodeAt(pos); - if (cc !== CC_LEFT_CURLY) - throw new Error( - `Unexpected ${input[pos]} at ${pos} during parsing of ':export' (expected '{')` - ); - pos++; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - for (;;) { - if (input.charCodeAt(pos) === CC_RIGHT_CURLY) break; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - if (pos === input.length) return pos; - let start = pos; - let name; - [pos, name] = eatText(input, pos, eatExportName); - if (pos === input.length) return pos; - if (input.charCodeAt(pos) !== CC_COLON) { - throw new Error( - `Unexpected ${input[pos]} at ${pos} during parsing of export name in ':export' (expected ':')` - ); - } - pos++; - if (pos === input.length) return pos; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - if (pos === input.length) return pos; - let value; - [pos, value] = eatText(input, pos, eatExportValue); - if (pos === input.length) return pos; - const cc = input.charCodeAt(pos); - if (cc === CC_SEMICOLON) { - pos++; - if (pos === input.length) return pos; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - if (pos === input.length) return pos; - } else if (cc !== CC_RIGHT_CURLY) { - throw new Error( - `Unexpected ${input[pos]} at ${pos} during parsing of export value in ':export' (expected ';' or '}')` - ); - } - const dep = new CssExportDependency(name, value); - const { line: sl, column: sc } = locConverter.get(start); - const { line: el, column: ec } = locConverter.get(pos); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - } - pos++; - if (pos === input.length) return pos; - pos = eatWhiteLine(input, pos); - return pos; - }; - const eatPropertyName = eatUntil(":{};"); - const processLocalDeclaration = (input, pos) => { - modeData = undefined; - const start = pos; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - const propertyNameStart = pos; - const [propertyNameEnd, propertyName] = eatText( - input, - pos, - eatPropertyName - ); - if (input.charCodeAt(propertyNameEnd) !== CC_COLON) return start; - pos = propertyNameEnd + 1; - if (propertyName.startsWith("--")) { - // CSS Variable - const { line: sl, column: sc } = locConverter.get(propertyNameStart); - const { line: el, column: ec } = locConverter.get(propertyNameEnd); - const name = propertyName.slice(2); - const dep = new CssLocalIdentifierDependency( - name, - [propertyNameStart, propertyNameEnd], - "--" - ); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - declaredCssVariables.add(name); - } else if ( - propertyName === "animation-name" || - propertyName === "animation" - ) { - modeData = "animation"; - lastIdentifier = undefined; - } - return pos; - }; - const processDeclarationValueDone = (input, pos) => { - if (modeData === "animation" && lastIdentifier) { - const { line: sl, column: sc } = locConverter.get(lastIdentifier[0]); - const { line: el, column: ec } = locConverter.get(lastIdentifier[1]); - const name = input.slice(lastIdentifier[0], lastIdentifier[1]); - const dep = new CssSelfLocalIdentifierDependency(name, lastIdentifier); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - } - }; - const eatKeyframes = eatUntil("{};/"); - const eatNameInVar = eatUntil(",)};/"); - walkCssTokens(source, { - isSelector: () => { - return mode !== CSS_MODE_IN_RULE && mode !== CSS_MODE_IN_LOCAL_RULE; - }, - url: (input, start, end, contentStart, contentEnd) => { - const value = cssUnescape(input.slice(contentStart, contentEnd)); - switch (mode) { - case CSS_MODE_AT_IMPORT_EXPECT_URL: { - modeData.url = value; - mode = CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS; - break; - } - case CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS: - case CSS_MODE_AT_IMPORT_EXPECT_MEDIA: - throw new Error( - `Unexpected ${input.slice( - start, - end - )} at ${start} during ${explainMode(mode)}` - ); - default: { - const dep = new CssUrlDependency(value, [start, end], "url"); - const { line: sl, column: sc } = locConverter.get(start); - const { line: el, column: ec } = locConverter.get(end); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - module.addCodeGenerationDependency(dep); - break; - } - } - return end; - }, - string: (input, start, end) => { - switch (mode) { - case CSS_MODE_AT_IMPORT_EXPECT_URL: { - modeData.url = cssUnescape(input.slice(start + 1, end - 1)); - mode = CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS; - break; - } - } - return end; - }, - atKeyword: (input, start, end) => { - const name = input.slice(start, end); - if (name === "@namespace") { - throw new Error("@namespace is not supported in bundled CSS"); - } - if (name === "@import") { - if (mode !== CSS_MODE_TOP_LEVEL) { - throw new Error( - `Unexpected @import at ${start} during ${explainMode(mode)}` - ); - } - mode = CSS_MODE_AT_IMPORT_EXPECT_URL; - modePos = end; - modeData = { - start: start, - url: undefined, - supports: undefined - }; - } - if (name === "@keyframes") { - let pos = end; - pos = walkCssTokens.eatWhitespaceAndComments(input, pos); - if (pos === input.length) return pos; - const [newPos, name] = eatText(input, pos, eatKeyframes); - const { line: sl, column: sc } = locConverter.get(pos); - const { line: el, column: ec } = locConverter.get(newPos); - const dep = new CssLocalIdentifierDependency(name, [pos, newPos]); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - pos = newPos; - if (pos === input.length) return pos; - if (input.charCodeAt(pos) !== CC_LEFT_CURLY) { - throw new Error( - `Unexpected ${input[pos]} at ${pos} during parsing of @keyframes (expected '{')` - ); - } - mode = CSS_MODE_IN_LOCAL_RULE; - modeNestingLevel = 1; - return pos + 1; - } - return end; - }, - semicolon: (input, start, end) => { - switch (mode) { - case CSS_MODE_AT_IMPORT_EXPECT_URL: - throw new Error(`Expected URL for @import at ${start}`); - case CSS_MODE_AT_IMPORT_EXPECT_MEDIA: - case CSS_MODE_AT_IMPORT_EXPECT_SUPPORTS: { - const { line: sl, column: sc } = locConverter.get(modeData.start); - const { line: el, column: ec } = locConverter.get(end); - end = eatWhiteLine(input, end); - const media = input.slice(modePos, start).trim(); - const dep = new CssImportDependency( - modeData.url, - [modeData.start, end], - modeData.supports, - media - ); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - break; - } - case CSS_MODE_IN_LOCAL_RULE: { - processDeclarationValueDone(input, start); - return processLocalDeclaration(input, end); - } - case CSS_MODE_IN_RULE: { - return end; - } - } - mode = CSS_MODE_TOP_LEVEL; - modeData = undefined; - singleClassSelector = undefined; - return end; - }, - leftCurlyBracket: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: - mode = isTopLevelLocal() - ? CSS_MODE_IN_LOCAL_RULE - : CSS_MODE_IN_RULE; - modeNestingLevel = 1; - if (mode === CSS_MODE_IN_LOCAL_RULE) - return processLocalDeclaration(input, end); - break; - case CSS_MODE_IN_RULE: - case CSS_MODE_IN_LOCAL_RULE: - modeNestingLevel++; - break; - } - return end; - }, - rightCurlyBracket: (input, start, end) => { - switch (mode) { - case CSS_MODE_IN_LOCAL_RULE: - processDeclarationValueDone(input, start); - /* falls through */ - case CSS_MODE_IN_RULE: - if (--modeNestingLevel === 0) { - mode = CSS_MODE_TOP_LEVEL; - modeData = undefined; - singleClassSelector = undefined; - } - break; - } - return end; - }, - id: (input, start, end) => { - singleClassSelector = false; - switch (mode) { - case CSS_MODE_TOP_LEVEL: - if (isTopLevelLocal()) { - const name = input.slice(start + 1, end); - const dep = new CssLocalIdentifierDependency(name, [ - start + 1, - end - ]); - const { line: sl, column: sc } = locConverter.get(start); - const { line: el, column: ec } = locConverter.get(end); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - } - break; - } - return end; - }, - identifier: (input, start, end) => { - singleClassSelector = false; - switch (mode) { - case CSS_MODE_IN_LOCAL_RULE: - if (modeData === "animation") { - lastIdentifier = [start, end]; - } - break; - } - return end; - }, - class: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: { - if (isTopLevelLocal()) { - const name = input.slice(start + 1, end); - const dep = new CssLocalIdentifierDependency(name, [ - start + 1, - end - ]); - const { line: sl, column: sc } = locConverter.get(start); - const { line: el, column: ec } = locConverter.get(end); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - if (singleClassSelector === undefined) singleClassSelector = name; - } else { - singleClassSelector = false; - } - break; - } - } - return end; - }, - leftParenthesis: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: { - modeStack.push(false); - break; - } - } - return end; - }, - rightParenthesis: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: { - const newModeData = modeStack.pop(); - if (newModeData !== false) { - modeData = newModeData; - const dep = new ConstDependency("", [start, end]); - module.addPresentationalDependency(dep); - } - break; - } - } - return end; - }, - pseudoClass: (input, start, end) => { - singleClassSelector = false; - switch (mode) { - case CSS_MODE_TOP_LEVEL: { - const name = input.slice(start, end); - if (this.allowModeSwitch && name === ":global") { - modeData = "global"; - const dep = new ConstDependency("", [start, end]); - module.addPresentationalDependency(dep); - } else if (this.allowModeSwitch && name === ":local") { - modeData = "local"; - const dep = new ConstDependency("", [start, end]); - module.addPresentationalDependency(dep); - } else if (this.allowPseudoBlocks && name === ":export") { - const pos = parseExports(input, end); - const dep = new ConstDependency("", [start, pos]); - module.addPresentationalDependency(dep); - return pos; - } - break; - } - } - return end; - }, - pseudoFunction: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: { - const name = input.slice(start, end - 1); - if (this.allowModeSwitch && name === ":global") { - modeStack.push(modeData); - modeData = "global"; - const dep = new ConstDependency("", [start, end]); - module.addPresentationalDependency(dep); - } else if (this.allowModeSwitch && name === ":local") { - modeStack.push(modeData); - modeData = "local"; - const dep = new ConstDependency("", [start, end]); - module.addPresentationalDependency(dep); - } else { - modeStack.push(false); - } - break; - } - } - return end; - }, - function: (input, start, end) => { - switch (mode) { - case CSS_MODE_IN_LOCAL_RULE: { - const name = input.slice(start, end - 1); - if (name === "var") { - let pos = walkCssTokens.eatWhitespaceAndComments(input, end); - if (pos === input.length) return pos; - const [newPos, name] = eatText(input, pos, eatNameInVar); - if (!name.startsWith("--")) return end; - const { line: sl, column: sc } = locConverter.get(pos); - const { line: el, column: ec } = locConverter.get(newPos); - const dep = new CssSelfLocalIdentifierDependency( - name.slice(2), - [pos, newPos], - "--", - declaredCssVariables - ); - dep.setLoc(sl, sc, el, ec); - module.addDependency(dep); - return newPos; - } - break; - } - } - return end; - }, - comma: (input, start, end) => { - switch (mode) { - case CSS_MODE_TOP_LEVEL: - modeData = undefined; - modeStack.length = 0; - break; - case CSS_MODE_IN_LOCAL_RULE: - processDeclarationValueDone(input, start); - break; - } - return end; - } - }); - - module.buildInfo.strict = true; - module.buildMeta.exportsType = "namespace"; - module.addDependency(new StaticExportsDependency([], true)); - return state; - } -} - -module.exports = CssParser; - - -/***/ }), - -/***/ 62465: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @typedef {Object} CssTokenCallbacks - * @property {function(string, number): boolean} isSelector - * @property {function(string, number, number, number, number): number=} url - * @property {function(string, number, number): number=} string - * @property {function(string, number, number): number=} leftParenthesis - * @property {function(string, number, number): number=} rightParenthesis - * @property {function(string, number, number): number=} pseudoFunction - * @property {function(string, number, number): number=} function - * @property {function(string, number, number): number=} pseudoClass - * @property {function(string, number, number): number=} atKeyword - * @property {function(string, number, number): number=} class - * @property {function(string, number, number): number=} identifier - * @property {function(string, number, number): number=} id - * @property {function(string, number, number): number=} leftCurlyBracket - * @property {function(string, number, number): number=} rightCurlyBracket - * @property {function(string, number, number): number=} semicolon - * @property {function(string, number, number): number=} comma - */ - -/** @typedef {function(string, number, CssTokenCallbacks): number} CharHandler */ - -// spec: https://drafts.csswg.org/css-syntax/ - -const CC_LINE_FEED = "\n".charCodeAt(0); -const CC_CARRIAGE_RETURN = "\r".charCodeAt(0); -const CC_FORM_FEED = "\f".charCodeAt(0); - -const CC_TAB = "\t".charCodeAt(0); -const CC_SPACE = " ".charCodeAt(0); - -const CC_SLASH = "/".charCodeAt(0); -const CC_BACK_SLASH = "\\".charCodeAt(0); -const CC_ASTERISK = "*".charCodeAt(0); - -const CC_LEFT_PARENTHESIS = "(".charCodeAt(0); -const CC_RIGHT_PARENTHESIS = ")".charCodeAt(0); -const CC_LEFT_CURLY = "{".charCodeAt(0); -const CC_RIGHT_CURLY = "}".charCodeAt(0); - -const CC_QUOTATION_MARK = '"'.charCodeAt(0); -const CC_APOSTROPHE = "'".charCodeAt(0); - -const CC_FULL_STOP = ".".charCodeAt(0); -const CC_COLON = ":".charCodeAt(0); -const CC_SEMICOLON = ";".charCodeAt(0); -const CC_COMMA = ",".charCodeAt(0); -const CC_PERCENTAGE = "%".charCodeAt(0); -const CC_AT_SIGN = "@".charCodeAt(0); - -const CC_LOW_LINE = "_".charCodeAt(0); -const CC_LOWER_A = "a".charCodeAt(0); -const CC_LOWER_U = "u".charCodeAt(0); -const CC_LOWER_E = "e".charCodeAt(0); -const CC_LOWER_Z = "z".charCodeAt(0); -const CC_UPPER_A = "A".charCodeAt(0); -const CC_UPPER_E = "E".charCodeAt(0); -const CC_UPPER_Z = "Z".charCodeAt(0); -const CC_0 = "0".charCodeAt(0); -const CC_9 = "9".charCodeAt(0); - -const CC_NUMBER_SIGN = "#".charCodeAt(0); -const CC_PLUS_SIGN = "+".charCodeAt(0); -const CC_HYPHEN_MINUS = "-".charCodeAt(0); - -const CC_LESS_THAN_SIGN = "<".charCodeAt(0); -const CC_GREATER_THAN_SIGN = ">".charCodeAt(0); - -const _isNewLine = cc => { - return ( - cc === CC_LINE_FEED || cc === CC_CARRIAGE_RETURN || cc === CC_FORM_FEED - ); -}; - -/** @type {CharHandler} */ -const consumeSpace = (input, pos, callbacks) => { - let cc; - do { - pos++; - cc = input.charCodeAt(pos); - } while (_isWhiteSpace(cc)); - return pos; -}; - -const _isWhiteSpace = cc => { - return ( - cc === CC_LINE_FEED || - cc === CC_CARRIAGE_RETURN || - cc === CC_FORM_FEED || - cc === CC_TAB || - cc === CC_SPACE - ); -}; - -/** @type {CharHandler} */ -const consumeSingleCharToken = (input, pos, callbacks) => { - return pos + 1; -}; - -/** @type {CharHandler} */ -const consumePotentialComment = (input, pos, callbacks) => { - pos++; - if (pos === input.length) return pos; - let cc = input.charCodeAt(pos); - if (cc !== CC_ASTERISK) return pos; - for (;;) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - while (cc === CC_ASTERISK) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - if (cc === CC_SLASH) return pos + 1; - } - } -}; - -/** @type {function(number): CharHandler} */ -const consumeString = end => (input, pos, callbacks) => { - const start = pos; - pos = _consumeString(input, pos, end); - if (callbacks.string !== undefined) { - pos = callbacks.string(input, start, pos); - } - return pos; -}; - -const _consumeString = (input, pos, end) => { - pos++; - for (;;) { - if (pos === input.length) return pos; - const cc = input.charCodeAt(pos); - if (cc === end) return pos + 1; - if (_isNewLine(cc)) { - // bad string - return pos; - } - if (cc === CC_BACK_SLASH) { - // we don't need to fully parse the escaped code point - // just skip over a potential new line - pos++; - if (pos === input.length) return pos; - pos++; - } else { - pos++; - } - } -}; - -const _isIdentifierStartCode = cc => { - return ( - cc === CC_LOW_LINE || - (cc >= CC_LOWER_A && cc <= CC_LOWER_Z) || - (cc >= CC_UPPER_A && cc <= CC_UPPER_Z) || - cc > 0x80 - ); -}; - -const _isDigit = cc => { - return cc >= CC_0 && cc <= CC_9; -}; - -const _startsIdentifier = (input, pos) => { - const cc = input.charCodeAt(pos); - if (cc === CC_HYPHEN_MINUS) { - if (pos === input.length) return false; - const cc = input.charCodeAt(pos + 1); - if (cc === CC_HYPHEN_MINUS) return true; - if (cc === CC_BACK_SLASH) { - const cc = input.charCodeAt(pos + 2); - return !_isNewLine(cc); - } - return _isIdentifierStartCode(cc); - } - if (cc === CC_BACK_SLASH) { - const cc = input.charCodeAt(pos + 1); - return !_isNewLine(cc); - } - return _isIdentifierStartCode(cc); -}; - -/** @type {CharHandler} */ -const consumeNumberSign = (input, pos, callbacks) => { - const start = pos; - pos++; - if (pos === input.length) return pos; - if (callbacks.isSelector(input, pos) && _startsIdentifier(input, pos)) { - pos = _consumeIdentifier(input, pos); - if (callbacks.id !== undefined) { - return callbacks.id(input, start, pos); - } - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeMinus = (input, pos, callbacks) => { - const start = pos; - pos++; - if (pos === input.length) return pos; - const cc = input.charCodeAt(pos); - if (cc === CC_FULL_STOP || _isDigit(cc)) { - return consumeNumericToken(input, pos, callbacks); - } else if (cc === CC_HYPHEN_MINUS) { - pos++; - if (pos === input.length) return pos; - const cc = input.charCodeAt(pos); - if (cc === CC_GREATER_THAN_SIGN) { - return pos + 1; - } else { - pos = _consumeIdentifier(input, pos); - if (callbacks.identifier !== undefined) { - return callbacks.identifier(input, start, pos); - } - } - } else if (cc === CC_BACK_SLASH) { - if (pos + 1 === input.length) return pos; - const cc = input.charCodeAt(pos + 1); - if (_isNewLine(cc)) return pos; - pos = _consumeIdentifier(input, pos); - if (callbacks.identifier !== undefined) { - return callbacks.identifier(input, start, pos); - } - } else if (_isIdentifierStartCode(cc)) { - pos++; - pos = _consumeIdentifier(input, pos); - if (callbacks.identifier !== undefined) { - return callbacks.identifier(input, start, pos); - } - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeDot = (input, pos, callbacks) => { - const start = pos; - pos++; - if (pos === input.length) return pos; - const cc = input.charCodeAt(pos); - if (_isDigit(cc)) return consumeNumericToken(input, pos - 2, callbacks); - if (!callbacks.isSelector(input, pos) || !_startsIdentifier(input, pos)) - return pos; - pos = _consumeIdentifier(input, pos); - if (callbacks.class !== undefined) return callbacks.class(input, start, pos); - return pos; -}; - -/** @type {CharHandler} */ -const consumeNumericToken = (input, pos, callbacks) => { - pos = _consumeNumber(input, pos); - if (pos === input.length) return pos; - if (_startsIdentifier(input, pos)) return _consumeIdentifier(input, pos); - const cc = input.charCodeAt(pos); - if (cc === CC_PERCENTAGE) return pos + 1; - return pos; -}; - -/** @type {CharHandler} */ -const consumeOtherIdentifier = (input, pos, callbacks) => { - const start = pos; - pos = _consumeIdentifier(input, pos); - if ( - pos !== input.length && - !callbacks.isSelector(input, pos) && - input.charCodeAt(pos) === CC_LEFT_PARENTHESIS - ) { - pos++; - if (callbacks.function !== undefined) { - return callbacks.function(input, start, pos); - } - } else { - if (callbacks.identifier !== undefined) { - return callbacks.identifier(input, start, pos); - } - } - return pos; -}; - -/** @type {CharHandler} */ -const consumePotentialUrl = (input, pos, callbacks) => { - const start = pos; - pos = _consumeIdentifier(input, pos); - if (pos === start + 3 && input.slice(start, pos + 1) === "url(") { - pos++; - let cc = input.charCodeAt(pos); - while (_isWhiteSpace(cc)) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - if (cc === CC_QUOTATION_MARK || cc === CC_APOSTROPHE) { - pos++; - const contentStart = pos; - pos = _consumeString(input, pos, cc); - const contentEnd = pos - 1; - cc = input.charCodeAt(pos); - while (_isWhiteSpace(cc)) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - if (cc !== CC_RIGHT_PARENTHESIS) return pos; - pos++; - if (callbacks.url !== undefined) - return callbacks.url(input, start, pos, contentStart, contentEnd); - return pos; - } else { - const contentStart = pos; - let contentEnd; - for (;;) { - if (cc === CC_BACK_SLASH) { - pos++; - if (pos === input.length) return pos; - pos++; - } else if (_isWhiteSpace(cc)) { - contentEnd = pos; - do { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } while (_isWhiteSpace(cc)); - if (cc !== CC_RIGHT_PARENTHESIS) return pos; - pos++; - if (callbacks.url !== undefined) { - return callbacks.url(input, start, pos, contentStart, contentEnd); - } - return pos; - } else if (cc === CC_RIGHT_PARENTHESIS) { - contentEnd = pos; - pos++; - if (callbacks.url !== undefined) { - return callbacks.url(input, start, pos, contentStart, contentEnd); - } - return pos; - } else if (cc === CC_LEFT_PARENTHESIS) { - return pos; - } else { - pos++; - } - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - } - } else { - if (callbacks.identifier !== undefined) { - return callbacks.identifier(input, start, pos); - } - return pos; - } -}; - -/** @type {CharHandler} */ -const consumePotentialPseudo = (input, pos, callbacks) => { - const start = pos; - pos++; - if (!callbacks.isSelector(input, pos) || !_startsIdentifier(input, pos)) - return pos; - pos = _consumeIdentifier(input, pos); - let cc = input.charCodeAt(pos); - if (cc === CC_LEFT_PARENTHESIS) { - pos++; - if (callbacks.pseudoFunction !== undefined) { - return callbacks.pseudoFunction(input, start, pos); - } - return pos; - } - if (callbacks.pseudoClass !== undefined) { - return callbacks.pseudoClass(input, start, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeLeftParenthesis = (input, pos, callbacks) => { - pos++; - if (callbacks.leftParenthesis !== undefined) { - return callbacks.leftParenthesis(input, pos - 1, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeRightParenthesis = (input, pos, callbacks) => { - pos++; - if (callbacks.rightParenthesis !== undefined) { - return callbacks.rightParenthesis(input, pos - 1, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeLeftCurlyBracket = (input, pos, callbacks) => { - pos++; - if (callbacks.leftCurlyBracket !== undefined) { - return callbacks.leftCurlyBracket(input, pos - 1, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeRightCurlyBracket = (input, pos, callbacks) => { - pos++; - if (callbacks.rightCurlyBracket !== undefined) { - return callbacks.rightCurlyBracket(input, pos - 1, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeSemicolon = (input, pos, callbacks) => { - pos++; - if (callbacks.semicolon !== undefined) { - return callbacks.semicolon(input, pos - 1, pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeComma = (input, pos, callbacks) => { - pos++; - if (callbacks.comma !== undefined) { - return callbacks.comma(input, pos - 1, pos); - } - return pos; -}; - -const _consumeIdentifier = (input, pos) => { - for (;;) { - const cc = input.charCodeAt(pos); - if (cc === CC_BACK_SLASH) { - pos++; - if (pos === input.length) return pos; - pos++; - } else if ( - _isIdentifierStartCode(cc) || - _isDigit(cc) || - cc === CC_HYPHEN_MINUS - ) { - pos++; - } else { - return pos; - } - } -}; - -const _consumeNumber = (input, pos) => { - pos++; - if (pos === input.length) return pos; - let cc = input.charCodeAt(pos); - while (_isDigit(cc)) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - if (cc === CC_FULL_STOP && pos + 1 !== input.length) { - const next = input.charCodeAt(pos + 1); - if (_isDigit(next)) { - pos += 2; - cc = input.charCodeAt(pos); - while (_isDigit(cc)) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - } - } - if (cc === CC_LOWER_E || cc === CC_UPPER_E) { - if (pos + 1 !== input.length) { - const next = input.charCodeAt(pos + 2); - if (_isDigit(next)) { - pos += 2; - } else if ( - (next === CC_HYPHEN_MINUS || next === CC_PLUS_SIGN) && - pos + 2 !== input.length - ) { - const next = input.charCodeAt(pos + 2); - if (_isDigit(next)) { - pos += 3; - } else { - return pos; - } - } else { - return pos; - } - } - } else { - return pos; - } - cc = input.charCodeAt(pos); - while (_isDigit(cc)) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - } - return pos; -}; - -/** @type {CharHandler} */ -const consumeLessThan = (input, pos, callbacks) => { - if (input.slice(pos + 1, pos + 4) === "!--") return pos + 4; - return pos + 1; -}; - -/** @type {CharHandler} */ -const consumeAt = (input, pos, callbacks) => { - const start = pos; - pos++; - if (pos === input.length) return pos; - if (_startsIdentifier(input, pos)) { - pos = _consumeIdentifier(input, pos); - if (callbacks.atKeyword !== undefined) { - pos = callbacks.atKeyword(input, start, pos); - } - } - return pos; -}; - -const CHAR_MAP = Array.from({ length: 0x80 }, (_, cc) => { - // https://drafts.csswg.org/css-syntax/#consume-token - switch (cc) { - case CC_LINE_FEED: - case CC_CARRIAGE_RETURN: - case CC_FORM_FEED: - case CC_TAB: - case CC_SPACE: - return consumeSpace; - case CC_QUOTATION_MARK: - case CC_APOSTROPHE: - return consumeString(cc); - case CC_NUMBER_SIGN: - return consumeNumberSign; - case CC_SLASH: - return consumePotentialComment; - // case CC_LEFT_SQUARE: - // case CC_RIGHT_SQUARE: - // case CC_COMMA: - // case CC_COLON: - // return consumeSingleCharToken; - case CC_COMMA: - return consumeComma; - case CC_SEMICOLON: - return consumeSemicolon; - case CC_LEFT_PARENTHESIS: - return consumeLeftParenthesis; - case CC_RIGHT_PARENTHESIS: - return consumeRightParenthesis; - case CC_LEFT_CURLY: - return consumeLeftCurlyBracket; - case CC_RIGHT_CURLY: - return consumeRightCurlyBracket; - case CC_COLON: - return consumePotentialPseudo; - case CC_PLUS_SIGN: - return consumeNumericToken; - case CC_FULL_STOP: - return consumeDot; - case CC_HYPHEN_MINUS: - return consumeMinus; - case CC_LESS_THAN_SIGN: - return consumeLessThan; - case CC_AT_SIGN: - return consumeAt; - case CC_LOWER_U: - return consumePotentialUrl; - case CC_LOW_LINE: - return consumeOtherIdentifier; - default: - if (_isDigit(cc)) return consumeNumericToken; - if ( - (cc >= CC_LOWER_A && cc <= CC_LOWER_Z) || - (cc >= CC_UPPER_A && cc <= CC_UPPER_Z) - ) { - return consumeOtherIdentifier; - } - return consumeSingleCharToken; - } -}); - -/** - * @param {string} input input css - * @param {CssTokenCallbacks} callbacks callbacks - * @returns {void} - */ -module.exports = (input, callbacks) => { - let pos = 0; - while (pos < input.length) { - const cc = input.charCodeAt(pos); - if (cc < 0x80) { - pos = CHAR_MAP[cc](input, pos, callbacks); - } else { - pos++; - } - } -}; - -module.exports.eatComments = (input, pos) => { - loop: for (;;) { - const cc = input.charCodeAt(pos); - if (cc === CC_SLASH) { - if (pos === input.length) return pos; - let cc = input.charCodeAt(pos + 1); - if (cc !== CC_ASTERISK) return pos; - pos++; - for (;;) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - while (cc === CC_ASTERISK) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - if (cc === CC_SLASH) { - pos++; - continue loop; - } - } - } - } - return pos; - } -}; - -module.exports.eatWhitespaceAndComments = (input, pos) => { - loop: for (;;) { - const cc = input.charCodeAt(pos); - if (cc === CC_SLASH) { - if (pos === input.length) return pos; - let cc = input.charCodeAt(pos + 1); - if (cc !== CC_ASTERISK) return pos; - pos++; - for (;;) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - while (cc === CC_ASTERISK) { - pos++; - if (pos === input.length) return pos; - cc = input.charCodeAt(pos); - if (cc === CC_SLASH) { - pos++; - continue loop; - } - } - } - } else if (_isWhiteSpace(cc)) { - pos++; - continue; - } - return pos; - } -}; - - -/***/ }), - -/***/ 2366: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { Tracer } = __webpack_require__(97098); -const createSchemaValidation = __webpack_require__(89699); -const { dirname, mkdirpSync } = __webpack_require__(47077); - -/** @typedef {import("../../declarations/plugins/debug/ProfilingPlugin").ProfilingPluginOptions} ProfilingPluginOptions */ -/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ - -const validate = createSchemaValidation( - __webpack_require__(39109), - () => __webpack_require__(95725), - { - name: "Profiling Plugin", - baseDataPath: "options" - } -); -let inspector = undefined; - -try { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - inspector = __webpack_require__(31405); -} catch (e) { - console.log("Unable to CPU profile in < node 8.0"); -} - -class Profiler { - constructor(inspector) { - this.session = undefined; - this.inspector = inspector; - this._startTime = 0; - } - - hasSession() { - return this.session !== undefined; - } - - startProfiling() { - if (this.inspector === undefined) { - return Promise.resolve(); - } - - try { - this.session = new inspector.Session(); - this.session.connect(); - } catch (_) { - this.session = undefined; - return Promise.resolve(); - } - - const hrtime = process.hrtime(); - this._startTime = hrtime[0] * 1000000 + Math.round(hrtime[1] / 1000); - - return Promise.all([ - this.sendCommand("Profiler.setSamplingInterval", { - interval: 100 - }), - this.sendCommand("Profiler.enable"), - this.sendCommand("Profiler.start") - ]); - } - - sendCommand(method, params) { - if (this.hasSession()) { - return new Promise((res, rej) => { - return this.session.post(method, params, (err, params) => { - if (err !== null) { - rej(err); - } else { - res(params); - } - }); - }); - } else { - return Promise.resolve(); - } - } - - destroy() { - if (this.hasSession()) { - this.session.disconnect(); - } - - return Promise.resolve(); - } - - stopProfiling() { - return this.sendCommand("Profiler.stop").then(({ profile }) => { - const hrtime = process.hrtime(); - const endTime = hrtime[0] * 1000000 + Math.round(hrtime[1] / 1000); - if (profile.startTime < this._startTime || profile.endTime > endTime) { - // In some cases timestamps mismatch and we need to adjust them - // Both process.hrtime and the inspector timestamps claim to be relative - // to a unknown point in time. But they do not guarantee that this is the - // same point in time. - const duration = profile.endTime - profile.startTime; - const ownDuration = endTime - this._startTime; - const untracked = Math.max(0, ownDuration - duration); - profile.startTime = this._startTime + untracked / 2; - profile.endTime = endTime - untracked / 2; - } - return { profile }; - }); - } -} - -/** - * an object that wraps Tracer and Profiler with a counter - * @typedef {Object} Trace - * @property {Tracer} trace instance of Tracer - * @property {number} counter Counter - * @property {Profiler} profiler instance of Profiler - * @property {Function} end the end function - */ - -/** - * @param {IntermediateFileSystem} fs filesystem used for output - * @param {string} outputPath The location where to write the log. - * @returns {Trace} The trace object - */ -const createTrace = (fs, outputPath) => { - const trace = new Tracer(); - const profiler = new Profiler(inspector); - if (/\/|\\/.test(outputPath)) { - const dirPath = dirname(fs, outputPath); - mkdirpSync(fs, dirPath); - } - const fsStream = fs.createWriteStream(outputPath); - - let counter = 0; - - trace.pipe(fsStream); - // These are critical events that need to be inserted so that tools like - // chrome dev tools can load the profile. - trace.instantEvent({ - name: "TracingStartedInPage", - id: ++counter, - cat: ["disabled-by-default-devtools.timeline"], - args: { - data: { - sessionId: "-1", - page: "0xfff", - frames: [ - { - frame: "0xfff", - url: "webpack", - name: "" - } - ] - } - } - }); - - trace.instantEvent({ - name: "TracingStartedInBrowser", - id: ++counter, - cat: ["disabled-by-default-devtools.timeline"], - args: { - data: { - sessionId: "-1" - } - } - }); - - return { - trace, - counter, - profiler, - end: callback => { - trace.push("]"); - // Wait until the write stream finishes. - fsStream.on("close", () => { - callback(); - }); - // Tear down the readable trace stream. - trace.push(null); - } - }; -}; - -const pluginName = "ProfilingPlugin"; - -class ProfilingPlugin { - /** - * @param {ProfilingPluginOptions=} options options object - */ - constructor(options = {}) { - validate(options); - this.outputPath = options.outputPath || "events.json"; - } - - apply(compiler) { - const tracer = createTrace( - compiler.intermediateFileSystem, - this.outputPath - ); - tracer.profiler.startProfiling(); - - // Compiler Hooks - Object.keys(compiler.hooks).forEach(hookName => { - const hook = compiler.hooks[hookName]; - if (hook) { - hook.intercept(makeInterceptorFor("Compiler", tracer)(hookName)); - } - }); - - Object.keys(compiler.resolverFactory.hooks).forEach(hookName => { - const hook = compiler.resolverFactory.hooks[hookName]; - if (hook) { - hook.intercept(makeInterceptorFor("Resolver", tracer)(hookName)); - } - }); - - compiler.hooks.compilation.tap( - pluginName, - (compilation, { normalModuleFactory, contextModuleFactory }) => { - interceptAllHooksFor(compilation, tracer, "Compilation"); - interceptAllHooksFor( - normalModuleFactory, - tracer, - "Normal Module Factory" - ); - interceptAllHooksFor( - contextModuleFactory, - tracer, - "Context Module Factory" - ); - interceptAllParserHooks(normalModuleFactory, tracer); - interceptAllJavascriptModulesPluginHooks(compilation, tracer); - } - ); - - // We need to write out the CPU profile when we are all done. - compiler.hooks.done.tapAsync( - { - name: pluginName, - stage: Infinity - }, - (stats, callback) => { - if (compiler.watchMode) return callback(); - tracer.profiler.stopProfiling().then(parsedResults => { - if (parsedResults === undefined) { - tracer.profiler.destroy(); - tracer.end(callback); - return; - } - - const cpuStartTime = parsedResults.profile.startTime; - const cpuEndTime = parsedResults.profile.endTime; - - tracer.trace.completeEvent({ - name: "TaskQueueManager::ProcessTaskFromWorkQueue", - id: ++tracer.counter, - cat: ["toplevel"], - ts: cpuStartTime, - args: { - src_file: "../../ipc/ipc_moji_bootstrap.cc", - src_func: "Accept" - } - }); - - tracer.trace.completeEvent({ - name: "EvaluateScript", - id: ++tracer.counter, - cat: ["devtools.timeline"], - ts: cpuStartTime, - dur: cpuEndTime - cpuStartTime, - args: { - data: { - url: "webpack", - lineNumber: 1, - columnNumber: 1, - frame: "0xFFF" - } - } - }); - - tracer.trace.instantEvent({ - name: "CpuProfile", - id: ++tracer.counter, - cat: ["disabled-by-default-devtools.timeline"], - ts: cpuEndTime, - args: { - data: { - cpuProfile: parsedResults.profile - } - } - }); - - tracer.profiler.destroy(); - tracer.end(callback); - }); - } - ); - } -} - -const interceptAllHooksFor = (instance, tracer, logLabel) => { - if (Reflect.has(instance, "hooks")) { - Object.keys(instance.hooks).forEach(hookName => { - const hook = instance.hooks[hookName]; - if (hook && !hook._fakeHook) { - hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName)); - } - }); - } -}; - -const interceptAllParserHooks = (moduleFactory, tracer) => { - const moduleTypes = [ - "javascript/auto", - "javascript/dynamic", - "javascript/esm", - "json", - "webassembly/async", - "webassembly/sync" - ]; - - moduleTypes.forEach(moduleType => { - moduleFactory.hooks.parser - .for(moduleType) - .tap("ProfilingPlugin", (parser, parserOpts) => { - interceptAllHooksFor(parser, tracer, "Parser"); - }); - }); -}; - -const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => { - interceptAllHooksFor( - { - hooks: - (__webpack_require__(36109).getCompilationHooks)( - compilation - ) - }, - tracer, - "JavascriptModulesPlugin" - ); -}; - -const makeInterceptorFor = (instance, tracer) => hookName => ({ - register: tapInfo => { - const { name, type, fn } = tapInfo; - const newFn = - // Don't tap our own hooks to ensure stream can close cleanly - name === pluginName - ? fn - : makeNewProfiledTapFn(hookName, tracer, { - name, - type, - fn - }); - return { - ...tapInfo, - fn: newFn - }; - } -}); - -// TODO improve typing -/** @typedef {(...args: TODO[]) => void | Promise} PluginFunction */ - -/** - * @param {string} hookName Name of the hook to profile. - * @param {Trace} tracer The trace object. - * @param {object} options Options for the profiled fn. - * @param {string} options.name Plugin name - * @param {string} options.type Plugin type (sync | async | promise) - * @param {PluginFunction} options.fn Plugin function - * @returns {PluginFunction} Chainable hooked function. - */ -const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { - const defaultCategory = ["blink.user_timing"]; - - switch (type) { - case "promise": - return (...args) => { - const id = ++tracer.counter; - tracer.trace.begin({ - name, - id, - cat: defaultCategory - }); - const promise = /** @type {Promise<*>} */ (fn(...args)); - return promise.then(r => { - tracer.trace.end({ - name, - id, - cat: defaultCategory - }); - return r; - }); - }; - case "async": - return (...args) => { - const id = ++tracer.counter; - tracer.trace.begin({ - name, - id, - cat: defaultCategory - }); - const callback = args.pop(); - fn(...args, (...r) => { - tracer.trace.end({ - name, - id, - cat: defaultCategory - }); - callback(...r); - }); - }; - case "sync": - return (...args) => { - const id = ++tracer.counter; - // Do not instrument ourself due to the CPU - // profile needing to be the last event in the trace. - if (name === pluginName) { - return fn(...args); - } - - tracer.trace.begin({ - name, - id, - cat: defaultCategory - }); - let r; - try { - r = fn(...args); - } catch (error) { - tracer.trace.end({ - name, - id, - cat: defaultCategory - }); - throw error; - } - tracer.trace.end({ - name, - id, - cat: defaultCategory - }); - return r; - }; - default: - break; - } -}; - -module.exports = ProfilingPlugin; -module.exports.Profiler = Profiler; - - -/***/ }), - -/***/ 80463: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -/** @type {Record} */ -const DEFINITIONS = { - f: { - definition: "var __WEBPACK_AMD_DEFINE_RESULT__;", - content: `!(__WEBPACK_AMD_DEFINE_RESULT__ = (#).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, - requests: [ - RuntimeGlobals.require, - RuntimeGlobals.exports, - RuntimeGlobals.module - ] - }, - o: { - definition: "", - content: "!(module.exports = #)", - requests: [RuntimeGlobals.module] - }, - of: { - definition: - "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;", - content: `!(__WEBPACK_AMD_DEFINE_FACTORY__ = (#), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, - requests: [ - RuntimeGlobals.require, - RuntimeGlobals.exports, - RuntimeGlobals.module - ] - }, - af: { - definition: - "var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", - content: `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_RESULT__ = (#).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, - requests: [RuntimeGlobals.exports, RuntimeGlobals.module] - }, - ao: { - definition: "", - content: "!(#, module.exports = #)", - requests: [RuntimeGlobals.module] - }, - aof: { - definition: - "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", - content: `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_FACTORY__ = (#), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, - requests: [RuntimeGlobals.exports, RuntimeGlobals.module] - }, - lf: { - definition: "var XXX, XXXmodule;", - content: - "!(XXXmodule = { id: YYY, exports: {}, loaded: false }, XXX = (#).call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule), XXXmodule.loaded = true, XXX === undefined && (XXX = XXXmodule.exports))", - requests: [RuntimeGlobals.require, RuntimeGlobals.module] - }, - lo: { - definition: "var XXX;", - content: "!(XXX = #)", - requests: [] - }, - lof: { - definition: "var XXX, XXXfactory, XXXmodule;", - content: - "!(XXXfactory = (#), (typeof XXXfactory === 'function' ? ((XXXmodule = { id: YYY, exports: {}, loaded: false }), (XXX = XXXfactory.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule)), (XXXmodule.loaded = true), XXX === undefined && (XXX = XXXmodule.exports)) : XXX = XXXfactory))", - requests: [RuntimeGlobals.require, RuntimeGlobals.module] - }, - laf: { - definition: "var __WEBPACK_AMD_DEFINE_ARRAY__, XXX, XXXexports;", - content: - "!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, XXX = (#).apply(XXXexports = {}, __WEBPACK_AMD_DEFINE_ARRAY__), XXX === undefined && (XXX = XXXexports))", - requests: [] - }, - lao: { - definition: "var XXX;", - content: "!(#, XXX = #)", - requests: [] - }, - laof: { - definition: "var XXXarray, XXXfactory, XXXexports, XXX;", - content: `!(XXXarray = #, XXXfactory = (#), - (typeof XXXfactory === 'function' ? - ((XXX = XXXfactory.apply(XXXexports = {}, XXXarray)), XXX === undefined && (XXX = XXXexports)) : - (XXX = XXXfactory) - ))`, - requests: [] - } -}; - -class AMDDefineDependency extends NullDependency { - constructor(range, arrayRange, functionRange, objectRange, namedModule) { - super(); - this.range = range; - this.arrayRange = arrayRange; - this.functionRange = functionRange; - this.objectRange = objectRange; - this.namedModule = namedModule; - this.localModule = null; - } - - get type() { - return "amd define"; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.arrayRange); - write(this.functionRange); - write(this.objectRange); - write(this.namedModule); - write(this.localModule); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.arrayRange = read(); - this.functionRange = read(); - this.objectRange = read(); - this.namedModule = read(); - this.localModule = read(); - super.deserialize(context); - } -} - -makeSerializable( - AMDDefineDependency, - "webpack/lib/dependencies/AMDDefineDependency" -); - -AMDDefineDependency.Template = class AMDDefineDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeRequirements }) { - const dep = /** @type {AMDDefineDependency} */ (dependency); - const branch = this.branch(dep); - const { definition, content, requests } = DEFINITIONS[branch]; - for (const req of requests) { - runtimeRequirements.add(req); - } - this.replace(dep, source, definition, content); - } - - localModuleVar(dependency) { - return ( - dependency.localModule && - dependency.localModule.used && - dependency.localModule.variableName() - ); - } - - branch(dependency) { - const localModuleVar = this.localModuleVar(dependency) ? "l" : ""; - const arrayRange = dependency.arrayRange ? "a" : ""; - const objectRange = dependency.objectRange ? "o" : ""; - const functionRange = dependency.functionRange ? "f" : ""; - return localModuleVar + arrayRange + objectRange + functionRange; - } - - replace(dependency, source, definition, text) { - const localModuleVar = this.localModuleVar(dependency); - if (localModuleVar) { - text = text.replace(/XXX/g, localModuleVar.replace(/\$/g, "$$$$")); - definition = definition.replace( - /XXX/g, - localModuleVar.replace(/\$/g, "$$$$") - ); - } - - if (dependency.namedModule) { - text = text.replace(/YYY/g, JSON.stringify(dependency.namedModule)); - } - - const texts = text.split("#"); - - if (definition) source.insert(0, definition); - - let current = dependency.range[0]; - if (dependency.arrayRange) { - source.replace(current, dependency.arrayRange[0] - 1, texts.shift()); - current = dependency.arrayRange[1]; - } - - if (dependency.objectRange) { - source.replace(current, dependency.objectRange[0] - 1, texts.shift()); - current = dependency.objectRange[1]; - } else if (dependency.functionRange) { - source.replace(current, dependency.functionRange[0] - 1, texts.shift()); - current = dependency.functionRange[1]; - } - source.replace(current, dependency.range[1] - 1, texts.shift()); - if (texts.length > 0) throw new Error("Implementation error"); - } -}; - -module.exports = AMDDefineDependency; - - -/***/ }), - -/***/ 29580: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const AMDDefineDependency = __webpack_require__(80463); -const AMDRequireArrayDependency = __webpack_require__(73090); -const AMDRequireContextDependency = __webpack_require__(39985); -const AMDRequireItemDependency = __webpack_require__(61261); -const ConstDependency = __webpack_require__(14367); -const ContextDependencyHelpers = __webpack_require__(32556); -const DynamicExports = __webpack_require__(35485); -const LocalModuleDependency = __webpack_require__(81600); -const { addLocalModule, getLocalModule } = __webpack_require__(59081); - -const isBoundFunctionExpression = expr => { - if (expr.type !== "CallExpression") return false; - if (expr.callee.type !== "MemberExpression") return false; - if (expr.callee.computed) return false; - if (expr.callee.object.type !== "FunctionExpression") return false; - if (expr.callee.property.type !== "Identifier") return false; - if (expr.callee.property.name !== "bind") return false; - return true; -}; - -const isUnboundFunctionExpression = expr => { - if (expr.type === "FunctionExpression") return true; - if (expr.type === "ArrowFunctionExpression") return true; - return false; -}; - -const isCallable = expr => { - if (isUnboundFunctionExpression(expr)) return true; - if (isBoundFunctionExpression(expr)) return true; - return false; -}; - -class AMDDefineDependencyParserPlugin { - constructor(options) { - this.options = options; - } - - apply(parser) { - parser.hooks.call - .for("define") - .tap( - "AMDDefineDependencyParserPlugin", - this.processCallDefine.bind(this, parser) - ); - } - - processArray(parser, expr, param, identifiers, namedModule) { - if (param.isArray()) { - param.items.forEach((param, idx) => { - if ( - param.isString() && - ["require", "module", "exports"].includes(param.string) - ) - identifiers[idx] = param.string; - const result = this.processItem(parser, expr, param, namedModule); - if (result === undefined) { - this.processContext(parser, expr, param); - } - }); - return true; - } else if (param.isConstArray()) { - const deps = []; - param.array.forEach((request, idx) => { - let dep; - let localModule; - if (request === "require") { - identifiers[idx] = request; - dep = "__webpack_require__"; - } else if (["exports", "module"].includes(request)) { - identifiers[idx] = request; - dep = request; - } else if ((localModule = getLocalModule(parser.state, request))) { - localModule.flagUsed(); - dep = new LocalModuleDependency(localModule, undefined, false); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - dep = this.newRequireItemDependency(request); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - } - deps.push(dep); - }); - const dep = this.newRequireArrayDependency(deps, param.range); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - processItem(parser, expr, param, namedModule) { - if (param.isConditional()) { - param.options.forEach(param => { - const result = this.processItem(parser, expr, param); - if (result === undefined) { - this.processContext(parser, expr, param); - } - }); - return true; - } else if (param.isString()) { - let dep, localModule; - if (param.string === "require") { - dep = new ConstDependency("__webpack_require__", param.range, [ - RuntimeGlobals.require - ]); - } else if (param.string === "exports") { - dep = new ConstDependency("exports", param.range, [ - RuntimeGlobals.exports - ]); - } else if (param.string === "module") { - dep = new ConstDependency("module", param.range, [ - RuntimeGlobals.module - ]); - } else if ( - (localModule = getLocalModule(parser.state, param.string, namedModule)) - ) { - localModule.flagUsed(); - dep = new LocalModuleDependency(localModule, param.range, false); - } else { - dep = this.newRequireItemDependency(param.string, param.range); - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - processContext(parser, expr, param) { - const dep = ContextDependencyHelpers.create( - AMDRequireContextDependency, - param.range, - param, - expr, - this.options, - { - category: "amd" - }, - parser - ); - if (!dep) return; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - - processCallDefine(parser, expr) { - let array, fn, obj, namedModule; - switch (expr.arguments.length) { - case 1: - if (isCallable(expr.arguments[0])) { - // define(f() {…}) - fn = expr.arguments[0]; - } else if (expr.arguments[0].type === "ObjectExpression") { - // define({…}) - obj = expr.arguments[0]; - } else { - // define(expr) - // unclear if function or object - obj = fn = expr.arguments[0]; - } - break; - case 2: - if (expr.arguments[0].type === "Literal") { - namedModule = expr.arguments[0].value; - // define("…", …) - if (isCallable(expr.arguments[1])) { - // define("…", f() {…}) - fn = expr.arguments[1]; - } else if (expr.arguments[1].type === "ObjectExpression") { - // define("…", {…}) - obj = expr.arguments[1]; - } else { - // define("…", expr) - // unclear if function or object - obj = fn = expr.arguments[1]; - } - } else { - array = expr.arguments[0]; - if (isCallable(expr.arguments[1])) { - // define([…], f() {}) - fn = expr.arguments[1]; - } else if (expr.arguments[1].type === "ObjectExpression") { - // define([…], {…}) - obj = expr.arguments[1]; - } else { - // define([…], expr) - // unclear if function or object - obj = fn = expr.arguments[1]; - } - } - break; - case 3: - // define("…", […], f() {…}) - namedModule = expr.arguments[0].value; - array = expr.arguments[1]; - if (isCallable(expr.arguments[2])) { - // define("…", […], f() {}) - fn = expr.arguments[2]; - } else if (expr.arguments[2].type === "ObjectExpression") { - // define("…", […], {…}) - obj = expr.arguments[2]; - } else { - // define("…", […], expr) - // unclear if function or object - obj = fn = expr.arguments[2]; - } - break; - default: - return; - } - DynamicExports.bailout(parser.state); - let fnParams = null; - let fnParamsOffset = 0; - if (fn) { - if (isUnboundFunctionExpression(fn)) { - fnParams = fn.params; - } else if (isBoundFunctionExpression(fn)) { - fnParams = fn.callee.object.params; - fnParamsOffset = fn.arguments.length - 1; - if (fnParamsOffset < 0) { - fnParamsOffset = 0; - } - } - } - let fnRenames = new Map(); - if (array) { - const identifiers = {}; - const param = parser.evaluateExpression(array); - const result = this.processArray( - parser, - expr, - param, - identifiers, - namedModule - ); - if (!result) return; - if (fnParams) { - fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { - if (identifiers[idx]) { - fnRenames.set(param.name, parser.getVariableInfo(identifiers[idx])); - return false; - } - return true; - }); - } - } else { - const identifiers = ["require", "exports", "module"]; - if (fnParams) { - fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { - if (identifiers[idx]) { - fnRenames.set(param.name, parser.getVariableInfo(identifiers[idx])); - return false; - } - return true; - }); - } - } - let inTry; - if (fn && isUnboundFunctionExpression(fn)) { - inTry = parser.scope.inTry; - parser.inScope(fnParams, () => { - for (const [name, varInfo] of fnRenames) { - parser.setVariable(name, varInfo); - } - parser.scope.inTry = inTry; - if (fn.body.type === "BlockStatement") { - parser.detectMode(fn.body.body); - const prev = parser.prevStatement; - parser.preWalkStatement(fn.body); - parser.prevStatement = prev; - parser.walkStatement(fn.body); - } else { - parser.walkExpression(fn.body); - } - }); - } else if (fn && isBoundFunctionExpression(fn)) { - inTry = parser.scope.inTry; - parser.inScope( - fn.callee.object.params.filter( - i => !["require", "module", "exports"].includes(i.name) - ), - () => { - for (const [name, varInfo] of fnRenames) { - parser.setVariable(name, varInfo); - } - parser.scope.inTry = inTry; - if (fn.callee.object.body.type === "BlockStatement") { - parser.detectMode(fn.callee.object.body.body); - const prev = parser.prevStatement; - parser.preWalkStatement(fn.callee.object.body); - parser.prevStatement = prev; - parser.walkStatement(fn.callee.object.body); - } else { - parser.walkExpression(fn.callee.object.body); - } - } - ); - if (fn.arguments) { - parser.walkExpressions(fn.arguments); - } - } else if (fn || obj) { - parser.walkExpression(fn || obj); - } - - const dep = this.newDefineDependency( - expr.range, - array ? array.range : null, - fn ? fn.range : null, - obj ? obj.range : null, - namedModule ? namedModule : null - ); - dep.loc = expr.loc; - if (namedModule) { - dep.localModule = addLocalModule(parser.state, namedModule); - } - parser.state.module.addPresentationalDependency(dep); - return true; - } - - newDefineDependency( - range, - arrayRange, - functionRange, - objectRange, - namedModule - ) { - return new AMDDefineDependency( - range, - arrayRange, - functionRange, - objectRange, - namedModule - ); - } - newRequireArrayDependency(depsArray, range) { - return new AMDRequireArrayDependency(depsArray, range); - } - newRequireItemDependency(request, range) { - return new AMDRequireItemDependency(request, range); - } -} -module.exports = AMDDefineDependencyParserPlugin; - - -/***/ }), - -/***/ 88646: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const { - approve, - evaluateToIdentifier, - evaluateToString, - toConstantDependency -} = __webpack_require__(97574); - -const AMDDefineDependency = __webpack_require__(80463); -const AMDDefineDependencyParserPlugin = __webpack_require__(29580); -const AMDRequireArrayDependency = __webpack_require__(73090); -const AMDRequireContextDependency = __webpack_require__(39985); -const AMDRequireDependenciesBlockParserPlugin = __webpack_require__(8436); -const AMDRequireDependency = __webpack_require__(45137); -const AMDRequireItemDependency = __webpack_require__(61261); -const { - AMDDefineRuntimeModule, - AMDOptionsRuntimeModule -} = __webpack_require__(14876); -const ConstDependency = __webpack_require__(14367); -const LocalModuleDependency = __webpack_require__(81600); -const UnsupportedDependency = __webpack_require__(42809); - -/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -class AMDPlugin { - /** - * @param {Record} amdOptions the AMD options - */ - constructor(amdOptions) { - this.amdOptions = amdOptions; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const amdOptions = this.amdOptions; - compiler.hooks.compilation.tap( - "AMDPlugin", - (compilation, { contextModuleFactory, normalModuleFactory }) => { - compilation.dependencyTemplates.set( - AMDRequireDependency, - new AMDRequireDependency.Template() - ); - - compilation.dependencyFactories.set( - AMDRequireItemDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - AMDRequireItemDependency, - new AMDRequireItemDependency.Template() - ); - - compilation.dependencyTemplates.set( - AMDRequireArrayDependency, - new AMDRequireArrayDependency.Template() - ); - - compilation.dependencyFactories.set( - AMDRequireContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - AMDRequireContextDependency, - new AMDRequireContextDependency.Template() - ); - - compilation.dependencyTemplates.set( - AMDDefineDependency, - new AMDDefineDependency.Template() - ); - - compilation.dependencyTemplates.set( - UnsupportedDependency, - new UnsupportedDependency.Template() - ); - - compilation.dependencyTemplates.set( - LocalModuleDependency, - new LocalModuleDependency.Template() - ); - - compilation.hooks.runtimeRequirementInModule - .for(RuntimeGlobals.amdDefine) - .tap("AMDPlugin", (module, set) => { - set.add(RuntimeGlobals.require); - }); - - compilation.hooks.runtimeRequirementInModule - .for(RuntimeGlobals.amdOptions) - .tap("AMDPlugin", (module, set) => { - set.add(RuntimeGlobals.requireScope); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.amdDefine) - .tap("AMDPlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new AMDDefineRuntimeModule()); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.amdOptions) - .tap("AMDPlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new AMDOptionsRuntimeModule(amdOptions) - ); - }); - - const handler = (parser, parserOptions) => { - if (parserOptions.amd !== undefined && !parserOptions.amd) return; - - const tapOptionsHooks = (optionExpr, rootName, getMembers) => { - parser.hooks.expression - .for(optionExpr) - .tap( - "AMDPlugin", - toConstantDependency(parser, RuntimeGlobals.amdOptions, [ - RuntimeGlobals.amdOptions - ]) - ); - parser.hooks.evaluateIdentifier - .for(optionExpr) - .tap( - "AMDPlugin", - evaluateToIdentifier(optionExpr, rootName, getMembers, true) - ); - parser.hooks.evaluateTypeof - .for(optionExpr) - .tap("AMDPlugin", evaluateToString("object")); - parser.hooks.typeof - .for(optionExpr) - .tap( - "AMDPlugin", - toConstantDependency(parser, JSON.stringify("object")) - ); - }; - - new AMDRequireDependenciesBlockParserPlugin(parserOptions).apply( - parser - ); - new AMDDefineDependencyParserPlugin(parserOptions).apply(parser); - - tapOptionsHooks("define.amd", "define", () => "amd"); - tapOptionsHooks("require.amd", "require", () => ["amd"]); - tapOptionsHooks( - "__webpack_amd_options__", - "__webpack_amd_options__", - () => [] - ); - - parser.hooks.expression.for("define").tap("AMDPlugin", expr => { - const dep = new ConstDependency( - RuntimeGlobals.amdDefine, - expr.range, - [RuntimeGlobals.amdDefine] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.typeof - .for("define") - .tap( - "AMDPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - parser.hooks.evaluateTypeof - .for("define") - .tap("AMDPlugin", evaluateToString("function")); - parser.hooks.canRename.for("define").tap("AMDPlugin", approve); - parser.hooks.rename.for("define").tap("AMDPlugin", expr => { - const dep = new ConstDependency( - RuntimeGlobals.amdDefine, - expr.range, - [RuntimeGlobals.amdDefine] - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return false; - }); - parser.hooks.typeof - .for("require") - .tap( - "AMDPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - parser.hooks.evaluateTypeof - .for("require") - .tap("AMDPlugin", evaluateToString("function")); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("AMDPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("AMDPlugin", handler); - } - ); - } -} - -module.exports = AMDPlugin; - - -/***/ }), - -/***/ 73090: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DependencyTemplate = __webpack_require__(94086); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class AMDRequireArrayDependency extends NullDependency { - constructor(depsArray, range) { - super(); - - this.depsArray = depsArray; - this.range = range; - } - - get type() { - return "amd require array"; - } - - get category() { - return "amd"; - } - - serialize(context) { - const { write } = context; - - write(this.depsArray); - write(this.range); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.depsArray = read(); - this.range = read(); - - super.deserialize(context); - } -} - -makeSerializable( - AMDRequireArrayDependency, - "webpack/lib/dependencies/AMDRequireArrayDependency" -); - -AMDRequireArrayDependency.Template = class AMDRequireArrayDependencyTemplate extends ( - DependencyTemplate -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {AMDRequireArrayDependency} */ (dependency); - const content = this.getContent(dep, templateContext); - source.replace(dep.range[0], dep.range[1] - 1, content); - } - - getContent(dep, templateContext) { - const requires = dep.depsArray.map(dependency => { - return this.contentForDependency(dependency, templateContext); - }); - return `[${requires.join(", ")}]`; - } - - contentForDependency( - dep, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - if (typeof dep === "string") { - return dep; - } - - if (dep.localModule) { - return dep.localModule.variableName(); - } else { - return runtimeTemplate.moduleExports({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - runtimeRequirements - }); - } - } -}; - -module.exports = AMDRequireArrayDependency; - - -/***/ }), - -/***/ 39985: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); - -class AMDRequireContextDependency extends ContextDependency { - constructor(options, range, valueRange) { - super(options); - - this.range = range; - this.valueRange = valueRange; - } - - get type() { - return "amd require context"; - } - - get category() { - return "amd"; - } - - serialize(context) { - const { write } = context; - - write(this.range); - write(this.valueRange); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.range = read(); - this.valueRange = read(); - - super.deserialize(context); - } -} - -makeSerializable( - AMDRequireContextDependency, - "webpack/lib/dependencies/AMDRequireContextDependency" -); - -AMDRequireContextDependency.Template = __webpack_require__(5160); - -module.exports = AMDRequireContextDependency; - - -/***/ }), - -/***/ 93897: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const AsyncDependenciesBlock = __webpack_require__(42290); -const makeSerializable = __webpack_require__(65764); - -class AMDRequireDependenciesBlock extends AsyncDependenciesBlock { - constructor(loc, request) { - super(null, loc, request); - } -} - -makeSerializable( - AMDRequireDependenciesBlock, - "webpack/lib/dependencies/AMDRequireDependenciesBlock" -); - -module.exports = AMDRequireDependenciesBlock; - - -/***/ }), - -/***/ 8436: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const UnsupportedFeatureWarning = __webpack_require__(17623); -const AMDRequireArrayDependency = __webpack_require__(73090); -const AMDRequireContextDependency = __webpack_require__(39985); -const AMDRequireDependenciesBlock = __webpack_require__(93897); -const AMDRequireDependency = __webpack_require__(45137); -const AMDRequireItemDependency = __webpack_require__(61261); -const ConstDependency = __webpack_require__(14367); -const ContextDependencyHelpers = __webpack_require__(32556); -const LocalModuleDependency = __webpack_require__(81600); -const { getLocalModule } = __webpack_require__(59081); -const UnsupportedDependency = __webpack_require__(42809); -const getFunctionExpression = __webpack_require__(17926); - -class AMDRequireDependenciesBlockParserPlugin { - constructor(options) { - this.options = options; - } - - processFunctionArgument(parser, expression) { - let bindThis = true; - const fnData = getFunctionExpression(expression); - if (fnData) { - parser.inScope( - fnData.fn.params.filter(i => { - return !["require", "module", "exports"].includes(i.name); - }), - () => { - if (fnData.fn.body.type === "BlockStatement") { - parser.walkStatement(fnData.fn.body); - } else { - parser.walkExpression(fnData.fn.body); - } - } - ); - parser.walkExpressions(fnData.expressions); - if (fnData.needThis === false) { - bindThis = false; - } - } else { - parser.walkExpression(expression); - } - return bindThis; - } - - apply(parser) { - parser.hooks.call - .for("require") - .tap( - "AMDRequireDependenciesBlockParserPlugin", - this.processCallRequire.bind(this, parser) - ); - } - - processArray(parser, expr, param) { - if (param.isArray()) { - for (const p of param.items) { - const result = this.processItem(parser, expr, p); - if (result === undefined) { - this.processContext(parser, expr, p); - } - } - return true; - } else if (param.isConstArray()) { - const deps = []; - for (const request of param.array) { - let dep, localModule; - if (request === "require") { - dep = "__webpack_require__"; - } else if (["exports", "module"].includes(request)) { - dep = request; - } else if ((localModule = getLocalModule(parser.state, request))) { - localModule.flagUsed(); - dep = new LocalModuleDependency(localModule, undefined, false); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - } else { - dep = this.newRequireItemDependency(request); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - } - deps.push(dep); - } - const dep = this.newRequireArrayDependency(deps, param.range); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - processItem(parser, expr, param) { - if (param.isConditional()) { - for (const p of param.options) { - const result = this.processItem(parser, expr, p); - if (result === undefined) { - this.processContext(parser, expr, p); - } - } - return true; - } else if (param.isString()) { - let dep, localModule; - if (param.string === "require") { - dep = new ConstDependency("__webpack_require__", param.string, [ - RuntimeGlobals.require - ]); - } else if (param.string === "module") { - dep = new ConstDependency( - parser.state.module.buildInfo.moduleArgument, - param.range, - [RuntimeGlobals.module] - ); - } else if (param.string === "exports") { - dep = new ConstDependency( - parser.state.module.buildInfo.exportsArgument, - param.range, - [RuntimeGlobals.exports] - ); - } else if ((localModule = getLocalModule(parser.state, param.string))) { - localModule.flagUsed(); - dep = new LocalModuleDependency(localModule, param.range, false); - } else { - dep = this.newRequireItemDependency(param.string, param.range); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - processContext(parser, expr, param) { - const dep = ContextDependencyHelpers.create( - AMDRequireContextDependency, - param.range, - param, - expr, - this.options, - { - category: "amd" - }, - parser - ); - if (!dep) return; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - - processArrayForRequestString(param) { - if (param.isArray()) { - const result = param.items.map(item => - this.processItemForRequestString(item) - ); - if (result.every(Boolean)) return result.join(" "); - } else if (param.isConstArray()) { - return param.array.join(" "); - } - } - - processItemForRequestString(param) { - if (param.isConditional()) { - const result = param.options.map(item => - this.processItemForRequestString(item) - ); - if (result.every(Boolean)) return result.join("|"); - } else if (param.isString()) { - return param.string; - } - } - - processCallRequire(parser, expr) { - let param; - let depBlock; - let dep; - let result; - - const old = parser.state.current; - - if (expr.arguments.length >= 1) { - param = parser.evaluateExpression(expr.arguments[0]); - depBlock = this.newRequireDependenciesBlock( - expr.loc, - this.processArrayForRequestString(param) - ); - dep = this.newRequireDependency( - expr.range, - param.range, - expr.arguments.length > 1 ? expr.arguments[1].range : null, - expr.arguments.length > 2 ? expr.arguments[2].range : null - ); - dep.loc = expr.loc; - depBlock.addDependency(dep); - - parser.state.current = depBlock; - } - - if (expr.arguments.length === 1) { - parser.inScope([], () => { - result = this.processArray(parser, expr, param); - }); - parser.state.current = old; - if (!result) return; - parser.state.current.addBlock(depBlock); - return true; - } - - if (expr.arguments.length === 2 || expr.arguments.length === 3) { - try { - parser.inScope([], () => { - result = this.processArray(parser, expr, param); - }); - if (!result) { - const dep = new UnsupportedDependency("unsupported", expr.range); - old.addPresentationalDependency(dep); - if (parser.state.module) { - parser.state.module.addError( - new UnsupportedFeatureWarning( - "Cannot statically analyse 'require(…, …)' in line " + - expr.loc.start.line, - expr.loc - ) - ); - } - depBlock = null; - return true; - } - dep.functionBindThis = this.processFunctionArgument( - parser, - expr.arguments[1] - ); - if (expr.arguments.length === 3) { - dep.errorCallbackBindThis = this.processFunctionArgument( - parser, - expr.arguments[2] - ); - } - } finally { - parser.state.current = old; - if (depBlock) parser.state.current.addBlock(depBlock); - } - return true; - } - } - - newRequireDependenciesBlock(loc, request) { - return new AMDRequireDependenciesBlock(loc, request); - } - newRequireDependency( - outerRange, - arrayRange, - functionRange, - errorCallbackRange - ) { - return new AMDRequireDependency( - outerRange, - arrayRange, - functionRange, - errorCallbackRange - ); - } - newRequireItemDependency(request, range) { - return new AMDRequireItemDependency(request, range); - } - newRequireArrayDependency(depsArray, range) { - return new AMDRequireArrayDependency(depsArray, range); - } -} -module.exports = AMDRequireDependenciesBlockParserPlugin; - - -/***/ }), - -/***/ 45137: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class AMDRequireDependency extends NullDependency { - constructor(outerRange, arrayRange, functionRange, errorCallbackRange) { - super(); - - this.outerRange = outerRange; - this.arrayRange = arrayRange; - this.functionRange = functionRange; - this.errorCallbackRange = errorCallbackRange; - this.functionBindThis = false; - this.errorCallbackBindThis = false; - } - - get category() { - return "amd"; - } - - serialize(context) { - const { write } = context; - - write(this.outerRange); - write(this.arrayRange); - write(this.functionRange); - write(this.errorCallbackRange); - write(this.functionBindThis); - write(this.errorCallbackBindThis); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.outerRange = read(); - this.arrayRange = read(); - this.functionRange = read(); - this.errorCallbackRange = read(); - this.functionBindThis = read(); - this.errorCallbackBindThis = read(); - - super.deserialize(context); - } -} - -makeSerializable( - AMDRequireDependency, - "webpack/lib/dependencies/AMDRequireDependency" -); - -AMDRequireDependency.Template = class AMDRequireDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {AMDRequireDependency} */ (dependency); - const depBlock = /** @type {AsyncDependenciesBlock} */ ( - moduleGraph.getParentBlock(dep) - ); - const promise = runtimeTemplate.blockPromise({ - chunkGraph, - block: depBlock, - message: "AMD require", - runtimeRequirements - }); - - // has array range but no function range - if (dep.arrayRange && !dep.functionRange) { - const startBlock = `${promise}.then(function() {`; - const endBlock = `;})['catch'](${RuntimeGlobals.uncaughtErrorHandler})`; - runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); - - source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); - - source.replace(dep.arrayRange[1], dep.outerRange[1] - 1, endBlock); - - return; - } - - // has function range but no array range - if (dep.functionRange && !dep.arrayRange) { - const startBlock = `${promise}.then((`; - const endBlock = `).bind(exports, __webpack_require__, exports, module))['catch'](${RuntimeGlobals.uncaughtErrorHandler})`; - runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); - - source.replace(dep.outerRange[0], dep.functionRange[0] - 1, startBlock); - - source.replace(dep.functionRange[1], dep.outerRange[1] - 1, endBlock); - - return; - } - - // has array range, function range, and errorCallbackRange - if (dep.arrayRange && dep.functionRange && dep.errorCallbackRange) { - const startBlock = `${promise}.then(function() { `; - const errorRangeBlock = `}${ - dep.functionBindThis ? ".bind(this)" : "" - })['catch'](`; - const endBlock = `${dep.errorCallbackBindThis ? ".bind(this)" : ""})`; - - source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); - - source.insert(dep.arrayRange[0], "var __WEBPACK_AMD_REQUIRE_ARRAY__ = "); - - source.replace(dep.arrayRange[1], dep.functionRange[0] - 1, "; ("); - - source.insert( - dep.functionRange[1], - ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" - ); - - source.replace( - dep.functionRange[1], - dep.errorCallbackRange[0] - 1, - errorRangeBlock - ); - - source.replace( - dep.errorCallbackRange[1], - dep.outerRange[1] - 1, - endBlock - ); - - return; - } - - // has array range, function range, but no errorCallbackRange - if (dep.arrayRange && dep.functionRange) { - const startBlock = `${promise}.then(function() { `; - const endBlock = `}${ - dep.functionBindThis ? ".bind(this)" : "" - })['catch'](${RuntimeGlobals.uncaughtErrorHandler})`; - runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); - - source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); - - source.insert(dep.arrayRange[0], "var __WEBPACK_AMD_REQUIRE_ARRAY__ = "); - - source.replace(dep.arrayRange[1], dep.functionRange[0] - 1, "; ("); - - source.insert( - dep.functionRange[1], - ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" - ); - - source.replace(dep.functionRange[1], dep.outerRange[1] - 1, endBlock); - } - } -}; - -module.exports = AMDRequireDependency; - - -/***/ }), - -/***/ 61261: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsRequireId = __webpack_require__(59583); - -class AMDRequireItemDependency extends ModuleDependency { - constructor(request, range) { - super(request); - - this.range = range; - } - - get type() { - return "amd require"; - } - - get category() { - return "amd"; - } -} - -makeSerializable( - AMDRequireItemDependency, - "webpack/lib/dependencies/AMDRequireItemDependency" -); - -AMDRequireItemDependency.Template = ModuleDependencyTemplateAsRequireId; - -module.exports = AMDRequireItemDependency; - - -/***/ }), - -/***/ 14876: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class AMDDefineRuntimeModule extends RuntimeModule { - constructor() { - super("amd define"); - } - - /** - * @returns {string} runtime code - */ - generate() { - return Template.asString([ - `${RuntimeGlobals.amdDefine} = function () {`, - Template.indent("throw new Error('define cannot be used indirect');"), - "};" - ]); - } -} - -class AMDOptionsRuntimeModule extends RuntimeModule { - /** - * @param {Record} options the AMD options - */ - constructor(options) { - super("amd options"); - this.options = options; - } - - /** - * @returns {string} runtime code - */ - generate() { - return Template.asString([ - `${RuntimeGlobals.amdOptions} = ${JSON.stringify(this.options)};` - ]); - } -} - -exports.AMDDefineRuntimeModule = AMDDefineRuntimeModule; -exports.AMDOptionsRuntimeModule = AMDOptionsRuntimeModule; - - -/***/ }), - -/***/ 83106: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const DependencyTemplate = __webpack_require__(94086); -const InitFragment = __webpack_require__(64768); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../util/Hash")} Hash */ - -class CachedConstDependency extends NullDependency { - constructor(expression, range, identifier) { - super(); - - this.expression = expression; - this.range = range; - this.identifier = identifier; - this._hashUpdate = undefined; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) - this._hashUpdate = "" + this.identifier + this.range + this.expression; - hash.update(this._hashUpdate); - } - - serialize(context) { - const { write } = context; - - write(this.expression); - write(this.range); - write(this.identifier); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.expression = read(); - this.range = read(); - this.identifier = read(); - - super.deserialize(context); - } -} - -makeSerializable( - CachedConstDependency, - "webpack/lib/dependencies/CachedConstDependency" -); - -CachedConstDependency.Template = class CachedConstDependencyTemplate extends ( - DependencyTemplate -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, dependencyTemplates, initFragments } - ) { - const dep = /** @type {CachedConstDependency} */ (dependency); - - initFragments.push( - new InitFragment( - `var ${dep.identifier} = ${dep.expression};\n`, - InitFragment.STAGE_CONSTANTS, - 0, - `const ${dep.identifier}` - ) - ); - - if (typeof dep.range === "number") { - source.insert(dep.range, dep.identifier); - - return; - } - - source.replace(dep.range[0], dep.range[1] - 1, dep.identifier); - } -}; - -module.exports = CachedConstDependency; - - -/***/ }), - -/***/ 99458: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); - -exports.handleDependencyBase = (depBase, module, runtimeRequirements) => { - let base = undefined; - let type; - switch (depBase) { - case "exports": - runtimeRequirements.add(RuntimeGlobals.exports); - base = module.exportsArgument; - type = "expression"; - break; - case "module.exports": - runtimeRequirements.add(RuntimeGlobals.module); - base = `${module.moduleArgument}.exports`; - type = "expression"; - break; - case "this": - runtimeRequirements.add(RuntimeGlobals.thisAsExports); - base = "this"; - type = "expression"; - break; - case "Object.defineProperty(exports)": - runtimeRequirements.add(RuntimeGlobals.exports); - base = module.exportsArgument; - type = "Object.defineProperty"; - break; - case "Object.defineProperty(module.exports)": - runtimeRequirements.add(RuntimeGlobals.module); - base = `${module.moduleArgument}.exports`; - type = "Object.defineProperty"; - break; - case "Object.defineProperty(this)": - runtimeRequirements.add(RuntimeGlobals.thisAsExports); - base = "this"; - type = "Object.defineProperty"; - break; - default: - throw new Error(`Unsupported base ${depBase}`); - } - - return [type, base]; -}; - - -/***/ }), - -/***/ 70241: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const { UsageState } = __webpack_require__(13168); -const Template = __webpack_require__(43841); -const { equals } = __webpack_require__(28087); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const { handleDependencyBase } = __webpack_require__(99458); -const ModuleDependency = __webpack_require__(99809); -const processExportInfo = __webpack_require__(14666); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const idsSymbol = Symbol("CommonJsExportRequireDependency.ids"); - -const EMPTY_OBJECT = {}; - -class CommonJsExportRequireDependency extends ModuleDependency { - constructor(range, valueRange, base, names, request, ids, resultUsed) { - super(request); - this.range = range; - this.valueRange = valueRange; - this.base = base; - this.names = names; - this.ids = ids; - this.resultUsed = resultUsed; - this.asiSafe = undefined; - } - - get type() { - return "cjs export require"; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return Dependency.TRANSITIVE; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string[]} the imported id - */ - getIds(moduleGraph) { - return moduleGraph.getMeta(this)[idsSymbol] || this.ids; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {string[]} ids the imported ids - * @returns {void} - */ - setIds(moduleGraph, ids) { - moduleGraph.getMeta(this)[idsSymbol] = ids; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - const ids = this.getIds(moduleGraph); - const getFullResult = () => { - if (ids.length === 0) { - return Dependency.EXPORTS_OBJECT_REFERENCED; - } else { - return [ - { - name: ids, - canMangle: false - } - ]; - } - }; - if (this.resultUsed) return getFullResult(); - let exportsInfo = moduleGraph.getExportsInfo( - moduleGraph.getParentModule(this) - ); - for (const name of this.names) { - const exportInfo = exportsInfo.getReadOnlyExportInfo(name); - const used = exportInfo.getUsed(runtime); - if (used === UsageState.Unused) return Dependency.NO_EXPORTS_REFERENCED; - if (used !== UsageState.OnlyPropertiesUsed) return getFullResult(); - exportsInfo = exportInfo.exportsInfo; - if (!exportsInfo) return getFullResult(); - } - if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { - return getFullResult(); - } - /** @type {string[][]} */ - const referencedExports = []; - for (const exportInfo of exportsInfo.orderedExports) { - processExportInfo( - runtime, - referencedExports, - ids.concat(exportInfo.name), - exportInfo, - false - ); - } - return referencedExports.map(name => ({ - name, - canMangle: false - })); - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - const ids = this.getIds(moduleGraph); - if (this.names.length === 1) { - const name = this.names[0]; - const from = moduleGraph.getConnection(this); - if (!from) return; - return { - exports: [ - { - name, - from, - export: ids.length === 0 ? null : ids, - // we can't mangle names that are in an empty object - // because one could access the prototype property - // when export isn't set yet - canMangle: !(name in EMPTY_OBJECT) && false - } - ], - dependencies: [from.module] - }; - } else if (this.names.length > 0) { - const name = this.names[0]; - return { - exports: [ - { - name, - // we can't mangle names that are in an empty object - // because one could access the prototype property - // when export isn't set yet - canMangle: !(name in EMPTY_OBJECT) && false - } - ], - dependencies: undefined - }; - } else { - const from = moduleGraph.getConnection(this); - if (!from) return; - const reexportInfo = this.getStarReexports( - moduleGraph, - undefined, - from.module - ); - if (reexportInfo) { - return { - exports: Array.from(reexportInfo.exports, name => { - return { - name, - from, - export: ids.concat(name), - canMangle: !(name in EMPTY_OBJECT) && false - }; - }), - // TODO handle deep reexports - dependencies: [from.module] - }; - } else { - return { - exports: true, - from: ids.length === 0 ? from : undefined, - canMangle: false, - dependencies: [from.module] - }; - } - } - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @param {Module} importedModule the imported module (optional) - * @returns {{exports?: Set, checked?: Set}} information - */ - getStarReexports( - moduleGraph, - runtime, - importedModule = moduleGraph.getModule(this) - ) { - let importedExportsInfo = moduleGraph.getExportsInfo(importedModule); - const ids = this.getIds(moduleGraph); - if (ids.length > 0) - importedExportsInfo = importedExportsInfo.getNestedExportsInfo(ids); - let exportsInfo = moduleGraph.getExportsInfo( - moduleGraph.getParentModule(this) - ); - if (this.names.length > 0) - exportsInfo = exportsInfo.getNestedExportsInfo(this.names); - - const noExtraExports = - importedExportsInfo && - importedExportsInfo.otherExportsInfo.provided === false; - const noExtraImports = - exportsInfo && - exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused; - - if (!noExtraExports && !noExtraImports) { - return; - } - - const isNamespaceImport = - importedModule.getExportsType(moduleGraph, false) === "namespace"; - - /** @type {Set} */ - const exports = new Set(); - /** @type {Set} */ - const checked = new Set(); - - if (noExtraImports) { - for (const exportInfo of exportsInfo.orderedExports) { - const name = exportInfo.name; - if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; - if (name === "__esModule" && isNamespaceImport) { - exports.add(name); - } else if (importedExportsInfo) { - const importedExportInfo = - importedExportsInfo.getReadOnlyExportInfo(name); - if (importedExportInfo.provided === false) continue; - exports.add(name); - if (importedExportInfo.provided === true) continue; - checked.add(name); - } else { - exports.add(name); - checked.add(name); - } - } - } else if (noExtraExports) { - for (const importedExportInfo of importedExportsInfo.orderedExports) { - const name = importedExportInfo.name; - if (importedExportInfo.provided === false) continue; - if (exportsInfo) { - const exportInfo = exportsInfo.getReadOnlyExportInfo(name); - if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; - } - exports.add(name); - if (importedExportInfo.provided === true) continue; - checked.add(name); - } - if (isNamespaceImport) { - exports.add("__esModule"); - checked.delete("__esModule"); - } - } - - return { exports, checked }; - } - - serialize(context) { - const { write } = context; - write(this.asiSafe); - write(this.range); - write(this.valueRange); - write(this.base); - write(this.names); - write(this.ids); - write(this.resultUsed); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.asiSafe = read(); - this.range = read(); - this.valueRange = read(); - this.base = read(); - this.names = read(); - this.ids = read(); - this.resultUsed = read(); - super.deserialize(context); - } -} - -makeSerializable( - CommonJsExportRequireDependency, - "webpack/lib/dependencies/CommonJsExportRequireDependency" -); - -CommonJsExportRequireDependency.Template = class CommonJsExportRequireDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { - module, - runtimeTemplate, - chunkGraph, - moduleGraph, - runtimeRequirements, - runtime - } - ) { - const dep = /** @type {CommonJsExportRequireDependency} */ (dependency); - const used = moduleGraph - .getExportsInfo(module) - .getUsedName(dep.names, runtime); - - const [type, base] = handleDependencyBase( - dep.base, - module, - runtimeRequirements - ); - - const importedModule = moduleGraph.getModule(dep); - let requireExpr = runtimeTemplate.moduleExports({ - module: importedModule, - chunkGraph, - request: dep.request, - weak: dep.weak, - runtimeRequirements - }); - if (importedModule) { - const ids = dep.getIds(moduleGraph); - const usedImported = moduleGraph - .getExportsInfo(importedModule) - .getUsedName(ids, runtime); - if (usedImported) { - const comment = equals(usedImported, ids) - ? "" - : Template.toNormalComment(propertyAccess(ids)) + " "; - requireExpr += `${comment}${propertyAccess(usedImported)}`; - } - } - - switch (type) { - case "expression": - source.replace( - dep.range[0], - dep.range[1] - 1, - used - ? `${base}${propertyAccess(used)} = ${requireExpr}` - : `/* unused reexport */ ${requireExpr}` - ); - return; - case "Object.defineProperty": - throw new Error("TODO"); - default: - throw new Error("Unexpected type"); - } - } -}; - -module.exports = CommonJsExportRequireDependency; - - -/***/ }), - -/***/ 65086: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const InitFragment = __webpack_require__(64768); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const { handleDependencyBase } = __webpack_require__(99458); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -const EMPTY_OBJECT = {}; - -class CommonJsExportsDependency extends NullDependency { - constructor(range, valueRange, base, names) { - super(); - this.range = range; - this.valueRange = valueRange; - this.base = base; - this.names = names; - } - - get type() { - return "cjs exports"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - const name = this.names[0]; - return { - exports: [ - { - name, - // we can't mangle names that are in an empty object - // because one could access the prototype property - // when export isn't set yet - canMangle: !(name in EMPTY_OBJECT) - } - ], - dependencies: undefined - }; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.valueRange); - write(this.base); - write(this.names); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.valueRange = read(); - this.base = read(); - this.names = read(); - super.deserialize(context); - } -} - -makeSerializable( - CommonJsExportsDependency, - "webpack/lib/dependencies/CommonJsExportsDependency" -); - -CommonJsExportsDependency.Template = class CommonJsExportsDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { module, moduleGraph, initFragments, runtimeRequirements, runtime } - ) { - const dep = /** @type {CommonJsExportsDependency} */ (dependency); - const used = moduleGraph - .getExportsInfo(module) - .getUsedName(dep.names, runtime); - - const [type, base] = handleDependencyBase( - dep.base, - module, - runtimeRequirements - ); - - switch (type) { - case "expression": - if (!used) { - initFragments.push( - new InitFragment( - "var __webpack_unused_export__;\n", - InitFragment.STAGE_CONSTANTS, - 0, - "__webpack_unused_export__" - ) - ); - source.replace( - dep.range[0], - dep.range[1] - 1, - "__webpack_unused_export__" - ); - return; - } - source.replace( - dep.range[0], - dep.range[1] - 1, - `${base}${propertyAccess(used)}` - ); - return; - case "Object.defineProperty": - if (!used) { - initFragments.push( - new InitFragment( - "var __webpack_unused_export__;\n", - InitFragment.STAGE_CONSTANTS, - 0, - "__webpack_unused_export__" - ) - ); - source.replace( - dep.range[0], - dep.valueRange[0] - 1, - "__webpack_unused_export__ = (" - ); - source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); - return; - } - source.replace( - dep.range[0], - dep.valueRange[0] - 1, - `Object.defineProperty(${base}${propertyAccess( - used.slice(0, -1) - )}, ${JSON.stringify(used[used.length - 1])}, (` - ); - source.replace(dep.valueRange[1], dep.range[1] - 1, "))"); - return; - } - } -}; - -module.exports = CommonJsExportsDependency; - - -/***/ }), - -/***/ 26630: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const formatLocation = __webpack_require__(24014); -const { evaluateToString } = __webpack_require__(97574); -const propertyAccess = __webpack_require__(67603); -const CommonJsExportRequireDependency = __webpack_require__(70241); -const CommonJsExportsDependency = __webpack_require__(65086); -const CommonJsSelfReferenceDependency = __webpack_require__(27647); -const DynamicExports = __webpack_require__(35485); -const HarmonyExports = __webpack_require__(40699); -const ModuleDecoratorDependency = __webpack_require__(1569); - -/** @typedef {import("estree").Expression} ExpressionNode */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ - -const getValueOfPropertyDescription = expr => { - if (expr.type !== "ObjectExpression") return; - for (const property of expr.properties) { - if (property.computed) continue; - const key = property.key; - if (key.type !== "Identifier" || key.name !== "value") continue; - return property.value; - } -}; - -const isTruthyLiteral = expr => { - switch (expr.type) { - case "Literal": - return !!expr.value; - case "UnaryExpression": - if (expr.operator === "!") return isFalsyLiteral(expr.argument); - } - return false; -}; - -const isFalsyLiteral = expr => { - switch (expr.type) { - case "Literal": - return !expr.value; - case "UnaryExpression": - if (expr.operator === "!") return isTruthyLiteral(expr.argument); - } - return false; -}; - -/** - * @param {JavascriptParser} parser the parser - * @param {ExpressionNode} expr expression - * @returns {{ argument: BasicEvaluatedExpression, ids: string[] } | undefined} parsed call - */ -const parseRequireCall = (parser, expr) => { - const ids = []; - while (expr.type === "MemberExpression") { - if (expr.object.type === "Super") return; - if (!expr.property) return; - const prop = expr.property; - if (expr.computed) { - if (prop.type !== "Literal") return; - ids.push(`${prop.value}`); - } else { - if (prop.type !== "Identifier") return; - ids.push(prop.name); - } - expr = expr.object; - } - if (expr.type !== "CallExpression" || expr.arguments.length !== 1) return; - const callee = expr.callee; - if ( - callee.type !== "Identifier" || - parser.getVariableInfo(callee.name) !== "require" - ) { - return; - } - const arg = expr.arguments[0]; - if (arg.type === "SpreadElement") return; - const argValue = parser.evaluateExpression(arg); - return { argument: argValue, ids: ids.reverse() }; -}; - -class CommonJsExportsParserPlugin { - constructor(moduleGraph) { - this.moduleGraph = moduleGraph; - } - - /** - * @param {JavascriptParser} parser the parser - */ - apply(parser) { - const enableStructuredExports = () => { - DynamicExports.enable(parser.state); - }; - const checkNamespace = (topLevel, members, valueExpr) => { - if (!DynamicExports.isEnabled(parser.state)) return; - if (members.length > 0 && members[0] === "__esModule") { - if (valueExpr && isTruthyLiteral(valueExpr) && topLevel) { - DynamicExports.setFlagged(parser.state); - } else { - DynamicExports.setDynamic(parser.state); - } - } - }; - const bailout = reason => { - DynamicExports.bailout(parser.state); - if (reason) bailoutHint(reason); - }; - const bailoutHint = reason => { - this.moduleGraph - .getOptimizationBailout(parser.state.module) - .push(`CommonJS bailout: ${reason}`); - }; - - // metadata // - parser.hooks.evaluateTypeof - .for("module") - .tap("CommonJsExportsParserPlugin", evaluateToString("object")); - parser.hooks.evaluateTypeof - .for("exports") - .tap("CommonJsPlugin", evaluateToString("object")); - - // exporting // - const handleAssignExport = (expr, base, members) => { - if (HarmonyExports.isEnabled(parser.state)) return; - // Handle reexporting - const requireCall = parseRequireCall(parser, expr.right); - if ( - requireCall && - requireCall.argument.isString() && - (members.length === 0 || members[0] !== "__esModule") - ) { - enableStructuredExports(); - // It's possible to reexport __esModule, so we must convert to a dynamic module - if (members.length === 0) DynamicExports.setDynamic(parser.state); - const dep = new CommonJsExportRequireDependency( - expr.range, - null, - base, - members, - requireCall.argument.string, - requireCall.ids, - !parser.isStatementLevelExpression(expr) - ); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.module.addDependency(dep); - return true; - } - if (members.length === 0) return; - enableStructuredExports(); - const remainingMembers = members; - checkNamespace( - parser.statementPath.length === 1 && - parser.isStatementLevelExpression(expr), - remainingMembers, - expr.right - ); - const dep = new CommonJsExportsDependency( - expr.left.range, - null, - base, - remainingMembers - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - parser.walkExpression(expr.right); - return true; - }; - parser.hooks.assignMemberChain - .for("exports") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - return handleAssignExport(expr, "exports", members); - }); - parser.hooks.assignMemberChain - .for("this") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (!parser.scope.topLevelScope) return; - return handleAssignExport(expr, "this", members); - }); - parser.hooks.assignMemberChain - .for("module") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (members[0] !== "exports") return; - return handleAssignExport(expr, "module.exports", members.slice(1)); - }); - parser.hooks.call - .for("Object.defineProperty") - .tap("CommonJsExportsParserPlugin", expression => { - const expr = /** @type {import("estree").CallExpression} */ ( - expression - ); - if (!parser.isStatementLevelExpression(expr)) return; - if (expr.arguments.length !== 3) return; - if (expr.arguments[0].type === "SpreadElement") return; - if (expr.arguments[1].type === "SpreadElement") return; - if (expr.arguments[2].type === "SpreadElement") return; - const exportsArg = parser.evaluateExpression(expr.arguments[0]); - if (!exportsArg.isIdentifier()) return; - if ( - exportsArg.identifier !== "exports" && - exportsArg.identifier !== "module.exports" && - (exportsArg.identifier !== "this" || !parser.scope.topLevelScope) - ) { - return; - } - const propertyArg = parser.evaluateExpression(expr.arguments[1]); - const property = propertyArg.asString(); - if (typeof property !== "string") return; - enableStructuredExports(); - const descArg = expr.arguments[2]; - checkNamespace( - parser.statementPath.length === 1, - [property], - getValueOfPropertyDescription(descArg) - ); - const dep = new CommonJsExportsDependency( - expr.range, - expr.arguments[2].range, - `Object.defineProperty(${exportsArg.identifier})`, - [property] - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - - parser.walkExpression(expr.arguments[2]); - return true; - }); - - // Self reference // - const handleAccessExport = (expr, base, members, call = undefined) => { - if (HarmonyExports.isEnabled(parser.state)) return; - if (members.length === 0) { - bailout(`${base} is used directly at ${formatLocation(expr.loc)}`); - } - if (call && members.length === 1) { - bailoutHint( - `${base}${propertyAccess( - members - )}(...) prevents optimization as ${base} is passed as call context at ${formatLocation( - expr.loc - )}` - ); - } - const dep = new CommonJsSelfReferenceDependency( - expr.range, - base, - members, - !!call - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - if (call) { - parser.walkExpressions(call.arguments); - } - return true; - }; - parser.hooks.callMemberChain - .for("exports") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - return handleAccessExport(expr.callee, "exports", members, expr); - }); - parser.hooks.expressionMemberChain - .for("exports") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - return handleAccessExport(expr, "exports", members); - }); - parser.hooks.expression - .for("exports") - .tap("CommonJsExportsParserPlugin", expr => { - return handleAccessExport(expr, "exports", []); - }); - parser.hooks.callMemberChain - .for("module") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (members[0] !== "exports") return; - return handleAccessExport( - expr.callee, - "module.exports", - members.slice(1), - expr - ); - }); - parser.hooks.expressionMemberChain - .for("module") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (members[0] !== "exports") return; - return handleAccessExport(expr, "module.exports", members.slice(1)); - }); - parser.hooks.expression - .for("module.exports") - .tap("CommonJsExportsParserPlugin", expr => { - return handleAccessExport(expr, "module.exports", []); - }); - parser.hooks.callMemberChain - .for("this") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (!parser.scope.topLevelScope) return; - return handleAccessExport(expr.callee, "this", members, expr); - }); - parser.hooks.expressionMemberChain - .for("this") - .tap("CommonJsExportsParserPlugin", (expr, members) => { - if (!parser.scope.topLevelScope) return; - return handleAccessExport(expr, "this", members); - }); - parser.hooks.expression - .for("this") - .tap("CommonJsExportsParserPlugin", expr => { - if (!parser.scope.topLevelScope) return; - return handleAccessExport(expr, "this", []); - }); - - // Bailouts // - parser.hooks.expression.for("module").tap("CommonJsPlugin", expr => { - bailout(); - const isHarmony = HarmonyExports.isEnabled(parser.state); - const dep = new ModuleDecoratorDependency( - isHarmony - ? RuntimeGlobals.harmonyModuleDecorator - : RuntimeGlobals.nodeModuleDecorator, - !isHarmony - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return true; - }); - } -} -module.exports = CommonJsExportsParserPlugin; - - -/***/ }), - -/***/ 96107: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Template = __webpack_require__(43841); -const { equals } = __webpack_require__(28087); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class CommonJsFullRequireDependency extends ModuleDependency { - /** - * @param {string} request the request string - * @param {[number, number]} range location in source code - * @param {string[]} names accessed properties on module - */ - constructor(request, range, names) { - super(request); - this.range = range; - this.names = names; - this.call = false; - this.asiSafe = undefined; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - if (this.call) { - const importedModule = moduleGraph.getModule(this); - if ( - !importedModule || - importedModule.getExportsType(moduleGraph, false) !== "namespace" - ) { - return [this.names.slice(0, -1)]; - } - } - return [this.names]; - } - - serialize(context) { - const { write } = context; - write(this.names); - write(this.call); - write(this.asiSafe); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.names = read(); - this.call = read(); - this.asiSafe = read(); - super.deserialize(context); - } - - get type() { - return "cjs full require"; - } - - get category() { - return "commonjs"; - } -} - -CommonJsFullRequireDependency.Template = class CommonJsFullRequireDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { - module, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtimeRequirements, - runtime, - initFragments - } - ) { - const dep = /** @type {CommonJsFullRequireDependency} */ (dependency); - if (!dep.range) return; - const importedModule = moduleGraph.getModule(dep); - let requireExpr = runtimeTemplate.moduleExports({ - module: importedModule, - chunkGraph, - request: dep.request, - weak: dep.weak, - runtimeRequirements - }); - if (importedModule) { - const ids = dep.names; - const usedImported = moduleGraph - .getExportsInfo(importedModule) - .getUsedName(ids, runtime); - if (usedImported) { - const comment = equals(usedImported, ids) - ? "" - : Template.toNormalComment(propertyAccess(ids)) + " "; - const access = `${comment}${propertyAccess(usedImported)}`; - requireExpr = - dep.asiSafe === true - ? `(${requireExpr}${access})` - : `${requireExpr}${access}`; - } - } - source.replace(dep.range[0], dep.range[1] - 1, requireExpr); - } -}; - -makeSerializable( - CommonJsFullRequireDependency, - "webpack/lib/dependencies/CommonJsFullRequireDependency" -); - -module.exports = CommonJsFullRequireDependency; - - -/***/ }), - -/***/ 75478: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { fileURLToPath } = __webpack_require__(57310); -const CommentCompilationWarning = __webpack_require__(54437); -const RuntimeGlobals = __webpack_require__(39201); -const UnsupportedFeatureWarning = __webpack_require__(17623); -const WebpackError = __webpack_require__(27154); -const BasicEvaluatedExpression = __webpack_require__(94844); -const { - evaluateToIdentifier, - evaluateToString, - expressionIsUnsupported, - toConstantDependency -} = __webpack_require__(97574); -const CommonJsFullRequireDependency = __webpack_require__(96107); -const CommonJsRequireContextDependency = __webpack_require__(85190); -const CommonJsRequireDependency = __webpack_require__(90345); -const ConstDependency = __webpack_require__(14367); -const ContextDependencyHelpers = __webpack_require__(32556); -const LocalModuleDependency = __webpack_require__(81600); -const { getLocalModule } = __webpack_require__(59081); -const RequireHeaderDependency = __webpack_require__(61820); -const RequireResolveContextDependency = __webpack_require__(99703); -const RequireResolveDependency = __webpack_require__(57485); -const RequireResolveHeaderDependency = __webpack_require__(2254); - -/** @typedef {import("estree").CallExpression} CallExpressionNode */ -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ - -const createRequireSpecifierTag = Symbol("createRequire"); -const createdRequireIdentifierTag = Symbol("createRequire()"); - -class CommonJsImportsParserPlugin { - /** - * @param {JavascriptParserOptions} options parser options - */ - constructor(options) { - this.options = options; - } - - apply(parser) { - const options = this.options; - - const getContext = () => { - if (parser.currentTagData) { - const { context } = parser.currentTagData; - return context; - } - }; - - //#region metadata - const tapRequireExpression = (expression, getMembers) => { - parser.hooks.typeof - .for(expression) - .tap( - "CommonJsImportsParserPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - parser.hooks.evaluateTypeof - .for(expression) - .tap("CommonJsImportsParserPlugin", evaluateToString("function")); - parser.hooks.evaluateIdentifier - .for(expression) - .tap( - "CommonJsImportsParserPlugin", - evaluateToIdentifier(expression, "require", getMembers, true) - ); - }; - const tapRequireExpressionTag = tag => { - parser.hooks.typeof - .for(tag) - .tap( - "CommonJsImportsParserPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - parser.hooks.evaluateTypeof - .for(tag) - .tap("CommonJsImportsParserPlugin", evaluateToString("function")); - }; - tapRequireExpression("require", () => []); - tapRequireExpression("require.resolve", () => ["resolve"]); - tapRequireExpression("require.resolveWeak", () => ["resolveWeak"]); - //#endregion - - // Weird stuff // - parser.hooks.assign - .for("require") - .tap("CommonJsImportsParserPlugin", expr => { - // to not leak to global "require", we need to define a local require here. - const dep = new ConstDependency("var require;", 0); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - //#region Unsupported - parser.hooks.expression - .for("require.main") - .tap( - "CommonJsImportsParserPlugin", - expressionIsUnsupported( - parser, - "require.main is not supported by webpack." - ) - ); - parser.hooks.call - .for("require.main.require") - .tap( - "CommonJsImportsParserPlugin", - expressionIsUnsupported( - parser, - "require.main.require is not supported by webpack." - ) - ); - parser.hooks.expression - .for("module.parent.require") - .tap( - "CommonJsImportsParserPlugin", - expressionIsUnsupported( - parser, - "module.parent.require is not supported by webpack." - ) - ); - parser.hooks.call - .for("module.parent.require") - .tap( - "CommonJsImportsParserPlugin", - expressionIsUnsupported( - parser, - "module.parent.require is not supported by webpack." - ) - ); - //#endregion - - //#region Renaming - const defineUndefined = expr => { - // To avoid "not defined" error, replace the value with undefined - const dep = new ConstDependency("undefined", expr.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return false; - }; - parser.hooks.canRename - .for("require") - .tap("CommonJsImportsParserPlugin", () => true); - parser.hooks.rename - .for("require") - .tap("CommonJsImportsParserPlugin", defineUndefined); - //#endregion - - //#region Inspection - const requireCache = toConstantDependency( - parser, - RuntimeGlobals.moduleCache, - [ - RuntimeGlobals.moduleCache, - RuntimeGlobals.moduleId, - RuntimeGlobals.moduleLoaded - ] - ); - - parser.hooks.expression - .for("require.cache") - .tap("CommonJsImportsParserPlugin", requireCache); - //#endregion - - //#region Require as expression - const requireAsExpressionHandler = expr => { - const dep = new CommonJsRequireContextDependency( - { - request: options.unknownContextRequest, - recursive: options.unknownContextRecursive, - regExp: options.unknownContextRegExp, - mode: "sync" - }, - expr.range, - undefined, - parser.scope.inShorthand, - getContext() - ); - dep.critical = - options.unknownContextCritical && - "require function is used in a way in which dependencies cannot be statically extracted"; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - }; - parser.hooks.expression - .for("require") - .tap("CommonJsImportsParserPlugin", requireAsExpressionHandler); - //#endregion - - //#region Require - const processRequireItem = (expr, param) => { - if (param.isString()) { - const dep = new CommonJsRequireDependency( - param.string, - param.range, - getContext() - ); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - }; - const processRequireContext = (expr, param) => { - const dep = ContextDependencyHelpers.create( - CommonJsRequireContextDependency, - expr.range, - param, - expr, - options, - { - category: "commonjs" - }, - parser, - undefined, - getContext() - ); - if (!dep) return; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - }; - const createRequireHandler = callNew => expr => { - if (options.commonjsMagicComments) { - const { options: requireOptions, errors: commentErrors } = - parser.parseCommentOptions(expr.range); - - if (commentErrors) { - for (const e of commentErrors) { - const { comment } = e; - parser.state.module.addWarning( - new CommentCompilationWarning( - `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, - comment.loc - ) - ); - } - } - if (requireOptions) { - if (requireOptions.webpackIgnore !== undefined) { - if (typeof requireOptions.webpackIgnore !== "boolean") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackIgnore\` expected a boolean, but received: ${requireOptions.webpackIgnore}.`, - expr.loc - ) - ); - } else { - // Do not instrument `require()` if `webpackIgnore` is `true` - if (requireOptions.webpackIgnore) { - return true; - } - } - } - } - } - - if (expr.arguments.length !== 1) return; - let localModule; - const param = parser.evaluateExpression(expr.arguments[0]); - if (param.isConditional()) { - let isExpression = false; - for (const p of param.options) { - const result = processRequireItem(expr, p); - if (result === undefined) { - isExpression = true; - } - } - if (!isExpression) { - const dep = new RequireHeaderDependency(expr.callee.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } - } - if ( - param.isString() && - (localModule = getLocalModule(parser.state, param.string)) - ) { - localModule.flagUsed(); - const dep = new LocalModuleDependency(localModule, expr.range, callNew); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } else { - const result = processRequireItem(expr, param); - if (result === undefined) { - processRequireContext(expr, param); - } else { - const dep = new RequireHeaderDependency(expr.callee.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - } - return true; - } - }; - parser.hooks.call - .for("require") - .tap("CommonJsImportsParserPlugin", createRequireHandler(false)); - parser.hooks.new - .for("require") - .tap("CommonJsImportsParserPlugin", createRequireHandler(true)); - parser.hooks.call - .for("module.require") - .tap("CommonJsImportsParserPlugin", createRequireHandler(false)); - parser.hooks.new - .for("module.require") - .tap("CommonJsImportsParserPlugin", createRequireHandler(true)); - //#endregion - - //#region Require with property access - const chainHandler = (expr, calleeMembers, callExpr, members) => { - if (callExpr.arguments.length !== 1) return; - const param = parser.evaluateExpression(callExpr.arguments[0]); - if (param.isString() && !getLocalModule(parser.state, param.string)) { - const dep = new CommonJsFullRequireDependency( - param.string, - expr.range, - members - ); - dep.asiSafe = !parser.isAsiPosition(expr.range[0]); - dep.optional = !!parser.scope.inTry; - dep.loc = expr.loc; - parser.state.current.addDependency(dep); - return true; - } - }; - const callChainHandler = (expr, calleeMembers, callExpr, members) => { - if (callExpr.arguments.length !== 1) return; - const param = parser.evaluateExpression(callExpr.arguments[0]); - if (param.isString() && !getLocalModule(parser.state, param.string)) { - const dep = new CommonJsFullRequireDependency( - param.string, - expr.callee.range, - members - ); - dep.call = true; - dep.asiSafe = !parser.isAsiPosition(expr.range[0]); - dep.optional = !!parser.scope.inTry; - dep.loc = expr.callee.loc; - parser.state.current.addDependency(dep); - parser.walkExpressions(expr.arguments); - return true; - } - }; - parser.hooks.memberChainOfCallMemberChain - .for("require") - .tap("CommonJsImportsParserPlugin", chainHandler); - parser.hooks.memberChainOfCallMemberChain - .for("module.require") - .tap("CommonJsImportsParserPlugin", chainHandler); - parser.hooks.callMemberChainOfCallMemberChain - .for("require") - .tap("CommonJsImportsParserPlugin", callChainHandler); - parser.hooks.callMemberChainOfCallMemberChain - .for("module.require") - .tap("CommonJsImportsParserPlugin", callChainHandler); - //#endregion - - //#region Require.resolve - const processResolve = (expr, weak) => { - if (expr.arguments.length !== 1) return; - const param = parser.evaluateExpression(expr.arguments[0]); - if (param.isConditional()) { - for (const option of param.options) { - const result = processResolveItem(expr, option, weak); - if (result === undefined) { - processResolveContext(expr, option, weak); - } - } - const dep = new RequireResolveHeaderDependency(expr.callee.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } else { - const result = processResolveItem(expr, param, weak); - if (result === undefined) { - processResolveContext(expr, param, weak); - } - const dep = new RequireResolveHeaderDependency(expr.callee.range); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - } - }; - const processResolveItem = (expr, param, weak) => { - if (param.isString()) { - const dep = new RequireResolveDependency( - param.string, - param.range, - getContext() - ); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - dep.weak = weak; - parser.state.current.addDependency(dep); - return true; - } - }; - const processResolveContext = (expr, param, weak) => { - const dep = ContextDependencyHelpers.create( - RequireResolveContextDependency, - param.range, - param, - expr, - options, - { - category: "commonjs", - mode: weak ? "weak" : "sync" - }, - parser, - getContext() - ); - if (!dep) return; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - }; - - parser.hooks.call - .for("require.resolve") - .tap("CommonJsImportsParserPlugin", expr => { - return processResolve(expr, false); - }); - parser.hooks.call - .for("require.resolveWeak") - .tap("CommonJsImportsParserPlugin", expr => { - return processResolve(expr, true); - }); - //#endregion - - //#region Create require - - if (!options.createRequire) return; - - let moduleName; - let specifierName; - - if (options.createRequire === true) { - moduleName = "module"; - specifierName = "createRequire"; - } else { - const match = /^(.*) from (.*)$/.exec(options.createRequire); - if (match) { - [, specifierName, moduleName] = match; - } - if (!specifierName || !moduleName) { - const err = new WebpackError( - `Parsing javascript parser option "createRequire" failed, got ${JSON.stringify( - options.createRequire - )}` - ); - err.details = - 'Expected string in format "createRequire from module", where "createRequire" is specifier name and "module" name of the module'; - throw err; - } - } - - tapRequireExpressionTag(createdRequireIdentifierTag); - tapRequireExpressionTag(createRequireSpecifierTag); - parser.hooks.evaluateCallExpression - .for(createRequireSpecifierTag) - .tap("CommonJsImportsParserPlugin", expr => { - const context = parseCreateRequireArguments(expr); - if (context === undefined) return; - const ident = parser.evaluatedVariable({ - tag: createdRequireIdentifierTag, - data: { context }, - next: undefined - }); - return new BasicEvaluatedExpression() - .setIdentifier(ident, ident, () => []) - .setSideEffects(false) - .setRange(expr.range); - }); - parser.hooks.unhandledExpressionMemberChain - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", (expr, members) => { - return expressionIsUnsupported( - parser, - `createRequire().${members.join(".")} is not supported by webpack.` - )(expr); - }); - parser.hooks.canRename - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", () => true); - parser.hooks.canRename - .for(createRequireSpecifierTag) - .tap("CommonJsImportsParserPlugin", () => true); - parser.hooks.rename - .for(createRequireSpecifierTag) - .tap("CommonJsImportsParserPlugin", defineUndefined); - parser.hooks.expression - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", requireAsExpressionHandler); - parser.hooks.call - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", createRequireHandler(false)); - /** - * @param {CallExpressionNode} expr call expression - * @returns {string} context - */ - const parseCreateRequireArguments = expr => { - const args = expr.arguments; - if (args.length !== 1) { - const err = new WebpackError( - "module.createRequire supports only one argument." - ); - err.loc = expr.loc; - parser.state.module.addWarning(err); - return; - } - const arg = args[0]; - const evaluated = parser.evaluateExpression(arg); - if (!evaluated.isString()) { - const err = new WebpackError( - "module.createRequire failed parsing argument." - ); - err.loc = arg.loc; - parser.state.module.addWarning(err); - return; - } - const ctx = evaluated.string.startsWith("file://") - ? fileURLToPath(evaluated.string) - : evaluated.string; - // argument always should be a filename - return ctx.slice(0, ctx.lastIndexOf(ctx.startsWith("/") ? "/" : "\\")); - }; - - parser.hooks.import.tap( - { - name: "CommonJsImportsParserPlugin", - stage: -10 - }, - (statement, source) => { - if ( - source !== moduleName || - statement.specifiers.length !== 1 || - statement.specifiers[0].type !== "ImportSpecifier" || - statement.specifiers[0].imported.type !== "Identifier" || - statement.specifiers[0].imported.name !== specifierName - ) - return; - // clear for 'import { createRequire as x } from "module"' - // if any other specifier was used import module - const clearDep = new ConstDependency( - parser.isAsiPosition(statement.range[0]) ? ";" : "", - statement.range - ); - clearDep.loc = statement.loc; - parser.state.module.addPresentationalDependency(clearDep); - parser.unsetAsiPosition(statement.range[1]); - return true; - } - ); - parser.hooks.importSpecifier.tap( - { - name: "CommonJsImportsParserPlugin", - stage: -10 - }, - (statement, source, id, name) => { - if (source !== moduleName || id !== specifierName) return; - parser.tagVariable(name, createRequireSpecifierTag); - return true; - } - ); - parser.hooks.preDeclarator.tap( - "CommonJsImportsParserPlugin", - declarator => { - if ( - declarator.id.type !== "Identifier" || - !declarator.init || - declarator.init.type !== "CallExpression" || - declarator.init.callee.type !== "Identifier" - ) - return; - const variableInfo = parser.getVariableInfo( - declarator.init.callee.name - ); - if ( - variableInfo && - variableInfo.tagInfo && - variableInfo.tagInfo.tag === createRequireSpecifierTag - ) { - const context = parseCreateRequireArguments(declarator.init); - if (context === undefined) return; - parser.tagVariable(declarator.id.name, createdRequireIdentifierTag, { - name: declarator.id.name, - context - }); - return true; - } - } - ); - - parser.hooks.memberChainOfCallMemberChain - .for(createRequireSpecifierTag) - .tap( - "CommonJsImportsParserPlugin", - (expr, calleeMembers, callExpr, members) => { - if ( - calleeMembers.length !== 0 || - members.length !== 1 || - members[0] !== "cache" - ) - return; - // createRequire().cache - const context = parseCreateRequireArguments(callExpr); - if (context === undefined) return; - return requireCache(expr); - } - ); - parser.hooks.callMemberChainOfCallMemberChain - .for(createRequireSpecifierTag) - .tap( - "CommonJsImportsParserPlugin", - (expr, calleeMembers, innerCallExpression, members) => { - if ( - calleeMembers.length !== 0 || - members.length !== 1 || - members[0] !== "resolve" - ) - return; - // createRequire().resolve() - return processResolve(expr, false); - } - ); - parser.hooks.expressionMemberChain - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", (expr, members) => { - // require.cache - if (members.length === 1 && members[0] === "cache") { - return requireCache(expr); - } - }); - parser.hooks.callMemberChain - .for(createdRequireIdentifierTag) - .tap("CommonJsImportsParserPlugin", (expr, members) => { - // require.resolve() - if (members.length === 1 && members[0] === "resolve") { - return processResolve(expr, false); - } - }); - parser.hooks.call - .for(createRequireSpecifierTag) - .tap("CommonJsImportsParserPlugin", expr => { - const clearDep = new ConstDependency( - "/* createRequire() */ undefined", - expr.range - ); - clearDep.loc = expr.loc; - parser.state.module.addPresentationalDependency(clearDep); - return true; - }); - //#endregion - } -} -module.exports = CommonJsImportsParserPlugin; - - -/***/ }), - -/***/ 93075: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const SelfModuleFactory = __webpack_require__(75193); -const Template = __webpack_require__(43841); -const CommonJsExportsDependency = __webpack_require__(65086); -const CommonJsFullRequireDependency = __webpack_require__(96107); -const CommonJsRequireContextDependency = __webpack_require__(85190); -const CommonJsRequireDependency = __webpack_require__(90345); -const CommonJsSelfReferenceDependency = __webpack_require__(27647); -const ModuleDecoratorDependency = __webpack_require__(1569); -const RequireHeaderDependency = __webpack_require__(61820); -const RequireResolveContextDependency = __webpack_require__(99703); -const RequireResolveDependency = __webpack_require__(57485); -const RequireResolveHeaderDependency = __webpack_require__(2254); -const RuntimeRequirementsDependency = __webpack_require__(12446); - -const CommonJsExportsParserPlugin = __webpack_require__(26630); -const CommonJsImportsParserPlugin = __webpack_require__(75478); - -const { - evaluateToIdentifier, - toConstantDependency -} = __webpack_require__(97574); -const CommonJsExportRequireDependency = __webpack_require__(70241); - -class CommonJsPlugin { - apply(compiler) { - compiler.hooks.compilation.tap( - "CommonJsPlugin", - (compilation, { contextModuleFactory, normalModuleFactory }) => { - compilation.dependencyFactories.set( - CommonJsRequireDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - CommonJsRequireDependency, - new CommonJsRequireDependency.Template() - ); - - compilation.dependencyFactories.set( - CommonJsFullRequireDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - CommonJsFullRequireDependency, - new CommonJsFullRequireDependency.Template() - ); - - compilation.dependencyFactories.set( - CommonJsRequireContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - CommonJsRequireContextDependency, - new CommonJsRequireContextDependency.Template() - ); - - compilation.dependencyFactories.set( - RequireResolveDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - RequireResolveDependency, - new RequireResolveDependency.Template() - ); - - compilation.dependencyFactories.set( - RequireResolveContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - RequireResolveContextDependency, - new RequireResolveContextDependency.Template() - ); - - compilation.dependencyTemplates.set( - RequireResolveHeaderDependency, - new RequireResolveHeaderDependency.Template() - ); - - compilation.dependencyTemplates.set( - RequireHeaderDependency, - new RequireHeaderDependency.Template() - ); - - compilation.dependencyTemplates.set( - CommonJsExportsDependency, - new CommonJsExportsDependency.Template() - ); - - compilation.dependencyFactories.set( - CommonJsExportRequireDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - CommonJsExportRequireDependency, - new CommonJsExportRequireDependency.Template() - ); - - const selfFactory = new SelfModuleFactory(compilation.moduleGraph); - - compilation.dependencyFactories.set( - CommonJsSelfReferenceDependency, - selfFactory - ); - compilation.dependencyTemplates.set( - CommonJsSelfReferenceDependency, - new CommonJsSelfReferenceDependency.Template() - ); - - compilation.dependencyFactories.set( - ModuleDecoratorDependency, - selfFactory - ); - compilation.dependencyTemplates.set( - ModuleDecoratorDependency, - new ModuleDecoratorDependency.Template() - ); - - compilation.hooks.runtimeRequirementInModule - .for(RuntimeGlobals.harmonyModuleDecorator) - .tap("CommonJsPlugin", (module, set) => { - set.add(RuntimeGlobals.module); - set.add(RuntimeGlobals.requireScope); - }); - - compilation.hooks.runtimeRequirementInModule - .for(RuntimeGlobals.nodeModuleDecorator) - .tap("CommonJsPlugin", (module, set) => { - set.add(RuntimeGlobals.module); - set.add(RuntimeGlobals.requireScope); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.harmonyModuleDecorator) - .tap("CommonJsPlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new HarmonyModuleDecoratorRuntimeModule() - ); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.nodeModuleDecorator) - .tap("CommonJsPlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new NodeModuleDecoratorRuntimeModule() - ); - }); - - const handler = (parser, parserOptions) => { - if (parserOptions.commonjs !== undefined && !parserOptions.commonjs) - return; - parser.hooks.typeof - .for("module") - .tap( - "CommonJsPlugin", - toConstantDependency(parser, JSON.stringify("object")) - ); - - parser.hooks.expression - .for("require.main") - .tap( - "CommonJsPlugin", - toConstantDependency( - parser, - `${RuntimeGlobals.moduleCache}[${RuntimeGlobals.entryModuleId}]`, - [RuntimeGlobals.moduleCache, RuntimeGlobals.entryModuleId] - ) - ); - parser.hooks.expression - .for("module.loaded") - .tap("CommonJsPlugin", expr => { - parser.state.module.buildInfo.moduleConcatenationBailout = - "module.loaded"; - const dep = new RuntimeRequirementsDependency([ - RuntimeGlobals.moduleLoaded - ]); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - parser.hooks.expression - .for("module.id") - .tap("CommonJsPlugin", expr => { - parser.state.module.buildInfo.moduleConcatenationBailout = - "module.id"; - const dep = new RuntimeRequirementsDependency([ - RuntimeGlobals.moduleId - ]); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - parser.hooks.evaluateIdentifier.for("module.hot").tap( - "CommonJsPlugin", - evaluateToIdentifier("module.hot", "module", () => ["hot"], null) - ); - - new CommonJsImportsParserPlugin(parserOptions).apply(parser); - new CommonJsExportsParserPlugin(compilation.moduleGraph).apply( - parser - ); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("CommonJsPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("CommonJsPlugin", handler); - } - ); - } -} - -class HarmonyModuleDecoratorRuntimeModule extends RuntimeModule { - constructor() { - super("harmony module decorator"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - return Template.asString([ - `${ - RuntimeGlobals.harmonyModuleDecorator - } = ${runtimeTemplate.basicFunction("module", [ - "module = Object.create(module);", - "if (!module.children) module.children = [];", - "Object.defineProperty(module, 'exports', {", - Template.indent([ - "enumerable: true,", - `set: ${runtimeTemplate.basicFunction("", [ - "throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);" - ])}` - ]), - "});", - "return module;" - ])};` - ]); - } -} - -class NodeModuleDecoratorRuntimeModule extends RuntimeModule { - constructor() { - super("node module decorator"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - return Template.asString([ - `${RuntimeGlobals.nodeModuleDecorator} = ${runtimeTemplate.basicFunction( - "module", - [ - "module.paths = [];", - "if (!module.children) module.children = [];", - "return module;" - ] - )};` - ]); - } -} - -module.exports = CommonJsPlugin; - - -/***/ }), - -/***/ 85190: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); -const ContextDependencyTemplateAsRequireCall = __webpack_require__(5160); - -class CommonJsRequireContextDependency extends ContextDependency { - constructor(options, range, valueRange, inShorthand, context) { - super(options, context); - - this.range = range; - this.valueRange = valueRange; - // inShorthand must be serialized by subclasses that use it - this.inShorthand = inShorthand; - } - - get type() { - return "cjs require context"; - } - - serialize(context) { - const { write } = context; - - write(this.range); - write(this.valueRange); - write(this.inShorthand); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.range = read(); - this.valueRange = read(); - this.inShorthand = read(); - - super.deserialize(context); - } -} - -makeSerializable( - CommonJsRequireContextDependency, - "webpack/lib/dependencies/CommonJsRequireContextDependency" -); - -CommonJsRequireContextDependency.Template = - ContextDependencyTemplateAsRequireCall; - -module.exports = CommonJsRequireContextDependency; - - -/***/ }), - -/***/ 90345: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsId = __webpack_require__(29355); - -class CommonJsRequireDependency extends ModuleDependency { - constructor(request, range, context) { - super(request); - this.range = range; - this._context = context; - } - - get type() { - return "cjs require"; - } - - get category() { - return "commonjs"; - } -} - -CommonJsRequireDependency.Template = ModuleDependencyTemplateAsId; - -makeSerializable( - CommonJsRequireDependency, - "webpack/lib/dependencies/CommonJsRequireDependency" -); - -module.exports = CommonJsRequireDependency; - - -/***/ }), - -/***/ 27647: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const { equals } = __webpack_require__(28087); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class CommonJsSelfReferenceDependency extends NullDependency { - constructor(range, base, names, call) { - super(); - this.range = range; - this.base = base; - this.names = names; - this.call = call; - } - - get type() { - return "cjs self exports reference"; - } - - get category() { - return "self"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `self`; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return [this.call ? this.names.slice(0, -1) : this.names]; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.base); - write(this.names); - write(this.call); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.base = read(); - this.names = read(); - this.call = read(); - super.deserialize(context); - } -} - -makeSerializable( - CommonJsSelfReferenceDependency, - "webpack/lib/dependencies/CommonJsSelfReferenceDependency" -); - -CommonJsSelfReferenceDependency.Template = class CommonJsSelfReferenceDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { module, moduleGraph, runtime, runtimeRequirements } - ) { - const dep = /** @type {CommonJsSelfReferenceDependency} */ (dependency); - let used; - if (dep.names.length === 0) { - used = dep.names; - } else { - used = moduleGraph.getExportsInfo(module).getUsedName(dep.names, runtime); - } - if (!used) { - throw new Error( - "Self-reference dependency has unused export name: This should not happen" - ); - } - - let base = undefined; - switch (dep.base) { - case "exports": - runtimeRequirements.add(RuntimeGlobals.exports); - base = module.exportsArgument; - break; - case "module.exports": - runtimeRequirements.add(RuntimeGlobals.module); - base = `${module.moduleArgument}.exports`; - break; - case "this": - runtimeRequirements.add(RuntimeGlobals.thisAsExports); - base = "this"; - break; - default: - throw new Error(`Unsupported base ${dep.base}`); - } - - if (base === dep.base && equals(used, dep.names)) { - // Nothing has to be changed - // We don't use a replacement for compat reasons - // for plugins that update `module._source` which they - // shouldn't do! - return; - } - - source.replace( - dep.range[0], - dep.range[1] - 1, - `${base}${propertyAccess(used)}` - ); - } -}; - -module.exports = CommonJsSelfReferenceDependency; - - -/***/ }), - -/***/ 14367: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ - -class ConstDependency extends NullDependency { - /** - * @param {string} expression the expression - * @param {number|[number, number]} range the source range - * @param {string[]=} runtimeRequirements runtime requirements - */ - constructor(expression, range, runtimeRequirements) { - super(); - this.expression = expression; - this.range = range; - this.runtimeRequirements = runtimeRequirements - ? new Set(runtimeRequirements) - : null; - this._hashUpdate = undefined; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) { - let hashUpdate = "" + this.range + "|" + this.expression; - if (this.runtimeRequirements) { - for (const item of this.runtimeRequirements) { - hashUpdate += "|"; - hashUpdate += item; - } - } - this._hashUpdate = hashUpdate; - } - hash.update(this._hashUpdate); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return false; - } - - serialize(context) { - const { write } = context; - write(this.expression); - write(this.range); - write(this.runtimeRequirements); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.expression = read(); - this.range = read(); - this.runtimeRequirements = read(); - super.deserialize(context); - } -} - -makeSerializable(ConstDependency, "webpack/lib/dependencies/ConstDependency"); - -ConstDependency.Template = class ConstDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {ConstDependency} */ (dependency); - if (dep.runtimeRequirements) { - for (const req of dep.runtimeRequirements) { - templateContext.runtimeRequirements.add(req); - } - } - if (typeof dep.range === "number") { - source.insert(dep.range, dep.expression); - return; - } - - source.replace(dep.range[0], dep.range[1] - 1, dep.expression); - } -}; - -module.exports = ConstDependency; - - -/***/ }), - -/***/ 22429: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const DependencyTemplate = __webpack_require__(94086); -const makeSerializable = __webpack_require__(65764); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../ContextModule").ContextOptions} ContextOptions */ -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../WebpackError")} WebpackError */ - -const getCriticalDependencyWarning = memoize(() => - __webpack_require__(34219) -); - -/** @typedef {ContextOptions & { request: string }} ContextDependencyOptions */ - -const regExpToString = r => (r ? r + "" : ""); - -class ContextDependency extends Dependency { - /** - * @param {ContextDependencyOptions} options options for the context module - * @param {string=} context request context - */ - constructor(options, context) { - super(); - - this.options = options; - this.userRequest = this.options && this.options.request; - /** @type {false | string} */ - this.critical = false; - this.hadGlobalOrStickyRegExp = false; - - if ( - this.options && - (this.options.regExp.global || this.options.regExp.sticky) - ) { - this.options = { ...this.options, regExp: null }; - this.hadGlobalOrStickyRegExp = true; - } - - this.request = undefined; - this.range = undefined; - this.valueRange = undefined; - this.inShorthand = undefined; - // TODO refactor this - this.replaces = undefined; - this._requestContext = context; - } - - /** - * @returns {string | undefined} a request context - */ - getContext() { - return this._requestContext; - } - - get category() { - return "commonjs"; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return true; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return ( - `context${this._requestContext || ""}|ctx request${ - this.options.request - } ${this.options.recursive} ` + - `${regExpToString(this.options.regExp)} ${regExpToString( - this.options.include - )} ${regExpToString(this.options.exclude)} ` + - `${this.options.mode} ${this.options.chunkName} ` + - `${JSON.stringify(this.options.groupOptions)}` - ); - } - - /** - * Returns warnings - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} warnings - */ - getWarnings(moduleGraph) { - let warnings = super.getWarnings(moduleGraph); - - if (this.critical) { - if (!warnings) warnings = []; - const CriticalDependencyWarning = getCriticalDependencyWarning(); - warnings.push(new CriticalDependencyWarning(this.critical)); - } - - if (this.hadGlobalOrStickyRegExp) { - if (!warnings) warnings = []; - const CriticalDependencyWarning = getCriticalDependencyWarning(); - warnings.push( - new CriticalDependencyWarning( - "Contexts can't use RegExps with the 'g' or 'y' flags." - ) - ); - } - - return warnings; - } - - serialize(context) { - const { write } = context; - - write(this.options); - write(this.userRequest); - write(this.critical); - write(this.hadGlobalOrStickyRegExp); - write(this.request); - write(this._requestContext); - write(this.range); - write(this.valueRange); - write(this.prepend); - write(this.replaces); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.options = read(); - this.userRequest = read(); - this.critical = read(); - this.hadGlobalOrStickyRegExp = read(); - this.request = read(); - this._requestContext = read(); - this.range = read(); - this.valueRange = read(); - this.prepend = read(); - this.replaces = read(); - - super.deserialize(context); - } -} - -makeSerializable( - ContextDependency, - "webpack/lib/dependencies/ContextDependency" -); - -ContextDependency.Template = DependencyTemplate; - -module.exports = ContextDependency; - - -/***/ }), - -/***/ 32556: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { parseResource } = __webpack_require__(20162); - -/** @typedef {import("estree").Node} EsTreeNode */ -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ -/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */ -/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("./ContextDependency")} ContextDependency */ -/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */ - -/** - * Escapes regular expression metacharacters - * @param {string} str String to quote - * @returns {string} Escaped string - */ -const quoteMeta = str => { - return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); -}; - -const splitContextFromPrefix = prefix => { - const idx = prefix.lastIndexOf("/"); - let context = "."; - if (idx >= 0) { - context = prefix.slice(0, idx); - prefix = `.${prefix.slice(idx)}`; - } - return { - context, - prefix - }; -}; - -/** @typedef {Partial>} PartialContextDependencyOptions */ - -/** @typedef {{ new(options: ContextDependencyOptions, range: [number, number], valueRange: [number, number], ...args: any[]): ContextDependency }} ContextDependencyConstructor */ - -/** - * @param {ContextDependencyConstructor} Dep the Dependency class - * @param {[number, number]} range source range - * @param {BasicEvaluatedExpression} param context param - * @param {EsTreeNode} expr expr - * @param {Pick} options options for context creation - * @param {PartialContextDependencyOptions} contextOptions options for the ContextModule - * @param {JavascriptParser} parser the parser - * @param {...any} depArgs depArgs - * @returns {ContextDependency} the created Dependency - */ -exports.create = ( - Dep, - range, - param, - expr, - options, - contextOptions, - parser, - ...depArgs -) => { - if (param.isTemplateString()) { - let prefixRaw = param.quasis[0].string; - let postfixRaw = - param.quasis.length > 1 - ? param.quasis[param.quasis.length - 1].string - : ""; - - const valueRange = param.range; - const { context, prefix } = splitContextFromPrefix(prefixRaw); - const { - path: postfix, - query, - fragment - } = parseResource(postfixRaw, parser); - - // When there are more than two quasis, the generated RegExp can be more precise - // We join the quasis with the expression regexp - const innerQuasis = param.quasis.slice(1, param.quasis.length - 1); - const innerRegExp = - options.wrappedContextRegExp.source + - innerQuasis - .map(q => quoteMeta(q.string) + options.wrappedContextRegExp.source) - .join(""); - - // Example: `./context/pre${e}inner${e}inner2${e}post?query#frag` - // context: "./context" - // prefix: "./pre" - // innerQuasis: [BEE("inner"), BEE("inner2")] - // (BEE = BasicEvaluatedExpression) - // postfix: "post" - // query: "?query" - // fragment: "#frag" - // regExp: /^\.\/pre.*inner.*inner2.*post$/ - const regExp = new RegExp( - `^${quoteMeta(prefix)}${innerRegExp}${quoteMeta(postfix)}$` - ); - const dep = new Dep( - { - request: context + query + fragment, - recursive: options.wrappedContextRecursive, - regExp, - mode: "sync", - ...contextOptions - }, - range, - valueRange, - ...depArgs - ); - dep.loc = expr.loc; - const replaces = []; - - param.parts.forEach((part, i) => { - if (i % 2 === 0) { - // Quasis or merged quasi - let range = part.range; - let value = part.string; - if (param.templateStringKind === "cooked") { - value = JSON.stringify(value); - value = value.slice(1, value.length - 1); - } - if (i === 0) { - // prefix - value = prefix; - range = [param.range[0], part.range[1]]; - value = - (param.templateStringKind === "cooked" ? "`" : "String.raw`") + - value; - } else if (i === param.parts.length - 1) { - // postfix - value = postfix; - range = [part.range[0], param.range[1]]; - value = value + "`"; - } else if ( - part.expression && - part.expression.type === "TemplateElement" && - part.expression.value.raw === value - ) { - // Shortcut when it's a single quasi and doesn't need to be replaced - return; - } - replaces.push({ - range, - value - }); - } else { - // Expression - parser.walkExpression(part.expression); - } - }); - - dep.replaces = replaces; - dep.critical = - options.wrappedContextCritical && - "a part of the request of a dependency is an expression"; - return dep; - } else if ( - param.isWrapped() && - ((param.prefix && param.prefix.isString()) || - (param.postfix && param.postfix.isString())) - ) { - let prefixRaw = - param.prefix && param.prefix.isString() ? param.prefix.string : ""; - let postfixRaw = - param.postfix && param.postfix.isString() ? param.postfix.string : ""; - const prefixRange = - param.prefix && param.prefix.isString() ? param.prefix.range : null; - const postfixRange = - param.postfix && param.postfix.isString() ? param.postfix.range : null; - const valueRange = param.range; - const { context, prefix } = splitContextFromPrefix(prefixRaw); - const { - path: postfix, - query, - fragment - } = parseResource(postfixRaw, parser); - const regExp = new RegExp( - `^${quoteMeta(prefix)}${options.wrappedContextRegExp.source}${quoteMeta( - postfix - )}$` - ); - const dep = new Dep( - { - request: context + query + fragment, - recursive: options.wrappedContextRecursive, - regExp, - mode: "sync", - ...contextOptions - }, - range, - valueRange, - ...depArgs - ); - dep.loc = expr.loc; - const replaces = []; - if (prefixRange) { - replaces.push({ - range: prefixRange, - value: JSON.stringify(prefix) - }); - } - if (postfixRange) { - replaces.push({ - range: postfixRange, - value: JSON.stringify(postfix) - }); - } - dep.replaces = replaces; - dep.critical = - options.wrappedContextCritical && - "a part of the request of a dependency is an expression"; - - if (parser && param.wrappedInnerExpressions) { - for (const part of param.wrappedInnerExpressions) { - if (part.expression) parser.walkExpression(part.expression); - } - } - - return dep; - } else { - const dep = new Dep( - { - request: options.exprContextRequest, - recursive: options.exprContextRecursive, - regExp: /** @type {RegExp} */ (options.exprContextRegExp), - mode: "sync", - ...contextOptions - }, - range, - param.range, - ...depArgs - ); - dep.loc = expr.loc; - dep.critical = - options.exprContextCritical && - "the request of a dependency is an expression"; - - parser.walkExpression(param.expression); - - return dep; - } -}; - - -/***/ }), - -/***/ 44967: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ContextDependency = __webpack_require__(22429); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class ContextDependencyTemplateAsId extends ContextDependency.Template { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ContextDependency} */ (dependency); - const moduleExports = runtimeTemplate.moduleExports({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - weak: dep.weak, - runtimeRequirements - }); - - if (moduleGraph.getModule(dep)) { - if (dep.valueRange) { - if (Array.isArray(dep.replaces)) { - for (let i = 0; i < dep.replaces.length; i++) { - const rep = dep.replaces[i]; - source.replace(rep.range[0], rep.range[1] - 1, rep.value); - } - } - source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); - source.replace( - dep.range[0], - dep.valueRange[0] - 1, - `${moduleExports}.resolve(` - ); - } else { - source.replace( - dep.range[0], - dep.range[1] - 1, - `${moduleExports}.resolve` - ); - } - } else { - source.replace(dep.range[0], dep.range[1] - 1, moduleExports); - } - } -} -module.exports = ContextDependencyTemplateAsId; - - -/***/ }), - -/***/ 5160: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ContextDependency = __webpack_require__(22429); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class ContextDependencyTemplateAsRequireCall extends ContextDependency.Template { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ContextDependency} */ (dependency); - let moduleExports = runtimeTemplate.moduleExports({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - runtimeRequirements - }); - - if (dep.inShorthand) { - moduleExports = `${dep.inShorthand}: ${moduleExports}`; - } - if (moduleGraph.getModule(dep)) { - if (dep.valueRange) { - if (Array.isArray(dep.replaces)) { - for (let i = 0; i < dep.replaces.length; i++) { - const rep = dep.replaces[i]; - source.replace(rep.range[0], rep.range[1] - 1, rep.value); - } - } - source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); - source.replace( - dep.range[0], - dep.valueRange[0] - 1, - `${moduleExports}(` - ); - } else { - source.replace(dep.range[0], dep.range[1] - 1, moduleExports); - } - } else { - source.replace(dep.range[0], dep.range[1] - 1, moduleExports); - } - } -} -module.exports = ContextDependencyTemplateAsRequireCall; - - -/***/ }), - -/***/ 34192: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class ContextElementDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {string|undefined} userRequest user request - * @param {string} typePrefix type prefix - * @param {string} category category - * @param {string[][]=} referencedExports referenced exports - * @param {string=} context context - */ - constructor( - request, - userRequest, - typePrefix, - category, - referencedExports, - context - ) { - super(request); - this.referencedExports = referencedExports; - this._typePrefix = typePrefix; - this._category = category; - this._context = context || undefined; - - if (userRequest) { - this.userRequest = userRequest; - } - } - - get type() { - if (this._typePrefix) { - return `${this._typePrefix} context element`; - } - - return "context element"; - } - - get category() { - return this._category; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return this.referencedExports - ? this.referencedExports.map(e => ({ - name: e, - canMangle: false - })) - : Dependency.EXPORTS_OBJECT_REFERENCED; - } - - serialize(context) { - const { write } = context; - write(this._typePrefix); - write(this._category); - write(this.referencedExports); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this._typePrefix = read(); - this._category = read(); - this.referencedExports = read(); - super.deserialize(context); - } -} - -makeSerializable( - ContextElementDependency, - "webpack/lib/dependencies/ContextElementDependency" -); - -module.exports = ContextElementDependency; - - -/***/ }), - -/***/ 37857: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class CreateScriptUrlDependency extends NullDependency { - /** - * @param {[number, number]} range range - */ - constructor(range) { - super(); - this.range = range; - } - - get type() { - return "create script url"; - } - - serialize(context) { - const { write } = context; - write(this.range); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - super.deserialize(context); - } -} - -CreateScriptUrlDependency.Template = class CreateScriptUrlDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeRequirements }) { - const dep = /** @type {CreateScriptUrlDependency} */ (dependency); - - runtimeRequirements.add(RuntimeGlobals.createScriptUrl); - - source.insert(dep.range[0], `${RuntimeGlobals.createScriptUrl}(`); - source.insert(dep.range[1], ")"); - } -}; - -makeSerializable( - CreateScriptUrlDependency, - "webpack/lib/dependencies/CreateScriptUrlDependency" -); - -module.exports = CreateScriptUrlDependency; - - -/***/ }), - -/***/ 34219: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const makeSerializable = __webpack_require__(65764); - -class CriticalDependencyWarning extends WebpackError { - constructor(message) { - super(); - - this.name = "CriticalDependencyWarning"; - this.message = "Critical dependency: " + message; - } -} - -makeSerializable( - CriticalDependencyWarning, - "webpack/lib/dependencies/CriticalDependencyWarning" -); - -module.exports = CriticalDependencyWarning; - - -/***/ }), - -/***/ 12778: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../DependencyTemplate").CssDependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -class CssExportDependency extends NullDependency { - /** - * @param {string} name name - * @param {string} value value - */ - constructor(name, value) { - super(); - this.name = name; - this.value = value; - } - - get type() { - return "css :export"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - const name = this.name; - return { - exports: [ - { - name, - canMangle: true - } - ], - dependencies: undefined - }; - } - - serialize(context) { - const { write } = context; - write(this.name); - write(this.value); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.name = read(); - this.value = read(); - super.deserialize(context); - } -} - -CssExportDependency.Template = class CssExportDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { cssExports }) { - const dep = /** @type {CssExportDependency} */ (dependency); - cssExports.set(dep.name, dep.value); - } -}; - -makeSerializable( - CssExportDependency, - "webpack/lib/dependencies/CssExportDependency" -); - -module.exports = CssExportDependency; - - -/***/ }), - -/***/ 2951: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class CssImportDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {[number, number]} range range of the argument - * @param {string | undefined} supports list of supports conditions - * @param {string | undefined} media list of media conditions - */ - constructor(request, range, supports, media) { - super(request); - this.range = range; - this.supports = supports; - this.media = media; - } - - get type() { - return "css @import"; - } - - get category() { - return "css-import"; - } - - /** - * @param {string} context context directory - * @returns {Module} a module - */ - createIgnoredModule(context) { - return null; - } -} - -CssImportDependency.Template = class CssImportDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {CssImportDependency} */ (dependency); - - source.replace(dep.range[0], dep.range[1] - 1, ""); - } -}; - -makeSerializable( - CssImportDependency, - "webpack/lib/dependencies/CssImportDependency" -); - -module.exports = CssImportDependency; - - -/***/ }), - -/***/ 75689: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../DependencyTemplate").CssDependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -class CssLocalIdentifierDependency extends NullDependency { - /** - * @param {string} name name - * @param {[number, number]} range range - * @param {string=} prefix prefix - */ - constructor(name, range, prefix = "") { - super(); - this.name = name; - this.range = range; - this.prefix = prefix; - } - - get type() { - return "css local identifier"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - const name = this.name; - return { - exports: [ - { - name, - canMangle: true - } - ], - dependencies: undefined - }; - } - - serialize(context) { - const { write } = context; - write(this.name); - write(this.range); - write(this.prefix); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.name = read(); - this.range = read(); - this.prefix = read(); - super.deserialize(context); - } -} - -const escapeCssIdentifier = (str, omitUnderscore) => { - const escaped = `${str}`.replace( - // cspell:word uffff - /[^a-zA-Z0-9_\u0081-\uffff-]/g, - s => `\\${s}` - ); - return !omitUnderscore && /^(?!--)[0-9-]/.test(escaped) - ? `_${escaped}` - : escaped; -}; - -CssLocalIdentifierDependency.Template = class CssLocalIdentifierDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { module, moduleGraph, chunkGraph, runtime, runtimeTemplate, cssExports } - ) { - const dep = /** @type {CssLocalIdentifierDependency} */ (dependency); - const used = moduleGraph - .getExportInfo(module, dep.name) - .getUsedName(dep.name, runtime); - const moduleId = chunkGraph.getModuleId(module); - const identifier = - dep.prefix + - (runtimeTemplate.outputOptions.uniqueName - ? runtimeTemplate.outputOptions.uniqueName + "-" - : "") + - (used ? moduleId + "-" + used : "-"); - source.replace( - dep.range[0], - dep.range[1] - 1, - escapeCssIdentifier(identifier, dep.prefix) - ); - if (used) cssExports.set(used, identifier); - } -}; - -makeSerializable( - CssLocalIdentifierDependency, - "webpack/lib/dependencies/CssLocalIdentifierDependency" -); - -module.exports = CssLocalIdentifierDependency; - - -/***/ }), - -/***/ 24769: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); -const CssLocalIdentifierDependency = __webpack_require__(75689); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").CssDependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class CssSelfLocalIdentifierDependency extends CssLocalIdentifierDependency { - /** - * @param {string} name name - * @param {[number, number]} range range - * @param {string=} prefix prefix - * @param {Set=} declaredSet set of declared names (will only be active when in declared set) - */ - constructor(name, range, prefix = "", declaredSet = undefined) { - super(name, range, prefix); - this.declaredSet = declaredSet; - } - - get type() { - return "css self local identifier"; - } - - get category() { - return "self"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `self`; - } - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - if (this.declaredSet && !this.declaredSet.has(this.name)) return; - return super.getExports(moduleGraph); - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - if (this.declaredSet && !this.declaredSet.has(this.name)) - return Dependency.NO_EXPORTS_REFERENCED; - return [[this.name]]; - } - - serialize(context) { - const { write } = context; - write(this.declaredSet); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.declaredSet = read(); - super.deserialize(context); - } -} - -CssSelfLocalIdentifierDependency.Template = class CssSelfLocalIdentifierDependencyTemplate extends ( - CssLocalIdentifierDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {CssSelfLocalIdentifierDependency} */ (dependency); - if (dep.declaredSet && !dep.declaredSet.has(dep.name)) return; - super.apply(dependency, source, templateContext); - } -}; - -makeSerializable( - CssSelfLocalIdentifierDependency, - "webpack/lib/dependencies/CssSelfLocalIdentifierDependency" -); - -module.exports = CssSelfLocalIdentifierDependency; - - -/***/ }), - -/***/ 75178: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const memoize = __webpack_require__(61374); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const getRawDataUrlModule = memoize(() => __webpack_require__(66788)); - -class CssUrlDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {[number, number]} range range of the argument - * @param {string} cssFunctionKind kind of css function, e. g. url(), image() - */ - constructor(request, range, cssFunctionKind) { - super(request); - this.range = range; - this.cssFunctionKind = cssFunctionKind; - } - - get type() { - return "css url()"; - } - - get category() { - return "url"; - } - - /** - * @param {string} context context directory - * @returns {Module} a module - */ - createIgnoredModule(context) { - const RawDataUrlModule = getRawDataUrlModule(); - return new RawDataUrlModule("data:,", `ignored-asset`, `(ignored asset)`); - } - - serialize(context) { - const { write } = context; - write(this.cssFunctionKind); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.cssFunctionKind = read(); - super.deserialize(context); - } -} - -const cssEscapeString = str => { - let countWhiteOrBracket = 0; - let countQuotation = 0; - let countApostrophe = 0; - for (let i = 0; i < str.length; i++) { - const cc = str.charCodeAt(i); - switch (cc) { - case 9: // tab - case 10: // nl - case 32: // space - case 40: // ( - case 41: // ) - countWhiteOrBracket++; - break; - case 34: - countQuotation++; - break; - case 39: - countApostrophe++; - break; - } - } - if (countWhiteOrBracket < 2) { - return str.replace(/[\n\t ()'"\\]/g, m => `\\${m}`); - } else if (countQuotation <= countApostrophe) { - return `"${str.replace(/[\n"\\]/g, m => `\\${m}`)}"`; - } else { - return `'${str.replace(/[\n'\\]/g, m => `\\${m}`)}'`; - } -}; - -CssUrlDependency.Template = class CssUrlDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtime, moduleGraph, runtimeTemplate, codeGenerationResults } - ) { - const dep = /** @type {CssUrlDependency} */ (dependency); - - source.replace( - dep.range[0], - dep.range[1] - 1, - `${dep.cssFunctionKind}(${cssEscapeString( - runtimeTemplate.assetUrl({ - publicPath: "", - runtime, - module: moduleGraph.getModule(dep), - codeGenerationResults - }) - )})` - ); - } -}; - -makeSerializable(CssUrlDependency, "webpack/lib/dependencies/CssUrlDependency"); - -module.exports = CssUrlDependency; - - -/***/ }), - -/***/ 70688: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -class DelegatedSourceDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "delegated source"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - DelegatedSourceDependency, - "webpack/lib/dependencies/DelegatedSourceDependency" -); - -module.exports = DelegatedSourceDependency; - - -/***/ }), - -/***/ 21467: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); - -class DllEntryDependency extends Dependency { - constructor(dependencies, name) { - super(); - - this.dependencies = dependencies; - this.name = name; - } - - get type() { - return "dll entry"; - } - - serialize(context) { - const { write } = context; - - write(this.dependencies); - write(this.name); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.dependencies = read(); - this.name = read(); - - super.deserialize(context); - } -} - -makeSerializable( - DllEntryDependency, - "webpack/lib/dependencies/DllEntryDependency" -); - -module.exports = DllEntryDependency; - - -/***/ }), - -/***/ 35485: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Parser").ParserState} ParserState */ - -/** @type {WeakMap} */ -const parserStateExportsState = new WeakMap(); - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.bailout = parserState => { - const value = parserStateExportsState.get(parserState); - parserStateExportsState.set(parserState, false); - if (value === true) { - parserState.module.buildMeta.exportsType = undefined; - parserState.module.buildMeta.defaultObject = false; - } -}; - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.enable = parserState => { - const value = parserStateExportsState.get(parserState); - if (value === false) return; - parserStateExportsState.set(parserState, true); - if (value !== true) { - parserState.module.buildMeta.exportsType = "default"; - parserState.module.buildMeta.defaultObject = "redirect"; - } -}; - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.setFlagged = parserState => { - const value = parserStateExportsState.get(parserState); - if (value !== true) return; - const buildMeta = parserState.module.buildMeta; - if (buildMeta.exportsType === "dynamic") return; - buildMeta.exportsType = "flagged"; -}; - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.setDynamic = parserState => { - const value = parserStateExportsState.get(parserState); - if (value !== true) return; - parserState.module.buildMeta.exportsType = "dynamic"; -}; - -/** - * @param {ParserState} parserState parser state - * @returns {boolean} true, when enabled - */ -exports.isEnabled = parserState => { - const value = parserStateExportsState.get(parserState); - return value === true; -}; - - -/***/ }), - -/***/ 17380: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -class EntryDependency extends ModuleDependency { - /** - * @param {string} request request path for entry - */ - constructor(request) { - super(request); - } - - get type() { - return "entry"; - } - - get category() { - return "esm"; - } -} - -makeSerializable(EntryDependency, "webpack/lib/dependencies/EntryDependency"); - -module.exports = EntryDependency; - - -/***/ }), - -/***/ 36853: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { UsageState } = __webpack_require__(13168); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {Module} module the module - * @param {string | null} exportName name of the export if any - * @param {string | null} property name of the requested property - * @param {RuntimeSpec} runtime for which runtime - * @returns {any} value of the property - */ -const getProperty = (moduleGraph, module, exportName, property, runtime) => { - if (!exportName) { - switch (property) { - case "usedExports": { - const usedExports = moduleGraph - .getExportsInfo(module) - .getUsedExports(runtime); - if ( - typeof usedExports === "boolean" || - usedExports === undefined || - usedExports === null - ) { - return usedExports; - } - return Array.from(usedExports).sort(); - } - } - } - switch (property) { - case "canMangle": { - const exportsInfo = moduleGraph.getExportsInfo(module); - const exportInfo = exportsInfo.getExportInfo(exportName); - if (exportInfo) return exportInfo.canMangle; - return exportsInfo.otherExportsInfo.canMangle; - } - case "used": - return ( - moduleGraph.getExportsInfo(module).getUsed(exportName, runtime) !== - UsageState.Unused - ); - case "useInfo": { - const state = moduleGraph - .getExportsInfo(module) - .getUsed(exportName, runtime); - switch (state) { - case UsageState.Used: - case UsageState.OnlyPropertiesUsed: - return true; - case UsageState.Unused: - return false; - case UsageState.NoInfo: - return undefined; - case UsageState.Unknown: - return null; - default: - throw new Error(`Unexpected UsageState ${state}`); - } - } - case "provideInfo": - return moduleGraph.getExportsInfo(module).isExportProvided(exportName); - } - return undefined; -}; - -class ExportsInfoDependency extends NullDependency { - constructor(range, exportName, property) { - super(); - this.range = range; - this.exportName = exportName; - this.property = property; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.exportName); - write(this.property); - super.serialize(context); - } - - static deserialize(context) { - const obj = new ExportsInfoDependency( - context.read(), - context.read(), - context.read() - ); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - ExportsInfoDependency, - "webpack/lib/dependencies/ExportsInfoDependency" -); - -ExportsInfoDependency.Template = class ExportsInfoDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { module, moduleGraph, runtime }) { - const dep = /** @type {ExportsInfoDependency} */ (dependency); - - const value = getProperty( - moduleGraph, - module, - dep.exportName, - dep.property, - runtime - ); - source.replace( - dep.range[0], - dep.range[1] - 1, - value === undefined ? "undefined" : JSON.stringify(value) - ); - } -}; - -module.exports = ExportsInfoDependency; - - -/***/ }), - -/***/ 98702: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Template = __webpack_require__(43841); -const makeSerializable = __webpack_require__(65764); -const HarmonyImportDependency = __webpack_require__(58668); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("./HarmonyAcceptImportDependency")} HarmonyAcceptImportDependency */ - -class HarmonyAcceptDependency extends NullDependency { - /** - * @param {[number, number]} range expression range - * @param {HarmonyAcceptImportDependency[]} dependencies import dependencies - * @param {boolean} hasCallback true, if the range wraps an existing callback - */ - constructor(range, dependencies, hasCallback) { - super(); - this.range = range; - this.dependencies = dependencies; - this.hasCallback = hasCallback; - } - - get type() { - return "accepted harmony modules"; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.dependencies); - write(this.hasCallback); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.dependencies = read(); - this.hasCallback = read(); - super.deserialize(context); - } -} - -makeSerializable( - HarmonyAcceptDependency, - "webpack/lib/dependencies/HarmonyAcceptDependency" -); - -HarmonyAcceptDependency.Template = class HarmonyAcceptDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {HarmonyAcceptDependency} */ (dependency); - const { - module, - runtime, - runtimeRequirements, - runtimeTemplate, - moduleGraph, - chunkGraph - } = templateContext; - const content = dep.dependencies - .map(dependency => { - const referencedModule = moduleGraph.getModule(dependency); - return { - dependency, - runtimeCondition: referencedModule - ? HarmonyImportDependency.Template.getImportEmittedRuntime( - module, - referencedModule - ) - : false - }; - }) - .filter(({ runtimeCondition }) => runtimeCondition !== false) - .map(({ dependency, runtimeCondition }) => { - const condition = runtimeTemplate.runtimeConditionExpression({ - chunkGraph, - runtime, - runtimeCondition, - runtimeRequirements - }); - const s = dependency.getImportStatement(true, templateContext); - const code = s[0] + s[1]; - if (condition !== "true") { - return `if (${condition}) {\n${Template.indent(code)}\n}\n`; - } - return code; - }) - .join(""); - - if (dep.hasCallback) { - if (runtimeTemplate.supportsArrowFunction()) { - source.insert( - dep.range[0], - `__WEBPACK_OUTDATED_DEPENDENCIES__ => { ${content}(` - ); - source.insert(dep.range[1], ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }"); - } else { - source.insert( - dep.range[0], - `function(__WEBPACK_OUTDATED_DEPENDENCIES__) { ${content}(` - ); - source.insert( - dep.range[1], - ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }.bind(this)" - ); - } - return; - } - - const arrow = runtimeTemplate.supportsArrowFunction(); - source.insert( - dep.range[1] - 0.5, - `, ${arrow ? "() =>" : "function()"} { ${content} }` - ); - } -}; - -module.exports = HarmonyAcceptDependency; - - -/***/ }), - -/***/ 13345: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const HarmonyImportDependency = __webpack_require__(58668); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class HarmonyAcceptImportDependency extends HarmonyImportDependency { - constructor(request) { - super(request, NaN); - this.weak = true; - } - - get type() { - return "harmony accept"; - } -} - -makeSerializable( - HarmonyAcceptImportDependency, - "webpack/lib/dependencies/HarmonyAcceptImportDependency" -); - -HarmonyAcceptImportDependency.Template = - /** @type {typeof HarmonyImportDependency.Template} */ ( - NullDependency.Template - ); - -module.exports = HarmonyAcceptImportDependency; - - -/***/ }), - -/***/ 48180: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { UsageState } = __webpack_require__(13168); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ - -class HarmonyCompatibilityDependency extends NullDependency { - get type() { - return "harmony export header"; - } -} - -makeSerializable( - HarmonyCompatibilityDependency, - "webpack/lib/dependencies/HarmonyCompatibilityDependency" -); - -HarmonyCompatibilityDependency.Template = class HarmonyExportDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { - module, - runtimeTemplate, - moduleGraph, - initFragments, - runtimeRequirements, - runtime, - concatenationScope - } - ) { - if (concatenationScope) return; - const exportsInfo = moduleGraph.getExportsInfo(module); - if ( - exportsInfo.getReadOnlyExportInfo("__esModule").getUsed(runtime) !== - UsageState.Unused - ) { - const content = runtimeTemplate.defineEsModuleFlagStatement({ - exportsArgument: module.exportsArgument, - runtimeRequirements - }); - initFragments.push( - new InitFragment( - content, - InitFragment.STAGE_HARMONY_EXPORTS, - 0, - "harmony compatibility" - ) - ); - } - if (moduleGraph.isAsync(module)) { - runtimeRequirements.add(RuntimeGlobals.module); - runtimeRequirements.add(RuntimeGlobals.asyncModule); - initFragments.push( - new InitFragment( - runtimeTemplate.supportsArrowFunction() - ? `${RuntimeGlobals.asyncModule}(${module.moduleArgument}, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n` - : `${RuntimeGlobals.asyncModule}(${module.moduleArgument}, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {\n`, - InitFragment.STAGE_ASYNC_BOUNDARY, - 0, - undefined, - `\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } }${ - module.buildMeta.async ? ", 1" : "" - });` - ) - ); - } - } -}; - -module.exports = HarmonyCompatibilityDependency; - - -/***/ }), - -/***/ 69585: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DynamicExports = __webpack_require__(35485); -const HarmonyCompatibilityDependency = __webpack_require__(48180); -const HarmonyExports = __webpack_require__(40699); - -module.exports = class HarmonyDetectionParserPlugin { - constructor(options) { - const { topLevelAwait = false } = options || {}; - this.topLevelAwait = topLevelAwait; - } - - apply(parser) { - parser.hooks.program.tap("HarmonyDetectionParserPlugin", ast => { - const isStrictHarmony = parser.state.module.type === "javascript/esm"; - const isHarmony = - isStrictHarmony || - ast.body.some( - statement => - statement.type === "ImportDeclaration" || - statement.type === "ExportDefaultDeclaration" || - statement.type === "ExportNamedDeclaration" || - statement.type === "ExportAllDeclaration" - ); - if (isHarmony) { - const module = parser.state.module; - const compatDep = new HarmonyCompatibilityDependency(); - compatDep.loc = { - start: { - line: -1, - column: 0 - }, - end: { - line: -1, - column: 0 - }, - index: -3 - }; - module.addPresentationalDependency(compatDep); - DynamicExports.bailout(parser.state); - HarmonyExports.enable(parser.state, isStrictHarmony); - parser.scope.isStrict = true; - } - }); - - parser.hooks.topLevelAwait.tap("HarmonyDetectionParserPlugin", () => { - const module = parser.state.module; - if (!this.topLevelAwait) { - throw new Error( - "The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)" - ); - } - if (!HarmonyExports.isEnabled(parser.state)) { - throw new Error( - "Top-level-await is only supported in EcmaScript Modules" - ); - } - module.buildMeta.async = true; - }); - - const skipInHarmony = () => { - if (HarmonyExports.isEnabled(parser.state)) { - return true; - } - }; - - const nullInHarmony = () => { - if (HarmonyExports.isEnabled(parser.state)) { - return null; - } - }; - - const nonHarmonyIdentifiers = ["define", "exports"]; - for (const identifier of nonHarmonyIdentifiers) { - parser.hooks.evaluateTypeof - .for(identifier) - .tap("HarmonyDetectionParserPlugin", nullInHarmony); - parser.hooks.typeof - .for(identifier) - .tap("HarmonyDetectionParserPlugin", skipInHarmony); - parser.hooks.evaluate - .for(identifier) - .tap("HarmonyDetectionParserPlugin", nullInHarmony); - parser.hooks.expression - .for(identifier) - .tap("HarmonyDetectionParserPlugin", skipInHarmony); - parser.hooks.call - .for(identifier) - .tap("HarmonyDetectionParserPlugin", skipInHarmony); - } - } -}; - - -/***/ }), - -/***/ 87799: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const HarmonyImportSpecifierDependency = __webpack_require__(577); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -/** - * Dependency for static evaluating import specifier. e.g. - * @example - * import a from "a"; - * "x" in a; - * a.x !== undefined; // if x value statically analyzable - */ -class HarmonyEvaluatedImportSpecifierDependency extends HarmonyImportSpecifierDependency { - constructor(request, sourceOrder, ids, name, range, assertions, operator) { - super(request, sourceOrder, ids, name, range, false, assertions); - this.operator = operator; - } - - get type() { - return `evaluated X ${this.operator} harmony import specifier`; - } - - serialize(context) { - super.serialize(context); - const { write } = context; - write(this.operator); - } - - deserialize(context) { - super.deserialize(context); - const { read } = context; - this.operator = read(); - } -} - -makeSerializable( - HarmonyEvaluatedImportSpecifierDependency, - "webpack/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency" -); - -HarmonyEvaluatedImportSpecifierDependency.Template = class HarmonyEvaluatedImportSpecifierDependencyTemplate extends ( - HarmonyImportSpecifierDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {HarmonyEvaluatedImportSpecifierDependency} */ ( - dependency - ); - const { module, moduleGraph, runtime } = templateContext; - const connection = moduleGraph.getConnection(dep); - // Skip rendering depending when dependency is conditional - if (connection && !connection.isTargetActive(runtime)) return; - - const exportsInfo = moduleGraph.getExportsInfo(connection.module); - const ids = dep.getIds(moduleGraph); - - let value; - - const exportsType = connection.module.getExportsType( - moduleGraph, - module.buildMeta.strictHarmonyModule - ); - switch (exportsType) { - case "default-with-named": { - if (ids[0] === "default") { - value = - ids.length === 1 || exportsInfo.isExportProvided(ids.slice(1)); - } else { - value = exportsInfo.isExportProvided(ids); - } - break; - } - case "namespace": { - if (ids[0] === "__esModule") { - value = ids.length === 1 || undefined; - } else { - value = exportsInfo.isExportProvided(ids); - } - break; - } - case "dynamic": { - if (ids[0] !== "default") { - value = exportsInfo.isExportProvided(ids); - } - break; - } - // default-only could lead to runtime error, when default value is primitive - } - - if (typeof value === "boolean") { - source.replace(dep.range[0], dep.range[1] - 1, ` ${value}`); - } else { - const usedName = exportsInfo.getUsedName(ids, runtime); - - const code = this._getCodeForIds( - dep, - source, - templateContext, - ids.slice(0, -1) - ); - source.replace( - dep.range[0], - dep.range[1] - 1, - `${ - usedName ? JSON.stringify(usedName[usedName.length - 1]) : '""' - } in ${code}` - ); - } - } -}; - -module.exports = HarmonyEvaluatedImportSpecifierDependency; - - -/***/ }), - -/***/ 28445: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const InnerGraph = __webpack_require__(39236); -const ConstDependency = __webpack_require__(14367); -const HarmonyExportExpressionDependency = __webpack_require__(61404); -const HarmonyExportHeaderDependency = __webpack_require__(31623); -const HarmonyExportImportedSpecifierDependency = __webpack_require__(96577); -const HarmonyExportSpecifierDependency = __webpack_require__(22437); -const { ExportPresenceModes } = __webpack_require__(58668); -const { - harmonySpecifierTag, - getAssertions -} = __webpack_require__(59152); -const HarmonyImportSideEffectDependency = __webpack_require__(95913); - -const { HarmonyStarExportsList } = HarmonyExportImportedSpecifierDependency; - -module.exports = class HarmonyExportDependencyParserPlugin { - constructor(options) { - this.exportPresenceMode = - options.reexportExportsPresence !== undefined - ? ExportPresenceModes.fromUserOption(options.reexportExportsPresence) - : options.exportsPresence !== undefined - ? ExportPresenceModes.fromUserOption(options.exportsPresence) - : options.strictExportPresence - ? ExportPresenceModes.ERROR - : ExportPresenceModes.AUTO; - } - - apply(parser) { - const { exportPresenceMode } = this; - parser.hooks.export.tap( - "HarmonyExportDependencyParserPlugin", - statement => { - const dep = new HarmonyExportHeaderDependency( - statement.declaration && statement.declaration.range, - statement.range - ); - dep.loc = Object.create(statement.loc); - dep.loc.index = -1; - parser.state.module.addPresentationalDependency(dep); - return true; - } - ); - parser.hooks.exportImport.tap( - "HarmonyExportDependencyParserPlugin", - (statement, source) => { - parser.state.lastHarmonyImportOrder = - (parser.state.lastHarmonyImportOrder || 0) + 1; - const clearDep = new ConstDependency("", statement.range); - clearDep.loc = Object.create(statement.loc); - clearDep.loc.index = -1; - parser.state.module.addPresentationalDependency(clearDep); - const sideEffectDep = new HarmonyImportSideEffectDependency( - source, - parser.state.lastHarmonyImportOrder, - getAssertions(statement) - ); - sideEffectDep.loc = Object.create(statement.loc); - sideEffectDep.loc.index = -1; - parser.state.current.addDependency(sideEffectDep); - return true; - } - ); - parser.hooks.exportExpression.tap( - "HarmonyExportDependencyParserPlugin", - (statement, expr) => { - const isFunctionDeclaration = expr.type === "FunctionDeclaration"; - const comments = parser.getComments([ - statement.range[0], - expr.range[0] - ]); - const dep = new HarmonyExportExpressionDependency( - expr.range, - statement.range, - comments - .map(c => { - switch (c.type) { - case "Block": - return `/*${c.value}*/`; - case "Line": - return `//${c.value}\n`; - } - return ""; - }) - .join(""), - expr.type.endsWith("Declaration") && expr.id - ? expr.id.name - : isFunctionDeclaration - ? { - id: expr.id ? expr.id.name : undefined, - range: [ - expr.range[0], - expr.params.length > 0 - ? expr.params[0].range[0] - : expr.body.range[0] - ], - prefix: `${expr.async ? "async " : ""}function${ - expr.generator ? "*" : "" - } `, - suffix: `(${expr.params.length > 0 ? "" : ") "}` - } - : undefined - ); - dep.loc = Object.create(statement.loc); - dep.loc.index = -1; - parser.state.current.addDependency(dep); - InnerGraph.addVariableUsage( - parser, - expr.type.endsWith("Declaration") && expr.id - ? expr.id.name - : "*default*", - "default" - ); - return true; - } - ); - parser.hooks.exportSpecifier.tap( - "HarmonyExportDependencyParserPlugin", - (statement, id, name, idx) => { - const settings = parser.getTagData(id, harmonySpecifierTag); - let dep; - const harmonyNamedExports = (parser.state.harmonyNamedExports = - parser.state.harmonyNamedExports || new Set()); - harmonyNamedExports.add(name); - InnerGraph.addVariableUsage(parser, id, name); - if (settings) { - dep = new HarmonyExportImportedSpecifierDependency( - settings.source, - settings.sourceOrder, - settings.ids, - name, - harmonyNamedExports, - null, - exportPresenceMode, - null, - settings.assertions - ); - } else { - dep = new HarmonyExportSpecifierDependency(id, name); - } - dep.loc = Object.create(statement.loc); - dep.loc.index = idx; - parser.state.current.addDependency(dep); - return true; - } - ); - parser.hooks.exportImportSpecifier.tap( - "HarmonyExportDependencyParserPlugin", - (statement, source, id, name, idx) => { - const harmonyNamedExports = (parser.state.harmonyNamedExports = - parser.state.harmonyNamedExports || new Set()); - let harmonyStarExports = null; - if (name) { - harmonyNamedExports.add(name); - } else { - harmonyStarExports = parser.state.harmonyStarExports = - parser.state.harmonyStarExports || new HarmonyStarExportsList(); - } - const dep = new HarmonyExportImportedSpecifierDependency( - source, - parser.state.lastHarmonyImportOrder, - id ? [id] : [], - name, - harmonyNamedExports, - harmonyStarExports && harmonyStarExports.slice(), - exportPresenceMode, - harmonyStarExports - ); - if (harmonyStarExports) { - harmonyStarExports.push(dep); - } - dep.loc = Object.create(statement.loc); - dep.loc.index = idx; - parser.state.current.addDependency(dep); - return true; - } - ); - } -}; - - -/***/ }), - -/***/ 61404: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConcatenationScope = __webpack_require__(81701); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const HarmonyExportInitFragment = __webpack_require__(64139); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ - -class HarmonyExportExpressionDependency extends NullDependency { - constructor(range, rangeStatement, prefix, declarationId) { - super(); - this.range = range; - this.rangeStatement = rangeStatement; - this.prefix = prefix; - this.declarationId = declarationId; - } - - get type() { - return "harmony export expression"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - return { - exports: ["default"], - priority: 1, - terminalBinding: true, - dependencies: undefined - }; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - // The expression/declaration is already covered by SideEffectsFlagPlugin - return false; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.rangeStatement); - write(this.prefix); - write(this.declarationId); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.rangeStatement = read(); - this.prefix = read(); - this.declarationId = read(); - super.deserialize(context); - } -} - -makeSerializable( - HarmonyExportExpressionDependency, - "webpack/lib/dependencies/HarmonyExportExpressionDependency" -); - -HarmonyExportExpressionDependency.Template = class HarmonyExportDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { - module, - moduleGraph, - runtimeTemplate, - runtimeRequirements, - initFragments, - runtime, - concatenationScope - } - ) { - const dep = /** @type {HarmonyExportExpressionDependency} */ (dependency); - const { declarationId } = dep; - const exportsName = module.exportsArgument; - if (declarationId) { - let name; - if (typeof declarationId === "string") { - name = declarationId; - } else { - name = ConcatenationScope.DEFAULT_EXPORT; - source.replace( - declarationId.range[0], - declarationId.range[1] - 1, - `${declarationId.prefix}${name}${declarationId.suffix}` - ); - } - - if (concatenationScope) { - concatenationScope.registerExport("default", name); - } else { - const used = moduleGraph - .getExportsInfo(module) - .getUsedName("default", runtime); - if (used) { - const map = new Map(); - map.set(used, `/* export default binding */ ${name}`); - initFragments.push(new HarmonyExportInitFragment(exportsName, map)); - } - } - - source.replace( - dep.rangeStatement[0], - dep.range[0] - 1, - `/* harmony default export */ ${dep.prefix}` - ); - } else { - let content; - const name = ConcatenationScope.DEFAULT_EXPORT; - if (runtimeTemplate.supportsConst()) { - content = `/* harmony default export */ const ${name} = `; - if (concatenationScope) { - concatenationScope.registerExport("default", name); - } else { - const used = moduleGraph - .getExportsInfo(module) - .getUsedName("default", runtime); - if (used) { - runtimeRequirements.add(RuntimeGlobals.exports); - const map = new Map(); - map.set(used, name); - initFragments.push(new HarmonyExportInitFragment(exportsName, map)); - } else { - content = `/* unused harmony default export */ var ${name} = `; - } - } - } else if (concatenationScope) { - content = `/* harmony default export */ var ${name} = `; - concatenationScope.registerExport("default", name); - } else { - const used = moduleGraph - .getExportsInfo(module) - .getUsedName("default", runtime); - if (used) { - runtimeRequirements.add(RuntimeGlobals.exports); - // This is a little bit incorrect as TDZ is not correct, but we can't use const. - content = `/* harmony default export */ ${exportsName}[${JSON.stringify( - used - )}] = `; - } else { - content = `/* unused harmony default export */ var ${name} = `; - } - } - - if (dep.range) { - source.replace( - dep.rangeStatement[0], - dep.range[0] - 1, - content + "(" + dep.prefix - ); - source.replace(dep.range[1], dep.rangeStatement[1] - 0.5, ");"); - return; - } - - source.replace(dep.rangeStatement[0], dep.rangeStatement[1] - 1, content); - } - } -}; - -module.exports = HarmonyExportExpressionDependency; - - -/***/ }), - -/***/ 31623: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class HarmonyExportHeaderDependency extends NullDependency { - constructor(range, rangeStatement) { - super(); - this.range = range; - this.rangeStatement = rangeStatement; - } - - get type() { - return "harmony export header"; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.rangeStatement); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.rangeStatement = read(); - super.deserialize(context); - } -} - -makeSerializable( - HarmonyExportHeaderDependency, - "webpack/lib/dependencies/HarmonyExportHeaderDependency" -); - -HarmonyExportHeaderDependency.Template = class HarmonyExportDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {HarmonyExportHeaderDependency} */ (dependency); - const content = ""; - const replaceUntil = dep.range - ? dep.range[0] - 1 - : dep.rangeStatement[1] - 1; - source.replace(dep.rangeStatement[0], replaceUntil, content); - } -}; - -module.exports = HarmonyExportHeaderDependency; - - -/***/ }), - -/***/ 96577: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const { UsageState } = __webpack_require__(13168); -const HarmonyLinkingError = __webpack_require__(14330); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const { countIterable } = __webpack_require__(30922); -const { first, combine } = __webpack_require__(73268); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const { getRuntimeKey, keyToRuntime } = __webpack_require__(47462); -const HarmonyExportInitFragment = __webpack_require__(64139); -const HarmonyImportDependency = __webpack_require__(58668); -const processExportInfo = __webpack_require__(14666); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ExportsInfo")} ExportsInfo */ -/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** @typedef {"missing"|"unused"|"empty-star"|"reexport-dynamic-default"|"reexport-named-default"|"reexport-namespace-object"|"reexport-fake-namespace-object"|"reexport-undefined"|"normal-reexport"|"dynamic-reexport"} ExportModeType */ - -const { ExportPresenceModes } = HarmonyImportDependency; - -const idsSymbol = Symbol("HarmonyExportImportedSpecifierDependency.ids"); - -class NormalReexportItem { - /** - * @param {string} name export name - * @param {string[]} ids reexported ids from other module - * @param {ExportInfo} exportInfo export info from other module - * @param {boolean} checked true, if it should be checked at runtime if this export exists - * @param {boolean} hidden true, if it is hidden behind another active export in the same module - */ - constructor(name, ids, exportInfo, checked, hidden) { - this.name = name; - this.ids = ids; - this.exportInfo = exportInfo; - this.checked = checked; - this.hidden = hidden; - } -} - -class ExportMode { - /** - * @param {ExportModeType} type type of the mode - */ - constructor(type) { - /** @type {ExportModeType} */ - this.type = type; - - // for "normal-reexport": - /** @type {NormalReexportItem[] | null} */ - this.items = null; - - // for "reexport-named-default" | "reexport-fake-namespace-object" | "reexport-namespace-object" - /** @type {string|null} */ - this.name = null; - /** @type {ExportInfo | null} */ - this.partialNamespaceExportInfo = null; - - // for "dynamic-reexport": - /** @type {Set | null} */ - this.ignored = null; - - // for "dynamic-reexport" | "empty-star": - /** @type {Set | null} */ - this.hidden = null; - - // for "missing": - /** @type {string | null} */ - this.userRequest = null; - - // for "reexport-fake-namespace-object": - /** @type {number} */ - this.fakeType = 0; - } -} - -const determineExportAssignments = ( - moduleGraph, - dependencies, - additionalDependency -) => { - const names = new Set(); - const dependencyIndices = []; - - if (additionalDependency) { - dependencies = dependencies.concat(additionalDependency); - } - - for (const dep of dependencies) { - const i = dependencyIndices.length; - dependencyIndices[i] = names.size; - const otherImportedModule = moduleGraph.getModule(dep); - if (otherImportedModule) { - const exportsInfo = moduleGraph.getExportsInfo(otherImportedModule); - for (const exportInfo of exportsInfo.exports) { - if ( - exportInfo.provided === true && - exportInfo.name !== "default" && - !names.has(exportInfo.name) - ) { - names.add(exportInfo.name); - dependencyIndices[i] = names.size; - } - } - } - } - dependencyIndices.push(names.size); - - return { names: Array.from(names), dependencyIndices }; -}; - -const findDependencyForName = ( - { names, dependencyIndices }, - name, - dependencies -) => { - const dependenciesIt = dependencies[Symbol.iterator](); - const dependencyIndicesIt = dependencyIndices[Symbol.iterator](); - let dependenciesItResult = dependenciesIt.next(); - let dependencyIndicesItResult = dependencyIndicesIt.next(); - if (dependencyIndicesItResult.done) return; - for (let i = 0; i < names.length; i++) { - while (i >= dependencyIndicesItResult.value) { - dependenciesItResult = dependenciesIt.next(); - dependencyIndicesItResult = dependencyIndicesIt.next(); - if (dependencyIndicesItResult.done) return; - } - if (names[i] === name) return dependenciesItResult.value; - } - return undefined; -}; - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {HarmonyExportImportedSpecifierDependency} dep the dependency - * @param {string} runtimeKey the runtime key - * @returns {ExportMode} the export mode - */ -const getMode = (moduleGraph, dep, runtimeKey) => { - const importedModule = moduleGraph.getModule(dep); - - if (!importedModule) { - const mode = new ExportMode("missing"); - - mode.userRequest = dep.userRequest; - - return mode; - } - - const name = dep.name; - const runtime = keyToRuntime(runtimeKey); - const parentModule = moduleGraph.getParentModule(dep); - const exportsInfo = moduleGraph.getExportsInfo(parentModule); - - if ( - name - ? exportsInfo.getUsed(name, runtime) === UsageState.Unused - : exportsInfo.isUsed(runtime) === false - ) { - const mode = new ExportMode("unused"); - - mode.name = name || "*"; - - return mode; - } - - const importedExportsType = importedModule.getExportsType( - moduleGraph, - parentModule.buildMeta.strictHarmonyModule - ); - - const ids = dep.getIds(moduleGraph); - - // Special handling for reexporting the default export - // from non-namespace modules - if (name && ids.length > 0 && ids[0] === "default") { - switch (importedExportsType) { - case "dynamic": { - const mode = new ExportMode("reexport-dynamic-default"); - - mode.name = name; - - return mode; - } - case "default-only": - case "default-with-named": { - const exportInfo = exportsInfo.getReadOnlyExportInfo(name); - const mode = new ExportMode("reexport-named-default"); - - mode.name = name; - mode.partialNamespaceExportInfo = exportInfo; - - return mode; - } - } - } - - // reexporting with a fixed name - if (name) { - let mode; - const exportInfo = exportsInfo.getReadOnlyExportInfo(name); - - if (ids.length > 0) { - // export { name as name } - switch (importedExportsType) { - case "default-only": - mode = new ExportMode("reexport-undefined"); - mode.name = name; - break; - default: - mode = new ExportMode("normal-reexport"); - mode.items = [ - new NormalReexportItem(name, ids, exportInfo, false, false) - ]; - break; - } - } else { - // export * as name - switch (importedExportsType) { - case "default-only": - mode = new ExportMode("reexport-fake-namespace-object"); - mode.name = name; - mode.partialNamespaceExportInfo = exportInfo; - mode.fakeType = 0; - break; - case "default-with-named": - mode = new ExportMode("reexport-fake-namespace-object"); - mode.name = name; - mode.partialNamespaceExportInfo = exportInfo; - mode.fakeType = 2; - break; - case "dynamic": - default: - mode = new ExportMode("reexport-namespace-object"); - mode.name = name; - mode.partialNamespaceExportInfo = exportInfo; - } - } - - return mode; - } - - // Star reexporting - - const { ignoredExports, exports, checked, hidden } = dep.getStarReexports( - moduleGraph, - runtime, - exportsInfo, - importedModule - ); - if (!exports) { - // We have too few info about the modules - // Delegate the logic to the runtime code - - const mode = new ExportMode("dynamic-reexport"); - mode.ignored = ignoredExports; - mode.hidden = hidden; - - return mode; - } - - if (exports.size === 0) { - const mode = new ExportMode("empty-star"); - mode.hidden = hidden; - - return mode; - } - - const mode = new ExportMode("normal-reexport"); - - mode.items = Array.from( - exports, - exportName => - new NormalReexportItem( - exportName, - [exportName], - exportsInfo.getReadOnlyExportInfo(exportName), - checked.has(exportName), - false - ) - ); - if (hidden !== undefined) { - for (const exportName of hidden) { - mode.items.push( - new NormalReexportItem( - exportName, - [exportName], - exportsInfo.getReadOnlyExportInfo(exportName), - false, - true - ) - ); - } - } - - return mode; -}; - -class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { - /** - * @param {string} request the request string - * @param {number} sourceOrder the order in the original source file - * @param {string[]} ids the requested export name of the imported module - * @param {string | null} name the export name of for this module - * @param {Set} activeExports other named exports in the module - * @param {ReadonlyArray | Iterable} otherStarExports other star exports in the module before this import - * @param {number} exportPresenceMode mode of checking export names - * @param {HarmonyStarExportsList} allStarExports all star exports in the module - * @param {Record=} assertions import assertions - */ - constructor( - request, - sourceOrder, - ids, - name, - activeExports, - otherStarExports, - exportPresenceMode, - allStarExports, - assertions - ) { - super(request, sourceOrder, assertions); - - this.ids = ids; - this.name = name; - this.activeExports = activeExports; - this.otherStarExports = otherStarExports; - this.exportPresenceMode = exportPresenceMode; - this.allStarExports = allStarExports; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return Dependency.TRANSITIVE; - } - - // TODO webpack 6 remove - get id() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - // TODO webpack 6 remove - getId() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - // TODO webpack 6 remove - setId() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - get type() { - return "harmony export imported specifier"; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string[]} the imported id - */ - getIds(moduleGraph) { - return moduleGraph.getMeta(this)[idsSymbol] || this.ids; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {string[]} ids the imported ids - * @returns {void} - */ - setIds(moduleGraph, ids) { - moduleGraph.getMeta(this)[idsSymbol] = ids; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @returns {ExportMode} the export mode - */ - getMode(moduleGraph, runtime) { - return moduleGraph.dependencyCacheProvide( - this, - getRuntimeKey(runtime), - getMode - ); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @param {ExportsInfo} exportsInfo exports info about the current module (optional) - * @param {Module} importedModule the imported module (optional) - * @returns {{exports?: Set, checked?: Set, ignoredExports: Set, hidden?: Set}} information - */ - getStarReexports( - moduleGraph, - runtime, - exportsInfo = moduleGraph.getExportsInfo(moduleGraph.getParentModule(this)), - importedModule = moduleGraph.getModule(this) - ) { - const importedExportsInfo = moduleGraph.getExportsInfo(importedModule); - - const noExtraExports = - importedExportsInfo.otherExportsInfo.provided === false; - const noExtraImports = - exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused; - - const ignoredExports = new Set(["default", ...this.activeExports]); - - let hiddenExports = undefined; - const otherStarExports = - this._discoverActiveExportsFromOtherStarExports(moduleGraph); - if (otherStarExports !== undefined) { - hiddenExports = new Set(); - for (let i = 0; i < otherStarExports.namesSlice; i++) { - hiddenExports.add(otherStarExports.names[i]); - } - for (const e of ignoredExports) hiddenExports.delete(e); - } - - if (!noExtraExports && !noExtraImports) { - return { - ignoredExports, - hidden: hiddenExports - }; - } - - /** @type {Set} */ - const exports = new Set(); - /** @type {Set} */ - const checked = new Set(); - /** @type {Set} */ - const hidden = hiddenExports !== undefined ? new Set() : undefined; - - if (noExtraImports) { - for (const exportInfo of exportsInfo.orderedExports) { - const name = exportInfo.name; - if (ignoredExports.has(name)) continue; - if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; - const importedExportInfo = - importedExportsInfo.getReadOnlyExportInfo(name); - if (importedExportInfo.provided === false) continue; - if (hiddenExports !== undefined && hiddenExports.has(name)) { - hidden.add(name); - continue; - } - exports.add(name); - if (importedExportInfo.provided === true) continue; - checked.add(name); - } - } else if (noExtraExports) { - for (const importedExportInfo of importedExportsInfo.orderedExports) { - const name = importedExportInfo.name; - if (ignoredExports.has(name)) continue; - if (importedExportInfo.provided === false) continue; - const exportInfo = exportsInfo.getReadOnlyExportInfo(name); - if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; - if (hiddenExports !== undefined && hiddenExports.has(name)) { - hidden.add(name); - continue; - } - exports.add(name); - if (importedExportInfo.provided === true) continue; - checked.add(name); - } - } - - return { ignoredExports, exports, checked, hidden }; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return (connection, runtime) => { - const mode = this.getMode(moduleGraph, runtime); - return mode.type !== "unused" && mode.type !== "empty-star"; - }; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return false; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - const mode = this.getMode(moduleGraph, runtime); - - switch (mode.type) { - case "missing": - case "unused": - case "empty-star": - case "reexport-undefined": - return Dependency.NO_EXPORTS_REFERENCED; - - case "reexport-dynamic-default": - return Dependency.EXPORTS_OBJECT_REFERENCED; - - case "reexport-named-default": { - if (!mode.partialNamespaceExportInfo) - return Dependency.EXPORTS_OBJECT_REFERENCED; - /** @type {string[][]} */ - const referencedExports = []; - processExportInfo( - runtime, - referencedExports, - [], - /** @type {ExportInfo} */ (mode.partialNamespaceExportInfo) - ); - return referencedExports; - } - - case "reexport-namespace-object": - case "reexport-fake-namespace-object": { - if (!mode.partialNamespaceExportInfo) - return Dependency.EXPORTS_OBJECT_REFERENCED; - /** @type {string[][]} */ - const referencedExports = []; - processExportInfo( - runtime, - referencedExports, - [], - /** @type {ExportInfo} */ (mode.partialNamespaceExportInfo), - mode.type === "reexport-fake-namespace-object" - ); - return referencedExports; - } - - case "dynamic-reexport": - return Dependency.EXPORTS_OBJECT_REFERENCED; - - case "normal-reexport": { - const referencedExports = []; - for (const { ids, exportInfo, hidden } of mode.items) { - if (hidden) continue; - processExportInfo(runtime, referencedExports, ids, exportInfo, false); - } - return referencedExports; - } - - default: - throw new Error(`Unknown mode ${mode.type}`); - } - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {{ names: string[], namesSlice: number, dependencyIndices: number[], dependencyIndex: number } | undefined} exported names and their origin dependency - */ - _discoverActiveExportsFromOtherStarExports(moduleGraph) { - if (!this.otherStarExports) return undefined; - - const i = - "length" in this.otherStarExports - ? this.otherStarExports.length - : countIterable(this.otherStarExports); - if (i === 0) return undefined; - - if (this.allStarExports) { - const { names, dependencyIndices } = moduleGraph.cached( - determineExportAssignments, - this.allStarExports.dependencies - ); - - return { - names, - namesSlice: dependencyIndices[i - 1], - dependencyIndices, - dependencyIndex: i - }; - } - - const { names, dependencyIndices } = moduleGraph.cached( - determineExportAssignments, - this.otherStarExports, - this - ); - - return { - names, - namesSlice: dependencyIndices[i - 1], - dependencyIndices, - dependencyIndex: i - }; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - const mode = this.getMode(moduleGraph, undefined); - - switch (mode.type) { - case "missing": - return undefined; - case "dynamic-reexport": { - const from = moduleGraph.getConnection(this); - return { - exports: true, - from, - canMangle: false, - excludeExports: mode.hidden - ? combine(mode.ignored, mode.hidden) - : mode.ignored, - hideExports: mode.hidden, - dependencies: [from.module] - }; - } - case "empty-star": - return { - exports: [], - hideExports: mode.hidden, - dependencies: [moduleGraph.getModule(this)] - }; - // falls through - case "normal-reexport": { - const from = moduleGraph.getConnection(this); - return { - exports: Array.from(mode.items, item => ({ - name: item.name, - from, - export: item.ids, - hidden: item.hidden - })), - priority: 1, - dependencies: [from.module] - }; - } - case "reexport-dynamic-default": { - { - const from = moduleGraph.getConnection(this); - return { - exports: [ - { - name: mode.name, - from, - export: ["default"] - } - ], - priority: 1, - dependencies: [from.module] - }; - } - } - case "reexport-undefined": - return { - exports: [mode.name], - dependencies: [moduleGraph.getModule(this)] - }; - case "reexport-fake-namespace-object": { - const from = moduleGraph.getConnection(this); - return { - exports: [ - { - name: mode.name, - from, - export: null, - exports: [ - { - name: "default", - canMangle: false, - from, - export: null - } - ] - } - ], - priority: 1, - dependencies: [from.module] - }; - } - case "reexport-namespace-object": { - const from = moduleGraph.getConnection(this); - return { - exports: [ - { - name: mode.name, - from, - export: null - } - ], - priority: 1, - dependencies: [from.module] - }; - } - case "reexport-named-default": { - const from = moduleGraph.getConnection(this); - return { - exports: [ - { - name: mode.name, - from, - export: ["default"] - } - ], - priority: 1, - dependencies: [from.module] - }; - } - default: - throw new Error(`Unknown mode ${mode.type}`); - } - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {number} effective mode - */ - _getEffectiveExportPresenceLevel(moduleGraph) { - if (this.exportPresenceMode !== ExportPresenceModes.AUTO) - return this.exportPresenceMode; - return moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule - ? ExportPresenceModes.ERROR - : ExportPresenceModes.WARN; - } - - /** - * Returns warnings - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} warnings - */ - getWarnings(moduleGraph) { - const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph); - if (exportsPresence === ExportPresenceModes.WARN) { - return this._getErrors(moduleGraph); - } - return null; - } - - /** - * Returns errors - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} errors - */ - getErrors(moduleGraph) { - const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph); - if (exportsPresence === ExportPresenceModes.ERROR) { - return this._getErrors(moduleGraph); - } - return null; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[] | undefined} errors - */ - _getErrors(moduleGraph) { - const ids = this.getIds(moduleGraph); - let errors = this.getLinkingErrors( - moduleGraph, - ids, - `(reexported as '${this.name}')` - ); - if (ids.length === 0 && this.name === null) { - const potentialConflicts = - this._discoverActiveExportsFromOtherStarExports(moduleGraph); - if (potentialConflicts && potentialConflicts.namesSlice > 0) { - const ownNames = new Set( - potentialConflicts.names.slice( - potentialConflicts.namesSlice, - potentialConflicts.dependencyIndices[ - potentialConflicts.dependencyIndex - ] - ) - ); - const importedModule = moduleGraph.getModule(this); - if (importedModule) { - const exportsInfo = moduleGraph.getExportsInfo(importedModule); - const conflicts = new Map(); - for (const exportInfo of exportsInfo.orderedExports) { - if (exportInfo.provided !== true) continue; - if (exportInfo.name === "default") continue; - if (this.activeExports.has(exportInfo.name)) continue; - if (ownNames.has(exportInfo.name)) continue; - const conflictingDependency = findDependencyForName( - potentialConflicts, - exportInfo.name, - this.allStarExports - ? this.allStarExports.dependencies - : [...this.otherStarExports, this] - ); - if (!conflictingDependency) continue; - const target = exportInfo.getTerminalBinding(moduleGraph); - if (!target) continue; - const conflictingModule = moduleGraph.getModule( - conflictingDependency - ); - if (conflictingModule === importedModule) continue; - const conflictingExportInfo = moduleGraph.getExportInfo( - conflictingModule, - exportInfo.name - ); - const conflictingTarget = - conflictingExportInfo.getTerminalBinding(moduleGraph); - if (!conflictingTarget) continue; - if (target === conflictingTarget) continue; - const list = conflicts.get(conflictingDependency.request); - if (list === undefined) { - conflicts.set(conflictingDependency.request, [exportInfo.name]); - } else { - list.push(exportInfo.name); - } - } - for (const [request, exports] of conflicts) { - if (!errors) errors = []; - errors.push( - new HarmonyLinkingError( - `The requested module '${ - this.request - }' contains conflicting star exports for the ${ - exports.length > 1 ? "names" : "name" - } ${exports - .map(e => `'${e}'`) - .join(", ")} with the previous requested module '${request}'` - ) - ); - } - } - } - } - return errors; - } - - serialize(context) { - const { write, setCircularReference } = context; - - setCircularReference(this); - write(this.ids); - write(this.name); - write(this.activeExports); - write(this.otherStarExports); - write(this.exportPresenceMode); - write(this.allStarExports); - - super.serialize(context); - } - - deserialize(context) { - const { read, setCircularReference } = context; - - setCircularReference(this); - this.ids = read(); - this.name = read(); - this.activeExports = read(); - this.otherStarExports = read(); - this.exportPresenceMode = read(); - this.allStarExports = read(); - - super.deserialize(context); - } -} - -makeSerializable( - HarmonyExportImportedSpecifierDependency, - "webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency" -); - -module.exports = HarmonyExportImportedSpecifierDependency; - -HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedSpecifierDependencyTemplate extends ( - HarmonyImportDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const { moduleGraph, runtime, concatenationScope } = templateContext; - - const dep = /** @type {HarmonyExportImportedSpecifierDependency} */ ( - dependency - ); - - const mode = dep.getMode(moduleGraph, runtime); - - if (concatenationScope) { - switch (mode.type) { - case "reexport-undefined": - concatenationScope.registerRawExport( - mode.name, - "/* reexport non-default export from non-harmony */ undefined" - ); - } - return; - } - - if (mode.type !== "unused" && mode.type !== "empty-star") { - super.apply(dependency, source, templateContext); - - this._addExportFragments( - templateContext.initFragments, - dep, - mode, - templateContext.module, - moduleGraph, - runtime, - templateContext.runtimeTemplate, - templateContext.runtimeRequirements - ); - } - } - - /** - * @param {InitFragment[]} initFragments target array for init fragments - * @param {HarmonyExportImportedSpecifierDependency} dep dependency - * @param {ExportMode} mode the export mode - * @param {Module} module the current module - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {Set} runtimeRequirements runtime requirements - * @returns {void} - */ - _addExportFragments( - initFragments, - dep, - mode, - module, - moduleGraph, - runtime, - runtimeTemplate, - runtimeRequirements - ) { - const importedModule = moduleGraph.getModule(dep); - const importVar = dep.getImportVar(moduleGraph); - - switch (mode.type) { - case "missing": - case "empty-star": - initFragments.push( - new InitFragment( - "/* empty/unused harmony star reexport */\n", - InitFragment.STAGE_HARMONY_EXPORTS, - 1 - ) - ); - break; - - case "unused": - initFragments.push( - new InitFragment( - `${Template.toNormalComment( - `unused harmony reexport ${mode.name}` - )}\n`, - InitFragment.STAGE_HARMONY_EXPORTS, - 1 - ) - ); - break; - - case "reexport-dynamic-default": - initFragments.push( - this.getReexportFragment( - module, - "reexport default from dynamic", - moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), - importVar, - null, - runtimeRequirements - ) - ); - break; - - case "reexport-fake-namespace-object": - initFragments.push( - ...this.getReexportFakeNamespaceObjectFragments( - module, - moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), - importVar, - mode.fakeType, - runtimeRequirements - ) - ); - break; - - case "reexport-undefined": - initFragments.push( - this.getReexportFragment( - module, - "reexport non-default export from non-harmony", - moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), - "undefined", - "", - runtimeRequirements - ) - ); - break; - - case "reexport-named-default": - initFragments.push( - this.getReexportFragment( - module, - "reexport default export from named module", - moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), - importVar, - "", - runtimeRequirements - ) - ); - break; - - case "reexport-namespace-object": - initFragments.push( - this.getReexportFragment( - module, - "reexport module object", - moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), - importVar, - "", - runtimeRequirements - ) - ); - break; - - case "normal-reexport": - for (const { name, ids, checked, hidden } of mode.items) { - if (hidden) continue; - if (checked) { - initFragments.push( - new InitFragment( - "/* harmony reexport (checked) */ " + - this.getConditionalReexportStatement( - module, - name, - importVar, - ids, - runtimeRequirements - ), - moduleGraph.isAsync(importedModule) - ? InitFragment.STAGE_ASYNC_HARMONY_IMPORTS - : InitFragment.STAGE_HARMONY_IMPORTS, - dep.sourceOrder - ) - ); - } else { - initFragments.push( - this.getReexportFragment( - module, - "reexport safe", - moduleGraph.getExportsInfo(module).getUsedName(name, runtime), - importVar, - moduleGraph - .getExportsInfo(importedModule) - .getUsedName(ids, runtime), - runtimeRequirements - ) - ); - } - } - break; - - case "dynamic-reexport": { - const ignored = mode.hidden - ? combine(mode.ignored, mode.hidden) - : mode.ignored; - const modern = - runtimeTemplate.supportsConst() && - runtimeTemplate.supportsArrowFunction(); - let content = - "/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n" + - `/* harmony reexport (unknown) */ for(${ - modern ? "const" : "var" - } __WEBPACK_IMPORT_KEY__ in ${importVar}) `; - - // Filter out exports which are defined by other exports - // and filter out default export because it cannot be reexported with * - if (ignored.size > 1) { - content += - "if(" + - JSON.stringify(Array.from(ignored)) + - ".indexOf(__WEBPACK_IMPORT_KEY__) < 0) "; - } else if (ignored.size === 1) { - content += `if(__WEBPACK_IMPORT_KEY__ !== ${JSON.stringify( - first(ignored) - )}) `; - } - - content += `__WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = `; - if (modern) { - content += `() => ${importVar}[__WEBPACK_IMPORT_KEY__]`; - } else { - content += `function(key) { return ${importVar}[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)`; - } - - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - - const exportsName = module.exportsArgument; - initFragments.push( - new InitFragment( - `${content}\n/* harmony reexport (unknown) */ ${RuntimeGlobals.definePropertyGetters}(${exportsName}, __WEBPACK_REEXPORT_OBJECT__);\n`, - moduleGraph.isAsync(importedModule) - ? InitFragment.STAGE_ASYNC_HARMONY_IMPORTS - : InitFragment.STAGE_HARMONY_IMPORTS, - dep.sourceOrder - ) - ); - break; - } - - default: - throw new Error(`Unknown mode ${mode.type}`); - } - } - - getReexportFragment( - module, - comment, - key, - name, - valueKey, - runtimeRequirements - ) { - const returnValue = this.getReturnValue(name, valueKey); - - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - - const map = new Map(); - map.set(key, `/* ${comment} */ ${returnValue}`); - - return new HarmonyExportInitFragment(module.exportsArgument, map); - } - - getReexportFakeNamespaceObjectFragments( - module, - key, - name, - fakeType, - runtimeRequirements - ) { - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - - const map = new Map(); - map.set( - key, - `/* reexport fake namespace object from non-harmony */ ${name}_namespace_cache || (${name}_namespace_cache = ${ - RuntimeGlobals.createFakeNamespaceObject - }(${name}${fakeType ? `, ${fakeType}` : ""}))` - ); - - return [ - new InitFragment( - `var ${name}_namespace_cache;\n`, - InitFragment.STAGE_CONSTANTS, - -1, - `${name}_namespace_cache` - ), - new HarmonyExportInitFragment(module.exportsArgument, map) - ]; - } - - getConditionalReexportStatement( - module, - key, - name, - valueKey, - runtimeRequirements - ) { - if (valueKey === false) { - return "/* unused export */\n"; - } - - const exportsName = module.exportsArgument; - const returnValue = this.getReturnValue(name, valueKey); - - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - runtimeRequirements.add(RuntimeGlobals.hasOwnProperty); - - return `if(${RuntimeGlobals.hasOwnProperty}(${name}, ${JSON.stringify( - valueKey[0] - )})) ${ - RuntimeGlobals.definePropertyGetters - }(${exportsName}, { ${JSON.stringify( - key - )}: function() { return ${returnValue}; } });\n`; - } - - getReturnValue(name, valueKey) { - if (valueKey === null) { - return `${name}_default.a`; - } - - if (valueKey === "") { - return name; - } - - if (valueKey === false) { - return "/* unused export */ undefined"; - } - - return `${name}${propertyAccess(valueKey)}`; - } -}; - -class HarmonyStarExportsList { - constructor() { - /** @type {HarmonyExportImportedSpecifierDependency[]} */ - this.dependencies = []; - } - - /** - * @param {HarmonyExportImportedSpecifierDependency} dep dependency - * @returns {void} - */ - push(dep) { - this.dependencies.push(dep); - } - - slice() { - return this.dependencies.slice(); - } - - serialize({ write, setCircularReference }) { - setCircularReference(this); - write(this.dependencies); - } - - deserialize({ read, setCircularReference }) { - setCircularReference(this); - this.dependencies = read(); - } -} - -makeSerializable( - HarmonyStarExportsList, - "webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency", - "HarmonyStarExportsList" -); - -module.exports.HarmonyStarExportsList = HarmonyStarExportsList; - - -/***/ }), - -/***/ 64139: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const { first } = __webpack_require__(73268); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ - -const joinIterableWithComma = iterable => { - // This is more performant than Array.from().join(", ") - // as it doesn't create an array - let str = ""; - let first = true; - for (const item of iterable) { - if (first) { - first = false; - } else { - str += ", "; - } - str += item; - } - return str; -}; - -const EMPTY_MAP = new Map(); -const EMPTY_SET = new Set(); - -/** - * @typedef {GenerateContext} Context - */ -class HarmonyExportInitFragment extends InitFragment { - /** - * @param {string} exportsArgument the exports identifier - * @param {Map} exportMap mapping from used name to exposed variable name - * @param {Set} unusedExports list of unused export names - */ - constructor( - exportsArgument, - exportMap = EMPTY_MAP, - unusedExports = EMPTY_SET - ) { - super(undefined, InitFragment.STAGE_HARMONY_EXPORTS, 1, "harmony-exports"); - this.exportsArgument = exportsArgument; - this.exportMap = exportMap; - this.unusedExports = unusedExports; - } - - /** - * @param {HarmonyExportInitFragment[]} fragments all fragments to merge - * @returns {HarmonyExportInitFragment} merged fragment - */ - mergeAll(fragments) { - let exportMap; - let exportMapOwned = false; - let unusedExports; - let unusedExportsOwned = false; - - for (const fragment of fragments) { - if (fragment.exportMap.size !== 0) { - if (exportMap === undefined) { - exportMap = fragment.exportMap; - exportMapOwned = false; - } else { - if (!exportMapOwned) { - exportMap = new Map(exportMap); - exportMapOwned = true; - } - for (const [key, value] of fragment.exportMap) { - if (!exportMap.has(key)) exportMap.set(key, value); - } - } - } - if (fragment.unusedExports.size !== 0) { - if (unusedExports === undefined) { - unusedExports = fragment.unusedExports; - unusedExportsOwned = false; - } else { - if (!unusedExportsOwned) { - unusedExports = new Set(unusedExports); - unusedExportsOwned = true; - } - for (const value of fragment.unusedExports) { - unusedExports.add(value); - } - } - } - } - return new HarmonyExportInitFragment( - this.exportsArgument, - exportMap, - unusedExports - ); - } - - merge(other) { - let exportMap; - if (this.exportMap.size === 0) { - exportMap = other.exportMap; - } else if (other.exportMap.size === 0) { - exportMap = this.exportMap; - } else { - exportMap = new Map(other.exportMap); - for (const [key, value] of this.exportMap) { - if (!exportMap.has(key)) exportMap.set(key, value); - } - } - let unusedExports; - if (this.unusedExports.size === 0) { - unusedExports = other.unusedExports; - } else if (other.unusedExports.size === 0) { - unusedExports = this.unusedExports; - } else { - unusedExports = new Set(other.unusedExports); - for (const value of this.unusedExports) { - unusedExports.add(value); - } - } - return new HarmonyExportInitFragment( - this.exportsArgument, - exportMap, - unusedExports - ); - } - - /** - * @param {Context} context context - * @returns {string|Source} the source code that will be included as initialization code - */ - getContent({ runtimeTemplate, runtimeRequirements }) { - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - - const unusedPart = - this.unusedExports.size > 1 - ? `/* unused harmony exports ${joinIterableWithComma( - this.unusedExports - )} */\n` - : this.unusedExports.size > 0 - ? `/* unused harmony export ${first(this.unusedExports)} */\n` - : ""; - const definitions = []; - const orderedExportMap = Array.from(this.exportMap).sort(([a], [b]) => - a < b ? -1 : 1 - ); - for (const [key, value] of orderedExportMap) { - definitions.push( - `\n/* harmony export */ ${JSON.stringify( - key - )}: ${runtimeTemplate.returningFunction(value)}` - ); - } - const definePart = - this.exportMap.size > 0 - ? `/* harmony export */ ${RuntimeGlobals.definePropertyGetters}(${ - this.exportsArgument - }, {${definitions.join(",")}\n/* harmony export */ });\n` - : ""; - return `${definePart}${unusedPart}`; - } -} - -module.exports = HarmonyExportInitFragment; - - -/***/ }), - -/***/ 22437: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const HarmonyExportInitFragment = __webpack_require__(64139); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ - -class HarmonyExportSpecifierDependency extends NullDependency { - constructor(id, name) { - super(); - this.id = id; - this.name = name; - } - - get type() { - return "harmony export specifier"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - return { - exports: [this.name], - priority: 1, - terminalBinding: true, - dependencies: undefined - }; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return false; - } - - serialize(context) { - const { write } = context; - write(this.id); - write(this.name); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.id = read(); - this.name = read(); - super.deserialize(context); - } -} - -makeSerializable( - HarmonyExportSpecifierDependency, - "webpack/lib/dependencies/HarmonyExportSpecifierDependency" -); - -HarmonyExportSpecifierDependency.Template = class HarmonyExportSpecifierDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { module, moduleGraph, initFragments, runtime, concatenationScope } - ) { - const dep = /** @type {HarmonyExportSpecifierDependency} */ (dependency); - if (concatenationScope) { - concatenationScope.registerExport(dep.name, dep.id); - return; - } - const used = moduleGraph - .getExportsInfo(module) - .getUsedName(dep.name, runtime); - if (!used) { - const set = new Set(); - set.add(dep.name || "namespace"); - initFragments.push( - new HarmonyExportInitFragment(module.exportsArgument, undefined, set) - ); - return; - } - - const map = new Map(); - map.set(used, `/* binding */ ${dep.id}`); - initFragments.push( - new HarmonyExportInitFragment(module.exportsArgument, map, undefined) - ); - } -}; - -module.exports = HarmonyExportSpecifierDependency; - - -/***/ }), - -/***/ 40699: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Parser").ParserState} ParserState */ - -/** @type {WeakMap} */ -const parserStateExportsState = new WeakMap(); - -/** - * @param {ParserState} parserState parser state - * @param {boolean} isStrictHarmony strict harmony mode should be enabled - * @returns {void} - */ -exports.enable = (parserState, isStrictHarmony) => { - const value = parserStateExportsState.get(parserState); - if (value === false) return; - parserStateExportsState.set(parserState, true); - if (value !== true) { - parserState.module.buildMeta.exportsType = "namespace"; - parserState.module.buildInfo.strict = true; - parserState.module.buildInfo.exportsArgument = "__webpack_exports__"; - if (isStrictHarmony) { - parserState.module.buildMeta.strictHarmonyModule = true; - parserState.module.buildInfo.moduleArgument = "__webpack_module__"; - } - } -}; - -/** - * @param {ParserState} parserState parser state - * @returns {boolean} true, when enabled - */ -exports.isEnabled = parserState => { - const value = parserStateExportsState.get(parserState); - return value === true; -}; - - -/***/ }), - -/***/ 58668: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ConditionalInitFragment = __webpack_require__(47146); -const Dependency = __webpack_require__(87056); -const HarmonyLinkingError = __webpack_require__(14330); -const InitFragment = __webpack_require__(64768); -const Template = __webpack_require__(43841); -const AwaitDependenciesInitFragment = __webpack_require__(14989); -const { filterRuntime, mergeRuntime } = __webpack_require__(47462); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const ExportPresenceModes = { - NONE: /** @type {0} */ (0), - WARN: /** @type {1} */ (1), - AUTO: /** @type {2} */ (2), - ERROR: /** @type {3} */ (3), - fromUserOption(str) { - switch (str) { - case "error": - return ExportPresenceModes.ERROR; - case "warn": - return ExportPresenceModes.WARN; - case "auto": - return ExportPresenceModes.AUTO; - case false: - return ExportPresenceModes.NONE; - default: - throw new Error(`Invalid export presence value ${str}`); - } - } -}; - -class HarmonyImportDependency extends ModuleDependency { - /** - * - * @param {string} request request string - * @param {number} sourceOrder source order - * @param {Record=} assertions import assertions - */ - constructor(request, sourceOrder, assertions) { - super(request); - this.sourceOrder = sourceOrder; - this.assertions = assertions; - } - - get category() { - return "esm"; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return Dependency.NO_EXPORTS_REFERENCED; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string} name of the variable for the import - */ - getImportVar(moduleGraph) { - const module = moduleGraph.getParentModule(this); - const meta = moduleGraph.getMeta(module); - let importVarMap = meta.importVarMap; - if (!importVarMap) meta.importVarMap = importVarMap = new Map(); - let importVar = importVarMap.get(moduleGraph.getModule(this)); - if (importVar) return importVar; - importVar = `${Template.toIdentifier( - `${this.userRequest}` - )}__WEBPACK_IMPORTED_MODULE_${importVarMap.size}__`; - importVarMap.set(moduleGraph.getModule(this), importVar); - return importVar; - } - - /** - * @param {boolean} update create new variables or update existing one - * @param {DependencyTemplateContext} templateContext the template context - * @returns {[string, string]} the import statement and the compat statement - */ - getImportStatement( - update, - { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } - ) { - return runtimeTemplate.importStatement({ - update, - module: moduleGraph.getModule(this), - chunkGraph, - importVar: this.getImportVar(moduleGraph), - request: this.request, - originModule: module, - runtimeRequirements - }); - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @param {string[]} ids imported ids - * @param {string} additionalMessage extra info included in the error message - * @returns {WebpackError[] | undefined} errors - */ - getLinkingErrors(moduleGraph, ids, additionalMessage) { - const importedModule = moduleGraph.getModule(this); - // ignore errors for missing or failed modules - if (!importedModule || importedModule.getNumberOfErrors() > 0) { - return; - } - - const parentModule = moduleGraph.getParentModule(this); - const exportsType = importedModule.getExportsType( - moduleGraph, - parentModule.buildMeta.strictHarmonyModule - ); - if (exportsType === "namespace" || exportsType === "default-with-named") { - if (ids.length === 0) { - return; - } - - if ( - (exportsType !== "default-with-named" || ids[0] !== "default") && - moduleGraph.isExportProvided(importedModule, ids) === false - ) { - // We are sure that it's not provided - - // Try to provide detailed info in the error message - let pos = 0; - let exportsInfo = moduleGraph.getExportsInfo(importedModule); - while (pos < ids.length && exportsInfo) { - const id = ids[pos++]; - const exportInfo = exportsInfo.getReadOnlyExportInfo(id); - if (exportInfo.provided === false) { - // We are sure that it's not provided - const providedExports = exportsInfo.getProvidedExports(); - const moreInfo = !Array.isArray(providedExports) - ? " (possible exports unknown)" - : providedExports.length === 0 - ? " (module has no exports)" - : ` (possible exports: ${providedExports.join(", ")})`; - return [ - new HarmonyLinkingError( - `export ${ids - .slice(0, pos) - .map(id => `'${id}'`) - .join(".")} ${additionalMessage} was not found in '${ - this.userRequest - }'${moreInfo}` - ) - ]; - } - exportsInfo = exportInfo.getNestedExportsInfo(); - } - - // General error message - return [ - new HarmonyLinkingError( - `export ${ids - .map(id => `'${id}'`) - .join(".")} ${additionalMessage} was not found in '${ - this.userRequest - }'` - ) - ]; - } - } - switch (exportsType) { - case "default-only": - // It's has only a default export - if (ids.length > 0 && ids[0] !== "default") { - // In strict harmony modules we only support the default export - return [ - new HarmonyLinkingError( - `Can't import the named export ${ids - .map(id => `'${id}'`) - .join( - "." - )} ${additionalMessage} from default-exporting module (only default export is available)` - ) - ]; - } - break; - case "default-with-named": - // It has a default export and named properties redirect - // In some cases we still want to warn here - if ( - ids.length > 0 && - ids[0] !== "default" && - importedModule.buildMeta.defaultObject === "redirect-warn" - ) { - // For these modules only the default export is supported - return [ - new HarmonyLinkingError( - `Should not import the named export ${ids - .map(id => `'${id}'`) - .join( - "." - )} ${additionalMessage} from default-exporting module (only default export is available soon)` - ) - ]; - } - break; - } - } - - serialize(context) { - const { write } = context; - write(this.sourceOrder); - write(this.assertions); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.sourceOrder = read(); - this.assertions = read(); - super.deserialize(context); - } -} - -module.exports = HarmonyImportDependency; - -/** @type {WeakMap>} */ -const importEmittedMap = new WeakMap(); - -HarmonyImportDependency.Template = class HarmonyImportDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {HarmonyImportDependency} */ (dependency); - const { module, chunkGraph, moduleGraph, runtime } = templateContext; - - const connection = moduleGraph.getConnection(dep); - if (connection && !connection.isTargetActive(runtime)) return; - - const referencedModule = connection && connection.module; - - if ( - connection && - connection.weak && - referencedModule && - chunkGraph.getModuleId(referencedModule) === null - ) { - // in weak references, module might not be in any chunk - // but that's ok, we don't need that logic in this case - return; - } - - const moduleKey = referencedModule - ? referencedModule.identifier() - : dep.request; - const key = `harmony import ${moduleKey}`; - - const runtimeCondition = dep.weak - ? false - : connection - ? filterRuntime(runtime, r => connection.isTargetActive(r)) - : true; - - if (module && referencedModule) { - let emittedModules = importEmittedMap.get(module); - if (emittedModules === undefined) { - emittedModules = new WeakMap(); - importEmittedMap.set(module, emittedModules); - } - let mergedRuntimeCondition = runtimeCondition; - const oldRuntimeCondition = emittedModules.get(referencedModule) || false; - if (oldRuntimeCondition !== false && mergedRuntimeCondition !== true) { - if (mergedRuntimeCondition === false || oldRuntimeCondition === true) { - mergedRuntimeCondition = oldRuntimeCondition; - } else { - mergedRuntimeCondition = mergeRuntime( - oldRuntimeCondition, - mergedRuntimeCondition - ); - } - } - emittedModules.set(referencedModule, mergedRuntimeCondition); - } - - const importStatement = dep.getImportStatement(false, templateContext); - if ( - referencedModule && - templateContext.moduleGraph.isAsync(referencedModule) - ) { - templateContext.initFragments.push( - new ConditionalInitFragment( - importStatement[0], - InitFragment.STAGE_HARMONY_IMPORTS, - dep.sourceOrder, - key, - runtimeCondition - ) - ); - templateContext.initFragments.push( - new AwaitDependenciesInitFragment( - new Set([dep.getImportVar(templateContext.moduleGraph)]) - ) - ); - templateContext.initFragments.push( - new ConditionalInitFragment( - importStatement[1], - InitFragment.STAGE_ASYNC_HARMONY_IMPORTS, - dep.sourceOrder, - key + " compat", - runtimeCondition - ) - ); - } else { - templateContext.initFragments.push( - new ConditionalInitFragment( - importStatement[0] + importStatement[1], - InitFragment.STAGE_HARMONY_IMPORTS, - dep.sourceOrder, - key, - runtimeCondition - ) - ); - } - } - - /** - * - * @param {Module} module the module - * @param {Module} referencedModule the referenced module - * @returns {RuntimeSpec | boolean} runtimeCondition in which this import has been emitted - */ - static getImportEmittedRuntime(module, referencedModule) { - const emittedModules = importEmittedMap.get(module); - if (emittedModules === undefined) return false; - return emittedModules.get(referencedModule) || false; - } -}; - -module.exports.ExportPresenceModes = ExportPresenceModes; - - -/***/ }), - -/***/ 59152: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const HotModuleReplacementPlugin = __webpack_require__(23456); -const InnerGraph = __webpack_require__(39236); -const ConstDependency = __webpack_require__(14367); -const HarmonyAcceptDependency = __webpack_require__(98702); -const HarmonyAcceptImportDependency = __webpack_require__(13345); -const HarmonyEvaluatedImportSpecifierDependency = __webpack_require__(87799); -const HarmonyExports = __webpack_require__(40699); -const { ExportPresenceModes } = __webpack_require__(58668); -const HarmonyImportSideEffectDependency = __webpack_require__(95913); -const HarmonyImportSpecifierDependency = __webpack_require__(577); - -/** @typedef {import("estree").ExportAllDeclaration} ExportAllDeclaration */ -/** @typedef {import("estree").ExportNamedDeclaration} ExportNamedDeclaration */ -/** @typedef {import("estree").Identifier} Identifier */ -/** @typedef {import("estree").ImportDeclaration} ImportDeclaration */ -/** @typedef {import("estree").ImportExpression} ImportExpression */ -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("../optimize/InnerGraph").InnerGraph} InnerGraph */ -/** @typedef {import("../optimize/InnerGraph").TopLevelSymbol} TopLevelSymbol */ -/** @typedef {import("./HarmonyImportDependency")} HarmonyImportDependency */ - -const harmonySpecifierTag = Symbol("harmony import"); - -/** - * @typedef {Object} HarmonySettings - * @property {string[]} ids - * @property {string} source - * @property {number} sourceOrder - * @property {string} name - * @property {boolean} await - * @property {Record | undefined} assertions - */ - -/** - * @param {ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | ImportExpression} node node with assertions - * @returns {Record | undefined} assertions - */ -function getAssertions(node) { - // TODO remove cast when @types/estree has been updated to import assertions - const assertions = /** @type {{ assertions?: ImportAttributeNode[] }} */ ( - node - ).assertions; - if (assertions === undefined) { - return undefined; - } - const result = {}; - for (const assertion of assertions) { - const key = - assertion.key.type === "Identifier" - ? assertion.key.name - : assertion.key.value; - result[key] = assertion.value.value; - } - return result; -} - -module.exports = class HarmonyImportDependencyParserPlugin { - /** - * @param {JavascriptParserOptions} options options - */ - constructor(options) { - this.exportPresenceMode = - options.importExportsPresence !== undefined - ? ExportPresenceModes.fromUserOption(options.importExportsPresence) - : options.exportsPresence !== undefined - ? ExportPresenceModes.fromUserOption(options.exportsPresence) - : options.strictExportPresence - ? ExportPresenceModes.ERROR - : ExportPresenceModes.AUTO; - this.strictThisContextOnImports = options.strictThisContextOnImports; - } - - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - apply(parser) { - const { exportPresenceMode } = this; - - function getNonOptionalPart(members, membersOptionals) { - let i = 0; - while (i < members.length && membersOptionals[i] === false) i++; - return i !== members.length ? members.slice(0, i) : members; - } - - function getNonOptionalMemberChain(node, count) { - while (count--) node = node.object; - return node; - } - - parser.hooks.isPure - .for("Identifier") - .tap("HarmonyImportDependencyParserPlugin", expression => { - const expr = /** @type {Identifier} */ (expression); - if ( - parser.isVariableDefined(expr.name) || - parser.getTagData(expr.name, harmonySpecifierTag) - ) { - return true; - } - }); - parser.hooks.import.tap( - "HarmonyImportDependencyParserPlugin", - (statement, source) => { - parser.state.lastHarmonyImportOrder = - (parser.state.lastHarmonyImportOrder || 0) + 1; - const clearDep = new ConstDependency( - parser.isAsiPosition(statement.range[0]) ? ";" : "", - statement.range - ); - clearDep.loc = statement.loc; - parser.state.module.addPresentationalDependency(clearDep); - parser.unsetAsiPosition(statement.range[1]); - const assertions = getAssertions(statement); - const sideEffectDep = new HarmonyImportSideEffectDependency( - source, - parser.state.lastHarmonyImportOrder, - assertions - ); - sideEffectDep.loc = statement.loc; - parser.state.module.addDependency(sideEffectDep); - return true; - } - ); - parser.hooks.importSpecifier.tap( - "HarmonyImportDependencyParserPlugin", - (statement, source, id, name) => { - const ids = id === null ? [] : [id]; - parser.tagVariable(name, harmonySpecifierTag, { - name, - source, - ids, - sourceOrder: parser.state.lastHarmonyImportOrder, - assertions: getAssertions(statement) - }); - return true; - } - ); - parser.hooks.binaryExpression.tap( - "HarmonyImportDependencyParserPlugin", - expression => { - if (expression.operator !== "in") return; - - const leftPartEvaluated = parser.evaluateExpression(expression.left); - if (leftPartEvaluated.couldHaveSideEffects()) return; - const leftPart = leftPartEvaluated.asString(); - if (!leftPart) return; - - const rightPart = parser.evaluateExpression(expression.right); - if (!rightPart.isIdentifier()) return; - - const rootInfo = rightPart.rootInfo; - if ( - !rootInfo || - !rootInfo.tagInfo || - rootInfo.tagInfo.tag !== harmonySpecifierTag - ) - return; - const settings = rootInfo.tagInfo.data; - const members = rightPart.getMembers(); - const dep = new HarmonyEvaluatedImportSpecifierDependency( - settings.source, - settings.sourceOrder, - settings.ids.concat(members).concat([leftPart]), - settings.name, - expression.range, - settings.assertions, - "in" - ); - dep.directImport = members.length === 0; - dep.asiSafe = !parser.isAsiPosition(expression.range[0]); - dep.loc = expression.loc; - parser.state.module.addDependency(dep); - InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); - return true; - } - ); - parser.hooks.expression - .for(harmonySpecifierTag) - .tap("HarmonyImportDependencyParserPlugin", expr => { - const settings = /** @type {HarmonySettings} */ (parser.currentTagData); - const dep = new HarmonyImportSpecifierDependency( - settings.source, - settings.sourceOrder, - settings.ids, - settings.name, - expr.range, - exportPresenceMode, - settings.assertions - ); - dep.shorthand = parser.scope.inShorthand; - dep.directImport = true; - dep.asiSafe = !parser.isAsiPosition(expr.range[0]); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); - return true; - }); - parser.hooks.expressionMemberChain - .for(harmonySpecifierTag) - .tap( - "HarmonyImportDependencyParserPlugin", - (expression, members, membersOptionals) => { - const settings = /** @type {HarmonySettings} */ ( - parser.currentTagData - ); - const nonOptionalMembers = getNonOptionalPart( - members, - membersOptionals - ); - const expr = - nonOptionalMembers !== members - ? getNonOptionalMemberChain( - expression, - members.length - nonOptionalMembers.length - ) - : expression; - const ids = settings.ids.concat(nonOptionalMembers); - const dep = new HarmonyImportSpecifierDependency( - settings.source, - settings.sourceOrder, - ids, - settings.name, - expr.range, - exportPresenceMode, - settings.assertions - ); - dep.asiSafe = !parser.isAsiPosition(expr.range[0]); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); - return true; - } - ); - parser.hooks.callMemberChain - .for(harmonySpecifierTag) - .tap( - "HarmonyImportDependencyParserPlugin", - (expression, members, membersOptionals) => { - const { arguments: args, callee } = expression; - const settings = /** @type {HarmonySettings} */ ( - parser.currentTagData - ); - const nonOptionalMembers = getNonOptionalPart( - members, - membersOptionals - ); - const expr = - nonOptionalMembers !== members - ? getNonOptionalMemberChain( - callee, - members.length - nonOptionalMembers.length - ) - : callee; - const ids = settings.ids.concat(nonOptionalMembers); - const dep = new HarmonyImportSpecifierDependency( - settings.source, - settings.sourceOrder, - ids, - settings.name, - expr.range, - exportPresenceMode, - settings.assertions - ); - dep.directImport = members.length === 0; - dep.call = true; - dep.asiSafe = !parser.isAsiPosition(expr.range[0]); - // only in case when we strictly follow the spec we need a special case here - dep.namespaceObjectAsContext = - members.length > 0 && this.strictThisContextOnImports; - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - if (args) parser.walkExpressions(args); - InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); - return true; - } - ); - const { hotAcceptCallback, hotAcceptWithoutCallback } = - HotModuleReplacementPlugin.getParserHooks(parser); - hotAcceptCallback.tap( - "HarmonyImportDependencyParserPlugin", - (expr, requests) => { - if (!HarmonyExports.isEnabled(parser.state)) { - // This is not a harmony module, skip it - return; - } - const dependencies = requests.map(request => { - const dep = new HarmonyAcceptImportDependency(request); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return dep; - }); - if (dependencies.length > 0) { - const dep = new HarmonyAcceptDependency( - expr.range, - dependencies, - true - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - } - } - ); - hotAcceptWithoutCallback.tap( - "HarmonyImportDependencyParserPlugin", - (expr, requests) => { - if (!HarmonyExports.isEnabled(parser.state)) { - // This is not a harmony module, skip it - return; - } - const dependencies = requests.map(request => { - const dep = new HarmonyAcceptImportDependency(request); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - return dep; - }); - if (dependencies.length > 0) { - const dep = new HarmonyAcceptDependency( - expr.range, - dependencies, - false - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - } - } - ); - } -}; - -module.exports.harmonySpecifierTag = harmonySpecifierTag; -module.exports.getAssertions = getAssertions; - - -/***/ }), - -/***/ 95913: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const HarmonyImportDependency = __webpack_require__(58668); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../InitFragment")} InitFragment */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class HarmonyImportSideEffectDependency extends HarmonyImportDependency { - constructor(request, sourceOrder, assertions) { - super(request, sourceOrder, assertions); - } - - get type() { - return "harmony side effect evaluation"; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return connection => { - const refModule = connection.resolvedModule; - if (!refModule) return true; - return refModule.getSideEffectsConnectionState(moduleGraph); - }; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - const refModule = moduleGraph.getModule(this); - if (!refModule) return true; - return refModule.getSideEffectsConnectionState(moduleGraph); - } -} - -makeSerializable( - HarmonyImportSideEffectDependency, - "webpack/lib/dependencies/HarmonyImportSideEffectDependency" -); - -HarmonyImportSideEffectDependency.Template = class HarmonyImportSideEffectDependencyTemplate extends ( - HarmonyImportDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const { moduleGraph, concatenationScope } = templateContext; - if (concatenationScope) { - const module = moduleGraph.getModule(dependency); - if (concatenationScope.isModuleInScope(module)) { - return; - } - } - super.apply(dependency, source, templateContext); - } -}; - -module.exports = HarmonyImportSideEffectDependency; - - -/***/ }), - -/***/ 577: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const { - getDependencyUsedByExportsCondition -} = __webpack_require__(39236); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const HarmonyImportDependency = __webpack_require__(58668); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const idsSymbol = Symbol("HarmonyImportSpecifierDependency.ids"); - -const { ExportPresenceModes } = HarmonyImportDependency; - -class HarmonyImportSpecifierDependency extends HarmonyImportDependency { - constructor( - request, - sourceOrder, - ids, - name, - range, - exportPresenceMode, - assertions - ) { - super(request, sourceOrder, assertions); - this.ids = ids; - this.name = name; - this.range = range; - this.exportPresenceMode = exportPresenceMode; - this.namespaceObjectAsContext = false; - this.call = undefined; - this.directImport = undefined; - this.shorthand = undefined; - this.asiSafe = undefined; - /** @type {Set | boolean} */ - this.usedByExports = undefined; - } - - // TODO webpack 6 remove - get id() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - // TODO webpack 6 remove - getId() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - // TODO webpack 6 remove - setId() { - throw new Error("id was renamed to ids and type changed to string[]"); - } - - get type() { - return "harmony import specifier"; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string[]} the imported ids - */ - getIds(moduleGraph) { - const meta = moduleGraph.getMetaIfExisting(this); - if (meta === undefined) return this.ids; - const ids = meta[idsSymbol]; - return ids !== undefined ? ids : this.ids; - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {string[]} ids the imported ids - * @returns {void} - */ - setIds(moduleGraph, ids) { - moduleGraph.getMeta(this)[idsSymbol] = ids; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return getDependencyUsedByExportsCondition( - this, - this.usedByExports, - moduleGraph - ); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return false; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - let ids = this.getIds(moduleGraph); - if (ids.length === 0) return Dependency.EXPORTS_OBJECT_REFERENCED; - let namespaceObjectAsContext = this.namespaceObjectAsContext; - if (ids[0] === "default") { - const selfModule = moduleGraph.getParentModule(this); - const importedModule = moduleGraph.getModule(this); - switch ( - importedModule.getExportsType( - moduleGraph, - selfModule.buildMeta.strictHarmonyModule - ) - ) { - case "default-only": - case "default-with-named": - if (ids.length === 1) return Dependency.EXPORTS_OBJECT_REFERENCED; - ids = ids.slice(1); - namespaceObjectAsContext = true; - break; - case "dynamic": - return Dependency.EXPORTS_OBJECT_REFERENCED; - } - } - - if ( - this.call && - !this.directImport && - (namespaceObjectAsContext || ids.length > 1) - ) { - if (ids.length === 1) return Dependency.EXPORTS_OBJECT_REFERENCED; - ids = ids.slice(0, -1); - } - - return [ids]; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {number} effective mode - */ - _getEffectiveExportPresenceLevel(moduleGraph) { - if (this.exportPresenceMode !== ExportPresenceModes.AUTO) - return this.exportPresenceMode; - return moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule - ? ExportPresenceModes.ERROR - : ExportPresenceModes.WARN; - } - - /** - * Returns warnings - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} warnings - */ - getWarnings(moduleGraph) { - const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph); - if (exportsPresence === ExportPresenceModes.WARN) { - return this._getErrors(moduleGraph); - } - return null; - } - - /** - * Returns errors - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} errors - */ - getErrors(moduleGraph) { - const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph); - if (exportsPresence === ExportPresenceModes.ERROR) { - return this._getErrors(moduleGraph); - } - return null; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[] | undefined} errors - */ - _getErrors(moduleGraph) { - const ids = this.getIds(moduleGraph); - return this.getLinkingErrors( - moduleGraph, - ids, - `(imported as '${this.name}')` - ); - } - - /** - * implement this method to allow the occurrence order plugin to count correctly - * @returns {number} count how often the id is used in this dependency - */ - getNumberOfIdOccurrences() { - return 0; - } - - serialize(context) { - const { write } = context; - write(this.ids); - write(this.name); - write(this.range); - write(this.exportPresenceMode); - write(this.namespaceObjectAsContext); - write(this.call); - write(this.directImport); - write(this.shorthand); - write(this.asiSafe); - write(this.usedByExports); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.ids = read(); - this.name = read(); - this.range = read(); - this.exportPresenceMode = read(); - this.namespaceObjectAsContext = read(); - this.call = read(); - this.directImport = read(); - this.shorthand = read(); - this.asiSafe = read(); - this.usedByExports = read(); - super.deserialize(context); - } -} - -makeSerializable( - HarmonyImportSpecifierDependency, - "webpack/lib/dependencies/HarmonyImportSpecifierDependency" -); - -HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependencyTemplate extends ( - HarmonyImportDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {HarmonyImportSpecifierDependency} */ (dependency); - const { moduleGraph, runtime } = templateContext; - const connection = moduleGraph.getConnection(dep); - // Skip rendering depending when dependency is conditional - if (connection && !connection.isTargetActive(runtime)) return; - - const ids = dep.getIds(moduleGraph); - const exportExpr = this._getCodeForIds(dep, source, templateContext, ids); - const range = dep.range; - if (dep.shorthand) { - source.insert(range[1], `: ${exportExpr}`); - } else { - source.replace(range[0], range[1] - 1, exportExpr); - } - } - - /** - * @param {HarmonyImportSpecifierDependency} dep dependency - * @param {ReplaceSource} source source - * @param {DependencyTemplateContext} templateContext context - * @param {string[]} ids ids - * @returns {string} generated code - */ - _getCodeForIds(dep, source, templateContext, ids) { - const { moduleGraph, module, runtime, concatenationScope } = - templateContext; - const connection = moduleGraph.getConnection(dep); - let exportExpr; - if ( - connection && - concatenationScope && - concatenationScope.isModuleInScope(connection.module) - ) { - if (ids.length === 0) { - exportExpr = concatenationScope.createModuleReference( - connection.module, - { - asiSafe: dep.asiSafe - } - ); - } else if (dep.namespaceObjectAsContext && ids.length === 1) { - exportExpr = - concatenationScope.createModuleReference(connection.module, { - asiSafe: dep.asiSafe - }) + propertyAccess(ids); - } else { - exportExpr = concatenationScope.createModuleReference( - connection.module, - { - ids, - call: dep.call, - directImport: dep.directImport, - asiSafe: dep.asiSafe - } - ); - } - } else { - super.apply(dep, source, templateContext); - - const { runtimeTemplate, initFragments, runtimeRequirements } = - templateContext; - - exportExpr = runtimeTemplate.exportFromImport({ - moduleGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - exportName: ids, - originModule: module, - asiSafe: dep.shorthand ? true : dep.asiSafe, - isCall: dep.call, - callContext: !dep.directImport, - defaultInterop: true, - importVar: dep.getImportVar(moduleGraph), - initFragments, - runtime, - runtimeRequirements - }); - } - return exportExpr; - } -}; - -module.exports = HarmonyImportSpecifierDependency; - - -/***/ }), - -/***/ 43047: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const HarmonyAcceptDependency = __webpack_require__(98702); -const HarmonyAcceptImportDependency = __webpack_require__(13345); -const HarmonyCompatibilityDependency = __webpack_require__(48180); -const HarmonyEvaluatedImportSpecifierDependency = __webpack_require__(87799); -const HarmonyExportExpressionDependency = __webpack_require__(61404); -const HarmonyExportHeaderDependency = __webpack_require__(31623); -const HarmonyExportImportedSpecifierDependency = __webpack_require__(96577); -const HarmonyExportSpecifierDependency = __webpack_require__(22437); -const HarmonyImportSideEffectDependency = __webpack_require__(95913); -const HarmonyImportSpecifierDependency = __webpack_require__(577); - -const HarmonyDetectionParserPlugin = __webpack_require__(69585); -const HarmonyExportDependencyParserPlugin = __webpack_require__(28445); -const HarmonyImportDependencyParserPlugin = __webpack_require__(59152); -const HarmonyTopLevelThisParserPlugin = __webpack_require__(39929); - -/** @typedef {import("../Compiler")} Compiler */ - -class HarmonyModulesPlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "HarmonyModulesPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - HarmonyCompatibilityDependency, - new HarmonyCompatibilityDependency.Template() - ); - - compilation.dependencyFactories.set( - HarmonyImportSideEffectDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - HarmonyImportSideEffectDependency, - new HarmonyImportSideEffectDependency.Template() - ); - - compilation.dependencyFactories.set( - HarmonyImportSpecifierDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - HarmonyImportSpecifierDependency, - new HarmonyImportSpecifierDependency.Template() - ); - - compilation.dependencyFactories.set( - HarmonyEvaluatedImportSpecifierDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - HarmonyEvaluatedImportSpecifierDependency, - new HarmonyEvaluatedImportSpecifierDependency.Template() - ); - - compilation.dependencyTemplates.set( - HarmonyExportHeaderDependency, - new HarmonyExportHeaderDependency.Template() - ); - - compilation.dependencyTemplates.set( - HarmonyExportExpressionDependency, - new HarmonyExportExpressionDependency.Template() - ); - - compilation.dependencyTemplates.set( - HarmonyExportSpecifierDependency, - new HarmonyExportSpecifierDependency.Template() - ); - - compilation.dependencyFactories.set( - HarmonyExportImportedSpecifierDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - HarmonyExportImportedSpecifierDependency, - new HarmonyExportImportedSpecifierDependency.Template() - ); - - compilation.dependencyTemplates.set( - HarmonyAcceptDependency, - new HarmonyAcceptDependency.Template() - ); - - compilation.dependencyFactories.set( - HarmonyAcceptImportDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - HarmonyAcceptImportDependency, - new HarmonyAcceptImportDependency.Template() - ); - - const handler = (parser, parserOptions) => { - // TODO webpack 6: rename harmony to esm or module - if (parserOptions.harmony !== undefined && !parserOptions.harmony) - return; - - new HarmonyDetectionParserPlugin(this.options).apply(parser); - new HarmonyImportDependencyParserPlugin(parserOptions).apply(parser); - new HarmonyExportDependencyParserPlugin(parserOptions).apply(parser); - new HarmonyTopLevelThisParserPlugin().apply(parser); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("HarmonyModulesPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("HarmonyModulesPlugin", handler); - } - ); - } -} -module.exports = HarmonyModulesPlugin; - - -/***/ }), - -/***/ 39929: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const ConstDependency = __webpack_require__(14367); -const HarmonyExports = __webpack_require__(40699); - -class HarmonyTopLevelThisParserPlugin { - apply(parser) { - parser.hooks.expression - .for("this") - .tap("HarmonyTopLevelThisParserPlugin", node => { - if (!parser.scope.topLevelScope) return; - if (HarmonyExports.isEnabled(parser.state)) { - const dep = new ConstDependency("undefined", node.range, null); - dep.loc = node.loc; - parser.state.module.addPresentationalDependency(dep); - return this; - } - }); - } -} - -module.exports = HarmonyTopLevelThisParserPlugin; - - -/***/ }), - -/***/ 28801: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); -const ContextDependencyTemplateAsRequireCall = __webpack_require__(5160); - -class ImportContextDependency extends ContextDependency { - constructor(options, range, valueRange) { - super(options); - - this.range = range; - this.valueRange = valueRange; - } - - get type() { - return `import() context ${this.options.mode}`; - } - - get category() { - return "esm"; - } - - serialize(context) { - const { write } = context; - - write(this.valueRange); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.valueRange = read(); - - super.deserialize(context); - } -} - -makeSerializable( - ImportContextDependency, - "webpack/lib/dependencies/ImportContextDependency" -); - -ImportContextDependency.Template = ContextDependencyTemplateAsRequireCall; - -module.exports = ImportContextDependency; - - -/***/ }), - -/***/ 36074: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class ImportDependency extends ModuleDependency { - /** - * @param {string} request the request - * @param {[number, number]} range expression range - * @param {string[][]=} referencedExports list of referenced exports - */ - constructor(request, range, referencedExports) { - super(request); - this.range = range; - this.referencedExports = referencedExports; - } - - get type() { - return "import()"; - } - - get category() { - return "esm"; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return this.referencedExports - ? this.referencedExports.map(e => ({ - name: e, - canMangle: false - })) - : Dependency.EXPORTS_OBJECT_REFERENCED; - } - - serialize(context) { - context.write(this.range); - context.write(this.referencedExports); - super.serialize(context); - } - - deserialize(context) { - this.range = context.read(); - this.referencedExports = context.read(); - super.deserialize(context); - } -} - -makeSerializable(ImportDependency, "webpack/lib/dependencies/ImportDependency"); - -ImportDependency.Template = class ImportDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ImportDependency} */ (dependency); - const block = /** @type {AsyncDependenciesBlock} */ ( - moduleGraph.getParentBlock(dep) - ); - const content = runtimeTemplate.moduleNamespacePromise({ - chunkGraph, - block: block, - module: moduleGraph.getModule(dep), - request: dep.request, - strict: module.buildMeta.strictHarmonyModule, - message: "import()", - runtimeRequirements - }); - - source.replace(dep.range[0], dep.range[1] - 1, content); - } -}; - -module.exports = ImportDependency; - - -/***/ }), - -/***/ 29646: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ImportDependency = __webpack_require__(36074); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -class ImportEagerDependency extends ImportDependency { - /** - * @param {string} request the request - * @param {[number, number]} range expression range - * @param {string[][]=} referencedExports list of referenced exports - */ - constructor(request, range, referencedExports) { - super(request, range, referencedExports); - } - - get type() { - return "import() eager"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ImportEagerDependency, - "webpack/lib/dependencies/ImportEagerDependency" -); - -ImportEagerDependency.Template = class ImportEagerDependencyTemplate extends ( - ImportDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ImportEagerDependency} */ (dependency); - const content = runtimeTemplate.moduleNamespacePromise({ - chunkGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - strict: module.buildMeta.strictHarmonyModule, - message: "import() eager", - runtimeRequirements - }); - - source.replace(dep.range[0], dep.range[1] - 1, content); - } -}; - -module.exports = ImportEagerDependency; - - -/***/ }), - -/***/ 14894: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); -const ModuleDependencyTemplateAsRequireId = __webpack_require__(59583); - -class ImportMetaContextDependency extends ContextDependency { - constructor(options, range) { - super(options); - - this.range = range; - } - - get category() { - return "esm"; - } - - get type() { - return `import.meta.webpackContext ${this.options.mode}`; - } -} - -makeSerializable( - ImportMetaContextDependency, - "webpack/lib/dependencies/ImportMetaContextDependency" -); - -ImportMetaContextDependency.Template = ModuleDependencyTemplateAsRequireId; - -module.exports = ImportMetaContextDependency; - - -/***/ }), - -/***/ 81518: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const WebpackError = __webpack_require__(27154); -const { - evaluateToIdentifier -} = __webpack_require__(97574); -const ImportMetaContextDependency = __webpack_require__(14894); - -/** @typedef {import("estree").Expression} ExpressionNode */ -/** @typedef {import("estree").ObjectExpression} ObjectExpressionNode */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("../ContextModule").ContextModuleOptions} ContextModuleOptions */ -/** @typedef {import("../ChunkGroup").RawChunkGroupOptions} RawChunkGroupOptions */ -/** @typedef {Pick&{groupOptions: RawChunkGroupOptions, exports?: ContextModuleOptions["referencedExports"]}} ImportMetaContextOptions */ - -function createPropertyParseError(prop, expect) { - return createError( - `Parsing import.meta.webpackContext options failed. Unknown value for property ${JSON.stringify( - prop.key.name - )}, expected type ${expect}.`, - prop.value.loc - ); -} - -function createError(msg, loc) { - const error = new WebpackError(msg); - error.name = "ImportMetaContextError"; - error.loc = loc; - return error; -} - -module.exports = class ImportMetaContextDependencyParserPlugin { - apply(parser) { - parser.hooks.evaluateIdentifier - .for("import.meta.webpackContext") - .tap("HotModuleReplacementPlugin", expr => { - return evaluateToIdentifier( - "import.meta.webpackContext", - "import.meta", - () => ["webpackContext"], - true - )(expr); - }); - parser.hooks.call - .for("import.meta.webpackContext") - .tap("ImportMetaContextDependencyParserPlugin", expr => { - if (expr.arguments.length < 1 || expr.arguments.length > 2) return; - const [directoryNode, optionsNode] = expr.arguments; - if (optionsNode && optionsNode.type !== "ObjectExpression") return; - const requestExpr = parser.evaluateExpression(directoryNode); - if (!requestExpr.isString()) return; - const request = requestExpr.string; - const errors = []; - let regExp = /^\.\/.*$/; - let recursive = true; - /** @type {ContextModuleOptions["mode"]} */ - let mode = "sync"; - /** @type {ContextModuleOptions["include"]} */ - let include; - /** @type {ContextModuleOptions["exclude"]} */ - let exclude; - /** @type {RawChunkGroupOptions} */ - const groupOptions = {}; - /** @type {ContextModuleOptions["chunkName"]} */ - let chunkName; - /** @type {ContextModuleOptions["referencedExports"]} */ - let exports; - if (optionsNode) { - for (const prop of optionsNode.properties) { - if (prop.type !== "Property" || prop.key.type !== "Identifier") { - errors.push( - createError( - "Parsing import.meta.webpackContext options failed.", - optionsNode.loc - ) - ); - break; - } - switch (prop.key.name) { - case "regExp": { - const regExpExpr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!regExpExpr.isRegExp()) { - errors.push(createPropertyParseError(prop, "RegExp")); - } else { - regExp = regExpExpr.regExp; - } - break; - } - case "include": { - const regExpExpr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!regExpExpr.isRegExp()) { - errors.push(createPropertyParseError(prop, "RegExp")); - } else { - include = regExpExpr.regExp; - } - break; - } - case "exclude": { - const regExpExpr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!regExpExpr.isRegExp()) { - errors.push(createPropertyParseError(prop, "RegExp")); - } else { - exclude = regExpExpr.regExp; - } - break; - } - case "mode": { - const modeExpr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!modeExpr.isString()) { - errors.push(createPropertyParseError(prop, "string")); - } else { - mode = /** @type {ContextModuleOptions["mode"]} */ ( - modeExpr.string - ); - } - break; - } - case "chunkName": { - const expr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!expr.isString()) { - errors.push(createPropertyParseError(prop, "string")); - } else { - chunkName = expr.string; - } - break; - } - case "exports": { - const expr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (expr.isString()) { - exports = [[expr.string]]; - } else if (expr.isArray()) { - const items = expr.items; - if ( - items.every(i => { - if (!i.isArray()) return false; - const innerItems = i.items; - return innerItems.every(i => i.isString()); - }) - ) { - exports = []; - for (const i1 of items) { - const export_ = []; - for (const i2 of i1.items) { - export_.push(i2.string); - } - exports.push(export_); - } - } else { - errors.push( - createPropertyParseError(prop, "string|string[][]") - ); - } - } else { - errors.push( - createPropertyParseError(prop, "string|string[][]") - ); - } - break; - } - case "prefetch": { - const expr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (expr.isBoolean()) { - groupOptions.prefetchOrder = 0; - } else if (expr.isNumber()) { - groupOptions.prefetchOrder = expr.number; - } else { - errors.push(createPropertyParseError(prop, "boolean|number")); - } - break; - } - case "preload": { - const expr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (expr.isBoolean()) { - groupOptions.preloadOrder = 0; - } else if (expr.isNumber()) { - groupOptions.preloadOrder = expr.number; - } else { - errors.push(createPropertyParseError(prop, "boolean|number")); - } - break; - } - case "recursive": { - const recursiveExpr = parser.evaluateExpression( - /** @type {ExpressionNode} */ (prop.value) - ); - if (!recursiveExpr.isBoolean()) { - errors.push(createPropertyParseError(prop, "boolean")); - } else { - recursive = recursiveExpr.bool; - } - break; - } - default: - errors.push( - createError( - `Parsing import.meta.webpackContext options failed. Unknown property ${JSON.stringify( - prop.key.name - )}.`, - optionsNode.loc - ) - ); - } - } - } - if (errors.length) { - for (const error of errors) parser.state.current.addError(error); - return; - } - - const dep = new ImportMetaContextDependency( - { - request, - include, - exclude, - recursive, - regExp, - groupOptions, - chunkName, - referencedExports: exports, - mode, - category: "esm" - }, - expr.range - ); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - }); - } -}; - - -/***/ }), - -/***/ 87790: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const ContextElementDependency = __webpack_require__(34192); -const ImportMetaContextDependency = __webpack_require__(14894); -const ImportMetaContextDependencyParserPlugin = __webpack_require__(81518); - -/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -class ImportMetaContextPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "RequireContextPlugin", - (compilation, { contextModuleFactory, normalModuleFactory }) => { - compilation.dependencyFactories.set( - ImportMetaContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - ImportMetaContextDependency, - new ImportMetaContextDependency.Template() - ); - compilation.dependencyFactories.set( - ContextElementDependency, - normalModuleFactory - ); - - const handler = (parser, parserOptions) => { - if ( - parserOptions.importMetaContext !== undefined && - !parserOptions.importMetaContext - ) - return; - - new ImportMetaContextDependencyParserPlugin().apply(parser); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ImportMetaContextPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ImportMetaContextPlugin", handler); - } - ); - } -} - -module.exports = ImportMetaContextPlugin; - - -/***/ }), - -/***/ 94717: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsId = __webpack_require__(29355); - -class ImportMetaHotAcceptDependency extends ModuleDependency { - constructor(request, range) { - super(request); - this.range = range; - this.weak = true; - } - - get type() { - return "import.meta.webpackHot.accept"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ImportMetaHotAcceptDependency, - "webpack/lib/dependencies/ImportMetaHotAcceptDependency" -); - -ImportMetaHotAcceptDependency.Template = ModuleDependencyTemplateAsId; - -module.exports = ImportMetaHotAcceptDependency; - - -/***/ }), - -/***/ 15491: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsId = __webpack_require__(29355); - -class ImportMetaHotDeclineDependency extends ModuleDependency { - constructor(request, range) { - super(request); - - this.range = range; - this.weak = true; - } - - get type() { - return "import.meta.webpackHot.decline"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ImportMetaHotDeclineDependency, - "webpack/lib/dependencies/ImportMetaHotDeclineDependency" -); - -ImportMetaHotDeclineDependency.Template = ModuleDependencyTemplateAsId; - -module.exports = ImportMetaHotDeclineDependency; - - -/***/ }), - -/***/ 23009: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const { pathToFileURL } = __webpack_require__(57310); -const ModuleDependencyWarning = __webpack_require__(76218); -const Template = __webpack_require__(43841); -const BasicEvaluatedExpression = __webpack_require__(94844); -const { - evaluateToIdentifier, - toConstantDependency, - evaluateToString, - evaluateToNumber -} = __webpack_require__(97574); -const memoize = __webpack_require__(61374); -const propertyAccess = __webpack_require__(67603); -const ConstDependency = __webpack_require__(14367); - -/** @typedef {import("estree").MemberExpression} MemberExpression */ -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../javascript/JavascriptParser")} Parser */ - -const getCriticalDependencyWarning = memoize(() => - __webpack_require__(34219) -); - -class ImportMetaPlugin { - /** - * @param {Compiler} compiler compiler - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "ImportMetaPlugin", - (compilation, { normalModuleFactory }) => { - /** - * @param {NormalModule} module module - * @returns {string} file url - */ - const getUrl = module => { - return pathToFileURL(module.resource).toString(); - }; - /** - * @param {Parser} parser parser parser - * @param {JavascriptParserOptions} parserOptions parserOptions - * @returns {void} - */ - const parserHandler = (parser, { importMeta }) => { - if (importMeta === false) { - const { importMetaName } = compilation.outputOptions; - if (importMetaName === "import.meta") return; - - parser.hooks.expression - .for("import.meta") - .tap("ImportMetaPlugin", metaProperty => { - const dep = new ConstDependency( - importMetaName, - metaProperty.range - ); - dep.loc = metaProperty.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - return; - } - - /// import.meta direct /// - parser.hooks.typeof - .for("import.meta") - .tap( - "ImportMetaPlugin", - toConstantDependency(parser, JSON.stringify("object")) - ); - parser.hooks.expression - .for("import.meta") - .tap("ImportMetaPlugin", metaProperty => { - const CriticalDependencyWarning = getCriticalDependencyWarning(); - parser.state.module.addWarning( - new ModuleDependencyWarning( - parser.state.module, - new CriticalDependencyWarning( - "Accessing import.meta directly is unsupported (only property access is supported)" - ), - metaProperty.loc - ) - ); - const dep = new ConstDependency( - `${parser.isAsiPosition(metaProperty.range[0]) ? ";" : ""}({})`, - metaProperty.range - ); - dep.loc = metaProperty.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluateTypeof - .for("import.meta") - .tap("ImportMetaPlugin", evaluateToString("object")); - parser.hooks.evaluateIdentifier.for("import.meta").tap( - "ImportMetaPlugin", - evaluateToIdentifier("import.meta", "import.meta", () => [], true) - ); - - /// import.meta.url /// - parser.hooks.typeof - .for("import.meta.url") - .tap( - "ImportMetaPlugin", - toConstantDependency(parser, JSON.stringify("string")) - ); - parser.hooks.expression - .for("import.meta.url") - .tap("ImportMetaPlugin", expr => { - const dep = new ConstDependency( - JSON.stringify(getUrl(parser.state.module)), - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluateTypeof - .for("import.meta.url") - .tap("ImportMetaPlugin", evaluateToString("string")); - parser.hooks.evaluateIdentifier - .for("import.meta.url") - .tap("ImportMetaPlugin", expr => { - return new BasicEvaluatedExpression() - .setString(getUrl(parser.state.module)) - .setRange(expr.range); - }); - - /// import.meta.webpack /// - const webpackVersion = parseInt( - (__webpack_require__(27012)/* .version */ .i8), - 10 - ); - parser.hooks.typeof - .for("import.meta.webpack") - .tap( - "ImportMetaPlugin", - toConstantDependency(parser, JSON.stringify("number")) - ); - parser.hooks.expression - .for("import.meta.webpack") - .tap( - "ImportMetaPlugin", - toConstantDependency(parser, JSON.stringify(webpackVersion)) - ); - parser.hooks.evaluateTypeof - .for("import.meta.webpack") - .tap("ImportMetaPlugin", evaluateToString("number")); - parser.hooks.evaluateIdentifier - .for("import.meta.webpack") - .tap("ImportMetaPlugin", evaluateToNumber(webpackVersion)); - - /// Unknown properties /// - parser.hooks.unhandledExpressionMemberChain - .for("import.meta") - .tap("ImportMetaPlugin", (expr, members) => { - const dep = new ConstDependency( - `${Template.toNormalComment( - "unsupported import.meta." + members.join(".") - )} undefined${propertyAccess(members, 1)}`, - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluate - .for("MemberExpression") - .tap("ImportMetaPlugin", expression => { - const expr = /** @type {MemberExpression} */ (expression); - if ( - expr.object.type === "MetaProperty" && - expr.object.meta.name === "import" && - expr.object.property.name === "meta" && - expr.property.type === - (expr.computed ? "Literal" : "Identifier") - ) { - return new BasicEvaluatedExpression() - .setUndefined() - .setRange(expr.range); - } - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ImportMetaPlugin", parserHandler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ImportMetaPlugin", parserHandler); - } - ); - } -} - -module.exports = ImportMetaPlugin; - - -/***/ }), - -/***/ 41018: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const AsyncDependenciesBlock = __webpack_require__(42290); -const CommentCompilationWarning = __webpack_require__(54437); -const UnsupportedFeatureWarning = __webpack_require__(17623); -const ContextDependencyHelpers = __webpack_require__(32556); -const ImportContextDependency = __webpack_require__(28801); -const ImportDependency = __webpack_require__(36074); -const ImportEagerDependency = __webpack_require__(29646); -const ImportWeakDependency = __webpack_require__(97001); - -/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ -/** @typedef {import("../ChunkGroup").RawChunkGroupOptions} RawChunkGroupOptions */ -/** @typedef {import("../ContextModule").ContextMode} ContextMode */ - -class ImportParserPlugin { - /** - * @param {JavascriptParserOptions} options options - */ - constructor(options) { - this.options = options; - } - - apply(parser) { - parser.hooks.importCall.tap("ImportParserPlugin", expr => { - const param = parser.evaluateExpression(expr.source); - - let chunkName = null; - /** @type {ContextMode} */ - let mode = this.options.dynamicImportMode; - let include = null; - let exclude = null; - /** @type {string[][] | null} */ - let exports = null; - /** @type {RawChunkGroupOptions} */ - const groupOptions = {}; - - const { dynamicImportPreload, dynamicImportPrefetch } = this.options; - if (dynamicImportPreload !== undefined && dynamicImportPreload !== false) - groupOptions.preloadOrder = - dynamicImportPreload === true ? 0 : dynamicImportPreload; - if ( - dynamicImportPrefetch !== undefined && - dynamicImportPrefetch !== false - ) - groupOptions.prefetchOrder = - dynamicImportPrefetch === true ? 0 : dynamicImportPrefetch; - - const { options: importOptions, errors: commentErrors } = - parser.parseCommentOptions(expr.range); - - if (commentErrors) { - for (const e of commentErrors) { - const { comment } = e; - parser.state.module.addWarning( - new CommentCompilationWarning( - `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, - comment.loc - ) - ); - } - } - - if (importOptions) { - if (importOptions.webpackIgnore !== undefined) { - if (typeof importOptions.webpackIgnore !== "boolean") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, - expr.loc - ) - ); - } else { - // Do not instrument `import()` if `webpackIgnore` is `true` - if (importOptions.webpackIgnore) { - return false; - } - } - } - if (importOptions.webpackChunkName !== undefined) { - if (typeof importOptions.webpackChunkName !== "string") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, - expr.loc - ) - ); - } else { - chunkName = importOptions.webpackChunkName; - } - } - if (importOptions.webpackMode !== undefined) { - if (typeof importOptions.webpackMode !== "string") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`, - expr.loc - ) - ); - } else { - mode = importOptions.webpackMode; - } - } - if (importOptions.webpackPrefetch !== undefined) { - if (importOptions.webpackPrefetch === true) { - groupOptions.prefetchOrder = 0; - } else if (typeof importOptions.webpackPrefetch === "number") { - groupOptions.prefetchOrder = importOptions.webpackPrefetch; - } else { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`, - expr.loc - ) - ); - } - } - if (importOptions.webpackPreload !== undefined) { - if (importOptions.webpackPreload === true) { - groupOptions.preloadOrder = 0; - } else if (typeof importOptions.webpackPreload === "number") { - groupOptions.preloadOrder = importOptions.webpackPreload; - } else { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`, - expr.loc - ) - ); - } - } - if (importOptions.webpackInclude !== undefined) { - if ( - !importOptions.webpackInclude || - importOptions.webpackInclude.constructor.name !== "RegExp" - ) { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`, - expr.loc - ) - ); - } else { - include = new RegExp(importOptions.webpackInclude); - } - } - if (importOptions.webpackExclude !== undefined) { - if ( - !importOptions.webpackExclude || - importOptions.webpackExclude.constructor.name !== "RegExp" - ) { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`, - expr.loc - ) - ); - } else { - exclude = new RegExp(importOptions.webpackExclude); - } - } - if (importOptions.webpackExports !== undefined) { - if ( - !( - typeof importOptions.webpackExports === "string" || - (Array.isArray(importOptions.webpackExports) && - importOptions.webpackExports.every( - item => typeof item === "string" - )) - ) - ) { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackExports\` expected a string or an array of strings, but received: ${importOptions.webpackExports}.`, - expr.loc - ) - ); - } else { - if (typeof importOptions.webpackExports === "string") { - exports = [[importOptions.webpackExports]]; - } else { - exports = Array.from(importOptions.webpackExports, e => [e]); - } - } - } - } - - if ( - mode !== "lazy" && - mode !== "lazy-once" && - mode !== "eager" && - mode !== "weak" - ) { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${mode}.`, - expr.loc - ) - ); - mode = "lazy"; - } - - if (param.isString()) { - if (mode === "eager") { - const dep = new ImportEagerDependency( - param.string, - expr.range, - exports - ); - parser.state.current.addDependency(dep); - } else if (mode === "weak") { - const dep = new ImportWeakDependency( - param.string, - expr.range, - exports - ); - parser.state.current.addDependency(dep); - } else { - const depBlock = new AsyncDependenciesBlock( - { - ...groupOptions, - name: chunkName - }, - expr.loc, - param.string - ); - const dep = new ImportDependency(param.string, expr.range, exports); - dep.loc = expr.loc; - depBlock.addDependency(dep); - parser.state.current.addBlock(depBlock); - } - return true; - } else { - if (mode === "weak") { - mode = "async-weak"; - } - const dep = ContextDependencyHelpers.create( - ImportContextDependency, - expr.range, - param, - expr, - this.options, - { - chunkName, - groupOptions, - include, - exclude, - mode, - namespaceObject: parser.state.module.buildMeta.strictHarmonyModule - ? "strict" - : true, - typePrefix: "import()", - category: "esm", - referencedExports: exports - }, - parser - ); - if (!dep) return; - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - }); - } -} - -module.exports = ImportParserPlugin; - - -/***/ }), - -/***/ 7604: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ImportContextDependency = __webpack_require__(28801); -const ImportDependency = __webpack_require__(36074); -const ImportEagerDependency = __webpack_require__(29646); -const ImportParserPlugin = __webpack_require__(41018); -const ImportWeakDependency = __webpack_require__(97001); - -/** @typedef {import("../Compiler")} Compiler */ - -class ImportPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "ImportPlugin", - (compilation, { contextModuleFactory, normalModuleFactory }) => { - compilation.dependencyFactories.set( - ImportDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ImportDependency, - new ImportDependency.Template() - ); - - compilation.dependencyFactories.set( - ImportEagerDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ImportEagerDependency, - new ImportEagerDependency.Template() - ); - - compilation.dependencyFactories.set( - ImportWeakDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - ImportWeakDependency, - new ImportWeakDependency.Template() - ); - - compilation.dependencyFactories.set( - ImportContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - ImportContextDependency, - new ImportContextDependency.Template() - ); - - const handler = (parser, parserOptions) => { - if (parserOptions.import !== undefined && !parserOptions.import) - return; - - new ImportParserPlugin(parserOptions).apply(parser); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("ImportPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("ImportPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("ImportPlugin", handler); - } - ); - } -} -module.exports = ImportPlugin; - - -/***/ }), - -/***/ 97001: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ImportDependency = __webpack_require__(36074); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -class ImportWeakDependency extends ImportDependency { - /** - * @param {string} request the request - * @param {[number, number]} range expression range - * @param {string[][]=} referencedExports list of referenced exports - */ - constructor(request, range, referencedExports) { - super(request, range, referencedExports); - this.weak = true; - } - - get type() { - return "import() weak"; - } -} - -makeSerializable( - ImportWeakDependency, - "webpack/lib/dependencies/ImportWeakDependency" -); - -ImportWeakDependency.Template = class ImportDependencyTemplate extends ( - ImportDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ImportWeakDependency} */ (dependency); - const content = runtimeTemplate.moduleNamespacePromise({ - chunkGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - strict: module.buildMeta.strictHarmonyModule, - message: "import() weak", - weak: true, - runtimeRequirements - }); - - source.replace(dep.range[0], dep.range[1] - 1, content); - } -}; - -module.exports = ImportWeakDependency; - - -/***/ }), - -/***/ 67762: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ExportSpec} ExportSpec */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../json/JsonData")} JsonData */ -/** @typedef {import("../util/Hash")} Hash */ - -const getExportsFromData = data => { - if (data && typeof data === "object") { - if (Array.isArray(data)) { - return data.length < 100 - ? data.map((item, idx) => { - return { - name: `${idx}`, - canMangle: true, - exports: getExportsFromData(item) - }; - }) - : undefined; - } else { - const exports = []; - for (const key of Object.keys(data)) { - exports.push({ - name: key, - canMangle: true, - exports: getExportsFromData(data[key]) - }); - } - return exports; - } - } - return undefined; -}; - -class JsonExportsDependency extends NullDependency { - /** - * @param {JsonData=} data json data - */ - constructor(data) { - super(); - this.data = data; - } - - get type() { - return "json exports"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - return { - exports: getExportsFromData(this.data && this.data.get()), - dependencies: undefined - }; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - this.data.updateHash(hash); - } - - serialize(context) { - const { write } = context; - write(this.data); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.data = read(); - super.deserialize(context); - } -} - -makeSerializable( - JsonExportsDependency, - "webpack/lib/dependencies/JsonExportsDependency" -); - -module.exports = JsonExportsDependency; - - -/***/ }), - -/***/ 21749: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class LoaderDependency extends ModuleDependency { - /** - * @param {string} request request string - */ - constructor(request) { - super(request); - } - - get type() { - return "loader"; - } - - get category() { - return "loader"; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return false; - } -} - -module.exports = LoaderDependency; - - -/***/ }), - -/***/ 77779: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class LoaderImportDependency extends ModuleDependency { - /** - * @param {string} request request string - */ - constructor(request) { - super(request); - this.weak = true; - } - - get type() { - return "loader import"; - } - - get category() { - return "loaderImport"; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return false; - } -} - -module.exports = LoaderImportDependency; - - -/***/ }), - -/***/ 21422: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NormalModule = __webpack_require__(89417); -const LazySet = __webpack_require__(96522); -const LoaderDependency = __webpack_require__(21749); -const LoaderImportDependency = __webpack_require__(77779); - -/** @typedef {import("../Compilation").DepConstructor} DepConstructor */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -/** - * @callback LoadModuleCallback - * @param {(Error | null)=} err error object - * @param {string | Buffer=} source source code - * @param {object=} map source map - * @param {Module=} module loaded module if successful - */ - -/** - * @callback ImportModuleCallback - * @param {(Error | null)=} err error object - * @param {any=} exports exports of the evaluated module - */ - -/** - * @typedef {Object} ImportModuleOptions - * @property {string=} layer the target layer - * @property {string=} publicPath the target public path - * @property {string=} baseUri target base uri - */ - -class LoaderPlugin { - /** - * @param {Object} options options - */ - constructor(options = {}) {} - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "LoaderPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - LoaderDependency, - normalModuleFactory - ); - compilation.dependencyFactories.set( - LoaderImportDependency, - normalModuleFactory - ); - } - ); - - compiler.hooks.compilation.tap("LoaderPlugin", compilation => { - const moduleGraph = compilation.moduleGraph; - NormalModule.getCompilationHooks(compilation).loader.tap( - "LoaderPlugin", - loaderContext => { - /** - * @param {string} request the request string to load the module from - * @param {LoadModuleCallback} callback callback returning the loaded module or error - * @returns {void} - */ - loaderContext.loadModule = (request, callback) => { - const dep = new LoaderDependency(request); - dep.loc = { - name: request - }; - const factory = compilation.dependencyFactories.get( - /** @type {DepConstructor} */ (dep.constructor) - ); - if (factory === undefined) { - return callback( - new Error( - `No module factory available for dependency type: ${dep.constructor.name}` - ) - ); - } - compilation.buildQueue.increaseParallelism(); - compilation.handleModuleCreation( - { - factory, - dependencies: [dep], - originModule: loaderContext._module, - context: loaderContext.context, - recursive: false - }, - err => { - compilation.buildQueue.decreaseParallelism(); - if (err) { - return callback(err); - } - const referencedModule = moduleGraph.getModule(dep); - if (!referencedModule) { - return callback(new Error("Cannot load the module")); - } - if (referencedModule.getNumberOfErrors() > 0) { - return callback( - new Error("The loaded module contains errors") - ); - } - const moduleSource = referencedModule.originalSource(); - if (!moduleSource) { - return callback( - new Error( - "The module created for a LoaderDependency must have an original source" - ) - ); - } - let source, map; - if (moduleSource.sourceAndMap) { - const sourceAndMap = moduleSource.sourceAndMap(); - map = sourceAndMap.map; - source = sourceAndMap.source; - } else { - map = moduleSource.map(); - source = moduleSource.source(); - } - const fileDependencies = new LazySet(); - const contextDependencies = new LazySet(); - const missingDependencies = new LazySet(); - const buildDependencies = new LazySet(); - referencedModule.addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ); - - for (const d of fileDependencies) { - loaderContext.addDependency(d); - } - for (const d of contextDependencies) { - loaderContext.addContextDependency(d); - } - for (const d of missingDependencies) { - loaderContext.addMissingDependency(d); - } - for (const d of buildDependencies) { - loaderContext.addBuildDependency(d); - } - return callback(null, source, map, referencedModule); - } - ); - }; - - /** - * @param {string} request the request string to load the module from - * @param {ImportModuleOptions=} options options - * @param {ImportModuleCallback=} callback callback returning the exports - * @returns {void} - */ - const importModule = (request, options, callback) => { - const dep = new LoaderImportDependency(request); - dep.loc = { - name: request - }; - const factory = compilation.dependencyFactories.get( - /** @type {DepConstructor} */ (dep.constructor) - ); - if (factory === undefined) { - return callback( - new Error( - `No module factory available for dependency type: ${dep.constructor.name}` - ) - ); - } - compilation.buildQueue.increaseParallelism(); - compilation.handleModuleCreation( - { - factory, - dependencies: [dep], - originModule: loaderContext._module, - contextInfo: { - issuerLayer: options.layer - }, - context: loaderContext.context, - connectOrigin: false - }, - err => { - compilation.buildQueue.decreaseParallelism(); - if (err) { - return callback(err); - } - const referencedModule = moduleGraph.getModule(dep); - if (!referencedModule) { - return callback(new Error("Cannot load the module")); - } - compilation.executeModule( - referencedModule, - { - entryOptions: { - baseUri: options.baseUri, - publicPath: options.publicPath - } - }, - (err, result) => { - if (err) return callback(err); - for (const d of result.fileDependencies) { - loaderContext.addDependency(d); - } - for (const d of result.contextDependencies) { - loaderContext.addContextDependency(d); - } - for (const d of result.missingDependencies) { - loaderContext.addMissingDependency(d); - } - for (const d of result.buildDependencies) { - loaderContext.addBuildDependency(d); - } - if (result.cacheable === false) - loaderContext.cacheable(false); - for (const [name, { source, info }] of result.assets) { - const { buildInfo } = loaderContext._module; - if (!buildInfo.assets) { - buildInfo.assets = Object.create(null); - buildInfo.assetsInfo = new Map(); - } - buildInfo.assets[name] = source; - buildInfo.assetsInfo.set(name, info); - } - callback(null, result.exports); - } - ); - } - ); - }; - - /** - * @param {string} request the request string to load the module from - * @param {ImportModuleOptions} options options - * @param {ImportModuleCallback=} callback callback returning the exports - * @returns {Promise | void} exports - */ - loaderContext.importModule = (request, options, callback) => { - if (!callback) { - return new Promise((resolve, reject) => { - importModule(request, options || {}, (err, result) => { - if (err) reject(err); - else resolve(result); - }); - }); - } - return importModule(request, options || {}, callback); - }; - } - ); - }); - } -} -module.exports = LoaderPlugin; - - -/***/ }), - -/***/ 71195: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); - -class LocalModule { - constructor(name, idx) { - this.name = name; - this.idx = idx; - this.used = false; - } - - flagUsed() { - this.used = true; - } - - variableName() { - return "__WEBPACK_LOCAL_MODULE_" + this.idx + "__"; - } - - serialize(context) { - const { write } = context; - - write(this.name); - write(this.idx); - write(this.used); - } - - deserialize(context) { - const { read } = context; - - this.name = read(); - this.idx = read(); - this.used = read(); - } -} - -makeSerializable(LocalModule, "webpack/lib/dependencies/LocalModule"); - -module.exports = LocalModule; - - -/***/ }), - -/***/ 81600: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class LocalModuleDependency extends NullDependency { - constructor(localModule, range, callNew) { - super(); - - this.localModule = localModule; - this.range = range; - this.callNew = callNew; - } - - serialize(context) { - const { write } = context; - - write(this.localModule); - write(this.range); - write(this.callNew); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.localModule = read(); - this.range = read(); - this.callNew = read(); - - super.deserialize(context); - } -} - -makeSerializable( - LocalModuleDependency, - "webpack/lib/dependencies/LocalModuleDependency" -); - -LocalModuleDependency.Template = class LocalModuleDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {LocalModuleDependency} */ (dependency); - if (!dep.range) return; - const moduleInstance = dep.callNew - ? `new (function () { return ${dep.localModule.variableName()}; })()` - : dep.localModule.variableName(); - source.replace(dep.range[0], dep.range[1] - 1, moduleInstance); - } -}; - -module.exports = LocalModuleDependency; - - -/***/ }), - -/***/ 59081: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const LocalModule = __webpack_require__(71195); - -const lookup = (parent, mod) => { - if (mod.charAt(0) !== ".") return mod; - - var path = parent.split("/"); - var segments = mod.split("/"); - path.pop(); - - for (let i = 0; i < segments.length; i++) { - const seg = segments[i]; - if (seg === "..") { - path.pop(); - } else if (seg !== ".") { - path.push(seg); - } - } - - return path.join("/"); -}; - -exports.addLocalModule = (state, name) => { - if (!state.localModules) { - state.localModules = []; - } - const m = new LocalModule(name, state.localModules.length); - state.localModules.push(m); - return m; -}; - -exports.getLocalModule = (state, name, namedModule) => { - if (!state.localModules) return null; - if (namedModule) { - // resolve dependency name relative to the defining named module - name = lookup(namedModule, name); - } - for (let i = 0; i < state.localModules.length; i++) { - if (state.localModules[i].name === name) { - return state.localModules[i]; - } - } - return null; -}; - - -/***/ }), - -/***/ 1569: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class ModuleDecoratorDependency extends NullDependency { - /** - * @param {string} decorator the decorator requirement - * @param {boolean} allowExportsAccess allow to access exports from module - */ - constructor(decorator, allowExportsAccess) { - super(); - this.decorator = decorator; - this.allowExportsAccess = allowExportsAccess; - this._hashUpdate = undefined; - } - - /** - * @returns {string} a display name for the type of dependency - */ - get type() { - return "module decorator"; - } - - get category() { - return "self"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `self`; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return this.allowExportsAccess - ? Dependency.EXPORTS_OBJECT_REFERENCED - : Dependency.NO_EXPORTS_REFERENCED; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) { - this._hashUpdate = `${this.decorator}${this.allowExportsAccess}`; - } - hash.update(this._hashUpdate); - } - - serialize(context) { - const { write } = context; - write(this.decorator); - write(this.allowExportsAccess); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.decorator = read(); - this.allowExportsAccess = read(); - super.deserialize(context); - } -} - -makeSerializable( - ModuleDecoratorDependency, - "webpack/lib/dependencies/ModuleDecoratorDependency" -); - -ModuleDecoratorDependency.Template = class ModuleDecoratorDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { module, chunkGraph, initFragments, runtimeRequirements } - ) { - const dep = /** @type {ModuleDecoratorDependency} */ (dependency); - runtimeRequirements.add(RuntimeGlobals.moduleLoaded); - runtimeRequirements.add(RuntimeGlobals.moduleId); - runtimeRequirements.add(RuntimeGlobals.module); - runtimeRequirements.add(dep.decorator); - initFragments.push( - new InitFragment( - `/* module decorator */ ${module.moduleArgument} = ${dep.decorator}(${module.moduleArgument});\n`, - InitFragment.STAGE_PROVIDES, - 0, - `module decorator ${chunkGraph.getModuleId(module)}` - ) - ); - } -}; - -module.exports = ModuleDecoratorDependency; - - -/***/ }), - -/***/ 99809: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const DependencyTemplate = __webpack_require__(94086); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../Module")} Module */ - -const getRawModule = memoize(() => __webpack_require__(71133)); - -class ModuleDependency extends Dependency { - /** - * @param {string} request request path which needs resolving - */ - constructor(request) { - super(); - this.request = request; - this.userRequest = request; - this.range = undefined; - // assertions must be serialized by subclasses that use it - /** @type {Record | undefined} */ - this.assertions = undefined; - this._context = undefined; - } - - /** - * @returns {string | undefined} a request context - */ - getContext() { - return this._context; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - let str = `context${this._context || ""}|module${this.request}`; - if (this.assertions !== undefined) { - str += JSON.stringify(this.assertions); - } - return str; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return true; - } - - /** - * @param {string} context context directory - * @returns {Module} a module - */ - createIgnoredModule(context) { - const RawModule = getRawModule(); - return new RawModule( - "/* (ignored) */", - `ignored|${context}|${this.request}`, - `${this.request} (ignored)` - ); - } - - serialize(context) { - const { write } = context; - write(this.request); - write(this.userRequest); - write(this._context); - write(this.range); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.request = read(); - this.userRequest = read(); - this._context = read(); - this.range = read(); - super.deserialize(context); - } -} - -ModuleDependency.Template = DependencyTemplate; - -module.exports = ModuleDependency; - - -/***/ }), - -/***/ 29355: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class ModuleDependencyTemplateAsId extends ModuleDependency.Template { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeTemplate, moduleGraph, chunkGraph }) { - const dep = /** @type {ModuleDependency} */ (dependency); - if (!dep.range) return; - const content = runtimeTemplate.moduleId({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - weak: dep.weak - }); - source.replace(dep.range[0], dep.range[1] - 1, content); - } -} - -module.exports = ModuleDependencyTemplateAsId; - - -/***/ }), - -/***/ 59583: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class ModuleDependencyTemplateAsRequireId extends ModuleDependency.Template { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {ModuleDependency} */ (dependency); - if (!dep.range) return; - const content = runtimeTemplate.moduleExports({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - weak: dep.weak, - runtimeRequirements - }); - source.replace(dep.range[0], dep.range[1] - 1, content); - } -} -module.exports = ModuleDependencyTemplateAsRequireId; - - -/***/ }), - -/***/ 72674: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsId = __webpack_require__(29355); - -class ModuleHotAcceptDependency extends ModuleDependency { - constructor(request, range) { - super(request); - this.range = range; - this.weak = true; - } - - get type() { - return "module.hot.accept"; - } - - get category() { - return "commonjs"; - } -} - -makeSerializable( - ModuleHotAcceptDependency, - "webpack/lib/dependencies/ModuleHotAcceptDependency" -); - -ModuleHotAcceptDependency.Template = ModuleDependencyTemplateAsId; - -module.exports = ModuleHotAcceptDependency; - - -/***/ }), - -/***/ 40213: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyTemplateAsId = __webpack_require__(29355); - -class ModuleHotDeclineDependency extends ModuleDependency { - constructor(request, range) { - super(request); - - this.range = range; - this.weak = true; - } - - get type() { - return "module.hot.decline"; - } - - get category() { - return "commonjs"; - } -} - -makeSerializable( - ModuleHotDeclineDependency, - "webpack/lib/dependencies/ModuleHotDeclineDependency" -); - -ModuleHotDeclineDependency.Template = ModuleDependencyTemplateAsId; - -module.exports = ModuleHotDeclineDependency; - - -/***/ }), - -/***/ 91596: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const DependencyTemplate = __webpack_require__(94086); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class NullDependency extends Dependency { - get type() { - return "null"; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return false; - } -} - -NullDependency.Template = class NullDependencyTemplate extends ( - DependencyTemplate -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) {} -}; - -module.exports = NullDependency; - - -/***/ }), - -/***/ 45851: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); - -class PrefetchDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "prefetch"; - } - - get category() { - return "esm"; - } -} - -module.exports = PrefetchDependency; - - -/***/ }), - -/***/ 13996: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const Dependency = __webpack_require__(87056); -const InitFragment = __webpack_require__(64768); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @param {string[]|null} path the property path array - * @returns {string} the converted path - */ -const pathToString = path => - path !== null && path.length > 0 - ? path.map(part => `[${JSON.stringify(part)}]`).join("") - : ""; - -class ProvidedDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {string} identifier identifier - * @param {string[]} ids ids - * @param {[number, number]} range range - */ - constructor(request, identifier, ids, range) { - super(request); - this.identifier = identifier; - this.ids = ids; - this.range = range; - this._hashUpdate = undefined; - } - - get type() { - return "provided"; - } - - get category() { - return "esm"; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - let ids = this.ids; - if (ids.length === 0) return Dependency.EXPORTS_OBJECT_REFERENCED; - return [ids]; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) { - this._hashUpdate = this.identifier + (this.ids ? this.ids.join(",") : ""); - } - hash.update(this._hashUpdate); - } - - serialize(context) { - const { write } = context; - write(this.identifier); - write(this.ids); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.identifier = read(); - this.ids = read(); - super.deserialize(context); - } -} - -makeSerializable( - ProvidedDependency, - "webpack/lib/dependencies/ProvidedDependency" -); - -class ProvidedDependencyTemplate extends ModuleDependency.Template { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { - runtime, - runtimeTemplate, - moduleGraph, - chunkGraph, - initFragments, - runtimeRequirements - } - ) { - const dep = /** @type {ProvidedDependency} */ (dependency); - const connection = moduleGraph.getConnection(dep); - const exportsInfo = moduleGraph.getExportsInfo(connection.module); - const usedName = exportsInfo.getUsedName(dep.ids, runtime); - initFragments.push( - new InitFragment( - `/* provided dependency */ var ${ - dep.identifier - } = ${runtimeTemplate.moduleExports({ - module: moduleGraph.getModule(dep), - chunkGraph, - request: dep.request, - runtimeRequirements - })}${pathToString(/** @type {string[]} */ (usedName))};\n`, - InitFragment.STAGE_PROVIDES, - 1, - `provided ${dep.identifier}` - ) - ); - source.replace(dep.range[0], dep.range[1] - 1, dep.identifier); - } -} - -ProvidedDependency.Template = ProvidedDependencyTemplate; - -module.exports = ProvidedDependency; - - -/***/ }), - -/***/ 72926: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { UsageState } = __webpack_require__(13168); -const makeSerializable = __webpack_require__(65764); -const { filterRuntime } = __webpack_require__(47462); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ - -class PureExpressionDependency extends NullDependency { - /** - * @param {[number, number]} range the source range - */ - constructor(range) { - super(); - this.range = range; - /** @type {Set | false} */ - this.usedByExports = false; - this._hashUpdate = undefined; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) { - this._hashUpdate = this.range + ""; - } - hash.update(this._hashUpdate); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this dependency connects the module to referencing modules - */ - getModuleEvaluationSideEffectsState(moduleGraph) { - return false; - } - - serialize(context) { - const { write } = context; - write(this.range); - write(this.usedByExports); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.range = read(); - this.usedByExports = read(); - super.deserialize(context); - } -} - -makeSerializable( - PureExpressionDependency, - "webpack/lib/dependencies/PureExpressionDependency" -); - -PureExpressionDependency.Template = class PureExpressionDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { chunkGraph, moduleGraph, runtime, runtimeTemplate, runtimeRequirements } - ) { - const dep = /** @type {PureExpressionDependency} */ (dependency); - - const usedByExports = dep.usedByExports; - if (usedByExports !== false) { - const selfModule = moduleGraph.getParentModule(dep); - const exportsInfo = moduleGraph.getExportsInfo(selfModule); - const runtimeCondition = filterRuntime(runtime, runtime => { - for (const exportName of usedByExports) { - if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) { - return true; - } - } - return false; - }); - if (runtimeCondition === true) return; - if (runtimeCondition !== false) { - const condition = runtimeTemplate.runtimeConditionExpression({ - chunkGraph, - runtime, - runtimeCondition, - runtimeRequirements - }); - source.insert( - dep.range[0], - `(/* runtime-dependent pure expression or super */ ${condition} ? (` - ); - source.insert(dep.range[1], ") : null)"); - return; - } - } - - source.insert( - dep.range[0], - `(/* unused pure expression or super */ null && (` - ); - source.insert(dep.range[1], "))"); - } -}; - -module.exports = PureExpressionDependency; - - -/***/ }), - -/***/ 30174: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); -const ModuleDependencyTemplateAsRequireId = __webpack_require__(59583); - -class RequireContextDependency extends ContextDependency { - constructor(options, range) { - super(options); - - this.range = range; - } - - get type() { - return "require.context"; - } -} - -makeSerializable( - RequireContextDependency, - "webpack/lib/dependencies/RequireContextDependency" -); - -RequireContextDependency.Template = ModuleDependencyTemplateAsRequireId; - -module.exports = RequireContextDependency; - - -/***/ }), - -/***/ 21239: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RequireContextDependency = __webpack_require__(30174); - -module.exports = class RequireContextDependencyParserPlugin { - apply(parser) { - parser.hooks.call - .for("require.context") - .tap("RequireContextDependencyParserPlugin", expr => { - let regExp = /^\.\/.*$/; - let recursive = true; - let mode = "sync"; - switch (expr.arguments.length) { - case 4: { - const modeExpr = parser.evaluateExpression(expr.arguments[3]); - if (!modeExpr.isString()) return; - mode = modeExpr.string; - } - // falls through - case 3: { - const regExpExpr = parser.evaluateExpression(expr.arguments[2]); - if (!regExpExpr.isRegExp()) return; - regExp = regExpExpr.regExp; - } - // falls through - case 2: { - const recursiveExpr = parser.evaluateExpression(expr.arguments[1]); - if (!recursiveExpr.isBoolean()) return; - recursive = recursiveExpr.bool; - } - // falls through - case 1: { - const requestExpr = parser.evaluateExpression(expr.arguments[0]); - if (!requestExpr.isString()) return; - const dep = new RequireContextDependency( - { - request: requestExpr.string, - recursive, - regExp, - mode, - category: "commonjs" - }, - expr.range - ); - dep.loc = expr.loc; - dep.optional = !!parser.scope.inTry; - parser.state.current.addDependency(dep); - return true; - } - } - }); - } -}; - - -/***/ }), - -/***/ 52138: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { cachedSetProperty } = __webpack_require__(22093); -const ContextElementDependency = __webpack_require__(34192); -const RequireContextDependency = __webpack_require__(30174); -const RequireContextDependencyParserPlugin = __webpack_require__(21239); - -/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -/** @type {ResolveOptions} */ -const EMPTY_RESOLVE_OPTIONS = {}; - -class RequireContextPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "RequireContextPlugin", - (compilation, { contextModuleFactory, normalModuleFactory }) => { - compilation.dependencyFactories.set( - RequireContextDependency, - contextModuleFactory - ); - compilation.dependencyTemplates.set( - RequireContextDependency, - new RequireContextDependency.Template() - ); - - compilation.dependencyFactories.set( - ContextElementDependency, - normalModuleFactory - ); - - const handler = (parser, parserOptions) => { - if ( - parserOptions.requireContext !== undefined && - !parserOptions.requireContext - ) - return; - - new RequireContextDependencyParserPlugin().apply(parser); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("RequireContextPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("RequireContextPlugin", handler); - - contextModuleFactory.hooks.alternativeRequests.tap( - "RequireContextPlugin", - (items, options) => { - if (items.length === 0) return items; - - const finalResolveOptions = compiler.resolverFactory.get( - "normal", - cachedSetProperty( - options.resolveOptions || EMPTY_RESOLVE_OPTIONS, - "dependencyType", - options.category - ) - ).options; - - let newItems; - if (!finalResolveOptions.fullySpecified) { - newItems = []; - for (const item of items) { - const { request, context } = item; - for (const ext of finalResolveOptions.extensions) { - if (request.endsWith(ext)) { - newItems.push({ - context, - request: request.slice(0, -ext.length) - }); - } - } - if (!finalResolveOptions.enforceExtension) { - newItems.push(item); - } - } - items = newItems; - - newItems = []; - for (const obj of items) { - const { request, context } = obj; - for (const mainFile of finalResolveOptions.mainFiles) { - if (request.endsWith(`/${mainFile}`)) { - newItems.push({ - context, - request: request.slice(0, -mainFile.length) - }); - newItems.push({ - context, - request: request.slice(0, -mainFile.length - 1) - }); - } - } - newItems.push(obj); - } - items = newItems; - } - - newItems = []; - for (const item of items) { - let hideOriginal = false; - for (const modulesItems of finalResolveOptions.modules) { - if (Array.isArray(modulesItems)) { - for (const dir of modulesItems) { - if (item.request.startsWith(`./${dir}/`)) { - newItems.push({ - context: item.context, - request: item.request.slice(dir.length + 3) - }); - hideOriginal = true; - } - } - } else { - const dir = modulesItems.replace(/\\/g, "/"); - const fullPath = - item.context.replace(/\\/g, "/") + item.request.slice(1); - if (fullPath.startsWith(dir)) { - newItems.push({ - context: item.context, - request: fullPath.slice(dir.length + 1) - }); - } - } - } - if (!hideOriginal) { - newItems.push(item); - } - } - return newItems; - } - ); - } - ); - } -} -module.exports = RequireContextPlugin; - - -/***/ }), - -/***/ 45375: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const AsyncDependenciesBlock = __webpack_require__(42290); -const makeSerializable = __webpack_require__(65764); - -class RequireEnsureDependenciesBlock extends AsyncDependenciesBlock { - constructor(chunkName, loc) { - super(chunkName, loc, null); - } -} - -makeSerializable( - RequireEnsureDependenciesBlock, - "webpack/lib/dependencies/RequireEnsureDependenciesBlock" -); - -module.exports = RequireEnsureDependenciesBlock; - - -/***/ }), - -/***/ 79424: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RequireEnsureDependenciesBlock = __webpack_require__(45375); -const RequireEnsureDependency = __webpack_require__(87182); -const RequireEnsureItemDependency = __webpack_require__(33154); -const getFunctionExpression = __webpack_require__(17926); - -module.exports = class RequireEnsureDependenciesBlockParserPlugin { - apply(parser) { - parser.hooks.call - .for("require.ensure") - .tap("RequireEnsureDependenciesBlockParserPlugin", expr => { - let chunkName = null; - let errorExpressionArg = null; - let errorExpression = null; - switch (expr.arguments.length) { - case 4: { - const chunkNameExpr = parser.evaluateExpression(expr.arguments[3]); - if (!chunkNameExpr.isString()) return; - chunkName = chunkNameExpr.string; - } - // falls through - case 3: { - errorExpressionArg = expr.arguments[2]; - errorExpression = getFunctionExpression(errorExpressionArg); - - if (!errorExpression && !chunkName) { - const chunkNameExpr = parser.evaluateExpression( - expr.arguments[2] - ); - if (!chunkNameExpr.isString()) return; - chunkName = chunkNameExpr.string; - } - } - // falls through - case 2: { - const dependenciesExpr = parser.evaluateExpression( - expr.arguments[0] - ); - const dependenciesItems = dependenciesExpr.isArray() - ? dependenciesExpr.items - : [dependenciesExpr]; - const successExpressionArg = expr.arguments[1]; - const successExpression = - getFunctionExpression(successExpressionArg); - - if (successExpression) { - parser.walkExpressions(successExpression.expressions); - } - if (errorExpression) { - parser.walkExpressions(errorExpression.expressions); - } - - const depBlock = new RequireEnsureDependenciesBlock( - chunkName, - expr.loc - ); - const errorCallbackExists = - expr.arguments.length === 4 || - (!chunkName && expr.arguments.length === 3); - const dep = new RequireEnsureDependency( - expr.range, - expr.arguments[1].range, - errorCallbackExists && expr.arguments[2].range - ); - dep.loc = expr.loc; - depBlock.addDependency(dep); - const old = parser.state.current; - parser.state.current = depBlock; - try { - let failed = false; - parser.inScope([], () => { - for (const ee of dependenciesItems) { - if (ee.isString()) { - const ensureDependency = new RequireEnsureItemDependency( - ee.string - ); - ensureDependency.loc = ee.loc || expr.loc; - depBlock.addDependency(ensureDependency); - } else { - failed = true; - } - } - }); - if (failed) { - return; - } - if (successExpression) { - if (successExpression.fn.body.type === "BlockStatement") { - parser.walkStatement(successExpression.fn.body); - } else { - parser.walkExpression(successExpression.fn.body); - } - } - old.addBlock(depBlock); - } finally { - parser.state.current = old; - } - if (!successExpression) { - parser.walkExpression(successExpressionArg); - } - if (errorExpression) { - if (errorExpression.fn.body.type === "BlockStatement") { - parser.walkStatement(errorExpression.fn.body); - } else { - parser.walkExpression(errorExpression.fn.body); - } - } else if (errorExpressionArg) { - parser.walkExpression(errorExpressionArg); - } - return true; - } - } - }); - } -}; - - -/***/ }), - -/***/ 87182: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class RequireEnsureDependency extends NullDependency { - constructor(range, contentRange, errorHandlerRange) { - super(); - - this.range = range; - this.contentRange = contentRange; - this.errorHandlerRange = errorHandlerRange; - } - - get type() { - return "require.ensure"; - } - - serialize(context) { - const { write } = context; - - write(this.range); - write(this.contentRange); - write(this.errorHandlerRange); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.range = read(); - this.contentRange = read(); - this.errorHandlerRange = read(); - - super.deserialize(context); - } -} - -makeSerializable( - RequireEnsureDependency, - "webpack/lib/dependencies/RequireEnsureDependency" -); - -RequireEnsureDependency.Template = class RequireEnsureDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply( - dependency, - source, - { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } - ) { - const dep = /** @type {RequireEnsureDependency} */ (dependency); - const depBlock = /** @type {AsyncDependenciesBlock} */ ( - moduleGraph.getParentBlock(dep) - ); - const promise = runtimeTemplate.blockPromise({ - chunkGraph, - block: depBlock, - message: "require.ensure", - runtimeRequirements - }); - const range = dep.range; - const contentRange = dep.contentRange; - const errorHandlerRange = dep.errorHandlerRange; - source.replace(range[0], contentRange[0] - 1, `${promise}.then((`); - if (errorHandlerRange) { - source.replace( - contentRange[1], - errorHandlerRange[0] - 1, - ").bind(null, __webpack_require__))['catch'](" - ); - source.replace(errorHandlerRange[1], range[1] - 1, ")"); - } else { - source.replace( - contentRange[1], - range[1] - 1, - `).bind(null, __webpack_require__))['catch'](${RuntimeGlobals.uncaughtErrorHandler})` - ); - } - } -}; - -module.exports = RequireEnsureDependency; - - -/***/ }), - -/***/ 33154: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const NullDependency = __webpack_require__(91596); - -class RequireEnsureItemDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "require.ensure item"; - } - - get category() { - return "commonjs"; - } -} - -makeSerializable( - RequireEnsureItemDependency, - "webpack/lib/dependencies/RequireEnsureItemDependency" -); - -RequireEnsureItemDependency.Template = NullDependency.Template; - -module.exports = RequireEnsureItemDependency; - - -/***/ }), - -/***/ 26278: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RequireEnsureDependency = __webpack_require__(87182); -const RequireEnsureItemDependency = __webpack_require__(33154); - -const RequireEnsureDependenciesBlockParserPlugin = __webpack_require__(79424); - -const { - evaluateToString, - toConstantDependency -} = __webpack_require__(97574); - -class RequireEnsurePlugin { - apply(compiler) { - compiler.hooks.compilation.tap( - "RequireEnsurePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - RequireEnsureItemDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - RequireEnsureItemDependency, - new RequireEnsureItemDependency.Template() - ); - - compilation.dependencyTemplates.set( - RequireEnsureDependency, - new RequireEnsureDependency.Template() - ); - - const handler = (parser, parserOptions) => { - if ( - parserOptions.requireEnsure !== undefined && - !parserOptions.requireEnsure - ) - return; - - new RequireEnsureDependenciesBlockParserPlugin().apply(parser); - parser.hooks.evaluateTypeof - .for("require.ensure") - .tap("RequireEnsurePlugin", evaluateToString("function")); - parser.hooks.typeof - .for("require.ensure") - .tap( - "RequireEnsurePlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("RequireEnsurePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("RequireEnsurePlugin", handler); - } - ); - } -} -module.exports = RequireEnsurePlugin; - - -/***/ }), - -/***/ 61820: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class RequireHeaderDependency extends NullDependency { - constructor(range) { - super(); - if (!Array.isArray(range)) throw new Error("range must be valid"); - this.range = range; - } - - serialize(context) { - const { write } = context; - write(this.range); - super.serialize(context); - } - - static deserialize(context) { - const obj = new RequireHeaderDependency(context.read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - RequireHeaderDependency, - "webpack/lib/dependencies/RequireHeaderDependency" -); - -RequireHeaderDependency.Template = class RequireHeaderDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeRequirements }) { - const dep = /** @type {RequireHeaderDependency} */ (dependency); - runtimeRequirements.add(RuntimeGlobals.require); - source.replace(dep.range[0], dep.range[1] - 1, "__webpack_require__"); - } -}; - -module.exports = RequireHeaderDependency; - - -/***/ }), - -/***/ 90040: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const Template = __webpack_require__(43841); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class RequireIncludeDependency extends ModuleDependency { - constructor(request, range) { - super(request); - - this.range = range; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - // This doesn't use any export - return Dependency.NO_EXPORTS_REFERENCED; - } - - get type() { - return "require.include"; - } - - get category() { - return "commonjs"; - } -} - -makeSerializable( - RequireIncludeDependency, - "webpack/lib/dependencies/RequireIncludeDependency" -); - -RequireIncludeDependency.Template = class RequireIncludeDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeTemplate }) { - const dep = /** @type {RequireIncludeDependency} */ (dependency); - const comment = runtimeTemplate.outputOptions.pathinfo - ? Template.toComment( - `require.include ${runtimeTemplate.requestShortener.shorten( - dep.request - )}` - ) - : ""; - - source.replace(dep.range[0], dep.range[1] - 1, `undefined${comment}`); - } -}; - -module.exports = RequireIncludeDependency; - - -/***/ }), - -/***/ 98034: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); -const { - evaluateToString, - toConstantDependency -} = __webpack_require__(97574); -const makeSerializable = __webpack_require__(65764); -const RequireIncludeDependency = __webpack_require__(90040); - -module.exports = class RequireIncludeDependencyParserPlugin { - constructor(warn) { - this.warn = warn; - } - apply(parser) { - const { warn } = this; - parser.hooks.call - .for("require.include") - .tap("RequireIncludeDependencyParserPlugin", expr => { - if (expr.arguments.length !== 1) return; - const param = parser.evaluateExpression(expr.arguments[0]); - if (!param.isString()) return; - - if (warn) { - parser.state.module.addWarning( - new RequireIncludeDeprecationWarning(expr.loc) - ); - } - - const dep = new RequireIncludeDependency(param.string, expr.range); - dep.loc = expr.loc; - parser.state.current.addDependency(dep); - return true; - }); - parser.hooks.evaluateTypeof - .for("require.include") - .tap("RequireIncludePlugin", expr => { - if (warn) { - parser.state.module.addWarning( - new RequireIncludeDeprecationWarning(expr.loc) - ); - } - return evaluateToString("function")(expr); - }); - parser.hooks.typeof - .for("require.include") - .tap("RequireIncludePlugin", expr => { - if (warn) { - parser.state.module.addWarning( - new RequireIncludeDeprecationWarning(expr.loc) - ); - } - return toConstantDependency(parser, JSON.stringify("function"))(expr); - }); - } -}; - -class RequireIncludeDeprecationWarning extends WebpackError { - constructor(loc) { - super("require.include() is deprecated and will be removed soon."); - - this.name = "RequireIncludeDeprecationWarning"; - - this.loc = loc; - } -} - -makeSerializable( - RequireIncludeDeprecationWarning, - "webpack/lib/dependencies/RequireIncludeDependencyParserPlugin", - "RequireIncludeDeprecationWarning" -); - - -/***/ }), - -/***/ 75061: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RequireIncludeDependency = __webpack_require__(90040); -const RequireIncludeDependencyParserPlugin = __webpack_require__(98034); - -class RequireIncludePlugin { - apply(compiler) { - compiler.hooks.compilation.tap( - "RequireIncludePlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - RequireIncludeDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - RequireIncludeDependency, - new RequireIncludeDependency.Template() - ); - - const handler = (parser, parserOptions) => { - if (parserOptions.requireInclude === false) return; - const warn = parserOptions.requireInclude === undefined; - - new RequireIncludeDependencyParserPlugin(warn).apply(parser); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("RequireIncludePlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("RequireIncludePlugin", handler); - } - ); - } -} -module.exports = RequireIncludePlugin; - - -/***/ }), - -/***/ 99703: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const ContextDependency = __webpack_require__(22429); -const ContextDependencyTemplateAsId = __webpack_require__(44967); - -class RequireResolveContextDependency extends ContextDependency { - constructor(options, range, valueRange, context) { - super(options, context); - - this.range = range; - this.valueRange = valueRange; - } - - get type() { - return "amd require context"; - } - - serialize(context) { - const { write } = context; - - write(this.range); - write(this.valueRange); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.range = read(); - this.valueRange = read(); - - super.deserialize(context); - } -} - -makeSerializable( - RequireResolveContextDependency, - "webpack/lib/dependencies/RequireResolveContextDependency" -); - -RequireResolveContextDependency.Template = ContextDependencyTemplateAsId; - -module.exports = RequireResolveContextDependency; - - -/***/ }), - -/***/ 57485: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); -const ModuleDependencyAsId = __webpack_require__(29355); - -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class RequireResolveDependency extends ModuleDependency { - constructor(request, range, context) { - super(request); - - this.range = range; - this._context = context; - } - - get type() { - return "require.resolve"; - } - - get category() { - return "commonjs"; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - // This doesn't use any export - return Dependency.NO_EXPORTS_REFERENCED; - } -} - -makeSerializable( - RequireResolveDependency, - "webpack/lib/dependencies/RequireResolveDependency" -); - -RequireResolveDependency.Template = ModuleDependencyAsId; - -module.exports = RequireResolveDependency; - - -/***/ }), - -/***/ 2254: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class RequireResolveHeaderDependency extends NullDependency { - constructor(range) { - super(); - - if (!Array.isArray(range)) throw new Error("range must be valid"); - - this.range = range; - } - - serialize(context) { - const { write } = context; - - write(this.range); - - super.serialize(context); - } - - static deserialize(context) { - const obj = new RequireResolveHeaderDependency(context.read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - RequireResolveHeaderDependency, - "webpack/lib/dependencies/RequireResolveHeaderDependency" -); - -RequireResolveHeaderDependency.Template = class RequireResolveHeaderDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const dep = /** @type {RequireResolveHeaderDependency} */ (dependency); - source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); - } - - applyAsTemplateArgument(name, dep, source) { - source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); - } -}; - -module.exports = RequireResolveHeaderDependency; - - -/***/ }), - -/***/ 12446: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/Hash")} Hash */ - -class RuntimeRequirementsDependency extends NullDependency { - /** - * @param {string[]} runtimeRequirements runtime requirements - */ - constructor(runtimeRequirements) { - super(); - this.runtimeRequirements = new Set(runtimeRequirements); - this._hashUpdate = undefined; - } - - /** - * Update the hash - * @param {Hash} hash hash to be updated - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - if (this._hashUpdate === undefined) { - this._hashUpdate = Array.from(this.runtimeRequirements).join() + ""; - } - hash.update(this._hashUpdate); - } - - serialize(context) { - const { write } = context; - write(this.runtimeRequirements); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.runtimeRequirements = read(); - super.deserialize(context); - } -} - -makeSerializable( - RuntimeRequirementsDependency, - "webpack/lib/dependencies/RuntimeRequirementsDependency" -); - -RuntimeRequirementsDependency.Template = class RuntimeRequirementsDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeRequirements }) { - const dep = /** @type {RuntimeRequirementsDependency} */ (dependency); - for (const req of dep.runtimeRequirements) { - runtimeRequirements.add(req); - } - } -}; - -module.exports = RuntimeRequirementsDependency; - - -/***/ }), - -/***/ 19383: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ExportSpec} ExportSpec */ -/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/Hash")} Hash */ - -class StaticExportsDependency extends NullDependency { - /** - * @param {string[] | true} exports export names - * @param {boolean} canMangle true, if mangling exports names is allowed - */ - constructor(exports, canMangle) { - super(); - this.exports = exports; - this.canMangle = canMangle; - } - - get type() { - return "static exports"; - } - - /** - * Returns the exported names - * @param {ModuleGraph} moduleGraph module graph - * @returns {ExportsSpec | undefined} export names - */ - getExports(moduleGraph) { - return { - exports: this.exports, - canMangle: this.canMangle, - dependencies: undefined - }; - } - - serialize(context) { - const { write } = context; - write(this.exports); - write(this.canMangle); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.exports = read(); - this.canMangle = read(); - super.deserialize(context); - } -} - -makeSerializable( - StaticExportsDependency, - "webpack/lib/dependencies/StaticExportsDependency" -); - -module.exports = StaticExportsDependency; - - -/***/ }), - -/***/ 90020: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const WebpackError = __webpack_require__(27154); -const { - evaluateToString, - expressionIsUnsupported, - toConstantDependency -} = __webpack_require__(97574); -const makeSerializable = __webpack_require__(65764); -const ConstDependency = __webpack_require__(14367); -const SystemRuntimeModule = __webpack_require__(43587); - -/** @typedef {import("../Compiler")} Compiler */ - -class SystemPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "SystemPlugin", - (compilation, { normalModuleFactory }) => { - compilation.hooks.runtimeRequirementInModule - .for(RuntimeGlobals.system) - .tap("SystemPlugin", (module, set) => { - set.add(RuntimeGlobals.requireScope); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.system) - .tap("SystemPlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new SystemRuntimeModule()); - }); - - const handler = (parser, parserOptions) => { - if (parserOptions.system === undefined || !parserOptions.system) { - return; - } - - const setNotSupported = name => { - parser.hooks.evaluateTypeof - .for(name) - .tap("SystemPlugin", evaluateToString("undefined")); - parser.hooks.expression - .for(name) - .tap( - "SystemPlugin", - expressionIsUnsupported( - parser, - name + " is not supported by webpack." - ) - ); - }; - - parser.hooks.typeof - .for("System.import") - .tap( - "SystemPlugin", - toConstantDependency(parser, JSON.stringify("function")) - ); - parser.hooks.evaluateTypeof - .for("System.import") - .tap("SystemPlugin", evaluateToString("function")); - parser.hooks.typeof - .for("System") - .tap( - "SystemPlugin", - toConstantDependency(parser, JSON.stringify("object")) - ); - parser.hooks.evaluateTypeof - .for("System") - .tap("SystemPlugin", evaluateToString("object")); - - setNotSupported("System.set"); - setNotSupported("System.get"); - setNotSupported("System.register"); - - parser.hooks.expression.for("System").tap("SystemPlugin", expr => { - const dep = new ConstDependency(RuntimeGlobals.system, expr.range, [ - RuntimeGlobals.system - ]); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - - parser.hooks.call.for("System.import").tap("SystemPlugin", expr => { - parser.state.module.addWarning( - new SystemImportDeprecationWarning(expr.loc) - ); - - return parser.hooks.importCall.call({ - type: "ImportExpression", - source: expr.arguments[0], - loc: expr.loc, - range: expr.range - }); - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("SystemPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("SystemPlugin", handler); - } - ); - } -} - -class SystemImportDeprecationWarning extends WebpackError { - constructor(loc) { - super( - "System.import() is deprecated and will be removed soon. Use import() instead.\n" + - "For more info visit https://webpack.js.org/guides/code-splitting/" - ); - - this.name = "SystemImportDeprecationWarning"; - - this.loc = loc; - } -} - -makeSerializable( - SystemImportDeprecationWarning, - "webpack/lib/dependencies/SystemPlugin", - "SystemImportDeprecationWarning" -); - -module.exports = SystemPlugin; -module.exports.SystemImportDeprecationWarning = SystemImportDeprecationWarning; - - -/***/ }), - -/***/ 43587: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class SystemRuntimeModule extends RuntimeModule { - constructor() { - super("system"); - } - - /** - * @returns {string} runtime code - */ - generate() { - return Template.asString([ - `${RuntimeGlobals.system} = {`, - Template.indent([ - "import: function () {", - Template.indent( - "throw new Error('System.import cannot be used indirectly');" - ), - "}" - ]), - "};" - ]); - } -} - -module.exports = SystemRuntimeModule; - - -/***/ }), - -/***/ 71278: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const { - getDependencyUsedByExportsCondition -} = __webpack_require__(39236); -const makeSerializable = __webpack_require__(65764); -const memoize = __webpack_require__(61374); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const getRawDataUrlModule = memoize(() => __webpack_require__(66788)); - -class URLDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {[number, number]} range range of the arguments of new URL( |> ... <| ) - * @param {[number, number]} outerRange range of the full |> new URL(...) <| - * @param {boolean=} relative use relative urls instead of absolute with base uri - */ - constructor(request, range, outerRange, relative) { - super(request); - this.range = range; - this.outerRange = outerRange; - this.relative = relative || false; - /** @type {Set | boolean} */ - this.usedByExports = undefined; - } - - get type() { - return "new URL()"; - } - - get category() { - return "url"; - } - - /** - * @param {ModuleGraph} moduleGraph module graph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ - getCondition(moduleGraph) { - return getDependencyUsedByExportsCondition( - this, - this.usedByExports, - moduleGraph - ); - } - - /** - * @param {string} context context directory - * @returns {Module} a module - */ - createIgnoredModule(context) { - const RawDataUrlModule = getRawDataUrlModule(); - return new RawDataUrlModule("data:,", `ignored-asset`, `(ignored asset)`); - } - - serialize(context) { - const { write } = context; - write(this.outerRange); - write(this.relative); - write(this.usedByExports); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.outerRange = read(); - this.relative = read(); - this.usedByExports = read(); - super.deserialize(context); - } -} - -URLDependency.Template = class URLDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const { - chunkGraph, - moduleGraph, - runtimeRequirements, - runtimeTemplate, - runtime - } = templateContext; - const dep = /** @type {URLDependency} */ (dependency); - const connection = moduleGraph.getConnection(dep); - // Skip rendering depending when dependency is conditional - if (connection && !connection.isTargetActive(runtime)) { - source.replace( - dep.outerRange[0], - dep.outerRange[1] - 1, - "/* unused asset import */ undefined" - ); - return; - } - - runtimeRequirements.add(RuntimeGlobals.require); - - if (dep.relative) { - runtimeRequirements.add(RuntimeGlobals.relativeUrl); - source.replace( - dep.outerRange[0], - dep.outerRange[1] - 1, - `/* asset import */ new ${ - RuntimeGlobals.relativeUrl - }(${runtimeTemplate.moduleRaw({ - chunkGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - runtimeRequirements, - weak: false - })})` - ); - } else { - runtimeRequirements.add(RuntimeGlobals.baseURI); - - source.replace( - dep.range[0], - dep.range[1] - 1, - `/* asset import */ ${runtimeTemplate.moduleRaw({ - chunkGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - runtimeRequirements, - weak: false - })}, ${RuntimeGlobals.baseURI}` - ); - } - } -}; - -makeSerializable(URLDependency, "webpack/lib/dependencies/URLDependency"); - -module.exports = URLDependency; - - -/***/ }), - -/***/ 34822: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const { pathToFileURL } = __webpack_require__(57310); -const BasicEvaluatedExpression = __webpack_require__(94844); -const { approve } = __webpack_require__(97574); -const InnerGraph = __webpack_require__(39236); -const URLDependency = __webpack_require__(71278); - -/** @typedef {import("estree").NewExpression} NewExpressionNode */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ - -class URLPlugin { - /** - * @param {Compiler} compiler compiler - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "URLPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set(URLDependency, normalModuleFactory); - compilation.dependencyTemplates.set( - URLDependency, - new URLDependency.Template() - ); - - /** - * @param {NormalModule} module module - * @returns {URL} file url - */ - const getUrl = module => { - return pathToFileURL(module.resource); - }; - /** - * @param {JavascriptParser} parser parser - * @param {object} parserOptions options - */ - const parserCallback = (parser, parserOptions) => { - if (parserOptions.url === false) return; - const relative = parserOptions.url === "relative"; - - /** - * @param {NewExpressionNode} expr expression - * @returns {undefined | string} request - */ - const getUrlRequest = expr => { - if (expr.arguments.length !== 2) return; - - const [arg1, arg2] = expr.arguments; - - if ( - arg2.type !== "MemberExpression" || - arg1.type === "SpreadElement" - ) - return; - - const chain = parser.extractMemberExpressionChain(arg2); - - if ( - chain.members.length !== 1 || - chain.object.type !== "MetaProperty" || - chain.object.meta.name !== "import" || - chain.object.property.name !== "meta" || - chain.members[0] !== "url" - ) - return; - - const request = parser.evaluateExpression(arg1).asString(); - - return request; - }; - - parser.hooks.canRename.for("URL").tap("URLPlugin", approve); - parser.hooks.evaluateNewExpression - .for("URL") - .tap("URLPlugin", expr => { - const request = getUrlRequest(expr); - if (!request) return; - const url = new URL(request, getUrl(parser.state.module)); - - return new BasicEvaluatedExpression() - .setString(url.toString()) - .setRange(expr.range); - }); - parser.hooks.new.for("URL").tap("URLPlugin", _expr => { - const expr = /** @type {NewExpressionNode} */ (_expr); - - const request = getUrlRequest(expr); - - if (!request) return; - - const [arg1, arg2] = expr.arguments; - const dep = new URLDependency( - request, - [arg1.range[0], arg2.range[1]], - expr.range, - relative - ); - dep.loc = expr.loc; - parser.state.current.addDependency(dep); - InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); - return true; - }); - parser.hooks.isPure.for("NewExpression").tap("URLPlugin", _expr => { - const expr = /** @type {NewExpressionNode} */ (_expr); - const { callee } = expr; - if (callee.type !== "Identifier") return; - const calleeInfo = parser.getFreeInfoFromVariable(callee.name); - if (!calleeInfo || calleeInfo.name !== "URL") return; - - const request = getUrlRequest(expr); - - if (request) return true; - }); - }; - - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("URLPlugin", parserCallback); - - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("URLPlugin", parserCallback); - } - ); - } -} - -module.exports = URLPlugin; - - -/***/ }), - -/***/ 42809: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const NullDependency = __webpack_require__(91596); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ - -class UnsupportedDependency extends NullDependency { - constructor(request, range) { - super(); - - this.request = request; - this.range = range; - } - - serialize(context) { - const { write } = context; - - write(this.request); - write(this.range); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.request = read(); - this.range = read(); - - super.deserialize(context); - } -} - -makeSerializable( - UnsupportedDependency, - "webpack/lib/dependencies/UnsupportedDependency" -); - -UnsupportedDependency.Template = class UnsupportedDependencyTemplate extends ( - NullDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeTemplate }) { - const dep = /** @type {UnsupportedDependency} */ (dependency); - - source.replace( - dep.range[0], - dep.range[1], - runtimeTemplate.missingModule({ - request: dep.request - }) - ); - } -}; - -module.exports = UnsupportedDependency; - - -/***/ }), - -/***/ 76598: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class WebAssemblyExportImportedDependency extends ModuleDependency { - constructor(exportName, request, name, valueType) { - super(request); - /** @type {string} */ - this.exportName = exportName; - /** @type {string} */ - this.name = name; - /** @type {string} */ - this.valueType = valueType; - } - - /** - * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module - */ - couldAffectReferencingModule() { - return Dependency.TRANSITIVE; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return [[this.name]]; - } - - get type() { - return "wasm export import"; - } - - get category() { - return "wasm"; - } - - serialize(context) { - const { write } = context; - - write(this.exportName); - write(this.name); - write(this.valueType); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.exportName = read(); - this.name = read(); - this.valueType = read(); - - super.deserialize(context); - } -} - -makeSerializable( - WebAssemblyExportImportedDependency, - "webpack/lib/dependencies/WebAssemblyExportImportedDependency" -); - -module.exports = WebAssemblyExportImportedDependency; - - -/***/ }), - -/***/ 60718: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); -const UnsupportedWebAssemblyFeatureError = __webpack_require__(69889); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("@webassemblyjs/ast").ModuleImportDescription} ModuleImportDescription */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class WebAssemblyImportDependency extends ModuleDependency { - /** - * @param {string} request the request - * @param {string} name the imported name - * @param {ModuleImportDescription} description the WASM ast node - * @param {false | string} onlyDirectImport if only direct imports are allowed - */ - constructor(request, name, description, onlyDirectImport) { - super(request); - /** @type {string} */ - this.name = name; - /** @type {ModuleImportDescription} */ - this.description = description; - /** @type {false | string} */ - this.onlyDirectImport = onlyDirectImport; - } - - get type() { - return "wasm import"; - } - - get category() { - return "wasm"; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return [[this.name]]; - } - - /** - * Returns errors - * @param {ModuleGraph} moduleGraph module graph - * @returns {WebpackError[]} errors - */ - getErrors(moduleGraph) { - const module = moduleGraph.getModule(this); - - if ( - this.onlyDirectImport && - module && - !module.type.startsWith("webassembly") - ) { - return [ - new UnsupportedWebAssemblyFeatureError( - `Import "${this.name}" from "${this.request}" with ${this.onlyDirectImport} can only be used for direct wasm to wasm dependencies` - ) - ]; - } - } - - serialize(context) { - const { write } = context; - - write(this.name); - write(this.description); - write(this.onlyDirectImport); - - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - - this.name = read(); - this.description = read(); - this.onlyDirectImport = read(); - - super.deserialize(context); - } -} - -makeSerializable( - WebAssemblyImportDependency, - "webpack/lib/dependencies/WebAssemblyImportDependency" -); - -module.exports = WebAssemblyImportDependency; - - -/***/ }), - -/***/ 64111: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const Dependency = __webpack_require__(87056); -const Template = __webpack_require__(43841); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class WebpackIsIncludedDependency extends ModuleDependency { - constructor(request, range) { - super(request); - - this.weak = true; - this.range = range; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - // This doesn't use any export - return Dependency.NO_EXPORTS_REFERENCED; - } - - get type() { - return "__webpack_is_included__"; - } -} - -makeSerializable( - WebpackIsIncludedDependency, - "webpack/lib/dependencies/WebpackIsIncludedDependency" -); - -WebpackIsIncludedDependency.Template = class WebpackIsIncludedDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, { runtimeTemplate, chunkGraph, moduleGraph }) { - const dep = /** @type {WebpackIsIncludedDependency} */ (dependency); - const connection = moduleGraph.getConnection(dep); - const included = connection - ? chunkGraph.getNumberOfModuleChunks(connection.module) > 0 - : false; - const comment = runtimeTemplate.outputOptions.pathinfo - ? Template.toComment( - `__webpack_is_included__ ${runtimeTemplate.requestShortener.shorten( - dep.request - )}` - ) - : ""; - - source.replace( - dep.range[0], - dep.range[1] - 1, - `${comment}${JSON.stringify(included)}` - ); - } -}; - -module.exports = WebpackIsIncludedDependency; - - -/***/ }), - -/***/ 30598: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const Dependency = __webpack_require__(87056); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const ModuleDependency = __webpack_require__(99809); - -/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ -/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../Entrypoint")} Entrypoint */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -class WorkerDependency extends ModuleDependency { - /** - * @param {string} request request - * @param {[number, number]} range range - */ - constructor(request, range) { - super(request); - this.range = range; - } - - /** - * Returns list of exports referenced by this dependency - * @param {ModuleGraph} moduleGraph module graph - * @param {RuntimeSpec} runtime the runtime for which the module is analysed - * @returns {(string[] | ReferencedExport)[]} referenced exports - */ - getReferencedExports(moduleGraph, runtime) { - return Dependency.NO_EXPORTS_REFERENCED; - } - - get type() { - return "new Worker()"; - } - - get category() { - return "worker"; - } -} - -WorkerDependency.Template = class WorkerDependencyTemplate extends ( - ModuleDependency.Template -) { - /** - * @param {Dependency} dependency the dependency for which the template should be applied - * @param {ReplaceSource} source the current replace source which can be modified - * @param {DependencyTemplateContext} templateContext the context object - * @returns {void} - */ - apply(dependency, source, templateContext) { - const { chunkGraph, moduleGraph, runtimeRequirements } = templateContext; - const dep = /** @type {WorkerDependency} */ (dependency); - const block = /** @type {AsyncDependenciesBlock} */ ( - moduleGraph.getParentBlock(dependency) - ); - const entrypoint = /** @type {Entrypoint} */ ( - chunkGraph.getBlockChunkGroup(block) - ); - const chunk = entrypoint.getEntrypointChunk(); - - runtimeRequirements.add(RuntimeGlobals.publicPath); - runtimeRequirements.add(RuntimeGlobals.baseURI); - runtimeRequirements.add(RuntimeGlobals.getChunkScriptFilename); - - source.replace( - dep.range[0], - dep.range[1] - 1, - `/* worker import */ ${RuntimeGlobals.publicPath} + ${ - RuntimeGlobals.getChunkScriptFilename - }(${JSON.stringify(chunk.id)}), ${RuntimeGlobals.baseURI}` - ); - } -}; - -makeSerializable(WorkerDependency, "webpack/lib/dependencies/WorkerDependency"); - -module.exports = WorkerDependency; - - -/***/ }), - -/***/ 70298: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { pathToFileURL } = __webpack_require__(57310); -const AsyncDependenciesBlock = __webpack_require__(42290); -const CommentCompilationWarning = __webpack_require__(54437); -const UnsupportedFeatureWarning = __webpack_require__(17623); -const EnableChunkLoadingPlugin = __webpack_require__(49548); -const { equals } = __webpack_require__(28087); -const createHash = __webpack_require__(85205); -const { contextify } = __webpack_require__(20162); -const EnableWasmLoadingPlugin = __webpack_require__(90115); -const ConstDependency = __webpack_require__(14367); -const CreateScriptUrlDependency = __webpack_require__(37857); -const { - harmonySpecifierTag -} = __webpack_require__(59152); -const WorkerDependency = __webpack_require__(30598); - -/** @typedef {import("estree").Expression} Expression */ -/** @typedef {import("estree").ObjectExpression} ObjectExpression */ -/** @typedef {import("estree").Pattern} Pattern */ -/** @typedef {import("estree").Property} Property */ -/** @typedef {import("estree").SpreadElement} SpreadElement */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("./HarmonyImportDependencyParserPlugin").HarmonySettings} HarmonySettings */ - -const getUrl = module => { - return pathToFileURL(module.resource).toString(); -}; - -const DEFAULT_SYNTAX = [ - "Worker", - "SharedWorker", - "navigator.serviceWorker.register()", - "Worker from worker_threads" -]; - -/** @type {WeakMap} */ -const workerIndexMap = new WeakMap(); - -class WorkerPlugin { - constructor(chunkLoading, wasmLoading, module) { - this._chunkLoading = chunkLoading; - this._wasmLoading = wasmLoading; - this._module = module; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - if (this._chunkLoading) { - new EnableChunkLoadingPlugin(this._chunkLoading).apply(compiler); - } - if (this._wasmLoading) { - new EnableWasmLoadingPlugin(this._wasmLoading).apply(compiler); - } - const cachedContextify = contextify.bindContextCache( - compiler.context, - compiler.root - ); - compiler.hooks.thisCompilation.tap( - "WorkerPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - WorkerDependency, - normalModuleFactory - ); - compilation.dependencyTemplates.set( - WorkerDependency, - new WorkerDependency.Template() - ); - compilation.dependencyTemplates.set( - CreateScriptUrlDependency, - new CreateScriptUrlDependency.Template() - ); - - /** - * @param {JavascriptParser} parser the parser - * @param {Expression} expr expression - * @returns {[BasicEvaluatedExpression, [number, number]]} parsed - */ - const parseModuleUrl = (parser, expr) => { - if ( - expr.type !== "NewExpression" || - expr.callee.type === "Super" || - expr.arguments.length !== 2 - ) - return; - const [arg1, arg2] = expr.arguments; - if (arg1.type === "SpreadElement") return; - if (arg2.type === "SpreadElement") return; - const callee = parser.evaluateExpression(expr.callee); - if (!callee.isIdentifier() || callee.identifier !== "URL") return; - const arg2Value = parser.evaluateExpression(arg2); - if ( - !arg2Value.isString() || - !arg2Value.string.startsWith("file://") || - arg2Value.string !== getUrl(parser.state.module) - ) { - return; - } - const arg1Value = parser.evaluateExpression(arg1); - return [arg1Value, [arg1.range[0], arg2.range[1]]]; - }; - - /** - * @param {JavascriptParser} parser the parser - * @param {ObjectExpression} expr expression - * @returns {{ expressions: Record, otherElements: (Property | SpreadElement)[], values: Record, spread: boolean, insertType: "comma" | "single", insertLocation: number }} parsed object - */ - const parseObjectExpression = (parser, expr) => { - /** @type {Record} */ - const values = {}; - /** @type {Record} */ - const expressions = {}; - /** @type {(Property | SpreadElement)[]} */ - const otherElements = []; - let spread = false; - for (const prop of expr.properties) { - if (prop.type === "SpreadElement") { - spread = true; - } else if ( - prop.type === "Property" && - !prop.method && - !prop.computed && - prop.key.type === "Identifier" - ) { - expressions[prop.key.name] = prop.value; - if (!prop.shorthand && !prop.value.type.endsWith("Pattern")) { - const value = parser.evaluateExpression( - /** @type {Expression} */ (prop.value) - ); - if (value.isCompileTimeValue()) - values[prop.key.name] = value.asCompileTimeValue(); - } - } else { - otherElements.push(prop); - } - } - const insertType = expr.properties.length > 0 ? "comma" : "single"; - const insertLocation = - expr.properties[expr.properties.length - 1].range[1]; - return { - expressions, - otherElements, - values, - spread, - insertType, - insertLocation - }; - }; - - /** - * @param {JavascriptParser} parser the parser - * @param {object} parserOptions options - */ - const parserPlugin = (parser, parserOptions) => { - if (parserOptions.worker === false) return; - const options = !Array.isArray(parserOptions.worker) - ? ["..."] - : parserOptions.worker; - const handleNewWorker = expr => { - if (expr.arguments.length === 0 || expr.arguments.length > 2) - return; - const [arg1, arg2] = expr.arguments; - if (arg1.type === "SpreadElement") return; - if (arg2 && arg2.type === "SpreadElement") return; - const parsedUrl = parseModuleUrl(parser, arg1); - if (!parsedUrl) return; - const [url, range] = parsedUrl; - if (!url.isString()) return; - const { - expressions, - otherElements, - values: options, - spread: hasSpreadInOptions, - insertType, - insertLocation - } = arg2 && arg2.type === "ObjectExpression" - ? parseObjectExpression(parser, arg2) - : { - expressions: {}, - otherElements: [], - values: {}, - spread: false, - insertType: arg2 ? "spread" : "argument", - insertLocation: arg2 ? arg2.range : arg1.range[1] - }; - const { options: importOptions, errors: commentErrors } = - parser.parseCommentOptions(expr.range); - - if (commentErrors) { - for (const e of commentErrors) { - const { comment } = e; - parser.state.module.addWarning( - new CommentCompilationWarning( - `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, - comment.loc - ) - ); - } - } - - /** @type {EntryOptions} */ - let entryOptions = {}; - - if (importOptions) { - if (importOptions.webpackIgnore !== undefined) { - if (typeof importOptions.webpackIgnore !== "boolean") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, - expr.loc - ) - ); - } else { - if (importOptions.webpackIgnore) { - return false; - } - } - } - if (importOptions.webpackEntryOptions !== undefined) { - if ( - typeof importOptions.webpackEntryOptions !== "object" || - importOptions.webpackEntryOptions === null - ) { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackEntryOptions\` expected a object, but received: ${importOptions.webpackEntryOptions}.`, - expr.loc - ) - ); - } else { - Object.assign( - entryOptions, - importOptions.webpackEntryOptions - ); - } - } - if (importOptions.webpackChunkName !== undefined) { - if (typeof importOptions.webpackChunkName !== "string") { - parser.state.module.addWarning( - new UnsupportedFeatureWarning( - `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, - expr.loc - ) - ); - } else { - entryOptions.name = importOptions.webpackChunkName; - } - } - } - - if ( - !Object.prototype.hasOwnProperty.call(entryOptions, "name") && - options && - typeof options.name === "string" - ) { - entryOptions.name = options.name; - } - - if (entryOptions.runtime === undefined) { - let i = workerIndexMap.get(parser.state) || 0; - workerIndexMap.set(parser.state, i + 1); - let name = `${cachedContextify( - parser.state.module.identifier() - )}|${i}`; - const hash = createHash(compilation.outputOptions.hashFunction); - hash.update(name); - const digest = /** @type {string} */ ( - hash.digest(compilation.outputOptions.hashDigest) - ); - entryOptions.runtime = digest.slice( - 0, - compilation.outputOptions.hashDigestLength - ); - } - - const block = new AsyncDependenciesBlock({ - name: entryOptions.name, - entryOptions: { - chunkLoading: this._chunkLoading, - wasmLoading: this._wasmLoading, - ...entryOptions - } - }); - block.loc = expr.loc; - const dep = new WorkerDependency(url.string, range); - dep.loc = expr.loc; - block.addDependency(dep); - parser.state.module.addBlock(block); - - if (compilation.outputOptions.trustedTypes) { - const dep = new CreateScriptUrlDependency( - expr.arguments[0].range - ); - dep.loc = expr.loc; - parser.state.module.addDependency(dep); - } - - if (expressions.type) { - const expr = expressions.type; - if (options.type !== false) { - const dep = new ConstDependency( - this._module ? '"module"' : "undefined", - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - expressions.type = undefined; - } - } else if (insertType === "comma") { - if (this._module || hasSpreadInOptions) { - const dep = new ConstDependency( - `, type: ${this._module ? '"module"' : "undefined"}`, - insertLocation - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - } - } else if (insertType === "spread") { - const dep1 = new ConstDependency( - "Object.assign({}, ", - insertLocation[0] - ); - const dep2 = new ConstDependency( - `, { type: ${this._module ? '"module"' : "undefined"} })`, - insertLocation[1] - ); - dep1.loc = expr.loc; - dep2.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep1); - parser.state.module.addPresentationalDependency(dep2); - } else if (insertType === "argument") { - if (this._module) { - const dep = new ConstDependency( - ', { type: "module" }', - insertLocation - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - } - } - - parser.walkExpression(expr.callee); - for (const key of Object.keys(expressions)) { - if (expressions[key]) parser.walkExpression(expressions[key]); - } - for (const prop of otherElements) { - parser.walkProperty(prop); - } - if (insertType === "spread") { - parser.walkExpression(arg2); - } - - return true; - }; - const processItem = item => { - if (item.endsWith("()")) { - parser.hooks.call - .for(item.slice(0, -2)) - .tap("WorkerPlugin", handleNewWorker); - } else { - const match = /^(.+?)(\(\))?\s+from\s+(.+)$/.exec(item); - if (match) { - const ids = match[1].split("."); - const call = match[2]; - const source = match[3]; - (call ? parser.hooks.call : parser.hooks.new) - .for(harmonySpecifierTag) - .tap("WorkerPlugin", expr => { - const settings = /** @type {HarmonySettings} */ ( - parser.currentTagData - ); - if ( - !settings || - settings.source !== source || - !equals(settings.ids, ids) - ) { - return; - } - return handleNewWorker(expr); - }); - } else { - parser.hooks.new.for(item).tap("WorkerPlugin", handleNewWorker); - } - } - }; - for (const item of options) { - if (item === "...") { - DEFAULT_SYNTAX.forEach(processItem); - } else processItem(item); - } - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("WorkerPlugin", parserPlugin); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("WorkerPlugin", parserPlugin); - } - ); - } -} -module.exports = WorkerPlugin; - - -/***/ }), - -/***/ 17926: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -module.exports = expr => { - // - if ( - expr.type === "FunctionExpression" || - expr.type === "ArrowFunctionExpression" - ) { - return { - fn: expr, - expressions: [], - needThis: false - }; - } - - // .bind() - if ( - expr.type === "CallExpression" && - expr.callee.type === "MemberExpression" && - expr.callee.object.type === "FunctionExpression" && - expr.callee.property.type === "Identifier" && - expr.callee.property.name === "bind" && - expr.arguments.length === 1 - ) { - return { - fn: expr.callee.object, - expressions: [expr.arguments[0]], - needThis: undefined - }; - } - // (function(_this) {return })(this) (Coffeescript) - if ( - expr.type === "CallExpression" && - expr.callee.type === "FunctionExpression" && - expr.callee.body.type === "BlockStatement" && - expr.arguments.length === 1 && - expr.arguments[0].type === "ThisExpression" && - expr.callee.body.body && - expr.callee.body.body.length === 1 && - expr.callee.body.body[0].type === "ReturnStatement" && - expr.callee.body.body[0].argument && - expr.callee.body.body[0].argument.type === "FunctionExpression" - ) { - return { - fn: expr.callee.body.body[0].argument, - expressions: [], - needThis: true - }; - } -}; - - -/***/ }), - -/***/ 14666: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { UsageState } = __webpack_require__(13168); - -/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @param {RuntimeSpec} runtime the runtime - * @param {string[][]} referencedExports list of referenced exports, will be added to - * @param {string[]} prefix export prefix - * @param {ExportInfo=} exportInfo the export info - * @param {boolean} defaultPointsToSelf when true, using default will reference itself - * @param {Set} alreadyVisited already visited export info (to handle circular reexports) - */ -const processExportInfo = ( - runtime, - referencedExports, - prefix, - exportInfo, - defaultPointsToSelf = false, - alreadyVisited = new Set() -) => { - if (!exportInfo) { - referencedExports.push(prefix); - return; - } - const used = exportInfo.getUsed(runtime); - if (used === UsageState.Unused) return; - if (alreadyVisited.has(exportInfo)) { - referencedExports.push(prefix); - return; - } - alreadyVisited.add(exportInfo); - if ( - used !== UsageState.OnlyPropertiesUsed || - !exportInfo.exportsInfo || - exportInfo.exportsInfo.otherExportsInfo.getUsed(runtime) !== - UsageState.Unused - ) { - alreadyVisited.delete(exportInfo); - referencedExports.push(prefix); - return; - } - const exportsInfo = exportInfo.exportsInfo; - for (const exportInfo of exportsInfo.orderedExports) { - processExportInfo( - runtime, - referencedExports, - defaultPointsToSelf && exportInfo.name === "default" - ? prefix - : prefix.concat(exportInfo.name), - exportInfo, - false, - alreadyVisited - ); - } - alreadyVisited.delete(exportInfo); -}; -module.exports = processExportInfo; - - -/***/ }), - -/***/ 83290: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ExternalsPlugin = __webpack_require__(51562); - -/** @typedef {import("../Compiler")} Compiler */ - -class ElectronTargetPlugin { - /** - * @param {"main" | "preload" | "renderer"=} context in main, preload or renderer context? - */ - constructor(context) { - this._context = context; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - new ExternalsPlugin("node-commonjs", [ - "clipboard", - "crash-reporter", - "electron", - "ipc", - "native-image", - "original-fs", - "screen", - "shell" - ]).apply(compiler); - switch (this._context) { - case "main": - new ExternalsPlugin("node-commonjs", [ - "app", - "auto-updater", - "browser-window", - "content-tracing", - "dialog", - "global-shortcut", - "ipc-main", - "menu", - "menu-item", - "power-monitor", - "power-save-blocker", - "protocol", - "session", - "tray", - "web-contents" - ]).apply(compiler); - break; - case "preload": - case "renderer": - new ExternalsPlugin("node-commonjs", [ - "desktop-capturer", - "ipc-renderer", - "remote", - "web-frame" - ]).apply(compiler); - break; - } - } -} - -module.exports = ElectronTargetPlugin; - - -/***/ }), - -/***/ 55774: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("../Module")} Module */ - -class BuildCycleError extends WebpackError { - /** - * Creates an instance of ModuleDependencyError. - * @param {Module} module the module starting the cycle - */ - constructor(module) { - super( - "There is a circular build dependency, which makes it impossible to create this module" - ); - - this.name = "BuildCycleError"; - this.module = module; - } -} - -module.exports = BuildCycleError; - - -/***/ }), - -/***/ 71083: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeModule = __webpack_require__(93496); - -class ExportWebpackRequireRuntimeModule extends RuntimeModule { - constructor() { - super("export webpack runtime", RuntimeModule.STAGE_ATTACH); - } - - /** - * @returns {boolean} true, if the runtime module should get it's own scope - */ - shouldIsolate() { - return false; - } - - /** - * @returns {string} runtime code - */ - generate() { - return "export default __webpack_require__;"; - } -} - -module.exports = ExportWebpackRequireRuntimeModule; - - -/***/ }), - -/***/ 94270: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const { RuntimeGlobals } = __webpack_require__(13733); -const HotUpdateChunk = __webpack_require__(23834); -const Template = __webpack_require__(43841); -const { getAllChunks } = __webpack_require__(5575); -const { - getCompilationHooks, - getChunkFilenameTemplate -} = __webpack_require__(36109); -const { updateHashForEntryStartup } = __webpack_require__(82695); - -/** @typedef {import("../Compiler")} Compiler */ - -class ModuleChunkFormatPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "ModuleChunkFormatPlugin", - compilation => { - compilation.hooks.additionalChunkRuntimeRequirements.tap( - "ModuleChunkFormatPlugin", - (chunk, set) => { - if (chunk.hasRuntime()) return; - if (compilation.chunkGraph.getNumberOfEntryModules(chunk) > 0) { - set.add(RuntimeGlobals.require); - set.add(RuntimeGlobals.startupEntrypoint); - set.add(RuntimeGlobals.externalInstallChunk); - } - } - ); - const hooks = getCompilationHooks(compilation); - hooks.renderChunk.tap( - "ModuleChunkFormatPlugin", - (modules, renderContext) => { - const { chunk, chunkGraph, runtimeTemplate } = renderContext; - const hotUpdateChunk = - chunk instanceof HotUpdateChunk ? chunk : null; - const source = new ConcatSource(); - if (hotUpdateChunk) { - throw new Error( - "HMR is not implemented for module chunk format yet" - ); - } else { - source.add(`export const id = ${JSON.stringify(chunk.id)};\n`); - source.add(`export const ids = ${JSON.stringify(chunk.ids)};\n`); - source.add(`export const modules = `); - source.add(modules); - source.add(`;\n`); - const runtimeModules = - chunkGraph.getChunkRuntimeModulesInOrder(chunk); - if (runtimeModules.length > 0) { - source.add("export const runtime =\n"); - source.add( - Template.renderChunkRuntimeModules( - runtimeModules, - renderContext - ) - ); - } - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - if (entries.length > 0) { - const runtimeChunk = entries[0][1].getRuntimeChunk(); - const currentOutputName = compilation - .getPath( - getChunkFilenameTemplate(chunk, compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ) - .split("/"); - - // remove filename, we only need the directory - currentOutputName.pop(); - - const getRelativePath = chunk => { - const baseOutputName = currentOutputName.slice(); - const chunkOutputName = compilation - .getPath( - getChunkFilenameTemplate( - chunk, - compilation.outputOptions - ), - { - chunk: chunk, - contentHashType: "javascript" - } - ) - .split("/"); - - // remove common parts - while ( - baseOutputName.length > 0 && - chunkOutputName.length > 0 && - baseOutputName[0] === chunkOutputName[0] - ) { - baseOutputName.shift(); - chunkOutputName.shift(); - } - // create final path - return ( - (baseOutputName.length > 0 - ? "../".repeat(baseOutputName.length) - : "./") + chunkOutputName.join("/") - ); - }; - - const entrySource = new ConcatSource(); - entrySource.add(source); - entrySource.add(";\n\n// load runtime\n"); - entrySource.add( - `import __webpack_require__ from ${JSON.stringify( - getRelativePath(runtimeChunk) - )};\n` - ); - - const startupSource = new ConcatSource(); - startupSource.add( - `var __webpack_exec__ = ${runtimeTemplate.returningFunction( - `__webpack_require__(${RuntimeGlobals.entryModuleId} = moduleId)`, - "moduleId" - )}\n` - ); - - const loadedChunks = new Set(); - let index = 0; - for (let i = 0; i < entries.length; i++) { - const [module, entrypoint] = entries[i]; - const final = i + 1 === entries.length; - const moduleId = chunkGraph.getModuleId(module); - const chunks = getAllChunks( - entrypoint, - runtimeChunk, - undefined - ); - for (const chunk of chunks) { - if (loadedChunks.has(chunk)) continue; - loadedChunks.add(chunk); - startupSource.add( - `import * as __webpack_chunk_${index}__ from ${JSON.stringify( - getRelativePath(chunk) - )};\n` - ); - startupSource.add( - `${RuntimeGlobals.externalInstallChunk}(__webpack_chunk_${index}__);\n` - ); - index++; - } - startupSource.add( - `${ - final ? "var __webpack_exports__ = " : "" - }__webpack_exec__(${JSON.stringify(moduleId)});\n` - ); - } - - entrySource.add( - hooks.renderStartup.call( - startupSource, - entries[entries.length - 1][0], - { - ...renderContext, - inlined: false - } - ) - ); - return entrySource; - } - } - return source; - } - ); - hooks.chunkHash.tap( - "ModuleChunkFormatPlugin", - (chunk, hash, { chunkGraph, runtimeTemplate }) => { - if (chunk.hasRuntime()) return; - hash.update("ModuleChunkFormatPlugin"); - hash.update("1"); - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - updateHashForEntryStartup(hash, chunkGraph, entries, chunk); - } - ); - } - ); - } -} - -module.exports = ModuleChunkFormatPlugin; - - -/***/ }), - -/***/ 94603: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const ExportWebpackRequireRuntimeModule = __webpack_require__(71083); -const ModuleChunkLoadingRuntimeModule = __webpack_require__(95365); - -/** @typedef {import("../Compiler")} Compiler */ - -class ModuleChunkLoadingPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "ModuleChunkLoadingPlugin", - compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === "import"; - }; - const onceForChunkSet = new WeakSet(); - const handler = (chunk, set) => { - if (onceForChunkSet.has(chunk)) return; - onceForChunkSet.add(chunk); - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.hasOwnProperty); - compilation.addRuntimeModule( - chunk, - new ModuleChunkLoadingRuntimeModule(set) - ); - }; - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ModuleChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.baseURI) - .tap("ModuleChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.externalInstallChunk) - .tap("ModuleChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.onChunksLoaded) - .tap("ModuleChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.externalInstallChunk) - .tap("ModuleChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - compilation.addRuntimeModule( - chunk, - new ExportWebpackRequireRuntimeModule() - ); - }); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ModuleChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.getChunkScriptFilename); - }); - } - ); - } -} - -module.exports = ModuleChunkLoadingPlugin; - - -/***/ }), - -/***/ 95365: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - getChunkFilenameTemplate, - chunkHasJs -} = __webpack_require__(36109); -const { getInitialChunkIds } = __webpack_require__(82695); -const compileBooleanMatcher = __webpack_require__(73897); -const { getUndoPath } = __webpack_require__(20162); - -/** @typedef {import("../Chunk")} Chunk */ - -/** - * @typedef {Object} JsonpCompilationPluginHooks - * @property {SyncWaterfallHook<[string, Chunk]>} linkPreload - * @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class ModuleChunkLoadingRuntimeModule extends RuntimeModule { - /** - * @param {Compilation} compilation the compilation - * @returns {JsonpCompilationPluginHooks} hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - linkPreload: new SyncWaterfallHook(["source", "chunk"]), - linkPrefetch: new SyncWaterfallHook(["source", "chunk"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor(runtimeRequirements) { - super("import chunk loading", RuntimeModule.STAGE_ATTACH); - this._runtimeRequirements = runtimeRequirements; - } - - /** - * @private - * @param {Chunk} chunk chunk - * @param {string} rootOutputDir root output directory - * @returns {string} generated code - */ - _generateBaseUri(chunk, rootOutputDir) { - const options = chunk.getEntryOptions(); - if (options && options.baseUri) { - return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`; - } - const { - compilation: { - outputOptions: { importMetaName } - } - } = this; - return `${RuntimeGlobals.baseURI} = new URL(${JSON.stringify( - rootOutputDir - )}, ${importMetaName}.url);`; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunk, chunkGraph } = this; - const { - runtimeTemplate, - outputOptions: { importFunctionName } - } = compilation; - const fn = RuntimeGlobals.ensureChunkHandlers; - const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI); - const withExternalInstallChunk = this._runtimeRequirements.has( - RuntimeGlobals.externalInstallChunk - ); - const withLoading = this._runtimeRequirements.has( - RuntimeGlobals.ensureChunkHandlers - ); - const withOnChunkLoad = this._runtimeRequirements.has( - RuntimeGlobals.onChunksLoaded - ); - const withHmr = this._runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs); - const hasJsMatcher = compileBooleanMatcher(conditionMap); - const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs); - - const outputName = this.compilation.getPath( - getChunkFilenameTemplate(chunk, this.compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ); - const rootOutputDir = getUndoPath( - outputName, - this.compilation.outputOptions.path, - true - ); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_module` - : undefined; - - return Template.asString([ - withBaseURI - ? this._generateBaseUri(chunk, rootOutputDir) - : "// no baseURI", - "", - "// object to store loaded and loading chunks", - "// undefined = chunk not loaded, null = chunk preloaded/prefetched", - "// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded", - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{`, - Template.indent( - Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 0`).join( - ",\n" - ) - ), - "};", - "", - withLoading || withExternalInstallChunk - ? `var installChunk = ${runtimeTemplate.basicFunction("data", [ - runtimeTemplate.destructureObject( - ["ids", "modules", "runtime"], - "data" - ), - '// add "modules" to the modules object,', - '// then flag all "ids" as loaded and fire callback', - "var moduleId, chunkId, i = 0;", - "for(moduleId in modules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(modules, moduleId)) {`, - Template.indent( - `${RuntimeGlobals.moduleFactories}[moduleId] = modules[moduleId];` - ), - "}" - ]), - "}", - "if(runtime) runtime(__webpack_require__);", - "for(;i < ids.length; i++) {", - Template.indent([ - "chunkId = ids[i];", - `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`, - Template.indent("installedChunks[chunkId][0]();"), - "}", - "installedChunks[ids[i]] = 0;" - ]), - "}", - withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : "" - ])}` - : "// no install chunk", - "", - withLoading - ? Template.asString([ - `${fn}.j = ${runtimeTemplate.basicFunction( - "chunkId, promises", - hasJsMatcher !== false - ? Template.indent([ - "// import() chunk loading for javascript", - `var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`, - 'if(installedChunkData !== 0) { // 0 means "already installed".', - Template.indent([ - "", - '// a Promise means "currently loading".', - "if(installedChunkData) {", - Template.indent([ - "promises.push(installedChunkData[1]);" - ]), - "} else {", - Template.indent([ - hasJsMatcher === true - ? "if(true) { // all chunks have JS" - : `if(${hasJsMatcher("chunkId")}) {`, - Template.indent([ - "// setup Promise in chunk cache", - `var promise = ${importFunctionName}(${JSON.stringify( - rootOutputDir - )} + ${ - RuntimeGlobals.getChunkScriptFilename - }(chunkId)).then(installChunk, ${runtimeTemplate.basicFunction( - "e", - [ - "if(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;", - "throw e;" - ] - )});`, - `var promise = Promise.race([promise, new Promise(${runtimeTemplate.expressionFunction( - `installedChunkData = installedChunks[chunkId] = [resolve]`, - "resolve" - )})])`, - `promises.push(installedChunkData[1] = promise);` - ]), - "} else installedChunks[chunkId] = 0;" - ]), - "}" - ]), - "}" - ]) - : Template.indent(["installedChunks[chunkId] = 0;"]) - )};` - ]) - : "// no chunk on demand loading", - "", - withExternalInstallChunk - ? Template.asString([ - `${RuntimeGlobals.externalInstallChunk} = installChunk;` - ]) - : "// no external install chunk", - "", - withOnChunkLoad - ? `${ - RuntimeGlobals.onChunksLoaded - }.j = ${runtimeTemplate.returningFunction( - "installedChunks[chunkId] === 0", - "chunkId" - )};` - : "// no on chunks loaded" - ]); - } -} - -module.exports = ModuleChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 24014: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Dependency").SourcePosition} SourcePosition */ - -/** - * @param {SourcePosition} pos position - * @returns {string} formatted position - */ -const formatPosition = pos => { - if (pos && typeof pos === "object") { - if ("line" in pos && "column" in pos) { - return `${pos.line}:${pos.column}`; - } else if ("line" in pos) { - return `${pos.line}:?`; - } - } - return ""; -}; - -/** - * @param {DependencyLocation} loc location - * @returns {string} formatted location - */ -const formatLocation = loc => { - if (loc && typeof loc === "object") { - if ("start" in loc && loc.start && "end" in loc && loc.end) { - if ( - typeof loc.start === "object" && - typeof loc.start.line === "number" && - typeof loc.end === "object" && - typeof loc.end.line === "number" && - typeof loc.end.column === "number" && - loc.start.line === loc.end.line - ) { - return `${formatPosition(loc.start)}-${loc.end.column}`; - } else if ( - typeof loc.start === "object" && - typeof loc.start.line === "number" && - typeof loc.start.column !== "number" && - typeof loc.end === "object" && - typeof loc.end.line === "number" && - typeof loc.end.column !== "number" - ) { - return `${loc.start.line}-${loc.end.line}`; - } else { - return `${formatPosition(loc.start)}-${formatPosition(loc.end)}`; - } - } - if ("start" in loc && loc.start) { - return formatPosition(loc.start); - } - if ("name" in loc && "index" in loc) { - return `${loc.name}[${loc.index}]`; - } - if ("name" in loc) { - return loc.name; - } - } - return ""; -}; - -module.exports = formatLocation; - - -/***/ }), - -/***/ 37658: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class HotModuleReplacementRuntimeModule extends RuntimeModule { - constructor() { - super("hot module replacement", RuntimeModule.STAGE_BASIC); - } - /** - * @returns {string} runtime code - */ - generate() { - return Template.getFunctionContent( - require('./HotModuleReplacement.runtime.js') - ) - .replace(/\$getFullHash\$/g, RuntimeGlobals.getFullHash) - .replace( - /\$interceptModuleExecution\$/g, - RuntimeGlobals.interceptModuleExecution - ) - .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) - .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) - .replace(/\$hmrDownloadManifest\$/g, RuntimeGlobals.hmrDownloadManifest) - .replace( - /\$hmrInvalidateModuleHandlers\$/g, - RuntimeGlobals.hmrInvalidateModuleHandlers - ) - .replace( - /\$hmrDownloadUpdateHandlers\$/g, - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - } -} - -module.exports = HotModuleReplacementRuntimeModule; - - -/***/ }), - -/***/ 94798: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const AsyncDependenciesBlock = __webpack_require__(42290); -const Dependency = __webpack_require__(87056); -const Module = __webpack_require__(53840); -const ModuleFactory = __webpack_require__(39744); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const CommonJsRequireDependency = __webpack_require__(90345); -const { registerNotSerializable } = __webpack_require__(7591); - -/** @typedef {import("../../declarations/WebpackOptions")} WebpackOptions */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../Module").BuildMeta} BuildMeta */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../dependencies/HarmonyImportDependency")} HarmonyImportDependency */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -/** - * @typedef {Object} BackendApi - * @property {function(Error=): void} dispose - * @property {function(Module): { client: string, data: string, active: boolean }} module - */ - -const HMR_DEPENDENCY_TYPES = new Set([ - "import.meta.webpackHot.accept", - "import.meta.webpackHot.decline", - "module.hot.accept", - "module.hot.decline" -]); - -/** - * @param {undefined|string|RegExp|Function} test test option - * @param {Module} module the module - * @returns {boolean} true, if the module should be selected - */ -const checkTest = (test, module) => { - if (test === undefined) return true; - if (typeof test === "function") { - return test(module); - } - if (typeof test === "string") { - const name = module.nameForCondition(); - return name && name.startsWith(test); - } - if (test instanceof RegExp) { - const name = module.nameForCondition(); - return name && test.test(name); - } - return false; -}; - -const TYPES = new Set(["javascript"]); - -class LazyCompilationDependency extends Dependency { - constructor(proxyModule) { - super(); - this.proxyModule = proxyModule; - } - - get category() { - return "esm"; - } - - get type() { - return "lazy import()"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return this.proxyModule.originalModule.identifier(); - } -} - -registerNotSerializable(LazyCompilationDependency); - -class LazyCompilationProxyModule extends Module { - constructor(context, originalModule, request, client, data, active) { - super("lazy-compilation-proxy", context, originalModule.layer); - this.originalModule = originalModule; - this.request = request; - this.client = client; - this.data = data; - this.active = active; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `lazy-compilation-proxy|${this.originalModule.identifier()}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `lazy-compilation-proxy ${this.originalModule.readableIdentifier( - requestShortener - )}`; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - super.updateCacheModule(module); - const m = /** @type {LazyCompilationProxyModule} */ (module); - this.originalModule = m.originalModule; - this.request = m.request; - this.client = m.client; - this.data = m.data; - this.active = m.active; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return `${this.originalModule.libIdent(options)}!lazy-compilation-proxy`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback(null, !this.buildInfo || this.buildInfo.active !== this.active); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildInfo = { - active: this.active - }; - /** @type {BuildMeta} */ - this.buildMeta = {}; - this.clearDependenciesAndBlocks(); - const dep = new CommonJsRequireDependency(this.client); - this.addDependency(dep); - if (this.active) { - const dep = new LazyCompilationDependency(this); - const block = new AsyncDependenciesBlock({}); - block.addDependency(dep); - this.addBlock(block); - } - callback(); - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 200; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ runtimeTemplate, chunkGraph, moduleGraph }) { - const sources = new Map(); - const runtimeRequirements = new Set(); - runtimeRequirements.add(RuntimeGlobals.module); - const clientDep = /** @type {CommonJsRequireDependency} */ ( - this.dependencies[0] - ); - const clientModule = moduleGraph.getModule(clientDep); - const block = this.blocks[0]; - const client = Template.asString([ - `var client = ${runtimeTemplate.moduleExports({ - module: clientModule, - chunkGraph, - request: clientDep.userRequest, - runtimeRequirements - })}`, - `var data = ${JSON.stringify(this.data)};` - ]); - const keepActive = Template.asString([ - `var dispose = client.keepAlive({ data: data, active: ${JSON.stringify( - !!block - )}, module: module, onError: onError });` - ]); - let source; - if (block) { - const dep = block.dependencies[0]; - const module = moduleGraph.getModule(dep); - source = Template.asString([ - client, - `module.exports = ${runtimeTemplate.moduleNamespacePromise({ - chunkGraph, - block, - module, - request: this.request, - strict: false, // TODO this should be inherited from the original module - message: "import()", - runtimeRequirements - })};`, - "if (module.hot) {", - Template.indent([ - "module.hot.accept();", - `module.hot.accept(${JSON.stringify( - chunkGraph.getModuleId(module) - )}, function() { module.hot.invalidate(); });`, - "module.hot.dispose(function(data) { delete data.resolveSelf; dispose(data); });", - "if (module.hot.data && module.hot.data.resolveSelf) module.hot.data.resolveSelf(module.exports);" - ]), - "}", - "function onError() { /* ignore */ }", - keepActive - ]); - } else { - source = Template.asString([ - client, - "var resolveSelf, onError;", - `module.exports = new Promise(function(resolve, reject) { resolveSelf = resolve; onError = reject; });`, - "if (module.hot) {", - Template.indent([ - "module.hot.accept();", - "if (module.hot.data && module.hot.data.resolveSelf) module.hot.data.resolveSelf(module.exports);", - "module.hot.dispose(function(data) { data.resolveSelf = resolveSelf; dispose(data); });" - ]), - "}", - keepActive - ]); - } - sources.set("javascript", new RawSource(source)); - return { - sources, - runtimeRequirements - }; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - super.updateHash(hash, context); - hash.update(this.active ? "active" : ""); - hash.update(JSON.stringify(this.data)); - } -} - -registerNotSerializable(LazyCompilationProxyModule); - -class LazyCompilationDependencyFactory extends ModuleFactory { - constructor(factory) { - super(); - this._factory = factory; - } - - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const dependency = /** @type {LazyCompilationDependency} */ ( - data.dependencies[0] - ); - callback(null, { - module: dependency.proxyModule.originalModule - }); - } -} - -class LazyCompilationPlugin { - /** - * @param {Object} options options - * @param {(function(Compiler, function(Error?, BackendApi?): void): void) | function(Compiler): Promise} options.backend the backend - * @param {boolean} options.entries true, when entries are lazy compiled - * @param {boolean} options.imports true, when import() modules are lazy compiled - * @param {RegExp | string | (function(Module): boolean)} options.test additional filter for lazy compiled entrypoint modules - */ - constructor({ backend, entries, imports, test }) { - this.backend = backend; - this.entries = entries; - this.imports = imports; - this.test = test; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - let backend; - compiler.hooks.beforeCompile.tapAsync( - "LazyCompilationPlugin", - (params, callback) => { - if (backend !== undefined) return callback(); - const promise = this.backend(compiler, (err, result) => { - if (err) return callback(err); - backend = result; - callback(); - }); - if (promise && promise.then) { - promise.then(b => { - backend = b; - callback(); - }, callback); - } - } - ); - compiler.hooks.thisCompilation.tap( - "LazyCompilationPlugin", - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.module.tap( - "LazyCompilationPlugin", - (originalModule, createData, resolveData) => { - if ( - resolveData.dependencies.every(dep => - HMR_DEPENDENCY_TYPES.has(dep.type) - ) - ) { - // for HMR only resolving, try to determine if the HMR accept/decline refers to - // an import() or not - const hmrDep = resolveData.dependencies[0]; - const originModule = - compilation.moduleGraph.getParentModule(hmrDep); - const isReferringToDynamicImport = originModule.blocks.some( - block => - block.dependencies.some( - dep => - dep.type === "import()" && - /** @type {HarmonyImportDependency} */ (dep).request === - hmrDep.request - ) - ); - if (!isReferringToDynamicImport) return; - } else if ( - !resolveData.dependencies.every( - dep => - HMR_DEPENDENCY_TYPES.has(dep.type) || - (this.imports && - (dep.type === "import()" || - dep.type === "import() context element")) || - (this.entries && dep.type === "entry") - ) - ) - return; - if ( - /webpack[/\\]hot[/\\]|webpack-dev-server[/\\]client|webpack-hot-middleware[/\\]client/.test( - resolveData.request - ) || - !checkTest(this.test, originalModule) - ) - return; - const moduleInfo = backend.module(originalModule); - if (!moduleInfo) return; - const { client, data, active } = moduleInfo; - - return new LazyCompilationProxyModule( - compiler.context, - originalModule, - resolveData.request, - client, - data, - active - ); - } - ); - compilation.dependencyFactories.set( - LazyCompilationDependency, - new LazyCompilationDependencyFactory() - ); - } - ); - compiler.hooks.shutdown.tapAsync("LazyCompilationPlugin", callback => { - backend.dispose(callback); - }); - } -} - -module.exports = LazyCompilationPlugin; - - -/***/ }), - -/***/ 10867: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("http").ServerOptions} HttpServerOptions */ -/** @typedef {import("https").ServerOptions} HttpsServerOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LazyCompilationDefaultBackendOptions} LazyCompilationDefaultBackendOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -/** - * @callback BackendHandler - * @param {Compiler} compiler compiler - * @param {function((Error | null)=, any=): void} callback callback - * @returns {void} - */ - -/** - * @param {Omit & { client: NonNullable}} options additional options for the backend - * @returns {BackendHandler} backend - */ -module.exports = options => (compiler, callback) => { - const logger = compiler.getInfrastructureLogger("LazyCompilationBackend"); - const activeModules = new Map(); - const prefix = "/lazy-compilation-using-"; - - const isHttps = - options.protocol === "https" || - (typeof options.server === "object" && - ("key" in options.server || "pfx" in options.server)); - - const createServer = - typeof options.server === "function" - ? options.server - : (() => { - const http = isHttps ? __webpack_require__(95687) : __webpack_require__(13685); - return http.createServer.bind(http, options.server); - })(); - const listen = - typeof options.listen === "function" - ? options.listen - : server => { - let listen = options.listen; - if (typeof listen === "object" && !("port" in listen)) - listen = { ...listen, port: undefined }; - server.listen(listen); - }; - - const protocol = options.protocol || (isHttps ? "https" : "http"); - - const requestListener = (req, res) => { - const keys = req.url.slice(prefix.length).split("@"); - req.socket.on("close", () => { - setTimeout(() => { - for (const key of keys) { - const oldValue = activeModules.get(key) || 0; - activeModules.set(key, oldValue - 1); - if (oldValue === 1) { - logger.log( - `${key} is no longer in use. Next compilation will skip this module.` - ); - } - } - }, 120000); - }); - req.socket.setNoDelay(true); - res.writeHead(200, { - "content-type": "text/event-stream", - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Methods": "*", - "Access-Control-Allow-Headers": "*" - }); - res.write("\n"); - let moduleActivated = false; - for (const key of keys) { - const oldValue = activeModules.get(key) || 0; - activeModules.set(key, oldValue + 1); - if (oldValue === 0) { - logger.log(`${key} is now in use and will be compiled.`); - moduleActivated = true; - } - } - if (moduleActivated && compiler.watching) compiler.watching.invalidate(); - }; - - const server = /** @type {import("net").Server} */ (createServer()); - server.on("request", requestListener); - - let isClosing = false; - /** @type {Set} */ - const sockets = new Set(); - server.on("connection", socket => { - sockets.add(socket); - socket.on("close", () => { - sockets.delete(socket); - }); - if (isClosing) socket.destroy(); - }); - server.on("clientError", e => { - if (e.message !== "Server is disposing") logger.warn(e); - }); - server.on("listening", err => { - if (err) return callback(err); - const addr = server.address(); - if (typeof addr === "string") throw new Error("addr must not be a string"); - const urlBase = - addr.address === "::" || addr.address === "0.0.0.0" - ? `${protocol}://localhost:${addr.port}` - : addr.family === "IPv6" - ? `${protocol}://[${addr.address}]:${addr.port}` - : `${protocol}://${addr.address}:${addr.port}`; - logger.log( - `Server-Sent-Events server for lazy compilation open at ${urlBase}.` - ); - callback(null, { - dispose(callback) { - isClosing = true; - // Removing the listener is a workaround for a memory leak in node.js - server.off("request", requestListener); - server.close(err => { - callback(err); - }); - for (const socket of sockets) { - socket.destroy(new Error("Server is disposing")); - } - }, - module(originalModule) { - const key = `${encodeURIComponent( - originalModule.identifier().replace(/\\/g, "/").replace(/@/g, "_") - ).replace(/%(2F|3A|24|26|2B|2C|3B|3D|3A)/g, decodeURIComponent)}`; - const active = activeModules.get(key) > 0; - return { - client: `${options.client}?${encodeURIComponent(urlBase + prefix)}`, - data: key, - active - }; - } - }); - }); - listen(server); -}; - - -/***/ }), - -/***/ 87352: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { find } = __webpack_require__(73268); -const { - compareModulesByPreOrderIndexOrIdentifier, - compareModulesByPostOrderIndexOrIdentifier -} = __webpack_require__(58792); - -/** @typedef {import("../Compiler")} Compiler */ - -class ChunkModuleIdRangePlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap("ChunkModuleIdRangePlugin", compilation => { - const moduleGraph = compilation.moduleGraph; - compilation.hooks.moduleIds.tap("ChunkModuleIdRangePlugin", modules => { - const chunkGraph = compilation.chunkGraph; - const chunk = find( - compilation.chunks, - chunk => chunk.name === options.name - ); - if (!chunk) { - throw new Error( - `ChunkModuleIdRangePlugin: Chunk with name '${options.name}"' was not found` - ); - } - - let chunkModules; - if (options.order) { - let cmpFn; - switch (options.order) { - case "index": - case "preOrderIndex": - cmpFn = compareModulesByPreOrderIndexOrIdentifier(moduleGraph); - break; - case "index2": - case "postOrderIndex": - cmpFn = compareModulesByPostOrderIndexOrIdentifier(moduleGraph); - break; - default: - throw new Error( - "ChunkModuleIdRangePlugin: unexpected value of order" - ); - } - chunkModules = chunkGraph.getOrderedChunkModules(chunk, cmpFn); - } else { - chunkModules = Array.from(modules) - .filter(m => { - return chunkGraph.isModuleInChunk(m, chunk); - }) - .sort(compareModulesByPreOrderIndexOrIdentifier(moduleGraph)); - } - - let currentId = options.start || 0; - for (let i = 0; i < chunkModules.length; i++) { - const m = chunkModules[i]; - if (m.needId && chunkGraph.getModuleId(m) === null) { - chunkGraph.setModuleId(m, currentId++); - } - if (options.end && currentId > options.end) break; - } - }); - }); - } -} -module.exports = ChunkModuleIdRangePlugin; - - -/***/ }), - -/***/ 6777: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const { compareChunksNatural } = __webpack_require__(58792); -const { - getFullChunkName, - getUsedChunkIds, - assignDeterministicIds -} = __webpack_require__(76283); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class DeterministicChunkIdsPlugin { - constructor(options) { - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "DeterministicChunkIdsPlugin", - compilation => { - compilation.hooks.chunkIds.tap( - "DeterministicChunkIdsPlugin", - chunks => { - const chunkGraph = compilation.chunkGraph; - const context = this.options.context - ? this.options.context - : compiler.context; - const maxLength = this.options.maxLength || 3; - - const compareNatural = compareChunksNatural(chunkGraph); - - const usedIds = getUsedChunkIds(compilation); - assignDeterministicIds( - Array.from(chunks).filter(chunk => { - return chunk.id === null; - }), - chunk => - getFullChunkName(chunk, chunkGraph, context, compiler.root), - compareNatural, - (chunk, id) => { - const size = usedIds.size; - usedIds.add(`${id}`); - if (size === usedIds.size) return false; - chunk.id = id; - chunk.ids = [id]; - return true; - }, - [Math.pow(10, maxLength)], - 10, - usedIds.size - ); - } - ); - } - ); - } -} - -module.exports = DeterministicChunkIdsPlugin; - - -/***/ }), - -/***/ 49335: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const { - compareModulesByPreOrderIndexOrIdentifier -} = __webpack_require__(58792); -const { - getUsedModuleIdsAndModules, - getFullModuleName, - assignDeterministicIds -} = __webpack_require__(76283); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class DeterministicModuleIdsPlugin { - /** - * @param {Object} options options - * @param {string=} options.context context relative to which module identifiers are computed - * @param {function(Module): boolean=} options.test selector function for modules - * @param {number=} options.maxLength maximum id length in digits (used as starting point) - * @param {number=} options.salt hash salt for ids - * @param {boolean=} options.fixedLength do not increase the maxLength to find an optimal id space size - * @param {boolean=} options.failOnConflict throw an error when id conflicts occur (instead of rehashing) - */ - constructor(options = {}) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "DeterministicModuleIdsPlugin", - compilation => { - compilation.hooks.moduleIds.tap("DeterministicModuleIdsPlugin", () => { - const chunkGraph = compilation.chunkGraph; - const context = this.options.context - ? this.options.context - : compiler.context; - const maxLength = this.options.maxLength || 3; - const failOnConflict = this.options.failOnConflict || false; - const fixedLength = this.options.fixedLength || false; - const salt = this.options.salt || 0; - let conflicts = 0; - - const [usedIds, modules] = getUsedModuleIdsAndModules( - compilation, - this.options.test - ); - assignDeterministicIds( - modules, - module => getFullModuleName(module, context, compiler.root), - failOnConflict - ? () => 0 - : compareModulesByPreOrderIndexOrIdentifier( - compilation.moduleGraph - ), - (module, id) => { - const size = usedIds.size; - usedIds.add(`${id}`); - if (size === usedIds.size) { - conflicts++; - return false; - } - chunkGraph.setModuleId(module, id); - return true; - }, - [Math.pow(10, maxLength)], - fixedLength ? 0 : 10, - usedIds.size, - salt - ); - if (failOnConflict && conflicts) - throw new Error( - `Assigning deterministic module ids has lead to ${conflicts} conflict${ - conflicts > 1 ? "s" : "" - }.\nIncrease the 'maxLength' to increase the id space and make conflicts less likely (recommended when there are many conflicts or application is expected to grow), or add an 'salt' number to try another hash starting value in the same id space (recommended when there is only a single conflict).` - ); - }); - } - ); - } -} - -module.exports = DeterministicModuleIdsPlugin; - - -/***/ }), - -/***/ 13340: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { - compareModulesByPreOrderIndexOrIdentifier -} = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const createHash = __webpack_require__(85205); -const { - getUsedModuleIdsAndModules, - getFullModuleName -} = __webpack_require__(76283); - -/** @typedef {import("../../declarations/plugins/HashedModuleIdsPlugin").HashedModuleIdsPluginOptions} HashedModuleIdsPluginOptions */ - -const validate = createSchemaValidation( - __webpack_require__(22194), - () => __webpack_require__(99422), - { - name: "Hashed Module Ids Plugin", - baseDataPath: "options" - } -); - -class HashedModuleIdsPlugin { - /** - * @param {HashedModuleIdsPluginOptions=} options options object - */ - constructor(options = {}) { - validate(options); - - /** @type {HashedModuleIdsPluginOptions} */ - this.options = { - context: null, - hashFunction: "md4", - hashDigest: "base64", - hashDigestLength: 4, - ...options - }; - } - - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap("HashedModuleIdsPlugin", compilation => { - compilation.hooks.moduleIds.tap("HashedModuleIdsPlugin", () => { - const chunkGraph = compilation.chunkGraph; - const context = this.options.context - ? this.options.context - : compiler.context; - - const [usedIds, modules] = getUsedModuleIdsAndModules(compilation); - const modulesInNaturalOrder = modules.sort( - compareModulesByPreOrderIndexOrIdentifier(compilation.moduleGraph) - ); - for (const module of modulesInNaturalOrder) { - const ident = getFullModuleName(module, context, compiler.root); - const hash = createHash(options.hashFunction); - hash.update(ident || ""); - const hashId = /** @type {string} */ ( - hash.digest(options.hashDigest) - ); - let len = options.hashDigestLength; - while (usedIds.has(hashId.slice(0, len))) len++; - const moduleId = hashId.slice(0, len); - chunkGraph.setModuleId(module, moduleId); - usedIds.add(moduleId); - } - }); - }); - } -} - -module.exports = HashedModuleIdsPlugin; - - -/***/ }), - -/***/ 76283: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const createHash = __webpack_require__(85205); -const { makePathsRelative } = __webpack_require__(20162); -const numberHash = __webpack_require__(49167); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module")} Module */ -/** @typedef {typeof import("../util/Hash")} Hash */ - -/** - * @param {string} str string to hash - * @param {number} len max length of the hash - * @param {string | Hash} hashFunction hash function to use - * @returns {string} hash - */ -const getHash = (str, len, hashFunction) => { - const hash = createHash(hashFunction); - hash.update(str); - const digest = /** @type {string} */ (hash.digest("hex")); - return digest.slice(0, len); -}; - -/** - * @param {string} str the string - * @returns {string} string prefixed by an underscore if it is a number - */ -const avoidNumber = str => { - // max length of a number is 21 chars, bigger numbers a written as "...e+xx" - if (str.length > 21) return str; - const firstChar = str.charCodeAt(0); - // skip everything that doesn't look like a number - // charCodes: "-": 45, "1": 49, "9": 57 - if (firstChar < 49) { - if (firstChar !== 45) return str; - } else if (firstChar > 57) { - return str; - } - if (str === +str + "") { - return `_${str}`; - } - return str; -}; - -/** - * @param {string} request the request - * @returns {string} id representation - */ -const requestToId = request => { - return request - .replace(/^(\.\.?\/)+/, "") - .replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_"); -}; -exports.requestToId = requestToId; - -/** - * @param {string} string the string - * @param {string} delimiter separator for string and hash - * @param {string | Hash} hashFunction hash function to use - * @returns {string} string with limited max length to 100 chars - */ -const shortenLongString = (string, delimiter, hashFunction) => { - if (string.length < 100) return string; - return ( - string.slice(0, 100 - 6 - delimiter.length) + - delimiter + - getHash(string, 6, hashFunction) - ); -}; - -/** - * @param {Module} module the module - * @param {string} context context directory - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} short module name - */ -const getShortModuleName = (module, context, associatedObjectForCache) => { - const libIdent = module.libIdent({ context, associatedObjectForCache }); - if (libIdent) return avoidNumber(libIdent); - const nameForCondition = module.nameForCondition(); - if (nameForCondition) - return avoidNumber( - makePathsRelative(context, nameForCondition, associatedObjectForCache) - ); - return ""; -}; -exports.getShortModuleName = getShortModuleName; - -/** - * @param {string} shortName the short name - * @param {Module} module the module - * @param {string} context context directory - * @param {string | Hash} hashFunction hash function to use - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} long module name - */ -const getLongModuleName = ( - shortName, - module, - context, - hashFunction, - associatedObjectForCache -) => { - const fullName = getFullModuleName(module, context, associatedObjectForCache); - return `${shortName}?${getHash(fullName, 4, hashFunction)}`; -}; -exports.getLongModuleName = getLongModuleName; - -/** - * @param {Module} module the module - * @param {string} context context directory - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} full module name - */ -const getFullModuleName = (module, context, associatedObjectForCache) => { - return makePathsRelative( - context, - module.identifier(), - associatedObjectForCache - ); -}; -exports.getFullModuleName = getFullModuleName; - -/** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {string} context context directory - * @param {string} delimiter delimiter for names - * @param {string | Hash} hashFunction hash function to use - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} short chunk name - */ -const getShortChunkName = ( - chunk, - chunkGraph, - context, - delimiter, - hashFunction, - associatedObjectForCache -) => { - const modules = chunkGraph.getChunkRootModules(chunk); - const shortModuleNames = modules.map(m => - requestToId(getShortModuleName(m, context, associatedObjectForCache)) - ); - chunk.idNameHints.sort(); - const chunkName = Array.from(chunk.idNameHints) - .concat(shortModuleNames) - .filter(Boolean) - .join(delimiter); - return shortenLongString(chunkName, delimiter, hashFunction); -}; -exports.getShortChunkName = getShortChunkName; - -/** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {string} context context directory - * @param {string} delimiter delimiter for names - * @param {string | Hash} hashFunction hash function to use - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} short chunk name - */ -const getLongChunkName = ( - chunk, - chunkGraph, - context, - delimiter, - hashFunction, - associatedObjectForCache -) => { - const modules = chunkGraph.getChunkRootModules(chunk); - const shortModuleNames = modules.map(m => - requestToId(getShortModuleName(m, context, associatedObjectForCache)) - ); - const longModuleNames = modules.map(m => - requestToId( - getLongModuleName("", m, context, hashFunction, associatedObjectForCache) - ) - ); - chunk.idNameHints.sort(); - const chunkName = Array.from(chunk.idNameHints) - .concat(shortModuleNames, longModuleNames) - .filter(Boolean) - .join(delimiter); - return shortenLongString(chunkName, delimiter, hashFunction); -}; -exports.getLongChunkName = getLongChunkName; - -/** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {string} context context directory - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} full chunk name - */ -const getFullChunkName = ( - chunk, - chunkGraph, - context, - associatedObjectForCache -) => { - if (chunk.name) return chunk.name; - const modules = chunkGraph.getChunkRootModules(chunk); - const fullModuleNames = modules.map(m => - makePathsRelative(context, m.identifier(), associatedObjectForCache) - ); - return fullModuleNames.join(); -}; -exports.getFullChunkName = getFullChunkName; - -/** - * @template K - * @template V - * @param {Map} map a map from key to values - * @param {K} key key - * @param {V} value value - * @returns {void} - */ -const addToMapOfItems = (map, key, value) => { - let array = map.get(key); - if (array === undefined) { - array = []; - map.set(key, array); - } - array.push(value); -}; - -/** - * @param {Compilation} compilation the compilation - * @param {function(Module): boolean=} filter filter modules - * @returns {[Set, Module[]]} used module ids as strings and modules without id matching the filter - */ -const getUsedModuleIdsAndModules = (compilation, filter) => { - const chunkGraph = compilation.chunkGraph; - - const modules = []; - - /** @type {Set} */ - const usedIds = new Set(); - if (compilation.usedModuleIds) { - for (const id of compilation.usedModuleIds) { - usedIds.add(id + ""); - } - } - - for (const module of compilation.modules) { - if (!module.needId) continue; - const moduleId = chunkGraph.getModuleId(module); - if (moduleId !== null) { - usedIds.add(moduleId + ""); - } else { - if ( - (!filter || filter(module)) && - chunkGraph.getNumberOfModuleChunks(module) !== 0 - ) { - modules.push(module); - } - } - } - - return [usedIds, modules]; -}; -exports.getUsedModuleIdsAndModules = getUsedModuleIdsAndModules; - -/** - * @param {Compilation} compilation the compilation - * @returns {Set} used chunk ids as strings - */ -const getUsedChunkIds = compilation => { - /** @type {Set} */ - const usedIds = new Set(); - if (compilation.usedChunkIds) { - for (const id of compilation.usedChunkIds) { - usedIds.add(id + ""); - } - } - - for (const chunk of compilation.chunks) { - const chunkId = chunk.id; - if (chunkId !== null) { - usedIds.add(chunkId + ""); - } - } - - return usedIds; -}; -exports.getUsedChunkIds = getUsedChunkIds; - -/** - * @template T - * @param {Iterable} items list of items to be named - * @param {function(T): string} getShortName get a short name for an item - * @param {function(T, string): string} getLongName get a long name for an item - * @param {function(T, T): -1|0|1} comparator order of items - * @param {Set} usedIds already used ids, will not be assigned - * @param {function(T, string): void} assignName assign a name to an item - * @returns {T[]} list of items without a name - */ -const assignNames = ( - items, - getShortName, - getLongName, - comparator, - usedIds, - assignName -) => { - /** @type {Map} */ - const nameToItems = new Map(); - - for (const item of items) { - const name = getShortName(item); - addToMapOfItems(nameToItems, name, item); - } - - /** @type {Map} */ - const nameToItems2 = new Map(); - - for (const [name, items] of nameToItems) { - if (items.length > 1 || !name) { - for (const item of items) { - const longName = getLongName(item, name); - addToMapOfItems(nameToItems2, longName, item); - } - } else { - addToMapOfItems(nameToItems2, name, items[0]); - } - } - - /** @type {T[]} */ - const unnamedItems = []; - - for (const [name, items] of nameToItems2) { - if (!name) { - for (const item of items) { - unnamedItems.push(item); - } - } else if (items.length === 1 && !usedIds.has(name)) { - assignName(items[0], name); - usedIds.add(name); - } else { - items.sort(comparator); - let i = 0; - for (const item of items) { - while (nameToItems2.has(name + i) && usedIds.has(name + i)) i++; - assignName(item, name + i); - usedIds.add(name + i); - i++; - } - } - } - - unnamedItems.sort(comparator); - return unnamedItems; -}; -exports.assignNames = assignNames; - -/** - * @template T - * @param {T[]} items list of items to be named - * @param {function(T): string} getName get a name for an item - * @param {function(T, T): -1|0|1} comparator order of items - * @param {function(T, number): boolean} assignId assign an id to an item - * @param {number[]} ranges usable ranges for ids - * @param {number} expandFactor factor to create more ranges - * @param {number} extraSpace extra space to allocate, i. e. when some ids are already used - * @param {number} salt salting number to initialize hashing - * @returns {void} - */ -const assignDeterministicIds = ( - items, - getName, - comparator, - assignId, - ranges = [10], - expandFactor = 10, - extraSpace = 0, - salt = 0 -) => { - items.sort(comparator); - - // max 5% fill rate - const optimalRange = Math.min( - Math.ceil(items.length * 20) + extraSpace, - Number.MAX_SAFE_INTEGER - ); - - let i = 0; - let range = ranges[i]; - while (range < optimalRange) { - i++; - if (i < ranges.length) { - range = Math.min(ranges[i], Number.MAX_SAFE_INTEGER); - } else if (expandFactor) { - range = Math.min(range * expandFactor, Number.MAX_SAFE_INTEGER); - } else { - break; - } - } - - for (const item of items) { - const ident = getName(item); - let id; - let i = salt; - do { - id = numberHash(ident + i++, range); - } while (!assignId(item, id)); - } -}; -exports.assignDeterministicIds = assignDeterministicIds; - -/** - * @param {Set} usedIds used ids - * @param {Iterable} modules the modules - * @param {Compilation} compilation the compilation - * @returns {void} - */ -const assignAscendingModuleIds = (usedIds, modules, compilation) => { - const chunkGraph = compilation.chunkGraph; - - let nextId = 0; - let assignId; - if (usedIds.size > 0) { - assignId = module => { - if (chunkGraph.getModuleId(module) === null) { - while (usedIds.has(nextId + "")) nextId++; - chunkGraph.setModuleId(module, nextId++); - } - }; - } else { - assignId = module => { - if (chunkGraph.getModuleId(module) === null) { - chunkGraph.setModuleId(module, nextId++); - } - }; - } - for (const module of modules) { - assignId(module); - } -}; -exports.assignAscendingModuleIds = assignAscendingModuleIds; - -/** - * @param {Iterable} chunks the chunks - * @param {Compilation} compilation the compilation - * @returns {void} - */ -const assignAscendingChunkIds = (chunks, compilation) => { - const usedIds = getUsedChunkIds(compilation); - - let nextId = 0; - if (usedIds.size > 0) { - for (const chunk of chunks) { - if (chunk.id === null) { - while (usedIds.has(nextId + "")) nextId++; - chunk.id = nextId; - chunk.ids = [nextId]; - nextId++; - } - } - } else { - for (const chunk of chunks) { - if (chunk.id === null) { - chunk.id = nextId; - chunk.ids = [nextId]; - nextId++; - } - } - } -}; -exports.assignAscendingChunkIds = assignAscendingChunkIds; - - -/***/ }), - -/***/ 23750: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareChunksNatural } = __webpack_require__(58792); -const { - getShortChunkName, - getLongChunkName, - assignNames, - getUsedChunkIds, - assignAscendingChunkIds -} = __webpack_require__(76283); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class NamedChunkIdsPlugin { - constructor(options) { - this.delimiter = (options && options.delimiter) || "-"; - this.context = options && options.context; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("NamedChunkIdsPlugin", compilation => { - const { hashFunction } = compilation.outputOptions; - compilation.hooks.chunkIds.tap("NamedChunkIdsPlugin", chunks => { - const chunkGraph = compilation.chunkGraph; - const context = this.context ? this.context : compiler.context; - const delimiter = this.delimiter; - - const unnamedChunks = assignNames( - Array.from(chunks).filter(chunk => { - if (chunk.name) { - chunk.id = chunk.name; - chunk.ids = [chunk.name]; - } - return chunk.id === null; - }), - chunk => - getShortChunkName( - chunk, - chunkGraph, - context, - delimiter, - hashFunction, - compiler.root - ), - chunk => - getLongChunkName( - chunk, - chunkGraph, - context, - delimiter, - hashFunction, - compiler.root - ), - compareChunksNatural(chunkGraph), - getUsedChunkIds(compilation), - (chunk, name) => { - chunk.id = name; - chunk.ids = [name]; - } - ); - if (unnamedChunks.length > 0) { - assignAscendingChunkIds(unnamedChunks, compilation); - } - }); - }); - } -} - -module.exports = NamedChunkIdsPlugin; - - -/***/ }), - -/***/ 23405: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareModulesByIdentifier } = __webpack_require__(58792); -const { - getShortModuleName, - getLongModuleName, - assignNames, - getUsedModuleIdsAndModules, - assignAscendingModuleIds -} = __webpack_require__(76283); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class NamedModuleIdsPlugin { - constructor(options) { - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { root } = compiler; - compiler.hooks.compilation.tap("NamedModuleIdsPlugin", compilation => { - const { hashFunction } = compilation.outputOptions; - compilation.hooks.moduleIds.tap("NamedModuleIdsPlugin", () => { - const chunkGraph = compilation.chunkGraph; - const context = this.options.context - ? this.options.context - : compiler.context; - - const [usedIds, modules] = getUsedModuleIdsAndModules(compilation); - const unnamedModules = assignNames( - modules, - m => getShortModuleName(m, context, root), - (m, shortName) => - getLongModuleName(shortName, m, context, hashFunction, root), - compareModulesByIdentifier, - usedIds, - (m, name) => chunkGraph.setModuleId(m, name) - ); - if (unnamedModules.length > 0) { - assignAscendingModuleIds(usedIds, unnamedModules, compilation); - } - }); - }); - } -} - -module.exports = NamedModuleIdsPlugin; - - -/***/ }), - -/***/ 34697: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareChunksNatural } = __webpack_require__(58792); -const { assignAscendingChunkIds } = __webpack_require__(76283); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class NaturalChunkIdsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("NaturalChunkIdsPlugin", compilation => { - compilation.hooks.chunkIds.tap("NaturalChunkIdsPlugin", chunks => { - const chunkGraph = compilation.chunkGraph; - const compareNatural = compareChunksNatural(chunkGraph); - const chunksInNaturalOrder = Array.from(chunks).sort(compareNatural); - assignAscendingChunkIds(chunksInNaturalOrder, compilation); - }); - }); - } -} - -module.exports = NaturalChunkIdsPlugin; - - -/***/ }), - -/***/ 74040: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Florent Cailhol @ooflorent -*/ - - - -const { - compareModulesByPreOrderIndexOrIdentifier -} = __webpack_require__(58792); -const { - assignAscendingModuleIds, - getUsedModuleIdsAndModules -} = __webpack_require__(76283); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class NaturalModuleIdsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("NaturalModuleIdsPlugin", compilation => { - compilation.hooks.moduleIds.tap("NaturalModuleIdsPlugin", modules => { - const [usedIds, modulesInNaturalOrder] = - getUsedModuleIdsAndModules(compilation); - modulesInNaturalOrder.sort( - compareModulesByPreOrderIndexOrIdentifier(compilation.moduleGraph) - ); - assignAscendingModuleIds(usedIds, modulesInNaturalOrder, compilation); - }); - }); - } -} - -module.exports = NaturalModuleIdsPlugin; - - -/***/ }), - -/***/ 4955: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareChunksNatural } = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const { assignAscendingChunkIds } = __webpack_require__(76283); - -/** @typedef {import("../../declarations/plugins/ids/OccurrenceChunkIdsPlugin").OccurrenceChunkIdsPluginOptions} OccurrenceChunkIdsPluginOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -const validate = createSchemaValidation( - __webpack_require__(64264), - () => __webpack_require__(92738), - { - name: "Occurrence Order Chunk Ids Plugin", - baseDataPath: "options" - } -); - -class OccurrenceChunkIdsPlugin { - /** - * @param {OccurrenceChunkIdsPluginOptions=} options options object - */ - constructor(options = {}) { - validate(options); - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const prioritiseInitial = this.options.prioritiseInitial; - compiler.hooks.compilation.tap("OccurrenceChunkIdsPlugin", compilation => { - compilation.hooks.chunkIds.tap("OccurrenceChunkIdsPlugin", chunks => { - const chunkGraph = compilation.chunkGraph; - - /** @type {Map} */ - const occursInInitialChunksMap = new Map(); - - const compareNatural = compareChunksNatural(chunkGraph); - - for (const c of chunks) { - let occurs = 0; - for (const chunkGroup of c.groupsIterable) { - for (const parent of chunkGroup.parentsIterable) { - if (parent.isInitial()) occurs++; - } - } - occursInInitialChunksMap.set(c, occurs); - } - - const chunksInOccurrenceOrder = Array.from(chunks).sort((a, b) => { - if (prioritiseInitial) { - const aEntryOccurs = occursInInitialChunksMap.get(a); - const bEntryOccurs = occursInInitialChunksMap.get(b); - if (aEntryOccurs > bEntryOccurs) return -1; - if (aEntryOccurs < bEntryOccurs) return 1; - } - const aOccurs = a.getNumberOfGroups(); - const bOccurs = b.getNumberOfGroups(); - if (aOccurs > bOccurs) return -1; - if (aOccurs < bOccurs) return 1; - return compareNatural(a, b); - }); - assignAscendingChunkIds(chunksInOccurrenceOrder, compilation); - }); - }); - } -} - -module.exports = OccurrenceChunkIdsPlugin; - - -/***/ }), - -/***/ 12202: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { - compareModulesByPreOrderIndexOrIdentifier -} = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const { - assignAscendingModuleIds, - getUsedModuleIdsAndModules -} = __webpack_require__(76283); - -/** @typedef {import("../../declarations/plugins/ids/OccurrenceModuleIdsPlugin").OccurrenceModuleIdsPluginOptions} OccurrenceModuleIdsPluginOptions */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ - -const validate = createSchemaValidation( - __webpack_require__(47665), - () => __webpack_require__(2710), - { - name: "Occurrence Order Module Ids Plugin", - baseDataPath: "options" - } -); - -class OccurrenceModuleIdsPlugin { - /** - * @param {OccurrenceModuleIdsPluginOptions=} options options object - */ - constructor(options = {}) { - validate(options); - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const prioritiseInitial = this.options.prioritiseInitial; - compiler.hooks.compilation.tap("OccurrenceModuleIdsPlugin", compilation => { - const moduleGraph = compilation.moduleGraph; - - compilation.hooks.moduleIds.tap("OccurrenceModuleIdsPlugin", () => { - const chunkGraph = compilation.chunkGraph; - - const [usedIds, modulesInOccurrenceOrder] = - getUsedModuleIdsAndModules(compilation); - - const occursInInitialChunksMap = new Map(); - const occursInAllChunksMap = new Map(); - - const initialChunkChunkMap = new Map(); - const entryCountMap = new Map(); - for (const m of modulesInOccurrenceOrder) { - let initial = 0; - let entry = 0; - for (const c of chunkGraph.getModuleChunksIterable(m)) { - if (c.canBeInitial()) initial++; - if (chunkGraph.isEntryModuleInChunk(m, c)) entry++; - } - initialChunkChunkMap.set(m, initial); - entryCountMap.set(m, entry); - } - - /** - * @param {Module} module module - * @returns {number} count of occurs - */ - const countOccursInEntry = module => { - let sum = 0; - for (const [ - originModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { - if (!originModule) continue; - if (!connections.some(c => c.isTargetActive(undefined))) continue; - sum += initialChunkChunkMap.get(originModule); - } - return sum; - }; - - /** - * @param {Module} module module - * @returns {number} count of occurs - */ - const countOccurs = module => { - let sum = 0; - for (const [ - originModule, - connections - ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { - if (!originModule) continue; - const chunkModules = - chunkGraph.getNumberOfModuleChunks(originModule); - for (const c of connections) { - if (!c.isTargetActive(undefined)) continue; - if (!c.dependency) continue; - const factor = c.dependency.getNumberOfIdOccurrences(); - if (factor === 0) continue; - sum += factor * chunkModules; - } - } - return sum; - }; - - if (prioritiseInitial) { - for (const m of modulesInOccurrenceOrder) { - const result = - countOccursInEntry(m) + - initialChunkChunkMap.get(m) + - entryCountMap.get(m); - occursInInitialChunksMap.set(m, result); - } - } - - for (const m of modulesInOccurrenceOrder) { - const result = - countOccurs(m) + - chunkGraph.getNumberOfModuleChunks(m) + - entryCountMap.get(m); - occursInAllChunksMap.set(m, result); - } - - const naturalCompare = compareModulesByPreOrderIndexOrIdentifier( - compilation.moduleGraph - ); - - modulesInOccurrenceOrder.sort((a, b) => { - if (prioritiseInitial) { - const aEntryOccurs = occursInInitialChunksMap.get(a); - const bEntryOccurs = occursInInitialChunksMap.get(b); - if (aEntryOccurs > bEntryOccurs) return -1; - if (aEntryOccurs < bEntryOccurs) return 1; - } - const aOccurs = occursInAllChunksMap.get(a); - const bOccurs = occursInAllChunksMap.get(b); - if (aOccurs > bOccurs) return -1; - if (aOccurs < bOccurs) return 1; - return naturalCompare(a, b); - }); - - assignAscendingModuleIds( - usedIds, - modulesInOccurrenceOrder, - compilation - ); - }); - }); - } -} - -module.exports = OccurrenceModuleIdsPlugin; - - -/***/ }), - -/***/ 63004: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { WebpackError } = __webpack_require__(13733); -const { getUsedModuleIdsAndModules } = __webpack_require__(76283); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -const plugin = "SyncModuleIdsPlugin"; - -class SyncModuleIdsPlugin { - /** - * @param {Object} options options - * @param {string} options.path path to file - * @param {string=} options.context context for module names - * @param {function(Module): boolean} options.test selector for modules - * @param {"read" | "create" | "merge" | "update"=} options.mode operation mode (defaults to merge) - */ - constructor({ path, context, test, mode }) { - this._path = path; - this._context = context; - this._test = test || (() => true); - const readAndWrite = !mode || mode === "merge" || mode === "update"; - this._read = readAndWrite || mode === "read"; - this._write = readAndWrite || mode === "create"; - this._prune = mode === "update"; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - /** @type {Map} */ - let data; - let dataChanged = false; - if (this._read) { - compiler.hooks.readRecords.tapAsync(plugin, callback => { - const fs = compiler.intermediateFileSystem; - fs.readFile(this._path, (err, buffer) => { - if (err) { - if (err.code !== "ENOENT") { - return callback(err); - } - return callback(); - } - const json = JSON.parse(buffer.toString()); - data = new Map(); - for (const key of Object.keys(json)) { - data.set(key, json[key]); - } - dataChanged = false; - return callback(); - }); - }); - } - if (this._write) { - compiler.hooks.emitRecords.tapAsync(plugin, callback => { - if (!data || !dataChanged) return callback(); - const json = {}; - const sorted = Array.from(data).sort(([a], [b]) => (a < b ? -1 : 1)); - for (const [key, value] of sorted) { - json[key] = value; - } - const fs = compiler.intermediateFileSystem; - fs.writeFile(this._path, JSON.stringify(json), callback); - }); - } - compiler.hooks.thisCompilation.tap(plugin, compilation => { - const associatedObjectForCache = compiler.root; - const context = this._context || compiler.context; - if (this._read) { - compilation.hooks.reviveModules.tap(plugin, (_1, _2) => { - if (!data) return; - const { chunkGraph } = compilation; - const [usedIds, modules] = getUsedModuleIdsAndModules( - compilation, - this._test - ); - for (const module of modules) { - const name = module.libIdent({ - context, - associatedObjectForCache - }); - if (!name) continue; - const id = data.get(name); - const idAsString = `${id}`; - if (usedIds.has(idAsString)) { - const err = new WebpackError( - `SyncModuleIdsPlugin: Unable to restore id '${id}' from '${this._path}' as it's already used.` - ); - err.module = module; - compilation.errors.push(err); - } - chunkGraph.setModuleId(module, id); - usedIds.add(idAsString); - } - }); - } - if (this._write) { - compilation.hooks.recordModules.tap(plugin, modules => { - const { chunkGraph } = compilation; - let oldData = data; - if (!oldData) { - oldData = data = new Map(); - } else if (this._prune) { - data = new Map(); - } - for (const module of modules) { - if (this._test(module)) { - const name = module.libIdent({ - context, - associatedObjectForCache - }); - if (!name) continue; - const id = chunkGraph.getModuleId(module); - if (id === null) continue; - const oldId = oldData.get(name); - if (oldId !== id) { - dataChanged = true; - } else if (data === oldData) { - continue; - } - data.set(name, id); - } - } - if (data.size !== oldData.size) dataChanged = true; - }); - } - }); - } -} - -module.exports = SyncModuleIdsPlugin; - - -/***/ }), - -/***/ 13733: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../declarations/WebpackOptions").Entry} Entry */ -/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} EntryNormalized */ -/** @typedef {import("../declarations/WebpackOptions").EntryObject} EntryObject */ -/** @typedef {import("../declarations/WebpackOptions").FileCacheOptions} FileCacheOptions */ -/** @typedef {import("../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ -/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetCondition} RuleSetCondition */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetConditionAbsolute} RuleSetConditionAbsolute */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetRule} RuleSetRule */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetUse} RuleSetUse */ -/** @typedef {import("../declarations/WebpackOptions").RuleSetUseItem} RuleSetUseItem */ -/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} Configuration */ -/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ -/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */ -/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ -/** @typedef {import("./Compilation").Asset} Asset */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compilation").EntryOptions} EntryOptions */ -/** @typedef {import("./Compilation").PathData} PathData */ -/** @typedef {import("./Compiler").AssetEmittedInfo} AssetEmittedInfo */ -/** @typedef {import("./MultiStats")} MultiStats */ -/** @typedef {import("./Parser").ParserState} ParserState */ -/** @typedef {import("./ResolverFactory").ResolvePluginInstance} ResolvePluginInstance */ -/** @typedef {import("./ResolverFactory").Resolver} Resolver */ -/** @typedef {import("./Watching")} Watching */ -/** @typedef {import("./cli").Argument} Argument */ -/** @typedef {import("./cli").Problem} Problem */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunk} StatsChunk */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunkGroup} StatsChunkGroup */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunkOrigin} StatsChunkOrigin */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsCompilation} StatsCompilation */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsError} StatsError */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsLogging} StatsLogging */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsLoggingEntry} StatsLoggingEntry */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModule} StatsModule */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleIssuer} StatsModuleIssuer */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleReason} StatsModuleReason */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleTraceDependency} StatsModuleTraceDependency */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsModuleTraceItem} StatsModuleTraceItem */ -/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsProfile} StatsProfile */ - -/** - * @template {Function} T - * @param {function(): T} factory factory function - * @returns {T} function - */ -const lazyFunction = factory => { - const fac = memoize(factory); - const f = /** @type {any} */ ( - (...args) => { - return fac()(...args); - } - ); - return /** @type {T} */ (f); -}; - -/** - * @template A - * @template B - * @param {A} obj input a - * @param {B} exports input b - * @returns {A & B} merged - */ -const mergeExports = (obj, exports) => { - const descriptors = Object.getOwnPropertyDescriptors(exports); - for (const name of Object.keys(descriptors)) { - const descriptor = descriptors[name]; - if (descriptor.get) { - const fn = descriptor.get; - Object.defineProperty(obj, name, { - configurable: false, - enumerable: true, - get: memoize(fn) - }); - } else if (typeof descriptor.value === "object") { - Object.defineProperty(obj, name, { - configurable: false, - enumerable: true, - writable: false, - value: mergeExports({}, descriptor.value) - }); - } else { - throw new Error( - "Exposed values must be either a getter or an nested object" - ); - } - } - return /** @type {A & B} */ (Object.freeze(obj)); -}; - -const fn = lazyFunction(() => __webpack_require__(20761)); -module.exports = mergeExports(fn, { - get webpack() { - return __webpack_require__(20761); - }, - get validate() { - const webpackOptionsSchemaCheck = __webpack_require__(62136); - const getRealValidate = memoize(() => { - const validateSchema = __webpack_require__(71732); - const webpackOptionsSchema = __webpack_require__(13954); - return options => validateSchema(webpackOptionsSchema, options); - }); - return options => { - if (!webpackOptionsSchemaCheck(options)) getRealValidate()(options); - }; - }, - get validateSchema() { - const validateSchema = __webpack_require__(71732); - return validateSchema; - }, - get version() { - return /** @type {string} */ ((__webpack_require__(27012)/* .version */ .i8)); - }, - - get cli() { - return __webpack_require__(12218); - }, - get AutomaticPrefetchPlugin() { - return __webpack_require__(59851); - }, - get AsyncDependenciesBlock() { - return __webpack_require__(42290); - }, - get BannerPlugin() { - return __webpack_require__(65502); - }, - get Cache() { - return __webpack_require__(25363); - }, - get Chunk() { - return __webpack_require__(84891); - }, - get ChunkGraph() { - return __webpack_require__(75449); - }, - get CleanPlugin() { - return __webpack_require__(40135); - }, - get Compilation() { - return __webpack_require__(73002); - }, - get Compiler() { - return __webpack_require__(37912); - }, - get ConcatenationScope() { - return __webpack_require__(81701); - }, - get ContextExclusionPlugin() { - return __webpack_require__(98633); - }, - get ContextReplacementPlugin() { - return __webpack_require__(31705); - }, - get DefinePlugin() { - return __webpack_require__(5354); - }, - get DelegatedPlugin() { - return __webpack_require__(82059); - }, - get Dependency() { - return __webpack_require__(87056); - }, - get DllPlugin() { - return __webpack_require__(89978); - }, - get DllReferencePlugin() { - return __webpack_require__(1282); - }, - get DynamicEntryPlugin() { - return __webpack_require__(41924); - }, - get EntryOptionPlugin() { - return __webpack_require__(2699); - }, - get EntryPlugin() { - return __webpack_require__(19360); - }, - get EnvironmentPlugin() { - return __webpack_require__(48681); - }, - get EvalDevToolModulePlugin() { - return __webpack_require__(76289); - }, - get EvalSourceMapDevToolPlugin() { - return __webpack_require__(67470); - }, - get ExternalModule() { - return __webpack_require__(73096); - }, - get ExternalsPlugin() { - return __webpack_require__(51562); - }, - get Generator() { - return __webpack_require__(97152); - }, - get HotUpdateChunk() { - return __webpack_require__(23834); - }, - get HotModuleReplacementPlugin() { - return __webpack_require__(23456); - }, - get IgnorePlugin() { - return __webpack_require__(46683); - }, - get JavascriptModulesPlugin() { - return util.deprecate( - () => __webpack_require__(36109), - "webpack.JavascriptModulesPlugin has moved to webpack.javascript.JavascriptModulesPlugin", - "DEP_WEBPACK_JAVASCRIPT_MODULES_PLUGIN" - )(); - }, - get LibManifestPlugin() { - return __webpack_require__(91052); - }, - get LibraryTemplatePlugin() { - return util.deprecate( - () => __webpack_require__(59656), - "webpack.LibraryTemplatePlugin is deprecated and has been replaced by compilation.outputOptions.library or compilation.addEntry + passing a library option", - "DEP_WEBPACK_LIBRARY_TEMPLATE_PLUGIN" - )(); - }, - get LoaderOptionsPlugin() { - return __webpack_require__(60634); - }, - get LoaderTargetPlugin() { - return __webpack_require__(67181); - }, - get Module() { - return __webpack_require__(53840); - }, - get ModuleFilenameHelpers() { - return __webpack_require__(99523); - }, - get ModuleGraph() { - return __webpack_require__(13487); - }, - get ModuleGraphConnection() { - return __webpack_require__(82921); - }, - get NoEmitOnErrorsPlugin() { - return __webpack_require__(424); - }, - get NormalModule() { - return __webpack_require__(89417); - }, - get NormalModuleReplacementPlugin() { - return __webpack_require__(25755); - }, - get MultiCompiler() { - return __webpack_require__(39601); - }, - get Parser() { - return __webpack_require__(68646); - }, - get PrefetchPlugin() { - return __webpack_require__(82353); - }, - get ProgressPlugin() { - return __webpack_require__(67317); - }, - get ProvidePlugin() { - return __webpack_require__(79426); - }, - get RuntimeGlobals() { - return __webpack_require__(39201); - }, - get RuntimeModule() { - return __webpack_require__(93496); - }, - get SingleEntryPlugin() { - return util.deprecate( - () => __webpack_require__(19360), - "SingleEntryPlugin was renamed to EntryPlugin", - "DEP_WEBPACK_SINGLE_ENTRY_PLUGIN" - )(); - }, - get SourceMapDevToolPlugin() { - return __webpack_require__(63645); - }, - get Stats() { - return __webpack_require__(47158); - }, - get Template() { - return __webpack_require__(43841); - }, - get UsageState() { - return (__webpack_require__(13168).UsageState); - }, - get WatchIgnorePlugin() { - return __webpack_require__(4179); - }, - get WebpackError() { - return __webpack_require__(27154); - }, - get WebpackOptionsApply() { - return __webpack_require__(73305); - }, - get WebpackOptionsDefaulter() { - return util.deprecate( - () => __webpack_require__(42163), - "webpack.WebpackOptionsDefaulter is deprecated and has been replaced by webpack.config.getNormalizedWebpackOptions and webpack.config.applyWebpackOptionsDefaults", - "DEP_WEBPACK_OPTIONS_DEFAULTER" - )(); - }, - // TODO webpack 6 deprecate - get WebpackOptionsValidationError() { - return (__webpack_require__(38476).ValidationError); - }, - get ValidationError() { - return (__webpack_require__(38476).ValidationError); - }, - - cache: { - get MemoryCachePlugin() { - return __webpack_require__(64542); - } - }, - - config: { - get getNormalizedWebpackOptions() { - return (__webpack_require__(80593).getNormalizedWebpackOptions); - }, - get applyWebpackOptionsDefaults() { - return (__webpack_require__(64395).applyWebpackOptionsDefaults); - } - }, - - dependencies: { - get ModuleDependency() { - return __webpack_require__(99809); - }, - get HarmonyImportDependency() { - return __webpack_require__(58668); - }, - get ConstDependency() { - return __webpack_require__(14367); - }, - get NullDependency() { - return __webpack_require__(91596); - } - }, - - ids: { - get ChunkModuleIdRangePlugin() { - return __webpack_require__(87352); - }, - get NaturalModuleIdsPlugin() { - return __webpack_require__(74040); - }, - get OccurrenceModuleIdsPlugin() { - return __webpack_require__(12202); - }, - get NamedModuleIdsPlugin() { - return __webpack_require__(23405); - }, - get DeterministicChunkIdsPlugin() { - return __webpack_require__(6777); - }, - get DeterministicModuleIdsPlugin() { - return __webpack_require__(49335); - }, - get NamedChunkIdsPlugin() { - return __webpack_require__(23750); - }, - get OccurrenceChunkIdsPlugin() { - return __webpack_require__(4955); - }, - get HashedModuleIdsPlugin() { - return __webpack_require__(13340); - } - }, - - javascript: { - get EnableChunkLoadingPlugin() { - return __webpack_require__(49548); - }, - get JavascriptModulesPlugin() { - return __webpack_require__(36109); - }, - get JavascriptParser() { - return __webpack_require__(33177); - } - }, - - optimize: { - get AggressiveMergingPlugin() { - return __webpack_require__(88455); - }, - get AggressiveSplittingPlugin() { - return util.deprecate( - () => __webpack_require__(97239), - "AggressiveSplittingPlugin is deprecated in favor of SplitChunksPlugin", - "DEP_WEBPACK_AGGRESSIVE_SPLITTING_PLUGIN" - )(); - }, - get InnerGraph() { - return __webpack_require__(39236); - }, - get LimitChunkCountPlugin() { - return __webpack_require__(96049); - }, - get MinChunkSizePlugin() { - return __webpack_require__(37434); - }, - get ModuleConcatenationPlugin() { - return __webpack_require__(5279); - }, - get RealContentHashPlugin() { - return __webpack_require__(33347); - }, - get RuntimeChunkPlugin() { - return __webpack_require__(57105); - }, - get SideEffectsFlagPlugin() { - return __webpack_require__(94281); - }, - get SplitChunksPlugin() { - return __webpack_require__(61167); - } - }, - - runtime: { - get GetChunkFilenameRuntimeModule() { - return __webpack_require__(44033); - }, - get LoadScriptRuntimeModule() { - return __webpack_require__(46750); - } - }, - - prefetch: { - get ChunkPrefetchPreloadPlugin() { - return __webpack_require__(7006); - } - }, - - web: { - get FetchCompileAsyncWasmPlugin() { - return __webpack_require__(90692); - }, - get FetchCompileWasmPlugin() { - return __webpack_require__(70390); - }, - get JsonpChunkLoadingRuntimeModule() { - return __webpack_require__(6594); - }, - get JsonpTemplatePlugin() { - return __webpack_require__(44896); - } - }, - - webworker: { - get WebWorkerTemplatePlugin() { - return __webpack_require__(29649); - } - }, - - node: { - get NodeEnvironmentPlugin() { - return __webpack_require__(27381); - }, - get NodeSourcePlugin() { - return __webpack_require__(54250); - }, - get NodeTargetPlugin() { - return __webpack_require__(23066); - }, - get NodeTemplatePlugin() { - return __webpack_require__(33999); - }, - get ReadFileCompileWasmPlugin() { - return __webpack_require__(29023); - } - }, - - electron: { - get ElectronTargetPlugin() { - return __webpack_require__(83290); - } - }, - - wasm: { - get AsyncWebAssemblyModulesPlugin() { - return __webpack_require__(24979); - } - }, - - library: { - get AbstractLibraryPlugin() { - return __webpack_require__(19880); - }, - get EnableLibraryPlugin() { - return __webpack_require__(7616); - } - }, - - container: { - get ContainerPlugin() { - return __webpack_require__(90005); - }, - get ContainerReferencePlugin() { - return __webpack_require__(25405); - }, - get ModuleFederationPlugin() { - return __webpack_require__(45124); - }, - get scope() { - return (__webpack_require__(58491).scope); - } - }, - - sharing: { - get ConsumeSharedPlugin() { - return __webpack_require__(40724); - }, - get ProvideSharedPlugin() { - return __webpack_require__(90432); - }, - get SharePlugin() { - return __webpack_require__(77443); - }, - get scope() { - return (__webpack_require__(58491).scope); - } - }, - - debug: { - get ProfilingPlugin() { - return __webpack_require__(2366); - } - }, - - util: { - get createHash() { - return __webpack_require__(85205); - }, - get comparators() { - return __webpack_require__(58792); - }, - get runtime() { - return __webpack_require__(47462); - }, - get serialization() { - return __webpack_require__(7591); - }, - get cleverMerge() { - return (__webpack_require__(22093).cachedCleverMerge); - }, - get LazySet() { - return __webpack_require__(96522); - } - }, - - get sources() { - return __webpack_require__(51255); - }, - - experiments: { - schemes: { - get HttpUriPlugin() { - return __webpack_require__(89674); - } - }, - ids: { - get SyncModuleIdsPlugin() { - return __webpack_require__(63004); - } - } - } -}); - - -/***/ }), - -/***/ 54433: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, PrefixSource, RawSource } = __webpack_require__(51255); -const { RuntimeGlobals } = __webpack_require__(13733); -const HotUpdateChunk = __webpack_require__(23834); -const Template = __webpack_require__(43841); -const { getCompilationHooks } = __webpack_require__(36109); -const { - generateEntryStartup, - updateHashForEntryStartup -} = __webpack_require__(82695); - -/** @typedef {import("../Compiler")} Compiler */ - -class ArrayPushCallbackChunkFormatPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "ArrayPushCallbackChunkFormatPlugin", - compilation => { - compilation.hooks.additionalChunkRuntimeRequirements.tap( - "ArrayPushCallbackChunkFormatPlugin", - (chunk, set, { chunkGraph }) => { - if (chunk.hasRuntime()) return; - if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { - set.add(RuntimeGlobals.onChunksLoaded); - set.add(RuntimeGlobals.require); - } - set.add(RuntimeGlobals.chunkCallback); - } - ); - const hooks = getCompilationHooks(compilation); - hooks.renderChunk.tap( - "ArrayPushCallbackChunkFormatPlugin", - (modules, renderContext) => { - const { chunk, chunkGraph, runtimeTemplate } = renderContext; - const hotUpdateChunk = - chunk instanceof HotUpdateChunk ? chunk : null; - const globalObject = runtimeTemplate.globalObject; - const source = new ConcatSource(); - const runtimeModules = - chunkGraph.getChunkRuntimeModulesInOrder(chunk); - if (hotUpdateChunk) { - const hotUpdateGlobal = - runtimeTemplate.outputOptions.hotUpdateGlobal; - source.add( - `${globalObject}[${JSON.stringify(hotUpdateGlobal)}](` - ); - source.add(`${JSON.stringify(chunk.id)},`); - source.add(modules); - if (runtimeModules.length > 0) { - source.add(",\n"); - const runtimePart = Template.renderChunkRuntimeModules( - runtimeModules, - renderContext - ); - source.add(runtimePart); - } - source.add(")"); - } else { - const chunkLoadingGlobal = - runtimeTemplate.outputOptions.chunkLoadingGlobal; - source.add( - `(${globalObject}[${JSON.stringify( - chunkLoadingGlobal - )}] = ${globalObject}[${JSON.stringify( - chunkLoadingGlobal - )}] || []).push([` - ); - source.add(`${JSON.stringify(chunk.ids)},`); - source.add(modules); - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - if (runtimeModules.length > 0 || entries.length > 0) { - const runtime = new ConcatSource( - (runtimeTemplate.supportsArrowFunction() - ? "__webpack_require__ =>" - : "function(__webpack_require__)") + - " { // webpackRuntimeModules\n" - ); - if (runtimeModules.length > 0) { - runtime.add( - Template.renderRuntimeModules(runtimeModules, { - ...renderContext, - codeGenerationResults: compilation.codeGenerationResults - }) - ); - } - if (entries.length > 0) { - const startupSource = new RawSource( - generateEntryStartup( - chunkGraph, - runtimeTemplate, - entries, - chunk, - true - ) - ); - runtime.add( - hooks.renderStartup.call( - startupSource, - entries[entries.length - 1][0], - { - ...renderContext, - inlined: false - } - ) - ); - if ( - chunkGraph - .getChunkRuntimeRequirements(chunk) - .has(RuntimeGlobals.returnExportsFromRuntime) - ) { - runtime.add("return __webpack_exports__;\n"); - } - } - runtime.add("}\n"); - source.add(",\n"); - source.add(new PrefixSource("/******/ ", runtime)); - } - source.add("])"); - } - return source; - } - ); - hooks.chunkHash.tap( - "ArrayPushCallbackChunkFormatPlugin", - (chunk, hash, { chunkGraph, runtimeTemplate }) => { - if (chunk.hasRuntime()) return; - hash.update( - `ArrayPushCallbackChunkFormatPlugin1${runtimeTemplate.outputOptions.chunkLoadingGlobal}${runtimeTemplate.outputOptions.hotUpdateGlobal}${runtimeTemplate.globalObject}` - ); - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - updateHashForEntryStartup(hash, chunkGraph, entries, chunk); - } - ); - } - ); - } -} - -module.exports = ArrayPushCallbackChunkFormatPlugin; - - -/***/ }), - -/***/ 94844: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("estree").Node} EsTreeNode */ -/** @typedef {import("./JavascriptParser").VariableInfoInterface} VariableInfoInterface */ - -const TypeUnknown = 0; -const TypeUndefined = 1; -const TypeNull = 2; -const TypeString = 3; -const TypeNumber = 4; -const TypeBoolean = 5; -const TypeRegExp = 6; -const TypeConditional = 7; -const TypeArray = 8; -const TypeConstArray = 9; -const TypeIdentifier = 10; -const TypeWrapped = 11; -const TypeTemplateString = 12; -const TypeBigInt = 13; - -class BasicEvaluatedExpression { - constructor() { - this.type = TypeUnknown; - /** @type {[number, number]} */ - this.range = undefined; - /** @type {boolean} */ - this.falsy = false; - /** @type {boolean} */ - this.truthy = false; - /** @type {boolean | undefined} */ - this.nullish = undefined; - /** @type {boolean} */ - this.sideEffects = true; - /** @type {boolean | undefined} */ - this.bool = undefined; - /** @type {number | undefined} */ - this.number = undefined; - /** @type {bigint | undefined} */ - this.bigint = undefined; - /** @type {RegExp | undefined} */ - this.regExp = undefined; - /** @type {string | undefined} */ - this.string = undefined; - /** @type {BasicEvaluatedExpression[] | undefined} */ - this.quasis = undefined; - /** @type {BasicEvaluatedExpression[] | undefined} */ - this.parts = undefined; - /** @type {any[] | undefined} */ - this.array = undefined; - /** @type {BasicEvaluatedExpression[] | undefined} */ - this.items = undefined; - /** @type {BasicEvaluatedExpression[] | undefined} */ - this.options = undefined; - /** @type {BasicEvaluatedExpression | undefined} */ - this.prefix = undefined; - /** @type {BasicEvaluatedExpression | undefined} */ - this.postfix = undefined; - this.wrappedInnerExpressions = undefined; - /** @type {string | VariableInfoInterface | undefined} */ - this.identifier = undefined; - /** @type {VariableInfoInterface} */ - this.rootInfo = undefined; - /** @type {() => string[]} */ - this.getMembers = undefined; - /** @type {() => boolean[]} */ - this.getMembersOptionals = undefined; - /** @type {EsTreeNode} */ - this.expression = undefined; - } - - isUnknown() { - return this.type === TypeUnknown; - } - - isNull() { - return this.type === TypeNull; - } - - isUndefined() { - return this.type === TypeUndefined; - } - - isString() { - return this.type === TypeString; - } - - isNumber() { - return this.type === TypeNumber; - } - - isBigInt() { - return this.type === TypeBigInt; - } - - isBoolean() { - return this.type === TypeBoolean; - } - - isRegExp() { - return this.type === TypeRegExp; - } - - isConditional() { - return this.type === TypeConditional; - } - - isArray() { - return this.type === TypeArray; - } - - isConstArray() { - return this.type === TypeConstArray; - } - - isIdentifier() { - return this.type === TypeIdentifier; - } - - isWrapped() { - return this.type === TypeWrapped; - } - - isTemplateString() { - return this.type === TypeTemplateString; - } - - /** - * Is expression a primitive or an object type value? - * @returns {boolean | undefined} true: primitive type, false: object type, undefined: unknown/runtime-defined - */ - isPrimitiveType() { - switch (this.type) { - case TypeUndefined: - case TypeNull: - case TypeString: - case TypeNumber: - case TypeBoolean: - case TypeBigInt: - case TypeWrapped: - case TypeTemplateString: - return true; - case TypeRegExp: - case TypeArray: - case TypeConstArray: - return false; - default: - return undefined; - } - } - - /** - * Is expression a runtime or compile-time value? - * @returns {boolean} true: compile time value, false: runtime value - */ - isCompileTimeValue() { - switch (this.type) { - case TypeUndefined: - case TypeNull: - case TypeString: - case TypeNumber: - case TypeBoolean: - case TypeRegExp: - case TypeConstArray: - case TypeBigInt: - return true; - default: - return false; - } - } - - /** - * Gets the compile-time value of the expression - * @returns {any} the javascript value - */ - asCompileTimeValue() { - switch (this.type) { - case TypeUndefined: - return undefined; - case TypeNull: - return null; - case TypeString: - return this.string; - case TypeNumber: - return this.number; - case TypeBoolean: - return this.bool; - case TypeRegExp: - return this.regExp; - case TypeConstArray: - return this.array; - case TypeBigInt: - return this.bigint; - default: - throw new Error( - "asCompileTimeValue must only be called for compile-time values" - ); - } - } - - isTruthy() { - return this.truthy; - } - - isFalsy() { - return this.falsy; - } - - isNullish() { - return this.nullish; - } - - /** - * Can this expression have side effects? - * @returns {boolean} false: never has side effects - */ - couldHaveSideEffects() { - return this.sideEffects; - } - - asBool() { - if (this.truthy) return true; - if (this.falsy || this.nullish) return false; - if (this.isBoolean()) return this.bool; - if (this.isNull()) return false; - if (this.isUndefined()) return false; - if (this.isString()) return this.string !== ""; - if (this.isNumber()) return this.number !== 0; - if (this.isBigInt()) return this.bigint !== BigInt(0); - if (this.isRegExp()) return true; - if (this.isArray()) return true; - if (this.isConstArray()) return true; - if (this.isWrapped()) { - return (this.prefix && this.prefix.asBool()) || - (this.postfix && this.postfix.asBool()) - ? true - : undefined; - } - if (this.isTemplateString()) { - const str = this.asString(); - if (typeof str === "string") return str !== ""; - } - return undefined; - } - - asNullish() { - const nullish = this.isNullish(); - - if (nullish === true || this.isNull() || this.isUndefined()) return true; - - if (nullish === false) return false; - if (this.isTruthy()) return false; - if (this.isBoolean()) return false; - if (this.isString()) return false; - if (this.isNumber()) return false; - if (this.isBigInt()) return false; - if (this.isRegExp()) return false; - if (this.isArray()) return false; - if (this.isConstArray()) return false; - if (this.isTemplateString()) return false; - if (this.isRegExp()) return false; - - return undefined; - } - - asString() { - if (this.isBoolean()) return `${this.bool}`; - if (this.isNull()) return "null"; - if (this.isUndefined()) return "undefined"; - if (this.isString()) return this.string; - if (this.isNumber()) return `${this.number}`; - if (this.isBigInt()) return `${this.bigint}`; - if (this.isRegExp()) return `${this.regExp}`; - if (this.isArray()) { - let array = []; - for (const item of this.items) { - const itemStr = item.asString(); - if (itemStr === undefined) return undefined; - array.push(itemStr); - } - return `${array}`; - } - if (this.isConstArray()) return `${this.array}`; - if (this.isTemplateString()) { - let str = ""; - for (const part of this.parts) { - const partStr = part.asString(); - if (partStr === undefined) return undefined; - str += partStr; - } - return str; - } - return undefined; - } - - setString(string) { - this.type = TypeString; - this.string = string; - this.sideEffects = false; - return this; - } - - setUndefined() { - this.type = TypeUndefined; - this.sideEffects = false; - return this; - } - - setNull() { - this.type = TypeNull; - this.sideEffects = false; - return this; - } - - setNumber(number) { - this.type = TypeNumber; - this.number = number; - this.sideEffects = false; - return this; - } - - setBigInt(bigint) { - this.type = TypeBigInt; - this.bigint = bigint; - this.sideEffects = false; - return this; - } - - setBoolean(bool) { - this.type = TypeBoolean; - this.bool = bool; - this.sideEffects = false; - return this; - } - - setRegExp(regExp) { - this.type = TypeRegExp; - this.regExp = regExp; - this.sideEffects = false; - return this; - } - - setIdentifier(identifier, rootInfo, getMembers, getMembersOptionals) { - this.type = TypeIdentifier; - this.identifier = identifier; - this.rootInfo = rootInfo; - this.getMembers = getMembers; - this.getMembersOptionals = getMembersOptionals; - this.sideEffects = true; - return this; - } - - setWrapped(prefix, postfix, innerExpressions) { - this.type = TypeWrapped; - this.prefix = prefix; - this.postfix = postfix; - this.wrappedInnerExpressions = innerExpressions; - this.sideEffects = true; - return this; - } - - setOptions(options) { - this.type = TypeConditional; - this.options = options; - this.sideEffects = true; - return this; - } - - addOptions(options) { - if (!this.options) { - this.type = TypeConditional; - this.options = []; - this.sideEffects = true; - } - for (const item of options) { - this.options.push(item); - } - return this; - } - - setItems(items) { - this.type = TypeArray; - this.items = items; - this.sideEffects = items.some(i => i.couldHaveSideEffects()); - return this; - } - - setArray(array) { - this.type = TypeConstArray; - this.array = array; - this.sideEffects = false; - return this; - } - - setTemplateString(quasis, parts, kind) { - this.type = TypeTemplateString; - this.quasis = quasis; - this.parts = parts; - this.templateStringKind = kind; - this.sideEffects = parts.some(p => p.sideEffects); - return this; - } - - setTruthy() { - this.falsy = false; - this.truthy = true; - this.nullish = false; - return this; - } - - setFalsy() { - this.falsy = true; - this.truthy = false; - return this; - } - - setNullish(value) { - this.nullish = value; - - if (value) return this.setFalsy(); - - return this; - } - - setRange(range) { - this.range = range; - return this; - } - - setSideEffects(sideEffects = true) { - this.sideEffects = sideEffects; - return this; - } - - setExpression(expression) { - this.expression = expression; - return this; - } -} - -/** - * @param {string} flags regexp flags - * @returns {boolean} is valid flags - */ -BasicEvaluatedExpression.isValidRegExpFlags = flags => { - const len = flags.length; - - if (len === 0) return true; - if (len > 4) return false; - - // cspell:word gimy - let remaining = 0b0000; // bit per RegExp flag: gimy - - for (let i = 0; i < len; i++) - switch (flags.charCodeAt(i)) { - case 103 /* g */: - if (remaining & 0b1000) return false; - remaining |= 0b1000; - break; - case 105 /* i */: - if (remaining & 0b0100) return false; - remaining |= 0b0100; - break; - case 109 /* m */: - if (remaining & 0b0010) return false; - remaining |= 0b0010; - break; - case 121 /* y */: - if (remaining & 0b0001) return false; - remaining |= 0b0001; - break; - default: - return false; - } - - return true; -}; - -module.exports = BasicEvaluatedExpression; - - -/***/ }), - -/***/ 5575: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Entrypoint = __webpack_require__(33546); - -/** @typedef {import("../Chunk")} Chunk */ - -/** - * @param {Entrypoint} entrypoint a chunk group - * @param {Chunk} excludedChunk1 current chunk which is excluded - * @param {Chunk} excludedChunk2 runtime chunk which is excluded - * @returns {Set} chunks - */ -const getAllChunks = (entrypoint, excludedChunk1, excludedChunk2) => { - const queue = new Set([entrypoint]); - const chunks = new Set(); - for (const entrypoint of queue) { - for (const chunk of entrypoint.chunks) { - if (chunk === excludedChunk1) continue; - if (chunk === excludedChunk2) continue; - chunks.add(chunk); - } - for (const parent of entrypoint.parentsIterable) { - if (parent instanceof Entrypoint) queue.add(parent); - } - } - return chunks; -}; -exports.getAllChunks = getAllChunks; - - -/***/ }), - -/***/ 93547: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, RawSource } = __webpack_require__(51255); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const { - getChunkFilenameTemplate, - getCompilationHooks -} = __webpack_require__(36109); -const { - generateEntryStartup, - updateHashForEntryStartup -} = __webpack_require__(82695); - -/** @typedef {import("../Compiler")} Compiler */ - -class CommonJsChunkFormatPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "CommonJsChunkFormatPlugin", - compilation => { - compilation.hooks.additionalChunkRuntimeRequirements.tap( - "CommonJsChunkLoadingPlugin", - (chunk, set, { chunkGraph }) => { - if (chunk.hasRuntime()) return; - if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { - set.add(RuntimeGlobals.require); - set.add(RuntimeGlobals.startupEntrypoint); - set.add(RuntimeGlobals.externalInstallChunk); - } - } - ); - const hooks = getCompilationHooks(compilation); - hooks.renderChunk.tap( - "CommonJsChunkFormatPlugin", - (modules, renderContext) => { - const { chunk, chunkGraph, runtimeTemplate } = renderContext; - const source = new ConcatSource(); - source.add(`exports.id = ${JSON.stringify(chunk.id)};\n`); - source.add(`exports.ids = ${JSON.stringify(chunk.ids)};\n`); - source.add(`exports.modules = `); - source.add(modules); - source.add(";\n"); - const runtimeModules = - chunkGraph.getChunkRuntimeModulesInOrder(chunk); - if (runtimeModules.length > 0) { - source.add("exports.runtime =\n"); - source.add( - Template.renderChunkRuntimeModules( - runtimeModules, - renderContext - ) - ); - } - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - if (entries.length > 0) { - const runtimeChunk = entries[0][1].getRuntimeChunk(); - const currentOutputName = compilation - .getPath( - getChunkFilenameTemplate(chunk, compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ) - .split("/"); - const runtimeOutputName = compilation - .getPath( - getChunkFilenameTemplate( - runtimeChunk, - compilation.outputOptions - ), - { - chunk: runtimeChunk, - contentHashType: "javascript" - } - ) - .split("/"); - - // remove filename, we only need the directory - currentOutputName.pop(); - - // remove common parts - while ( - currentOutputName.length > 0 && - runtimeOutputName.length > 0 && - currentOutputName[0] === runtimeOutputName[0] - ) { - currentOutputName.shift(); - runtimeOutputName.shift(); - } - - // create final path - const runtimePath = - (currentOutputName.length > 0 - ? "../".repeat(currentOutputName.length) - : "./") + runtimeOutputName.join("/"); - - const entrySource = new ConcatSource(); - entrySource.add( - `(${ - runtimeTemplate.supportsArrowFunction() - ? "() => " - : "function() " - }{\n` - ); - entrySource.add("var exports = {};\n"); - entrySource.add(source); - entrySource.add(";\n\n// load runtime\n"); - entrySource.add( - `var __webpack_require__ = require(${JSON.stringify( - runtimePath - )});\n` - ); - entrySource.add( - `${RuntimeGlobals.externalInstallChunk}(exports);\n` - ); - const startupSource = new RawSource( - generateEntryStartup( - chunkGraph, - runtimeTemplate, - entries, - chunk, - false - ) - ); - entrySource.add( - hooks.renderStartup.call( - startupSource, - entries[entries.length - 1][0], - { - ...renderContext, - inlined: false - } - ) - ); - entrySource.add("\n})()"); - return entrySource; - } - return source; - } - ); - hooks.chunkHash.tap( - "CommonJsChunkFormatPlugin", - (chunk, hash, { chunkGraph }) => { - if (chunk.hasRuntime()) return; - hash.update("CommonJsChunkFormatPlugin"); - hash.update("1"); - const entries = Array.from( - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) - ); - updateHashForEntryStartup(hash, chunkGraph, entries, chunk); - } - ); - } - ); - } -} - -module.exports = CommonJsChunkFormatPlugin; - - -/***/ }), - -/***/ 49548: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../../declarations/WebpackOptions").ChunkLoadingType} ChunkLoadingType */ -/** @typedef {import("../Compiler")} Compiler */ - -/** @type {WeakMap>} */ -const enabledTypes = new WeakMap(); - -const getEnabledTypes = compiler => { - let set = enabledTypes.get(compiler); - if (set === undefined) { - set = new Set(); - enabledTypes.set(compiler, set); - } - return set; -}; - -class EnableChunkLoadingPlugin { - /** - * @param {ChunkLoadingType} type library type that should be available - */ - constructor(type) { - this.type = type; - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {ChunkLoadingType} type type of library - * @returns {void} - */ - static setEnabled(compiler, type) { - getEnabledTypes(compiler).add(type); - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {ChunkLoadingType} type type of library - * @returns {void} - */ - static checkEnabled(compiler, type) { - if (!getEnabledTypes(compiler).has(type)) { - throw new Error( - `Chunk loading type "${type}" is not enabled. ` + - "EnableChunkLoadingPlugin need to be used to enable this type of chunk loading. " + - 'This usually happens through the "output.enabledChunkLoadingTypes" option. ' + - 'If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes". ' + - "These types are enabled: " + - Array.from(getEnabledTypes(compiler)).join(", ") - ); - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { type } = this; - - // Only enable once - const enabled = getEnabledTypes(compiler); - if (enabled.has(type)) return; - enabled.add(type); - - if (typeof type === "string") { - switch (type) { - case "jsonp": { - const JsonpChunkLoadingPlugin = __webpack_require__(21631); - new JsonpChunkLoadingPlugin().apply(compiler); - break; - } - case "import-scripts": { - const ImportScriptsChunkLoadingPlugin = __webpack_require__(22188); - new ImportScriptsChunkLoadingPlugin().apply(compiler); - break; - } - case "require": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const CommonJsChunkLoadingPlugin = __webpack_require__(70979); - new CommonJsChunkLoadingPlugin({ - asyncChunkLoading: false - }).apply(compiler); - break; - } - case "async-node": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const CommonJsChunkLoadingPlugin = __webpack_require__(70979); - new CommonJsChunkLoadingPlugin({ - asyncChunkLoading: true - }).apply(compiler); - break; - } - case "import": { - const ModuleChunkLoadingPlugin = __webpack_require__(94603); - new ModuleChunkLoadingPlugin().apply(compiler); - break; - } - case "universal": - // TODO implement universal chunk loading - throw new Error("Universal Chunk Loading is not implemented yet"); - default: - throw new Error(`Unsupported chunk loading type ${type}. -Plugins which provide custom chunk loading types must call EnableChunkLoadingPlugin.setEnabled(compiler, type) to disable this error.`); - } - } else { - // TODO support plugin instances here - // apply them to the compiler - } - } -} - -module.exports = EnableChunkLoadingPlugin; - - -/***/ }), - -/***/ 88893: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const { RawSource, ReplaceSource } = __webpack_require__(51255); -const Generator = __webpack_require__(97152); -const InitFragment = __webpack_require__(64768); -const HarmonyCompatibilityDependency = __webpack_require__(48180); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../DependenciesBlock")} DependenciesBlock */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -// TODO: clean up this file -// replace with newer constructs - -const deprecatedGetInitFragments = util.deprecate( - (template, dependency, templateContext) => - template.getInitFragments(dependency, templateContext), - "DependencyTemplate.getInitFragment is deprecated (use apply(dep, source, { initFragments }) instead)", - "DEP_WEBPACK_JAVASCRIPT_GENERATOR_GET_INIT_FRAGMENTS" -); - -const TYPES = new Set(["javascript"]); - -class JavascriptGenerator extends Generator { - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const originalSource = module.originalSource(); - if (!originalSource) { - return 39; - } - return originalSource.size(); - } - - /** - * @param {NormalModule} module module for which the bailout reason should be determined - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(module, context) { - // Only harmony modules are valid for optimization - if ( - !module.buildMeta || - module.buildMeta.exportsType !== "namespace" || - module.presentationalDependencies === undefined || - !module.presentationalDependencies.some( - d => d instanceof HarmonyCompatibilityDependency - ) - ) { - return "Module is not an ECMAScript module"; - } - - // Some expressions are not compatible with module concatenation - // because they may produce unexpected results. The plugin bails out - // if some were detected upfront. - if (module.buildInfo && module.buildInfo.moduleConcatenationBailout) { - return `Module uses ${module.buildInfo.moduleConcatenationBailout}`; - } - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const originalSource = module.originalSource(); - if (!originalSource) { - return new RawSource("throw new Error('No source available');"); - } - - const source = new ReplaceSource(originalSource); - const initFragments = []; - - this.sourceModule(module, initFragments, source, generateContext); - - return InitFragment.addToSource(source, initFragments, generateContext); - } - - /** - * @param {Module} module the module to generate - * @param {InitFragment[]} initFragments mutable list of init fragments - * @param {ReplaceSource} source the current replace source which can be modified - * @param {GenerateContext} generateContext the generateContext - * @returns {void} - */ - sourceModule(module, initFragments, source, generateContext) { - for (const dependency of module.dependencies) { - this.sourceDependency( - module, - dependency, - initFragments, - source, - generateContext - ); - } - - if (module.presentationalDependencies !== undefined) { - for (const dependency of module.presentationalDependencies) { - this.sourceDependency( - module, - dependency, - initFragments, - source, - generateContext - ); - } - } - - for (const childBlock of module.blocks) { - this.sourceBlock( - module, - childBlock, - initFragments, - source, - generateContext - ); - } - } - - /** - * @param {Module} module the module to generate - * @param {DependenciesBlock} block the dependencies block which will be processed - * @param {InitFragment[]} initFragments mutable list of init fragments - * @param {ReplaceSource} source the current replace source which can be modified - * @param {GenerateContext} generateContext the generateContext - * @returns {void} - */ - sourceBlock(module, block, initFragments, source, generateContext) { - for (const dependency of block.dependencies) { - this.sourceDependency( - module, - dependency, - initFragments, - source, - generateContext - ); - } - - for (const childBlock of block.blocks) { - this.sourceBlock( - module, - childBlock, - initFragments, - source, - generateContext - ); - } - } - - /** - * @param {Module} module the current module - * @param {Dependency} dependency the dependency to generate - * @param {InitFragment[]} initFragments mutable list of init fragments - * @param {ReplaceSource} source the current replace source which can be modified - * @param {GenerateContext} generateContext the render context - * @returns {void} - */ - sourceDependency(module, dependency, initFragments, source, generateContext) { - const constructor = /** @type {new (...args: any[]) => Dependency} */ ( - dependency.constructor - ); - const template = generateContext.dependencyTemplates.get(constructor); - if (!template) { - throw new Error( - "No template for dependency: " + dependency.constructor.name - ); - } - - const templateContext = { - runtimeTemplate: generateContext.runtimeTemplate, - dependencyTemplates: generateContext.dependencyTemplates, - moduleGraph: generateContext.moduleGraph, - chunkGraph: generateContext.chunkGraph, - module, - runtime: generateContext.runtime, - runtimeRequirements: generateContext.runtimeRequirements, - concatenationScope: generateContext.concatenationScope, - codeGenerationResults: generateContext.codeGenerationResults, - initFragments - }; - - template.apply(dependency, source, templateContext); - - // TODO remove in webpack 6 - if ("getInitFragments" in template) { - const fragments = deprecatedGetInitFragments( - template, - dependency, - templateContext - ); - - if (fragments) { - for (const fragment of fragments) { - initFragments.push(fragment); - } - } - } - } -} - -module.exports = JavascriptGenerator; - - -/***/ }), - -/***/ 36109: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncWaterfallHook, SyncHook, SyncBailHook } = __webpack_require__(44217); -const vm = __webpack_require__(26144); -const { - ConcatSource, - OriginalSource, - PrefixSource, - RawSource, - CachedSource -} = __webpack_require__(51255); -const Compilation = __webpack_require__(73002); -const { tryRunOrWebpackError } = __webpack_require__(35230); -const HotUpdateChunk = __webpack_require__(23834); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const { last, someInIterable } = __webpack_require__(30922); -const StringXor = __webpack_require__(8382); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const nonNumericOnlyHash = __webpack_require__(46849); -const { intersectRuntime } = __webpack_require__(47462); -const JavascriptGenerator = __webpack_require__(88893); -const JavascriptParser = __webpack_require__(33177); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../util/Hash")} Hash */ - -/** - * @param {Chunk} chunk a chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {boolean} true, when a JS file is needed for this chunk - */ -const chunkHasJs = (chunk, chunkGraph) => { - if (chunkGraph.getNumberOfEntryModules(chunk) > 0) return true; - - return chunkGraph.getChunkModulesIterableBySourceType(chunk, "javascript") - ? true - : false; -}; - -const printGeneratedCodeForStack = (module, code) => { - const lines = code.split("\n"); - const n = `${lines.length}`.length; - return `\n\nGenerated code for ${module.identifier()}\n${lines - .map((line, i, lines) => { - const iStr = `${i + 1}`; - return `${" ".repeat(n - iStr.length)}${iStr} | ${line}`; - }) - .join("\n")}`; -}; - -/** - * @typedef {Object} RenderContext - * @property {Chunk} chunk the chunk - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {CodeGenerationResults} codeGenerationResults results of code generation - * @property {boolean} strictMode rendering in strict context - */ - -/** - * @typedef {Object} MainRenderContext - * @property {Chunk} chunk the chunk - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {CodeGenerationResults} codeGenerationResults results of code generation - * @property {string} hash hash to be used for render call - * @property {boolean} strictMode rendering in strict context - */ - -/** - * @typedef {Object} ChunkRenderContext - * @property {Chunk} chunk the chunk - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {CodeGenerationResults} codeGenerationResults results of code generation - * @property {InitFragment[]} chunkInitFragments init fragments for the chunk - * @property {boolean} strictMode rendering in strict context - */ - -/** - * @typedef {Object} RenderBootstrapContext - * @property {Chunk} chunk the chunk - * @property {CodeGenerationResults} codeGenerationResults results of code generation - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {string} hash hash to be used for render call - */ - -/** @typedef {RenderContext & { inlined: boolean }} StartupRenderContext */ - -/** - * @typedef {Object} CompilationHooks - * @property {SyncWaterfallHook<[Source, Module, ChunkRenderContext]>} renderModuleContent - * @property {SyncWaterfallHook<[Source, Module, ChunkRenderContext]>} renderModuleContainer - * @property {SyncWaterfallHook<[Source, Module, ChunkRenderContext]>} renderModulePackage - * @property {SyncWaterfallHook<[Source, RenderContext]>} renderChunk - * @property {SyncWaterfallHook<[Source, RenderContext]>} renderMain - * @property {SyncWaterfallHook<[Source, RenderContext]>} renderContent - * @property {SyncWaterfallHook<[Source, RenderContext]>} render - * @property {SyncWaterfallHook<[Source, Module, StartupRenderContext]>} renderStartup - * @property {SyncWaterfallHook<[string, RenderBootstrapContext]>} renderRequire - * @property {SyncBailHook<[Module, RenderBootstrapContext], string>} inlineInRuntimeBailout - * @property {SyncBailHook<[Module, RenderContext], string>} embedInRuntimeBailout - * @property {SyncBailHook<[RenderContext], string>} strictRuntimeBailout - * @property {SyncHook<[Chunk, Hash, ChunkHashContext]>} chunkHash - * @property {SyncBailHook<[Chunk, RenderContext], boolean>} useSourceMap - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class JavascriptModulesPlugin { - /** - * @param {Compilation} compilation the compilation - * @returns {CompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - renderModuleContent: new SyncWaterfallHook([ - "source", - "module", - "renderContext" - ]), - renderModuleContainer: new SyncWaterfallHook([ - "source", - "module", - "renderContext" - ]), - renderModulePackage: new SyncWaterfallHook([ - "source", - "module", - "renderContext" - ]), - render: new SyncWaterfallHook(["source", "renderContext"]), - renderContent: new SyncWaterfallHook(["source", "renderContext"]), - renderStartup: new SyncWaterfallHook([ - "source", - "module", - "startupRenderContext" - ]), - renderChunk: new SyncWaterfallHook(["source", "renderContext"]), - renderMain: new SyncWaterfallHook(["source", "renderContext"]), - renderRequire: new SyncWaterfallHook(["code", "renderContext"]), - inlineInRuntimeBailout: new SyncBailHook(["module", "renderContext"]), - embedInRuntimeBailout: new SyncBailHook(["module", "renderContext"]), - strictRuntimeBailout: new SyncBailHook(["renderContext"]), - chunkHash: new SyncHook(["chunk", "hash", "context"]), - useSourceMap: new SyncBailHook(["chunk", "renderContext"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor(options = {}) { - this.options = options; - /** @type {WeakMap} */ - this._moduleFactoryCache = new WeakMap(); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "JavascriptModulesPlugin", - (compilation, { normalModuleFactory }) => { - const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); - normalModuleFactory.hooks.createParser - .for("javascript/auto") - .tap("JavascriptModulesPlugin", options => { - return new JavascriptParser("auto"); - }); - normalModuleFactory.hooks.createParser - .for("javascript/dynamic") - .tap("JavascriptModulesPlugin", options => { - return new JavascriptParser("script"); - }); - normalModuleFactory.hooks.createParser - .for("javascript/esm") - .tap("JavascriptModulesPlugin", options => { - return new JavascriptParser("module"); - }); - normalModuleFactory.hooks.createGenerator - .for("javascript/auto") - .tap("JavascriptModulesPlugin", () => { - return new JavascriptGenerator(); - }); - normalModuleFactory.hooks.createGenerator - .for("javascript/dynamic") - .tap("JavascriptModulesPlugin", () => { - return new JavascriptGenerator(); - }); - normalModuleFactory.hooks.createGenerator - .for("javascript/esm") - .tap("JavascriptModulesPlugin", () => { - return new JavascriptGenerator(); - }); - compilation.hooks.renderManifest.tap( - "JavascriptModulesPlugin", - (result, options) => { - const { - hash, - chunk, - chunkGraph, - moduleGraph, - runtimeTemplate, - dependencyTemplates, - outputOptions, - codeGenerationResults - } = options; - - const hotUpdateChunk = - chunk instanceof HotUpdateChunk ? chunk : null; - - let render; - const filenameTemplate = - JavascriptModulesPlugin.getChunkFilenameTemplate( - chunk, - outputOptions - ); - if (hotUpdateChunk) { - render = () => - this.renderChunk( - { - chunk, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - codeGenerationResults, - strictMode: runtimeTemplate.isModule() - }, - hooks - ); - } else if (chunk.hasRuntime()) { - render = () => - this.renderMain( - { - hash, - chunk, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - codeGenerationResults, - strictMode: runtimeTemplate.isModule() - }, - hooks, - compilation - ); - } else { - if (!chunkHasJs(chunk, chunkGraph)) { - return result; - } - - render = () => - this.renderChunk( - { - chunk, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - codeGenerationResults, - strictMode: runtimeTemplate.isModule() - }, - hooks - ); - } - - result.push({ - render, - filenameTemplate, - pathOptions: { - hash, - runtime: chunk.runtime, - chunk, - contentHashType: "javascript" - }, - info: { - javascriptModule: compilation.runtimeTemplate.isModule() - }, - identifier: hotUpdateChunk - ? `hotupdatechunk${chunk.id}` - : `chunk${chunk.id}`, - hash: chunk.contentHash.javascript - }); - - return result; - } - ); - compilation.hooks.chunkHash.tap( - "JavascriptModulesPlugin", - (chunk, hash, context) => { - hooks.chunkHash.call(chunk, hash, context); - if (chunk.hasRuntime()) { - this.updateHashWithBootstrap( - hash, - { - hash: "0000", - chunk, - codeGenerationResults: context.codeGenerationResults, - chunkGraph: context.chunkGraph, - moduleGraph: context.moduleGraph, - runtimeTemplate: context.runtimeTemplate - }, - hooks - ); - } - } - ); - compilation.hooks.contentHash.tap("JavascriptModulesPlugin", chunk => { - const { - chunkGraph, - codeGenerationResults, - moduleGraph, - runtimeTemplate, - outputOptions: { - hashSalt, - hashDigest, - hashDigestLength, - hashFunction - } - } = compilation; - const hash = createHash(hashFunction); - if (hashSalt) hash.update(hashSalt); - if (chunk.hasRuntime()) { - this.updateHashWithBootstrap( - hash, - { - hash: "0000", - chunk, - codeGenerationResults, - chunkGraph: compilation.chunkGraph, - moduleGraph: compilation.moduleGraph, - runtimeTemplate: compilation.runtimeTemplate - }, - hooks - ); - } else { - hash.update(`${chunk.id} `); - hash.update(chunk.ids ? chunk.ids.join(",") : ""); - } - hooks.chunkHash.call(chunk, hash, { - chunkGraph, - codeGenerationResults, - moduleGraph, - runtimeTemplate - }); - const modules = chunkGraph.getChunkModulesIterableBySourceType( - chunk, - "javascript" - ); - if (modules) { - const xor = new StringXor(); - for (const m of modules) { - xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); - } - xor.updateHash(hash); - } - const runtimeModules = chunkGraph.getChunkModulesIterableBySourceType( - chunk, - "runtime" - ); - if (runtimeModules) { - const xor = new StringXor(); - for (const m of runtimeModules) { - xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); - } - xor.updateHash(hash); - } - const digest = /** @type {string} */ (hash.digest(hashDigest)); - chunk.contentHash.javascript = nonNumericOnlyHash( - digest, - hashDigestLength - ); - }); - compilation.hooks.additionalTreeRuntimeRequirements.tap( - "JavascriptModulesPlugin", - (chunk, set, { chunkGraph }) => { - if ( - !set.has(RuntimeGlobals.startupNoDefault) && - chunkGraph.hasChunkEntryDependentChunks(chunk) - ) { - set.add(RuntimeGlobals.onChunksLoaded); - set.add(RuntimeGlobals.require); - } - } - ); - compilation.hooks.executeModule.tap( - "JavascriptModulesPlugin", - (options, context) => { - const source = - options.codeGenerationResult.sources.get("javascript"); - if (source === undefined) return; - const { module, moduleObject } = options; - const code = source.source(); - - const fn = vm.runInThisContext( - `(function(${module.moduleArgument}, ${module.exportsArgument}, __webpack_require__) {\n${code}\n/**/})`, - { - filename: module.identifier(), - lineOffset: -1 - } - ); - try { - fn.call( - moduleObject.exports, - moduleObject, - moduleObject.exports, - context.__webpack_require__ - ); - } catch (e) { - e.stack += printGeneratedCodeForStack(options.module, code); - throw e; - } - } - ); - compilation.hooks.executeModule.tap( - "JavascriptModulesPlugin", - (options, context) => { - const source = options.codeGenerationResult.sources.get("runtime"); - if (source === undefined) return; - let code = source.source(); - if (typeof code !== "string") code = code.toString(); - - const fn = vm.runInThisContext( - `(function(__webpack_require__) {\n${code}\n/**/})`, - { - filename: options.module.identifier(), - lineOffset: -1 - } - ); - try { - fn.call(null, context.__webpack_require__); - } catch (e) { - e.stack += printGeneratedCodeForStack(options.module, code); - throw e; - } - } - ); - } - ); - } - - static getChunkFilenameTemplate(chunk, outputOptions) { - if (chunk.filenameTemplate) { - return chunk.filenameTemplate; - } else if (chunk instanceof HotUpdateChunk) { - return outputOptions.hotUpdateChunkFilename; - } else if (chunk.canBeInitial()) { - return outputOptions.filename; - } else { - return outputOptions.chunkFilename; - } - } - - /** - * @param {Module} module the rendered module - * @param {ChunkRenderContext} renderContext options object - * @param {CompilationHooks} hooks hooks - * @param {boolean} factory true: renders as factory method, false: pure module content - * @returns {Source} the newly generated source from rendering - */ - renderModule(module, renderContext, hooks, factory) { - const { - chunk, - chunkGraph, - runtimeTemplate, - codeGenerationResults, - strictMode - } = renderContext; - try { - const codeGenResult = codeGenerationResults.get(module, chunk.runtime); - const moduleSource = codeGenResult.sources.get("javascript"); - if (!moduleSource) return null; - if (codeGenResult.data !== undefined) { - const chunkInitFragments = codeGenResult.data.get("chunkInitFragments"); - if (chunkInitFragments) { - for (const i of chunkInitFragments) - renderContext.chunkInitFragments.push(i); - } - } - const moduleSourcePostContent = tryRunOrWebpackError( - () => - hooks.renderModuleContent.call(moduleSource, module, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderModuleContent" - ); - let moduleSourcePostContainer; - if (factory) { - const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements( - module, - chunk.runtime - ); - const needModule = runtimeRequirements.has(RuntimeGlobals.module); - const needExports = runtimeRequirements.has(RuntimeGlobals.exports); - const needRequire = - runtimeRequirements.has(RuntimeGlobals.require) || - runtimeRequirements.has(RuntimeGlobals.requireScope); - const needThisAsExports = runtimeRequirements.has( - RuntimeGlobals.thisAsExports - ); - const needStrict = module.buildInfo.strict && !strictMode; - const cacheEntry = this._moduleFactoryCache.get( - moduleSourcePostContent - ); - let source; - if ( - cacheEntry && - cacheEntry.needModule === needModule && - cacheEntry.needExports === needExports && - cacheEntry.needRequire === needRequire && - cacheEntry.needThisAsExports === needThisAsExports && - cacheEntry.needStrict === needStrict - ) { - source = cacheEntry.source; - } else { - const factorySource = new ConcatSource(); - const args = []; - if (needExports || needRequire || needModule) - args.push( - needModule - ? module.moduleArgument - : "__unused_webpack_" + module.moduleArgument - ); - if (needExports || needRequire) - args.push( - needExports - ? module.exportsArgument - : "__unused_webpack_" + module.exportsArgument - ); - if (needRequire) args.push("__webpack_require__"); - if (!needThisAsExports && runtimeTemplate.supportsArrowFunction()) { - factorySource.add("/***/ ((" + args.join(", ") + ") => {\n\n"); - } else { - factorySource.add("/***/ (function(" + args.join(", ") + ") {\n\n"); - } - if (needStrict) { - factorySource.add('"use strict";\n'); - } - factorySource.add(moduleSourcePostContent); - factorySource.add("\n\n/***/ })"); - source = new CachedSource(factorySource); - this._moduleFactoryCache.set(moduleSourcePostContent, { - source, - needModule, - needExports, - needRequire, - needThisAsExports, - needStrict - }); - } - moduleSourcePostContainer = tryRunOrWebpackError( - () => hooks.renderModuleContainer.call(source, module, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer" - ); - } else { - moduleSourcePostContainer = moduleSourcePostContent; - } - return tryRunOrWebpackError( - () => - hooks.renderModulePackage.call( - moduleSourcePostContainer, - module, - renderContext - ), - "JavascriptModulesPlugin.getCompilationHooks().renderModulePackage" - ); - } catch (e) { - e.module = module; - throw e; - } - } - - /** - * @param {RenderContext} renderContext the render context - * @param {CompilationHooks} hooks hooks - * @returns {Source} the rendered source - */ - renderChunk(renderContext, hooks) { - const { chunk, chunkGraph } = renderContext; - const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "javascript", - compareModulesByIdentifier - ); - const allModules = modules ? Array.from(modules) : []; - let strictHeader; - let allStrict = renderContext.strictMode; - if (!allStrict && allModules.every(m => m.buildInfo.strict)) { - const strictBailout = hooks.strictRuntimeBailout.call(renderContext); - strictHeader = strictBailout - ? `// runtime can't be in strict mode because ${strictBailout}.\n` - : '"use strict";\n'; - if (!strictBailout) allStrict = true; - } - /** @type {ChunkRenderContext} */ - const chunkRenderContext = { - ...renderContext, - chunkInitFragments: [], - strictMode: allStrict - }; - const moduleSources = - Template.renderChunkModules(chunkRenderContext, allModules, module => - this.renderModule(module, chunkRenderContext, hooks, true) - ) || new RawSource("{}"); - let source = tryRunOrWebpackError( - () => hooks.renderChunk.call(moduleSources, chunkRenderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderChunk" - ); - source = tryRunOrWebpackError( - () => hooks.renderContent.call(source, chunkRenderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderContent" - ); - if (!source) { - throw new Error( - "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderContent plugins should return something" - ); - } - source = InitFragment.addToSource( - source, - chunkRenderContext.chunkInitFragments, - chunkRenderContext - ); - source = tryRunOrWebpackError( - () => hooks.render.call(source, chunkRenderContext), - "JavascriptModulesPlugin.getCompilationHooks().render" - ); - if (!source) { - throw new Error( - "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().render plugins should return something" - ); - } - chunk.rendered = true; - return strictHeader - ? new ConcatSource(strictHeader, source, ";") - : renderContext.runtimeTemplate.isModule() - ? source - : new ConcatSource(source, ";"); - } - - /** - * @param {MainRenderContext} renderContext options object - * @param {CompilationHooks} hooks hooks - * @param {Compilation} compilation the compilation - * @returns {Source} the newly generated source from rendering - */ - renderMain(renderContext, hooks, compilation) { - const { chunk, chunkGraph, runtimeTemplate } = renderContext; - - const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); - const iife = runtimeTemplate.isIIFE(); - - const bootstrap = this.renderBootstrap(renderContext, hooks); - const useSourceMap = hooks.useSourceMap.call(chunk, renderContext); - - const allModules = Array.from( - chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "javascript", - compareModulesByIdentifier - ) || [] - ); - - const hasEntryModules = chunkGraph.getNumberOfEntryModules(chunk) > 0; - let inlinedModules; - if (bootstrap.allowInlineStartup && hasEntryModules) { - inlinedModules = new Set(chunkGraph.getChunkEntryModulesIterable(chunk)); - } - - let source = new ConcatSource(); - let prefix; - if (iife) { - if (runtimeTemplate.supportsArrowFunction()) { - source.add("/******/ (() => { // webpackBootstrap\n"); - } else { - source.add("/******/ (function() { // webpackBootstrap\n"); - } - prefix = "/******/ \t"; - } else { - prefix = "/******/ "; - } - let allStrict = renderContext.strictMode; - if (!allStrict && allModules.every(m => m.buildInfo.strict)) { - const strictBailout = hooks.strictRuntimeBailout.call(renderContext); - if (strictBailout) { - source.add( - prefix + - `// runtime can't be in strict mode because ${strictBailout}.\n` - ); - } else { - allStrict = true; - source.add(prefix + '"use strict";\n'); - } - } - - /** @type {ChunkRenderContext} */ - const chunkRenderContext = { - ...renderContext, - chunkInitFragments: [], - strictMode: allStrict - }; - - const chunkModules = Template.renderChunkModules( - chunkRenderContext, - inlinedModules - ? allModules.filter(m => !inlinedModules.has(m)) - : allModules, - module => this.renderModule(module, chunkRenderContext, hooks, true), - prefix - ); - if ( - chunkModules || - runtimeRequirements.has(RuntimeGlobals.moduleFactories) || - runtimeRequirements.has(RuntimeGlobals.moduleFactoriesAddOnly) || - runtimeRequirements.has(RuntimeGlobals.require) - ) { - source.add(prefix + "var __webpack_modules__ = ("); - source.add(chunkModules || "{}"); - source.add(");\n"); - source.add( - "/************************************************************************/\n" - ); - } - - if (bootstrap.header.length > 0) { - const header = Template.asString(bootstrap.header) + "\n"; - source.add( - new PrefixSource( - prefix, - useSourceMap - ? new OriginalSource(header, "webpack/bootstrap") - : new RawSource(header) - ) - ); - source.add( - "/************************************************************************/\n" - ); - } - - const runtimeModules = - renderContext.chunkGraph.getChunkRuntimeModulesInOrder(chunk); - - if (runtimeModules.length > 0) { - source.add( - new PrefixSource( - prefix, - Template.renderRuntimeModules(runtimeModules, chunkRenderContext) - ) - ); - source.add( - "/************************************************************************/\n" - ); - // runtimeRuntimeModules calls codeGeneration - for (const module of runtimeModules) { - compilation.codeGeneratedModules.add(module); - } - } - if (inlinedModules) { - if (bootstrap.beforeStartup.length > 0) { - const beforeStartup = Template.asString(bootstrap.beforeStartup) + "\n"; - source.add( - new PrefixSource( - prefix, - useSourceMap - ? new OriginalSource(beforeStartup, "webpack/before-startup") - : new RawSource(beforeStartup) - ) - ); - } - const lastInlinedModule = last(inlinedModules); - const startupSource = new ConcatSource(); - startupSource.add(`var __webpack_exports__ = {};\n`); - for (const m of inlinedModules) { - const renderedModule = this.renderModule( - m, - chunkRenderContext, - hooks, - false - ); - if (renderedModule) { - const innerStrict = !allStrict && m.buildInfo.strict; - const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements( - m, - chunk.runtime - ); - const exports = runtimeRequirements.has(RuntimeGlobals.exports); - const webpackExports = - exports && m.exportsArgument === "__webpack_exports__"; - let iife = innerStrict - ? "it need to be in strict mode." - : inlinedModules.size > 1 - ? // TODO check globals and top-level declarations of other entries and chunk modules - // to make a better decision - "it need to be isolated against other entry modules." - : chunkModules - ? "it need to be isolated against other modules in the chunk." - : exports && !webpackExports - ? `it uses a non-standard name for the exports (${m.exportsArgument}).` - : hooks.embedInRuntimeBailout.call(m, renderContext); - let footer; - if (iife !== undefined) { - startupSource.add( - `// This entry need to be wrapped in an IIFE because ${iife}\n` - ); - const arrow = runtimeTemplate.supportsArrowFunction(); - if (arrow) { - startupSource.add("(() => {\n"); - footer = "\n})();\n\n"; - } else { - startupSource.add("!function() {\n"); - footer = "\n}();\n"; - } - if (innerStrict) startupSource.add('"use strict";\n'); - } else { - footer = "\n"; - } - if (exports) { - if (m !== lastInlinedModule) - startupSource.add(`var ${m.exportsArgument} = {};\n`); - else if (m.exportsArgument !== "__webpack_exports__") - startupSource.add( - `var ${m.exportsArgument} = __webpack_exports__;\n` - ); - } - startupSource.add(renderedModule); - startupSource.add(footer); - } - } - if (runtimeRequirements.has(RuntimeGlobals.onChunksLoaded)) { - startupSource.add( - `__webpack_exports__ = ${RuntimeGlobals.onChunksLoaded}(__webpack_exports__);\n` - ); - } - source.add( - hooks.renderStartup.call(startupSource, lastInlinedModule, { - ...renderContext, - inlined: true - }) - ); - if (bootstrap.afterStartup.length > 0) { - const afterStartup = Template.asString(bootstrap.afterStartup) + "\n"; - source.add( - new PrefixSource( - prefix, - useSourceMap - ? new OriginalSource(afterStartup, "webpack/after-startup") - : new RawSource(afterStartup) - ) - ); - } - } else { - const lastEntryModule = last( - chunkGraph.getChunkEntryModulesIterable(chunk) - ); - const toSource = useSourceMap - ? (content, name) => - new OriginalSource(Template.asString(content), name) - : content => new RawSource(Template.asString(content)); - source.add( - new PrefixSource( - prefix, - new ConcatSource( - toSource(bootstrap.beforeStartup, "webpack/before-startup"), - "\n", - hooks.renderStartup.call( - toSource(bootstrap.startup.concat(""), "webpack/startup"), - lastEntryModule, - { - ...renderContext, - inlined: false - } - ), - toSource(bootstrap.afterStartup, "webpack/after-startup"), - "\n" - ) - ) - ); - } - if ( - hasEntryModules && - runtimeRequirements.has(RuntimeGlobals.returnExportsFromRuntime) - ) { - source.add(`${prefix}return __webpack_exports__;\n`); - } - if (iife) { - source.add("/******/ })()\n"); - } - - /** @type {Source} */ - let finalSource = tryRunOrWebpackError( - () => hooks.renderMain.call(source, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderMain" - ); - if (!finalSource) { - throw new Error( - "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderMain plugins should return something" - ); - } - finalSource = tryRunOrWebpackError( - () => hooks.renderContent.call(finalSource, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderContent" - ); - if (!finalSource) { - throw new Error( - "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderContent plugins should return something" - ); - } - finalSource = InitFragment.addToSource( - finalSource, - chunkRenderContext.chunkInitFragments, - chunkRenderContext - ); - finalSource = tryRunOrWebpackError( - () => hooks.render.call(finalSource, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().render" - ); - if (!finalSource) { - throw new Error( - "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().render plugins should return something" - ); - } - chunk.rendered = true; - return iife ? new ConcatSource(finalSource, ";") : finalSource; - } - - /** - * @param {Hash} hash the hash to be updated - * @param {RenderBootstrapContext} renderContext options object - * @param {CompilationHooks} hooks hooks - */ - updateHashWithBootstrap(hash, renderContext, hooks) { - const bootstrap = this.renderBootstrap(renderContext, hooks); - for (const key of Object.keys(bootstrap)) { - hash.update(key); - if (Array.isArray(bootstrap[key])) { - for (const line of bootstrap[key]) { - hash.update(line); - } - } else { - hash.update(JSON.stringify(bootstrap[key])); - } - } - } - - /** - * @param {RenderBootstrapContext} renderContext options object - * @param {CompilationHooks} hooks hooks - * @returns {{ header: string[], beforeStartup: string[], startup: string[], afterStartup: string[], allowInlineStartup: boolean }} the generated source of the bootstrap code - */ - renderBootstrap(renderContext, hooks) { - const { - chunkGraph, - codeGenerationResults, - moduleGraph, - chunk, - runtimeTemplate - } = renderContext; - - const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); - - const requireFunction = runtimeRequirements.has(RuntimeGlobals.require); - const moduleCache = runtimeRequirements.has(RuntimeGlobals.moduleCache); - const moduleFactories = runtimeRequirements.has( - RuntimeGlobals.moduleFactories - ); - const moduleUsed = runtimeRequirements.has(RuntimeGlobals.module); - const requireScopeUsed = runtimeRequirements.has( - RuntimeGlobals.requireScope - ); - const interceptModuleExecution = runtimeRequirements.has( - RuntimeGlobals.interceptModuleExecution - ); - - const useRequire = - requireFunction || interceptModuleExecution || moduleUsed; - - const result = { - header: [], - beforeStartup: [], - startup: [], - afterStartup: [], - allowInlineStartup: true - }; - - let { header: buf, startup, beforeStartup, afterStartup } = result; - - if (result.allowInlineStartup && moduleFactories) { - startup.push( - "// module factories are used so entry inlining is disabled" - ); - result.allowInlineStartup = false; - } - if (result.allowInlineStartup && moduleCache) { - startup.push("// module cache are used so entry inlining is disabled"); - result.allowInlineStartup = false; - } - if (result.allowInlineStartup && interceptModuleExecution) { - startup.push( - "// module execution is intercepted so entry inlining is disabled" - ); - result.allowInlineStartup = false; - } - - if (useRequire || moduleCache) { - buf.push("// The module cache"); - buf.push("var __webpack_module_cache__ = {};"); - buf.push(""); - } - - if (useRequire) { - buf.push("// The require function"); - buf.push(`function __webpack_require__(moduleId) {`); - buf.push(Template.indent(this.renderRequire(renderContext, hooks))); - buf.push("}"); - buf.push(""); - } else if (runtimeRequirements.has(RuntimeGlobals.requireScope)) { - buf.push("// The require scope"); - buf.push("var __webpack_require__ = {};"); - buf.push(""); - } - - if ( - moduleFactories || - runtimeRequirements.has(RuntimeGlobals.moduleFactoriesAddOnly) - ) { - buf.push("// expose the modules object (__webpack_modules__)"); - buf.push(`${RuntimeGlobals.moduleFactories} = __webpack_modules__;`); - buf.push(""); - } - - if (moduleCache) { - buf.push("// expose the module cache"); - buf.push(`${RuntimeGlobals.moduleCache} = __webpack_module_cache__;`); - buf.push(""); - } - - if (interceptModuleExecution) { - buf.push("// expose the module execution interceptor"); - buf.push(`${RuntimeGlobals.interceptModuleExecution} = [];`); - buf.push(""); - } - - if (!runtimeRequirements.has(RuntimeGlobals.startupNoDefault)) { - if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { - /** @type {string[]} */ - const buf2 = []; - const runtimeRequirements = - chunkGraph.getTreeRuntimeRequirements(chunk); - buf2.push("// Load entry module and return exports"); - let i = chunkGraph.getNumberOfEntryModules(chunk); - for (const [ - entryModule, - entrypoint - ] of chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk)) { - const chunks = entrypoint.chunks.filter(c => c !== chunk); - if (result.allowInlineStartup && chunks.length > 0) { - buf2.push( - "// This entry module depends on other loaded chunks and execution need to be delayed" - ); - result.allowInlineStartup = false; - } - if ( - result.allowInlineStartup && - someInIterable( - moduleGraph.getIncomingConnectionsByOriginModule(entryModule), - ([originModule, connections]) => - originModule && - connections.some(c => c.isTargetActive(chunk.runtime)) && - someInIterable( - chunkGraph.getModuleRuntimes(originModule), - runtime => - intersectRuntime(runtime, chunk.runtime) !== undefined - ) - ) - ) { - buf2.push( - "// This entry module is referenced by other modules so it can't be inlined" - ); - result.allowInlineStartup = false; - } - - let data; - if (codeGenerationResults.has(entryModule, chunk.runtime)) { - const result = codeGenerationResults.get( - entryModule, - chunk.runtime - ); - data = result.data; - } - if ( - result.allowInlineStartup && - (!data || !data.get("topLevelDeclarations")) && - (!entryModule.buildInfo || - !entryModule.buildInfo.topLevelDeclarations) - ) { - buf2.push( - "// This entry module doesn't tell about it's top-level declarations so it can't be inlined" - ); - result.allowInlineStartup = false; - } - if (result.allowInlineStartup) { - const bailout = hooks.inlineInRuntimeBailout.call( - entryModule, - renderContext - ); - if (bailout !== undefined) { - buf2.push( - `// This entry module can't be inlined because ${bailout}` - ); - result.allowInlineStartup = false; - } - } - i--; - const moduleId = chunkGraph.getModuleId(entryModule); - const entryRuntimeRequirements = - chunkGraph.getModuleRuntimeRequirements(entryModule, chunk.runtime); - let moduleIdExpr = JSON.stringify(moduleId); - if (runtimeRequirements.has(RuntimeGlobals.entryModuleId)) { - moduleIdExpr = `${RuntimeGlobals.entryModuleId} = ${moduleIdExpr}`; - } - if ( - result.allowInlineStartup && - entryRuntimeRequirements.has(RuntimeGlobals.module) - ) { - result.allowInlineStartup = false; - buf2.push( - "// This entry module used 'module' so it can't be inlined" - ); - } - if (chunks.length > 0) { - buf2.push( - `${i === 0 ? "var __webpack_exports__ = " : ""}${ - RuntimeGlobals.onChunksLoaded - }(undefined, ${JSON.stringify( - chunks.map(c => c.id) - )}, ${runtimeTemplate.returningFunction( - `__webpack_require__(${moduleIdExpr})` - )})` - ); - } else if (useRequire) { - buf2.push( - `${ - i === 0 ? "var __webpack_exports__ = " : "" - }__webpack_require__(${moduleIdExpr});` - ); - } else { - if (i === 0) buf2.push("var __webpack_exports__ = {};"); - if (requireScopeUsed) { - buf2.push( - `__webpack_modules__[${moduleIdExpr}](0, ${ - i === 0 ? "__webpack_exports__" : "{}" - }, __webpack_require__);` - ); - } else if (entryRuntimeRequirements.has(RuntimeGlobals.exports)) { - buf2.push( - `__webpack_modules__[${moduleIdExpr}](0, ${ - i === 0 ? "__webpack_exports__" : "{}" - });` - ); - } else { - buf2.push(`__webpack_modules__[${moduleIdExpr}]();`); - } - } - } - if (runtimeRequirements.has(RuntimeGlobals.onChunksLoaded)) { - buf2.push( - `__webpack_exports__ = ${RuntimeGlobals.onChunksLoaded}(__webpack_exports__);` - ); - } - if ( - runtimeRequirements.has(RuntimeGlobals.startup) || - (runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore) && - runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter)) - ) { - result.allowInlineStartup = false; - buf.push("// the startup function"); - buf.push( - `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction("", [ - ...buf2, - "return __webpack_exports__;" - ])};` - ); - buf.push(""); - startup.push("// run startup"); - startup.push( - `var __webpack_exports__ = ${RuntimeGlobals.startup}();` - ); - } else if (runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore)) { - buf.push("// the startup function"); - buf.push( - `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};` - ); - beforeStartup.push("// run runtime startup"); - beforeStartup.push(`${RuntimeGlobals.startup}();`); - startup.push("// startup"); - startup.push(Template.asString(buf2)); - } else if (runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter)) { - buf.push("// the startup function"); - buf.push( - `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};` - ); - startup.push("// startup"); - startup.push(Template.asString(buf2)); - afterStartup.push("// run runtime startup"); - afterStartup.push(`${RuntimeGlobals.startup}();`); - } else { - startup.push("// startup"); - startup.push(Template.asString(buf2)); - } - } else if ( - runtimeRequirements.has(RuntimeGlobals.startup) || - runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore) || - runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter) - ) { - buf.push( - "// the startup function", - "// It's empty as no entry modules are in this chunk", - `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};`, - "" - ); - } - } else if ( - runtimeRequirements.has(RuntimeGlobals.startup) || - runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore) || - runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter) - ) { - result.allowInlineStartup = false; - buf.push( - "// the startup function", - "// It's empty as some runtime module handles the default behavior", - `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};` - ); - startup.push("// run startup"); - startup.push(`var __webpack_exports__ = ${RuntimeGlobals.startup}();`); - } - return result; - } - - /** - * @param {RenderBootstrapContext} renderContext options object - * @param {CompilationHooks} hooks hooks - * @returns {string} the generated source of the require function - */ - renderRequire(renderContext, hooks) { - const { - chunk, - chunkGraph, - runtimeTemplate: { outputOptions } - } = renderContext; - const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); - const moduleExecution = runtimeRequirements.has( - RuntimeGlobals.interceptModuleExecution - ) - ? Template.asString([ - "var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };", - `${RuntimeGlobals.interceptModuleExecution}.forEach(function(handler) { handler(execOptions); });`, - "module = execOptions.module;", - "execOptions.factory.call(module.exports, module, module.exports, execOptions.require);" - ]) - : runtimeRequirements.has(RuntimeGlobals.thisAsExports) - ? Template.asString([ - "__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);" - ]) - : Template.asString([ - "__webpack_modules__[moduleId](module, module.exports, __webpack_require__);" - ]); - const needModuleId = runtimeRequirements.has(RuntimeGlobals.moduleId); - const needModuleLoaded = runtimeRequirements.has( - RuntimeGlobals.moduleLoaded - ); - const content = Template.asString([ - "// Check if module is in cache", - "var cachedModule = __webpack_module_cache__[moduleId];", - "if (cachedModule !== undefined) {", - outputOptions.strictModuleErrorHandling - ? Template.indent([ - "if (cachedModule.error !== undefined) throw cachedModule.error;", - "return cachedModule.exports;" - ]) - : Template.indent("return cachedModule.exports;"), - "}", - "// Create a new module (and put it into the cache)", - "var module = __webpack_module_cache__[moduleId] = {", - Template.indent([ - needModuleId ? "id: moduleId," : "// no module.id needed", - needModuleLoaded ? "loaded: false," : "// no module.loaded needed", - "exports: {}" - ]), - "};", - "", - outputOptions.strictModuleExceptionHandling - ? Template.asString([ - "// Execute the module function", - "var threw = true;", - "try {", - Template.indent([moduleExecution, "threw = false;"]), - "} finally {", - Template.indent([ - "if(threw) delete __webpack_module_cache__[moduleId];" - ]), - "}" - ]) - : outputOptions.strictModuleErrorHandling - ? Template.asString([ - "// Execute the module function", - "try {", - Template.indent(moduleExecution), - "} catch(e) {", - Template.indent(["module.error = e;", "throw e;"]), - "}" - ]) - : Template.asString([ - "// Execute the module function", - moduleExecution - ]), - needModuleLoaded - ? Template.asString([ - "", - "// Flag the module as loaded", - "module.loaded = true;", - "" - ]) - : "", - "// Return the exports of the module", - "return module.exports;" - ]); - return tryRunOrWebpackError( - () => hooks.renderRequire.call(content, renderContext), - "JavascriptModulesPlugin.getCompilationHooks().renderRequire" - ); - } -} - -module.exports = JavascriptModulesPlugin; -module.exports.chunkHasJs = chunkHasJs; - - -/***/ }), - -/***/ 33177: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { Parser: AcornParser } = __webpack_require__(31988); -const { importAssertions } = __webpack_require__(81579); -const { SyncBailHook, HookMap } = __webpack_require__(44217); -const vm = __webpack_require__(26144); -const Parser = __webpack_require__(68646); -const StackedMap = __webpack_require__(53214); -const binarySearchBounds = __webpack_require__(12076); -const memoize = __webpack_require__(61374); -const BasicEvaluatedExpression = __webpack_require__(94844); - -/** @typedef {import("acorn").Options} AcornOptions */ -/** @typedef {import("estree").ArrayExpression} ArrayExpressionNode */ -/** @typedef {import("estree").BinaryExpression} BinaryExpressionNode */ -/** @typedef {import("estree").BlockStatement} BlockStatementNode */ -/** @typedef {import("estree").SequenceExpression} SequenceExpressionNode */ -/** @typedef {import("estree").CallExpression} CallExpressionNode */ -/** @typedef {import("estree").ClassDeclaration} ClassDeclarationNode */ -/** @typedef {import("estree").ClassExpression} ClassExpressionNode */ -/** @typedef {import("estree").Comment} CommentNode */ -/** @typedef {import("estree").ConditionalExpression} ConditionalExpressionNode */ -/** @typedef {import("estree").Declaration} DeclarationNode */ -/** @typedef {import("estree").PrivateIdentifier} PrivateIdentifierNode */ -/** @typedef {import("estree").PropertyDefinition} PropertyDefinitionNode */ -/** @typedef {import("estree").Expression} ExpressionNode */ -/** @typedef {import("estree").Identifier} IdentifierNode */ -/** @typedef {import("estree").IfStatement} IfStatementNode */ -/** @typedef {import("estree").LabeledStatement} LabeledStatementNode */ -/** @typedef {import("estree").Literal} LiteralNode */ -/** @typedef {import("estree").LogicalExpression} LogicalExpressionNode */ -/** @typedef {import("estree").ChainExpression} ChainExpressionNode */ -/** @typedef {import("estree").MemberExpression} MemberExpressionNode */ -/** @typedef {import("estree").MetaProperty} MetaPropertyNode */ -/** @typedef {import("estree").MethodDefinition} MethodDefinitionNode */ -/** @typedef {import("estree").ModuleDeclaration} ModuleDeclarationNode */ -/** @typedef {import("estree").NewExpression} NewExpressionNode */ -/** @typedef {import("estree").Node} AnyNode */ -/** @typedef {import("estree").Program} ProgramNode */ -/** @typedef {import("estree").Statement} StatementNode */ -/** @typedef {import("estree").ImportDeclaration} ImportDeclarationNode */ -/** @typedef {import("estree").ExportNamedDeclaration} ExportNamedDeclarationNode */ -/** @typedef {import("estree").ExportDefaultDeclaration} ExportDefaultDeclarationNode */ -/** @typedef {import("estree").ExportAllDeclaration} ExportAllDeclarationNode */ -/** @typedef {import("estree").Super} SuperNode */ -/** @typedef {import("estree").TaggedTemplateExpression} TaggedTemplateExpressionNode */ -/** @typedef {import("estree").TemplateLiteral} TemplateLiteralNode */ -/** @typedef {import("estree").ThisExpression} ThisExpressionNode */ -/** @typedef {import("estree").UnaryExpression} UnaryExpressionNode */ -/** @typedef {import("estree").VariableDeclarator} VariableDeclaratorNode */ -/** @template T @typedef {import("tapable").AsArray} AsArray */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ -/** @typedef {{declaredScope: ScopeInfo, freeName: string | true, tagInfo: TagInfo | undefined}} VariableInfoInterface */ -/** @typedef {{ name: string | VariableInfo, rootInfo: string | VariableInfo, getMembers: () => string[], getMembersOptionals: () => boolean[] }} GetInfoResult */ - -const EMPTY_ARRAY = []; -const ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = 0b01; -const ALLOWED_MEMBER_TYPES_EXPRESSION = 0b10; -const ALLOWED_MEMBER_TYPES_ALL = 0b11; - -// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API - -const parser = AcornParser.extend(importAssertions); - -class VariableInfo { - /** - * @param {ScopeInfo} declaredScope scope in which the variable is declared - * @param {string | true} freeName which free name the variable aliases, or true when none - * @param {TagInfo | undefined} tagInfo info about tags - */ - constructor(declaredScope, freeName, tagInfo) { - this.declaredScope = declaredScope; - this.freeName = freeName; - this.tagInfo = tagInfo; - } -} - -/** @typedef {string | ScopeInfo | VariableInfo} ExportedVariableInfo */ -/** @typedef {LiteralNode | string | null | undefined} ImportSource */ -/** @typedef {Omit & { sourceType: "module" | "script" | "auto", ecmaVersion?: AcornOptions["ecmaVersion"] }} ParseOptions */ - -/** - * @typedef {Object} TagInfo - * @property {any} tag - * @property {any} data - * @property {TagInfo | undefined} next - */ - -/** - * @typedef {Object} ScopeInfo - * @property {StackedMap} definitions - * @property {boolean | "arrow"} topLevelScope - * @property {boolean} inShorthand - * @property {boolean} isStrict - * @property {boolean} isAsmJs - * @property {boolean} inTry - */ - -const joinRanges = (startRange, endRange) => { - if (!endRange) return startRange; - if (!startRange) return endRange; - return [startRange[0], endRange[1]]; -}; - -const objectAndMembersToName = (object, membersReversed) => { - let name = object; - for (let i = membersReversed.length - 1; i >= 0; i--) { - name = name + "." + membersReversed[i]; - } - return name; -}; - -const getRootName = expression => { - switch (expression.type) { - case "Identifier": - return expression.name; - case "ThisExpression": - return "this"; - case "MetaProperty": - return `${expression.meta.name}.${expression.property.name}`; - default: - return undefined; - } -}; - -/** @type {AcornOptions} */ -const defaultParserOptions = { - ranges: true, - locations: true, - ecmaVersion: "latest", - sourceType: "module", - // https://github.com/tc39/proposal-hashbang - allowHashBang: true, - onComment: null -}; - -// regexp to match at least one "magic comment" -const webpackCommentRegExp = new RegExp(/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/); - -const EMPTY_COMMENT_OPTIONS = { - options: null, - errors: null -}; - -class JavascriptParser extends Parser { - /** - * @param {"module" | "script" | "auto"} sourceType default source type - */ - constructor(sourceType = "auto") { - super(); - this.hooks = Object.freeze({ - /** @type {HookMap>} */ - evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {HookMap>} */ - evaluate: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {HookMap>} */ - evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {HookMap>} */ - evaluateDefinedIdentifier: new HookMap( - () => new SyncBailHook(["expression"]) - ), - /** @type {HookMap>} */ - evaluateNewExpression: new HookMap( - () => new SyncBailHook(["expression"]) - ), - /** @type {HookMap>} */ - evaluateCallExpression: new HookMap( - () => new SyncBailHook(["expression"]) - ), - /** @type {HookMap>} */ - evaluateCallExpressionMember: new HookMap( - () => new SyncBailHook(["expression", "param"]) - ), - /** @type {HookMap>} */ - isPure: new HookMap( - () => new SyncBailHook(["expression", "commentsStartPosition"]) - ), - /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ - preStatement: new SyncBailHook(["statement"]), - - /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ - blockPreStatement: new SyncBailHook(["declaration"]), - /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ - statement: new SyncBailHook(["statement"]), - /** @type {SyncBailHook<[IfStatementNode], boolean | void>} */ - statementIf: new SyncBailHook(["statement"]), - /** @type {SyncBailHook<[ExpressionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */ - classExtendsExpression: new SyncBailHook([ - "expression", - "classDefinition" - ]), - /** @type {SyncBailHook<[MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */ - classBodyElement: new SyncBailHook(["element", "classDefinition"]), - /** @type {SyncBailHook<[ExpressionNode, MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */ - classBodyValue: new SyncBailHook([ - "expression", - "element", - "classDefinition" - ]), - /** @type {HookMap>} */ - label: new HookMap(() => new SyncBailHook(["statement"])), - /** @type {SyncBailHook<[ImportDeclarationNode, ImportSource], boolean | void>} */ - import: new SyncBailHook(["statement", "source"]), - /** @type {SyncBailHook<[ImportDeclarationNode, ImportSource, string, string], boolean | void>} */ - importSpecifier: new SyncBailHook([ - "statement", - "source", - "exportName", - "identifierName" - ]), - /** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode], boolean | void>} */ - export: new SyncBailHook(["statement"]), - /** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, ImportSource], boolean | void>} */ - exportImport: new SyncBailHook(["statement", "source"]), - /** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, DeclarationNode], boolean | void>} */ - exportDeclaration: new SyncBailHook(["statement", "declaration"]), - /** @type {SyncBailHook<[ExportDefaultDeclarationNode, DeclarationNode], boolean | void>} */ - exportExpression: new SyncBailHook(["statement", "declaration"]), - /** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, string, string, number | undefined], boolean | void>} */ - exportSpecifier: new SyncBailHook([ - "statement", - "identifierName", - "exportName", - "index" - ]), - /** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, ImportSource, string, string, number | undefined], boolean | void>} */ - exportImportSpecifier: new SyncBailHook([ - "statement", - "source", - "identifierName", - "exportName", - "index" - ]), - /** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */ - preDeclarator: new SyncBailHook(["declarator", "statement"]), - /** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */ - declarator: new SyncBailHook(["declarator", "statement"]), - /** @type {HookMap>} */ - varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])), - /** @type {HookMap>} */ - varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])), - /** @type {HookMap>} */ - varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])), - /** @type {HookMap>} */ - varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])), - /** @type {HookMap>} */ - pattern: new HookMap(() => new SyncBailHook(["pattern"])), - /** @type {HookMap>} */ - canRename: new HookMap(() => new SyncBailHook(["initExpression"])), - /** @type {HookMap>} */ - rename: new HookMap(() => new SyncBailHook(["initExpression"])), - /** @type {HookMap>} */ - assign: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {HookMap>} */ - assignMemberChain: new HookMap( - () => new SyncBailHook(["expression", "members"]) - ), - /** @type {HookMap>} */ - typeof: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ - importCall: new SyncBailHook(["expression"]), - /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ - topLevelAwait: new SyncBailHook(["expression"]), - /** @type {HookMap>} */ - call: new HookMap(() => new SyncBailHook(["expression"])), - /** Something like "a.b()" */ - /** @type {HookMap>} */ - callMemberChain: new HookMap( - () => new SyncBailHook(["expression", "members", "membersOptionals"]) - ), - /** Something like "a.b().c.d" */ - /** @type {HookMap>} */ - memberChainOfCallMemberChain: new HookMap( - () => - new SyncBailHook([ - "expression", - "calleeMembers", - "callExpression", - "members" - ]) - ), - /** Something like "a.b().c.d()"" */ - /** @type {HookMap>} */ - callMemberChainOfCallMemberChain: new HookMap( - () => - new SyncBailHook([ - "expression", - "calleeMembers", - "innerCallExpression", - "members" - ]) - ), - /** @type {SyncBailHook<[ChainExpressionNode], boolean | void>} */ - optionalChaining: new SyncBailHook(["optionalChaining"]), - /** @type {HookMap>} */ - new: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {SyncBailHook<[BinaryExpressionNode], boolean | void>} */ - binaryExpression: new SyncBailHook(["binaryExpression"]), - /** @type {HookMap>} */ - expression: new HookMap(() => new SyncBailHook(["expression"])), - /** @type {HookMap>} */ - expressionMemberChain: new HookMap( - () => new SyncBailHook(["expression", "members", "membersOptionals"]) - ), - /** @type {HookMap>} */ - unhandledExpressionMemberChain: new HookMap( - () => new SyncBailHook(["expression", "members"]) - ), - /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ - expressionConditionalOperator: new SyncBailHook(["expression"]), - /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ - expressionLogicalOperator: new SyncBailHook(["expression"]), - /** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */ - program: new SyncBailHook(["ast", "comments"]), - /** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */ - finish: new SyncBailHook(["ast", "comments"]) - }); - this.sourceType = sourceType; - /** @type {ScopeInfo} */ - this.scope = undefined; - /** @type {ParserState} */ - this.state = undefined; - this.comments = undefined; - this.semicolons = undefined; - /** @type {(StatementNode|ExpressionNode)[]} */ - this.statementPath = undefined; - this.prevStatement = undefined; - this.currentTagData = undefined; - this._initializeEvaluating(); - } - - _initializeEvaluating() { - this.hooks.evaluate.for("Literal").tap("JavascriptParser", _expr => { - const expr = /** @type {LiteralNode} */ (_expr); - - switch (typeof expr.value) { - case "number": - return new BasicEvaluatedExpression() - .setNumber(expr.value) - .setRange(expr.range); - case "bigint": - return new BasicEvaluatedExpression() - .setBigInt(expr.value) - .setRange(expr.range); - case "string": - return new BasicEvaluatedExpression() - .setString(expr.value) - .setRange(expr.range); - case "boolean": - return new BasicEvaluatedExpression() - .setBoolean(expr.value) - .setRange(expr.range); - } - if (expr.value === null) { - return new BasicEvaluatedExpression().setNull().setRange(expr.range); - } - if (expr.value instanceof RegExp) { - return new BasicEvaluatedExpression() - .setRegExp(expr.value) - .setRange(expr.range); - } - }); - this.hooks.evaluate.for("NewExpression").tap("JavascriptParser", _expr => { - const expr = /** @type {NewExpressionNode} */ (_expr); - const callee = expr.callee; - if (callee.type !== "Identifier") return; - if (callee.name !== "RegExp") { - return this.callHooksForName( - this.hooks.evaluateNewExpression, - callee.name, - expr - ); - } else if ( - expr.arguments.length > 2 || - this.getVariableInfo("RegExp") !== "RegExp" - ) - return; - - let regExp, flags; - const arg1 = expr.arguments[0]; - - if (arg1) { - if (arg1.type === "SpreadElement") return; - - const evaluatedRegExp = this.evaluateExpression(arg1); - - if (!evaluatedRegExp) return; - - regExp = evaluatedRegExp.asString(); - - if (!regExp) return; - } else { - return new BasicEvaluatedExpression() - .setRegExp(new RegExp("")) - .setRange(expr.range); - } - - const arg2 = expr.arguments[1]; - - if (arg2) { - if (arg2.type === "SpreadElement") return; - - const evaluatedFlags = this.evaluateExpression(arg2); - - if (!evaluatedFlags) return; - - if (!evaluatedFlags.isUndefined()) { - flags = evaluatedFlags.asString(); - - if ( - flags === undefined || - !BasicEvaluatedExpression.isValidRegExpFlags(flags) - ) - return; - } - } - - return new BasicEvaluatedExpression() - .setRegExp(flags ? new RegExp(regExp, flags) : new RegExp(regExp)) - .setRange(expr.range); - }); - this.hooks.evaluate - .for("LogicalExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {LogicalExpressionNode} */ (_expr); - - const left = this.evaluateExpression(expr.left); - let returnRight = false; - /** @type {boolean|undefined} */ - let allowedRight; - if (expr.operator === "&&") { - const leftAsBool = left.asBool(); - if (leftAsBool === false) return left.setRange(expr.range); - returnRight = leftAsBool === true; - allowedRight = false; - } else if (expr.operator === "||") { - const leftAsBool = left.asBool(); - if (leftAsBool === true) return left.setRange(expr.range); - returnRight = leftAsBool === false; - allowedRight = true; - } else if (expr.operator === "??") { - const leftAsNullish = left.asNullish(); - if (leftAsNullish === false) return left.setRange(expr.range); - if (leftAsNullish !== true) return; - returnRight = true; - } else return; - const right = this.evaluateExpression(expr.right); - if (returnRight) { - if (left.couldHaveSideEffects()) right.setSideEffects(); - return right.setRange(expr.range); - } - - const asBool = right.asBool(); - - if (allowedRight === true && asBool === true) { - return new BasicEvaluatedExpression() - .setRange(expr.range) - .setTruthy(); - } else if (allowedRight === false && asBool === false) { - return new BasicEvaluatedExpression().setRange(expr.range).setFalsy(); - } - }); - - const valueAsExpression = (value, expr, sideEffects) => { - switch (typeof value) { - case "boolean": - return new BasicEvaluatedExpression() - .setBoolean(value) - .setSideEffects(sideEffects) - .setRange(expr.range); - case "number": - return new BasicEvaluatedExpression() - .setNumber(value) - .setSideEffects(sideEffects) - .setRange(expr.range); - case "bigint": - return new BasicEvaluatedExpression() - .setBigInt(value) - .setSideEffects(sideEffects) - .setRange(expr.range); - case "string": - return new BasicEvaluatedExpression() - .setString(value) - .setSideEffects(sideEffects) - .setRange(expr.range); - } - }; - - this.hooks.evaluate - .for("BinaryExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {BinaryExpressionNode} */ (_expr); - - const handleConstOperation = fn => { - const left = this.evaluateExpression(expr.left); - if (!left.isCompileTimeValue()) return; - - const right = this.evaluateExpression(expr.right); - if (!right.isCompileTimeValue()) return; - - const result = fn( - left.asCompileTimeValue(), - right.asCompileTimeValue() - ); - return valueAsExpression( - result, - expr, - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - }; - - const isAlwaysDifferent = (a, b) => - (a === true && b === false) || (a === false && b === true); - - const handleTemplateStringCompare = (left, right, res, eql) => { - const getPrefix = parts => { - let value = ""; - for (const p of parts) { - const v = p.asString(); - if (v !== undefined) value += v; - else break; - } - return value; - }; - const getSuffix = parts => { - let value = ""; - for (let i = parts.length - 1; i >= 0; i--) { - const v = parts[i].asString(); - if (v !== undefined) value = v + value; - else break; - } - return value; - }; - const leftPrefix = getPrefix(left.parts); - const rightPrefix = getPrefix(right.parts); - const leftSuffix = getSuffix(left.parts); - const rightSuffix = getSuffix(right.parts); - const lenPrefix = Math.min(leftPrefix.length, rightPrefix.length); - const lenSuffix = Math.min(leftSuffix.length, rightSuffix.length); - if ( - leftPrefix.slice(0, lenPrefix) !== - rightPrefix.slice(0, lenPrefix) || - leftSuffix.slice(-lenSuffix) !== rightSuffix.slice(-lenSuffix) - ) { - return res - .setBoolean(!eql) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - }; - - const handleStrictEqualityComparison = eql => { - const left = this.evaluateExpression(expr.left); - const right = this.evaluateExpression(expr.right); - const res = new BasicEvaluatedExpression(); - res.setRange(expr.range); - - const leftConst = left.isCompileTimeValue(); - const rightConst = right.isCompileTimeValue(); - - if (leftConst && rightConst) { - return res - .setBoolean( - eql === - (left.asCompileTimeValue() === right.asCompileTimeValue()) - ) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - - if (left.isArray() && right.isArray()) { - return res - .setBoolean(!eql) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - if (left.isTemplateString() && right.isTemplateString()) { - return handleTemplateStringCompare(left, right, res, eql); - } - - const leftPrimitive = left.isPrimitiveType(); - const rightPrimitive = right.isPrimitiveType(); - - if ( - // Primitive !== Object or - // compile-time object types are never equal to something at runtime - (leftPrimitive === false && - (leftConst || rightPrimitive === true)) || - (rightPrimitive === false && - (rightConst || leftPrimitive === true)) || - // Different nullish or boolish status also means not equal - isAlwaysDifferent(left.asBool(), right.asBool()) || - isAlwaysDifferent(left.asNullish(), right.asNullish()) - ) { - return res - .setBoolean(!eql) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - }; - - const handleAbstractEqualityComparison = eql => { - const left = this.evaluateExpression(expr.left); - const right = this.evaluateExpression(expr.right); - const res = new BasicEvaluatedExpression(); - res.setRange(expr.range); - - const leftConst = left.isCompileTimeValue(); - const rightConst = right.isCompileTimeValue(); - - if (leftConst && rightConst) { - return res - .setBoolean( - eql === - // eslint-disable-next-line eqeqeq - (left.asCompileTimeValue() == right.asCompileTimeValue()) - ) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - - if (left.isArray() && right.isArray()) { - return res - .setBoolean(!eql) - .setSideEffects( - left.couldHaveSideEffects() || right.couldHaveSideEffects() - ); - } - if (left.isTemplateString() && right.isTemplateString()) { - return handleTemplateStringCompare(left, right, res, eql); - } - }; - - if (expr.operator === "+") { - const left = this.evaluateExpression(expr.left); - const right = this.evaluateExpression(expr.right); - const res = new BasicEvaluatedExpression(); - if (left.isString()) { - if (right.isString()) { - res.setString(left.string + right.string); - } else if (right.isNumber()) { - res.setString(left.string + right.number); - } else if ( - right.isWrapped() && - right.prefix && - right.prefix.isString() - ) { - // "left" + ("prefix" + inner + "postfix") - // => ("leftPrefix" + inner + "postfix") - res.setWrapped( - new BasicEvaluatedExpression() - .setString(left.string + right.prefix.string) - .setRange(joinRanges(left.range, right.prefix.range)), - right.postfix, - right.wrappedInnerExpressions - ); - } else if (right.isWrapped()) { - // "left" + ([null] + inner + "postfix") - // => ("left" + inner + "postfix") - res.setWrapped( - left, - right.postfix, - right.wrappedInnerExpressions - ); - } else { - // "left" + expr - // => ("left" + expr + "") - res.setWrapped(left, null, [right]); - } - } else if (left.isNumber()) { - if (right.isString()) { - res.setString(left.number + right.string); - } else if (right.isNumber()) { - res.setNumber(left.number + right.number); - } else { - return; - } - } else if (left.isBigInt()) { - if (right.isBigInt()) { - res.setBigInt(left.bigint + right.bigint); - } - } else if (left.isWrapped()) { - if (left.postfix && left.postfix.isString() && right.isString()) { - // ("prefix" + inner + "postfix") + "right" - // => ("prefix" + inner + "postfixRight") - res.setWrapped( - left.prefix, - new BasicEvaluatedExpression() - .setString(left.postfix.string + right.string) - .setRange(joinRanges(left.postfix.range, right.range)), - left.wrappedInnerExpressions - ); - } else if ( - left.postfix && - left.postfix.isString() && - right.isNumber() - ) { - // ("prefix" + inner + "postfix") + 123 - // => ("prefix" + inner + "postfix123") - res.setWrapped( - left.prefix, - new BasicEvaluatedExpression() - .setString(left.postfix.string + right.number) - .setRange(joinRanges(left.postfix.range, right.range)), - left.wrappedInnerExpressions - ); - } else if (right.isString()) { - // ("prefix" + inner + [null]) + "right" - // => ("prefix" + inner + "right") - res.setWrapped(left.prefix, right, left.wrappedInnerExpressions); - } else if (right.isNumber()) { - // ("prefix" + inner + [null]) + 123 - // => ("prefix" + inner + "123") - res.setWrapped( - left.prefix, - new BasicEvaluatedExpression() - .setString(right.number + "") - .setRange(right.range), - left.wrappedInnerExpressions - ); - } else if (right.isWrapped()) { - // ("prefix1" + inner1 + "postfix1") + ("prefix2" + inner2 + "postfix2") - // ("prefix1" + inner1 + "postfix1" + "prefix2" + inner2 + "postfix2") - res.setWrapped( - left.prefix, - right.postfix, - left.wrappedInnerExpressions && - right.wrappedInnerExpressions && - left.wrappedInnerExpressions - .concat(left.postfix ? [left.postfix] : []) - .concat(right.prefix ? [right.prefix] : []) - .concat(right.wrappedInnerExpressions) - ); - } else { - // ("prefix" + inner + postfix) + expr - // => ("prefix" + inner + postfix + expr + [null]) - res.setWrapped( - left.prefix, - null, - left.wrappedInnerExpressions && - left.wrappedInnerExpressions.concat( - left.postfix ? [left.postfix, right] : [right] - ) - ); - } - } else { - if (right.isString()) { - // left + "right" - // => ([null] + left + "right") - res.setWrapped(null, right, [left]); - } else if (right.isWrapped()) { - // left + (prefix + inner + "postfix") - // => ([null] + left + prefix + inner + "postfix") - res.setWrapped( - null, - right.postfix, - right.wrappedInnerExpressions && - (right.prefix ? [left, right.prefix] : [left]).concat( - right.wrappedInnerExpressions - ) - ); - } else { - return; - } - } - if (left.couldHaveSideEffects() || right.couldHaveSideEffects()) - res.setSideEffects(); - res.setRange(expr.range); - return res; - } else if (expr.operator === "-") { - return handleConstOperation((l, r) => l - r); - } else if (expr.operator === "*") { - return handleConstOperation((l, r) => l * r); - } else if (expr.operator === "/") { - return handleConstOperation((l, r) => l / r); - } else if (expr.operator === "**") { - return handleConstOperation((l, r) => l ** r); - } else if (expr.operator === "===") { - return handleStrictEqualityComparison(true); - } else if (expr.operator === "==") { - return handleAbstractEqualityComparison(true); - } else if (expr.operator === "!==") { - return handleStrictEqualityComparison(false); - } else if (expr.operator === "!=") { - return handleAbstractEqualityComparison(false); - } else if (expr.operator === "&") { - return handleConstOperation((l, r) => l & r); - } else if (expr.operator === "|") { - return handleConstOperation((l, r) => l | r); - } else if (expr.operator === "^") { - return handleConstOperation((l, r) => l ^ r); - } else if (expr.operator === ">>>") { - return handleConstOperation((l, r) => l >>> r); - } else if (expr.operator === ">>") { - return handleConstOperation((l, r) => l >> r); - } else if (expr.operator === "<<") { - return handleConstOperation((l, r) => l << r); - } else if (expr.operator === "<") { - return handleConstOperation((l, r) => l < r); - } else if (expr.operator === ">") { - return handleConstOperation((l, r) => l > r); - } else if (expr.operator === "<=") { - return handleConstOperation((l, r) => l <= r); - } else if (expr.operator === ">=") { - return handleConstOperation((l, r) => l >= r); - } - }); - this.hooks.evaluate - .for("UnaryExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {UnaryExpressionNode} */ (_expr); - - const handleConstOperation = fn => { - const argument = this.evaluateExpression(expr.argument); - if (!argument.isCompileTimeValue()) return; - const result = fn(argument.asCompileTimeValue()); - return valueAsExpression( - result, - expr, - argument.couldHaveSideEffects() - ); - }; - - if (expr.operator === "typeof") { - switch (expr.argument.type) { - case "Identifier": { - const res = this.callHooksForName( - this.hooks.evaluateTypeof, - expr.argument.name, - expr - ); - if (res !== undefined) return res; - break; - } - case "MetaProperty": { - const res = this.callHooksForName( - this.hooks.evaluateTypeof, - getRootName(expr.argument), - expr - ); - if (res !== undefined) return res; - break; - } - case "MemberExpression": { - const res = this.callHooksForExpression( - this.hooks.evaluateTypeof, - expr.argument, - expr - ); - if (res !== undefined) return res; - break; - } - case "ChainExpression": { - const res = this.callHooksForExpression( - this.hooks.evaluateTypeof, - expr.argument.expression, - expr - ); - if (res !== undefined) return res; - break; - } - case "FunctionExpression": { - return new BasicEvaluatedExpression() - .setString("function") - .setRange(expr.range); - } - } - const arg = this.evaluateExpression(expr.argument); - if (arg.isUnknown()) return; - if (arg.isString()) { - return new BasicEvaluatedExpression() - .setString("string") - .setRange(expr.range); - } - if (arg.isWrapped()) { - return new BasicEvaluatedExpression() - .setString("string") - .setSideEffects() - .setRange(expr.range); - } - if (arg.isUndefined()) { - return new BasicEvaluatedExpression() - .setString("undefined") - .setRange(expr.range); - } - if (arg.isNumber()) { - return new BasicEvaluatedExpression() - .setString("number") - .setRange(expr.range); - } - if (arg.isBigInt()) { - return new BasicEvaluatedExpression() - .setString("bigint") - .setRange(expr.range); - } - if (arg.isBoolean()) { - return new BasicEvaluatedExpression() - .setString("boolean") - .setRange(expr.range); - } - if (arg.isConstArray() || arg.isRegExp() || arg.isNull()) { - return new BasicEvaluatedExpression() - .setString("object") - .setRange(expr.range); - } - if (arg.isArray()) { - return new BasicEvaluatedExpression() - .setString("object") - .setSideEffects(arg.couldHaveSideEffects()) - .setRange(expr.range); - } - } else if (expr.operator === "!") { - const argument = this.evaluateExpression(expr.argument); - const bool = argument.asBool(); - if (typeof bool !== "boolean") return; - return new BasicEvaluatedExpression() - .setBoolean(!bool) - .setSideEffects(argument.couldHaveSideEffects()) - .setRange(expr.range); - } else if (expr.operator === "~") { - return handleConstOperation(v => ~v); - } else if (expr.operator === "+") { - return handleConstOperation(v => +v); - } else if (expr.operator === "-") { - return handleConstOperation(v => -v); - } - }); - this.hooks.evaluateTypeof.for("undefined").tap("JavascriptParser", expr => { - return new BasicEvaluatedExpression() - .setString("undefined") - .setRange(expr.range); - }); - this.hooks.evaluate.for("Identifier").tap("JavascriptParser", expr => { - if (/** @type {IdentifierNode} */ (expr).name === "undefined") { - return new BasicEvaluatedExpression() - .setUndefined() - .setRange(expr.range); - } - }); - /** - * @param {string} exprType expression type name - * @param {function(ExpressionNode): GetInfoResult | undefined} getInfo get info - * @returns {void} - */ - const tapEvaluateWithVariableInfo = (exprType, getInfo) => { - /** @type {ExpressionNode | undefined} */ - let cachedExpression = undefined; - /** @type {GetInfoResult | undefined} */ - let cachedInfo = undefined; - this.hooks.evaluate.for(exprType).tap("JavascriptParser", expr => { - const expression = /** @type {MemberExpressionNode} */ (expr); - - const info = getInfo(expr); - if (info !== undefined) { - return this.callHooksForInfoWithFallback( - this.hooks.evaluateIdentifier, - info.name, - name => { - cachedExpression = expression; - cachedInfo = info; - }, - name => { - const hook = this.hooks.evaluateDefinedIdentifier.get(name); - if (hook !== undefined) { - return hook.call(expression); - } - }, - expression - ); - } - }); - this.hooks.evaluate - .for(exprType) - .tap({ name: "JavascriptParser", stage: 100 }, expr => { - const info = cachedExpression === expr ? cachedInfo : getInfo(expr); - if (info !== undefined) { - return new BasicEvaluatedExpression() - .setIdentifier( - info.name, - info.rootInfo, - info.getMembers, - info.getMembersOptionals - ) - .setRange(expr.range); - } - }); - this.hooks.finish.tap("JavascriptParser", () => { - // Cleanup for GC - cachedExpression = cachedInfo = undefined; - }); - }; - tapEvaluateWithVariableInfo("Identifier", expr => { - const info = this.getVariableInfo( - /** @type {IdentifierNode} */ (expr).name - ); - if ( - typeof info === "string" || - (info instanceof VariableInfo && typeof info.freeName === "string") - ) { - return { - name: info, - rootInfo: info, - getMembers: () => [], - getMembersOptionals: () => [] - }; - } - }); - tapEvaluateWithVariableInfo("ThisExpression", expr => { - const info = this.getVariableInfo("this"); - if ( - typeof info === "string" || - (info instanceof VariableInfo && typeof info.freeName === "string") - ) { - return { - name: info, - rootInfo: info, - getMembers: () => [], - getMembersOptionals: () => [] - }; - } - }); - this.hooks.evaluate.for("MetaProperty").tap("JavascriptParser", expr => { - const metaProperty = /** @type {MetaPropertyNode} */ (expr); - - return this.callHooksForName( - this.hooks.evaluateIdentifier, - getRootName(expr), - metaProperty - ); - }); - tapEvaluateWithVariableInfo("MemberExpression", expr => - this.getMemberExpressionInfo( - /** @type {MemberExpressionNode} */ (expr), - ALLOWED_MEMBER_TYPES_EXPRESSION - ) - ); - - this.hooks.evaluate.for("CallExpression").tap("JavascriptParser", _expr => { - const expr = /** @type {CallExpressionNode} */ (_expr); - if ( - expr.callee.type === "MemberExpression" && - expr.callee.property.type === - (expr.callee.computed ? "Literal" : "Identifier") - ) { - // type Super also possible here - const param = this.evaluateExpression( - /** @type {ExpressionNode} */ (expr.callee.object) - ); - const property = - expr.callee.property.type === "Literal" - ? `${expr.callee.property.value}` - : expr.callee.property.name; - const hook = this.hooks.evaluateCallExpressionMember.get(property); - if (hook !== undefined) { - return hook.call(expr, param); - } - } else if (expr.callee.type === "Identifier") { - return this.callHooksForName( - this.hooks.evaluateCallExpression, - expr.callee.name, - expr - ); - } - }); - this.hooks.evaluateCallExpressionMember - .for("indexOf") - .tap("JavascriptParser", (expr, param) => { - if (!param.isString()) return; - if (expr.arguments.length === 0) return; - const [arg1, arg2] = expr.arguments; - if (arg1.type === "SpreadElement") return; - const arg1Eval = this.evaluateExpression(arg1); - if (!arg1Eval.isString()) return; - const arg1Value = arg1Eval.string; - - let result; - if (arg2) { - if (arg2.type === "SpreadElement") return; - const arg2Eval = this.evaluateExpression(arg2); - if (!arg2Eval.isNumber()) return; - result = param.string.indexOf(arg1Value, arg2Eval.number); - } else { - result = param.string.indexOf(arg1Value); - } - return new BasicEvaluatedExpression() - .setNumber(result) - .setSideEffects(param.couldHaveSideEffects()) - .setRange(expr.range); - }); - this.hooks.evaluateCallExpressionMember - .for("replace") - .tap("JavascriptParser", (expr, param) => { - if (!param.isString()) return; - if (expr.arguments.length !== 2) return; - if (expr.arguments[0].type === "SpreadElement") return; - if (expr.arguments[1].type === "SpreadElement") return; - let arg1 = this.evaluateExpression(expr.arguments[0]); - let arg2 = this.evaluateExpression(expr.arguments[1]); - if (!arg1.isString() && !arg1.isRegExp()) return; - const arg1Value = arg1.regExp || arg1.string; - if (!arg2.isString()) return; - const arg2Value = arg2.string; - return new BasicEvaluatedExpression() - .setString(param.string.replace(arg1Value, arg2Value)) - .setSideEffects(param.couldHaveSideEffects()) - .setRange(expr.range); - }); - ["substr", "substring", "slice"].forEach(fn => { - this.hooks.evaluateCallExpressionMember - .for(fn) - .tap("JavascriptParser", (expr, param) => { - if (!param.isString()) return; - let arg1; - let result, - str = param.string; - switch (expr.arguments.length) { - case 1: - if (expr.arguments[0].type === "SpreadElement") return; - arg1 = this.evaluateExpression(expr.arguments[0]); - if (!arg1.isNumber()) return; - result = str[fn](arg1.number); - break; - case 2: { - if (expr.arguments[0].type === "SpreadElement") return; - if (expr.arguments[1].type === "SpreadElement") return; - arg1 = this.evaluateExpression(expr.arguments[0]); - const arg2 = this.evaluateExpression(expr.arguments[1]); - if (!arg1.isNumber()) return; - if (!arg2.isNumber()) return; - result = str[fn](arg1.number, arg2.number); - break; - } - default: - return; - } - return new BasicEvaluatedExpression() - .setString(result) - .setSideEffects(param.couldHaveSideEffects()) - .setRange(expr.range); - }); - }); - - /** - * @param {"cooked" | "raw"} kind kind of values to get - * @param {TemplateLiteralNode} templateLiteralExpr TemplateLiteral expr - * @returns {{quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[]}} Simplified template - */ - const getSimplifiedTemplateResult = (kind, templateLiteralExpr) => { - /** @type {BasicEvaluatedExpression[]} */ - const quasis = []; - /** @type {BasicEvaluatedExpression[]} */ - const parts = []; - - for (let i = 0; i < templateLiteralExpr.quasis.length; i++) { - const quasiExpr = templateLiteralExpr.quasis[i]; - const quasi = quasiExpr.value[kind]; - - if (i > 0) { - const prevExpr = parts[parts.length - 1]; - const expr = this.evaluateExpression( - templateLiteralExpr.expressions[i - 1] - ); - const exprAsString = expr.asString(); - if ( - typeof exprAsString === "string" && - !expr.couldHaveSideEffects() - ) { - // We can merge quasi + expr + quasi when expr - // is a const string - - prevExpr.setString(prevExpr.string + exprAsString + quasi); - prevExpr.setRange([prevExpr.range[0], quasiExpr.range[1]]); - // We unset the expression as it doesn't match to a single expression - prevExpr.setExpression(undefined); - continue; - } - parts.push(expr); - } - - const part = new BasicEvaluatedExpression() - .setString(quasi) - .setRange(quasiExpr.range) - .setExpression(quasiExpr); - quasis.push(part); - parts.push(part); - } - return { - quasis, - parts - }; - }; - - this.hooks.evaluate - .for("TemplateLiteral") - .tap("JavascriptParser", _node => { - const node = /** @type {TemplateLiteralNode} */ (_node); - - const { quasis, parts } = getSimplifiedTemplateResult("cooked", node); - if (parts.length === 1) { - return parts[0].setRange(node.range); - } - return new BasicEvaluatedExpression() - .setTemplateString(quasis, parts, "cooked") - .setRange(node.range); - }); - this.hooks.evaluate - .for("TaggedTemplateExpression") - .tap("JavascriptParser", _node => { - const node = /** @type {TaggedTemplateExpressionNode} */ (_node); - const tag = this.evaluateExpression(node.tag); - - if (tag.isIdentifier() && tag.identifier === "String.raw") { - const { quasis, parts } = getSimplifiedTemplateResult( - "raw", - node.quasi - ); - return new BasicEvaluatedExpression() - .setTemplateString(quasis, parts, "raw") - .setRange(node.range); - } - }); - - this.hooks.evaluateCallExpressionMember - .for("concat") - .tap("JavascriptParser", (expr, param) => { - if (!param.isString() && !param.isWrapped()) return; - - let stringSuffix = null; - let hasUnknownParams = false; - const innerExpressions = []; - for (let i = expr.arguments.length - 1; i >= 0; i--) { - const arg = expr.arguments[i]; - if (arg.type === "SpreadElement") return; - const argExpr = this.evaluateExpression(arg); - if ( - hasUnknownParams || - (!argExpr.isString() && !argExpr.isNumber()) - ) { - hasUnknownParams = true; - innerExpressions.push(argExpr); - continue; - } - - const value = argExpr.isString() - ? argExpr.string - : "" + argExpr.number; - - const newString = value + (stringSuffix ? stringSuffix.string : ""); - const newRange = [ - argExpr.range[0], - (stringSuffix || argExpr).range[1] - ]; - stringSuffix = new BasicEvaluatedExpression() - .setString(newString) - .setSideEffects( - (stringSuffix && stringSuffix.couldHaveSideEffects()) || - argExpr.couldHaveSideEffects() - ) - .setRange(newRange); - } - - if (hasUnknownParams) { - const prefix = param.isString() ? param : param.prefix; - const inner = - param.isWrapped() && param.wrappedInnerExpressions - ? param.wrappedInnerExpressions.concat(innerExpressions.reverse()) - : innerExpressions.reverse(); - return new BasicEvaluatedExpression() - .setWrapped(prefix, stringSuffix, inner) - .setRange(expr.range); - } else if (param.isWrapped()) { - const postfix = stringSuffix || param.postfix; - const inner = param.wrappedInnerExpressions - ? param.wrappedInnerExpressions.concat(innerExpressions.reverse()) - : innerExpressions.reverse(); - return new BasicEvaluatedExpression() - .setWrapped(param.prefix, postfix, inner) - .setRange(expr.range); - } else { - const newString = - param.string + (stringSuffix ? stringSuffix.string : ""); - return new BasicEvaluatedExpression() - .setString(newString) - .setSideEffects( - (stringSuffix && stringSuffix.couldHaveSideEffects()) || - param.couldHaveSideEffects() - ) - .setRange(expr.range); - } - }); - this.hooks.evaluateCallExpressionMember - .for("split") - .tap("JavascriptParser", (expr, param) => { - if (!param.isString()) return; - if (expr.arguments.length !== 1) return; - if (expr.arguments[0].type === "SpreadElement") return; - let result; - const arg = this.evaluateExpression(expr.arguments[0]); - if (arg.isString()) { - result = param.string.split(arg.string); - } else if (arg.isRegExp()) { - result = param.string.split(arg.regExp); - } else { - return; - } - return new BasicEvaluatedExpression() - .setArray(result) - .setSideEffects(param.couldHaveSideEffects()) - .setRange(expr.range); - }); - this.hooks.evaluate - .for("ConditionalExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {ConditionalExpressionNode} */ (_expr); - - const condition = this.evaluateExpression(expr.test); - const conditionValue = condition.asBool(); - let res; - if (conditionValue === undefined) { - const consequent = this.evaluateExpression(expr.consequent); - const alternate = this.evaluateExpression(expr.alternate); - res = new BasicEvaluatedExpression(); - if (consequent.isConditional()) { - res.setOptions(consequent.options); - } else { - res.setOptions([consequent]); - } - if (alternate.isConditional()) { - res.addOptions(alternate.options); - } else { - res.addOptions([alternate]); - } - } else { - res = this.evaluateExpression( - conditionValue ? expr.consequent : expr.alternate - ); - if (condition.couldHaveSideEffects()) res.setSideEffects(); - } - res.setRange(expr.range); - return res; - }); - this.hooks.evaluate - .for("ArrayExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {ArrayExpressionNode} */ (_expr); - - const items = expr.elements.map(element => { - return ( - element !== null && - element.type !== "SpreadElement" && - this.evaluateExpression(element) - ); - }); - if (!items.every(Boolean)) return; - return new BasicEvaluatedExpression() - .setItems(items) - .setRange(expr.range); - }); - this.hooks.evaluate - .for("ChainExpression") - .tap("JavascriptParser", _expr => { - const expr = /** @type {ChainExpressionNode} */ (_expr); - /** @type {ExpressionNode[]} */ - const optionalExpressionsStack = []; - /** @type {ExpressionNode|SuperNode} */ - let next = expr.expression; - - while ( - next.type === "MemberExpression" || - next.type === "CallExpression" - ) { - if (next.type === "MemberExpression") { - if (next.optional) { - // SuperNode can not be optional - optionalExpressionsStack.push( - /** @type {ExpressionNode} */ (next.object) - ); - } - next = next.object; - } else { - if (next.optional) { - // SuperNode can not be optional - optionalExpressionsStack.push( - /** @type {ExpressionNode} */ (next.callee) - ); - } - next = next.callee; - } - } - - while (optionalExpressionsStack.length > 0) { - const expression = optionalExpressionsStack.pop(); - const evaluated = this.evaluateExpression(expression); - - if (evaluated.asNullish()) { - return evaluated.setRange(_expr.range); - } - } - return this.evaluateExpression(expr.expression); - }); - } - - getRenameIdentifier(expr) { - const result = this.evaluateExpression(expr); - if (result.isIdentifier()) { - return result.identifier; - } - } - - /** - * @param {ClassExpressionNode | ClassDeclarationNode} classy a class node - * @returns {void} - */ - walkClass(classy) { - if (classy.superClass) { - if (!this.hooks.classExtendsExpression.call(classy.superClass, classy)) { - this.walkExpression(classy.superClass); - } - } - if (classy.body && classy.body.type === "ClassBody") { - for (const classElement of /** @type {TODO} */ (classy.body.body)) { - if (!this.hooks.classBodyElement.call(classElement, classy)) { - if (classElement.computed && classElement.key) { - this.walkExpression(classElement.key); - } - if (classElement.value) { - if ( - !this.hooks.classBodyValue.call( - classElement.value, - classElement, - classy - ) - ) { - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = false; - this.walkExpression(classElement.value); - this.scope.topLevelScope = wasTopLevel; - } - } else if (classElement.type === "StaticBlock") { - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = false; - this.walkBlockStatement(classElement); - this.scope.topLevelScope = wasTopLevel; - } - } - } - } - } - - // Pre walking iterates the scope for variable declarations - preWalkStatements(statements) { - for (let index = 0, len = statements.length; index < len; index++) { - const statement = statements[index]; - this.preWalkStatement(statement); - } - } - - // Block pre walking iterates the scope for block variable declarations - blockPreWalkStatements(statements) { - for (let index = 0, len = statements.length; index < len; index++) { - const statement = statements[index]; - this.blockPreWalkStatement(statement); - } - } - - // Walking iterates the statements and expressions and processes them - walkStatements(statements) { - for (let index = 0, len = statements.length; index < len; index++) { - const statement = statements[index]; - this.walkStatement(statement); - } - } - - preWalkStatement(statement) { - this.statementPath.push(statement); - if (this.hooks.preStatement.call(statement)) { - this.prevStatement = this.statementPath.pop(); - return; - } - switch (statement.type) { - case "BlockStatement": - this.preWalkBlockStatement(statement); - break; - case "DoWhileStatement": - this.preWalkDoWhileStatement(statement); - break; - case "ForInStatement": - this.preWalkForInStatement(statement); - break; - case "ForOfStatement": - this.preWalkForOfStatement(statement); - break; - case "ForStatement": - this.preWalkForStatement(statement); - break; - case "FunctionDeclaration": - this.preWalkFunctionDeclaration(statement); - break; - case "IfStatement": - this.preWalkIfStatement(statement); - break; - case "LabeledStatement": - this.preWalkLabeledStatement(statement); - break; - case "SwitchStatement": - this.preWalkSwitchStatement(statement); - break; - case "TryStatement": - this.preWalkTryStatement(statement); - break; - case "VariableDeclaration": - this.preWalkVariableDeclaration(statement); - break; - case "WhileStatement": - this.preWalkWhileStatement(statement); - break; - case "WithStatement": - this.preWalkWithStatement(statement); - break; - } - this.prevStatement = this.statementPath.pop(); - } - - blockPreWalkStatement(statement) { - this.statementPath.push(statement); - if (this.hooks.blockPreStatement.call(statement)) { - this.prevStatement = this.statementPath.pop(); - return; - } - switch (statement.type) { - case "ImportDeclaration": - this.blockPreWalkImportDeclaration(statement); - break; - case "ExportAllDeclaration": - this.blockPreWalkExportAllDeclaration(statement); - break; - case "ExportDefaultDeclaration": - this.blockPreWalkExportDefaultDeclaration(statement); - break; - case "ExportNamedDeclaration": - this.blockPreWalkExportNamedDeclaration(statement); - break; - case "VariableDeclaration": - this.blockPreWalkVariableDeclaration(statement); - break; - case "ClassDeclaration": - this.blockPreWalkClassDeclaration(statement); - break; - } - this.prevStatement = this.statementPath.pop(); - } - - walkStatement(statement) { - this.statementPath.push(statement); - if (this.hooks.statement.call(statement) !== undefined) { - this.prevStatement = this.statementPath.pop(); - return; - } - switch (statement.type) { - case "BlockStatement": - this.walkBlockStatement(statement); - break; - case "ClassDeclaration": - this.walkClassDeclaration(statement); - break; - case "DoWhileStatement": - this.walkDoWhileStatement(statement); - break; - case "ExportDefaultDeclaration": - this.walkExportDefaultDeclaration(statement); - break; - case "ExportNamedDeclaration": - this.walkExportNamedDeclaration(statement); - break; - case "ExpressionStatement": - this.walkExpressionStatement(statement); - break; - case "ForInStatement": - this.walkForInStatement(statement); - break; - case "ForOfStatement": - this.walkForOfStatement(statement); - break; - case "ForStatement": - this.walkForStatement(statement); - break; - case "FunctionDeclaration": - this.walkFunctionDeclaration(statement); - break; - case "IfStatement": - this.walkIfStatement(statement); - break; - case "LabeledStatement": - this.walkLabeledStatement(statement); - break; - case "ReturnStatement": - this.walkReturnStatement(statement); - break; - case "SwitchStatement": - this.walkSwitchStatement(statement); - break; - case "ThrowStatement": - this.walkThrowStatement(statement); - break; - case "TryStatement": - this.walkTryStatement(statement); - break; - case "VariableDeclaration": - this.walkVariableDeclaration(statement); - break; - case "WhileStatement": - this.walkWhileStatement(statement); - break; - case "WithStatement": - this.walkWithStatement(statement); - break; - } - this.prevStatement = this.statementPath.pop(); - } - - /** - * Walks a statements that is nested within a parent statement - * and can potentially be a non-block statement. - * This enforces the nested statement to never be in ASI position. - * @param {StatementNode} statement the nested statement - * @returns {void} - */ - walkNestedStatement(statement) { - this.prevStatement = undefined; - this.walkStatement(statement); - } - - // Real Statements - preWalkBlockStatement(statement) { - this.preWalkStatements(statement.body); - } - - walkBlockStatement(statement) { - this.inBlockScope(() => { - const body = statement.body; - const prev = this.prevStatement; - this.blockPreWalkStatements(body); - this.prevStatement = prev; - this.walkStatements(body); - }); - } - - walkExpressionStatement(statement) { - this.walkExpression(statement.expression); - } - - preWalkIfStatement(statement) { - this.preWalkStatement(statement.consequent); - if (statement.alternate) { - this.preWalkStatement(statement.alternate); - } - } - - walkIfStatement(statement) { - const result = this.hooks.statementIf.call(statement); - if (result === undefined) { - this.walkExpression(statement.test); - this.walkNestedStatement(statement.consequent); - if (statement.alternate) { - this.walkNestedStatement(statement.alternate); - } - } else { - if (result) { - this.walkNestedStatement(statement.consequent); - } else if (statement.alternate) { - this.walkNestedStatement(statement.alternate); - } - } - } - - preWalkLabeledStatement(statement) { - this.preWalkStatement(statement.body); - } - - walkLabeledStatement(statement) { - const hook = this.hooks.label.get(statement.label.name); - if (hook !== undefined) { - const result = hook.call(statement); - if (result === true) return; - } - this.walkNestedStatement(statement.body); - } - - preWalkWithStatement(statement) { - this.preWalkStatement(statement.body); - } - - walkWithStatement(statement) { - this.walkExpression(statement.object); - this.walkNestedStatement(statement.body); - } - - preWalkSwitchStatement(statement) { - this.preWalkSwitchCases(statement.cases); - } - - walkSwitchStatement(statement) { - this.walkExpression(statement.discriminant); - this.walkSwitchCases(statement.cases); - } - - walkTerminatingStatement(statement) { - if (statement.argument) this.walkExpression(statement.argument); - } - - walkReturnStatement(statement) { - this.walkTerminatingStatement(statement); - } - - walkThrowStatement(statement) { - this.walkTerminatingStatement(statement); - } - - preWalkTryStatement(statement) { - this.preWalkStatement(statement.block); - if (statement.handler) this.preWalkCatchClause(statement.handler); - if (statement.finializer) this.preWalkStatement(statement.finializer); - } - - walkTryStatement(statement) { - if (this.scope.inTry) { - this.walkStatement(statement.block); - } else { - this.scope.inTry = true; - this.walkStatement(statement.block); - this.scope.inTry = false; - } - if (statement.handler) this.walkCatchClause(statement.handler); - if (statement.finalizer) this.walkStatement(statement.finalizer); - } - - preWalkWhileStatement(statement) { - this.preWalkStatement(statement.body); - } - - walkWhileStatement(statement) { - this.walkExpression(statement.test); - this.walkNestedStatement(statement.body); - } - - preWalkDoWhileStatement(statement) { - this.preWalkStatement(statement.body); - } - - walkDoWhileStatement(statement) { - this.walkNestedStatement(statement.body); - this.walkExpression(statement.test); - } - - preWalkForStatement(statement) { - if (statement.init) { - if (statement.init.type === "VariableDeclaration") { - this.preWalkStatement(statement.init); - } - } - this.preWalkStatement(statement.body); - } - - walkForStatement(statement) { - this.inBlockScope(() => { - if (statement.init) { - if (statement.init.type === "VariableDeclaration") { - this.blockPreWalkVariableDeclaration(statement.init); - this.prevStatement = undefined; - this.walkStatement(statement.init); - } else { - this.walkExpression(statement.init); - } - } - if (statement.test) { - this.walkExpression(statement.test); - } - if (statement.update) { - this.walkExpression(statement.update); - } - const body = statement.body; - if (body.type === "BlockStatement") { - // no need to add additional scope - const prev = this.prevStatement; - this.blockPreWalkStatements(body.body); - this.prevStatement = prev; - this.walkStatements(body.body); - } else { - this.walkNestedStatement(body); - } - }); - } - - preWalkForInStatement(statement) { - if (statement.left.type === "VariableDeclaration") { - this.preWalkVariableDeclaration(statement.left); - } - this.preWalkStatement(statement.body); - } - - walkForInStatement(statement) { - this.inBlockScope(() => { - if (statement.left.type === "VariableDeclaration") { - this.blockPreWalkVariableDeclaration(statement.left); - this.walkVariableDeclaration(statement.left); - } else { - this.walkPattern(statement.left); - } - this.walkExpression(statement.right); - const body = statement.body; - if (body.type === "BlockStatement") { - // no need to add additional scope - const prev = this.prevStatement; - this.blockPreWalkStatements(body.body); - this.prevStatement = prev; - this.walkStatements(body.body); - } else { - this.walkNestedStatement(body); - } - }); - } - - preWalkForOfStatement(statement) { - if (statement.await && this.scope.topLevelScope === true) { - this.hooks.topLevelAwait.call(statement); - } - if (statement.left.type === "VariableDeclaration") { - this.preWalkVariableDeclaration(statement.left); - } - this.preWalkStatement(statement.body); - } - - walkForOfStatement(statement) { - this.inBlockScope(() => { - if (statement.left.type === "VariableDeclaration") { - this.blockPreWalkVariableDeclaration(statement.left); - this.walkVariableDeclaration(statement.left); - } else { - this.walkPattern(statement.left); - } - this.walkExpression(statement.right); - const body = statement.body; - if (body.type === "BlockStatement") { - // no need to add additional scope - const prev = this.prevStatement; - this.blockPreWalkStatements(body.body); - this.prevStatement = prev; - this.walkStatements(body.body); - } else { - this.walkNestedStatement(body); - } - }); - } - - // Declarations - preWalkFunctionDeclaration(statement) { - if (statement.id) { - this.defineVariable(statement.id.name); - } - } - - walkFunctionDeclaration(statement) { - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = false; - this.inFunctionScope(true, statement.params, () => { - for (const param of statement.params) { - this.walkPattern(param); - } - if (statement.body.type === "BlockStatement") { - this.detectMode(statement.body.body); - const prev = this.prevStatement; - this.preWalkStatement(statement.body); - this.prevStatement = prev; - this.walkStatement(statement.body); - } else { - this.walkExpression(statement.body); - } - }); - this.scope.topLevelScope = wasTopLevel; - } - - blockPreWalkImportDeclaration(statement) { - const source = statement.source.value; - this.hooks.import.call(statement, source); - for (const specifier of statement.specifiers) { - const name = specifier.local.name; - switch (specifier.type) { - case "ImportDefaultSpecifier": - if ( - !this.hooks.importSpecifier.call(statement, source, "default", name) - ) { - this.defineVariable(name); - } - break; - case "ImportSpecifier": - if ( - !this.hooks.importSpecifier.call( - statement, - source, - specifier.imported.name || specifier.imported.value, - name - ) - ) { - this.defineVariable(name); - } - break; - case "ImportNamespaceSpecifier": - if (!this.hooks.importSpecifier.call(statement, source, null, name)) { - this.defineVariable(name); - } - break; - default: - this.defineVariable(name); - } - } - } - - enterDeclaration(declaration, onIdent) { - switch (declaration.type) { - case "VariableDeclaration": - for (const declarator of declaration.declarations) { - switch (declarator.type) { - case "VariableDeclarator": { - this.enterPattern(declarator.id, onIdent); - break; - } - } - } - break; - case "FunctionDeclaration": - this.enterPattern(declaration.id, onIdent); - break; - case "ClassDeclaration": - this.enterPattern(declaration.id, onIdent); - break; - } - } - - blockPreWalkExportNamedDeclaration(statement) { - let source; - if (statement.source) { - source = statement.source.value; - this.hooks.exportImport.call(statement, source); - } else { - this.hooks.export.call(statement); - } - if (statement.declaration) { - if ( - !this.hooks.exportDeclaration.call(statement, statement.declaration) - ) { - const prev = this.prevStatement; - this.preWalkStatement(statement.declaration); - this.prevStatement = prev; - this.blockPreWalkStatement(statement.declaration); - let index = 0; - this.enterDeclaration(statement.declaration, def => { - this.hooks.exportSpecifier.call(statement, def, def, index++); - }); - } - } - if (statement.specifiers) { - for ( - let specifierIndex = 0; - specifierIndex < statement.specifiers.length; - specifierIndex++ - ) { - const specifier = statement.specifiers[specifierIndex]; - switch (specifier.type) { - case "ExportSpecifier": { - const name = specifier.exported.name || specifier.exported.value; - if (source) { - this.hooks.exportImportSpecifier.call( - statement, - source, - specifier.local.name, - name, - specifierIndex - ); - } else { - this.hooks.exportSpecifier.call( - statement, - specifier.local.name, - name, - specifierIndex - ); - } - break; - } - } - } - } - } - - walkExportNamedDeclaration(statement) { - if (statement.declaration) { - this.walkStatement(statement.declaration); - } - } - - blockPreWalkExportDefaultDeclaration(statement) { - const prev = this.prevStatement; - this.preWalkStatement(statement.declaration); - this.prevStatement = prev; - this.blockPreWalkStatement(statement.declaration); - if ( - statement.declaration.id && - statement.declaration.type !== "FunctionExpression" && - statement.declaration.type !== "ClassExpression" - ) { - this.hooks.exportSpecifier.call( - statement, - statement.declaration.id.name, - "default", - undefined - ); - } - } - - walkExportDefaultDeclaration(statement) { - this.hooks.export.call(statement); - if ( - statement.declaration.id && - statement.declaration.type !== "FunctionExpression" && - statement.declaration.type !== "ClassExpression" - ) { - if ( - !this.hooks.exportDeclaration.call(statement, statement.declaration) - ) { - this.walkStatement(statement.declaration); - } - } else { - // Acorn parses `export default function() {}` as `FunctionDeclaration` and - // `export default class {}` as `ClassDeclaration`, both with `id = null`. - // These nodes must be treated as expressions. - if ( - statement.declaration.type === "FunctionDeclaration" || - statement.declaration.type === "ClassDeclaration" - ) { - this.walkStatement(statement.declaration); - } else { - this.walkExpression(statement.declaration); - } - if (!this.hooks.exportExpression.call(statement, statement.declaration)) { - this.hooks.exportSpecifier.call( - statement, - statement.declaration, - "default", - undefined - ); - } - } - } - - blockPreWalkExportAllDeclaration(statement) { - const source = statement.source.value; - const name = statement.exported ? statement.exported.name : null; - this.hooks.exportImport.call(statement, source); - this.hooks.exportImportSpecifier.call(statement, source, null, name, 0); - } - - preWalkVariableDeclaration(statement) { - if (statement.kind !== "var") return; - this._preWalkVariableDeclaration(statement, this.hooks.varDeclarationVar); - } - - blockPreWalkVariableDeclaration(statement) { - if (statement.kind === "var") return; - const hookMap = - statement.kind === "const" - ? this.hooks.varDeclarationConst - : this.hooks.varDeclarationLet; - this._preWalkVariableDeclaration(statement, hookMap); - } - - _preWalkVariableDeclaration(statement, hookMap) { - for (const declarator of statement.declarations) { - switch (declarator.type) { - case "VariableDeclarator": { - if (!this.hooks.preDeclarator.call(declarator, statement)) { - this.enterPattern(declarator.id, (name, decl) => { - let hook = hookMap.get(name); - if (hook === undefined || !hook.call(decl)) { - hook = this.hooks.varDeclaration.get(name); - if (hook === undefined || !hook.call(decl)) { - this.defineVariable(name); - } - } - }); - } - break; - } - } - } - } - - walkVariableDeclaration(statement) { - for (const declarator of statement.declarations) { - switch (declarator.type) { - case "VariableDeclarator": { - const renameIdentifier = - declarator.init && this.getRenameIdentifier(declarator.init); - if (renameIdentifier && declarator.id.type === "Identifier") { - const hook = this.hooks.canRename.get(renameIdentifier); - if (hook !== undefined && hook.call(declarator.init)) { - // renaming with "var a = b;" - const hook = this.hooks.rename.get(renameIdentifier); - if (hook === undefined || !hook.call(declarator.init)) { - this.setVariable(declarator.id.name, renameIdentifier); - } - break; - } - } - if (!this.hooks.declarator.call(declarator, statement)) { - this.walkPattern(declarator.id); - if (declarator.init) this.walkExpression(declarator.init); - } - break; - } - } - } - } - - blockPreWalkClassDeclaration(statement) { - if (statement.id) { - this.defineVariable(statement.id.name); - } - } - - walkClassDeclaration(statement) { - this.walkClass(statement); - } - - preWalkSwitchCases(switchCases) { - for (let index = 0, len = switchCases.length; index < len; index++) { - const switchCase = switchCases[index]; - this.preWalkStatements(switchCase.consequent); - } - } - - walkSwitchCases(switchCases) { - this.inBlockScope(() => { - const len = switchCases.length; - - // we need to pre walk all statements first since we can have invalid code - // import A from "module"; - // switch(1) { - // case 1: - // console.log(A); // should fail at runtime - // case 2: - // const A = 1; - // } - for (let index = 0; index < len; index++) { - const switchCase = switchCases[index]; - - if (switchCase.consequent.length > 0) { - const prev = this.prevStatement; - this.blockPreWalkStatements(switchCase.consequent); - this.prevStatement = prev; - } - } - - for (let index = 0; index < len; index++) { - const switchCase = switchCases[index]; - - if (switchCase.test) { - this.walkExpression(switchCase.test); - } - if (switchCase.consequent.length > 0) { - this.walkStatements(switchCase.consequent); - } - } - }); - } - - preWalkCatchClause(catchClause) { - this.preWalkStatement(catchClause.body); - } - - walkCatchClause(catchClause) { - this.inBlockScope(() => { - // Error binding is optional in catch clause since ECMAScript 2019 - if (catchClause.param !== null) { - this.enterPattern(catchClause.param, ident => { - this.defineVariable(ident); - }); - this.walkPattern(catchClause.param); - } - const prev = this.prevStatement; - this.blockPreWalkStatement(catchClause.body); - this.prevStatement = prev; - this.walkStatement(catchClause.body); - }); - } - - walkPattern(pattern) { - switch (pattern.type) { - case "ArrayPattern": - this.walkArrayPattern(pattern); - break; - case "AssignmentPattern": - this.walkAssignmentPattern(pattern); - break; - case "MemberExpression": - this.walkMemberExpression(pattern); - break; - case "ObjectPattern": - this.walkObjectPattern(pattern); - break; - case "RestElement": - this.walkRestElement(pattern); - break; - } - } - - walkAssignmentPattern(pattern) { - this.walkExpression(pattern.right); - this.walkPattern(pattern.left); - } - - walkObjectPattern(pattern) { - for (let i = 0, len = pattern.properties.length; i < len; i++) { - const prop = pattern.properties[i]; - if (prop) { - if (prop.computed) this.walkExpression(prop.key); - if (prop.value) this.walkPattern(prop.value); - } - } - } - - walkArrayPattern(pattern) { - for (let i = 0, len = pattern.elements.length; i < len; i++) { - const element = pattern.elements[i]; - if (element) this.walkPattern(element); - } - } - - walkRestElement(pattern) { - this.walkPattern(pattern.argument); - } - - walkExpressions(expressions) { - for (const expression of expressions) { - if (expression) { - this.walkExpression(expression); - } - } - } - - walkExpression(expression) { - switch (expression.type) { - case "ArrayExpression": - this.walkArrayExpression(expression); - break; - case "ArrowFunctionExpression": - this.walkArrowFunctionExpression(expression); - break; - case "AssignmentExpression": - this.walkAssignmentExpression(expression); - break; - case "AwaitExpression": - this.walkAwaitExpression(expression); - break; - case "BinaryExpression": - this.walkBinaryExpression(expression); - break; - case "CallExpression": - this.walkCallExpression(expression); - break; - case "ChainExpression": - this.walkChainExpression(expression); - break; - case "ClassExpression": - this.walkClassExpression(expression); - break; - case "ConditionalExpression": - this.walkConditionalExpression(expression); - break; - case "FunctionExpression": - this.walkFunctionExpression(expression); - break; - case "Identifier": - this.walkIdentifier(expression); - break; - case "ImportExpression": - this.walkImportExpression(expression); - break; - case "LogicalExpression": - this.walkLogicalExpression(expression); - break; - case "MetaProperty": - this.walkMetaProperty(expression); - break; - case "MemberExpression": - this.walkMemberExpression(expression); - break; - case "NewExpression": - this.walkNewExpression(expression); - break; - case "ObjectExpression": - this.walkObjectExpression(expression); - break; - case "SequenceExpression": - this.walkSequenceExpression(expression); - break; - case "SpreadElement": - this.walkSpreadElement(expression); - break; - case "TaggedTemplateExpression": - this.walkTaggedTemplateExpression(expression); - break; - case "TemplateLiteral": - this.walkTemplateLiteral(expression); - break; - case "ThisExpression": - this.walkThisExpression(expression); - break; - case "UnaryExpression": - this.walkUnaryExpression(expression); - break; - case "UpdateExpression": - this.walkUpdateExpression(expression); - break; - case "YieldExpression": - this.walkYieldExpression(expression); - break; - } - } - - walkAwaitExpression(expression) { - if (this.scope.topLevelScope === true) - this.hooks.topLevelAwait.call(expression); - this.walkExpression(expression.argument); - } - - walkArrayExpression(expression) { - if (expression.elements) { - this.walkExpressions(expression.elements); - } - } - - walkSpreadElement(expression) { - if (expression.argument) { - this.walkExpression(expression.argument); - } - } - - walkObjectExpression(expression) { - for ( - let propIndex = 0, len = expression.properties.length; - propIndex < len; - propIndex++ - ) { - const prop = expression.properties[propIndex]; - this.walkProperty(prop); - } - } - - walkProperty(prop) { - if (prop.type === "SpreadElement") { - this.walkExpression(prop.argument); - return; - } - if (prop.computed) { - this.walkExpression(prop.key); - } - if (prop.shorthand && prop.value && prop.value.type === "Identifier") { - this.scope.inShorthand = prop.value.name; - this.walkIdentifier(prop.value); - this.scope.inShorthand = false; - } else { - this.walkExpression(prop.value); - } - } - - walkFunctionExpression(expression) { - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = false; - const scopeParams = expression.params; - - // Add function name in scope for recursive calls - if (expression.id) { - scopeParams.push(expression.id.name); - } - - this.inFunctionScope(true, scopeParams, () => { - for (const param of expression.params) { - this.walkPattern(param); - } - if (expression.body.type === "BlockStatement") { - this.detectMode(expression.body.body); - const prev = this.prevStatement; - this.preWalkStatement(expression.body); - this.prevStatement = prev; - this.walkStatement(expression.body); - } else { - this.walkExpression(expression.body); - } - }); - this.scope.topLevelScope = wasTopLevel; - } - - walkArrowFunctionExpression(expression) { - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = wasTopLevel ? "arrow" : false; - this.inFunctionScope(false, expression.params, () => { - for (const param of expression.params) { - this.walkPattern(param); - } - if (expression.body.type === "BlockStatement") { - this.detectMode(expression.body.body); - const prev = this.prevStatement; - this.preWalkStatement(expression.body); - this.prevStatement = prev; - this.walkStatement(expression.body); - } else { - this.walkExpression(expression.body); - } - }); - this.scope.topLevelScope = wasTopLevel; - } - - /** - * @param {SequenceExpressionNode} expression the sequence - */ - walkSequenceExpression(expression) { - if (!expression.expressions) return; - // We treat sequence expressions like statements when they are one statement level - // This has some benefits for optimizations that only work on statement level - const currentStatement = this.statementPath[this.statementPath.length - 1]; - if ( - currentStatement === expression || - (currentStatement.type === "ExpressionStatement" && - currentStatement.expression === expression) - ) { - const old = this.statementPath.pop(); - for (const expr of expression.expressions) { - this.statementPath.push(expr); - this.walkExpression(expr); - this.statementPath.pop(); - } - this.statementPath.push(old); - } else { - this.walkExpressions(expression.expressions); - } - } - - walkUpdateExpression(expression) { - this.walkExpression(expression.argument); - } - - walkUnaryExpression(expression) { - if (expression.operator === "typeof") { - const result = this.callHooksForExpression( - this.hooks.typeof, - expression.argument, - expression - ); - if (result === true) return; - if (expression.argument.type === "ChainExpression") { - const result = this.callHooksForExpression( - this.hooks.typeof, - expression.argument.expression, - expression - ); - if (result === true) return; - } - } - this.walkExpression(expression.argument); - } - - walkLeftRightExpression(expression) { - this.walkExpression(expression.left); - this.walkExpression(expression.right); - } - - walkBinaryExpression(expression) { - if (this.hooks.binaryExpression.call(expression) === undefined) { - this.walkLeftRightExpression(expression); - } - } - - walkLogicalExpression(expression) { - const result = this.hooks.expressionLogicalOperator.call(expression); - if (result === undefined) { - this.walkLeftRightExpression(expression); - } else { - if (result) { - this.walkExpression(expression.right); - } - } - } - - walkAssignmentExpression(expression) { - if (expression.left.type === "Identifier") { - const renameIdentifier = this.getRenameIdentifier(expression.right); - if (renameIdentifier) { - if ( - this.callHooksForInfo( - this.hooks.canRename, - renameIdentifier, - expression.right - ) - ) { - // renaming "a = b;" - if ( - !this.callHooksForInfo( - this.hooks.rename, - renameIdentifier, - expression.right - ) - ) { - this.setVariable( - expression.left.name, - typeof renameIdentifier === "string" - ? this.getVariableInfo(renameIdentifier) - : renameIdentifier - ); - } - return; - } - } - this.walkExpression(expression.right); - this.enterPattern(expression.left, (name, decl) => { - if (!this.callHooksForName(this.hooks.assign, name, expression)) { - this.walkExpression(expression.left); - } - }); - return; - } - if (expression.left.type.endsWith("Pattern")) { - this.walkExpression(expression.right); - this.enterPattern(expression.left, (name, decl) => { - if (!this.callHooksForName(this.hooks.assign, name, expression)) { - this.defineVariable(name); - } - }); - this.walkPattern(expression.left); - } else if (expression.left.type === "MemberExpression") { - const exprName = this.getMemberExpressionInfo( - expression.left, - ALLOWED_MEMBER_TYPES_EXPRESSION - ); - if (exprName) { - if ( - this.callHooksForInfo( - this.hooks.assignMemberChain, - exprName.rootInfo, - expression, - exprName.getMembers() - ) - ) { - return; - } - } - this.walkExpression(expression.right); - this.walkExpression(expression.left); - } else { - this.walkExpression(expression.right); - this.walkExpression(expression.left); - } - } - - walkConditionalExpression(expression) { - const result = this.hooks.expressionConditionalOperator.call(expression); - if (result === undefined) { - this.walkExpression(expression.test); - this.walkExpression(expression.consequent); - if (expression.alternate) { - this.walkExpression(expression.alternate); - } - } else { - if (result) { - this.walkExpression(expression.consequent); - } else if (expression.alternate) { - this.walkExpression(expression.alternate); - } - } - } - - walkNewExpression(expression) { - const result = this.callHooksForExpression( - this.hooks.new, - expression.callee, - expression - ); - if (result === true) return; - this.walkExpression(expression.callee); - if (expression.arguments) { - this.walkExpressions(expression.arguments); - } - } - - walkYieldExpression(expression) { - if (expression.argument) { - this.walkExpression(expression.argument); - } - } - - walkTemplateLiteral(expression) { - if (expression.expressions) { - this.walkExpressions(expression.expressions); - } - } - - walkTaggedTemplateExpression(expression) { - if (expression.tag) { - this.walkExpression(expression.tag); - } - if (expression.quasi && expression.quasi.expressions) { - this.walkExpressions(expression.quasi.expressions); - } - } - - walkClassExpression(expression) { - this.walkClass(expression); - } - - /** - * @param {ChainExpressionNode} expression expression - */ - walkChainExpression(expression) { - const result = this.hooks.optionalChaining.call(expression); - - if (result === undefined) { - if (expression.expression.type === "CallExpression") { - this.walkCallExpression(expression.expression); - } else { - this.walkMemberExpression(expression.expression); - } - } - } - - _walkIIFE(functionExpression, options, currentThis) { - const getVarInfo = argOrThis => { - const renameIdentifier = this.getRenameIdentifier(argOrThis); - if (renameIdentifier) { - if ( - this.callHooksForInfo( - this.hooks.canRename, - renameIdentifier, - argOrThis - ) - ) { - if ( - !this.callHooksForInfo( - this.hooks.rename, - renameIdentifier, - argOrThis - ) - ) { - return typeof renameIdentifier === "string" - ? this.getVariableInfo(renameIdentifier) - : renameIdentifier; - } - } - } - this.walkExpression(argOrThis); - }; - const { params, type } = functionExpression; - const arrow = type === "ArrowFunctionExpression"; - const renameThis = currentThis ? getVarInfo(currentThis) : null; - const varInfoForArgs = options.map(getVarInfo); - const wasTopLevel = this.scope.topLevelScope; - this.scope.topLevelScope = wasTopLevel && arrow ? "arrow" : false; - const scopeParams = params.filter( - (identifier, idx) => !varInfoForArgs[idx] - ); - - // Add function name in scope for recursive calls - if (functionExpression.id) { - scopeParams.push(functionExpression.id.name); - } - - this.inFunctionScope(true, scopeParams, () => { - if (renameThis && !arrow) { - this.setVariable("this", renameThis); - } - for (let i = 0; i < varInfoForArgs.length; i++) { - const varInfo = varInfoForArgs[i]; - if (!varInfo) continue; - if (!params[i] || params[i].type !== "Identifier") continue; - this.setVariable(params[i].name, varInfo); - } - if (functionExpression.body.type === "BlockStatement") { - this.detectMode(functionExpression.body.body); - const prev = this.prevStatement; - this.preWalkStatement(functionExpression.body); - this.prevStatement = prev; - this.walkStatement(functionExpression.body); - } else { - this.walkExpression(functionExpression.body); - } - }); - this.scope.topLevelScope = wasTopLevel; - } - - walkImportExpression(expression) { - let result = this.hooks.importCall.call(expression); - if (result === true) return; - - this.walkExpression(expression.source); - } - - walkCallExpression(expression) { - const isSimpleFunction = fn => { - return fn.params.every(p => p.type === "Identifier"); - }; - if ( - expression.callee.type === "MemberExpression" && - expression.callee.object.type.endsWith("FunctionExpression") && - !expression.callee.computed && - (expression.callee.property.name === "call" || - expression.callee.property.name === "bind") && - expression.arguments.length > 0 && - isSimpleFunction(expression.callee.object) - ) { - // (function(…) { }.call/bind(?, …)) - this._walkIIFE( - expression.callee.object, - expression.arguments.slice(1), - expression.arguments[0] - ); - } else if ( - expression.callee.type.endsWith("FunctionExpression") && - isSimpleFunction(expression.callee) - ) { - // (function(…) { }(…)) - this._walkIIFE(expression.callee, expression.arguments, null); - } else { - if (expression.callee.type === "MemberExpression") { - const exprInfo = this.getMemberExpressionInfo( - expression.callee, - ALLOWED_MEMBER_TYPES_CALL_EXPRESSION - ); - if (exprInfo && exprInfo.type === "call") { - const result = this.callHooksForInfo( - this.hooks.callMemberChainOfCallMemberChain, - exprInfo.rootInfo, - expression, - exprInfo.getCalleeMembers(), - exprInfo.call, - exprInfo.getMembers() - ); - if (result === true) return; - } - } - const callee = this.evaluateExpression(expression.callee); - if (callee.isIdentifier()) { - const result1 = this.callHooksForInfo( - this.hooks.callMemberChain, - callee.rootInfo, - expression, - callee.getMembers(), - callee.getMembersOptionals - ? callee.getMembersOptionals() - : callee.getMembers().map(() => false) - ); - if (result1 === true) return; - const result2 = this.callHooksForInfo( - this.hooks.call, - callee.identifier, - expression - ); - if (result2 === true) return; - } - - if (expression.callee) { - if (expression.callee.type === "MemberExpression") { - // because of call context we need to walk the call context as expression - this.walkExpression(expression.callee.object); - if (expression.callee.computed === true) - this.walkExpression(expression.callee.property); - } else { - this.walkExpression(expression.callee); - } - } - if (expression.arguments) this.walkExpressions(expression.arguments); - } - } - - walkMemberExpression(expression) { - const exprInfo = this.getMemberExpressionInfo( - expression, - ALLOWED_MEMBER_TYPES_ALL - ); - if (exprInfo) { - switch (exprInfo.type) { - case "expression": { - const result1 = this.callHooksForInfo( - this.hooks.expression, - exprInfo.name, - expression - ); - if (result1 === true) return; - const members = exprInfo.getMembers(); - const membersOptionals = exprInfo.getMembersOptionals(); - const result2 = this.callHooksForInfo( - this.hooks.expressionMemberChain, - exprInfo.rootInfo, - expression, - members, - membersOptionals - ); - if (result2 === true) return; - this.walkMemberExpressionWithExpressionName( - expression, - exprInfo.name, - exprInfo.rootInfo, - members.slice(), - () => - this.callHooksForInfo( - this.hooks.unhandledExpressionMemberChain, - exprInfo.rootInfo, - expression, - members - ) - ); - return; - } - case "call": { - const result = this.callHooksForInfo( - this.hooks.memberChainOfCallMemberChain, - exprInfo.rootInfo, - expression, - exprInfo.getCalleeMembers(), - exprInfo.call, - exprInfo.getMembers() - ); - if (result === true) return; - // Fast skip over the member chain as we already called memberChainOfCallMemberChain - // and call computed property are literals anyway - this.walkExpression(exprInfo.call); - return; - } - } - } - this.walkExpression(expression.object); - if (expression.computed === true) this.walkExpression(expression.property); - } - - walkMemberExpressionWithExpressionName( - expression, - name, - rootInfo, - members, - onUnhandled - ) { - if (expression.object.type === "MemberExpression") { - // optimize the case where expression.object is a MemberExpression too. - // we can keep info here when calling walkMemberExpression directly - const property = - expression.property.name || `${expression.property.value}`; - name = name.slice(0, -property.length - 1); - members.pop(); - const result = this.callHooksForInfo( - this.hooks.expression, - name, - expression.object - ); - if (result === true) return; - this.walkMemberExpressionWithExpressionName( - expression.object, - name, - rootInfo, - members, - onUnhandled - ); - } else if (!onUnhandled || !onUnhandled()) { - this.walkExpression(expression.object); - } - if (expression.computed === true) this.walkExpression(expression.property); - } - - walkThisExpression(expression) { - this.callHooksForName(this.hooks.expression, "this", expression); - } - - walkIdentifier(expression) { - this.callHooksForName(this.hooks.expression, expression.name, expression); - } - - /** - * @param {MetaPropertyNode} metaProperty meta property - */ - walkMetaProperty(metaProperty) { - this.hooks.expression.for(getRootName(metaProperty)).call(metaProperty); - } - - callHooksForExpression(hookMap, expr, ...args) { - return this.callHooksForExpressionWithFallback( - hookMap, - expr, - undefined, - undefined, - ...args - ); - } - - /** - * @template T - * @template R - * @param {HookMap>} hookMap hooks the should be called - * @param {MemberExpressionNode} expr expression info - * @param {function(string, string | ScopeInfo | VariableInfo, function(): string[]): any} fallback callback when variable in not handled by hooks - * @param {function(string): any} defined callback when variable is defined - * @param {AsArray} args args for the hook - * @returns {R} result of hook - */ - callHooksForExpressionWithFallback( - hookMap, - expr, - fallback, - defined, - ...args - ) { - const exprName = this.getMemberExpressionInfo( - expr, - ALLOWED_MEMBER_TYPES_EXPRESSION - ); - if (exprName !== undefined) { - const members = exprName.getMembers(); - return this.callHooksForInfoWithFallback( - hookMap, - members.length === 0 ? exprName.rootInfo : exprName.name, - fallback && - (name => fallback(name, exprName.rootInfo, exprName.getMembers)), - defined && (() => defined(exprName.name)), - ...args - ); - } - } - - /** - * @template T - * @template R - * @param {HookMap>} hookMap hooks the should be called - * @param {string} name key in map - * @param {AsArray} args args for the hook - * @returns {R} result of hook - */ - callHooksForName(hookMap, name, ...args) { - return this.callHooksForNameWithFallback( - hookMap, - name, - undefined, - undefined, - ...args - ); - } - - /** - * @template T - * @template R - * @param {HookMap>} hookMap hooks that should be called - * @param {ExportedVariableInfo} info variable info - * @param {AsArray} args args for the hook - * @returns {R} result of hook - */ - callHooksForInfo(hookMap, info, ...args) { - return this.callHooksForInfoWithFallback( - hookMap, - info, - undefined, - undefined, - ...args - ); - } - - /** - * @template T - * @template R - * @param {HookMap>} hookMap hooks the should be called - * @param {ExportedVariableInfo} info variable info - * @param {function(string): any} fallback callback when variable in not handled by hooks - * @param {function(): any} defined callback when variable is defined - * @param {AsArray} args args for the hook - * @returns {R} result of hook - */ - callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args) { - let name; - if (typeof info === "string") { - name = info; - } else { - if (!(info instanceof VariableInfo)) { - if (defined !== undefined) { - return defined(); - } - return; - } - let tagInfo = info.tagInfo; - while (tagInfo !== undefined) { - const hook = hookMap.get(tagInfo.tag); - if (hook !== undefined) { - this.currentTagData = tagInfo.data; - const result = hook.call(...args); - this.currentTagData = undefined; - if (result !== undefined) return result; - } - tagInfo = tagInfo.next; - } - if (info.freeName === true) { - if (defined !== undefined) { - return defined(); - } - return; - } - name = info.freeName; - } - const hook = hookMap.get(name); - if (hook !== undefined) { - const result = hook.call(...args); - if (result !== undefined) return result; - } - if (fallback !== undefined) { - return fallback(name); - } - } - - /** - * @template T - * @template R - * @param {HookMap>} hookMap hooks the should be called - * @param {string} name key in map - * @param {function(string): any} fallback callback when variable in not handled by hooks - * @param {function(): any} defined callback when variable is defined - * @param {AsArray} args args for the hook - * @returns {R} result of hook - */ - callHooksForNameWithFallback(hookMap, name, fallback, defined, ...args) { - return this.callHooksForInfoWithFallback( - hookMap, - this.getVariableInfo(name), - fallback, - defined, - ...args - ); - } - - /** - * @deprecated - * @param {any} params scope params - * @param {function(): void} fn inner function - * @returns {void} - */ - inScope(params, fn) { - const oldScope = this.scope; - this.scope = { - topLevelScope: oldScope.topLevelScope, - inTry: false, - inShorthand: false, - isStrict: oldScope.isStrict, - isAsmJs: oldScope.isAsmJs, - definitions: oldScope.definitions.createChild() - }; - - this.undefineVariable("this"); - - this.enterPatterns(params, (ident, pattern) => { - this.defineVariable(ident); - }); - - fn(); - - this.scope = oldScope; - } - - inFunctionScope(hasThis, params, fn) { - const oldScope = this.scope; - this.scope = { - topLevelScope: oldScope.topLevelScope, - inTry: false, - inShorthand: false, - isStrict: oldScope.isStrict, - isAsmJs: oldScope.isAsmJs, - definitions: oldScope.definitions.createChild() - }; - - if (hasThis) { - this.undefineVariable("this"); - } - - this.enterPatterns(params, (ident, pattern) => { - this.defineVariable(ident); - }); - - fn(); - - this.scope = oldScope; - } - - inBlockScope(fn) { - const oldScope = this.scope; - this.scope = { - topLevelScope: oldScope.topLevelScope, - inTry: oldScope.inTry, - inShorthand: false, - isStrict: oldScope.isStrict, - isAsmJs: oldScope.isAsmJs, - definitions: oldScope.definitions.createChild() - }; - - fn(); - - this.scope = oldScope; - } - - detectMode(statements) { - const isLiteral = - statements.length >= 1 && - statements[0].type === "ExpressionStatement" && - statements[0].expression.type === "Literal"; - if (isLiteral && statements[0].expression.value === "use strict") { - this.scope.isStrict = true; - } - if (isLiteral && statements[0].expression.value === "use asm") { - this.scope.isAsmJs = true; - } - } - - enterPatterns(patterns, onIdent) { - for (const pattern of patterns) { - if (typeof pattern !== "string") { - this.enterPattern(pattern, onIdent); - } else if (pattern) { - onIdent(pattern); - } - } - } - - enterPattern(pattern, onIdent) { - if (!pattern) return; - switch (pattern.type) { - case "ArrayPattern": - this.enterArrayPattern(pattern, onIdent); - break; - case "AssignmentPattern": - this.enterAssignmentPattern(pattern, onIdent); - break; - case "Identifier": - this.enterIdentifier(pattern, onIdent); - break; - case "ObjectPattern": - this.enterObjectPattern(pattern, onIdent); - break; - case "RestElement": - this.enterRestElement(pattern, onIdent); - break; - case "Property": - if (pattern.shorthand && pattern.value.type === "Identifier") { - this.scope.inShorthand = pattern.value.name; - this.enterIdentifier(pattern.value, onIdent); - this.scope.inShorthand = false; - } else { - this.enterPattern(pattern.value, onIdent); - } - break; - } - } - - enterIdentifier(pattern, onIdent) { - if (!this.callHooksForName(this.hooks.pattern, pattern.name, pattern)) { - onIdent(pattern.name, pattern); - } - } - - enterObjectPattern(pattern, onIdent) { - for ( - let propIndex = 0, len = pattern.properties.length; - propIndex < len; - propIndex++ - ) { - const prop = pattern.properties[propIndex]; - this.enterPattern(prop, onIdent); - } - } - - enterArrayPattern(pattern, onIdent) { - for ( - let elementIndex = 0, len = pattern.elements.length; - elementIndex < len; - elementIndex++ - ) { - const element = pattern.elements[elementIndex]; - this.enterPattern(element, onIdent); - } - } - - enterRestElement(pattern, onIdent) { - this.enterPattern(pattern.argument, onIdent); - } - - enterAssignmentPattern(pattern, onIdent) { - this.enterPattern(pattern.left, onIdent); - } - - /** - * @param {ExpressionNode} expression expression node - * @returns {BasicEvaluatedExpression} evaluation result - */ - evaluateExpression(expression) { - try { - const hook = this.hooks.evaluate.get(expression.type); - if (hook !== undefined) { - const result = hook.call(expression); - if (result !== undefined && result !== null) { - result.setExpression(expression); - return result; - } - } - } catch (e) { - console.warn(e); - // ignore error - } - return new BasicEvaluatedExpression() - .setRange(expression.range) - .setExpression(expression); - } - - parseString(expression) { - switch (expression.type) { - case "BinaryExpression": - if (expression.operator === "+") { - return ( - this.parseString(expression.left) + - this.parseString(expression.right) - ); - } - break; - case "Literal": - return expression.value + ""; - } - throw new Error( - expression.type + " is not supported as parameter for require" - ); - } - - parseCalculatedString(expression) { - switch (expression.type) { - case "BinaryExpression": - if (expression.operator === "+") { - const left = this.parseCalculatedString(expression.left); - const right = this.parseCalculatedString(expression.right); - if (left.code) { - return { - range: left.range, - value: left.value, - code: true, - conditional: false - }; - } else if (right.code) { - return { - range: [ - left.range[0], - right.range ? right.range[1] : left.range[1] - ], - value: left.value + right.value, - code: true, - conditional: false - }; - } else { - return { - range: [left.range[0], right.range[1]], - value: left.value + right.value, - code: false, - conditional: false - }; - } - } - break; - case "ConditionalExpression": { - const consequent = this.parseCalculatedString(expression.consequent); - const alternate = this.parseCalculatedString(expression.alternate); - const items = []; - if (consequent.conditional) { - items.push(...consequent.conditional); - } else if (!consequent.code) { - items.push(consequent); - } else { - break; - } - if (alternate.conditional) { - items.push(...alternate.conditional); - } else if (!alternate.code) { - items.push(alternate); - } else { - break; - } - return { - range: undefined, - value: "", - code: true, - conditional: items - }; - } - case "Literal": - return { - range: expression.range, - value: expression.value + "", - code: false, - conditional: false - }; - } - return { - range: undefined, - value: "", - code: true, - conditional: false - }; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - let ast; - let comments; - const semicolons = new Set(); - if (source === null) { - throw new Error("source must not be null"); - } - if (Buffer.isBuffer(source)) { - source = source.toString("utf-8"); - } - if (typeof source === "object") { - ast = /** @type {ProgramNode} */ (source); - comments = source.comments; - } else { - comments = []; - ast = JavascriptParser._parse(source, { - sourceType: this.sourceType, - onComment: comments, - onInsertedSemicolon: pos => semicolons.add(pos) - }); - } - - const oldScope = this.scope; - const oldState = this.state; - const oldComments = this.comments; - const oldSemicolons = this.semicolons; - const oldStatementPath = this.statementPath; - const oldPrevStatement = this.prevStatement; - this.scope = { - topLevelScope: true, - inTry: false, - inShorthand: false, - isStrict: false, - isAsmJs: false, - definitions: new StackedMap() - }; - /** @type {ParserState} */ - this.state = state; - this.comments = comments; - this.semicolons = semicolons; - this.statementPath = []; - this.prevStatement = undefined; - if (this.hooks.program.call(ast, comments) === undefined) { - this.detectMode(ast.body); - this.preWalkStatements(ast.body); - this.prevStatement = undefined; - this.blockPreWalkStatements(ast.body); - this.prevStatement = undefined; - this.walkStatements(ast.body); - } - this.hooks.finish.call(ast, comments); - this.scope = oldScope; - /** @type {ParserState} */ - this.state = oldState; - this.comments = oldComments; - this.semicolons = oldSemicolons; - this.statementPath = oldStatementPath; - this.prevStatement = oldPrevStatement; - return state; - } - - /** - * @param {string} source source code - * @returns {BasicEvaluatedExpression} evaluation result - */ - evaluate(source) { - const ast = JavascriptParser._parse("(" + source + ")", { - sourceType: this.sourceType, - locations: false - }); - if (ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement") { - throw new Error("evaluate: Source is not a expression"); - } - return this.evaluateExpression(ast.body[0].expression); - } - - /** - * @param {ExpressionNode | DeclarationNode | PrivateIdentifierNode | null | undefined} expr an expression - * @param {number} commentsStartPos source position from which annotation comments are checked - * @returns {boolean} true, when the expression is pure - */ - isPure(expr, commentsStartPos) { - if (!expr) return true; - const result = this.hooks.isPure - .for(expr.type) - .call(expr, commentsStartPos); - if (typeof result === "boolean") return result; - switch (expr.type) { - case "ClassDeclaration": - case "ClassExpression": { - if (expr.body.type !== "ClassBody") return false; - if (expr.superClass && !this.isPure(expr.superClass, expr.range[0])) { - return false; - } - const items = - /** @type {(MethodDefinitionNode | PropertyDefinitionNode)[]} */ ( - expr.body.body - ); - return items.every( - item => - (!item.computed || - !item.key || - this.isPure(item.key, item.range[0])) && - (!item.static || - !item.value || - this.isPure( - item.value, - item.key ? item.key.range[1] : item.range[0] - )) - ); - } - - case "FunctionDeclaration": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "Literal": - case "PrivateIdentifier": - return true; - - case "VariableDeclaration": - return expr.declarations.every(decl => - this.isPure(decl.init, decl.range[0]) - ); - - case "ConditionalExpression": - return ( - this.isPure(expr.test, commentsStartPos) && - this.isPure(expr.consequent, expr.test.range[1]) && - this.isPure(expr.alternate, expr.consequent.range[1]) - ); - - case "SequenceExpression": - return expr.expressions.every(expr => { - const pureFlag = this.isPure(expr, commentsStartPos); - commentsStartPos = expr.range[1]; - return pureFlag; - }); - - case "CallExpression": { - const pureFlag = - expr.range[0] - commentsStartPos > 12 && - this.getComments([commentsStartPos, expr.range[0]]).some( - comment => - comment.type === "Block" && - /^\s*(#|@)__PURE__\s*$/.test(comment.value) - ); - if (!pureFlag) return false; - commentsStartPos = expr.callee.range[1]; - return expr.arguments.every(arg => { - if (arg.type === "SpreadElement") return false; - const pureFlag = this.isPure(arg, commentsStartPos); - commentsStartPos = arg.range[1]; - return pureFlag; - }); - } - } - const evaluated = this.evaluateExpression(expr); - return !evaluated.couldHaveSideEffects(); - } - - getComments(range) { - const [rangeStart, rangeEnd] = range; - const compare = (comment, needle) => comment.range[0] - needle; - let idx = binarySearchBounds.ge(this.comments, rangeStart, compare); - let commentsInRange = []; - while (this.comments[idx] && this.comments[idx].range[1] <= rangeEnd) { - commentsInRange.push(this.comments[idx]); - idx++; - } - - return commentsInRange; - } - - /** - * @param {number} pos source code position - * @returns {boolean} true when a semicolon has been inserted before this position, false if not - */ - isAsiPosition(pos) { - const currentStatement = this.statementPath[this.statementPath.length - 1]; - if (currentStatement === undefined) throw new Error("Not in statement"); - return ( - // Either asking directly for the end position of the current statement - (currentStatement.range[1] === pos && this.semicolons.has(pos)) || - // Or asking for the start position of the current statement, - // here we have to check multiple things - (currentStatement.range[0] === pos && - // is there a previous statement which might be relevant? - this.prevStatement !== undefined && - // is the end position of the previous statement an ASI position? - this.semicolons.has(this.prevStatement.range[1])) - ); - } - - /** - * @param {number} pos source code position - * @returns {void} - */ - unsetAsiPosition(pos) { - this.semicolons.delete(pos); - } - - isStatementLevelExpression(expr) { - const currentStatement = this.statementPath[this.statementPath.length - 1]; - return ( - expr === currentStatement || - (currentStatement.type === "ExpressionStatement" && - currentStatement.expression === expr) - ); - } - - getTagData(name, tag) { - const info = this.scope.definitions.get(name); - if (info instanceof VariableInfo) { - let tagInfo = info.tagInfo; - while (tagInfo !== undefined) { - if (tagInfo.tag === tag) return tagInfo.data; - tagInfo = tagInfo.next; - } - } - } - - tagVariable(name, tag, data) { - const oldInfo = this.scope.definitions.get(name); - /** @type {VariableInfo} */ - let newInfo; - if (oldInfo === undefined) { - newInfo = new VariableInfo(this.scope, name, { - tag, - data, - next: undefined - }); - } else if (oldInfo instanceof VariableInfo) { - newInfo = new VariableInfo(oldInfo.declaredScope, oldInfo.freeName, { - tag, - data, - next: oldInfo.tagInfo - }); - } else { - newInfo = new VariableInfo(oldInfo, true, { - tag, - data, - next: undefined - }); - } - this.scope.definitions.set(name, newInfo); - } - - defineVariable(name) { - const oldInfo = this.scope.definitions.get(name); - // Don't redefine variable in same scope to keep existing tags - if (oldInfo instanceof VariableInfo && oldInfo.declaredScope === this.scope) - return; - this.scope.definitions.set(name, this.scope); - } - - undefineVariable(name) { - this.scope.definitions.delete(name); - } - - isVariableDefined(name) { - const info = this.scope.definitions.get(name); - if (info === undefined) return false; - if (info instanceof VariableInfo) { - return info.freeName === true; - } - return true; - } - - /** - * @param {string} name variable name - * @returns {ExportedVariableInfo} info for this variable - */ - getVariableInfo(name) { - const value = this.scope.definitions.get(name); - if (value === undefined) { - return name; - } else { - return value; - } - } - - /** - * @param {string} name variable name - * @param {ExportedVariableInfo} variableInfo new info for this variable - * @returns {void} - */ - setVariable(name, variableInfo) { - if (typeof variableInfo === "string") { - if (variableInfo === name) { - this.scope.definitions.delete(name); - } else { - this.scope.definitions.set( - name, - new VariableInfo(this.scope, variableInfo, undefined) - ); - } - } else { - this.scope.definitions.set(name, variableInfo); - } - } - - evaluatedVariable(tagInfo) { - return new VariableInfo(this.scope, undefined, tagInfo); - } - - parseCommentOptions(range) { - const comments = this.getComments(range); - if (comments.length === 0) { - return EMPTY_COMMENT_OPTIONS; - } - let options = {}; - let errors = []; - for (const comment of comments) { - const { value } = comment; - if (value && webpackCommentRegExp.test(value)) { - // try compile only if webpack options comment is present - try { - const val = vm.runInNewContext(`(function(){return {${value}};})()`); - Object.assign(options, val); - } catch (e) { - e.comment = comment; - errors.push(e); - } - } - } - return { options, errors }; - } - - /** - * @param {MemberExpressionNode} expression a member expression - * @returns {{ members: string[], object: ExpressionNode | SuperNode, membersOptionals: boolean[] }} member names (reverse order) and remaining object - */ - extractMemberExpressionChain(expression) { - /** @type {AnyNode} */ - let expr = expression; - const members = []; - const membersOptionals = []; - while (expr.type === "MemberExpression") { - if (expr.computed) { - if (expr.property.type !== "Literal") break; - members.push(`${expr.property.value}`); - } else { - if (expr.property.type !== "Identifier") break; - members.push(expr.property.name); - } - membersOptionals.push(expr.optional); - expr = expr.object; - } - - return { - members, - membersOptionals, - object: expr - }; - } - - /** - * @param {string} varName variable name - * @returns {{name: string, info: VariableInfo | string}} name of the free variable and variable info for that - */ - getFreeInfoFromVariable(varName) { - const info = this.getVariableInfo(varName); - let name; - if (info instanceof VariableInfo) { - name = info.freeName; - if (typeof name !== "string") return undefined; - } else if (typeof info !== "string") { - return undefined; - } else { - name = info; - } - return { info, name }; - } - - /** @typedef {{ type: "call", call: CallExpressionNode, calleeName: string, rootInfo: string | VariableInfo, getCalleeMembers: () => string[], name: string, getMembers: () => string[], getMembersOptionals: () => boolean[]}} CallExpressionInfo */ - /** @typedef {{ type: "expression", rootInfo: string | VariableInfo, name: string, getMembers: () => string[], getMembersOptionals: () => boolean[]}} ExpressionExpressionInfo */ - - /** - * @param {MemberExpressionNode} expression a member expression - * @param {number} allowedTypes which types should be returned, presented in bit mask - * @returns {CallExpressionInfo | ExpressionExpressionInfo | undefined} expression info - */ - getMemberExpressionInfo(expression, allowedTypes) { - const { object, members, membersOptionals } = - this.extractMemberExpressionChain(expression); - switch (object.type) { - case "CallExpression": { - if ((allowedTypes & ALLOWED_MEMBER_TYPES_CALL_EXPRESSION) === 0) - return undefined; - let callee = object.callee; - let rootMembers = EMPTY_ARRAY; - if (callee.type === "MemberExpression") { - ({ object: callee, members: rootMembers } = - this.extractMemberExpressionChain(callee)); - } - const rootName = getRootName(callee); - if (!rootName) return undefined; - const result = this.getFreeInfoFromVariable(rootName); - if (!result) return undefined; - const { info: rootInfo, name: resolvedRoot } = result; - const calleeName = objectAndMembersToName(resolvedRoot, rootMembers); - return { - type: "call", - call: object, - calleeName, - rootInfo, - getCalleeMembers: memoize(() => rootMembers.reverse()), - name: objectAndMembersToName(`${calleeName}()`, members), - getMembers: memoize(() => members.reverse()), - getMembersOptionals: memoize(() => membersOptionals.reverse()) - }; - } - case "Identifier": - case "MetaProperty": - case "ThisExpression": { - if ((allowedTypes & ALLOWED_MEMBER_TYPES_EXPRESSION) === 0) - return undefined; - const rootName = getRootName(object); - if (!rootName) return undefined; - - const result = this.getFreeInfoFromVariable(rootName); - if (!result) return undefined; - const { info: rootInfo, name: resolvedRoot } = result; - return { - type: "expression", - name: objectAndMembersToName(resolvedRoot, members), - rootInfo, - getMembers: memoize(() => members.reverse()), - getMembersOptionals: memoize(() => membersOptionals.reverse()) - }; - } - } - } - - /** - * @param {MemberExpressionNode} expression an expression - * @returns {{ name: string, rootInfo: ExportedVariableInfo, getMembers: () => string[]}} name info - */ - getNameForExpression(expression) { - return this.getMemberExpressionInfo( - expression, - ALLOWED_MEMBER_TYPES_EXPRESSION - ); - } - - /** - * @param {string} code source code - * @param {ParseOptions} options parsing options - * @returns {ProgramNode} parsed ast - */ - static _parse(code, options) { - const type = options ? options.sourceType : "module"; - /** @type {AcornOptions} */ - const parserOptions = { - ...defaultParserOptions, - allowReturnOutsideFunction: type === "script", - ...options, - sourceType: type === "auto" ? "module" : type - }; - - /** @type {AnyNode} */ - let ast; - let error; - let threw = false; - try { - ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions)); - } catch (e) { - error = e; - threw = true; - } - - if (threw && type === "auto") { - parserOptions.sourceType = "script"; - if (!("allowReturnOutsideFunction" in options)) { - parserOptions.allowReturnOutsideFunction = true; - } - if (Array.isArray(parserOptions.onComment)) { - parserOptions.onComment.length = 0; - } - try { - ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions)); - threw = false; - } catch (e) { - // we use the error from first parse try - // so nothing to do here - } - } - - if (threw) { - throw error; - } - - return /** @type {ProgramNode} */ (ast); - } -} - -module.exports = JavascriptParser; -module.exports.ALLOWED_MEMBER_TYPES_ALL = ALLOWED_MEMBER_TYPES_ALL; -module.exports.ALLOWED_MEMBER_TYPES_EXPRESSION = - ALLOWED_MEMBER_TYPES_EXPRESSION; -module.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = - ALLOWED_MEMBER_TYPES_CALL_EXPRESSION; - - -/***/ }), - -/***/ 97574: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const UnsupportedFeatureWarning = __webpack_require__(17623); -const ConstDependency = __webpack_require__(14367); -const BasicEvaluatedExpression = __webpack_require__(94844); - -/** @typedef {import("estree").Expression} ExpressionNode */ -/** @typedef {import("estree").Node} Node */ -/** @typedef {import("./JavascriptParser")} JavascriptParser */ - -/** - * @param {JavascriptParser} parser the parser - * @param {string} value the const value - * @param {string[]=} runtimeRequirements runtime requirements - * @returns {function(ExpressionNode): true} plugin function - */ -exports.toConstantDependency = (parser, value, runtimeRequirements) => { - return function constDependency(expr) { - const dep = new ConstDependency(value, expr.range, runtimeRequirements); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }; -}; - -/** - * @param {string} value the string value - * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function - */ -exports.evaluateToString = value => { - return function stringExpression(expr) { - return new BasicEvaluatedExpression().setString(value).setRange(expr.range); - }; -}; - -/** - * @param {number} value the number value - * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function - */ -exports.evaluateToNumber = value => { - return function stringExpression(expr) { - return new BasicEvaluatedExpression().setNumber(value).setRange(expr.range); - }; -}; - -/** - * @param {boolean} value the boolean value - * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function - */ -exports.evaluateToBoolean = value => { - return function booleanExpression(expr) { - return new BasicEvaluatedExpression() - .setBoolean(value) - .setRange(expr.range); - }; -}; - -/** - * @param {string} identifier identifier - * @param {string} rootInfo rootInfo - * @param {function(): string[]} getMembers getMembers - * @param {boolean|null=} truthy is truthy, null if nullish - * @returns {function(ExpressionNode): BasicEvaluatedExpression} callback - */ -exports.evaluateToIdentifier = (identifier, rootInfo, getMembers, truthy) => { - return function identifierExpression(expr) { - let evaluatedExpression = new BasicEvaluatedExpression() - .setIdentifier(identifier, rootInfo, getMembers) - .setSideEffects(false) - .setRange(expr.range); - switch (truthy) { - case true: - evaluatedExpression.setTruthy(); - break; - case null: - evaluatedExpression.setNullish(true); - break; - case false: - evaluatedExpression.setFalsy(); - break; - } - - return evaluatedExpression; - }; -}; - -exports.expressionIsUnsupported = (parser, message) => { - return function unsupportedExpression(expr) { - const dep = new ConstDependency("(void 0)", expr.range, null); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - if (!parser.state.module) return; - parser.state.module.addWarning( - new UnsupportedFeatureWarning(message, expr.loc) - ); - return true; - }; -}; - -exports.skipTraversal = () => true; - -exports.approve = () => true; - - -/***/ }), - -/***/ 82695: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const { isSubset } = __webpack_require__(73268); -const { getAllChunks } = __webpack_require__(5575); - -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGraph").EntryModuleWithChunkGroup} EntryModuleWithChunkGroup */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {(string|number)[]} EntryItem */ - -const EXPORT_PREFIX = "var __webpack_exports__ = "; - -/** - * @param {ChunkGraph} chunkGraph chunkGraph - * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate - * @param {EntryModuleWithChunkGroup[]} entries entries - * @param {Chunk} chunk chunk - * @param {boolean} passive true: passive startup with on chunks loaded - * @returns {string} runtime code - */ -exports.generateEntryStartup = ( - chunkGraph, - runtimeTemplate, - entries, - chunk, - passive -) => { - /** @type {string[]} */ - const runtime = [ - `var __webpack_exec__ = ${runtimeTemplate.returningFunction( - `__webpack_require__(${RuntimeGlobals.entryModuleId} = moduleId)`, - "moduleId" - )}` - ]; - - const runModule = id => { - return `__webpack_exec__(${JSON.stringify(id)})`; - }; - const outputCombination = (chunks, moduleIds, final) => { - if (chunks.size === 0) { - runtime.push( - `${final ? EXPORT_PREFIX : ""}(${moduleIds.map(runModule).join(", ")});` - ); - } else { - const fn = runtimeTemplate.returningFunction( - moduleIds.map(runModule).join(", ") - ); - runtime.push( - `${final && !passive ? EXPORT_PREFIX : ""}${ - passive - ? RuntimeGlobals.onChunksLoaded - : RuntimeGlobals.startupEntrypoint - }(0, ${JSON.stringify(Array.from(chunks, c => c.id))}, ${fn});` - ); - if (final && passive) { - runtime.push(`${EXPORT_PREFIX}${RuntimeGlobals.onChunksLoaded}();`); - } - } - }; - - let currentChunks = undefined; - let currentModuleIds = undefined; - - for (const [module, entrypoint] of entries) { - const runtimeChunk = entrypoint.getRuntimeChunk(); - const moduleId = chunkGraph.getModuleId(module); - const chunks = getAllChunks(entrypoint, chunk, runtimeChunk); - if ( - currentChunks && - currentChunks.size === chunks.size && - isSubset(currentChunks, chunks) - ) { - currentModuleIds.push(moduleId); - } else { - if (currentChunks) { - outputCombination(currentChunks, currentModuleIds); - } - currentChunks = chunks; - currentModuleIds = [moduleId]; - } - } - - // output current modules with export prefix - if (currentChunks) { - outputCombination(currentChunks, currentModuleIds, true); - } - runtime.push(""); - return Template.asString(runtime); -}; - -/** - * @param {Hash} hash the hash to update - * @param {ChunkGraph} chunkGraph chunkGraph - * @param {EntryModuleWithChunkGroup[]} entries entries - * @param {Chunk} chunk chunk - * @returns {void} - */ -exports.updateHashForEntryStartup = (hash, chunkGraph, entries, chunk) => { - for (const [module, entrypoint] of entries) { - const runtimeChunk = entrypoint.getRuntimeChunk(); - const moduleId = chunkGraph.getModuleId(module); - hash.update(`${moduleId}`); - for (const c of getAllChunks(entrypoint, chunk, runtimeChunk)) - hash.update(`${c.id}`); - } -}; - -/** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {function(Chunk, ChunkGraph): boolean} filterFn filter function - * @returns {Set} initially fulfilled chunk ids - */ -exports.getInitialChunkIds = (chunk, chunkGraph, filterFn) => { - const initialChunkIds = new Set(chunk.ids); - for (const c of chunk.getAllInitialChunks()) { - if (c === chunk || filterFn(c, chunkGraph)) continue; - for (const id of c.ids) initialChunkIds.add(id); - } - return initialChunkIds; -}; - - -/***/ }), - -/***/ 67927: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { register } = __webpack_require__(7591); - -class JsonData { - constructor(data) { - this._buffer = undefined; - this._data = undefined; - if (Buffer.isBuffer(data)) { - this._buffer = data; - } else { - this._data = data; - } - } - - get() { - if (this._data === undefined && this._buffer !== undefined) { - this._data = JSON.parse(this._buffer.toString()); - } - return this._data; - } - - updateHash(hash) { - if (this._buffer === undefined && this._data !== undefined) { - this._buffer = Buffer.from(JSON.stringify(this._data)); - } - - if (this._buffer) return hash.update(this._buffer); - } -} - -register(JsonData, "webpack/lib/json/JsonData", null, { - serialize(obj, { write }) { - if (obj._buffer === undefined && obj._data !== undefined) { - obj._buffer = Buffer.from(JSON.stringify(obj._data)); - } - write(obj._buffer); - }, - deserialize({ read }) { - return new JsonData(read()); - } -}); - -module.exports = JsonData; - - -/***/ }), - -/***/ 85298: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const ConcatenationScope = __webpack_require__(81701); -const { UsageState } = __webpack_require__(13168); -const Generator = __webpack_require__(97152); -const RuntimeGlobals = __webpack_require__(39201); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../ExportsInfo")} ExportsInfo */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -const stringifySafe = data => { - const stringified = JSON.stringify(data); - if (!stringified) { - return undefined; // Invalid JSON - } - - return stringified.replace(/\u2028|\u2029/g, str => - str === "\u2029" ? "\\u2029" : "\\u2028" - ); // invalid in JavaScript but valid JSON -}; - -/** - * @param {Object} data data (always an object or array) - * @param {ExportsInfo} exportsInfo exports info - * @param {RuntimeSpec} runtime the runtime - * @returns {Object} reduced data - */ -const createObjectForExportsInfo = (data, exportsInfo, runtime) => { - if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) - return data; - const isArray = Array.isArray(data); - const reducedData = isArray ? [] : {}; - for (const key of Object.keys(data)) { - const exportInfo = exportsInfo.getReadOnlyExportInfo(key); - const used = exportInfo.getUsed(runtime); - if (used === UsageState.Unused) continue; - - let value; - if (used === UsageState.OnlyPropertiesUsed && exportInfo.exportsInfo) { - value = createObjectForExportsInfo( - data[key], - exportInfo.exportsInfo, - runtime - ); - } else { - value = data[key]; - } - const name = exportInfo.getUsedName(key, runtime); - reducedData[name] = value; - } - if (isArray) { - let arrayLengthWhenUsed = - exportsInfo.getReadOnlyExportInfo("length").getUsed(runtime) !== - UsageState.Unused - ? data.length - : undefined; - - let sizeObjectMinusArray = 0; - for (let i = 0; i < reducedData.length; i++) { - if (reducedData[i] === undefined) { - sizeObjectMinusArray -= 2; - } else { - sizeObjectMinusArray += `${i}`.length + 3; - } - } - if (arrayLengthWhenUsed !== undefined) { - sizeObjectMinusArray += - `${arrayLengthWhenUsed}`.length + - 8 - - (arrayLengthWhenUsed - reducedData.length) * 2; - } - if (sizeObjectMinusArray < 0) - return Object.assign( - arrayLengthWhenUsed === undefined - ? {} - : { length: arrayLengthWhenUsed }, - reducedData - ); - const generatedLength = - arrayLengthWhenUsed !== undefined - ? Math.max(arrayLengthWhenUsed, reducedData.length) - : reducedData.length; - for (let i = 0; i < generatedLength; i++) { - if (reducedData[i] === undefined) { - reducedData[i] = 0; - } - } - } - return reducedData; -}; - -const TYPES = new Set(["javascript"]); - -class JsonGenerator extends Generator { - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - let data = - module.buildInfo && - module.buildInfo.jsonData && - module.buildInfo.jsonData.get(); - if (!data) return 0; - return stringifySafe(data).length + 10; - } - - /** - * @param {NormalModule} module module for which the bailout reason should be determined - * @param {ConcatenationBailoutReasonContext} context context - * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated - */ - getConcatenationBailoutReason(module, context) { - return undefined; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate( - module, - { - moduleGraph, - runtimeTemplate, - runtimeRequirements, - runtime, - concatenationScope - } - ) { - const data = - module.buildInfo && - module.buildInfo.jsonData && - module.buildInfo.jsonData.get(); - if (data === undefined) { - return new RawSource( - runtimeTemplate.missingModuleStatement({ - request: module.rawRequest - }) - ); - } - const exportsInfo = moduleGraph.getExportsInfo(module); - let finalJson = - typeof data === "object" && - data && - exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused - ? createObjectForExportsInfo(data, exportsInfo, runtime) - : data; - // Use JSON because JSON.parse() is much faster than JavaScript evaluation - const jsonStr = stringifySafe(finalJson); - const jsonExpr = - jsonStr.length > 20 && typeof finalJson === "object" - ? `JSON.parse('${jsonStr.replace(/[\\']/g, "\\$&")}')` - : jsonStr; - let content; - if (concatenationScope) { - content = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - } = ${jsonExpr};`; - concatenationScope.registerNamespaceExport( - ConcatenationScope.NAMESPACE_OBJECT_EXPORT - ); - } else { - runtimeRequirements.add(RuntimeGlobals.module); - content = `${module.moduleArgument}.exports = ${jsonExpr};`; - } - return new RawSource(content); - } -} - -module.exports = JsonGenerator; - - -/***/ }), - -/***/ 61014: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const createSchemaValidation = __webpack_require__(89699); -const JsonGenerator = __webpack_require__(85298); -const JsonParser = __webpack_require__(79898); - -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(79327), - () => __webpack_require__(54206), - { - name: "Json Modules Plugin", - baseDataPath: "parser" - } -); - -class JsonModulesPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "JsonModulesPlugin", - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.createParser - .for("json") - .tap("JsonModulesPlugin", parserOptions => { - validate(parserOptions); - - return new JsonParser(parserOptions); - }); - normalModuleFactory.hooks.createGenerator - .for("json") - .tap("JsonModulesPlugin", () => { - return new JsonGenerator(); - }); - } - ); - } -} - -module.exports = JsonModulesPlugin; - - -/***/ }), - -/***/ 79898: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const parseJson = __webpack_require__(85685); -const Parser = __webpack_require__(68646); -const JsonExportsDependency = __webpack_require__(67762); -const JsonData = __webpack_require__(67927); - -/** @typedef {import("../../declarations/plugins/JsonModulesPluginParser").JsonModulesPluginParserOptions} JsonModulesPluginParserOptions */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -class JsonParser extends Parser { - /** - * @param {JsonModulesPluginParserOptions} options parser options - */ - constructor(options) { - super(); - this.options = options || {}; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (Buffer.isBuffer(source)) { - source = source.toString("utf-8"); - } - - /** @type {JsonModulesPluginParserOptions["parse"]} */ - const parseFn = - typeof this.options.parse === "function" ? this.options.parse : parseJson; - - const data = - typeof source === "object" - ? source - : parseFn(source[0] === "\ufeff" ? source.slice(1) : source); - const jsonData = new JsonData(data); - state.module.buildInfo.jsonData = jsonData; - state.module.buildInfo.strict = true; - state.module.buildMeta.exportsType = "default"; - state.module.buildMeta.defaultObject = - typeof data === "object" ? "redirect-warn" : false; - state.module.addDependency(new JsonExportsDependency(jsonData)); - return state; - } -} - -module.exports = JsonParser; - - -/***/ }), - -/***/ 19880: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const JavascriptModulesPlugin = __webpack_require__(36109); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */ -/** @typedef {import("../util/Hash")} Hash */ - -const COMMON_LIBRARY_NAME_MESSAGE = - "Common configuration options that specific library names are 'output.library[.name]', 'entry.xyz.library[.name]', 'ModuleFederationPlugin.name' and 'ModuleFederationPlugin.library[.name]'."; - -/** - * @template T - * @typedef {Object} LibraryContext - * @property {Compilation} compilation - * @property {ChunkGraph} chunkGraph - * @property {T} options - */ - -/** - * @template T - */ -class AbstractLibraryPlugin { - /** - * @param {Object} options options - * @param {string} options.pluginName name of the plugin - * @param {LibraryType} options.type used library type - */ - constructor({ pluginName, type }) { - this._pluginName = pluginName; - this._type = type; - this._parseCache = new WeakMap(); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _pluginName } = this; - compiler.hooks.thisCompilation.tap(_pluginName, compilation => { - compilation.hooks.finishModules.tap( - { name: _pluginName, stage: 10 }, - () => { - for (const [ - name, - { - dependencies: deps, - options: { library } - } - ] of compilation.entries) { - const options = this._parseOptionsCached( - library !== undefined - ? library - : compilation.outputOptions.library - ); - if (options !== false) { - const dep = deps[deps.length - 1]; - if (dep) { - const module = compilation.moduleGraph.getModule(dep); - if (module) { - this.finishEntryModule(module, name, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - } - } - } - } - } - ); - - const getOptionsForChunk = chunk => { - if (compilation.chunkGraph.getNumberOfEntryModules(chunk) === 0) - return false; - const options = chunk.getEntryOptions(); - const library = options && options.library; - return this._parseOptionsCached( - library !== undefined ? library : compilation.outputOptions.library - ); - }; - - if ( - this.render !== AbstractLibraryPlugin.prototype.render || - this.runtimeRequirements !== - AbstractLibraryPlugin.prototype.runtimeRequirements - ) { - compilation.hooks.additionalChunkRuntimeRequirements.tap( - _pluginName, - (chunk, set, { chunkGraph }) => { - const options = getOptionsForChunk(chunk); - if (options !== false) { - this.runtimeRequirements(chunk, set, { - options, - compilation, - chunkGraph - }); - } - } - ); - } - - const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); - - if (this.render !== AbstractLibraryPlugin.prototype.render) { - hooks.render.tap(_pluginName, (source, renderContext) => { - const options = getOptionsForChunk(renderContext.chunk); - if (options === false) return source; - return this.render(source, renderContext, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - }); - } - - if ( - this.embedInRuntimeBailout !== - AbstractLibraryPlugin.prototype.embedInRuntimeBailout - ) { - hooks.embedInRuntimeBailout.tap( - _pluginName, - (module, renderContext) => { - const options = getOptionsForChunk(renderContext.chunk); - if (options === false) return; - return this.embedInRuntimeBailout(module, renderContext, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - } - ); - } - - if ( - this.strictRuntimeBailout !== - AbstractLibraryPlugin.prototype.strictRuntimeBailout - ) { - hooks.strictRuntimeBailout.tap(_pluginName, renderContext => { - const options = getOptionsForChunk(renderContext.chunk); - if (options === false) return; - return this.strictRuntimeBailout(renderContext, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - }); - } - - if ( - this.renderStartup !== AbstractLibraryPlugin.prototype.renderStartup - ) { - hooks.renderStartup.tap( - _pluginName, - (source, module, renderContext) => { - const options = getOptionsForChunk(renderContext.chunk); - if (options === false) return source; - return this.renderStartup(source, module, renderContext, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - } - ); - } - - hooks.chunkHash.tap(_pluginName, (chunk, hash, context) => { - const options = getOptionsForChunk(chunk); - if (options === false) return; - this.chunkHash(chunk, hash, context, { - options, - compilation, - chunkGraph: compilation.chunkGraph - }); - }); - }); - } - - /** - * @param {LibraryOptions=} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - _parseOptionsCached(library) { - if (!library) return false; - if (library.type !== this._type) return false; - const cacheEntry = this._parseCache.get(library); - if (cacheEntry !== undefined) return cacheEntry; - const result = this.parseOptions(library); - this._parseCache.set(library, result); - return result; - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @param {Module} module the exporting entry module - * @param {string} entryName the name of the entrypoint - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - finishEntryModule(module, entryName, libraryContext) {} - - /** - * @param {Module} module the exporting entry module - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {string | undefined} bailout reason - */ - embedInRuntimeBailout(module, renderContext, libraryContext) { - return undefined; - } - - /** - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {string | undefined} bailout reason - */ - strictRuntimeBailout(renderContext, libraryContext) { - return undefined; - } - - /** - * @param {Chunk} chunk the chunk - * @param {Set} set runtime requirements - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - runtimeRequirements(chunk, set, libraryContext) { - if (this.render !== AbstractLibraryPlugin.prototype.render) - set.add(RuntimeGlobals.returnExportsFromRuntime); - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render(source, renderContext, libraryContext) { - return source; - } - - /** - * @param {Source} source source - * @param {Module} module module - * @param {StartupRenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - renderStartup(source, module, renderContext, libraryContext) { - return source; - } - - /** - * @param {Chunk} chunk the chunk - * @param {Hash} hash hash - * @param {ChunkHashContext} chunkHashContext chunk hash context - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - chunkHash(chunk, hash, chunkHashContext, libraryContext) { - const options = this._parseOptionsCached( - libraryContext.compilation.outputOptions.library - ); - hash.update(this._pluginName); - hash.update(JSON.stringify(options)); - } -} - -AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE = COMMON_LIBRARY_NAME_MESSAGE; -module.exports = AbstractLibraryPlugin; - - -/***/ }), - -/***/ 31205: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const ExternalModule = __webpack_require__(73096); -const Template = __webpack_require__(43841); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @typedef {Object} AmdLibraryPluginOptions - * @property {LibraryType} type - * @property {boolean=} requireAsWrapper - */ - -/** - * @typedef {Object} AmdLibraryPluginParsed - * @property {string} name - */ - -/** - * @typedef {AmdLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class AmdLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {AmdLibraryPluginOptions} options the plugin options - */ - constructor(options) { - super({ - pluginName: "AmdLibraryPlugin", - type: options.type - }); - this.requireAsWrapper = options.requireAsWrapper; - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const { name } = library; - if (this.requireAsWrapper) { - if (name) { - throw new Error( - `AMD library name must be unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - } else { - if (name && typeof name !== "string") { - throw new Error( - `AMD library name must be a simple string or unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - } - return { - name: /** @type {string=} */ (name) - }; - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render( - source, - { chunkGraph, chunk, runtimeTemplate }, - { options, compilation } - ) { - const modern = runtimeTemplate.supportsArrowFunction(); - const modules = chunkGraph - .getChunkModules(chunk) - .filter(m => m instanceof ExternalModule); - const externals = /** @type {ExternalModule[]} */ (modules); - const externalsDepsArray = JSON.stringify( - externals.map(m => - typeof m.request === "object" && !Array.isArray(m.request) - ? m.request.amd - : m.request - ) - ); - const externalsArguments = externals - .map( - m => - `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( - `${chunkGraph.getModuleId(m)}` - )}__` - ) - .join(", "); - - const iife = runtimeTemplate.isIIFE(); - const fnStart = - (modern - ? `(${externalsArguments}) => {` - : `function(${externalsArguments}) {`) + - (iife || !chunk.hasRuntime() ? " return " : "\n"); - const fnEnd = iife ? ";\n}" : "\n}"; - - if (this.requireAsWrapper) { - return new ConcatSource( - `require(${externalsDepsArray}, ${fnStart}`, - source, - `${fnEnd});` - ); - } else if (options.name) { - const name = compilation.getPath(options.name, { - chunk - }); - - return new ConcatSource( - `define(${JSON.stringify(name)}, ${externalsDepsArray}, ${fnStart}`, - source, - `${fnEnd});` - ); - } else if (externalsArguments) { - return new ConcatSource( - `define(${externalsDepsArray}, ${fnStart}`, - source, - `${fnEnd});` - ); - } else { - return new ConcatSource(`define(${fnStart}`, source, `${fnEnd});`); - } - } - - /** - * @param {Chunk} chunk the chunk - * @param {Hash} hash hash - * @param {ChunkHashContext} chunkHashContext chunk hash context - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { - hash.update("AmdLibraryPlugin"); - if (this.requireAsWrapper) { - hash.update("requireAsWrapper"); - } else if (options.name) { - hash.update("named"); - const name = compilation.getPath(options.name, { - chunk - }); - hash.update(name); - } - } -} - -module.exports = AmdLibraryPlugin; - - -/***/ }), - -/***/ 746: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const Template = __webpack_require__(43841); -const propertyAccess = __webpack_require__(67603); -const { getEntryRuntime } = __webpack_require__(47462); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -const KEYWORD_REGEX = - /^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/; -const IDENTIFIER_REGEX = - /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu; - -/** - * Validates the library name by checking for keywords and valid characters - * @param {string} name name to be validated - * @returns {boolean} true, when valid - */ -const isNameValid = name => { - return !KEYWORD_REGEX.test(name) && IDENTIFIER_REGEX.test(name); -}; - -/** - * @param {string[]} accessor variable plus properties - * @param {number} existingLength items of accessor that are existing already - * @param {boolean=} initLast if the last property should also be initialized to an object - * @returns {string} code to access the accessor while initializing - */ -const accessWithInit = (accessor, existingLength, initLast = false) => { - // This generates for [a, b, c, d]: - // (((a = typeof a === "undefined" ? {} : a).b = a.b || {}).c = a.b.c || {}).d - const base = accessor[0]; - if (accessor.length === 1 && !initLast) return base; - let current = - existingLength > 0 - ? base - : `(${base} = typeof ${base} === "undefined" ? {} : ${base})`; - - // i is the current position in accessor that has been printed - let i = 1; - - // all properties printed so far (excluding base) - let propsSoFar; - - // if there is existingLength, print all properties until this position as property access - if (existingLength > i) { - propsSoFar = accessor.slice(1, existingLength); - i = existingLength; - current += propertyAccess(propsSoFar); - } else { - propsSoFar = []; - } - - // all remaining properties (except the last one when initLast is not set) - // should be printed as initializer - const initUntil = initLast ? accessor.length : accessor.length - 1; - for (; i < initUntil; i++) { - const prop = accessor[i]; - propsSoFar.push(prop); - current = `(${current}${propertyAccess([prop])} = ${base}${propertyAccess( - propsSoFar - )} || {})`; - } - - // print the last property as property access if not yet printed - if (i < accessor.length) - current = `${current}${propertyAccess([accessor[accessor.length - 1]])}`; - - return current; -}; - -/** - * @typedef {Object} AssignLibraryPluginOptions - * @property {LibraryType} type - * @property {string[] | "global"} prefix name prefix - * @property {string | false} declare declare name as variable - * @property {"error"|"static"|"copy"|"assign"} unnamed behavior for unnamed library name - * @property {"copy"|"assign"=} named behavior for named library name - */ - -/** - * @typedef {Object} AssignLibraryPluginParsed - * @property {string | string[]} name - * @property {string | string[] | undefined} export - */ - -/** - * @typedef {AssignLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class AssignLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {AssignLibraryPluginOptions} options the plugin options - */ - constructor(options) { - super({ - pluginName: "AssignLibraryPlugin", - type: options.type - }); - this.prefix = options.prefix; - this.declare = options.declare; - this.unnamed = options.unnamed; - this.named = options.named || "assign"; - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const { name } = library; - if (this.unnamed === "error") { - if (typeof name !== "string" && !Array.isArray(name)) { - throw new Error( - `Library name must be a string or string array. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - } else { - if (name && typeof name !== "string" && !Array.isArray(name)) { - throw new Error( - `Library name must be a string, string array or unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - } - return { - name: /** @type {string|string[]=} */ (name), - export: library.export - }; - } - - /** - * @param {Module} module the exporting entry module - * @param {string} entryName the name of the entrypoint - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - finishEntryModule( - module, - entryName, - { options, compilation, compilation: { moduleGraph } } - ) { - const runtime = getEntryRuntime(compilation, entryName); - if (options.export) { - const exportsInfo = moduleGraph.getExportInfo( - module, - Array.isArray(options.export) ? options.export[0] : options.export - ); - exportsInfo.setUsed(UsageState.Used, runtime); - exportsInfo.canMangleUse = false; - } else { - const exportsInfo = moduleGraph.getExportsInfo(module); - exportsInfo.setUsedInUnknownWay(runtime); - } - moduleGraph.addExtraReason(module, "used as library export"); - } - - _getPrefix(compilation) { - return this.prefix === "global" - ? [compilation.runtimeTemplate.globalObject] - : this.prefix; - } - - _getResolvedFullName(options, chunk, compilation) { - const prefix = this._getPrefix(compilation); - const fullName = options.name ? prefix.concat(options.name) : prefix; - return fullName.map(n => - compilation.getPath(n, { - chunk - }) - ); - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render(source, { chunk }, { options, compilation }) { - const fullNameResolved = this._getResolvedFullName( - options, - chunk, - compilation - ); - if (this.declare) { - const base = fullNameResolved[0]; - if (!isNameValid(base)) { - throw new Error( - `Library name base (${base}) must be a valid identifier when using a var declaring library type. Either use a valid identifier (e. g. ${Template.toIdentifier( - base - )}) or use a different library type (e. g. 'type: "global"', which assign a property on the global scope instead of declaring a variable). ${ - AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE - }` - ); - } - source = new ConcatSource(`${this.declare} ${base};\n`, source); - } - return source; - } - - /** - * @param {Module} module the exporting entry module - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {string | undefined} bailout reason - */ - embedInRuntimeBailout( - module, - { chunk, codeGenerationResults }, - { options, compilation } - ) { - const { data } = codeGenerationResults.get(module, chunk.runtime); - const topLevelDeclarations = - (data && data.get("topLevelDeclarations")) || - (module.buildInfo && module.buildInfo.topLevelDeclarations); - if (!topLevelDeclarations) - return "it doesn't tell about top level declarations."; - const fullNameResolved = this._getResolvedFullName( - options, - chunk, - compilation - ); - const base = fullNameResolved[0]; - if (topLevelDeclarations.has(base)) - return `it declares '${base}' on top-level, which conflicts with the current library output.`; - } - - /** - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {string | undefined} bailout reason - */ - strictRuntimeBailout({ chunk }, { options, compilation }) { - if ( - this.declare || - this.prefix === "global" || - this.prefix.length > 0 || - !options.name - ) { - return; - } - return "a global variable is assign and maybe created"; - } - - /** - * @param {Source} source source - * @param {Module} module module - * @param {StartupRenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - renderStartup( - source, - module, - { moduleGraph, chunk }, - { options, compilation } - ) { - const fullNameResolved = this._getResolvedFullName( - options, - chunk, - compilation - ); - const staticExports = this.unnamed === "static"; - const exportAccess = options.export - ? propertyAccess( - Array.isArray(options.export) ? options.export : [options.export] - ) - : ""; - const result = new ConcatSource(source); - if (staticExports) { - const exportsInfo = moduleGraph.getExportsInfo(module); - const exportTarget = accessWithInit( - fullNameResolved, - this._getPrefix(compilation).length, - true - ); - for (const exportInfo of exportsInfo.orderedExports) { - if (!exportInfo.provided) continue; - const nameAccess = propertyAccess([exportInfo.name]); - result.add( - `${exportTarget}${nameAccess} = __webpack_exports__${exportAccess}${nameAccess};\n` - ); - } - result.add( - `Object.defineProperty(${exportTarget}, "__esModule", { value: true });\n` - ); - } else if (options.name ? this.named === "copy" : this.unnamed === "copy") { - result.add( - `var __webpack_export_target__ = ${accessWithInit( - fullNameResolved, - this._getPrefix(compilation).length, - true - )};\n` - ); - let exports = "__webpack_exports__"; - if (exportAccess) { - result.add( - `var __webpack_exports_export__ = __webpack_exports__${exportAccess};\n` - ); - exports = "__webpack_exports_export__"; - } - result.add( - `for(var i in ${exports}) __webpack_export_target__[i] = ${exports}[i];\n` - ); - result.add( - `if(${exports}.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });\n` - ); - } else { - result.add( - `${accessWithInit( - fullNameResolved, - this._getPrefix(compilation).length, - false - )} = __webpack_exports__${exportAccess};\n` - ); - } - return result; - } - - /** - * @param {Chunk} chunk the chunk - * @param {Set} set runtime requirements - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - runtimeRequirements(chunk, set, libraryContext) { - // we don't need to return exports from runtime - } - - /** - * @param {Chunk} chunk the chunk - * @param {Hash} hash hash - * @param {ChunkHashContext} chunkHashContext chunk hash context - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { - hash.update("AssignLibraryPlugin"); - const fullNameResolved = this._getResolvedFullName( - options, - chunk, - compilation - ); - if (options.name ? this.named === "copy" : this.unnamed === "copy") { - hash.update("copy"); - } - if (this.declare) { - hash.update(this.declare); - } - hash.update(fullNameResolved.join(".")); - if (options.export) { - hash.update(`${options.export}`); - } - } -} - -module.exports = AssignLibraryPlugin; - - -/***/ }), - -/***/ 7616: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Compiler")} Compiler */ - -/** @type {WeakMap>} */ -const enabledTypes = new WeakMap(); - -const getEnabledTypes = compiler => { - let set = enabledTypes.get(compiler); - if (set === undefined) { - set = new Set(); - enabledTypes.set(compiler, set); - } - return set; -}; - -class EnableLibraryPlugin { - /** - * @param {LibraryType} type library type that should be available - */ - constructor(type) { - this.type = type; - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {LibraryType} type type of library - * @returns {void} - */ - static setEnabled(compiler, type) { - getEnabledTypes(compiler).add(type); - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {LibraryType} type type of library - * @returns {void} - */ - static checkEnabled(compiler, type) { - if (!getEnabledTypes(compiler).has(type)) { - throw new Error( - `Library type "${type}" is not enabled. ` + - "EnableLibraryPlugin need to be used to enable this type of library. " + - 'This usually happens through the "output.enabledLibraryTypes" option. ' + - 'If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". ' + - "These types are enabled: " + - Array.from(getEnabledTypes(compiler)).join(", ") - ); - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { type } = this; - - // Only enable once - const enabled = getEnabledTypes(compiler); - if (enabled.has(type)) return; - enabled.add(type); - - if (typeof type === "string") { - const enableExportProperty = () => { - const ExportPropertyTemplatePlugin = __webpack_require__(95495); - new ExportPropertyTemplatePlugin({ - type, - nsObjectUsed: type !== "module" - }).apply(compiler); - }; - switch (type) { - case "var": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: [], - declare: "var", - unnamed: "error" - }).apply(compiler); - break; - } - case "assign-properties": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: [], - declare: false, - unnamed: "error", - named: "copy" - }).apply(compiler); - break; - } - case "assign": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: [], - declare: false, - unnamed: "error" - }).apply(compiler); - break; - } - case "this": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["this"], - declare: false, - unnamed: "copy" - }).apply(compiler); - break; - } - case "window": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["window"], - declare: false, - unnamed: "copy" - }).apply(compiler); - break; - } - case "self": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["self"], - declare: false, - unnamed: "copy" - }).apply(compiler); - break; - } - case "global": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: "global", - declare: false, - unnamed: "copy" - }).apply(compiler); - break; - } - case "commonjs": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["exports"], - declare: false, - unnamed: "copy" - }).apply(compiler); - break; - } - case "commonjs-static": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["exports"], - declare: false, - unnamed: "static" - }).apply(compiler); - break; - } - case "commonjs2": - case "commonjs-module": { - //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 - const AssignLibraryPlugin = __webpack_require__(746); - new AssignLibraryPlugin({ - type, - prefix: ["module", "exports"], - declare: false, - unnamed: "assign" - }).apply(compiler); - break; - } - case "amd": - case "amd-require": { - enableExportProperty(); - const AmdLibraryPlugin = __webpack_require__(31205); - new AmdLibraryPlugin({ - type, - requireAsWrapper: type === "amd-require" - }).apply(compiler); - break; - } - case "umd": - case "umd2": { - enableExportProperty(); - const UmdLibraryPlugin = __webpack_require__(41398); - new UmdLibraryPlugin({ - type, - optionalAmdExternalAsGlobal: type === "umd2" - }).apply(compiler); - break; - } - case "system": { - enableExportProperty(); - const SystemLibraryPlugin = __webpack_require__(59916); - new SystemLibraryPlugin({ - type - }).apply(compiler); - break; - } - case "jsonp": { - enableExportProperty(); - const JsonpLibraryPlugin = __webpack_require__(67228); - new JsonpLibraryPlugin({ - type - }).apply(compiler); - break; - } - case "module": { - enableExportProperty(); - const ModuleLibraryPlugin = __webpack_require__(92914); - new ModuleLibraryPlugin({ - type - }).apply(compiler); - break; - } - default: - throw new Error(`Unsupported library type ${type}. -Plugins which provide custom library types must call EnableLibraryPlugin.setEnabled(compiler, type) to disable this error.`); - } - } else { - // TODO support plugin instances here - // apply them to the compiler - } - } -} - -module.exports = EnableLibraryPlugin; - - -/***/ }), - -/***/ 95495: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const propertyAccess = __webpack_require__(67603); -const { getEntryRuntime } = __webpack_require__(47462); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @typedef {Object} ExportPropertyLibraryPluginParsed - * @property {string | string[]} export - */ - -/** - * @typedef {Object} ExportPropertyLibraryPluginOptions - * @property {LibraryType} type - * @property {boolean} nsObjectUsed the namespace object is used - */ -/** - * @typedef {ExportPropertyLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class ExportPropertyLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {ExportPropertyLibraryPluginOptions} options options - */ - constructor({ type, nsObjectUsed }) { - super({ - pluginName: "ExportPropertyLibraryPlugin", - type - }); - this.nsObjectUsed = nsObjectUsed; - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - return { - export: library.export - }; - } - - /** - * @param {Module} module the exporting entry module - * @param {string} entryName the name of the entrypoint - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - finishEntryModule( - module, - entryName, - { options, compilation, compilation: { moduleGraph } } - ) { - const runtime = getEntryRuntime(compilation, entryName); - if (options.export) { - const exportsInfo = moduleGraph.getExportInfo( - module, - Array.isArray(options.export) ? options.export[0] : options.export - ); - exportsInfo.setUsed(UsageState.Used, runtime); - exportsInfo.canMangleUse = false; - } else { - const exportsInfo = moduleGraph.getExportsInfo(module); - if (this.nsObjectUsed) { - exportsInfo.setUsedInUnknownWay(runtime); - } else { - exportsInfo.setAllKnownExportsUsed(runtime); - } - } - moduleGraph.addExtraReason(module, "used as library export"); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Set} set runtime requirements - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - runtimeRequirements(chunk, set, libraryContext) {} - - /** - * @param {Source} source source - * @param {Module} module module - * @param {StartupRenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - renderStartup(source, module, renderContext, { options }) { - if (!options.export) return source; - const postfix = `__webpack_exports__ = __webpack_exports__${propertyAccess( - Array.isArray(options.export) ? options.export : [options.export] - )};\n`; - return new ConcatSource(source, postfix); - } -} - -module.exports = ExportPropertyLibraryPlugin; - - -/***/ }), - -/***/ 67228: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @typedef {Object} JsonpLibraryPluginOptions - * @property {LibraryType} type - */ - -/** - * @typedef {Object} JsonpLibraryPluginParsed - * @property {string} name - */ - -/** - * @typedef {JsonpLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class JsonpLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {JsonpLibraryPluginOptions} options the plugin options - */ - constructor(options) { - super({ - pluginName: "JsonpLibraryPlugin", - type: options.type - }); - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const { name } = library; - if (typeof name !== "string") { - throw new Error( - `Jsonp library name must be a simple string. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - return { - name: /** @type {string} */ (name) - }; - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render(source, { chunk }, { options, compilation }) { - const name = compilation.getPath(options.name, { - chunk - }); - return new ConcatSource(`${name}(`, source, ")"); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Hash} hash hash - * @param {ChunkHashContext} chunkHashContext chunk hash context - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { - hash.update("JsonpLibraryPlugin"); - hash.update(compilation.getPath(options.name, { chunk })); - } -} - -module.exports = JsonpLibraryPlugin; - - -/***/ }), - -/***/ 92914: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const Template = __webpack_require__(43841); -const propertyAccess = __webpack_require__(67603); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @typedef {Object} ModuleLibraryPluginOptions - * @property {LibraryType} type - */ - -/** - * @typedef {Object} ModuleLibraryPluginParsed - * @property {string} name - */ - -/** - * @typedef {ModuleLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class ModuleLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {ModuleLibraryPluginOptions} options the plugin options - */ - constructor(options) { - super({ - pluginName: "ModuleLibraryPlugin", - type: options.type - }); - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const { name } = library; - if (name) { - throw new Error( - `Library name must be unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - return { - name: /** @type {string} */ (name) - }; - } - - /** - * @param {Source} source source - * @param {Module} module module - * @param {StartupRenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - renderStartup( - source, - module, - { moduleGraph, chunk }, - { options, compilation } - ) { - const result = new ConcatSource(source); - const exportsInfo = moduleGraph.getExportsInfo(module); - const exports = []; - const isAsync = moduleGraph.isAsync(module); - if (isAsync) { - result.add(`__webpack_exports__ = await __webpack_exports__;\n`); - } - for (const exportInfo of exportsInfo.orderedExports) { - if (!exportInfo.provided) continue; - const varName = `__webpack_exports__${Template.toIdentifier( - exportInfo.name - )}`; - result.add( - `var ${varName} = __webpack_exports__${propertyAccess([ - exportInfo.getUsedName(exportInfo.name, chunk.runtime) - ])};\n` - ); - exports.push(`${varName} as ${exportInfo.name}`); - } - if (exports.length > 0) { - result.add(`export { ${exports.join(", ")} };\n`); - } - return result; - } -} - -module.exports = ModuleLibraryPlugin; - - -/***/ }), - -/***/ 59916: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Joel Denning @joeldenning -*/ - - - -const { ConcatSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const ExternalModule = __webpack_require__(73096); -const Template = __webpack_require__(43841); -const propertyAccess = __webpack_require__(67603); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @typedef {Object} SystemLibraryPluginOptions - * @property {LibraryType} type - */ - -/** - * @typedef {Object} SystemLibraryPluginParsed - * @property {string} name - */ - -/** - * @typedef {SystemLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class SystemLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {SystemLibraryPluginOptions} options the plugin options - */ - constructor(options) { - super({ - pluginName: "SystemLibraryPlugin", - type: options.type - }); - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - const { name } = library; - if (name && typeof name !== "string") { - throw new Error( - `System.js library name must be a simple string or unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}` - ); - } - return { - name: /** @type {string=} */ (name) - }; - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render(source, { chunkGraph, moduleGraph, chunk }, { options, compilation }) { - const modules = chunkGraph - .getChunkModules(chunk) - .filter(m => m instanceof ExternalModule && m.externalType === "system"); - const externals = /** @type {ExternalModule[]} */ (modules); - - // The name this bundle should be registered as with System - const name = options.name - ? `${JSON.stringify(compilation.getPath(options.name, { chunk }))}, ` - : ""; - - // The array of dependencies that are external to webpack and will be provided by System - const systemDependencies = JSON.stringify( - externals.map(m => - typeof m.request === "object" && !Array.isArray(m.request) - ? m.request.amd - : m.request - ) - ); - - // The name of the variable provided by System for exporting - const dynamicExport = "__WEBPACK_DYNAMIC_EXPORT__"; - - // An array of the internal variable names for the webpack externals - const externalWebpackNames = externals.map( - m => - `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( - `${chunkGraph.getModuleId(m)}` - )}__` - ); - - // Declaring variables for the internal variable names for the webpack externals - const externalVarDeclarations = externalWebpackNames - .map(name => `var ${name} = {};`) - .join("\n"); - - // Define __esModule flag on all internal variables and helpers - const externalVarInitialization = []; - - // The system.register format requires an array of setter functions for externals. - const setters = - externalWebpackNames.length === 0 - ? "" - : Template.asString([ - "setters: [", - Template.indent( - externals - .map((module, i) => { - const external = externalWebpackNames[i]; - const exportsInfo = moduleGraph.getExportsInfo(module); - const otherUnused = - exportsInfo.otherExportsInfo.getUsed(chunk.runtime) === - UsageState.Unused; - const instructions = []; - const handledNames = []; - for (const exportInfo of exportsInfo.orderedExports) { - const used = exportInfo.getUsedName( - undefined, - chunk.runtime - ); - if (used) { - if (otherUnused || used !== exportInfo.name) { - instructions.push( - `${external}${propertyAccess([ - used - ])} = module${propertyAccess([exportInfo.name])};` - ); - handledNames.push(exportInfo.name); - } - } else { - handledNames.push(exportInfo.name); - } - } - if (!otherUnused) { - if ( - !Array.isArray(module.request) || - module.request.length === 1 - ) { - externalVarInitialization.push( - `Object.defineProperty(${external}, "__esModule", { value: true });` - ); - } - if (handledNames.length > 0) { - const name = `${external}handledNames`; - externalVarInitialization.push( - `var ${name} = ${JSON.stringify(handledNames)};` - ); - instructions.push( - Template.asString([ - "Object.keys(module).forEach(function(key) {", - Template.indent([ - `if(${name}.indexOf(key) >= 0)`, - Template.indent(`${external}[key] = module[key];`) - ]), - "});" - ]) - ); - } else { - instructions.push( - Template.asString([ - "Object.keys(module).forEach(function(key) {", - Template.indent([`${external}[key] = module[key];`]), - "});" - ]) - ); - } - } - if (instructions.length === 0) return "function() {}"; - return Template.asString([ - "function(module) {", - Template.indent(instructions), - "}" - ]); - }) - .join(",\n") - ), - "]," - ]); - - return new ConcatSource( - Template.asString([ - `System.register(${name}${systemDependencies}, function(${dynamicExport}, __system_context__) {`, - Template.indent([ - externalVarDeclarations, - Template.asString(externalVarInitialization), - "return {", - Template.indent([ - setters, - "execute: function() {", - Template.indent(`${dynamicExport}(`) - ]) - ]), - "" - ]), - source, - Template.asString([ - "", - Template.indent([ - Template.indent([Template.indent([");"]), "}"]), - "};" - ]), - "})" - ]) - ); - } - - /** - * @param {Chunk} chunk the chunk - * @param {Hash} hash hash - * @param {ChunkHashContext} chunkHashContext chunk hash context - * @param {LibraryContext} libraryContext context - * @returns {void} - */ - chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { - hash.update("SystemLibraryPlugin"); - if (options.name) { - hash.update(compilation.getPath(options.name, { chunk })); - } - } -} - -module.exports = SystemLibraryPlugin; - - -/***/ }), - -/***/ 41398: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { ConcatSource, OriginalSource } = __webpack_require__(51255); -const ExternalModule = __webpack_require__(73096); -const Template = __webpack_require__(43841); -const AbstractLibraryPlugin = __webpack_require__(19880); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryCustomUmdCommentObject} LibraryCustomUmdCommentObject */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ - -/** - * @param {string[]} accessor the accessor to convert to path - * @returns {string} the path - */ -const accessorToObjectAccess = accessor => { - return accessor.map(a => `[${JSON.stringify(a)}]`).join(""); -}; - -/** - * @param {string|undefined} base the path prefix - * @param {string|string[]} accessor the accessor - * @param {string=} joinWith the element separator - * @returns {string} the path - */ -const accessorAccess = (base, accessor, joinWith = ", ") => { - const accessors = Array.isArray(accessor) ? accessor : [accessor]; - return accessors - .map((_, idx) => { - const a = base - ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) - : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); - if (idx === accessors.length - 1) return a; - if (idx === 0 && base === undefined) - return `${a} = typeof ${a} === "object" ? ${a} : {}`; - return `${a} = ${a} || {}`; - }) - .join(joinWith); -}; - -/** @typedef {string | string[] | LibraryCustomUmdObject} UmdLibraryPluginName */ - -/** - * @typedef {Object} UmdLibraryPluginOptions - * @property {LibraryType} type - * @property {boolean=} optionalAmdExternalAsGlobal - */ - -/** - * @typedef {Object} UmdLibraryPluginParsed - * @property {string | string[]} name - * @property {LibraryCustomUmdObject} names - * @property {string | LibraryCustomUmdCommentObject} auxiliaryComment - * @property {boolean} namedDefine - */ - -/** - * @typedef {UmdLibraryPluginParsed} T - * @extends {AbstractLibraryPlugin} - */ -class UmdLibraryPlugin extends AbstractLibraryPlugin { - /** - * @param {UmdLibraryPluginOptions} options the plugin option - */ - constructor(options) { - super({ - pluginName: "UmdLibraryPlugin", - type: options.type - }); - - this.optionalAmdExternalAsGlobal = options.optionalAmdExternalAsGlobal; - } - - /** - * @param {LibraryOptions} library normalized library option - * @returns {T | false} preprocess as needed by overriding - */ - parseOptions(library) { - /** @type {LibraryName} */ - let name; - /** @type {LibraryCustomUmdObject} */ - let names; - if (typeof library.name === "object" && !Array.isArray(library.name)) { - name = library.name.root || library.name.amd || library.name.commonjs; - names = library.name; - } else { - name = library.name; - const singleName = Array.isArray(name) ? name[0] : name; - names = { - commonjs: singleName, - root: library.name, - amd: singleName - }; - } - return { - name, - names, - auxiliaryComment: library.auxiliaryComment, - namedDefine: library.umdNamedDefine - }; - } - - /** - * @param {Source} source source - * @param {RenderContext} renderContext render context - * @param {LibraryContext} libraryContext context - * @returns {Source} source with library export - */ - render( - source, - { chunkGraph, runtimeTemplate, chunk, moduleGraph }, - { options, compilation } - ) { - const modules = chunkGraph - .getChunkModules(chunk) - .filter( - m => - m instanceof ExternalModule && - (m.externalType === "umd" || m.externalType === "umd2") - ); - let externals = /** @type {ExternalModule[]} */ (modules); - /** @type {ExternalModule[]} */ - const optionalExternals = []; - /** @type {ExternalModule[]} */ - let requiredExternals = []; - if (this.optionalAmdExternalAsGlobal) { - for (const m of externals) { - if (m.isOptional(moduleGraph)) { - optionalExternals.push(m); - } else { - requiredExternals.push(m); - } - } - externals = requiredExternals.concat(optionalExternals); - } else { - requiredExternals = externals; - } - - const replaceKeys = str => { - return compilation.getPath(str, { - chunk - }); - }; - - const externalsDepsArray = modules => { - return `[${replaceKeys( - modules - .map(m => - JSON.stringify( - typeof m.request === "object" ? m.request.amd : m.request - ) - ) - .join(", ") - )}]`; - }; - - const externalsRootArray = modules => { - return replaceKeys( - modules - .map(m => { - let request = m.request; - if (typeof request === "object") request = request.root; - return `root${accessorToObjectAccess([].concat(request))}`; - }) - .join(", ") - ); - }; - - const externalsRequireArray = type => { - return replaceKeys( - externals - .map(m => { - let expr; - let request = m.request; - if (typeof request === "object") { - request = request[type]; - } - if (request === undefined) { - throw new Error( - "Missing external configuration for type:" + type - ); - } - if (Array.isArray(request)) { - expr = `require(${JSON.stringify( - request[0] - )})${accessorToObjectAccess(request.slice(1))}`; - } else { - expr = `require(${JSON.stringify(request)})`; - } - if (m.isOptional(moduleGraph)) { - expr = `(function webpackLoadOptionalExternalModule() { try { return ${expr}; } catch(e) {} }())`; - } - return expr; - }) - .join(", ") - ); - }; - - const externalsArguments = modules => { - return modules - .map( - m => - `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( - `${chunkGraph.getModuleId(m)}` - )}__` - ) - .join(", "); - }; - - const libraryName = library => { - return JSON.stringify(replaceKeys([].concat(library).pop())); - }; - - let amdFactory; - if (optionalExternals.length > 0) { - const wrapperArguments = externalsArguments(requiredExternals); - const factoryArguments = - requiredExternals.length > 0 - ? externalsArguments(requiredExternals) + - ", " + - externalsRootArray(optionalExternals) - : externalsRootArray(optionalExternals); - amdFactory = - `function webpackLoadOptionalExternalModuleAmd(${wrapperArguments}) {\n` + - ` return factory(${factoryArguments});\n` + - " }"; - } else { - amdFactory = "factory"; - } - - const { auxiliaryComment, namedDefine, names } = options; - - const getAuxiliaryComment = type => { - if (auxiliaryComment) { - if (typeof auxiliaryComment === "string") - return "\t//" + auxiliaryComment + "\n"; - if (auxiliaryComment[type]) - return "\t//" + auxiliaryComment[type] + "\n"; - } - return ""; - }; - - return new ConcatSource( - new OriginalSource( - "(function webpackUniversalModuleDefinition(root, factory) {\n" + - getAuxiliaryComment("commonjs2") + - " if(typeof exports === 'object' && typeof module === 'object')\n" + - " module.exports = factory(" + - externalsRequireArray("commonjs2") + - ");\n" + - getAuxiliaryComment("amd") + - " else if(typeof define === 'function' && define.amd)\n" + - (requiredExternals.length > 0 - ? names.amd && namedDefine === true - ? " define(" + - libraryName(names.amd) + - ", " + - externalsDepsArray(requiredExternals) + - ", " + - amdFactory + - ");\n" - : " define(" + - externalsDepsArray(requiredExternals) + - ", " + - amdFactory + - ");\n" - : names.amd && namedDefine === true - ? " define(" + - libraryName(names.amd) + - ", [], " + - amdFactory + - ");\n" - : " define([], " + amdFactory + ");\n") + - (names.root || names.commonjs - ? getAuxiliaryComment("commonjs") + - " else if(typeof exports === 'object')\n" + - " exports[" + - libraryName(names.commonjs || names.root) + - "] = factory(" + - externalsRequireArray("commonjs") + - ");\n" + - getAuxiliaryComment("root") + - " else\n" + - " " + - replaceKeys( - accessorAccess("root", names.root || names.commonjs) - ) + - " = factory(" + - externalsRootArray(externals) + - ");\n" - : " else {\n" + - (externals.length > 0 - ? " var a = typeof exports === 'object' ? factory(" + - externalsRequireArray("commonjs") + - ") : factory(" + - externalsRootArray(externals) + - ");\n" - : " var a = factory();\n") + - " for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n" + - " }\n") + - `})(${runtimeTemplate.outputOptions.globalObject}, ${ - runtimeTemplate.supportsArrowFunction() - ? `(${externalsArguments(externals)}) =>` - : `function(${externalsArguments(externals)})` - } {\nreturn `, - "webpack/universalModuleDefinition" - ), - source, - ";\n})" - ); - } -} - -module.exports = UmdLibraryPlugin; - - -/***/ }), - -/***/ 33594: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const LogType = Object.freeze({ - error: /** @type {"error"} */ ("error"), // message, c style arguments - warn: /** @type {"warn"} */ ("warn"), // message, c style arguments - info: /** @type {"info"} */ ("info"), // message, c style arguments - log: /** @type {"log"} */ ("log"), // message, c style arguments - debug: /** @type {"debug"} */ ("debug"), // message, c style arguments - - trace: /** @type {"trace"} */ ("trace"), // no arguments - - group: /** @type {"group"} */ ("group"), // [label] - groupCollapsed: /** @type {"groupCollapsed"} */ ("groupCollapsed"), // [label] - groupEnd: /** @type {"groupEnd"} */ ("groupEnd"), // [label] - - profile: /** @type {"profile"} */ ("profile"), // [profileName] - profileEnd: /** @type {"profileEnd"} */ ("profileEnd"), // [profileName] - - time: /** @type {"time"} */ ("time"), // name, time as [seconds, nanoseconds] - - clear: /** @type {"clear"} */ ("clear"), // no arguments - status: /** @type {"status"} */ ("status") // message, arguments -}); - -exports.LogType = LogType; - -/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */ - -const LOG_SYMBOL = Symbol("webpack logger raw log method"); -const TIMERS_SYMBOL = Symbol("webpack logger times"); -const TIMERS_AGGREGATES_SYMBOL = Symbol("webpack logger aggregated times"); - -class WebpackLogger { - /** - * @param {function(LogTypeEnum, any[]=): void} log log function - * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger - */ - constructor(log, getChildLogger) { - this[LOG_SYMBOL] = log; - this.getChildLogger = getChildLogger; - } - - error(...args) { - this[LOG_SYMBOL](LogType.error, args); - } - - warn(...args) { - this[LOG_SYMBOL](LogType.warn, args); - } - - info(...args) { - this[LOG_SYMBOL](LogType.info, args); - } - - log(...args) { - this[LOG_SYMBOL](LogType.log, args); - } - - debug(...args) { - this[LOG_SYMBOL](LogType.debug, args); - } - - assert(assertion, ...args) { - if (!assertion) { - this[LOG_SYMBOL](LogType.error, args); - } - } - - trace() { - this[LOG_SYMBOL](LogType.trace, ["Trace"]); - } - - clear() { - this[LOG_SYMBOL](LogType.clear); - } - - status(...args) { - this[LOG_SYMBOL](LogType.status, args); - } - - group(...args) { - this[LOG_SYMBOL](LogType.group, args); - } - - groupCollapsed(...args) { - this[LOG_SYMBOL](LogType.groupCollapsed, args); - } - - groupEnd(...args) { - this[LOG_SYMBOL](LogType.groupEnd, args); - } - - profile(label) { - this[LOG_SYMBOL](LogType.profile, [label]); - } - - profileEnd(label) { - this[LOG_SYMBOL](LogType.profileEnd, [label]); - } - - time(label) { - this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map(); - this[TIMERS_SYMBOL].set(label, process.hrtime()); - } - - timeLog(label) { - const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); - if (!prev) { - throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`); - } - const time = process.hrtime(prev); - this[LOG_SYMBOL](LogType.time, [label, ...time]); - } - - timeEnd(label) { - const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); - if (!prev) { - throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`); - } - const time = process.hrtime(prev); - this[TIMERS_SYMBOL].delete(label); - this[LOG_SYMBOL](LogType.time, [label, ...time]); - } - - timeAggregate(label) { - const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); - if (!prev) { - throw new Error( - `No such label '${label}' for WebpackLogger.timeAggregate()` - ); - } - const time = process.hrtime(prev); - this[TIMERS_SYMBOL].delete(label); - this[TIMERS_AGGREGATES_SYMBOL] = - this[TIMERS_AGGREGATES_SYMBOL] || new Map(); - const current = this[TIMERS_AGGREGATES_SYMBOL].get(label); - if (current !== undefined) { - if (time[1] + current[1] > 1e9) { - time[0] += current[0] + 1; - time[1] = time[1] - 1e9 + current[1]; - } else { - time[0] += current[0]; - time[1] += current[1]; - } - } - this[TIMERS_AGGREGATES_SYMBOL].set(label, time); - } - - timeAggregateEnd(label) { - if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return; - const time = this[TIMERS_AGGREGATES_SYMBOL].get(label); - if (time === undefined) return; - this[TIMERS_AGGREGATES_SYMBOL].delete(label); - this[LOG_SYMBOL](LogType.time, [label, ...time]); - } -} - -exports.Logger = WebpackLogger; - - -/***/ }), - -/***/ 86455: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { LogType } = __webpack_require__(33594); - -/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */ -/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */ -/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */ - -/** @typedef {function(string): boolean} FilterFunction */ - -/** - * @typedef {Object} LoggerConsole - * @property {function(): void} clear - * @property {function(): void} trace - * @property {(...args: any[]) => void} info - * @property {(...args: any[]) => void} log - * @property {(...args: any[]) => void} warn - * @property {(...args: any[]) => void} error - * @property {(...args: any[]) => void=} debug - * @property {(...args: any[]) => void=} group - * @property {(...args: any[]) => void=} groupCollapsed - * @property {(...args: any[]) => void=} groupEnd - * @property {(...args: any[]) => void=} status - * @property {(...args: any[]) => void=} profile - * @property {(...args: any[]) => void=} profileEnd - * @property {(...args: any[]) => void=} logTime - */ - -/** - * @typedef {Object} LoggerOptions - * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel - * @property {FilterTypes|boolean} debug filter for debug logging - * @property {LoggerConsole} console the console to log to - */ - -/** - * @param {FilterItemTypes} item an input item - * @returns {FilterFunction} filter function - */ -const filterToFunction = item => { - if (typeof item === "string") { - const regExp = new RegExp( - `[\\\\/]${item.replace( - // eslint-disable-next-line no-useless-escape - /[-[\]{}()*+?.\\^$|]/g, - "\\$&" - )}([\\\\/]|$|!|\\?)` - ); - return ident => regExp.test(ident); - } - if (item && typeof item === "object" && typeof item.test === "function") { - return ident => item.test(ident); - } - if (typeof item === "function") { - return item; - } - if (typeof item === "boolean") { - return () => item; - } -}; - -/** - * @enum {number} - */ -const LogLevel = { - none: 6, - false: 6, - error: 5, - warn: 4, - info: 3, - log: 2, - true: 2, - verbose: 1 -}; - -/** - * @param {LoggerOptions} options options object - * @returns {function(string, LogTypeEnum, any[]): void} logging function - */ -module.exports = ({ level = "info", debug = false, console }) => { - const debugFilters = - typeof debug === "boolean" - ? [() => debug] - : /** @type {FilterItemTypes[]} */ ([]) - .concat(debug) - .map(filterToFunction); - /** @type {number} */ - const loglevel = LogLevel[`${level}`] || 0; - - /** - * @param {string} name name of the logger - * @param {LogTypeEnum} type type of the log entry - * @param {any[]} args arguments of the log entry - * @returns {void} - */ - const logger = (name, type, args) => { - const labeledArgs = () => { - if (Array.isArray(args)) { - if (args.length > 0 && typeof args[0] === "string") { - return [`[${name}] ${args[0]}`, ...args.slice(1)]; - } else { - return [`[${name}]`, ...args]; - } - } else { - return []; - } - }; - const debug = debugFilters.some(f => f(name)); - switch (type) { - case LogType.debug: - if (!debug) return; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.debug === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.debug(...labeledArgs()); - } else { - console.log(...labeledArgs()); - } - break; - case LogType.log: - if (!debug && loglevel > LogLevel.log) return; - console.log(...labeledArgs()); - break; - case LogType.info: - if (!debug && loglevel > LogLevel.info) return; - console.info(...labeledArgs()); - break; - case LogType.warn: - if (!debug && loglevel > LogLevel.warn) return; - console.warn(...labeledArgs()); - break; - case LogType.error: - if (!debug && loglevel > LogLevel.error) return; - console.error(...labeledArgs()); - break; - case LogType.trace: - if (!debug) return; - console.trace(); - break; - case LogType.groupCollapsed: - if (!debug && loglevel > LogLevel.log) return; - if (!debug && loglevel > LogLevel.verbose) { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.groupCollapsed === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.groupCollapsed(...labeledArgs()); - } else { - console.log(...labeledArgs()); - } - break; - } - // falls through - case LogType.group: - if (!debug && loglevel > LogLevel.log) return; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.group === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.group(...labeledArgs()); - } else { - console.log(...labeledArgs()); - } - break; - case LogType.groupEnd: - if (!debug && loglevel > LogLevel.log) return; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.groupEnd === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.groupEnd(); - } - break; - case LogType.time: { - if (!debug && loglevel > LogLevel.log) return; - const ms = args[1] * 1000 + args[2] / 1000000; - const msg = `[${name}] ${args[0]}: ${ms} ms`; - if (typeof console.logTime === "function") { - console.logTime(msg); - } else { - console.log(msg); - } - break; - } - case LogType.profile: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.profile === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.profile(...labeledArgs()); - } - break; - case LogType.profileEnd: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.profileEnd === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.profileEnd(...labeledArgs()); - } - break; - case LogType.clear: - if (!debug && loglevel > LogLevel.log) return; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - if (typeof console.clear === "function") { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.clear(); - } - break; - case LogType.status: - if (!debug && loglevel > LogLevel.info) return; - if (typeof console.status === "function") { - if (args.length === 0) { - console.status(); - } else { - console.status(...labeledArgs()); - } - } else { - if (args.length !== 0) { - console.info(...labeledArgs()); - } - } - break; - default: - throw new Error(`Unexpected LogType ${type}`); - } - }; - return logger; -}; - - -/***/ }), - -/***/ 77818: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const arraySum = array => { - let sum = 0; - for (const item of array) sum += item; - return sum; -}; - -/** - * @param {any[]} args items to be truncated - * @param {number} maxLength maximum length of args including spaces between - * @returns {string[]} truncated args - */ -const truncateArgs = (args, maxLength) => { - const lengths = args.map(a => `${a}`.length); - const availableLength = maxLength - lengths.length + 1; - - if (availableLength > 0 && args.length === 1) { - if (availableLength >= args[0].length) { - return args; - } else if (availableLength > 3) { - return ["..." + args[0].slice(-availableLength + 3)]; - } else { - return [args[0].slice(-availableLength)]; - } - } - - // Check if there is space for at least 4 chars per arg - if (availableLength < arraySum(lengths.map(i => Math.min(i, 6)))) { - // remove args - if (args.length > 1) - return truncateArgs(args.slice(0, args.length - 1), maxLength); - return []; - } - - let currentLength = arraySum(lengths); - - // Check if all fits into maxLength - if (currentLength <= availableLength) return args; - - // Try to remove chars from the longest items until it fits - while (currentLength > availableLength) { - const maxLength = Math.max(...lengths); - const shorterItems = lengths.filter(l => l !== maxLength); - const nextToMaxLength = - shorterItems.length > 0 ? Math.max(...shorterItems) : 0; - const maxReduce = maxLength - nextToMaxLength; - let maxItems = lengths.length - shorterItems.length; - let overrun = currentLength - availableLength; - for (let i = 0; i < lengths.length; i++) { - if (lengths[i] === maxLength) { - const reduce = Math.min(Math.floor(overrun / maxItems), maxReduce); - lengths[i] -= reduce; - currentLength -= reduce; - overrun -= reduce; - maxItems--; - } - } - } - - // Return args reduced to length in lengths - return args.map((a, i) => { - const str = `${a}`; - const length = lengths[i]; - if (str.length === length) { - return str; - } else if (length > 5) { - return "..." + str.slice(-length + 3); - } else if (length > 0) { - return str.slice(-length); - } else { - return ""; - } - }); -}; - -module.exports = truncateArgs; - - -/***/ }), - -/***/ 70979: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const StartupChunkDependenciesPlugin = __webpack_require__(61411); - -/** @typedef {import("../Compiler")} Compiler */ - -class CommonJsChunkLoadingPlugin { - constructor(options) { - options = options || {}; - this._asyncChunkLoading = options.asyncChunkLoading; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const ChunkLoadingRuntimeModule = this._asyncChunkLoading - ? __webpack_require__(82441) - : __webpack_require__(12001); - const chunkLoadingValue = this._asyncChunkLoading - ? "async-node" - : "require"; - new StartupChunkDependenciesPlugin({ - chunkLoading: chunkLoadingValue, - asyncChunkLoading: this._asyncChunkLoading - }).apply(compiler); - compiler.hooks.thisCompilation.tap( - "CommonJsChunkLoadingPlugin", - compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === chunkLoadingValue; - }; - const onceForChunkSet = new WeakSet(); - const handler = (chunk, set) => { - if (onceForChunkSet.has(chunk)) return; - onceForChunkSet.add(chunk); - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.hasOwnProperty); - compilation.addRuntimeModule( - chunk, - new ChunkLoadingRuntimeModule(set) - ); - }; - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("CommonJsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("CommonJsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("CommonJsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.baseURI) - .tap("CommonJsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.externalInstallChunk) - .tap("CommonJsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.onChunksLoaded) - .tap("CommonJsChunkLoadingPlugin", handler); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.getChunkScriptFilename); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.getChunkUpdateScriptFilename); - set.add(RuntimeGlobals.moduleCache); - set.add(RuntimeGlobals.hmrModuleData); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.getUpdateManifestFilename); - }); - } - ); - } -} - -module.exports = CommonJsChunkLoadingPlugin; - - -/***/ }), - -/***/ 27381: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const CachedInputFileSystem = __webpack_require__(28754); -const fs = __webpack_require__(41653); -const createConsoleLogger = __webpack_require__(86455); -const NodeWatchFileSystem = __webpack_require__(66378); -const nodeConsole = __webpack_require__(33796); - -/** @typedef {import("../../declarations/WebpackOptions").InfrastructureLogging} InfrastructureLogging */ -/** @typedef {import("../Compiler")} Compiler */ - -class NodeEnvironmentPlugin { - /** - * @param {Object} options options - * @param {InfrastructureLogging} options.infrastructureLogging infrastructure logging options - */ - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { infrastructureLogging } = this.options; - compiler.infrastructureLogger = createConsoleLogger({ - level: infrastructureLogging.level || "info", - debug: infrastructureLogging.debug || false, - console: - infrastructureLogging.console || - nodeConsole({ - colors: infrastructureLogging.colors, - appendOnly: infrastructureLogging.appendOnly, - stream: infrastructureLogging.stream - }) - }); - compiler.inputFileSystem = new CachedInputFileSystem(fs, 60000); - const inputFileSystem = compiler.inputFileSystem; - compiler.outputFileSystem = fs; - compiler.intermediateFileSystem = fs; - compiler.watchFileSystem = new NodeWatchFileSystem( - compiler.inputFileSystem - ); - compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", compiler => { - if (compiler.inputFileSystem === inputFileSystem) { - compiler.fsStartTime = Date.now(); - inputFileSystem.purge(); - } - }); - } -} - -module.exports = NodeEnvironmentPlugin; - - -/***/ }), - -/***/ 54250: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Compiler")} Compiler */ - -class NodeSourcePlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) {} -} - -module.exports = NodeSourcePlugin; - - -/***/ }), - -/***/ 23066: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ExternalsPlugin = __webpack_require__(51562); - -/** @typedef {import("../Compiler")} Compiler */ - -const builtins = [ - "assert", - "async_hooks", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "dgram", - "diagnostics_channel", - "dns", - "dns/promises", - "domain", - "events", - "fs", - "fs/promises", - "http", - "http2", - "https", - "inspector", - "module", - "net", - "os", - "path", - "path/posix", - "path/win32", - "perf_hooks", - "process", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "stream/promises", - "stream/web", - "string_decoder", - "sys", - "timers", - "timers/promises", - "tls", - "trace_events", - "tty", - "url", - "util", - "util/types", - "v8", - "vm", - "wasi", - "worker_threads", - "zlib", - /^node:/, - - // cspell:word pnpapi - // Yarn PnP adds pnpapi as "builtin" - "pnpapi" -]; - -class NodeTargetPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - new ExternalsPlugin("node-commonjs", builtins).apply(compiler); - } -} - -module.exports = NodeTargetPlugin; - - -/***/ }), - -/***/ 33999: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const CommonJsChunkFormatPlugin = __webpack_require__(93547); -const EnableChunkLoadingPlugin = __webpack_require__(49548); - -/** @typedef {import("../Compiler")} Compiler */ - -class NodeTemplatePlugin { - constructor(options) { - this._options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const chunkLoading = this._options.asyncChunkLoading - ? "async-node" - : "require"; - compiler.options.output.chunkLoading = chunkLoading; - new CommonJsChunkFormatPlugin().apply(compiler); - new EnableChunkLoadingPlugin(chunkLoading).apply(compiler); - } -} - -module.exports = NodeTemplatePlugin; - - -/***/ }), - -/***/ 66378: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const Watchpack = __webpack_require__(36871); - -/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */ -/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ -/** @typedef {import("../util/fs").WatchFileSystem} WatchFileSystem */ -/** @typedef {import("../util/fs").WatchMethod} WatchMethod */ -/** @typedef {import("../util/fs").Watcher} Watcher */ - -class NodeWatchFileSystem { - constructor(inputFileSystem) { - this.inputFileSystem = inputFileSystem; - this.watcherOptions = { - aggregateTimeout: 0 - }; - this.watcher = new Watchpack(this.watcherOptions); - } - - /** - * @param {Iterable} files watched files - * @param {Iterable} directories watched directories - * @param {Iterable} missing watched exitance entries - * @param {number} startTime timestamp of start time - * @param {WatchOptions} options options object - * @param {function(Error=, Map, Map, Set, Set): void} callback aggregated callback - * @param {function(string, number): void} callbackUndelayed callback when the first change was detected - * @returns {Watcher} a watcher - */ - watch( - files, - directories, - missing, - startTime, - options, - callback, - callbackUndelayed - ) { - if (!files || typeof files[Symbol.iterator] !== "function") { - throw new Error("Invalid arguments: 'files'"); - } - if (!directories || typeof directories[Symbol.iterator] !== "function") { - throw new Error("Invalid arguments: 'directories'"); - } - if (!missing || typeof missing[Symbol.iterator] !== "function") { - throw new Error("Invalid arguments: 'missing'"); - } - if (typeof callback !== "function") { - throw new Error("Invalid arguments: 'callback'"); - } - if (typeof startTime !== "number" && startTime) { - throw new Error("Invalid arguments: 'startTime'"); - } - if (typeof options !== "object") { - throw new Error("Invalid arguments: 'options'"); - } - if (typeof callbackUndelayed !== "function" && callbackUndelayed) { - throw new Error("Invalid arguments: 'callbackUndelayed'"); - } - const oldWatcher = this.watcher; - this.watcher = new Watchpack(options); - - if (callbackUndelayed) { - this.watcher.once("change", callbackUndelayed); - } - - const fetchTimeInfo = () => { - const fileTimeInfoEntries = new Map(); - const contextTimeInfoEntries = new Map(); - if (this.watcher) { - this.watcher.collectTimeInfoEntries( - fileTimeInfoEntries, - contextTimeInfoEntries - ); - } - return { fileTimeInfoEntries, contextTimeInfoEntries }; - }; - this.watcher.once("aggregated", (changes, removals) => { - // pause emitting events (avoids clearing aggregated changes and removals on timeout) - this.watcher.pause(); - - if (this.inputFileSystem && this.inputFileSystem.purge) { - const fs = this.inputFileSystem; - for (const item of changes) { - fs.purge(item); - } - for (const item of removals) { - fs.purge(item); - } - } - const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo(); - callback( - null, - fileTimeInfoEntries, - contextTimeInfoEntries, - changes, - removals - ); - }); - - this.watcher.watch({ files, directories, missing, startTime }); - - if (oldWatcher) { - oldWatcher.close(); - } - return { - close: () => { - if (this.watcher) { - this.watcher.close(); - this.watcher = null; - } - }, - pause: () => { - if (this.watcher) { - this.watcher.pause(); - } - }, - getAggregatedRemovals: util.deprecate( - () => { - const items = this.watcher && this.watcher.aggregatedRemovals; - if (items && this.inputFileSystem && this.inputFileSystem.purge) { - const fs = this.inputFileSystem; - for (const item of items) { - fs.purge(item); - } - } - return items; - }, - "Watcher.getAggregatedRemovals is deprecated in favor of Watcher.getInfo since that's more performant.", - "DEP_WEBPACK_WATCHER_GET_AGGREGATED_REMOVALS" - ), - getAggregatedChanges: util.deprecate( - () => { - const items = this.watcher && this.watcher.aggregatedChanges; - if (items && this.inputFileSystem && this.inputFileSystem.purge) { - const fs = this.inputFileSystem; - for (const item of items) { - fs.purge(item); - } - } - return items; - }, - "Watcher.getAggregatedChanges is deprecated in favor of Watcher.getInfo since that's more performant.", - "DEP_WEBPACK_WATCHER_GET_AGGREGATED_CHANGES" - ), - getFileTimeInfoEntries: util.deprecate( - () => { - return fetchTimeInfo().fileTimeInfoEntries; - }, - "Watcher.getFileTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", - "DEP_WEBPACK_WATCHER_FILE_TIME_INFO_ENTRIES" - ), - getContextTimeInfoEntries: util.deprecate( - () => { - return fetchTimeInfo().contextTimeInfoEntries; - }, - "Watcher.getContextTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", - "DEP_WEBPACK_WATCHER_CONTEXT_TIME_INFO_ENTRIES" - ), - getInfo: () => { - const removals = this.watcher && this.watcher.aggregatedRemovals; - const changes = this.watcher && this.watcher.aggregatedChanges; - if (this.inputFileSystem && this.inputFileSystem.purge) { - const fs = this.inputFileSystem; - if (removals) { - for (const item of removals) { - fs.purge(item); - } - } - if (changes) { - for (const item of changes) { - fs.purge(item); - } - } - } - const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo(); - return { - changes, - removals, - fileTimeInfoEntries, - contextTimeInfoEntries - }; - } - }; - } -} - -module.exports = NodeWatchFileSystem; - - -/***/ }), - -/***/ 82441: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - chunkHasJs, - getChunkFilenameTemplate -} = __webpack_require__(36109); -const { getInitialChunkIds } = __webpack_require__(82695); -const compileBooleanMatcher = __webpack_require__(73897); -const { getUndoPath } = __webpack_require__(20162); - -/** @typedef {import("../Chunk")} Chunk */ - -class ReadFileChunkLoadingRuntimeModule extends RuntimeModule { - constructor(runtimeRequirements) { - super("readFile chunk loading", RuntimeModule.STAGE_ATTACH); - this.runtimeRequirements = runtimeRequirements; - } - - /** - * @private - * @param {Chunk} chunk chunk - * @param {string} rootOutputDir root output directory - * @returns {string} generated code - */ - _generateBaseUri(chunk, rootOutputDir) { - const options = chunk.getEntryOptions(); - if (options && options.baseUri) { - return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`; - } - - return `${RuntimeGlobals.baseURI} = require("url").pathToFileURL(${ - rootOutputDir - ? `__dirname + ${JSON.stringify("/" + rootOutputDir)}` - : "__filename" - });`; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, chunk } = this; - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.ensureChunkHandlers; - const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); - const withExternalInstallChunk = this.runtimeRequirements.has( - RuntimeGlobals.externalInstallChunk - ); - const withOnChunkLoad = this.runtimeRequirements.has( - RuntimeGlobals.onChunksLoaded - ); - const withLoading = this.runtimeRequirements.has( - RuntimeGlobals.ensureChunkHandlers - ); - const withHmr = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const withHmrManifest = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadManifest - ); - const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs); - const hasJsMatcher = compileBooleanMatcher(conditionMap); - const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs); - - const outputName = this.compilation.getPath( - getChunkFilenameTemplate(chunk, this.compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ); - const rootOutputDir = getUndoPath( - outputName, - this.compilation.outputOptions.path, - false - ); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_readFileVm` - : undefined; - - return Template.asString([ - withBaseURI - ? this._generateBaseUri(chunk, rootOutputDir) - : "// no baseURI", - "", - "// object to store loaded chunks", - '// "0" means "already loaded", Promise means loading', - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{`, - Template.indent( - Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 0`).join( - ",\n" - ) - ), - "};", - "", - withOnChunkLoad - ? `${ - RuntimeGlobals.onChunksLoaded - }.readFileVm = ${runtimeTemplate.returningFunction( - "installedChunks[chunkId] === 0", - "chunkId" - )};` - : "// no on chunks loaded", - "", - withLoading || withExternalInstallChunk - ? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [ - "var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;", - "for(var moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent([ - `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` - ]), - "}" - ]), - "}", - `if(runtime) runtime(__webpack_require__);`, - "for(var i = 0; i < chunkIds.length; i++) {", - Template.indent([ - "if(installedChunks[chunkIds[i]]) {", - Template.indent(["installedChunks[chunkIds[i]][0]();"]), - "}", - "installedChunks[chunkIds[i]] = 0;" - ]), - "}", - withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : "" - ])};` - : "// no chunk install function needed", - "", - withLoading - ? Template.asString([ - "// ReadFile + VM.run chunk loading for javascript", - `${fn}.readFileVm = function(chunkId, promises) {`, - hasJsMatcher !== false - ? Template.indent([ - "", - "var installedChunkData = installedChunks[chunkId];", - 'if(installedChunkData !== 0) { // 0 means "already installed".', - Template.indent([ - '// array of [resolve, reject, promise] means "currently loading"', - "if(installedChunkData) {", - Template.indent(["promises.push(installedChunkData[2]);"]), - "} else {", - Template.indent([ - hasJsMatcher === true - ? "if(true) { // all chunks have JS" - : `if(${hasJsMatcher("chunkId")}) {`, - Template.indent([ - "// load the chunk and return promise to it", - "var promise = new Promise(function(resolve, reject) {", - Template.indent([ - "installedChunkData = installedChunks[chunkId] = [resolve, reject];", - `var filename = require('path').join(__dirname, ${JSON.stringify( - rootOutputDir - )} + ${ - RuntimeGlobals.getChunkScriptFilename - }(chunkId));`, - "require('fs').readFile(filename, 'utf-8', function(err, content) {", - Template.indent([ - "if(err) return reject(err);", - "var chunk = {};", - "require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + - "(chunk, require, require('path').dirname(filename), filename);", - "installChunk(chunk);" - ]), - "});" - ]), - "});", - "promises.push(installedChunkData[2] = promise);" - ]), - "} else installedChunks[chunkId] = 0;" - ]), - "}" - ]), - "}" - ]) - : Template.indent(["installedChunks[chunkId] = 0;"]), - "};" - ]) - : "// no chunk loading", - "", - withExternalInstallChunk - ? Template.asString([ - "module.exports = __webpack_require__;", - `${RuntimeGlobals.externalInstallChunk} = installChunk;` - ]) - : "// no external install chunk", - "", - withHmr - ? Template.asString([ - "function loadUpdateChunk(chunkId, updatedModulesList) {", - Template.indent([ - "return new Promise(function(resolve, reject) {", - Template.indent([ - `var filename = require('path').join(__dirname, ${JSON.stringify( - rootOutputDir - )} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId));`, - "require('fs').readFile(filename, 'utf-8', function(err, content) {", - Template.indent([ - "if(err) return reject(err);", - "var update = {};", - "require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + - "(update, require, require('path').dirname(filename), filename);", - "var updatedModules = update.modules;", - "var runtime = update.runtime;", - "for(var moduleId in updatedModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`, - Template.indent([ - `currentUpdate[moduleId] = updatedModules[moduleId];`, - "if(updatedModulesList) updatedModulesList.push(moduleId);" - ]), - "}" - ]), - "}", - "if(runtime) currentUpdateRuntime.push(runtime);", - "resolve();" - ]), - "});" - ]), - "});" - ]), - "}", - "", - Template.getFunctionContent( - require('./JavascriptHotModuleReplacement.runtime.js') - ) - .replace(/\$key\$/g, "readFileVm") - .replace(/\$installedChunks\$/g, "installedChunks") - .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") - .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) - .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) - .replace( - /\$ensureChunkHandlers\$/g, - RuntimeGlobals.ensureChunkHandlers - ) - .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) - .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) - .replace( - /\$hmrDownloadUpdateHandlers\$/g, - RuntimeGlobals.hmrDownloadUpdateHandlers - ) - .replace( - /\$hmrInvalidateModuleHandlers\$/g, - RuntimeGlobals.hmrInvalidateModuleHandlers - ) - ]) - : "// no HMR", - "", - withHmrManifest - ? Template.asString([ - `${RuntimeGlobals.hmrDownloadManifest} = function() {`, - Template.indent([ - "return new Promise(function(resolve, reject) {", - Template.indent([ - `var filename = require('path').join(__dirname, ${JSON.stringify( - rootOutputDir - )} + ${RuntimeGlobals.getUpdateManifestFilename}());`, - "require('fs').readFile(filename, 'utf-8', function(err, content) {", - Template.indent([ - "if(err) {", - Template.indent([ - 'if(err.code === "ENOENT") return resolve();', - "return reject(err);" - ]), - "}", - "try { resolve(JSON.parse(content)); }", - "catch(e) { reject(e); }" - ]), - "});" - ]), - "});" - ]), - "}" - ]) - : "// no HMR manifest" - ]); - } -} - -module.exports = ReadFileChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 63582: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const AsyncWasmLoadingRuntimeModule = __webpack_require__(12501); - -/** @typedef {import("../Compiler")} Compiler */ - -class ReadFileCompileAsyncWasmPlugin { - constructor({ type = "async-node", import: useImport = false } = {}) { - this._type = type; - this._import = useImport; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "ReadFileCompileAsyncWasmPlugin", - compilation => { - const globalWasmLoading = compilation.outputOptions.wasmLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const wasmLoading = - options && options.wasmLoading !== undefined - ? options.wasmLoading - : globalWasmLoading; - return wasmLoading === this._type; - }; - const generateLoadBinaryCode = this._import - ? path => - Template.asString([ - "Promise.all([import('fs'), import('url')]).then(([{ readFile }, { URL }]) => new Promise((resolve, reject) => {", - Template.indent([ - `readFile(new URL(${path}, import.meta.url), (err, buffer) => {`, - Template.indent([ - "if (err) return reject(err);", - "", - "// Fake fetch response", - "resolve({", - Template.indent(["arrayBuffer() { return buffer; }"]), - "});" - ]), - "});" - ]), - "}))" - ]) - : path => - Template.asString([ - "new Promise(function (resolve, reject) {", - Template.indent([ - "try {", - Template.indent([ - "var { readFile } = require('fs');", - "var { join } = require('path');", - "", - `readFile(join(__dirname, ${path}), function(err, buffer){`, - Template.indent([ - "if (err) return reject(err);", - "", - "// Fake fetch response", - "resolve({", - Template.indent(["arrayBuffer() { return buffer; }"]), - "});" - ]), - "});" - ]), - "} catch (err) { reject(err); }" - ]), - "})" - ]); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.instantiateWasm) - .tap("ReadFileCompileAsyncWasmPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - const chunkGraph = compilation.chunkGraph; - if ( - !chunkGraph.hasModuleInGraph( - chunk, - m => m.type === "webassembly/async" - ) - ) { - return; - } - set.add(RuntimeGlobals.publicPath); - compilation.addRuntimeModule( - chunk, - new AsyncWasmLoadingRuntimeModule({ - generateLoadBinaryCode, - supportsStreaming: false - }) - ); - }); - } - ); - } -} - -module.exports = ReadFileCompileAsyncWasmPlugin; - - -/***/ }), - -/***/ 29023: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const WasmChunkLoadingRuntimeModule = __webpack_require__(16671); - -/** @typedef {import("../Compiler")} Compiler */ - -// TODO webpack 6 remove - -class ReadFileCompileWasmPlugin { - constructor(options) { - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "ReadFileCompileWasmPlugin", - compilation => { - const globalWasmLoading = compilation.outputOptions.wasmLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const wasmLoading = - options && options.wasmLoading !== undefined - ? options.wasmLoading - : globalWasmLoading; - return wasmLoading === "async-node"; - }; - const generateLoadBinaryCode = path => - Template.asString([ - "new Promise(function (resolve, reject) {", - Template.indent([ - "var { readFile } = require('fs');", - "var { join } = require('path');", - "", - "try {", - Template.indent([ - `readFile(join(__dirname, ${path}), function(err, buffer){`, - Template.indent([ - "if (err) return reject(err);", - "", - "// Fake fetch response", - "resolve({", - Template.indent(["arrayBuffer() { return buffer; }"]), - "});" - ]), - "});" - ]), - "} catch (err) { reject(err); }" - ]), - "})" - ]); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ReadFileCompileWasmPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - const chunkGraph = compilation.chunkGraph; - if ( - !chunkGraph.hasModuleInGraph( - chunk, - m => m.type === "webassembly/sync" - ) - ) { - return; - } - set.add(RuntimeGlobals.moduleCache); - compilation.addRuntimeModule( - chunk, - new WasmChunkLoadingRuntimeModule({ - generateLoadBinaryCode, - supportsStreaming: false, - mangleImports: this.options.mangleImports, - runtimeRequirements: set - }) - ); - }); - } - ); - } -} - -module.exports = ReadFileCompileWasmPlugin; - - -/***/ }), - -/***/ 12001: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - chunkHasJs, - getChunkFilenameTemplate -} = __webpack_require__(36109); -const { getInitialChunkIds } = __webpack_require__(82695); -const compileBooleanMatcher = __webpack_require__(73897); -const { getUndoPath } = __webpack_require__(20162); - -/** @typedef {import("../Chunk")} Chunk */ - -class RequireChunkLoadingRuntimeModule extends RuntimeModule { - constructor(runtimeRequirements) { - super("require chunk loading", RuntimeModule.STAGE_ATTACH); - this.runtimeRequirements = runtimeRequirements; - } - - /** - * @private - * @param {Chunk} chunk chunk - * @param {string} rootOutputDir root output directory - * @returns {string} generated code - */ - _generateBaseUri(chunk, rootOutputDir) { - const options = chunk.getEntryOptions(); - if (options && options.baseUri) { - return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`; - } - - return `${RuntimeGlobals.baseURI} = require("url").pathToFileURL(${ - rootOutputDir !== "./" - ? `__dirname + ${JSON.stringify("/" + rootOutputDir)}` - : "__filename" - });`; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, chunk } = this; - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.ensureChunkHandlers; - const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); - const withExternalInstallChunk = this.runtimeRequirements.has( - RuntimeGlobals.externalInstallChunk - ); - const withOnChunkLoad = this.runtimeRequirements.has( - RuntimeGlobals.onChunksLoaded - ); - const withLoading = this.runtimeRequirements.has( - RuntimeGlobals.ensureChunkHandlers - ); - const withHmr = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const withHmrManifest = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadManifest - ); - const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs); - const hasJsMatcher = compileBooleanMatcher(conditionMap); - const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs); - - const outputName = this.compilation.getPath( - getChunkFilenameTemplate(chunk, this.compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ); - const rootOutputDir = getUndoPath( - outputName, - this.compilation.outputOptions.path, - true - ); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_require` - : undefined; - - return Template.asString([ - withBaseURI - ? this._generateBaseUri(chunk, rootOutputDir) - : "// no baseURI", - "", - "// object to store loaded chunks", - '// "1" means "loaded", otherwise not loaded yet', - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{`, - Template.indent( - Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 1`).join( - ",\n" - ) - ), - "};", - "", - withOnChunkLoad - ? `${ - RuntimeGlobals.onChunksLoaded - }.require = ${runtimeTemplate.returningFunction( - "installedChunks[chunkId]", - "chunkId" - )};` - : "// no on chunks loaded", - "", - withLoading || withExternalInstallChunk - ? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [ - "var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;", - "for(var moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent([ - `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` - ]), - "}" - ]), - "}", - `if(runtime) runtime(__webpack_require__);`, - "for(var i = 0; i < chunkIds.length; i++)", - Template.indent("installedChunks[chunkIds[i]] = 1;"), - withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : "" - ])};` - : "// no chunk install function needed", - "", - withLoading - ? Template.asString([ - "// require() chunk loading for javascript", - `${fn}.require = ${runtimeTemplate.basicFunction( - "chunkId, promises", - hasJsMatcher !== false - ? [ - '// "1" is the signal for "already loaded"', - "if(!installedChunks[chunkId]) {", - Template.indent([ - hasJsMatcher === true - ? "if(true) { // all chunks have JS" - : `if(${hasJsMatcher("chunkId")}) {`, - Template.indent([ - `installChunk(require(${JSON.stringify( - rootOutputDir - )} + ${ - RuntimeGlobals.getChunkScriptFilename - }(chunkId)));` - ]), - "} else installedChunks[chunkId] = 1;", - "" - ]), - "}" - ] - : "installedChunks[chunkId] = 1;" - )};` - ]) - : "// no chunk loading", - "", - withExternalInstallChunk - ? Template.asString([ - "module.exports = __webpack_require__;", - `${RuntimeGlobals.externalInstallChunk} = installChunk;` - ]) - : "// no external install chunk", - "", - withHmr - ? Template.asString([ - "function loadUpdateChunk(chunkId, updatedModulesList) {", - Template.indent([ - `var update = require(${JSON.stringify(rootOutputDir)} + ${ - RuntimeGlobals.getChunkUpdateScriptFilename - }(chunkId));`, - "var updatedModules = update.modules;", - "var runtime = update.runtime;", - "for(var moduleId in updatedModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`, - Template.indent([ - `currentUpdate[moduleId] = updatedModules[moduleId];`, - "if(updatedModulesList) updatedModulesList.push(moduleId);" - ]), - "}" - ]), - "}", - "if(runtime) currentUpdateRuntime.push(runtime);" - ]), - "}", - "", - Template.getFunctionContent( - require('./JavascriptHotModuleReplacement.runtime.js') - ) - .replace(/\$key\$/g, "require") - .replace(/\$installedChunks\$/g, "installedChunks") - .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") - .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) - .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) - .replace( - /\$ensureChunkHandlers\$/g, - RuntimeGlobals.ensureChunkHandlers - ) - .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) - .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) - .replace( - /\$hmrDownloadUpdateHandlers\$/g, - RuntimeGlobals.hmrDownloadUpdateHandlers - ) - .replace( - /\$hmrInvalidateModuleHandlers\$/g, - RuntimeGlobals.hmrInvalidateModuleHandlers - ) - ]) - : "// no HMR", - "", - withHmrManifest - ? Template.asString([ - `${RuntimeGlobals.hmrDownloadManifest} = function() {`, - Template.indent([ - "return Promise.resolve().then(function() {", - Template.indent([ - `return require(${JSON.stringify(rootOutputDir)} + ${ - RuntimeGlobals.getUpdateManifestFilename - }());` - ]), - "})['catch'](function(err) { if(err.code !== 'MODULE_NOT_FOUND') throw err; });" - ]), - "}" - ]) - : "// no HMR manifest" - ]); - } -} - -module.exports = RequireChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 33796: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const truncateArgs = __webpack_require__(77818); - -module.exports = ({ colors, appendOnly, stream }) => { - let currentStatusMessage = undefined; - let hasStatusMessage = false; - let currentIndent = ""; - let currentCollapsed = 0; - - const indent = (str, prefix, colorPrefix, colorSuffix) => { - if (str === "") return str; - prefix = currentIndent + prefix; - if (colors) { - return ( - prefix + - colorPrefix + - str.replace(/\n/g, colorSuffix + "\n" + prefix + colorPrefix) + - colorSuffix - ); - } else { - return prefix + str.replace(/\n/g, "\n" + prefix); - } - }; - - const clearStatusMessage = () => { - if (hasStatusMessage) { - stream.write("\x1b[2K\r"); - hasStatusMessage = false; - } - }; - - const writeStatusMessage = () => { - if (!currentStatusMessage) return; - const l = stream.columns; - const args = l - ? truncateArgs(currentStatusMessage, l - 1) - : currentStatusMessage; - const str = args.join(" "); - const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`; - stream.write(`\x1b[2K\r${coloredStr}`); - hasStatusMessage = true; - }; - - const writeColored = (prefix, colorPrefix, colorSuffix) => { - return (...args) => { - if (currentCollapsed > 0) return; - clearStatusMessage(); - const str = indent( - util.format(...args), - prefix, - colorPrefix, - colorSuffix - ); - stream.write(str + "\n"); - writeStatusMessage(); - }; - }; - - const writeGroupMessage = writeColored( - "<-> ", - "\u001b[1m\u001b[36m", - "\u001b[39m\u001b[22m" - ); - - const writeGroupCollapsedMessage = writeColored( - "<+> ", - "\u001b[1m\u001b[36m", - "\u001b[39m\u001b[22m" - ); - - return { - log: writeColored(" ", "\u001b[1m", "\u001b[22m"), - debug: writeColored(" ", "", ""), - trace: writeColored(" ", "", ""), - info: writeColored(" ", "\u001b[1m\u001b[32m", "\u001b[39m\u001b[22m"), - warn: writeColored(" ", "\u001b[1m\u001b[33m", "\u001b[39m\u001b[22m"), - error: writeColored(" ", "\u001b[1m\u001b[31m", "\u001b[39m\u001b[22m"), - logTime: writeColored( - " ", - "\u001b[1m\u001b[35m", - "\u001b[39m\u001b[22m" - ), - group: (...args) => { - writeGroupMessage(...args); - if (currentCollapsed > 0) { - currentCollapsed++; - } else { - currentIndent += " "; - } - }, - groupCollapsed: (...args) => { - writeGroupCollapsedMessage(...args); - currentCollapsed++; - }, - groupEnd: () => { - if (currentCollapsed > 0) currentCollapsed--; - else if (currentIndent.length >= 2) - currentIndent = currentIndent.slice(0, currentIndent.length - 2); - }, - // eslint-disable-next-line node/no-unsupported-features/node-builtins - profile: console.profile && (name => console.profile(name)), - // eslint-disable-next-line node/no-unsupported-features/node-builtins - profileEnd: console.profileEnd && (name => console.profileEnd(name)), - clear: - !appendOnly && - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.clear && - (() => { - clearStatusMessage(); - // eslint-disable-next-line node/no-unsupported-features/node-builtins - console.clear(); - writeStatusMessage(); - }), - status: appendOnly - ? writeColored(" ", "", "") - : (name, ...args) => { - args = args.filter(Boolean); - if (name === undefined && args.length === 0) { - clearStatusMessage(); - currentStatusMessage = undefined; - } else if ( - typeof name === "string" && - name.startsWith("[webpack.Progress] ") - ) { - currentStatusMessage = [name.slice(19), ...args]; - writeStatusMessage(); - } else if (name === "[webpack.Progress]") { - currentStatusMessage = [...args]; - writeStatusMessage(); - } else { - currentStatusMessage = [name, ...args]; - writeStatusMessage(); - } - } - }; -}; - - -/***/ }), - -/***/ 88455: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_ADVANCED } = __webpack_require__(6267); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ - -class AggressiveMergingPlugin { - constructor(options) { - if ( - (options !== undefined && typeof options !== "object") || - Array.isArray(options) - ) { - throw new Error( - "Argument should be an options object. To use defaults, pass in nothing.\nFor more info on options, see https://webpack.js.org/plugins/" - ); - } - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - const minSizeReduce = options.minSizeReduce || 1.5; - - compiler.hooks.thisCompilation.tap( - "AggressiveMergingPlugin", - compilation => { - compilation.hooks.optimizeChunks.tap( - { - name: "AggressiveMergingPlugin", - stage: STAGE_ADVANCED - }, - chunks => { - const chunkGraph = compilation.chunkGraph; - /** @type {{a: Chunk, b: Chunk, improvement: number}[]} */ - let combinations = []; - for (const a of chunks) { - if (a.canBeInitial()) continue; - for (const b of chunks) { - if (b.canBeInitial()) continue; - if (b === a) break; - if (!chunkGraph.canChunksBeIntegrated(a, b)) { - continue; - } - const aSize = chunkGraph.getChunkSize(b, { - chunkOverhead: 0 - }); - const bSize = chunkGraph.getChunkSize(a, { - chunkOverhead: 0 - }); - const abSize = chunkGraph.getIntegratedChunksSize(b, a, { - chunkOverhead: 0 - }); - const improvement = (aSize + bSize) / abSize; - combinations.push({ - a, - b, - improvement - }); - } - } - - combinations.sort((a, b) => { - return b.improvement - a.improvement; - }); - - const pair = combinations[0]; - - if (!pair) return; - if (pair.improvement < minSizeReduce) return; - - chunkGraph.integrateChunks(pair.b, pair.a); - compilation.chunks.delete(pair.a); - return true; - } - ); - } - ); - } -} - -module.exports = AggressiveMergingPlugin; - - -/***/ }), - -/***/ 97239: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_ADVANCED } = __webpack_require__(6267); -const { intersect } = __webpack_require__(73268); -const { - compareModulesByIdentifier, - compareChunks -} = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); -const identifierUtils = __webpack_require__(20162); - -/** @typedef {import("../../declarations/plugins/optimize/AggressiveSplittingPlugin").AggressiveSplittingPluginOptions} AggressiveSplittingPluginOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -const validate = createSchemaValidation( - __webpack_require__(5634), - () => - __webpack_require__(71013), - { - name: "Aggressive Splitting Plugin", - baseDataPath: "options" - } -); - -const moveModuleBetween = (chunkGraph, oldChunk, newChunk) => { - return module => { - chunkGraph.disconnectChunkAndModule(oldChunk, module); - chunkGraph.connectChunkAndModule(newChunk, module); - }; -}; - -/** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Chunk} chunk the chunk - * @returns {function(Module): boolean} filter for entry module - */ -const isNotAEntryModule = (chunkGraph, chunk) => { - return module => { - return !chunkGraph.isEntryModuleInChunk(module, chunk); - }; -}; - -/** @type {WeakSet} */ -const recordedChunks = new WeakSet(); - -class AggressiveSplittingPlugin { - /** - * @param {AggressiveSplittingPluginOptions=} options options object - */ - constructor(options = {}) { - validate(options); - - this.options = options; - if (typeof this.options.minSize !== "number") { - this.options.minSize = 30 * 1024; - } - if (typeof this.options.maxSize !== "number") { - this.options.maxSize = 50 * 1024; - } - if (typeof this.options.chunkOverhead !== "number") { - this.options.chunkOverhead = 0; - } - if (typeof this.options.entryChunkMultiplicator !== "number") { - this.options.entryChunkMultiplicator = 1; - } - } - - /** - * @param {Chunk} chunk the chunk to test - * @returns {boolean} true if the chunk was recorded - */ - static wasChunkRecorded(chunk) { - return recordedChunks.has(chunk); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "AggressiveSplittingPlugin", - compilation => { - let needAdditionalSeal = false; - let newSplits; - let fromAggressiveSplittingSet; - let chunkSplitDataMap; - compilation.hooks.optimize.tap("AggressiveSplittingPlugin", () => { - newSplits = []; - fromAggressiveSplittingSet = new Set(); - chunkSplitDataMap = new Map(); - }); - compilation.hooks.optimizeChunks.tap( - { - name: "AggressiveSplittingPlugin", - stage: STAGE_ADVANCED - }, - chunks => { - const chunkGraph = compilation.chunkGraph; - // Precompute stuff - const nameToModuleMap = new Map(); - const moduleToNameMap = new Map(); - const makePathsRelative = - identifierUtils.makePathsRelative.bindContextCache( - compiler.context, - compiler.root - ); - for (const m of compilation.modules) { - const name = makePathsRelative(m.identifier()); - nameToModuleMap.set(name, m); - moduleToNameMap.set(m, name); - } - - // Check used chunk ids - const usedIds = new Set(); - for (const chunk of chunks) { - usedIds.add(chunk.id); - } - - const recordedSplits = - (compilation.records && compilation.records.aggressiveSplits) || - []; - const usedSplits = newSplits - ? recordedSplits.concat(newSplits) - : recordedSplits; - - const minSize = this.options.minSize; - const maxSize = this.options.maxSize; - - const applySplit = splitData => { - // Cannot split if id is already taken - if (splitData.id !== undefined && usedIds.has(splitData.id)) { - return false; - } - - // Get module objects from names - const selectedModules = splitData.modules.map(name => - nameToModuleMap.get(name) - ); - - // Does the modules exist at all? - if (!selectedModules.every(Boolean)) return false; - - // Check if size matches (faster than waiting for hash) - let size = 0; - for (const m of selectedModules) size += m.size(); - if (size !== splitData.size) return false; - - // get chunks with all modules - const selectedChunks = intersect( - selectedModules.map( - m => new Set(chunkGraph.getModuleChunksIterable(m)) - ) - ); - - // No relevant chunks found - if (selectedChunks.size === 0) return false; - - // The found chunk is already the split or similar - if ( - selectedChunks.size === 1 && - chunkGraph.getNumberOfChunkModules( - Array.from(selectedChunks)[0] - ) === selectedModules.length - ) { - const chunk = Array.from(selectedChunks)[0]; - if (fromAggressiveSplittingSet.has(chunk)) return false; - fromAggressiveSplittingSet.add(chunk); - chunkSplitDataMap.set(chunk, splitData); - return true; - } - - // split the chunk into two parts - const newChunk = compilation.addChunk(); - newChunk.chunkReason = "aggressive splitted"; - for (const chunk of selectedChunks) { - selectedModules.forEach( - moveModuleBetween(chunkGraph, chunk, newChunk) - ); - chunk.split(newChunk); - chunk.name = null; - } - fromAggressiveSplittingSet.add(newChunk); - chunkSplitDataMap.set(newChunk, splitData); - - if (splitData.id !== null && splitData.id !== undefined) { - newChunk.id = splitData.id; - newChunk.ids = [splitData.id]; - } - return true; - }; - - // try to restore to recorded splitting - let changed = false; - for (let j = 0; j < usedSplits.length; j++) { - const splitData = usedSplits[j]; - if (applySplit(splitData)) changed = true; - } - - // for any chunk which isn't splitted yet, split it and create a new entry - // start with the biggest chunk - const cmpFn = compareChunks(chunkGraph); - const sortedChunks = Array.from(chunks).sort((a, b) => { - const diff1 = - chunkGraph.getChunkModulesSize(b) - - chunkGraph.getChunkModulesSize(a); - if (diff1) return diff1; - const diff2 = - chunkGraph.getNumberOfChunkModules(a) - - chunkGraph.getNumberOfChunkModules(b); - if (diff2) return diff2; - return cmpFn(a, b); - }); - for (const chunk of sortedChunks) { - if (fromAggressiveSplittingSet.has(chunk)) continue; - const size = chunkGraph.getChunkModulesSize(chunk); - if ( - size > maxSize && - chunkGraph.getNumberOfChunkModules(chunk) > 1 - ) { - const modules = chunkGraph - .getOrderedChunkModules(chunk, compareModulesByIdentifier) - .filter(isNotAEntryModule(chunkGraph, chunk)); - const selectedModules = []; - let selectedModulesSize = 0; - for (let k = 0; k < modules.length; k++) { - const module = modules[k]; - const newSize = selectedModulesSize + module.size(); - if (newSize > maxSize && selectedModulesSize >= minSize) { - break; - } - selectedModulesSize = newSize; - selectedModules.push(module); - } - if (selectedModules.length === 0) continue; - const splitData = { - modules: selectedModules - .map(m => moduleToNameMap.get(m)) - .sort(), - size: selectedModulesSize - }; - - if (applySplit(splitData)) { - newSplits = (newSplits || []).concat(splitData); - changed = true; - } - } - } - if (changed) return true; - } - ); - compilation.hooks.recordHash.tap( - "AggressiveSplittingPlugin", - records => { - // 4. save made splittings to records - const allSplits = new Set(); - const invalidSplits = new Set(); - - // Check if some splittings are invalid - // We remove invalid splittings and try again - for (const chunk of compilation.chunks) { - const splitData = chunkSplitDataMap.get(chunk); - if (splitData !== undefined) { - if (splitData.hash && chunk.hash !== splitData.hash) { - // Split was successful, but hash doesn't equal - // We can throw away the split since it's useless now - invalidSplits.add(splitData); - } - } - } - - if (invalidSplits.size > 0) { - records.aggressiveSplits = records.aggressiveSplits.filter( - splitData => !invalidSplits.has(splitData) - ); - needAdditionalSeal = true; - } else { - // set hash and id values on all (new) splittings - for (const chunk of compilation.chunks) { - const splitData = chunkSplitDataMap.get(chunk); - if (splitData !== undefined) { - splitData.hash = chunk.hash; - splitData.id = chunk.id; - allSplits.add(splitData); - // set flag for stats - recordedChunks.add(chunk); - } - } - - // Also add all unused historical splits (after the used ones) - // They can still be used in some future compilation - const recordedSplits = - compilation.records && compilation.records.aggressiveSplits; - if (recordedSplits) { - for (const splitData of recordedSplits) { - if (!invalidSplits.has(splitData)) allSplits.add(splitData); - } - } - - // record all splits - records.aggressiveSplits = Array.from(allSplits); - - needAdditionalSeal = false; - } - } - ); - compilation.hooks.needAdditionalSeal.tap( - "AggressiveSplittingPlugin", - () => { - if (needAdditionalSeal) { - needAdditionalSeal = false; - return true; - } - } - ); - } - ); - } -} -module.exports = AggressiveSplittingPlugin; - - -/***/ }), - -/***/ 4272: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const eslintScope = __webpack_require__(77736); -const Referencer = __webpack_require__(41759); -const { - CachedSource, - ConcatSource, - ReplaceSource -} = __webpack_require__(51255); -const ConcatenationScope = __webpack_require__(81701); -const { UsageState } = __webpack_require__(13168); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HarmonyImportDependency = __webpack_require__(58668); -const JavascriptParser = __webpack_require__(33177); -const { equals } = __webpack_require__(28087); -const LazySet = __webpack_require__(96522); -const { concatComparators } = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const { makePathsRelative } = __webpack_require__(20162); -const makeSerializable = __webpack_require__(65764); -const propertyAccess = __webpack_require__(67603); -const { - filterRuntime, - intersectRuntime, - mergeRuntimeCondition, - mergeRuntimeConditionNonFalse, - runtimeConditionToString, - subtractRuntimeCondition -} = __webpack_require__(47462); - -/** @typedef {import("eslint-scope").Scope} Scope */ -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ -/** @template T @typedef {import("../InitFragment")} InitFragment */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").ChunkRenderContext} ChunkRenderContext */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {typeof import("../util/Hash")} HashConstructor */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -// fix eslint-scope to support class properties correctly -// cspell:word Referencer -const ReferencerClass = Referencer; -if (!ReferencerClass.prototype.PropertyDefinition) { - ReferencerClass.prototype.PropertyDefinition = - ReferencerClass.prototype.Property; -} - -/** - * @typedef {Object} ReexportInfo - * @property {Module} module - * @property {string[]} export - */ - -/** @typedef {RawBinding | SymbolBinding} Binding */ - -/** - * @typedef {Object} RawBinding - * @property {ModuleInfo} info - * @property {string} rawName - * @property {string=} comment - * @property {string[]} ids - * @property {string[]} exportName - */ - -/** - * @typedef {Object} SymbolBinding - * @property {ConcatenatedModuleInfo} info - * @property {string} name - * @property {string=} comment - * @property {string[]} ids - * @property {string[]} exportName - */ - -/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo } ModuleInfo */ -/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo | ReferenceToModuleInfo } ModuleInfoOrReference */ - -/** - * @typedef {Object} ConcatenatedModuleInfo - * @property {"concatenated"} type - * @property {Module} module - * @property {number} index - * @property {Object} ast - * @property {Source} internalSource - * @property {ReplaceSource} source - * @property {InitFragment[]=} chunkInitFragments - * @property {Iterable} runtimeRequirements - * @property {Scope} globalScope - * @property {Scope} moduleScope - * @property {Map} internalNames - * @property {Map} exportMap - * @property {Map} rawExportMap - * @property {string=} namespaceExportSymbol - * @property {string} namespaceObjectName - * @property {boolean} interopNamespaceObjectUsed - * @property {string} interopNamespaceObjectName - * @property {boolean} interopNamespaceObject2Used - * @property {string} interopNamespaceObject2Name - * @property {boolean} interopDefaultAccessUsed - * @property {string} interopDefaultAccessName - */ - -/** - * @typedef {Object} ExternalModuleInfo - * @property {"external"} type - * @property {Module} module - * @property {RuntimeSpec | boolean} runtimeCondition - * @property {number} index - * @property {string} name - * @property {boolean} interopNamespaceObjectUsed - * @property {string} interopNamespaceObjectName - * @property {boolean} interopNamespaceObject2Used - * @property {string} interopNamespaceObject2Name - * @property {boolean} interopDefaultAccessUsed - * @property {string} interopDefaultAccessName - */ - -/** - * @typedef {Object} ReferenceToModuleInfo - * @property {"reference"} type - * @property {RuntimeSpec | boolean} runtimeCondition - * @property {ConcatenatedModuleInfo | ExternalModuleInfo} target - */ - -const RESERVED_NAMES = new Set( - [ - // internal names (should always be renamed) - ConcatenationScope.DEFAULT_EXPORT, - ConcatenationScope.NAMESPACE_OBJECT_EXPORT, - - // keywords - "abstract,arguments,async,await,boolean,break,byte,case,catch,char,class,const,continue", - "debugger,default,delete,do,double,else,enum,eval,export,extends,false,final,finally,float", - "for,function,goto,if,implements,import,in,instanceof,int,interface,let,long,native,new,null", - "package,private,protected,public,return,short,static,super,switch,synchronized,this,throw", - "throws,transient,true,try,typeof,var,void,volatile,while,with,yield", - - // commonjs/amd - "module,__dirname,__filename,exports,require,define", - - // js globals - "Array,Date,eval,function,hasOwnProperty,Infinity,isFinite,isNaN,isPrototypeOf,length,Math", - "NaN,name,Number,Object,prototype,String,toString,undefined,valueOf", - - // browser globals - "alert,all,anchor,anchors,area,assign,blur,button,checkbox,clearInterval,clearTimeout", - "clientInformation,close,closed,confirm,constructor,crypto,decodeURI,decodeURIComponent", - "defaultStatus,document,element,elements,embed,embeds,encodeURI,encodeURIComponent,escape", - "event,fileUpload,focus,form,forms,frame,innerHeight,innerWidth,layer,layers,link,location", - "mimeTypes,navigate,navigator,frames,frameRate,hidden,history,image,images,offscreenBuffering", - "open,opener,option,outerHeight,outerWidth,packages,pageXOffset,pageYOffset,parent,parseFloat", - "parseInt,password,pkcs11,plugin,prompt,propertyIsEnum,radio,reset,screenX,screenY,scroll", - "secure,select,self,setInterval,setTimeout,status,submit,taint,text,textarea,top,unescape", - "untaint,window", - - // window events - "onblur,onclick,onerror,onfocus,onkeydown,onkeypress,onkeyup,onmouseover,onload,onmouseup,onmousedown,onsubmit" - ] - .join(",") - .split(",") -); - -const createComparator = (property, comparator) => (a, b) => - comparator(a[property], b[property]); -const compareNumbers = (a, b) => { - if (isNaN(a)) { - if (!isNaN(b)) { - return 1; - } - } else { - if (isNaN(b)) { - return -1; - } - if (a !== b) { - return a < b ? -1 : 1; - } - } - return 0; -}; -const bySourceOrder = createComparator("sourceOrder", compareNumbers); -const byRangeStart = createComparator("rangeStart", compareNumbers); - -const joinIterableWithComma = iterable => { - // This is more performant than Array.from().join(", ") - // as it doesn't create an array - let str = ""; - let first = true; - for (const item of iterable) { - if (first) { - first = false; - } else { - str += ", "; - } - str += item; - } - return str; -}; - -/** - * @typedef {Object} ConcatenationEntry - * @property {"concatenated" | "external"} type - * @property {Module} module - * @property {RuntimeSpec | boolean} runtimeCondition - */ - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {ModuleInfo} info module info - * @param {string[]} exportName exportName - * @param {Map} moduleToInfoMap moduleToInfoMap - * @param {RuntimeSpec} runtime for which runtime - * @param {RequestShortener} requestShortener the request shortener - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {Set} neededNamespaceObjects modules for which a namespace object should be generated - * @param {boolean} asCall asCall - * @param {boolean} strictHarmonyModule strictHarmonyModule - * @param {boolean | undefined} asiSafe asiSafe - * @param {Set} alreadyVisited alreadyVisited - * @returns {Binding} the final variable - */ -const getFinalBinding = ( - moduleGraph, - info, - exportName, - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - asCall, - strictHarmonyModule, - asiSafe, - alreadyVisited = new Set() -) => { - const exportsType = info.module.getExportsType( - moduleGraph, - strictHarmonyModule - ); - if (exportName.length === 0) { - switch (exportsType) { - case "default-only": - info.interopNamespaceObject2Used = true; - return { - info, - rawName: info.interopNamespaceObject2Name, - ids: exportName, - exportName - }; - case "default-with-named": - info.interopNamespaceObjectUsed = true; - return { - info, - rawName: info.interopNamespaceObjectName, - ids: exportName, - exportName - }; - case "namespace": - case "dynamic": - break; - default: - throw new Error(`Unexpected exportsType ${exportsType}`); - } - } else { - switch (exportsType) { - case "namespace": - break; - case "default-with-named": - switch (exportName[0]) { - case "default": - exportName = exportName.slice(1); - break; - case "__esModule": - return { - info, - rawName: "/* __esModule */true", - ids: exportName.slice(1), - exportName - }; - } - break; - case "default-only": { - const exportId = exportName[0]; - if (exportId === "__esModule") { - return { - info, - rawName: "/* __esModule */true", - ids: exportName.slice(1), - exportName - }; - } - exportName = exportName.slice(1); - if (exportId !== "default") { - return { - info, - rawName: - "/* non-default import from default-exporting module */undefined", - ids: exportName, - exportName - }; - } - break; - } - case "dynamic": - switch (exportName[0]) { - case "default": { - exportName = exportName.slice(1); - info.interopDefaultAccessUsed = true; - const defaultExport = asCall - ? `${info.interopDefaultAccessName}()` - : asiSafe - ? `(${info.interopDefaultAccessName}())` - : asiSafe === false - ? `;(${info.interopDefaultAccessName}())` - : `${info.interopDefaultAccessName}.a`; - return { - info, - rawName: defaultExport, - ids: exportName, - exportName - }; - } - case "__esModule": - return { - info, - rawName: "/* __esModule */true", - ids: exportName.slice(1), - exportName - }; - } - break; - default: - throw new Error(`Unexpected exportsType ${exportsType}`); - } - } - if (exportName.length === 0) { - switch (info.type) { - case "concatenated": - neededNamespaceObjects.add(info); - return { - info, - rawName: info.namespaceObjectName, - ids: exportName, - exportName - }; - case "external": - return { info, rawName: info.name, ids: exportName, exportName }; - } - } - const exportsInfo = moduleGraph.getExportsInfo(info.module); - const exportInfo = exportsInfo.getExportInfo(exportName[0]); - if (alreadyVisited.has(exportInfo)) { - return { - info, - rawName: "/* circular reexport */ Object(function x() { x() }())", - ids: [], - exportName - }; - } - alreadyVisited.add(exportInfo); - switch (info.type) { - case "concatenated": { - const exportId = exportName[0]; - if (exportInfo.provided === false) { - // It's not provided, but it could be on the prototype - neededNamespaceObjects.add(info); - return { - info, - rawName: info.namespaceObjectName, - ids: exportName, - exportName - }; - } - const directExport = info.exportMap && info.exportMap.get(exportId); - if (directExport) { - const usedName = /** @type {string[]} */ ( - exportsInfo.getUsedName(exportName, runtime) - ); - if (!usedName) { - return { - info, - rawName: "/* unused export */ undefined", - ids: exportName.slice(1), - exportName - }; - } - return { - info, - name: directExport, - ids: usedName.slice(1), - exportName - }; - } - const rawExport = info.rawExportMap && info.rawExportMap.get(exportId); - if (rawExport) { - return { - info, - rawName: rawExport, - ids: exportName.slice(1), - exportName - }; - } - const reexport = exportInfo.findTarget(moduleGraph, module => - moduleToInfoMap.has(module) - ); - if (reexport === false) { - throw new Error( - `Target module of reexport from '${info.module.readableIdentifier( - requestShortener - )}' is not part of the concatenation (export '${exportId}')\nModules in the concatenation:\n${Array.from( - moduleToInfoMap, - ([m, info]) => - ` * ${info.type} ${m.readableIdentifier(requestShortener)}` - ).join("\n")}` - ); - } - if (reexport) { - const refInfo = moduleToInfoMap.get(reexport.module); - return getFinalBinding( - moduleGraph, - refInfo, - reexport.export - ? [...reexport.export, ...exportName.slice(1)] - : exportName.slice(1), - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - asCall, - info.module.buildMeta.strictHarmonyModule, - asiSafe, - alreadyVisited - ); - } - if (info.namespaceExportSymbol) { - const usedName = /** @type {string[]} */ ( - exportsInfo.getUsedName(exportName, runtime) - ); - return { - info, - rawName: info.namespaceObjectName, - ids: usedName, - exportName - }; - } - throw new Error( - `Cannot get final name for export '${exportName.join( - "." - )}' of ${info.module.readableIdentifier(requestShortener)}` - ); - } - - case "external": { - const used = /** @type {string[]} */ ( - exportsInfo.getUsedName(exportName, runtime) - ); - if (!used) { - return { - info, - rawName: "/* unused export */ undefined", - ids: exportName.slice(1), - exportName - }; - } - const comment = equals(used, exportName) - ? "" - : Template.toNormalComment(`${exportName.join(".")}`); - return { info, rawName: info.name + comment, ids: used, exportName }; - } - } -}; - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {ModuleInfo} info module info - * @param {string[]} exportName exportName - * @param {Map} moduleToInfoMap moduleToInfoMap - * @param {RuntimeSpec} runtime for which runtime - * @param {RequestShortener} requestShortener the request shortener - * @param {RuntimeTemplate} runtimeTemplate the runtime template - * @param {Set} neededNamespaceObjects modules for which a namespace object should be generated - * @param {boolean} asCall asCall - * @param {boolean} callContext callContext - * @param {boolean} strictHarmonyModule strictHarmonyModule - * @param {boolean | undefined} asiSafe asiSafe - * @returns {string} the final name - */ -const getFinalName = ( - moduleGraph, - info, - exportName, - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - asCall, - callContext, - strictHarmonyModule, - asiSafe -) => { - const binding = getFinalBinding( - moduleGraph, - info, - exportName, - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - asCall, - strictHarmonyModule, - asiSafe - ); - { - const { ids, comment } = binding; - let reference; - let isPropertyAccess; - if ("rawName" in binding) { - reference = `${binding.rawName}${comment || ""}${propertyAccess(ids)}`; - isPropertyAccess = ids.length > 0; - } else { - const { info, name: exportId } = binding; - const name = info.internalNames.get(exportId); - if (!name) { - throw new Error( - `The export "${exportId}" in "${info.module.readableIdentifier( - requestShortener - )}" has no internal name (existing names: ${ - Array.from( - info.internalNames, - ([name, symbol]) => `${name}: ${symbol}` - ).join(", ") || "none" - })` - ); - } - reference = `${name}${comment || ""}${propertyAccess(ids)}`; - isPropertyAccess = ids.length > 1; - } - if (isPropertyAccess && asCall && callContext === false) { - return asiSafe - ? `(0,${reference})` - : asiSafe === false - ? `;(0,${reference})` - : `/*#__PURE__*/Object(${reference})`; - } - return reference; - } -}; - -const addScopeSymbols = (s, nameSet, scopeSet1, scopeSet2) => { - let scope = s; - while (scope) { - if (scopeSet1.has(scope)) break; - if (scopeSet2.has(scope)) break; - scopeSet1.add(scope); - for (const variable of scope.variables) { - nameSet.add(variable.name); - } - scope = scope.upper; - } -}; - -const getAllReferences = variable => { - let set = variable.references; - // Look for inner scope variables too (like in class Foo { t() { Foo } }) - const identifiers = new Set(variable.identifiers); - for (const scope of variable.scope.childScopes) { - for (const innerVar of scope.variables) { - if (innerVar.identifiers.some(id => identifiers.has(id))) { - set = set.concat(innerVar.references); - break; - } - } - } - return set; -}; - -const getPathInAst = (ast, node) => { - if (ast === node) { - return []; - } - - const nr = node.range; - - const enterNode = n => { - if (!n) return undefined; - const r = n.range; - if (r) { - if (r[0] <= nr[0] && r[1] >= nr[1]) { - const path = getPathInAst(n, node); - if (path) { - path.push(n); - return path; - } - } - } - return undefined; - }; - - if (Array.isArray(ast)) { - for (let i = 0; i < ast.length; i++) { - const enterResult = enterNode(ast[i]); - if (enterResult !== undefined) return enterResult; - } - } else if (ast && typeof ast === "object") { - const keys = Object.keys(ast); - for (let i = 0; i < keys.length; i++) { - const value = ast[keys[i]]; - if (Array.isArray(value)) { - const pathResult = getPathInAst(value, node); - if (pathResult !== undefined) return pathResult; - } else if (value && typeof value === "object") { - const enterResult = enterNode(value); - if (enterResult !== undefined) return enterResult; - } - } - } -}; - -const TYPES = new Set(["javascript"]); - -class ConcatenatedModule extends Module { - /** - * @param {Module} rootModule the root module of the concatenation - * @param {Set} modules all modules in the concatenation (including the root module) - * @param {RuntimeSpec} runtime the runtime - * @param {Object=} associatedObjectForCache object for caching - * @param {string | HashConstructor=} hashFunction hash function to use - * @returns {ConcatenatedModule} the module - */ - static create( - rootModule, - modules, - runtime, - associatedObjectForCache, - hashFunction = "md4" - ) { - const identifier = ConcatenatedModule._createIdentifier( - rootModule, - modules, - associatedObjectForCache, - hashFunction - ); - return new ConcatenatedModule({ - identifier, - rootModule, - modules, - runtime - }); - } - - /** - * @param {Object} options options - * @param {string} options.identifier the identifier of the module - * @param {Module=} options.rootModule the root module of the concatenation - * @param {RuntimeSpec} options.runtime the selected runtime - * @param {Set=} options.modules all concatenated modules - */ - constructor({ identifier, rootModule, modules, runtime }) { - super("javascript/esm", null, rootModule && rootModule.layer); - - // Info from Factory - /** @type {string} */ - this._identifier = identifier; - /** @type {Module} */ - this.rootModule = rootModule; - /** @type {Set} */ - this._modules = modules; - this._runtime = runtime; - this.factoryMeta = rootModule && rootModule.factoryMeta; - } - - /** - * Assuming this module is in the cache. Update the (cached) module with - * the fresh module from the factory. Usually updates internal references - * and properties. - * @param {Module} module fresh module - * @returns {void} - */ - updateCacheModule(module) { - throw new Error("Must not be called"); - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - get modules() { - return Array.from(this._modules); - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return this._identifier; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return ( - this.rootModule.readableIdentifier(requestShortener) + - ` + ${this._modules.size - 1} modules` - ); - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return this.rootModule.libIdent(options); - } - - /** - * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) - */ - nameForCondition() { - return this.rootModule.nameForCondition(); - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only - */ - getSideEffectsConnectionState(moduleGraph) { - return this.rootModule.getSideEffectsConnectionState(moduleGraph); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - const { rootModule } = this; - this.buildInfo = { - strict: true, - cacheable: true, - moduleArgument: rootModule.buildInfo.moduleArgument, - exportsArgument: rootModule.buildInfo.exportsArgument, - fileDependencies: new LazySet(), - contextDependencies: new LazySet(), - missingDependencies: new LazySet(), - topLevelDeclarations: new Set(), - assets: undefined - }; - this.buildMeta = rootModule.buildMeta; - this.clearDependenciesAndBlocks(); - this.clearWarningsAndErrors(); - - for (const m of this._modules) { - // populate cacheable - if (!m.buildInfo.cacheable) { - this.buildInfo.cacheable = false; - } - - // populate dependencies - for (const d of m.dependencies.filter( - dep => - !(dep instanceof HarmonyImportDependency) || - !this._modules.has(compilation.moduleGraph.getModule(dep)) - )) { - this.dependencies.push(d); - } - // populate blocks - for (const d of m.blocks) { - this.blocks.push(d); - } - - // populate warnings - const warnings = m.getWarnings(); - if (warnings !== undefined) { - for (const warning of warnings) { - this.addWarning(warning); - } - } - - // populate errors - const errors = m.getErrors(); - if (errors !== undefined) { - for (const error of errors) { - this.addError(error); - } - } - - // populate topLevelDeclarations - if (m.buildInfo.topLevelDeclarations) { - const topLevelDeclarations = this.buildInfo.topLevelDeclarations; - if (topLevelDeclarations !== undefined) { - for (const decl of m.buildInfo.topLevelDeclarations) { - topLevelDeclarations.add(decl); - } - } - } else { - this.buildInfo.topLevelDeclarations = undefined; - } - - // populate assets - if (m.buildInfo.assets) { - if (this.buildInfo.assets === undefined) { - this.buildInfo.assets = Object.create(null); - } - Object.assign(this.buildInfo.assets, m.buildInfo.assets); - } - if (m.buildInfo.assetsInfo) { - if (this.buildInfo.assetsInfo === undefined) { - this.buildInfo.assetsInfo = new Map(); - } - for (const [key, value] of m.buildInfo.assetsInfo) { - this.buildInfo.assetsInfo.set(key, value); - } - } - } - callback(); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - // Guess size from embedded modules - let size = 0; - for (const module of this._modules) { - size += module.size(type); - } - return size; - } - - /** - * @private - * @param {Module} rootModule the root of the concatenation - * @param {Set} modulesSet a set of modules which should be concatenated - * @param {RuntimeSpec} runtime for this runtime - * @param {ModuleGraph} moduleGraph the module graph - * @returns {ConcatenationEntry[]} concatenation list - */ - _createConcatenationList(rootModule, modulesSet, runtime, moduleGraph) { - /** @type {ConcatenationEntry[]} */ - const list = []; - /** @type {Map} */ - const existingEntries = new Map(); - - /** - * @param {Module} module a module - * @returns {Iterable<{ connection: ModuleGraphConnection, runtimeCondition: RuntimeSpec | true }>} imported modules in order - */ - const getConcatenatedImports = module => { - let connections = Array.from(moduleGraph.getOutgoingConnections(module)); - if (module === rootModule) { - for (const c of moduleGraph.getOutgoingConnections(this)) - connections.push(c); - } - /** - * @type {Array<{ connection: ModuleGraphConnection, sourceOrder: number, rangeStart: number }>} - */ - const references = connections - .filter(connection => { - if (!(connection.dependency instanceof HarmonyImportDependency)) - return false; - return ( - connection && - connection.resolvedOriginModule === module && - connection.module && - connection.isTargetActive(runtime) - ); - }) - .map(connection => { - const dep = /** @type {HarmonyImportDependency} */ ( - connection.dependency - ); - return { - connection, - sourceOrder: dep.sourceOrder, - rangeStart: dep.range && dep.range[0] - }; - }); - /** - * bySourceOrder - * @example - * import a from "a"; // sourceOrder=1 - * import b from "b"; // sourceOrder=2 - * - * byRangeStart - * @example - * import {a, b} from "a"; // sourceOrder=1 - * a.a(); // first range - * b.b(); // second range - * - * If there is no reexport, we have the same source. - * If there is reexport, but module has side effects, this will lead to reexport module only. - * If there is side-effects-free reexport, we can get simple deterministic result with range start comparison. - */ - references.sort(concatComparators(bySourceOrder, byRangeStart)); - /** @type {Map} */ - const referencesMap = new Map(); - for (const { connection } of references) { - const runtimeCondition = filterRuntime(runtime, r => - connection.isTargetActive(r) - ); - if (runtimeCondition === false) continue; - const module = connection.module; - const entry = referencesMap.get(module); - if (entry === undefined) { - referencesMap.set(module, { connection, runtimeCondition }); - continue; - } - entry.runtimeCondition = mergeRuntimeConditionNonFalse( - entry.runtimeCondition, - runtimeCondition, - runtime - ); - } - return referencesMap.values(); - }; - - /** - * @param {ModuleGraphConnection} connection graph connection - * @param {RuntimeSpec | true} runtimeCondition runtime condition - * @returns {void} - */ - const enterModule = (connection, runtimeCondition) => { - const module = connection.module; - if (!module) return; - const existingEntry = existingEntries.get(module); - if (existingEntry === true) { - return; - } - if (modulesSet.has(module)) { - existingEntries.set(module, true); - if (runtimeCondition !== true) { - throw new Error( - `Cannot runtime-conditional concatenate a module (${module.identifier()} in ${this.rootModule.identifier()}, ${runtimeConditionToString( - runtimeCondition - )}). This should not happen.` - ); - } - const imports = getConcatenatedImports(module); - for (const { connection, runtimeCondition } of imports) - enterModule(connection, runtimeCondition); - list.push({ - type: "concatenated", - module: connection.module, - runtimeCondition - }); - } else { - if (existingEntry !== undefined) { - const reducedRuntimeCondition = subtractRuntimeCondition( - runtimeCondition, - existingEntry, - runtime - ); - if (reducedRuntimeCondition === false) return; - runtimeCondition = reducedRuntimeCondition; - existingEntries.set( - connection.module, - mergeRuntimeConditionNonFalse( - existingEntry, - runtimeCondition, - runtime - ) - ); - } else { - existingEntries.set(connection.module, runtimeCondition); - } - if (list.length > 0) { - const lastItem = list[list.length - 1]; - if ( - lastItem.type === "external" && - lastItem.module === connection.module - ) { - lastItem.runtimeCondition = mergeRuntimeCondition( - lastItem.runtimeCondition, - runtimeCondition, - runtime - ); - return; - } - } - list.push({ - type: "external", - get module() { - // We need to use a getter here, because the module in the dependency - // could be replaced by some other process (i. e. also replaced with a - // concatenated module) - return connection.module; - }, - runtimeCondition - }); - } - }; - - existingEntries.set(rootModule, true); - const imports = getConcatenatedImports(rootModule); - for (const { connection, runtimeCondition } of imports) - enterModule(connection, runtimeCondition); - list.push({ - type: "concatenated", - module: rootModule, - runtimeCondition: true - }); - - return list; - } - - /** - * @param {Module} rootModule the root module of the concatenation - * @param {Set} modules all modules in the concatenation (including the root module) - * @param {Object=} associatedObjectForCache object for caching - * @param {string | HashConstructor=} hashFunction hash function to use - * @returns {string} the identifier - */ - static _createIdentifier( - rootModule, - modules, - associatedObjectForCache, - hashFunction = "md4" - ) { - const cachedMakePathsRelative = makePathsRelative.bindContextCache( - rootModule.context, - associatedObjectForCache - ); - let identifiers = []; - for (const module of modules) { - identifiers.push(cachedMakePathsRelative(module.identifier())); - } - identifiers.sort(); - const hash = createHash(hashFunction); - hash.update(identifiers.join(" ")); - return rootModule.identifier() + "|" + hash.digest("hex"); - } - - /** - * @param {LazySet} fileDependencies set where file dependencies are added to - * @param {LazySet} contextDependencies set where context dependencies are added to - * @param {LazySet} missingDependencies set where missing dependencies are added to - * @param {LazySet} buildDependencies set where build dependencies are added to - */ - addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ) { - for (const module of this._modules) { - module.addCacheDependencies( - fileDependencies, - contextDependencies, - missingDependencies, - buildDependencies - ); - } - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime: generationRuntime, - codeGenerationResults - }) { - /** @type {Set} */ - const runtimeRequirements = new Set(); - const runtime = intersectRuntime(generationRuntime, this._runtime); - - const requestShortener = runtimeTemplate.requestShortener; - // Meta info for each module - const [modulesWithInfo, moduleToInfoMap] = this._getModulesWithInfo( - moduleGraph, - runtime - ); - - // Set with modules that need a generated namespace object - /** @type {Set} */ - const neededNamespaceObjects = new Set(); - - // Generate source code and analyse scopes - // Prepare a ReplaceSource for the final source - for (const info of moduleToInfoMap.values()) { - this._analyseModule( - moduleToInfoMap, - info, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime, - codeGenerationResults - ); - } - - // List of all used names to avoid conflicts - const allUsedNames = new Set(RESERVED_NAMES); - // Updated Top level declarations are created by renaming - const topLevelDeclarations = new Set(); - - // List of additional names in scope for module references - /** @type {Map, alreadyCheckedScopes: Set }>} */ - const usedNamesInScopeInfo = new Map(); - /** - * @param {string} module module identifier - * @param {string} id export id - * @returns {{ usedNames: Set, alreadyCheckedScopes: Set }} info - */ - const getUsedNamesInScopeInfo = (module, id) => { - const key = `${module}-${id}`; - let info = usedNamesInScopeInfo.get(key); - if (info === undefined) { - info = { - usedNames: new Set(), - alreadyCheckedScopes: new Set() - }; - usedNamesInScopeInfo.set(key, info); - } - return info; - }; - - // Set of already checked scopes - const ignoredScopes = new Set(); - - // get all global names - for (const info of modulesWithInfo) { - if (info.type === "concatenated") { - // ignore symbols from moduleScope - if (info.moduleScope) { - ignoredScopes.add(info.moduleScope); - } - - // The super class expression in class scopes behaves weird - // We get ranges of all super class expressions to make - // renaming to work correctly - const superClassCache = new WeakMap(); - const getSuperClassExpressions = scope => { - const cacheEntry = superClassCache.get(scope); - if (cacheEntry !== undefined) return cacheEntry; - const superClassExpressions = []; - for (const childScope of scope.childScopes) { - if (childScope.type !== "class") continue; - const block = childScope.block; - if ( - (block.type === "ClassDeclaration" || - block.type === "ClassExpression") && - block.superClass - ) { - superClassExpressions.push({ - range: block.superClass.range, - variables: childScope.variables - }); - } - } - superClassCache.set(scope, superClassExpressions); - return superClassExpressions; - }; - - // add global symbols - if (info.globalScope) { - for (const reference of info.globalScope.through) { - const name = reference.identifier.name; - if (ConcatenationScope.isModuleReference(name)) { - const match = ConcatenationScope.matchModuleReference(name); - if (!match) continue; - const referencedInfo = modulesWithInfo[match.index]; - if (referencedInfo.type === "reference") - throw new Error("Module reference can't point to a reference"); - const binding = getFinalBinding( - moduleGraph, - referencedInfo, - match.ids, - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - false, - info.module.buildMeta.strictHarmonyModule, - true - ); - if (!binding.ids) continue; - const { usedNames, alreadyCheckedScopes } = - getUsedNamesInScopeInfo( - binding.info.module.identifier(), - "name" in binding ? binding.name : "" - ); - for (const expr of getSuperClassExpressions(reference.from)) { - if ( - expr.range[0] <= reference.identifier.range[0] && - expr.range[1] >= reference.identifier.range[1] - ) { - for (const variable of expr.variables) { - usedNames.add(variable.name); - } - } - } - addScopeSymbols( - reference.from, - usedNames, - alreadyCheckedScopes, - ignoredScopes - ); - } else { - allUsedNames.add(name); - } - } - } - } - } - - // generate names for symbols - for (const info of moduleToInfoMap.values()) { - const { usedNames: namespaceObjectUsedNames } = getUsedNamesInScopeInfo( - info.module.identifier(), - "" - ); - switch (info.type) { - case "concatenated": { - for (const variable of info.moduleScope.variables) { - const name = variable.name; - const { usedNames, alreadyCheckedScopes } = getUsedNamesInScopeInfo( - info.module.identifier(), - name - ); - if (allUsedNames.has(name) || usedNames.has(name)) { - const references = getAllReferences(variable); - for (const ref of references) { - addScopeSymbols( - ref.from, - usedNames, - alreadyCheckedScopes, - ignoredScopes - ); - } - const newName = this.findNewName( - name, - allUsedNames, - usedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(newName); - info.internalNames.set(name, newName); - topLevelDeclarations.add(newName); - const source = info.source; - const allIdentifiers = new Set( - references.map(r => r.identifier).concat(variable.identifiers) - ); - for (const identifier of allIdentifiers) { - const r = identifier.range; - const path = getPathInAst(info.ast, identifier); - if (path && path.length > 1) { - const maybeProperty = - path[1].type === "AssignmentPattern" && - path[1].left === path[0] - ? path[2] - : path[1]; - if ( - maybeProperty.type === "Property" && - maybeProperty.shorthand - ) { - source.insert(r[1], `: ${newName}`); - continue; - } - } - source.replace(r[0], r[1] - 1, newName); - } - } else { - allUsedNames.add(name); - info.internalNames.set(name, name); - topLevelDeclarations.add(name); - } - } - let namespaceObjectName; - if (info.namespaceExportSymbol) { - namespaceObjectName = info.internalNames.get( - info.namespaceExportSymbol - ); - } else { - namespaceObjectName = this.findNewName( - "namespaceObject", - allUsedNames, - namespaceObjectUsedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(namespaceObjectName); - } - info.namespaceObjectName = namespaceObjectName; - topLevelDeclarations.add(namespaceObjectName); - break; - } - case "external": { - const externalName = this.findNewName( - "", - allUsedNames, - namespaceObjectUsedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(externalName); - info.name = externalName; - topLevelDeclarations.add(externalName); - break; - } - } - if (info.module.buildMeta.exportsType !== "namespace") { - const externalNameInterop = this.findNewName( - "namespaceObject", - allUsedNames, - namespaceObjectUsedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(externalNameInterop); - info.interopNamespaceObjectName = externalNameInterop; - topLevelDeclarations.add(externalNameInterop); - } - if ( - info.module.buildMeta.exportsType === "default" && - info.module.buildMeta.defaultObject !== "redirect" - ) { - const externalNameInterop = this.findNewName( - "namespaceObject2", - allUsedNames, - namespaceObjectUsedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(externalNameInterop); - info.interopNamespaceObject2Name = externalNameInterop; - topLevelDeclarations.add(externalNameInterop); - } - if ( - info.module.buildMeta.exportsType === "dynamic" || - !info.module.buildMeta.exportsType - ) { - const externalNameInterop = this.findNewName( - "default", - allUsedNames, - namespaceObjectUsedNames, - info.module.readableIdentifier(requestShortener) - ); - allUsedNames.add(externalNameInterop); - info.interopDefaultAccessName = externalNameInterop; - topLevelDeclarations.add(externalNameInterop); - } - } - - // Find and replace references to modules - for (const info of moduleToInfoMap.values()) { - if (info.type === "concatenated") { - for (const reference of info.globalScope.through) { - const name = reference.identifier.name; - const match = ConcatenationScope.matchModuleReference(name); - if (match) { - const referencedInfo = modulesWithInfo[match.index]; - if (referencedInfo.type === "reference") - throw new Error("Module reference can't point to a reference"); - const finalName = getFinalName( - moduleGraph, - referencedInfo, - match.ids, - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - match.call, - !match.directImport, - info.module.buildMeta.strictHarmonyModule, - match.asiSafe - ); - const r = reference.identifier.range; - const source = info.source; - // range is extended by 2 chars to cover the appended "._" - source.replace(r[0], r[1] + 1, finalName); - } - } - } - } - - // Map with all root exposed used exports - /** @type {Map} */ - const exportsMap = new Map(); - - // Set with all root exposed unused exports - /** @type {Set} */ - const unusedExports = new Set(); - - const rootInfo = /** @type {ConcatenatedModuleInfo} */ ( - moduleToInfoMap.get(this.rootModule) - ); - const strictHarmonyModule = rootInfo.module.buildMeta.strictHarmonyModule; - const exportsInfo = moduleGraph.getExportsInfo(rootInfo.module); - for (const exportInfo of exportsInfo.orderedExports) { - const name = exportInfo.name; - if (exportInfo.provided === false) continue; - const used = exportInfo.getUsedName(undefined, runtime); - if (!used) { - unusedExports.add(name); - continue; - } - exportsMap.set(used, requestShortener => { - try { - const finalName = getFinalName( - moduleGraph, - rootInfo, - [name], - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - false, - false, - strictHarmonyModule, - true - ); - return `/* ${ - exportInfo.isReexport() ? "reexport" : "binding" - } */ ${finalName}`; - } catch (e) { - e.message += `\nwhile generating the root export '${name}' (used name: '${used}')`; - throw e; - } - }); - } - - const result = new ConcatSource(); - - // add harmony compatibility flag (must be first because of possible circular dependencies) - if ( - moduleGraph.getExportsInfo(this).otherExportsInfo.getUsed(runtime) !== - UsageState.Unused - ) { - result.add(`// ESM COMPAT FLAG\n`); - result.add( - runtimeTemplate.defineEsModuleFlagStatement({ - exportsArgument: this.exportsArgument, - runtimeRequirements - }) - ); - } - - // define exports - if (exportsMap.size > 0) { - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - const definitions = []; - for (const [key, value] of exportsMap) { - definitions.push( - `\n ${JSON.stringify(key)}: ${runtimeTemplate.returningFunction( - value(requestShortener) - )}` - ); - } - result.add(`\n// EXPORTS\n`); - result.add( - `${RuntimeGlobals.definePropertyGetters}(${ - this.exportsArgument - }, {${definitions.join(",")}\n});\n` - ); - } - - // list unused exports - if (unusedExports.size > 0) { - result.add( - `\n// UNUSED EXPORTS: ${joinIterableWithComma(unusedExports)}\n` - ); - } - - // generate namespace objects - const namespaceObjectSources = new Map(); - for (const info of neededNamespaceObjects) { - if (info.namespaceExportSymbol) continue; - const nsObj = []; - const exportsInfo = moduleGraph.getExportsInfo(info.module); - for (const exportInfo of exportsInfo.orderedExports) { - if (exportInfo.provided === false) continue; - const usedName = exportInfo.getUsedName(undefined, runtime); - if (usedName) { - const finalName = getFinalName( - moduleGraph, - info, - [exportInfo.name], - moduleToInfoMap, - runtime, - requestShortener, - runtimeTemplate, - neededNamespaceObjects, - false, - undefined, - info.module.buildMeta.strictHarmonyModule, - true - ); - nsObj.push( - `\n ${JSON.stringify( - usedName - )}: ${runtimeTemplate.returningFunction(finalName)}` - ); - } - } - const name = info.namespaceObjectName; - const defineGetters = - nsObj.length > 0 - ? `${RuntimeGlobals.definePropertyGetters}(${name}, {${nsObj.join( - "," - )}\n});\n` - : ""; - if (nsObj.length > 0) - runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); - namespaceObjectSources.set( - info, - ` -// NAMESPACE OBJECT: ${info.module.readableIdentifier(requestShortener)} -var ${name} = {}; -${RuntimeGlobals.makeNamespaceObject}(${name}); -${defineGetters}` - ); - runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); - } - - // define required namespace objects (must be before evaluation modules) - for (const info of modulesWithInfo) { - if (info.type === "concatenated") { - const source = namespaceObjectSources.get(info); - if (!source) continue; - result.add(source); - } - } - - const chunkInitFragments = []; - - // evaluate modules in order - for (const rawInfo of modulesWithInfo) { - let name; - let isConditional = false; - const info = rawInfo.type === "reference" ? rawInfo.target : rawInfo; - switch (info.type) { - case "concatenated": { - result.add( - `\n;// CONCATENATED MODULE: ${info.module.readableIdentifier( - requestShortener - )}\n` - ); - result.add(info.source); - if (info.chunkInitFragments) { - for (const f of info.chunkInitFragments) chunkInitFragments.push(f); - } - if (info.runtimeRequirements) { - for (const r of info.runtimeRequirements) { - runtimeRequirements.add(r); - } - } - name = info.namespaceObjectName; - break; - } - case "external": { - result.add( - `\n// EXTERNAL MODULE: ${info.module.readableIdentifier( - requestShortener - )}\n` - ); - runtimeRequirements.add(RuntimeGlobals.require); - const { runtimeCondition } = - /** @type {ExternalModuleInfo | ReferenceToModuleInfo} */ (rawInfo); - const condition = runtimeTemplate.runtimeConditionExpression({ - chunkGraph, - runtimeCondition, - runtime, - runtimeRequirements - }); - if (condition !== "true") { - isConditional = true; - result.add(`if (${condition}) {\n`); - } - result.add( - `var ${info.name} = __webpack_require__(${JSON.stringify( - chunkGraph.getModuleId(info.module) - )});` - ); - name = info.name; - break; - } - default: - // @ts-expect-error never is expected here - throw new Error(`Unsupported concatenation entry type ${info.type}`); - } - if (info.interopNamespaceObjectUsed) { - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - result.add( - `\nvar ${info.interopNamespaceObjectName} = /*#__PURE__*/${RuntimeGlobals.createFakeNamespaceObject}(${name}, 2);` - ); - } - if (info.interopNamespaceObject2Used) { - runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); - result.add( - `\nvar ${info.interopNamespaceObject2Name} = /*#__PURE__*/${RuntimeGlobals.createFakeNamespaceObject}(${name});` - ); - } - if (info.interopDefaultAccessUsed) { - runtimeRequirements.add(RuntimeGlobals.compatGetDefaultExport); - result.add( - `\nvar ${info.interopDefaultAccessName} = /*#__PURE__*/${RuntimeGlobals.compatGetDefaultExport}(${name});` - ); - } - if (isConditional) { - result.add("\n}"); - } - } - - const data = new Map(); - if (chunkInitFragments.length > 0) - data.set("chunkInitFragments", chunkInitFragments); - data.set("topLevelDeclarations", topLevelDeclarations); - - /** @type {CodeGenerationResult} */ - const resultEntry = { - sources: new Map([["javascript", new CachedSource(result)]]), - data, - runtimeRequirements - }; - - return resultEntry; - } - - /** - * @param {Map} modulesMap modulesMap - * @param {ModuleInfo} info info - * @param {DependencyTemplates} dependencyTemplates dependencyTemplates - * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate - * @param {ModuleGraph} moduleGraph moduleGraph - * @param {ChunkGraph} chunkGraph chunkGraph - * @param {RuntimeSpec} runtime runtime - * @param {CodeGenerationResults} codeGenerationResults codeGenerationResults - */ - _analyseModule( - modulesMap, - info, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime, - codeGenerationResults - ) { - if (info.type === "concatenated") { - const m = info.module; - try { - // Create a concatenation scope to track and capture information - const concatenationScope = new ConcatenationScope(modulesMap, info); - - // TODO cache codeGeneration results - const codeGenResult = m.codeGeneration({ - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - runtime, - concatenationScope, - codeGenerationResults, - sourceTypes: TYPES - }); - const source = codeGenResult.sources.get("javascript"); - const data = codeGenResult.data; - const chunkInitFragments = data && data.get("chunkInitFragments"); - const code = source.source().toString(); - let ast; - try { - ast = JavascriptParser._parse(code, { - sourceType: "module" - }); - } catch (err) { - if ( - err.loc && - typeof err.loc === "object" && - typeof err.loc.line === "number" - ) { - const lineNumber = err.loc.line; - const lines = code.split("\n"); - err.message += - "\n| " + - lines - .slice(Math.max(0, lineNumber - 3), lineNumber + 2) - .join("\n| "); - } - throw err; - } - const scopeManager = eslintScope.analyze(ast, { - ecmaVersion: 6, - sourceType: "module", - optimistic: true, - ignoreEval: true, - impliedStrict: true - }); - const globalScope = scopeManager.acquire(ast); - const moduleScope = globalScope.childScopes[0]; - const resultSource = new ReplaceSource(source); - info.runtimeRequirements = codeGenResult.runtimeRequirements; - info.ast = ast; - info.internalSource = source; - info.source = resultSource; - info.chunkInitFragments = chunkInitFragments; - info.globalScope = globalScope; - info.moduleScope = moduleScope; - } catch (err) { - err.message += `\nwhile analyzing module ${m.identifier()} for concatenation`; - throw err; - } - } - } - - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {RuntimeSpec} runtime the runtime - * @returns {[ModuleInfoOrReference[], Map]} module info items - */ - _getModulesWithInfo(moduleGraph, runtime) { - const orderedConcatenationList = this._createConcatenationList( - this.rootModule, - this._modules, - runtime, - moduleGraph - ); - /** @type {Map} */ - const map = new Map(); - const list = orderedConcatenationList.map((info, index) => { - let item = map.get(info.module); - if (item === undefined) { - switch (info.type) { - case "concatenated": - item = { - type: "concatenated", - module: info.module, - index, - ast: undefined, - internalSource: undefined, - runtimeRequirements: undefined, - source: undefined, - globalScope: undefined, - moduleScope: undefined, - internalNames: new Map(), - exportMap: undefined, - rawExportMap: undefined, - namespaceExportSymbol: undefined, - namespaceObjectName: undefined, - interopNamespaceObjectUsed: false, - interopNamespaceObjectName: undefined, - interopNamespaceObject2Used: false, - interopNamespaceObject2Name: undefined, - interopDefaultAccessUsed: false, - interopDefaultAccessName: undefined - }; - break; - case "external": - item = { - type: "external", - module: info.module, - runtimeCondition: info.runtimeCondition, - index, - name: undefined, - interopNamespaceObjectUsed: false, - interopNamespaceObjectName: undefined, - interopNamespaceObject2Used: false, - interopNamespaceObject2Name: undefined, - interopDefaultAccessUsed: false, - interopDefaultAccessName: undefined - }; - break; - default: - throw new Error( - `Unsupported concatenation entry type ${info.type}` - ); - } - map.set(item.module, item); - return item; - } else { - /** @type {ReferenceToModuleInfo} */ - const ref = { - type: "reference", - runtimeCondition: info.runtimeCondition, - target: item - }; - return ref; - } - }); - return [list, map]; - } - - findNewName(oldName, usedNamed1, usedNamed2, extraInfo) { - let name = oldName; - - if (name === ConcatenationScope.DEFAULT_EXPORT) { - name = ""; - } - if (name === ConcatenationScope.NAMESPACE_OBJECT_EXPORT) { - name = "namespaceObject"; - } - - // Remove uncool stuff - extraInfo = extraInfo.replace( - /\.+\/|(\/index)?\.([a-zA-Z0-9]{1,4})($|\s|\?)|\s*\+\s*\d+\s*modules/g, - "" - ); - - const splittedInfo = extraInfo.split("/"); - while (splittedInfo.length) { - name = splittedInfo.pop() + (name ? "_" + name : ""); - const nameIdent = Template.toIdentifier(name); - if ( - !usedNamed1.has(nameIdent) && - (!usedNamed2 || !usedNamed2.has(nameIdent)) - ) - return nameIdent; - } - - let i = 0; - let nameWithNumber = Template.toIdentifier(`${name}_${i}`); - while ( - usedNamed1.has(nameWithNumber) || - (usedNamed2 && usedNamed2.has(nameWithNumber)) - ) { - i++; - nameWithNumber = Template.toIdentifier(`${name}_${i}`); - } - return nameWithNumber; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - const { chunkGraph, runtime } = context; - for (const info of this._createConcatenationList( - this.rootModule, - this._modules, - intersectRuntime(runtime, this._runtime), - chunkGraph.moduleGraph - )) { - switch (info.type) { - case "concatenated": - info.module.updateHash(hash, context); - break; - case "external": - hash.update(`${chunkGraph.getModuleId(info.module)}`); - // TODO runtimeCondition - break; - } - } - super.updateHash(hash, context); - } - - static deserialize(context) { - const obj = new ConcatenatedModule({ - identifier: undefined, - rootModule: undefined, - modules: undefined, - runtime: undefined - }); - obj.deserialize(context); - return obj; - } -} - -makeSerializable(ConcatenatedModule, "webpack/lib/optimize/ConcatenatedModule"); - -module.exports = ConcatenatedModule; - - -/***/ }), - -/***/ 59869: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_BASIC } = __webpack_require__(6267); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compiler")} Compiler */ - -class EnsureChunkConditionsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "EnsureChunkConditionsPlugin", - compilation => { - const handler = chunks => { - const chunkGraph = compilation.chunkGraph; - // These sets are hoisted here to save memory - // They are cleared at the end of every loop - /** @type {Set} */ - const sourceChunks = new Set(); - /** @type {Set} */ - const chunkGroups = new Set(); - for (const module of compilation.modules) { - if (!module.hasChunkCondition()) continue; - for (const chunk of chunkGraph.getModuleChunksIterable(module)) { - if (!module.chunkCondition(chunk, compilation)) { - sourceChunks.add(chunk); - for (const group of chunk.groupsIterable) { - chunkGroups.add(group); - } - } - } - if (sourceChunks.size === 0) continue; - /** @type {Set} */ - const targetChunks = new Set(); - chunkGroupLoop: for (const chunkGroup of chunkGroups) { - // Can module be placed in a chunk of this group? - for (const chunk of chunkGroup.chunks) { - if (module.chunkCondition(chunk, compilation)) { - targetChunks.add(chunk); - continue chunkGroupLoop; - } - } - // We reached the entrypoint: fail - if (chunkGroup.isInitial()) { - throw new Error( - "Cannot fullfil chunk condition of " + module.identifier() - ); - } - // Try placing in all parents - for (const group of chunkGroup.parentsIterable) { - chunkGroups.add(group); - } - } - for (const sourceChunk of sourceChunks) { - chunkGraph.disconnectChunkAndModule(sourceChunk, module); - } - for (const targetChunk of targetChunks) { - chunkGraph.connectChunkAndModule(targetChunk, module); - } - sourceChunks.clear(); - chunkGroups.clear(); - } - }; - compilation.hooks.optimizeChunks.tap( - { - name: "EnsureChunkConditionsPlugin", - stage: STAGE_BASIC - }, - handler - ); - } - ); - } -} -module.exports = EnsureChunkConditionsPlugin; - - -/***/ }), - -/***/ 58794: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ - -class FlagIncludedChunksPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("FlagIncludedChunksPlugin", compilation => { - compilation.hooks.optimizeChunkIds.tap( - "FlagIncludedChunksPlugin", - chunks => { - const chunkGraph = compilation.chunkGraph; - - // prepare two bit integers for each module - // 2^31 is the max number represented as SMI in v8 - // we want the bits distributed this way: - // the bit 2^31 is pretty rar and only one module should get it - // so it has a probability of 1 / modulesCount - // the first bit (2^0) is the easiest and every module could get it - // if it doesn't get a better bit - // from bit 2^n to 2^(n+1) there is a probability of p - // so 1 / modulesCount == p^31 - // <=> p = sqrt31(1 / modulesCount) - // so we use a modulo of 1 / sqrt31(1 / modulesCount) - /** @type {WeakMap} */ - const moduleBits = new WeakMap(); - const modulesCount = compilation.modules.size; - - // precalculate the modulo values for each bit - const modulo = 1 / Math.pow(1 / modulesCount, 1 / 31); - const modulos = Array.from( - { length: 31 }, - (x, i) => Math.pow(modulo, i) | 0 - ); - - // iterate all modules to generate bit values - let i = 0; - for (const module of compilation.modules) { - let bit = 30; - while (i % modulos[bit] !== 0) { - bit--; - } - moduleBits.set(module, 1 << bit); - i++; - } - - // iterate all chunks to generate bitmaps - /** @type {WeakMap} */ - const chunkModulesHash = new WeakMap(); - for (const chunk of chunks) { - let hash = 0; - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - hash |= moduleBits.get(module); - } - chunkModulesHash.set(chunk, hash); - } - - for (const chunkA of chunks) { - const chunkAHash = chunkModulesHash.get(chunkA); - const chunkAModulesCount = - chunkGraph.getNumberOfChunkModules(chunkA); - if (chunkAModulesCount === 0) continue; - let bestModule = undefined; - for (const module of chunkGraph.getChunkModulesIterable(chunkA)) { - if ( - bestModule === undefined || - chunkGraph.getNumberOfModuleChunks(bestModule) > - chunkGraph.getNumberOfModuleChunks(module) - ) - bestModule = module; - } - loopB: for (const chunkB of chunkGraph.getModuleChunksIterable( - bestModule - )) { - // as we iterate the same iterables twice - // skip if we find ourselves - if (chunkA === chunkB) continue; - - const chunkBModulesCount = - chunkGraph.getNumberOfChunkModules(chunkB); - - // ids for empty chunks are not included - if (chunkBModulesCount === 0) continue; - - // instead of swapping A and B just bail - // as we loop twice the current A will be B and B then A - if (chunkAModulesCount > chunkBModulesCount) continue; - - // is chunkA in chunkB? - - // we do a cheap check for the hash value - const chunkBHash = chunkModulesHash.get(chunkB); - if ((chunkBHash & chunkAHash) !== chunkAHash) continue; - - // compare all modules - for (const m of chunkGraph.getChunkModulesIterable(chunkA)) { - if (!chunkGraph.isModuleInChunk(m, chunkB)) continue loopB; - } - chunkB.ids.push(chunkA.id); - } - } - } - ); - }); - } -} -module.exports = FlagIncludedChunksPlugin; - - -/***/ }), - -/***/ 39236: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const { UsageState } = __webpack_require__(13168); - -/** @typedef {import("estree").Node} AnyNode */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** @typedef {Map | true>} InnerGraph */ -/** @typedef {function(boolean | Set | undefined): void} UsageCallback */ - -/** - * @typedef {Object} StateObject - * @property {InnerGraph} innerGraph - * @property {TopLevelSymbol=} currentTopLevelSymbol - * @property {Map>} usageCallbackMap - */ - -/** @typedef {false|StateObject} State */ - -/** @type {WeakMap} */ -const parserStateMap = new WeakMap(); -const topLevelSymbolTag = Symbol("top level symbol"); - -/** - * @param {ParserState} parserState parser state - * @returns {State} state - */ -function getState(parserState) { - return parserStateMap.get(parserState); -} - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.bailout = parserState => { - parserStateMap.set(parserState, false); -}; - -/** - * @param {ParserState} parserState parser state - * @returns {void} - */ -exports.enable = parserState => { - const state = parserStateMap.get(parserState); - if (state === false) { - return; - } - parserStateMap.set(parserState, { - innerGraph: new Map(), - currentTopLevelSymbol: undefined, - usageCallbackMap: new Map() - }); -}; - -/** - * @param {ParserState} parserState parser state - * @returns {boolean} true, when enabled - */ -exports.isEnabled = parserState => { - const state = parserStateMap.get(parserState); - return !!state; -}; - -/** - * @param {ParserState} state parser state - * @param {TopLevelSymbol | null} symbol the symbol, or null for all symbols - * @param {string | TopLevelSymbol | true} usage usage data - * @returns {void} - */ -exports.addUsage = (state, symbol, usage) => { - const innerGraphState = getState(state); - - if (innerGraphState) { - const { innerGraph } = innerGraphState; - const info = innerGraph.get(symbol); - if (usage === true) { - innerGraph.set(symbol, true); - } else if (info === undefined) { - innerGraph.set(symbol, new Set([usage])); - } else if (info !== true) { - info.add(usage); - } - } -}; - -/** - * @param {JavascriptParser} parser the parser - * @param {string} name name of variable - * @param {string | TopLevelSymbol | true} usage usage data - * @returns {void} - */ -exports.addVariableUsage = (parser, name, usage) => { - const symbol = - /** @type {TopLevelSymbol} */ ( - parser.getTagData(name, topLevelSymbolTag) - ) || exports.tagTopLevelSymbol(parser, name); - if (symbol) { - exports.addUsage(parser.state, symbol, usage); - } -}; - -/** - * @param {ParserState} state parser state - * @returns {void} - */ -exports.inferDependencyUsage = state => { - const innerGraphState = getState(state); - - if (!innerGraphState) { - return; - } - - const { innerGraph, usageCallbackMap } = innerGraphState; - const processed = new Map(); - // flatten graph to terminal nodes (string, undefined or true) - const nonTerminal = new Set(innerGraph.keys()); - while (nonTerminal.size > 0) { - for (const key of nonTerminal) { - /** @type {Set | true} */ - let newSet = new Set(); - let isTerminal = true; - const value = innerGraph.get(key); - let alreadyProcessed = processed.get(key); - if (alreadyProcessed === undefined) { - alreadyProcessed = new Set(); - processed.set(key, alreadyProcessed); - } - if (value !== true && value !== undefined) { - for (const item of value) { - alreadyProcessed.add(item); - } - for (const item of value) { - if (typeof item === "string") { - newSet.add(item); - } else { - const itemValue = innerGraph.get(item); - if (itemValue === true) { - newSet = true; - break; - } - if (itemValue !== undefined) { - for (const i of itemValue) { - if (i === key) continue; - if (alreadyProcessed.has(i)) continue; - newSet.add(i); - if (typeof i !== "string") { - isTerminal = false; - } - } - } - } - } - if (newSet === true) { - innerGraph.set(key, true); - } else if (newSet.size === 0) { - innerGraph.set(key, undefined); - } else { - innerGraph.set(key, newSet); - } - } - if (isTerminal) { - nonTerminal.delete(key); - - // For the global key, merge with all other keys - if (key === null) { - const globalValue = innerGraph.get(null); - if (globalValue) { - for (const [key, value] of innerGraph) { - if (key !== null && value !== true) { - if (globalValue === true) { - innerGraph.set(key, true); - } else { - const newSet = new Set(value); - for (const item of globalValue) { - newSet.add(item); - } - innerGraph.set(key, newSet); - } - } - } - } - } - } - } - } - - /** @type {Map>} */ - for (const [symbol, callbacks] of usageCallbackMap) { - const usage = /** @type {true | Set | undefined} */ ( - innerGraph.get(symbol) - ); - for (const callback of callbacks) { - callback(usage === undefined ? false : usage); - } - } -}; - -/** - * @param {ParserState} state parser state - * @param {UsageCallback} onUsageCallback on usage callback - */ -exports.onUsage = (state, onUsageCallback) => { - const innerGraphState = getState(state); - - if (innerGraphState) { - const { usageCallbackMap, currentTopLevelSymbol } = innerGraphState; - if (currentTopLevelSymbol) { - let callbacks = usageCallbackMap.get(currentTopLevelSymbol); - - if (callbacks === undefined) { - callbacks = new Set(); - usageCallbackMap.set(currentTopLevelSymbol, callbacks); - } - - callbacks.add(onUsageCallback); - } else { - onUsageCallback(true); - } - } else { - onUsageCallback(undefined); - } -}; - -/** - * @param {ParserState} state parser state - * @param {TopLevelSymbol} symbol the symbol - */ -exports.setTopLevelSymbol = (state, symbol) => { - const innerGraphState = getState(state); - - if (innerGraphState) { - innerGraphState.currentTopLevelSymbol = symbol; - } -}; - -/** - * @param {ParserState} state parser state - * @returns {TopLevelSymbol|void} usage data - */ -exports.getTopLevelSymbol = state => { - const innerGraphState = getState(state); - - if (innerGraphState) { - return innerGraphState.currentTopLevelSymbol; - } -}; - -/** - * @param {JavascriptParser} parser parser - * @param {string} name name of variable - * @returns {TopLevelSymbol} symbol - */ -exports.tagTopLevelSymbol = (parser, name) => { - const innerGraphState = getState(parser.state); - if (!innerGraphState) return; - - parser.defineVariable(name); - - const existingTag = /** @type {TopLevelSymbol} */ ( - parser.getTagData(name, topLevelSymbolTag) - ); - if (existingTag) { - return existingTag; - } - - const fn = new TopLevelSymbol(name); - parser.tagVariable(name, topLevelSymbolTag, fn); - return fn; -}; - -/** - * @param {Dependency} dependency the dependency - * @param {Set | boolean} usedByExports usedByExports info - * @param {ModuleGraph} moduleGraph moduleGraph - * @param {RuntimeSpec} runtime runtime - * @returns {boolean} false, when unused. Otherwise true - */ -exports.isDependencyUsedByExports = ( - dependency, - usedByExports, - moduleGraph, - runtime -) => { - if (usedByExports === false) return false; - if (usedByExports !== true && usedByExports !== undefined) { - const selfModule = moduleGraph.getParentModule(dependency); - const exportsInfo = moduleGraph.getExportsInfo(selfModule); - let used = false; - for (const exportName of usedByExports) { - if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) - used = true; - } - if (!used) return false; - } - return true; -}; - -/** - * @param {Dependency} dependency the dependency - * @param {Set | boolean} usedByExports usedByExports info - * @param {ModuleGraph} moduleGraph moduleGraph - * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active - */ -exports.getDependencyUsedByExportsCondition = ( - dependency, - usedByExports, - moduleGraph -) => { - if (usedByExports === false) return false; - if (usedByExports !== true && usedByExports !== undefined) { - const selfModule = moduleGraph.getParentModule(dependency); - const exportsInfo = moduleGraph.getExportsInfo(selfModule); - return (connections, runtime) => { - for (const exportName of usedByExports) { - if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) - return true; - } - return false; - }; - } - return null; -}; - -class TopLevelSymbol { - /** - * @param {string} name name of the variable - */ - constructor(name) { - this.name = name; - } -} - -exports.TopLevelSymbol = TopLevelSymbol; -exports.topLevelSymbolTag = topLevelSymbolTag; - - -/***/ }), - -/***/ 69129: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const PureExpressionDependency = __webpack_require__(72926); -const InnerGraph = __webpack_require__(39236); - -/** @typedef {import("estree").ClassDeclaration} ClassDeclarationNode */ -/** @typedef {import("estree").ClassExpression} ClassExpressionNode */ -/** @typedef {import("estree").Node} Node */ -/** @typedef {import("estree").VariableDeclarator} VariableDeclaratorNode */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../dependencies/HarmonyImportSpecifierDependency")} HarmonyImportSpecifierDependency */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ -/** @typedef {import("./InnerGraph").InnerGraph} InnerGraph */ -/** @typedef {import("./InnerGraph").TopLevelSymbol} TopLevelSymbol */ - -const { topLevelSymbolTag } = InnerGraph; - -class InnerGraphPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "InnerGraphPlugin", - (compilation, { normalModuleFactory }) => { - const logger = compilation.getLogger("webpack.InnerGraphPlugin"); - - compilation.dependencyTemplates.set( - PureExpressionDependency, - new PureExpressionDependency.Template() - ); - - /** - * @param {JavascriptParser} parser the parser - * @param {Object} parserOptions options - * @returns {void} - */ - const handler = (parser, parserOptions) => { - const onUsageSuper = sup => { - InnerGraph.onUsage(parser.state, usedByExports => { - switch (usedByExports) { - case undefined: - case true: - return; - default: { - const dep = new PureExpressionDependency(sup.range); - dep.loc = sup.loc; - dep.usedByExports = usedByExports; - parser.state.module.addDependency(dep); - break; - } - } - }); - }; - - parser.hooks.program.tap("InnerGraphPlugin", () => { - InnerGraph.enable(parser.state); - }); - - parser.hooks.finish.tap("InnerGraphPlugin", () => { - if (!InnerGraph.isEnabled(parser.state)) return; - - logger.time("infer dependency usage"); - InnerGraph.inferDependencyUsage(parser.state); - logger.timeAggregate("infer dependency usage"); - }); - - // During prewalking the following datastructures are filled with - // nodes that have a TopLevelSymbol assigned and - // variables are tagged with the assigned TopLevelSymbol - - // We differ 3 types of nodes: - // 1. full statements (export default, function declaration) - // 2. classes (class declaration, class expression) - // 3. variable declarators (const x = ...) - - /** @type {WeakMap} */ - const statementWithTopLevelSymbol = new WeakMap(); - /** @type {WeakMap} */ - const statementPurePart = new WeakMap(); - - /** @type {WeakMap} */ - const classWithTopLevelSymbol = new WeakMap(); - - /** @type {WeakMap} */ - const declWithTopLevelSymbol = new WeakMap(); - /** @type {WeakSet} */ - const pureDeclarators = new WeakSet(); - - // The following hooks are used during prewalking: - - parser.hooks.preStatement.tap("InnerGraphPlugin", statement => { - if (!InnerGraph.isEnabled(parser.state)) return; - - if (parser.scope.topLevelScope === true) { - if (statement.type === "FunctionDeclaration") { - const name = statement.id ? statement.id.name : "*default*"; - const fn = InnerGraph.tagTopLevelSymbol(parser, name); - statementWithTopLevelSymbol.set(statement, fn); - return true; - } - } - }); - - parser.hooks.blockPreStatement.tap("InnerGraphPlugin", statement => { - if (!InnerGraph.isEnabled(parser.state)) return; - - if (parser.scope.topLevelScope === true) { - if (statement.type === "ClassDeclaration") { - const name = statement.id ? statement.id.name : "*default*"; - const fn = InnerGraph.tagTopLevelSymbol(parser, name); - classWithTopLevelSymbol.set(statement, fn); - return true; - } - if (statement.type === "ExportDefaultDeclaration") { - const name = "*default*"; - const fn = InnerGraph.tagTopLevelSymbol(parser, name); - const decl = statement.declaration; - if ( - decl.type === "ClassExpression" || - decl.type === "ClassDeclaration" - ) { - classWithTopLevelSymbol.set(decl, fn); - } else if (parser.isPure(decl, statement.range[0])) { - statementWithTopLevelSymbol.set(statement, fn); - if ( - !decl.type.endsWith("FunctionExpression") && - !decl.type.endsWith("Declaration") && - decl.type !== "Literal" - ) { - statementPurePart.set(statement, decl); - } - } - } - } - }); - - parser.hooks.preDeclarator.tap( - "InnerGraphPlugin", - (decl, statement) => { - if (!InnerGraph.isEnabled(parser.state)) return; - if ( - parser.scope.topLevelScope === true && - decl.init && - decl.id.type === "Identifier" - ) { - const name = decl.id.name; - if (decl.init.type === "ClassExpression") { - const fn = InnerGraph.tagTopLevelSymbol(parser, name); - classWithTopLevelSymbol.set(decl.init, fn); - } else if (parser.isPure(decl.init, decl.id.range[1])) { - const fn = InnerGraph.tagTopLevelSymbol(parser, name); - declWithTopLevelSymbol.set(decl, fn); - if ( - !decl.init.type.endsWith("FunctionExpression") && - decl.init.type !== "Literal" - ) { - pureDeclarators.add(decl); - } - return true; - } - } - } - ); - - // During real walking we set the TopLevelSymbol state to the assigned - // TopLevelSymbol by using the fill datastructures. - - // In addition to tracking TopLevelSymbols, we sometimes need to - // add a PureExpressionDependency. This is needed to skip execution - // of pure expressions, even when they are not dropped due to - // minimizing. Otherwise symbols used there might not exist anymore - // as they are removed as unused by this optimization - - // When we find a reference to a TopLevelSymbol, we register a - // TopLevelSymbol dependency from TopLevelSymbol in state to the - // referenced TopLevelSymbol. This way we get a graph of all - // TopLevelSymbols. - - // The following hooks are called during walking: - - parser.hooks.statement.tap("InnerGraphPlugin", statement => { - if (!InnerGraph.isEnabled(parser.state)) return; - if (parser.scope.topLevelScope === true) { - InnerGraph.setTopLevelSymbol(parser.state, undefined); - - const fn = statementWithTopLevelSymbol.get(statement); - if (fn) { - InnerGraph.setTopLevelSymbol(parser.state, fn); - const purePart = statementPurePart.get(statement); - if (purePart) { - InnerGraph.onUsage(parser.state, usedByExports => { - switch (usedByExports) { - case undefined: - case true: - return; - default: { - const dep = new PureExpressionDependency( - purePart.range - ); - dep.loc = statement.loc; - dep.usedByExports = usedByExports; - parser.state.module.addDependency(dep); - break; - } - } - }); - } - } - } - }); - - parser.hooks.classExtendsExpression.tap( - "InnerGraphPlugin", - (expr, statement) => { - if (!InnerGraph.isEnabled(parser.state)) return; - if (parser.scope.topLevelScope === true) { - const fn = classWithTopLevelSymbol.get(statement); - if ( - fn && - parser.isPure( - expr, - statement.id ? statement.id.range[1] : statement.range[0] - ) - ) { - InnerGraph.setTopLevelSymbol(parser.state, fn); - onUsageSuper(expr); - } - } - } - ); - - parser.hooks.classBodyElement.tap( - "InnerGraphPlugin", - (element, classDefinition) => { - if (!InnerGraph.isEnabled(parser.state)) return; - if (parser.scope.topLevelScope === true) { - const fn = classWithTopLevelSymbol.get(classDefinition); - if (fn) { - InnerGraph.setTopLevelSymbol(parser.state, undefined); - } - } - } - ); - - parser.hooks.classBodyValue.tap( - "InnerGraphPlugin", - (expression, element, classDefinition) => { - if (!InnerGraph.isEnabled(parser.state)) return; - if (parser.scope.topLevelScope === true) { - const fn = classWithTopLevelSymbol.get(classDefinition); - if (fn) { - if ( - !element.static || - parser.isPure( - expression, - element.key ? element.key.range[1] : element.range[0] - ) - ) { - InnerGraph.setTopLevelSymbol(parser.state, fn); - if (element.type !== "MethodDefinition" && element.static) { - InnerGraph.onUsage(parser.state, usedByExports => { - switch (usedByExports) { - case undefined: - case true: - return; - default: { - const dep = new PureExpressionDependency( - expression.range - ); - dep.loc = expression.loc; - dep.usedByExports = usedByExports; - parser.state.module.addDependency(dep); - break; - } - } - }); - } - } else { - InnerGraph.setTopLevelSymbol(parser.state, undefined); - } - } - } - } - ); - - parser.hooks.declarator.tap("InnerGraphPlugin", (decl, statement) => { - if (!InnerGraph.isEnabled(parser.state)) return; - const fn = declWithTopLevelSymbol.get(decl); - - if (fn) { - InnerGraph.setTopLevelSymbol(parser.state, fn); - if (pureDeclarators.has(decl)) { - if (decl.init.type === "ClassExpression") { - if (decl.init.superClass) { - onUsageSuper(decl.init.superClass); - } - } else { - InnerGraph.onUsage(parser.state, usedByExports => { - switch (usedByExports) { - case undefined: - case true: - return; - default: { - const dep = new PureExpressionDependency( - decl.init.range - ); - dep.loc = decl.loc; - dep.usedByExports = usedByExports; - parser.state.module.addDependency(dep); - break; - } - } - }); - } - } - parser.walkExpression(decl.init); - InnerGraph.setTopLevelSymbol(parser.state, undefined); - return true; - } - }); - - parser.hooks.expression - .for(topLevelSymbolTag) - .tap("InnerGraphPlugin", () => { - const topLevelSymbol = /** @type {TopLevelSymbol} */ ( - parser.currentTagData - ); - const currentTopLevelSymbol = InnerGraph.getTopLevelSymbol( - parser.state - ); - InnerGraph.addUsage( - parser.state, - topLevelSymbol, - currentTopLevelSymbol || true - ); - }); - parser.hooks.assign - .for(topLevelSymbolTag) - .tap("InnerGraphPlugin", expr => { - if (!InnerGraph.isEnabled(parser.state)) return; - if (expr.operator === "=") return true; - }); - }; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("InnerGraphPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("InnerGraphPlugin", handler); - - compilation.hooks.finishModules.tap("InnerGraphPlugin", () => { - logger.timeAggregateEnd("infer dependency usage"); - }); - } - ); - } -} - -module.exports = InnerGraphPlugin; - - -/***/ }), - -/***/ 96049: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_ADVANCED } = __webpack_require__(6267); -const LazyBucketSortedSet = __webpack_require__(57126); -const { compareChunks } = __webpack_require__(58792); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../../declarations/plugins/optimize/LimitChunkCountPlugin").LimitChunkCountPluginOptions} LimitChunkCountPluginOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(91113), - () => __webpack_require__(35041), - { - name: "Limit Chunk Count Plugin", - baseDataPath: "options" - } -); - -/** - * @typedef {Object} ChunkCombination - * @property {boolean} deleted this is set to true when combination was removed - * @property {number} sizeDiff - * @property {number} integratedSize - * @property {Chunk} a - * @property {Chunk} b - * @property {number} aIdx - * @property {number} bIdx - * @property {number} aSize - * @property {number} bSize - */ - -const addToSetMap = (map, key, value) => { - const set = map.get(key); - if (set === undefined) { - map.set(key, new Set([value])); - } else { - set.add(value); - } -}; - -class LimitChunkCountPlugin { - /** - * @param {LimitChunkCountPluginOptions=} options options object - */ - constructor(options) { - validate(options); - this.options = options; - } - - /** - * @param {Compiler} compiler the webpack compiler - * @returns {void} - */ - apply(compiler) { - const options = this.options; - compiler.hooks.compilation.tap("LimitChunkCountPlugin", compilation => { - compilation.hooks.optimizeChunks.tap( - { - name: "LimitChunkCountPlugin", - stage: STAGE_ADVANCED - }, - chunks => { - const chunkGraph = compilation.chunkGraph; - const maxChunks = options.maxChunks; - if (!maxChunks) return; - if (maxChunks < 1) return; - if (compilation.chunks.size <= maxChunks) return; - - let remainingChunksToMerge = compilation.chunks.size - maxChunks; - - // order chunks in a deterministic way - const compareChunksWithGraph = compareChunks(chunkGraph); - const orderedChunks = Array.from(chunks).sort(compareChunksWithGraph); - - // create a lazy sorted data structure to keep all combinations - // this is large. Size = chunks * (chunks - 1) / 2 - // It uses a multi layer bucket sort plus normal sort in the last layer - // It's also lazy so only accessed buckets are sorted - const combinations = new LazyBucketSortedSet( - // Layer 1: ordered by largest size benefit - c => c.sizeDiff, - (a, b) => b - a, - // Layer 2: ordered by smallest combined size - c => c.integratedSize, - (a, b) => a - b, - // Layer 3: ordered by position difference in orderedChunk (-> to be deterministic) - c => c.bIdx - c.aIdx, - (a, b) => a - b, - // Layer 4: ordered by position in orderedChunk (-> to be deterministic) - (a, b) => a.bIdx - b.bIdx - ); - - // we keep a mapping from chunk to all combinations - // but this mapping is not kept up-to-date with deletions - // so `deleted` flag need to be considered when iterating this - /** @type {Map>} */ - const combinationsByChunk = new Map(); - - orderedChunks.forEach((b, bIdx) => { - // create combination pairs with size and integrated size - for (let aIdx = 0; aIdx < bIdx; aIdx++) { - const a = orderedChunks[aIdx]; - // filter pairs that can not be integrated! - if (!chunkGraph.canChunksBeIntegrated(a, b)) continue; - - const integratedSize = chunkGraph.getIntegratedChunksSize( - a, - b, - options - ); - - const aSize = chunkGraph.getChunkSize(a, options); - const bSize = chunkGraph.getChunkSize(b, options); - const c = { - deleted: false, - sizeDiff: aSize + bSize - integratedSize, - integratedSize, - a, - b, - aIdx, - bIdx, - aSize, - bSize - }; - combinations.add(c); - addToSetMap(combinationsByChunk, a, c); - addToSetMap(combinationsByChunk, b, c); - } - return combinations; - }); - - // list of modified chunks during this run - // combinations affected by this change are skipped to allow - // further optimizations - /** @type {Set} */ - const modifiedChunks = new Set(); - - let changed = false; - // eslint-disable-next-line no-constant-condition - loop: while (true) { - const combination = combinations.popFirst(); - if (combination === undefined) break; - - combination.deleted = true; - const { a, b, integratedSize } = combination; - - // skip over pair when - // one of the already merged chunks is a parent of one of the chunks - if (modifiedChunks.size > 0) { - const queue = new Set(a.groupsIterable); - for (const group of b.groupsIterable) { - queue.add(group); - } - for (const group of queue) { - for (const mChunk of modifiedChunks) { - if (mChunk !== a && mChunk !== b && mChunk.isInGroup(group)) { - // This is a potential pair which needs recalculation - // We can't do that now, but it merge before following pairs - // so we leave space for it, and consider chunks as modified - // just for the worse case - remainingChunksToMerge--; - if (remainingChunksToMerge <= 0) break loop; - modifiedChunks.add(a); - modifiedChunks.add(b); - continue loop; - } - } - for (const parent of group.parentsIterable) { - queue.add(parent); - } - } - } - - // merge the chunks - if (chunkGraph.canChunksBeIntegrated(a, b)) { - chunkGraph.integrateChunks(a, b); - compilation.chunks.delete(b); - - // flag chunk a as modified as further optimization are possible for all children here - modifiedChunks.add(a); - - changed = true; - remainingChunksToMerge--; - if (remainingChunksToMerge <= 0) break; - - // Update all affected combinations - // delete all combination with the removed chunk - // we will use combinations with the kept chunk instead - for (const combination of combinationsByChunk.get(a)) { - if (combination.deleted) continue; - combination.deleted = true; - combinations.delete(combination); - } - - // Update combinations with the kept chunk with new sizes - for (const combination of combinationsByChunk.get(b)) { - if (combination.deleted) continue; - if (combination.a === b) { - if (!chunkGraph.canChunksBeIntegrated(a, combination.b)) { - combination.deleted = true; - combinations.delete(combination); - continue; - } - // Update size - const newIntegratedSize = chunkGraph.getIntegratedChunksSize( - a, - combination.b, - options - ); - const finishUpdate = combinations.startUpdate(combination); - combination.a = a; - combination.integratedSize = newIntegratedSize; - combination.aSize = integratedSize; - combination.sizeDiff = - combination.bSize + integratedSize - newIntegratedSize; - finishUpdate(); - } else if (combination.b === b) { - if (!chunkGraph.canChunksBeIntegrated(combination.a, a)) { - combination.deleted = true; - combinations.delete(combination); - continue; - } - // Update size - const newIntegratedSize = chunkGraph.getIntegratedChunksSize( - combination.a, - a, - options - ); - - const finishUpdate = combinations.startUpdate(combination); - combination.b = a; - combination.integratedSize = newIntegratedSize; - combination.bSize = integratedSize; - combination.sizeDiff = - integratedSize + combination.aSize - newIntegratedSize; - finishUpdate(); - } - } - combinationsByChunk.set(a, combinationsByChunk.get(b)); - combinationsByChunk.delete(b); - } - } - if (changed) return true; - } - ); - }); - } -} -module.exports = LimitChunkCountPlugin; - - -/***/ }), - -/***/ 41199: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { UsageState } = __webpack_require__(13168); -const { - numberToIdentifier, - NUMBER_OF_IDENTIFIER_START_CHARS, - NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS -} = __webpack_require__(43841); -const { assignDeterministicIds } = __webpack_require__(76283); -const { compareSelect, compareStringsNumeric } = __webpack_require__(58792); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../ExportsInfo")} ExportsInfo */ -/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ - -/** - * @param {ExportsInfo} exportsInfo exports info - * @returns {boolean} mangle is possible - */ -const canMangle = exportsInfo => { - if (exportsInfo.otherExportsInfo.getUsed(undefined) !== UsageState.Unused) - return false; - let hasSomethingToMangle = false; - for (const exportInfo of exportsInfo.exports) { - if (exportInfo.canMangle === true) { - hasSomethingToMangle = true; - } - } - return hasSomethingToMangle; -}; - -// Sort by name -const comparator = compareSelect(e => e.name, compareStringsNumeric); -/** - * @param {boolean} deterministic use deterministic names - * @param {ExportsInfo} exportsInfo exports info - * @param {boolean} isNamespace is namespace object - * @returns {void} - */ -const mangleExportsInfo = (deterministic, exportsInfo, isNamespace) => { - if (!canMangle(exportsInfo)) return; - const usedNames = new Set(); - /** @type {ExportInfo[]} */ - const mangleableExports = []; - - // Avoid to renamed exports that are not provided when - // 1. it's not a namespace export: non-provided exports can be found in prototype chain - // 2. there are other provided exports and deterministic mode is chosen: - // non-provided exports would break the determinism - let avoidMangleNonProvided = !isNamespace; - if (!avoidMangleNonProvided && deterministic) { - for (const exportInfo of exportsInfo.ownedExports) { - if (exportInfo.provided !== false) { - avoidMangleNonProvided = true; - break; - } - } - } - for (const exportInfo of exportsInfo.ownedExports) { - const name = exportInfo.name; - if (!exportInfo.hasUsedName()) { - if ( - // Can the export be mangled? - exportInfo.canMangle !== true || - // Never rename 1 char exports - (name.length === 1 && /^[a-zA-Z0-9_$]/.test(name)) || - // Don't rename 2 char exports in deterministic mode - (deterministic && - name.length === 2 && - /^[a-zA-Z_$][a-zA-Z0-9_$]|^[1-9][0-9]/.test(name)) || - // Don't rename exports that are not provided - (avoidMangleNonProvided && exportInfo.provided !== true) - ) { - exportInfo.setUsedName(name); - usedNames.add(name); - } else { - mangleableExports.push(exportInfo); - } - } - if (exportInfo.exportsInfoOwned) { - const used = exportInfo.getUsed(undefined); - if ( - used === UsageState.OnlyPropertiesUsed || - used === UsageState.Unused - ) { - mangleExportsInfo(deterministic, exportInfo.exportsInfo, false); - } - } - } - if (deterministic) { - assignDeterministicIds( - mangleableExports, - e => e.name, - comparator, - (e, id) => { - const name = numberToIdentifier(id); - const size = usedNames.size; - usedNames.add(name); - if (size === usedNames.size) return false; - e.setUsedName(name); - return true; - }, - [ - NUMBER_OF_IDENTIFIER_START_CHARS, - NUMBER_OF_IDENTIFIER_START_CHARS * - NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS - ], - NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS, - usedNames.size - ); - } else { - const usedExports = []; - const unusedExports = []; - for (const exportInfo of mangleableExports) { - if (exportInfo.getUsed(undefined) === UsageState.Unused) { - unusedExports.push(exportInfo); - } else { - usedExports.push(exportInfo); - } - } - usedExports.sort(comparator); - unusedExports.sort(comparator); - let i = 0; - for (const list of [usedExports, unusedExports]) { - for (const exportInfo of list) { - let name; - do { - name = numberToIdentifier(i++); - } while (usedNames.has(name)); - exportInfo.setUsedName(name); - } - } - } -}; - -class MangleExportsPlugin { - /** - * @param {boolean} deterministic use deterministic names - */ - constructor(deterministic) { - this._deterministic = deterministic; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _deterministic: deterministic } = this; - compiler.hooks.compilation.tap("MangleExportsPlugin", compilation => { - const moduleGraph = compilation.moduleGraph; - compilation.hooks.optimizeCodeGeneration.tap( - "MangleExportsPlugin", - modules => { - if (compilation.moduleMemCaches) { - throw new Error( - "optimization.mangleExports can't be used with cacheUnaffected as export mangling is a global effect" - ); - } - for (const module of modules) { - const isNamespace = - module.buildMeta && module.buildMeta.exportsType === "namespace"; - const exportsInfo = moduleGraph.getExportsInfo(module); - mangleExportsInfo(deterministic, exportsInfo, isNamespace); - } - } - ); - }); - } -} - -module.exports = MangleExportsPlugin; - - -/***/ }), - -/***/ 88831: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_BASIC } = __webpack_require__(6267); -const { runtimeEqual } = __webpack_require__(47462); - -/** @typedef {import("../Compiler")} Compiler */ - -class MergeDuplicateChunksPlugin { - /** - * @param {Compiler} compiler the compiler - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "MergeDuplicateChunksPlugin", - compilation => { - compilation.hooks.optimizeChunks.tap( - { - name: "MergeDuplicateChunksPlugin", - stage: STAGE_BASIC - }, - chunks => { - const { chunkGraph, moduleGraph } = compilation; - - // remember already tested chunks for performance - const notDuplicates = new Set(); - - // for each chunk - for (const chunk of chunks) { - // track a Set of all chunk that could be duplicates - let possibleDuplicates; - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (possibleDuplicates === undefined) { - // when possibleDuplicates is not yet set, - // create a new Set from chunks of the current module - // including only chunks with the same number of modules - for (const dup of chunkGraph.getModuleChunksIterable( - module - )) { - if ( - dup !== chunk && - chunkGraph.getNumberOfChunkModules(chunk) === - chunkGraph.getNumberOfChunkModules(dup) && - !notDuplicates.has(dup) - ) { - // delay allocating the new Set until here, reduce memory pressure - if (possibleDuplicates === undefined) { - possibleDuplicates = new Set(); - } - possibleDuplicates.add(dup); - } - } - // when no chunk is possible we can break here - if (possibleDuplicates === undefined) break; - } else { - // validate existing possible duplicates - for (const dup of possibleDuplicates) { - // remove possible duplicate when module is not contained - if (!chunkGraph.isModuleInChunk(module, dup)) { - possibleDuplicates.delete(dup); - } - } - // when all chunks has been removed we can break here - if (possibleDuplicates.size === 0) break; - } - } - - // when we found duplicates - if ( - possibleDuplicates !== undefined && - possibleDuplicates.size > 0 - ) { - outer: for (const otherChunk of possibleDuplicates) { - if (otherChunk.hasRuntime() !== chunk.hasRuntime()) continue; - if (chunkGraph.getNumberOfEntryModules(chunk) > 0) continue; - if (chunkGraph.getNumberOfEntryModules(otherChunk) > 0) - continue; - if (!runtimeEqual(chunk.runtime, otherChunk.runtime)) { - for (const module of chunkGraph.getChunkModulesIterable( - chunk - )) { - const exportsInfo = moduleGraph.getExportsInfo(module); - if ( - !exportsInfo.isEquallyUsed( - chunk.runtime, - otherChunk.runtime - ) - ) { - continue outer; - } - } - } - // merge them - if (chunkGraph.canChunksBeIntegrated(chunk, otherChunk)) { - chunkGraph.integrateChunks(chunk, otherChunk); - compilation.chunks.delete(otherChunk); - } - } - } - - // don't check already processed chunks twice - notDuplicates.add(chunk); - } - } - ); - } - ); - } -} -module.exports = MergeDuplicateChunksPlugin; - - -/***/ }), - -/***/ 37434: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_ADVANCED } = __webpack_require__(6267); -const createSchemaValidation = __webpack_require__(89699); - -/** @typedef {import("../../declarations/plugins/optimize/MinChunkSizePlugin").MinChunkSizePluginOptions} MinChunkSizePluginOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(927), - () => __webpack_require__(72649), - { - name: "Min Chunk Size Plugin", - baseDataPath: "options" - } -); - -class MinChunkSizePlugin { - /** - * @param {MinChunkSizePluginOptions} options options object - */ - constructor(options) { - validate(options); - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - const minChunkSize = options.minChunkSize; - compiler.hooks.compilation.tap("MinChunkSizePlugin", compilation => { - compilation.hooks.optimizeChunks.tap( - { - name: "MinChunkSizePlugin", - stage: STAGE_ADVANCED - }, - chunks => { - const chunkGraph = compilation.chunkGraph; - const equalOptions = { - chunkOverhead: 1, - entryChunkMultiplicator: 1 - }; - - const chunkSizesMap = new Map(); - /** @type {[Chunk, Chunk][]} */ - const combinations = []; - /** @type {Chunk[]} */ - const smallChunks = []; - const visitedChunks = []; - for (const a of chunks) { - // check if one of the chunks sizes is smaller than the minChunkSize - // and filter pairs that can NOT be integrated! - if (chunkGraph.getChunkSize(a, equalOptions) < minChunkSize) { - smallChunks.push(a); - for (const b of visitedChunks) { - if (chunkGraph.canChunksBeIntegrated(b, a)) - combinations.push([b, a]); - } - } else { - for (const b of smallChunks) { - if (chunkGraph.canChunksBeIntegrated(b, a)) - combinations.push([b, a]); - } - } - chunkSizesMap.set(a, chunkGraph.getChunkSize(a, options)); - visitedChunks.push(a); - } - - const sortedSizeFilteredExtendedPairCombinations = combinations - .map(pair => { - // extend combination pairs with size and integrated size - const a = chunkSizesMap.get(pair[0]); - const b = chunkSizesMap.get(pair[1]); - const ab = chunkGraph.getIntegratedChunksSize( - pair[0], - pair[1], - options - ); - /** @type {[number, number, Chunk, Chunk]} */ - const extendedPair = [a + b - ab, ab, pair[0], pair[1]]; - return extendedPair; - }) - .sort((a, b) => { - // sadly javascript does an in place sort here - // sort by size - const diff = b[0] - a[0]; - if (diff !== 0) return diff; - return a[1] - b[1]; - }); - - if (sortedSizeFilteredExtendedPairCombinations.length === 0) return; - - const pair = sortedSizeFilteredExtendedPairCombinations[0]; - - chunkGraph.integrateChunks(pair[2], pair[3]); - compilation.chunks.delete(pair[3]); - return true; - } - ); - }); - } -} -module.exports = MinChunkSizePlugin; - - -/***/ }), - -/***/ 45337: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const SizeFormatHelpers = __webpack_require__(67309); -const WebpackError = __webpack_require__(27154); - -class MinMaxSizeWarning extends WebpackError { - constructor(keys, minSize, maxSize) { - let keysMessage = "Fallback cache group"; - if (keys) { - keysMessage = - keys.length > 1 - ? `Cache groups ${keys.sort().join(", ")}` - : `Cache group ${keys[0]}`; - } - super( - `SplitChunksPlugin\n` + - `${keysMessage}\n` + - `Configured minSize (${SizeFormatHelpers.formatSize(minSize)}) is ` + - `bigger than maxSize (${SizeFormatHelpers.formatSize(maxSize)}).\n` + - "This seem to be a invalid optimization.splitChunks configuration." - ); - } -} - -module.exports = MinMaxSizeWarning; - - -/***/ }), - -/***/ 5279: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const asyncLib = __webpack_require__(78175); -const ChunkGraph = __webpack_require__(75449); -const ModuleGraph = __webpack_require__(13487); -const { STAGE_DEFAULT } = __webpack_require__(6267); -const HarmonyImportDependency = __webpack_require__(58668); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const { - intersectRuntime, - mergeRuntimeOwned, - filterRuntime, - runtimeToString, - mergeRuntime -} = __webpack_require__(47462); -const ConcatenatedModule = __webpack_require__(4272); - -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** - * @typedef {Object} Statistics - * @property {number} cached - * @property {number} alreadyInConfig - * @property {number} invalidModule - * @property {number} incorrectChunks - * @property {number} incorrectDependency - * @property {number} incorrectModuleDependency - * @property {number} incorrectChunksOfImporter - * @property {number} incorrectRuntimeCondition - * @property {number} importerFailed - * @property {number} added - */ - -const formatBailoutReason = msg => { - return "ModuleConcatenation bailout: " + msg; -}; - -class ModuleConcatenationPlugin { - constructor(options) { - if (typeof options !== "object") options = {}; - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { _backCompat: backCompat } = compiler; - compiler.hooks.compilation.tap("ModuleConcatenationPlugin", compilation => { - if (compilation.moduleMemCaches) { - throw new Error( - "optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect" - ); - } - const moduleGraph = compilation.moduleGraph; - const bailoutReasonMap = new Map(); - - const setBailoutReason = (module, reason) => { - setInnerBailoutReason(module, reason); - moduleGraph - .getOptimizationBailout(module) - .push( - typeof reason === "function" - ? rs => formatBailoutReason(reason(rs)) - : formatBailoutReason(reason) - ); - }; - - const setInnerBailoutReason = (module, reason) => { - bailoutReasonMap.set(module, reason); - }; - - const getInnerBailoutReason = (module, requestShortener) => { - const reason = bailoutReasonMap.get(module); - if (typeof reason === "function") return reason(requestShortener); - return reason; - }; - - const formatBailoutWarning = (module, problem) => requestShortener => { - if (typeof problem === "function") { - return formatBailoutReason( - `Cannot concat with ${module.readableIdentifier( - requestShortener - )}: ${problem(requestShortener)}` - ); - } - const reason = getInnerBailoutReason(module, requestShortener); - const reasonWithPrefix = reason ? `: ${reason}` : ""; - if (module === problem) { - return formatBailoutReason( - `Cannot concat with ${module.readableIdentifier( - requestShortener - )}${reasonWithPrefix}` - ); - } else { - return formatBailoutReason( - `Cannot concat with ${module.readableIdentifier( - requestShortener - )} because of ${problem.readableIdentifier( - requestShortener - )}${reasonWithPrefix}` - ); - } - }; - - compilation.hooks.optimizeChunkModules.tapAsync( - { - name: "ModuleConcatenationPlugin", - stage: STAGE_DEFAULT - }, - (allChunks, modules, callback) => { - const logger = compilation.getLogger( - "webpack.ModuleConcatenationPlugin" - ); - const { chunkGraph, moduleGraph } = compilation; - const relevantModules = []; - const possibleInners = new Set(); - const context = { - chunkGraph, - moduleGraph - }; - logger.time("select relevant modules"); - for (const module of modules) { - let canBeRoot = true; - let canBeInner = true; - - const bailoutReason = module.getConcatenationBailoutReason(context); - if (bailoutReason) { - setBailoutReason(module, bailoutReason); - continue; - } - - // Must not be an async module - if (moduleGraph.isAsync(module)) { - setBailoutReason(module, `Module is async`); - continue; - } - - // Must be in strict mode - if (!module.buildInfo.strict) { - setBailoutReason(module, `Module is not in strict mode`); - continue; - } - - // Module must be in any chunk (we don't want to do useless work) - if (chunkGraph.getNumberOfModuleChunks(module) === 0) { - setBailoutReason(module, "Module is not in any chunk"); - continue; - } - - // Exports must be known (and not dynamic) - const exportsInfo = moduleGraph.getExportsInfo(module); - const relevantExports = exportsInfo.getRelevantExports(undefined); - const unknownReexports = relevantExports.filter(exportInfo => { - return ( - exportInfo.isReexport() && !exportInfo.getTarget(moduleGraph) - ); - }); - if (unknownReexports.length > 0) { - setBailoutReason( - module, - `Reexports in this module do not have a static target (${Array.from( - unknownReexports, - exportInfo => - `${ - exportInfo.name || "other exports" - }: ${exportInfo.getUsedInfo()}` - ).join(", ")})` - ); - continue; - } - - // Root modules must have a static list of exports - const unknownProvidedExports = relevantExports.filter( - exportInfo => { - return exportInfo.provided !== true; - } - ); - if (unknownProvidedExports.length > 0) { - setBailoutReason( - module, - `List of module exports is dynamic (${Array.from( - unknownProvidedExports, - exportInfo => - `${ - exportInfo.name || "other exports" - }: ${exportInfo.getProvidedInfo()} and ${exportInfo.getUsedInfo()}` - ).join(", ")})` - ); - canBeRoot = false; - } - - // Module must not be an entry point - if (chunkGraph.isEntryModule(module)) { - setInnerBailoutReason(module, "Module is an entry point"); - canBeInner = false; - } - - if (canBeRoot) relevantModules.push(module); - if (canBeInner) possibleInners.add(module); - } - logger.timeEnd("select relevant modules"); - logger.debug( - `${relevantModules.length} potential root modules, ${possibleInners.size} potential inner modules` - ); - // sort by depth - // modules with lower depth are more likely suited as roots - // this improves performance, because modules already selected as inner are skipped - logger.time("sort relevant modules"); - relevantModules.sort((a, b) => { - return moduleGraph.getDepth(a) - moduleGraph.getDepth(b); - }); - logger.timeEnd("sort relevant modules"); - - /** @type {Statistics} */ - const stats = { - cached: 0, - alreadyInConfig: 0, - invalidModule: 0, - incorrectChunks: 0, - incorrectDependency: 0, - incorrectModuleDependency: 0, - incorrectChunksOfImporter: 0, - incorrectRuntimeCondition: 0, - importerFailed: 0, - added: 0 - }; - let statsCandidates = 0; - let statsSizeSum = 0; - let statsEmptyConfigurations = 0; - - logger.time("find modules to concatenate"); - const concatConfigurations = []; - const usedAsInner = new Set(); - for (const currentRoot of relevantModules) { - // when used by another configuration as inner: - // the other configuration is better and we can skip this one - // TODO reconsider that when it's only used in a different runtime - if (usedAsInner.has(currentRoot)) continue; - - let chunkRuntime = undefined; - for (const r of chunkGraph.getModuleRuntimes(currentRoot)) { - chunkRuntime = mergeRuntimeOwned(chunkRuntime, r); - } - const exportsInfo = moduleGraph.getExportsInfo(currentRoot); - const filteredRuntime = filterRuntime(chunkRuntime, r => - exportsInfo.isModuleUsed(r) - ); - const activeRuntime = - filteredRuntime === true - ? chunkRuntime - : filteredRuntime === false - ? undefined - : filteredRuntime; - - // create a configuration with the root - const currentConfiguration = new ConcatConfiguration( - currentRoot, - activeRuntime - ); - - // cache failures to add modules - const failureCache = new Map(); - - // potential optional import candidates - /** @type {Set} */ - const candidates = new Set(); - - // try to add all imports - for (const imp of this._getImports( - compilation, - currentRoot, - activeRuntime - )) { - candidates.add(imp); - } - - for (const imp of candidates) { - const impCandidates = new Set(); - const problem = this._tryToAdd( - compilation, - currentConfiguration, - imp, - chunkRuntime, - activeRuntime, - possibleInners, - impCandidates, - failureCache, - chunkGraph, - true, - stats - ); - if (problem) { - failureCache.set(imp, problem); - currentConfiguration.addWarning(imp, problem); - } else { - for (const c of impCandidates) { - candidates.add(c); - } - } - } - statsCandidates += candidates.size; - if (!currentConfiguration.isEmpty()) { - const modules = currentConfiguration.getModules(); - statsSizeSum += modules.size; - concatConfigurations.push(currentConfiguration); - for (const module of modules) { - if (module !== currentConfiguration.rootModule) { - usedAsInner.add(module); - } - } - } else { - statsEmptyConfigurations++; - const optimizationBailouts = - moduleGraph.getOptimizationBailout(currentRoot); - for (const warning of currentConfiguration.getWarningsSorted()) { - optimizationBailouts.push( - formatBailoutWarning(warning[0], warning[1]) - ); - } - } - } - logger.timeEnd("find modules to concatenate"); - logger.debug( - `${ - concatConfigurations.length - } successful concat configurations (avg size: ${ - statsSizeSum / concatConfigurations.length - }), ${statsEmptyConfigurations} bailed out completely` - ); - logger.debug( - `${statsCandidates} candidates were considered for adding (${stats.cached} cached failure, ${stats.alreadyInConfig} already in config, ${stats.invalidModule} invalid module, ${stats.incorrectChunks} incorrect chunks, ${stats.incorrectDependency} incorrect dependency, ${stats.incorrectChunksOfImporter} incorrect chunks of importer, ${stats.incorrectModuleDependency} incorrect module dependency, ${stats.incorrectRuntimeCondition} incorrect runtime condition, ${stats.importerFailed} importer failed, ${stats.added} added)` - ); - // HACK: Sort configurations by length and start with the longest one - // to get the biggest groups possible. Used modules are marked with usedModules - // TODO: Allow to reuse existing configuration while trying to add dependencies. - // This would improve performance. O(n^2) -> O(n) - logger.time(`sort concat configurations`); - concatConfigurations.sort((a, b) => { - return b.modules.size - a.modules.size; - }); - logger.timeEnd(`sort concat configurations`); - const usedModules = new Set(); - - logger.time("create concatenated modules"); - asyncLib.each( - concatConfigurations, - (concatConfiguration, callback) => { - const rootModule = concatConfiguration.rootModule; - - // Avoid overlapping configurations - // TODO: remove this when todo above is fixed - if (usedModules.has(rootModule)) return callback(); - const modules = concatConfiguration.getModules(); - for (const m of modules) { - usedModules.add(m); - } - - // Create a new ConcatenatedModule - let newModule = ConcatenatedModule.create( - rootModule, - modules, - concatConfiguration.runtime, - compiler.root, - compilation.outputOptions.hashFunction - ); - - const build = () => { - newModule.build( - compiler.options, - compilation, - null, - null, - err => { - if (err) { - if (!err.module) { - err.module = newModule; - } - return callback(err); - } - integrate(); - } - ); - }; - - const integrate = () => { - if (backCompat) { - ChunkGraph.setChunkGraphForModule(newModule, chunkGraph); - ModuleGraph.setModuleGraphForModule(newModule, moduleGraph); - } - - for (const warning of concatConfiguration.getWarningsSorted()) { - moduleGraph - .getOptimizationBailout(newModule) - .push(formatBailoutWarning(warning[0], warning[1])); - } - moduleGraph.cloneModuleAttributes(rootModule, newModule); - for (const m of modules) { - // add to builtModules when one of the included modules was built - if (compilation.builtModules.has(m)) { - compilation.builtModules.add(newModule); - } - if (m !== rootModule) { - // attach external references to the concatenated module too - moduleGraph.copyOutgoingModuleConnections( - m, - newModule, - c => { - return ( - c.originModule === m && - !( - c.dependency instanceof HarmonyImportDependency && - modules.has(c.module) - ) - ); - } - ); - // remove module from chunk - for (const chunk of chunkGraph.getModuleChunksIterable( - rootModule - )) { - const sourceTypes = chunkGraph.getChunkModuleSourceTypes( - chunk, - m - ); - if (sourceTypes.size === 1) { - chunkGraph.disconnectChunkAndModule(chunk, m); - } else { - const newSourceTypes = new Set(sourceTypes); - newSourceTypes.delete("javascript"); - chunkGraph.setChunkModuleSourceTypes( - chunk, - m, - newSourceTypes - ); - } - } - } - } - compilation.modules.delete(rootModule); - ChunkGraph.clearChunkGraphForModule(rootModule); - ModuleGraph.clearModuleGraphForModule(rootModule); - - // remove module from chunk - chunkGraph.replaceModule(rootModule, newModule); - // replace module references with the concatenated module - moduleGraph.moveModuleConnections(rootModule, newModule, c => { - const otherModule = - c.module === rootModule ? c.originModule : c.module; - const innerConnection = - c.dependency instanceof HarmonyImportDependency && - modules.has(otherModule); - return !innerConnection; - }); - // add concatenated module to the compilation - compilation.modules.add(newModule); - - callback(); - }; - - build(); - }, - err => { - logger.timeEnd("create concatenated modules"); - process.nextTick(callback.bind(null, err)); - } - ); - } - ); - }); - } - - /** - * @param {Compilation} compilation the compilation - * @param {Module} module the module to be added - * @param {RuntimeSpec} runtime the runtime scope - * @returns {Set} the imported modules - */ - _getImports(compilation, module, runtime) { - const moduleGraph = compilation.moduleGraph; - const set = new Set(); - for (const dep of module.dependencies) { - // Get reference info only for harmony Dependencies - if (!(dep instanceof HarmonyImportDependency)) continue; - - const connection = moduleGraph.getConnection(dep); - // Reference is valid and has a module - if ( - !connection || - !connection.module || - !connection.isTargetActive(runtime) - ) { - continue; - } - - const importedNames = compilation.getDependencyReferencedExports( - dep, - undefined - ); - - if ( - importedNames.every(i => - Array.isArray(i) ? i.length > 0 : i.name.length > 0 - ) || - Array.isArray(moduleGraph.getProvidedExports(module)) - ) { - set.add(connection.module); - } - } - return set; - } - - /** - * @param {Compilation} compilation webpack compilation - * @param {ConcatConfiguration} config concat configuration (will be modified when added) - * @param {Module} module the module to be added - * @param {RuntimeSpec} runtime the runtime scope of the generated code - * @param {RuntimeSpec} activeRuntime the runtime scope of the root module - * @param {Set} possibleModules modules that are candidates - * @param {Set} candidates list of potential candidates (will be added to) - * @param {Map} failureCache cache for problematic modules to be more performant - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {boolean} avoidMutateOnFailure avoid mutating the config when adding fails - * @param {Statistics} statistics gathering metrics - * @returns {Module | function(RequestShortener): string} the problematic module - */ - _tryToAdd( - compilation, - config, - module, - runtime, - activeRuntime, - possibleModules, - candidates, - failureCache, - chunkGraph, - avoidMutateOnFailure, - statistics - ) { - const cacheEntry = failureCache.get(module); - if (cacheEntry) { - statistics.cached++; - return cacheEntry; - } - - // Already added? - if (config.has(module)) { - statistics.alreadyInConfig++; - return null; - } - - // Not possible to add? - if (!possibleModules.has(module)) { - statistics.invalidModule++; - failureCache.set(module, module); // cache failures for performance - return module; - } - - // Module must be in the correct chunks - const missingChunks = Array.from( - chunkGraph.getModuleChunksIterable(config.rootModule) - ).filter(chunk => !chunkGraph.isModuleInChunk(module, chunk)); - if (missingChunks.length > 0) { - const problem = requestShortener => { - const missingChunksList = Array.from( - new Set(missingChunks.map(chunk => chunk.name || "unnamed chunk(s)")) - ).sort(); - const chunks = Array.from( - new Set( - Array.from(chunkGraph.getModuleChunksIterable(module)).map( - chunk => chunk.name || "unnamed chunk(s)" - ) - ) - ).sort(); - return `Module ${module.readableIdentifier( - requestShortener - )} is not in the same chunk(s) (expected in chunk(s) ${missingChunksList.join( - ", " - )}, module is in chunk(s) ${chunks.join(", ")})`; - }; - statistics.incorrectChunks++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - - const moduleGraph = compilation.moduleGraph; - - const incomingConnections = - moduleGraph.getIncomingConnectionsByOriginModule(module); - - const incomingConnectionsFromNonModules = - incomingConnections.get(null) || incomingConnections.get(undefined); - if (incomingConnectionsFromNonModules) { - const activeNonModulesConnections = - incomingConnectionsFromNonModules.filter(connection => { - // We are not interested in inactive connections - // or connections without dependency - return connection.isActive(runtime); - }); - if (activeNonModulesConnections.length > 0) { - const problem = requestShortener => { - const importingExplanations = new Set( - activeNonModulesConnections.map(c => c.explanation).filter(Boolean) - ); - const explanations = Array.from(importingExplanations).sort(); - return `Module ${module.readableIdentifier( - requestShortener - )} is referenced ${ - explanations.length > 0 - ? `by: ${explanations.join(", ")}` - : "in an unsupported way" - }`; - }; - statistics.incorrectDependency++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - } - - /** @type {Map} */ - const incomingConnectionsFromModules = new Map(); - for (const [originModule, connections] of incomingConnections) { - if (originModule) { - // Ignore connection from orphan modules - if (chunkGraph.getNumberOfModuleChunks(originModule) === 0) continue; - - // We don't care for connections from other runtimes - let originRuntime = undefined; - for (const r of chunkGraph.getModuleRuntimes(originModule)) { - originRuntime = mergeRuntimeOwned(originRuntime, r); - } - - if (!intersectRuntime(runtime, originRuntime)) continue; - - // We are not interested in inactive connections - const activeConnections = connections.filter(connection => - connection.isActive(runtime) - ); - if (activeConnections.length > 0) - incomingConnectionsFromModules.set(originModule, activeConnections); - } - } - - const incomingModules = Array.from(incomingConnectionsFromModules.keys()); - - // Module must be in the same chunks like the referencing module - const otherChunkModules = incomingModules.filter(originModule => { - for (const chunk of chunkGraph.getModuleChunksIterable( - config.rootModule - )) { - if (!chunkGraph.isModuleInChunk(originModule, chunk)) { - return true; - } - } - return false; - }); - if (otherChunkModules.length > 0) { - const problem = requestShortener => { - const names = otherChunkModules - .map(m => m.readableIdentifier(requestShortener)) - .sort(); - return `Module ${module.readableIdentifier( - requestShortener - )} is referenced from different chunks by these modules: ${names.join( - ", " - )}`; - }; - statistics.incorrectChunksOfImporter++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - - /** @type {Map} */ - const nonHarmonyConnections = new Map(); - for (const [originModule, connections] of incomingConnectionsFromModules) { - const selected = connections.filter( - connection => - !connection.dependency || - !(connection.dependency instanceof HarmonyImportDependency) - ); - if (selected.length > 0) - nonHarmonyConnections.set(originModule, connections); - } - if (nonHarmonyConnections.size > 0) { - const problem = requestShortener => { - const names = Array.from(nonHarmonyConnections) - .map(([originModule, connections]) => { - return `${originModule.readableIdentifier( - requestShortener - )} (referenced with ${Array.from( - new Set( - connections - .map(c => c.dependency && c.dependency.type) - .filter(Boolean) - ) - ) - .sort() - .join(", ")})`; - }) - .sort(); - return `Module ${module.readableIdentifier( - requestShortener - )} is referenced from these modules with unsupported syntax: ${names.join( - ", " - )}`; - }; - statistics.incorrectModuleDependency++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - - if (runtime !== undefined && typeof runtime !== "string") { - // Module must be consistently referenced in the same runtimes - /** @type {{ originModule: Module, runtimeCondition: RuntimeSpec }[]} */ - const otherRuntimeConnections = []; - outer: for (const [ - originModule, - connections - ] of incomingConnectionsFromModules) { - /** @type {false | RuntimeSpec} */ - let currentRuntimeCondition = false; - for (const connection of connections) { - const runtimeCondition = filterRuntime(runtime, runtime => { - return connection.isTargetActive(runtime); - }); - if (runtimeCondition === false) continue; - if (runtimeCondition === true) continue outer; - if (currentRuntimeCondition !== false) { - currentRuntimeCondition = mergeRuntime( - currentRuntimeCondition, - runtimeCondition - ); - } else { - currentRuntimeCondition = runtimeCondition; - } - } - if (currentRuntimeCondition !== false) { - otherRuntimeConnections.push({ - originModule, - runtimeCondition: currentRuntimeCondition - }); - } - } - if (otherRuntimeConnections.length > 0) { - const problem = requestShortener => { - return `Module ${module.readableIdentifier( - requestShortener - )} is runtime-dependent referenced by these modules: ${Array.from( - otherRuntimeConnections, - ({ originModule, runtimeCondition }) => - `${originModule.readableIdentifier( - requestShortener - )} (expected runtime ${runtimeToString( - runtime - )}, module is only referenced in ${runtimeToString( - /** @type {RuntimeSpec} */ (runtimeCondition) - )})` - ).join(", ")}`; - }; - statistics.incorrectRuntimeCondition++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - } - - let backup; - if (avoidMutateOnFailure) { - backup = config.snapshot(); - } - - // Add the module - config.add(module); - - incomingModules.sort(compareModulesByIdentifier); - - // Every module which depends on the added module must be in the configuration too. - for (const originModule of incomingModules) { - const problem = this._tryToAdd( - compilation, - config, - originModule, - runtime, - activeRuntime, - possibleModules, - candidates, - failureCache, - chunkGraph, - false, - statistics - ); - if (problem) { - if (backup !== undefined) config.rollback(backup); - statistics.importerFailed++; - failureCache.set(module, problem); // cache failures for performance - return problem; - } - } - - // Add imports to possible candidates list - for (const imp of this._getImports(compilation, module, runtime)) { - candidates.add(imp); - } - statistics.added++; - return null; - } -} - -class ConcatConfiguration { - /** - * @param {Module} rootModule the root module - * @param {RuntimeSpec} runtime the runtime - */ - constructor(rootModule, runtime) { - this.rootModule = rootModule; - this.runtime = runtime; - /** @type {Set} */ - this.modules = new Set(); - this.modules.add(rootModule); - /** @type {Map} */ - this.warnings = new Map(); - } - - add(module) { - this.modules.add(module); - } - - has(module) { - return this.modules.has(module); - } - - isEmpty() { - return this.modules.size === 1; - } - - addWarning(module, problem) { - this.warnings.set(module, problem); - } - - getWarningsSorted() { - return new Map( - Array.from(this.warnings).sort((a, b) => { - const ai = a[0].identifier(); - const bi = b[0].identifier(); - if (ai < bi) return -1; - if (ai > bi) return 1; - return 0; - }) - ); - } - - /** - * @returns {Set} modules as set - */ - getModules() { - return this.modules; - } - - snapshot() { - return this.modules.size; - } - - rollback(snapshot) { - const modules = this.modules; - for (const m of modules) { - if (snapshot === 0) { - modules.delete(m); - } else { - snapshot--; - } - } - } -} - -module.exports = ModuleConcatenationPlugin; - - -/***/ }), - -/***/ 33347: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncBailHook } = __webpack_require__(44217); -const { RawSource, CachedSource, CompatSource } = __webpack_require__(51255); -const Compilation = __webpack_require__(73002); -const WebpackError = __webpack_require__(27154); -const { compareSelect, compareStrings } = __webpack_require__(58792); -const createHash = __webpack_require__(85205); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("../Compiler")} Compiler */ - -const EMPTY_SET = new Set(); - -const addToList = (itemOrItems, list) => { - if (Array.isArray(itemOrItems)) { - for (const item of itemOrItems) { - list.add(item); - } - } else if (itemOrItems) { - list.add(itemOrItems); - } -}; - -/** - * @template T - * @param {T[]} input list - * @param {function(T): Buffer} fn map function - * @returns {Buffer[]} buffers without duplicates - */ -const mapAndDeduplicateBuffers = (input, fn) => { - // Buffer.equals compares size first so this should be efficient enough - // If it becomes a performance problem we can use a map and group by size - // instead of looping over all assets. - const result = []; - outer: for (const value of input) { - const buf = fn(value); - for (const other of result) { - if (buf.equals(other)) continue outer; - } - result.push(buf); - } - return result; -}; - -/** - * Escapes regular expression metacharacters - * @param {string} str String to quote - * @returns {string} Escaped string - */ -const quoteMeta = str => { - return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); -}; - -const cachedSourceMap = new WeakMap(); - -const toCachedSource = source => { - if (source instanceof CachedSource) { - return source; - } - const entry = cachedSourceMap.get(source); - if (entry !== undefined) return entry; - const newSource = new CachedSource(CompatSource.from(source)); - cachedSourceMap.set(source, newSource); - return newSource; -}; - -/** - * @typedef {Object} AssetInfoForRealContentHash - * @property {string} name - * @property {AssetInfo} info - * @property {Source} source - * @property {RawSource | undefined} newSource - * @property {RawSource | undefined} newSourceWithoutOwn - * @property {string} content - * @property {Set} ownHashes - * @property {Promise} contentComputePromise - * @property {Promise} contentComputeWithoutOwnPromise - * @property {Set} referencedHashes - * @property {Set} hashes - */ - -/** - * @typedef {Object} CompilationHooks - * @property {SyncBailHook<[Buffer[], string], string>} updateHash - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class RealContentHashPlugin { - /** - * @param {Compilation} compilation the compilation - * @returns {CompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - updateHash: new SyncBailHook(["content", "oldHash"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor({ hashFunction, hashDigest }) { - this._hashFunction = hashFunction; - this._hashDigest = hashDigest; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("RealContentHashPlugin", compilation => { - const cacheAnalyse = compilation.getCache( - "RealContentHashPlugin|analyse" - ); - const cacheGenerate = compilation.getCache( - "RealContentHashPlugin|generate" - ); - const hooks = RealContentHashPlugin.getCompilationHooks(compilation); - compilation.hooks.processAssets.tapPromise( - { - name: "RealContentHashPlugin", - stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH - }, - async () => { - const assets = compilation.getAssets(); - /** @type {AssetInfoForRealContentHash[]} */ - const assetsWithInfo = []; - const hashToAssets = new Map(); - for (const { source, info, name } of assets) { - const cachedSource = toCachedSource(source); - const content = cachedSource.source(); - /** @type {Set} */ - const hashes = new Set(); - addToList(info.contenthash, hashes); - const data = { - name, - info, - source: cachedSource, - /** @type {RawSource | undefined} */ - newSource: undefined, - /** @type {RawSource | undefined} */ - newSourceWithoutOwn: undefined, - content, - /** @type {Set} */ - ownHashes: undefined, - contentComputePromise: undefined, - contentComputeWithoutOwnPromise: undefined, - /** @type {Set} */ - referencedHashes: undefined, - hashes - }; - assetsWithInfo.push(data); - for (const hash of hashes) { - const list = hashToAssets.get(hash); - if (list === undefined) { - hashToAssets.set(hash, [data]); - } else { - list.push(data); - } - } - } - if (hashToAssets.size === 0) return; - const hashRegExp = new RegExp( - Array.from(hashToAssets.keys(), quoteMeta).join("|"), - "g" - ); - await Promise.all( - assetsWithInfo.map(async asset => { - const { name, source, content, hashes } = asset; - if (Buffer.isBuffer(content)) { - asset.referencedHashes = EMPTY_SET; - asset.ownHashes = EMPTY_SET; - return; - } - const etag = cacheAnalyse.mergeEtags( - cacheAnalyse.getLazyHashedEtag(source), - Array.from(hashes).join("|") - ); - [asset.referencedHashes, asset.ownHashes] = - await cacheAnalyse.providePromise(name, etag, () => { - const referencedHashes = new Set(); - let ownHashes = new Set(); - const inContent = content.match(hashRegExp); - if (inContent) { - for (const hash of inContent) { - if (hashes.has(hash)) { - ownHashes.add(hash); - continue; - } - referencedHashes.add(hash); - } - } - return [referencedHashes, ownHashes]; - }); - }) - ); - const getDependencies = hash => { - const assets = hashToAssets.get(hash); - if (!assets) { - const referencingAssets = assetsWithInfo.filter(asset => - asset.referencedHashes.has(hash) - ); - const err = new WebpackError(`RealContentHashPlugin -Some kind of unexpected caching problem occurred. -An asset was cached with a reference to another asset (${hash}) that's not in the compilation anymore. -Either the asset was incorrectly cached, or the referenced asset should also be restored from cache. -Referenced by: -${referencingAssets - .map(a => { - const match = new RegExp(`.{0,20}${quoteMeta(hash)}.{0,20}`).exec( - a.content - ); - return ` - ${a.name}: ...${match ? match[0] : "???"}...`; - }) - .join("\n")}`); - compilation.errors.push(err); - return undefined; - } - const hashes = new Set(); - for (const { referencedHashes, ownHashes } of assets) { - if (!ownHashes.has(hash)) { - for (const hash of ownHashes) { - hashes.add(hash); - } - } - for (const hash of referencedHashes) { - hashes.add(hash); - } - } - return hashes; - }; - const hashInfo = hash => { - const assets = hashToAssets.get(hash); - return `${hash} (${Array.from(assets, a => a.name)})`; - }; - const hashesInOrder = new Set(); - for (const hash of hashToAssets.keys()) { - const add = (hash, stack) => { - const deps = getDependencies(hash); - if (!deps) return; - stack.add(hash); - for (const dep of deps) { - if (hashesInOrder.has(dep)) continue; - if (stack.has(dep)) { - throw new Error( - `Circular hash dependency ${Array.from( - stack, - hashInfo - ).join(" -> ")} -> ${hashInfo(dep)}` - ); - } - add(dep, stack); - } - hashesInOrder.add(hash); - stack.delete(hash); - }; - if (hashesInOrder.has(hash)) continue; - add(hash, new Set()); - } - const hashToNewHash = new Map(); - const getEtag = asset => - cacheGenerate.mergeEtags( - cacheGenerate.getLazyHashedEtag(asset.source), - Array.from(asset.referencedHashes, hash => - hashToNewHash.get(hash) - ).join("|") - ); - const computeNewContent = asset => { - if (asset.contentComputePromise) return asset.contentComputePromise; - return (asset.contentComputePromise = (async () => { - if ( - asset.ownHashes.size > 0 || - Array.from(asset.referencedHashes).some( - hash => hashToNewHash.get(hash) !== hash - ) - ) { - const identifier = asset.name; - const etag = getEtag(asset); - asset.newSource = await cacheGenerate.providePromise( - identifier, - etag, - () => { - const newContent = asset.content.replace(hashRegExp, hash => - hashToNewHash.get(hash) - ); - return new RawSource(newContent); - } - ); - } - })()); - }; - const computeNewContentWithoutOwn = asset => { - if (asset.contentComputeWithoutOwnPromise) - return asset.contentComputeWithoutOwnPromise; - return (asset.contentComputeWithoutOwnPromise = (async () => { - if ( - asset.ownHashes.size > 0 || - Array.from(asset.referencedHashes).some( - hash => hashToNewHash.get(hash) !== hash - ) - ) { - const identifier = asset.name + "|without-own"; - const etag = getEtag(asset); - asset.newSourceWithoutOwn = await cacheGenerate.providePromise( - identifier, - etag, - () => { - const newContent = asset.content.replace( - hashRegExp, - hash => { - if (asset.ownHashes.has(hash)) { - return ""; - } - return hashToNewHash.get(hash); - } - ); - return new RawSource(newContent); - } - ); - } - })()); - }; - const comparator = compareSelect(a => a.name, compareStrings); - for (const oldHash of hashesInOrder) { - const assets = hashToAssets.get(oldHash); - assets.sort(comparator); - const hash = createHash(this._hashFunction); - await Promise.all( - assets.map(asset => - asset.ownHashes.has(oldHash) - ? computeNewContentWithoutOwn(asset) - : computeNewContent(asset) - ) - ); - const assetsContent = mapAndDeduplicateBuffers(assets, asset => { - if (asset.ownHashes.has(oldHash)) { - return asset.newSourceWithoutOwn - ? asset.newSourceWithoutOwn.buffer() - : asset.source.buffer(); - } else { - return asset.newSource - ? asset.newSource.buffer() - : asset.source.buffer(); - } - }); - let newHash = hooks.updateHash.call(assetsContent, oldHash); - if (!newHash) { - for (const content of assetsContent) { - hash.update(content); - } - const digest = hash.digest(this._hashDigest); - newHash = /** @type {string} */ (digest.slice(0, oldHash.length)); - } - hashToNewHash.set(oldHash, newHash); - } - await Promise.all( - assetsWithInfo.map(async asset => { - await computeNewContent(asset); - const newName = asset.name.replace(hashRegExp, hash => - hashToNewHash.get(hash) - ); - - const infoUpdate = {}; - const hash = asset.info.contenthash; - infoUpdate.contenthash = Array.isArray(hash) - ? hash.map(hash => hashToNewHash.get(hash)) - : hashToNewHash.get(hash); - - if (asset.newSource !== undefined) { - compilation.updateAsset( - asset.name, - asset.newSource, - infoUpdate - ); - } else { - compilation.updateAsset(asset.name, asset.source, infoUpdate); - } - - if (asset.name !== newName) { - compilation.renameAsset(asset.name, newName); - } - }) - ); - } - ); - }); - } -} - -module.exports = RealContentHashPlugin; - - -/***/ }), - -/***/ 88876: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_BASIC, STAGE_ADVANCED } = __webpack_require__(6267); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ - -class RemoveEmptyChunksPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("RemoveEmptyChunksPlugin", compilation => { - /** - * @param {Iterable} chunks the chunks array - * @returns {void} - */ - const handler = chunks => { - const chunkGraph = compilation.chunkGraph; - for (const chunk of chunks) { - if ( - chunkGraph.getNumberOfChunkModules(chunk) === 0 && - !chunk.hasRuntime() && - chunkGraph.getNumberOfEntryModules(chunk) === 0 - ) { - compilation.chunkGraph.disconnectChunk(chunk); - compilation.chunks.delete(chunk); - } - } - }; - - // TODO do it once - compilation.hooks.optimizeChunks.tap( - { - name: "RemoveEmptyChunksPlugin", - stage: STAGE_BASIC - }, - handler - ); - compilation.hooks.optimizeChunks.tap( - { - name: "RemoveEmptyChunksPlugin", - stage: STAGE_ADVANCED - }, - handler - ); - }); - } -} -module.exports = RemoveEmptyChunksPlugin; - - -/***/ }), - -/***/ 19906: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { STAGE_BASIC } = __webpack_require__(6267); -const Queue = __webpack_require__(83690); -const { intersect } = __webpack_require__(73268); - -/** @typedef {import("../Compiler")} Compiler */ - -class RemoveParentModulesPlugin { - /** - * @param {Compiler} compiler the compiler - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("RemoveParentModulesPlugin", compilation => { - const handler = (chunks, chunkGroups) => { - const chunkGraph = compilation.chunkGraph; - const queue = new Queue(); - const availableModulesMap = new WeakMap(); - - for (const chunkGroup of compilation.entrypoints.values()) { - // initialize available modules for chunks without parents - availableModulesMap.set(chunkGroup, new Set()); - for (const child of chunkGroup.childrenIterable) { - queue.enqueue(child); - } - } - for (const chunkGroup of compilation.asyncEntrypoints) { - // initialize available modules for chunks without parents - availableModulesMap.set(chunkGroup, new Set()); - for (const child of chunkGroup.childrenIterable) { - queue.enqueue(child); - } - } - - while (queue.length > 0) { - const chunkGroup = queue.dequeue(); - let availableModules = availableModulesMap.get(chunkGroup); - let changed = false; - for (const parent of chunkGroup.parentsIterable) { - const availableModulesInParent = availableModulesMap.get(parent); - if (availableModulesInParent !== undefined) { - // If we know the available modules in parent: process these - if (availableModules === undefined) { - // if we have not own info yet: create new entry - availableModules = new Set(availableModulesInParent); - for (const chunk of parent.chunks) { - for (const m of chunkGraph.getChunkModulesIterable(chunk)) { - availableModules.add(m); - } - } - availableModulesMap.set(chunkGroup, availableModules); - changed = true; - } else { - for (const m of availableModules) { - if ( - !chunkGraph.isModuleInChunkGroup(m, parent) && - !availableModulesInParent.has(m) - ) { - availableModules.delete(m); - changed = true; - } - } - } - } - } - if (changed) { - // if something changed: enqueue our children - for (const child of chunkGroup.childrenIterable) { - queue.enqueue(child); - } - } - } - - // now we have available modules for every chunk - for (const chunk of chunks) { - const availableModulesSets = Array.from( - chunk.groupsIterable, - chunkGroup => availableModulesMap.get(chunkGroup) - ); - if (availableModulesSets.some(s => s === undefined)) continue; // No info about this chunk group - const availableModules = - availableModulesSets.length === 1 - ? availableModulesSets[0] - : intersect(availableModulesSets); - const numberOfModules = chunkGraph.getNumberOfChunkModules(chunk); - const toRemove = new Set(); - if (numberOfModules < availableModules.size) { - for (const m of chunkGraph.getChunkModulesIterable(chunk)) { - if (availableModules.has(m)) { - toRemove.add(m); - } - } - } else { - for (const m of availableModules) { - if (chunkGraph.isModuleInChunk(m, chunk)) { - toRemove.add(m); - } - } - } - for (const module of toRemove) { - chunkGraph.disconnectChunkAndModule(chunk, module); - } - } - }; - compilation.hooks.optimizeChunks.tap( - { - name: "RemoveParentModulesPlugin", - stage: STAGE_BASIC - }, - handler - ); - }); - } -} -module.exports = RemoveParentModulesPlugin; - - -/***/ }), - -/***/ 57105: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Compiler")} Compiler */ - -class RuntimeChunkPlugin { - constructor(options) { - this.options = { - name: entrypoint => `runtime~${entrypoint.name}`, - ...options - }; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { - compilation.hooks.addEntry.tap( - "RuntimeChunkPlugin", - (_, { name: entryName }) => { - if (entryName === undefined) return; - const data = compilation.entries.get(entryName); - if (data.options.runtime === undefined && !data.options.dependOn) { - // Determine runtime chunk name - let name = this.options.name; - if (typeof name === "function") { - name = name({ name: entryName }); - } - data.options.runtime = name; - } - } - ); - }); - } -} - -module.exports = RuntimeChunkPlugin; - - -/***/ }), - -/***/ 94281: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const glob2regexp = __webpack_require__(72544); -const { STAGE_DEFAULT } = __webpack_require__(6267); -const HarmonyExportImportedSpecifierDependency = __webpack_require__(96577); -const HarmonyImportSpecifierDependency = __webpack_require__(577); -const formatLocation = __webpack_require__(24014); - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ - -/** - * @typedef {Object} ExportInModule - * @property {Module} module the module - * @property {string} exportName the name of the export - * @property {boolean} checked if the export is conditional - */ - -/** - * @typedef {Object} ReexportInfo - * @property {Map} static - * @property {Map>} dynamic - */ - -/** @type {WeakMap>} */ -const globToRegexpCache = new WeakMap(); - -/** - * @param {string} glob the pattern - * @param {Map} cache the glob to RegExp cache - * @returns {RegExp} a regular expression - */ -const globToRegexp = (glob, cache) => { - const cacheEntry = cache.get(glob); - if (cacheEntry !== undefined) return cacheEntry; - if (!glob.includes("/")) { - glob = `**/${glob}`; - } - const baseRegexp = glob2regexp(glob, { globstar: true, extended: true }); - const regexpSource = baseRegexp.source; - const regexp = new RegExp("^(\\./)?" + regexpSource.slice(1)); - cache.set(glob, regexp); - return regexp; -}; - -class SideEffectsFlagPlugin { - /** - * @param {boolean} analyseSource analyse source code for side effects - */ - constructor(analyseSource = true) { - this._analyseSource = analyseSource; - } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - let cache = globToRegexpCache.get(compiler.root); - if (cache === undefined) { - cache = new Map(); - globToRegexpCache.set(compiler.root, cache); - } - compiler.hooks.compilation.tap( - "SideEffectsFlagPlugin", - (compilation, { normalModuleFactory }) => { - const moduleGraph = compilation.moduleGraph; - normalModuleFactory.hooks.module.tap( - "SideEffectsFlagPlugin", - (module, data) => { - const resolveData = data.resourceResolveData; - if ( - resolveData && - resolveData.descriptionFileData && - resolveData.relativePath - ) { - const sideEffects = resolveData.descriptionFileData.sideEffects; - if (sideEffects !== undefined) { - if (module.factoryMeta === undefined) { - module.factoryMeta = {}; - } - const hasSideEffects = - SideEffectsFlagPlugin.moduleHasSideEffects( - resolveData.relativePath, - sideEffects, - cache - ); - module.factoryMeta.sideEffectFree = !hasSideEffects; - } - } - - return module; - } - ); - normalModuleFactory.hooks.module.tap( - "SideEffectsFlagPlugin", - (module, data) => { - if (typeof data.settings.sideEffects === "boolean") { - if (module.factoryMeta === undefined) { - module.factoryMeta = {}; - } - module.factoryMeta.sideEffectFree = !data.settings.sideEffects; - } - return module; - } - ); - if (this._analyseSource) { - /** - * @param {JavascriptParser} parser the parser - * @returns {void} - */ - const parserHandler = parser => { - let sideEffectsStatement; - parser.hooks.program.tap("SideEffectsFlagPlugin", () => { - sideEffectsStatement = undefined; - }); - parser.hooks.statement.tap( - { name: "SideEffectsFlagPlugin", stage: -100 }, - statement => { - if (sideEffectsStatement) return; - if (parser.scope.topLevelScope !== true) return; - switch (statement.type) { - case "ExpressionStatement": - if ( - !parser.isPure(statement.expression, statement.range[0]) - ) { - sideEffectsStatement = statement; - } - break; - case "IfStatement": - case "WhileStatement": - case "DoWhileStatement": - if (!parser.isPure(statement.test, statement.range[0])) { - sideEffectsStatement = statement; - } - // statement hook will be called for child statements too - break; - case "ForStatement": - if ( - !parser.isPure(statement.init, statement.range[0]) || - !parser.isPure( - statement.test, - statement.init - ? statement.init.range[1] - : statement.range[0] - ) || - !parser.isPure( - statement.update, - statement.test - ? statement.test.range[1] - : statement.init - ? statement.init.range[1] - : statement.range[0] - ) - ) { - sideEffectsStatement = statement; - } - // statement hook will be called for child statements too - break; - case "SwitchStatement": - if ( - !parser.isPure(statement.discriminant, statement.range[0]) - ) { - sideEffectsStatement = statement; - } - // statement hook will be called for child statements too - break; - case "VariableDeclaration": - case "ClassDeclaration": - case "FunctionDeclaration": - if (!parser.isPure(statement, statement.range[0])) { - sideEffectsStatement = statement; - } - break; - case "ExportNamedDeclaration": - case "ExportDefaultDeclaration": - if ( - !parser.isPure(statement.declaration, statement.range[0]) - ) { - sideEffectsStatement = statement; - } - break; - case "LabeledStatement": - case "BlockStatement": - // statement hook will be called for child statements too - break; - case "EmptyStatement": - break; - case "ExportAllDeclaration": - case "ImportDeclaration": - // imports will be handled by the dependencies - break; - default: - sideEffectsStatement = statement; - break; - } - } - ); - parser.hooks.finish.tap("SideEffectsFlagPlugin", () => { - if (sideEffectsStatement === undefined) { - parser.state.module.buildMeta.sideEffectFree = true; - } else { - const { loc, type } = sideEffectsStatement; - moduleGraph - .getOptimizationBailout(parser.state.module) - .push( - () => - `Statement (${type}) with side effects in source code at ${formatLocation( - loc - )}` - ); - } - }); - }; - for (const key of [ - "javascript/auto", - "javascript/esm", - "javascript/dynamic" - ]) { - normalModuleFactory.hooks.parser - .for(key) - .tap("SideEffectsFlagPlugin", parserHandler); - } - } - compilation.hooks.optimizeDependencies.tap( - { - name: "SideEffectsFlagPlugin", - stage: STAGE_DEFAULT - }, - modules => { - const logger = compilation.getLogger( - "webpack.SideEffectsFlagPlugin" - ); - - logger.time("update dependencies"); - for (const module of modules) { - if (module.getSideEffectsConnectionState(moduleGraph) === false) { - const exportsInfo = moduleGraph.getExportsInfo(module); - for (const connection of moduleGraph.getIncomingConnections( - module - )) { - const dep = connection.dependency; - let isReexport; - if ( - (isReexport = - dep instanceof - HarmonyExportImportedSpecifierDependency) || - (dep instanceof HarmonyImportSpecifierDependency && - !dep.namespaceObjectAsContext) - ) { - // TODO improve for export * - if (isReexport && dep.name) { - const exportInfo = moduleGraph.getExportInfo( - connection.originModule, - dep.name - ); - exportInfo.moveTarget( - moduleGraph, - ({ module }) => - module.getSideEffectsConnectionState(moduleGraph) === - false, - ({ module: newModule, export: exportName }) => { - moduleGraph.updateModule(dep, newModule); - moduleGraph.addExplanation( - dep, - "(skipped side-effect-free modules)" - ); - const ids = dep.getIds(moduleGraph); - dep.setIds( - moduleGraph, - exportName - ? [...exportName, ...ids.slice(1)] - : ids.slice(1) - ); - return moduleGraph.getConnection(dep); - } - ); - continue; - } - // TODO improve for nested imports - const ids = dep.getIds(moduleGraph); - if (ids.length > 0) { - const exportInfo = exportsInfo.getExportInfo(ids[0]); - const target = exportInfo.getTarget( - moduleGraph, - ({ module }) => - module.getSideEffectsConnectionState(moduleGraph) === - false - ); - if (!target) continue; - - moduleGraph.updateModule(dep, target.module); - moduleGraph.addExplanation( - dep, - "(skipped side-effect-free modules)" - ); - dep.setIds( - moduleGraph, - target.export - ? [...target.export, ...ids.slice(1)] - : ids.slice(1) - ); - } - } - } - } - } - logger.timeEnd("update dependencies"); - } - ); - } - ); - } - - static moduleHasSideEffects(moduleName, flagValue, cache) { - switch (typeof flagValue) { - case "undefined": - return true; - case "boolean": - return flagValue; - case "string": - return globToRegexp(flagValue, cache).test(moduleName); - case "object": - return flagValue.some(glob => - SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob, cache) - ); - } - } -} -module.exports = SideEffectsFlagPlugin; - - -/***/ }), - -/***/ 61167: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Chunk = __webpack_require__(84891); -const { STAGE_ADVANCED } = __webpack_require__(6267); -const WebpackError = __webpack_require__(27154); -const { requestToId } = __webpack_require__(76283); -const { isSubset } = __webpack_require__(73268); -const SortableSet = __webpack_require__(87122); -const { - compareModulesByIdentifier, - compareIterables -} = __webpack_require__(58792); -const createHash = __webpack_require__(85205); -const deterministicGrouping = __webpack_require__(75843); -const { makePathsRelative } = __webpack_require__(20162); -const memoize = __webpack_require__(61374); -const MinMaxSizeWarning = __webpack_require__(45337); - -/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksCacheGroup} OptimizationSplitChunksCacheGroup */ -/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksGetCacheGroups} OptimizationSplitChunksGetCacheGroups */ -/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksOptions} OptimizationSplitChunksOptions */ -/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksSizes} OptimizationSplitChunksSizes */ -/** @typedef {import("../../declarations/WebpackOptions").Output} OutputOptions */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("../Compilation").PathData} PathData */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../util/deterministicGrouping").GroupedItems} DeterministicGroupingGroupedItemsForModule */ -/** @typedef {import("../util/deterministicGrouping").Options} DeterministicGroupingOptionsForModule */ - -/** @typedef {Record} SplitChunksSizes */ - -/** - * @callback ChunkFilterFunction - * @param {Chunk} chunk - * @returns {boolean} - */ - -/** - * @callback CombineSizeFunction - * @param {number} a - * @param {number} b - * @returns {number} - */ - -/** - * @typedef {Object} CacheGroupSource - * @property {string=} key - * @property {number=} priority - * @property {GetName=} getName - * @property {ChunkFilterFunction=} chunksFilter - * @property {boolean=} enforce - * @property {SplitChunksSizes} minSize - * @property {SplitChunksSizes} minSizeReduction - * @property {SplitChunksSizes} minRemainingSize - * @property {SplitChunksSizes} enforceSizeThreshold - * @property {SplitChunksSizes} maxAsyncSize - * @property {SplitChunksSizes} maxInitialSize - * @property {number=} minChunks - * @property {number=} maxAsyncRequests - * @property {number=} maxInitialRequests - * @property {(string | function(PathData, AssetInfo=): string)=} filename - * @property {string=} idHint - * @property {string} automaticNameDelimiter - * @property {boolean=} reuseExistingChunk - * @property {boolean=} usedExports - */ - -/** - * @typedef {Object} CacheGroup - * @property {string} key - * @property {number=} priority - * @property {GetName=} getName - * @property {ChunkFilterFunction=} chunksFilter - * @property {SplitChunksSizes} minSize - * @property {SplitChunksSizes} minSizeReduction - * @property {SplitChunksSizes} minRemainingSize - * @property {SplitChunksSizes} enforceSizeThreshold - * @property {SplitChunksSizes} maxAsyncSize - * @property {SplitChunksSizes} maxInitialSize - * @property {number=} minChunks - * @property {number=} maxAsyncRequests - * @property {number=} maxInitialRequests - * @property {(string | function(PathData, AssetInfo=): string)=} filename - * @property {string=} idHint - * @property {string} automaticNameDelimiter - * @property {boolean} reuseExistingChunk - * @property {boolean} usedExports - * @property {boolean} _validateSize - * @property {boolean} _validateRemainingSize - * @property {SplitChunksSizes} _minSizeForMaxSize - * @property {boolean} _conditionalEnforce - */ - -/** - * @typedef {Object} FallbackCacheGroup - * @property {ChunkFilterFunction} chunksFilter - * @property {SplitChunksSizes} minSize - * @property {SplitChunksSizes} maxAsyncSize - * @property {SplitChunksSizes} maxInitialSize - * @property {string} automaticNameDelimiter - */ - -/** - * @typedef {Object} CacheGroupsContext - * @property {ModuleGraph} moduleGraph - * @property {ChunkGraph} chunkGraph - */ - -/** - * @callback GetCacheGroups - * @param {Module} module - * @param {CacheGroupsContext} context - * @returns {CacheGroupSource[]} - */ - -/** - * @callback GetName - * @param {Module=} module - * @param {Chunk[]=} chunks - * @param {string=} key - * @returns {string=} - */ - -/** - * @typedef {Object} SplitChunksOptions - * @property {ChunkFilterFunction} chunksFilter - * @property {string[]} defaultSizeTypes - * @property {SplitChunksSizes} minSize - * @property {SplitChunksSizes} minSizeReduction - * @property {SplitChunksSizes} minRemainingSize - * @property {SplitChunksSizes} enforceSizeThreshold - * @property {SplitChunksSizes} maxInitialSize - * @property {SplitChunksSizes} maxAsyncSize - * @property {number} minChunks - * @property {number} maxAsyncRequests - * @property {number} maxInitialRequests - * @property {boolean} hidePathInfo - * @property {string | function(PathData, AssetInfo=): string} filename - * @property {string} automaticNameDelimiter - * @property {GetCacheGroups} getCacheGroups - * @property {GetName} getName - * @property {boolean} usedExports - * @property {FallbackCacheGroup} fallbackCacheGroup - */ - -/** - * @typedef {Object} ChunksInfoItem - * @property {SortableSet} modules - * @property {CacheGroup} cacheGroup - * @property {number} cacheGroupIndex - * @property {string} name - * @property {Record} sizes - * @property {Set} chunks - * @property {Set} reuseableChunks - * @property {Set} chunksKeys - */ - -const defaultGetName = /** @type {GetName} */ (() => {}); - -const deterministicGroupingForModules = - /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ ( - deterministicGrouping - ); - -/** @type {WeakMap} */ -const getKeyCache = new WeakMap(); - -/** - * @param {string} name a filename to hash - * @param {OutputOptions} outputOptions hash function used - * @returns {string} hashed filename - */ -const hashFilename = (name, outputOptions) => { - const digest = /** @type {string} */ ( - createHash(outputOptions.hashFunction) - .update(name) - .digest(outputOptions.hashDigest) - ); - return digest.slice(0, 8); -}; - -/** - * @param {Chunk} chunk the chunk - * @returns {number} the number of requests - */ -const getRequests = chunk => { - let requests = 0; - for (const chunkGroup of chunk.groupsIterable) { - requests = Math.max(requests, chunkGroup.chunks.length); - } - return requests; -}; - -const mapObject = (obj, fn) => { - const newObj = Object.create(null); - for (const key of Object.keys(obj)) { - newObj[key] = fn(obj[key], key); - } - return newObj; -}; - -/** - * @template T - * @param {Set} a set - * @param {Set} b other set - * @returns {boolean} true if at least one item of a is in b - */ -const isOverlap = (a, b) => { - for (const item of a) { - if (b.has(item)) return true; - } - return false; -}; - -const compareModuleIterables = compareIterables(compareModulesByIdentifier); - -/** - * @param {ChunksInfoItem} a item - * @param {ChunksInfoItem} b item - * @returns {number} compare result - */ -const compareEntries = (a, b) => { - // 1. by priority - const diffPriority = a.cacheGroup.priority - b.cacheGroup.priority; - if (diffPriority) return diffPriority; - // 2. by number of chunks - const diffCount = a.chunks.size - b.chunks.size; - if (diffCount) return diffCount; - // 3. by size reduction - const aSizeReduce = totalSize(a.sizes) * (a.chunks.size - 1); - const bSizeReduce = totalSize(b.sizes) * (b.chunks.size - 1); - const diffSizeReduce = aSizeReduce - bSizeReduce; - if (diffSizeReduce) return diffSizeReduce; - // 4. by cache group index - const indexDiff = b.cacheGroupIndex - a.cacheGroupIndex; - if (indexDiff) return indexDiff; - // 5. by number of modules (to be able to compare by identifier) - const modulesA = a.modules; - const modulesB = b.modules; - const diff = modulesA.size - modulesB.size; - if (diff) return diff; - // 6. by module identifiers - modulesA.sort(); - modulesB.sort(); - return compareModuleIterables(modulesA, modulesB); -}; - -const INITIAL_CHUNK_FILTER = chunk => chunk.canBeInitial(); -const ASYNC_CHUNK_FILTER = chunk => !chunk.canBeInitial(); -const ALL_CHUNK_FILTER = chunk => true; - -/** - * @param {OptimizationSplitChunksSizes} value the sizes - * @param {string[]} defaultSizeTypes the default size types - * @returns {SplitChunksSizes} normalized representation - */ -const normalizeSizes = (value, defaultSizeTypes) => { - if (typeof value === "number") { - /** @type {Record} */ - const o = {}; - for (const sizeType of defaultSizeTypes) o[sizeType] = value; - return o; - } else if (typeof value === "object" && value !== null) { - return { ...value }; - } else { - return {}; - } -}; - -/** - * @param {...SplitChunksSizes} sizes the sizes - * @returns {SplitChunksSizes} the merged sizes - */ -const mergeSizes = (...sizes) => { - /** @type {SplitChunksSizes} */ - let merged = {}; - for (let i = sizes.length - 1; i >= 0; i--) { - merged = Object.assign(merged, sizes[i]); - } - return merged; -}; - -/** - * @param {SplitChunksSizes} sizes the sizes - * @returns {boolean} true, if there are sizes > 0 - */ -const hasNonZeroSizes = sizes => { - for (const key of Object.keys(sizes)) { - if (sizes[key] > 0) return true; - } - return false; -}; - -/** - * @param {SplitChunksSizes} a first sizes - * @param {SplitChunksSizes} b second sizes - * @param {CombineSizeFunction} combine a function to combine sizes - * @returns {SplitChunksSizes} the combine sizes - */ -const combineSizes = (a, b, combine) => { - const aKeys = new Set(Object.keys(a)); - const bKeys = new Set(Object.keys(b)); - /** @type {SplitChunksSizes} */ - const result = {}; - for (const key of aKeys) { - if (bKeys.has(key)) { - result[key] = combine(a[key], b[key]); - } else { - result[key] = a[key]; - } - } - for (const key of bKeys) { - if (!aKeys.has(key)) { - result[key] = b[key]; - } - } - return result; -}; - -/** - * @param {SplitChunksSizes} sizes the sizes - * @param {SplitChunksSizes} minSize the min sizes - * @returns {boolean} true if there are sizes and all existing sizes are at least `minSize` - */ -const checkMinSize = (sizes, minSize) => { - for (const key of Object.keys(minSize)) { - const size = sizes[key]; - if (size === undefined || size === 0) continue; - if (size < minSize[key]) return false; - } - return true; -}; - -/** - * @param {SplitChunksSizes} sizes the sizes - * @param {SplitChunksSizes} minSizeReduction the min sizes - * @param {number} chunkCount number of chunks - * @returns {boolean} true if there are sizes and all existing sizes are at least `minSizeReduction` - */ -const checkMinSizeReduction = (sizes, minSizeReduction, chunkCount) => { - for (const key of Object.keys(minSizeReduction)) { - const size = sizes[key]; - if (size === undefined || size === 0) continue; - if (size * chunkCount < minSizeReduction[key]) return false; - } - return true; -}; - -/** - * @param {SplitChunksSizes} sizes the sizes - * @param {SplitChunksSizes} minSize the min sizes - * @returns {undefined | string[]} list of size types that are below min size - */ -const getViolatingMinSizes = (sizes, minSize) => { - let list; - for (const key of Object.keys(minSize)) { - const size = sizes[key]; - if (size === undefined || size === 0) continue; - if (size < minSize[key]) { - if (list === undefined) list = [key]; - else list.push(key); - } - } - return list; -}; - -/** - * @param {SplitChunksSizes} sizes the sizes - * @returns {number} the total size - */ -const totalSize = sizes => { - let size = 0; - for (const key of Object.keys(sizes)) { - size += sizes[key]; - } - return size; -}; - -/** - * @param {false|string|Function} name the chunk name - * @returns {GetName} a function to get the name of the chunk - */ -const normalizeName = name => { - if (typeof name === "string") { - return () => name; - } - if (typeof name === "function") { - return /** @type {GetName} */ (name); - } -}; - -/** - * @param {OptimizationSplitChunksCacheGroup["chunks"]} chunks the chunk filter option - * @returns {ChunkFilterFunction} the chunk filter function - */ -const normalizeChunksFilter = chunks => { - if (chunks === "initial") { - return INITIAL_CHUNK_FILTER; - } - if (chunks === "async") { - return ASYNC_CHUNK_FILTER; - } - if (chunks === "all") { - return ALL_CHUNK_FILTER; - } - if (typeof chunks === "function") { - return chunks; - } -}; - -/** - * @param {GetCacheGroups | Record} cacheGroups the cache group options - * @param {string[]} defaultSizeTypes the default size types - * @returns {GetCacheGroups} a function to get the cache groups - */ -const normalizeCacheGroups = (cacheGroups, defaultSizeTypes) => { - if (typeof cacheGroups === "function") { - return cacheGroups; - } - if (typeof cacheGroups === "object" && cacheGroups !== null) { - /** @type {(function(Module, CacheGroupsContext, CacheGroupSource[]): void)[]} */ - const handlers = []; - for (const key of Object.keys(cacheGroups)) { - const option = cacheGroups[key]; - if (option === false) { - continue; - } - if (typeof option === "string" || option instanceof RegExp) { - const source = createCacheGroupSource({}, key, defaultSizeTypes); - handlers.push((module, context, results) => { - if (checkTest(option, module, context)) { - results.push(source); - } - }); - } else if (typeof option === "function") { - const cache = new WeakMap(); - handlers.push((module, context, results) => { - const result = option(module); - if (result) { - const groups = Array.isArray(result) ? result : [result]; - for (const group of groups) { - const cachedSource = cache.get(group); - if (cachedSource !== undefined) { - results.push(cachedSource); - } else { - const source = createCacheGroupSource( - group, - key, - defaultSizeTypes - ); - cache.set(group, source); - results.push(source); - } - } - } - }); - } else { - const source = createCacheGroupSource(option, key, defaultSizeTypes); - handlers.push((module, context, results) => { - if ( - checkTest(option.test, module, context) && - checkModuleType(option.type, module) && - checkModuleLayer(option.layer, module) - ) { - results.push(source); - } - }); - } - } - /** - * @param {Module} module the current module - * @param {CacheGroupsContext} context the current context - * @returns {CacheGroupSource[]} the matching cache groups - */ - const fn = (module, context) => { - /** @type {CacheGroupSource[]} */ - let results = []; - for (const fn of handlers) { - fn(module, context, results); - } - return results; - }; - return fn; - } - return () => null; -}; - -/** - * @param {undefined|boolean|string|RegExp|Function} test test option - * @param {Module} module the module - * @param {CacheGroupsContext} context context object - * @returns {boolean} true, if the module should be selected - */ -const checkTest = (test, module, context) => { - if (test === undefined) return true; - if (typeof test === "function") { - return test(module, context); - } - if (typeof test === "boolean") return test; - if (typeof test === "string") { - const name = module.nameForCondition(); - return name && name.startsWith(test); - } - if (test instanceof RegExp) { - const name = module.nameForCondition(); - return name && test.test(name); - } - return false; -}; - -/** - * @param {undefined|string|RegExp|Function} test type option - * @param {Module} module the module - * @returns {boolean} true, if the module should be selected - */ -const checkModuleType = (test, module) => { - if (test === undefined) return true; - if (typeof test === "function") { - return test(module.type); - } - if (typeof test === "string") { - const type = module.type; - return test === type; - } - if (test instanceof RegExp) { - const type = module.type; - return test.test(type); - } - return false; -}; - -/** - * @param {undefined|string|RegExp|Function} test type option - * @param {Module} module the module - * @returns {boolean} true, if the module should be selected - */ -const checkModuleLayer = (test, module) => { - if (test === undefined) return true; - if (typeof test === "function") { - return test(module.layer); - } - if (typeof test === "string") { - const layer = module.layer; - return test === "" ? !layer : layer && layer.startsWith(test); - } - if (test instanceof RegExp) { - const layer = module.layer; - return test.test(layer); - } - return false; -}; - -/** - * @param {OptimizationSplitChunksCacheGroup} options the group options - * @param {string} key key of cache group - * @param {string[]} defaultSizeTypes the default size types - * @returns {CacheGroupSource} the normalized cached group - */ -const createCacheGroupSource = (options, key, defaultSizeTypes) => { - const minSize = normalizeSizes(options.minSize, defaultSizeTypes); - const minSizeReduction = normalizeSizes( - options.minSizeReduction, - defaultSizeTypes - ); - const maxSize = normalizeSizes(options.maxSize, defaultSizeTypes); - return { - key, - priority: options.priority, - getName: normalizeName(options.name), - chunksFilter: normalizeChunksFilter(options.chunks), - enforce: options.enforce, - minSize, - minSizeReduction, - minRemainingSize: mergeSizes( - normalizeSizes(options.minRemainingSize, defaultSizeTypes), - minSize - ), - enforceSizeThreshold: normalizeSizes( - options.enforceSizeThreshold, - defaultSizeTypes - ), - maxAsyncSize: mergeSizes( - normalizeSizes(options.maxAsyncSize, defaultSizeTypes), - maxSize - ), - maxInitialSize: mergeSizes( - normalizeSizes(options.maxInitialSize, defaultSizeTypes), - maxSize - ), - minChunks: options.minChunks, - maxAsyncRequests: options.maxAsyncRequests, - maxInitialRequests: options.maxInitialRequests, - filename: options.filename, - idHint: options.idHint, - automaticNameDelimiter: options.automaticNameDelimiter, - reuseExistingChunk: options.reuseExistingChunk, - usedExports: options.usedExports - }; -}; - -module.exports = class SplitChunksPlugin { - /** - * @param {OptimizationSplitChunksOptions=} options plugin options - */ - constructor(options = {}) { - const defaultSizeTypes = options.defaultSizeTypes || [ - "javascript", - "unknown" - ]; - const fallbackCacheGroup = options.fallbackCacheGroup || {}; - const minSize = normalizeSizes(options.minSize, defaultSizeTypes); - const minSizeReduction = normalizeSizes( - options.minSizeReduction, - defaultSizeTypes - ); - const maxSize = normalizeSizes(options.maxSize, defaultSizeTypes); - - /** @type {SplitChunksOptions} */ - this.options = { - chunksFilter: normalizeChunksFilter(options.chunks || "all"), - defaultSizeTypes, - minSize, - minSizeReduction, - minRemainingSize: mergeSizes( - normalizeSizes(options.minRemainingSize, defaultSizeTypes), - minSize - ), - enforceSizeThreshold: normalizeSizes( - options.enforceSizeThreshold, - defaultSizeTypes - ), - maxAsyncSize: mergeSizes( - normalizeSizes(options.maxAsyncSize, defaultSizeTypes), - maxSize - ), - maxInitialSize: mergeSizes( - normalizeSizes(options.maxInitialSize, defaultSizeTypes), - maxSize - ), - minChunks: options.minChunks || 1, - maxAsyncRequests: options.maxAsyncRequests || 1, - maxInitialRequests: options.maxInitialRequests || 1, - hidePathInfo: options.hidePathInfo || false, - filename: options.filename || undefined, - getCacheGroups: normalizeCacheGroups( - options.cacheGroups, - defaultSizeTypes - ), - getName: options.name ? normalizeName(options.name) : defaultGetName, - automaticNameDelimiter: options.automaticNameDelimiter, - usedExports: options.usedExports, - fallbackCacheGroup: { - chunksFilter: normalizeChunksFilter( - fallbackCacheGroup.chunks || options.chunks || "all" - ), - minSize: mergeSizes( - normalizeSizes(fallbackCacheGroup.minSize, defaultSizeTypes), - minSize - ), - maxAsyncSize: mergeSizes( - normalizeSizes(fallbackCacheGroup.maxAsyncSize, defaultSizeTypes), - normalizeSizes(fallbackCacheGroup.maxSize, defaultSizeTypes), - normalizeSizes(options.maxAsyncSize, defaultSizeTypes), - normalizeSizes(options.maxSize, defaultSizeTypes) - ), - maxInitialSize: mergeSizes( - normalizeSizes(fallbackCacheGroup.maxInitialSize, defaultSizeTypes), - normalizeSizes(fallbackCacheGroup.maxSize, defaultSizeTypes), - normalizeSizes(options.maxInitialSize, defaultSizeTypes), - normalizeSizes(options.maxSize, defaultSizeTypes) - ), - automaticNameDelimiter: - fallbackCacheGroup.automaticNameDelimiter || - options.automaticNameDelimiter || - "~" - } - }; - - /** @type {WeakMap} */ - this._cacheGroupCache = new WeakMap(); - } - - /** - * @param {CacheGroupSource} cacheGroupSource source - * @returns {CacheGroup} the cache group (cached) - */ - _getCacheGroup(cacheGroupSource) { - const cacheEntry = this._cacheGroupCache.get(cacheGroupSource); - if (cacheEntry !== undefined) return cacheEntry; - const minSize = mergeSizes( - cacheGroupSource.minSize, - cacheGroupSource.enforce ? undefined : this.options.minSize - ); - const minSizeReduction = mergeSizes( - cacheGroupSource.minSizeReduction, - cacheGroupSource.enforce ? undefined : this.options.minSizeReduction - ); - const minRemainingSize = mergeSizes( - cacheGroupSource.minRemainingSize, - cacheGroupSource.enforce ? undefined : this.options.minRemainingSize - ); - const enforceSizeThreshold = mergeSizes( - cacheGroupSource.enforceSizeThreshold, - cacheGroupSource.enforce ? undefined : this.options.enforceSizeThreshold - ); - const cacheGroup = { - key: cacheGroupSource.key, - priority: cacheGroupSource.priority || 0, - chunksFilter: cacheGroupSource.chunksFilter || this.options.chunksFilter, - minSize, - minSizeReduction, - minRemainingSize, - enforceSizeThreshold, - maxAsyncSize: mergeSizes( - cacheGroupSource.maxAsyncSize, - cacheGroupSource.enforce ? undefined : this.options.maxAsyncSize - ), - maxInitialSize: mergeSizes( - cacheGroupSource.maxInitialSize, - cacheGroupSource.enforce ? undefined : this.options.maxInitialSize - ), - minChunks: - cacheGroupSource.minChunks !== undefined - ? cacheGroupSource.minChunks - : cacheGroupSource.enforce - ? 1 - : this.options.minChunks, - maxAsyncRequests: - cacheGroupSource.maxAsyncRequests !== undefined - ? cacheGroupSource.maxAsyncRequests - : cacheGroupSource.enforce - ? Infinity - : this.options.maxAsyncRequests, - maxInitialRequests: - cacheGroupSource.maxInitialRequests !== undefined - ? cacheGroupSource.maxInitialRequests - : cacheGroupSource.enforce - ? Infinity - : this.options.maxInitialRequests, - getName: - cacheGroupSource.getName !== undefined - ? cacheGroupSource.getName - : this.options.getName, - usedExports: - cacheGroupSource.usedExports !== undefined - ? cacheGroupSource.usedExports - : this.options.usedExports, - filename: - cacheGroupSource.filename !== undefined - ? cacheGroupSource.filename - : this.options.filename, - automaticNameDelimiter: - cacheGroupSource.automaticNameDelimiter !== undefined - ? cacheGroupSource.automaticNameDelimiter - : this.options.automaticNameDelimiter, - idHint: - cacheGroupSource.idHint !== undefined - ? cacheGroupSource.idHint - : cacheGroupSource.key, - reuseExistingChunk: cacheGroupSource.reuseExistingChunk || false, - _validateSize: hasNonZeroSizes(minSize), - _validateRemainingSize: hasNonZeroSizes(minRemainingSize), - _minSizeForMaxSize: mergeSizes( - cacheGroupSource.minSize, - this.options.minSize - ), - _conditionalEnforce: hasNonZeroSizes(enforceSizeThreshold) - }; - this._cacheGroupCache.set(cacheGroupSource, cacheGroup); - return cacheGroup; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const cachedMakePathsRelative = makePathsRelative.bindContextCache( - compiler.context, - compiler.root - ); - compiler.hooks.thisCompilation.tap("SplitChunksPlugin", compilation => { - const logger = compilation.getLogger("webpack.SplitChunksPlugin"); - let alreadyOptimized = false; - compilation.hooks.unseal.tap("SplitChunksPlugin", () => { - alreadyOptimized = false; - }); - compilation.hooks.optimizeChunks.tap( - { - name: "SplitChunksPlugin", - stage: STAGE_ADVANCED - }, - chunks => { - if (alreadyOptimized) return; - alreadyOptimized = true; - logger.time("prepare"); - const chunkGraph = compilation.chunkGraph; - const moduleGraph = compilation.moduleGraph; - // Give each selected chunk an index (to create strings from chunks) - /** @type {Map} */ - const chunkIndexMap = new Map(); - const ZERO = BigInt("0"); - const ONE = BigInt("1"); - const START = ONE << BigInt("31"); - let index = START; - for (const chunk of chunks) { - chunkIndexMap.set( - chunk, - index | BigInt((Math.random() * 0x7fffffff) | 0) - ); - index = index << ONE; - } - /** - * @param {Iterable} chunks list of chunks - * @returns {bigint | Chunk} key of the chunks - */ - const getKey = chunks => { - const iterator = chunks[Symbol.iterator](); - let result = iterator.next(); - if (result.done) return ZERO; - const first = result.value; - result = iterator.next(); - if (result.done) return first; - let key = - chunkIndexMap.get(first) | chunkIndexMap.get(result.value); - while (!(result = iterator.next()).done) { - const raw = chunkIndexMap.get(result.value); - key = key ^ raw; - } - return key; - }; - const keyToString = key => { - if (typeof key === "bigint") return key.toString(16); - return chunkIndexMap.get(key).toString(16); - }; - - const getChunkSetsInGraph = memoize(() => { - /** @type {Map>} */ - const chunkSetsInGraph = new Map(); - /** @type {Set} */ - const singleChunkSets = new Set(); - for (const module of compilation.modules) { - const chunks = chunkGraph.getModuleChunksIterable(module); - const chunksKey = getKey(chunks); - if (typeof chunksKey === "bigint") { - if (!chunkSetsInGraph.has(chunksKey)) { - chunkSetsInGraph.set(chunksKey, new Set(chunks)); - } - } else { - singleChunkSets.add(chunksKey); - } - } - return { chunkSetsInGraph, singleChunkSets }; - }); - - /** - * @param {Module} module the module - * @returns {Iterable} groups of chunks with equal exports - */ - const groupChunksByExports = module => { - const exportsInfo = moduleGraph.getExportsInfo(module); - const groupedByUsedExports = new Map(); - for (const chunk of chunkGraph.getModuleChunksIterable(module)) { - const key = exportsInfo.getUsageKey(chunk.runtime); - const list = groupedByUsedExports.get(key); - if (list !== undefined) { - list.push(chunk); - } else { - groupedByUsedExports.set(key, [chunk]); - } - } - return groupedByUsedExports.values(); - }; - - /** @type {Map>} */ - const groupedByExportsMap = new Map(); - - const getExportsChunkSetsInGraph = memoize(() => { - /** @type {Map>} */ - const chunkSetsInGraph = new Map(); - /** @type {Set} */ - const singleChunkSets = new Set(); - for (const module of compilation.modules) { - const groupedChunks = Array.from(groupChunksByExports(module)); - groupedByExportsMap.set(module, groupedChunks); - for (const chunks of groupedChunks) { - if (chunks.length === 1) { - singleChunkSets.add(chunks[0]); - } else { - const chunksKey = /** @type {bigint} */ (getKey(chunks)); - if (!chunkSetsInGraph.has(chunksKey)) { - chunkSetsInGraph.set(chunksKey, new Set(chunks)); - } - } - } - } - return { chunkSetsInGraph, singleChunkSets }; - }); - - // group these set of chunks by count - // to allow to check less sets via isSubset - // (only smaller sets can be subset) - const groupChunkSetsByCount = chunkSets => { - /** @type {Map>>} */ - const chunkSetsByCount = new Map(); - for (const chunksSet of chunkSets) { - const count = chunksSet.size; - let array = chunkSetsByCount.get(count); - if (array === undefined) { - array = []; - chunkSetsByCount.set(count, array); - } - array.push(chunksSet); - } - return chunkSetsByCount; - }; - const getChunkSetsByCount = memoize(() => - groupChunkSetsByCount( - getChunkSetsInGraph().chunkSetsInGraph.values() - ) - ); - const getExportsChunkSetsByCount = memoize(() => - groupChunkSetsByCount( - getExportsChunkSetsInGraph().chunkSetsInGraph.values() - ) - ); - - // Create a list of possible combinations - const createGetCombinations = ( - chunkSets, - singleChunkSets, - chunkSetsByCount - ) => { - /** @type {Map | Chunk)[]>} */ - const combinationsCache = new Map(); - - return key => { - const cacheEntry = combinationsCache.get(key); - if (cacheEntry !== undefined) return cacheEntry; - if (key instanceof Chunk) { - const result = [key]; - combinationsCache.set(key, result); - return result; - } - const chunksSet = chunkSets.get(key); - /** @type {(Set | Chunk)[]} */ - const array = [chunksSet]; - for (const [count, setArray] of chunkSetsByCount) { - // "equal" is not needed because they would have been merge in the first step - if (count < chunksSet.size) { - for (const set of setArray) { - if (isSubset(chunksSet, set)) { - array.push(set); - } - } - } - } - for (const chunk of singleChunkSets) { - if (chunksSet.has(chunk)) { - array.push(chunk); - } - } - combinationsCache.set(key, array); - return array; - }; - }; - - const getCombinationsFactory = memoize(() => { - const { chunkSetsInGraph, singleChunkSets } = getChunkSetsInGraph(); - return createGetCombinations( - chunkSetsInGraph, - singleChunkSets, - getChunkSetsByCount() - ); - }); - const getCombinations = key => getCombinationsFactory()(key); - - const getExportsCombinationsFactory = memoize(() => { - const { chunkSetsInGraph, singleChunkSets } = - getExportsChunkSetsInGraph(); - return createGetCombinations( - chunkSetsInGraph, - singleChunkSets, - getExportsChunkSetsByCount() - ); - }); - const getExportsCombinations = key => - getExportsCombinationsFactory()(key); - - /** - * @typedef {Object} SelectedChunksResult - * @property {Chunk[]} chunks the list of chunks - * @property {bigint | Chunk} key a key of the list - */ - - /** @type {WeakMap | Chunk, WeakMap>} */ - const selectedChunksCacheByChunksSet = new WeakMap(); - - /** - * get list and key by applying the filter function to the list - * It is cached for performance reasons - * @param {Set | Chunk} chunks list of chunks - * @param {ChunkFilterFunction} chunkFilter filter function for chunks - * @returns {SelectedChunksResult} list and key - */ - const getSelectedChunks = (chunks, chunkFilter) => { - let entry = selectedChunksCacheByChunksSet.get(chunks); - if (entry === undefined) { - entry = new WeakMap(); - selectedChunksCacheByChunksSet.set(chunks, entry); - } - /** @type {SelectedChunksResult} */ - let entry2 = entry.get(chunkFilter); - if (entry2 === undefined) { - /** @type {Chunk[]} */ - const selectedChunks = []; - if (chunks instanceof Chunk) { - if (chunkFilter(chunks)) selectedChunks.push(chunks); - } else { - for (const chunk of chunks) { - if (chunkFilter(chunk)) selectedChunks.push(chunk); - } - } - entry2 = { - chunks: selectedChunks, - key: getKey(selectedChunks) - }; - entry.set(chunkFilter, entry2); - } - return entry2; - }; - - /** @type {Map} */ - const alreadyValidatedParents = new Map(); - /** @type {Set} */ - const alreadyReportedErrors = new Set(); - - // Map a list of chunks to a list of modules - // For the key the chunk "index" is used, the value is a SortableSet of modules - /** @type {Map} */ - const chunksInfoMap = new Map(); - - /** - * @param {CacheGroup} cacheGroup the current cache group - * @param {number} cacheGroupIndex the index of the cache group of ordering - * @param {Chunk[]} selectedChunks chunks selected for this module - * @param {bigint | Chunk} selectedChunksKey a key of selectedChunks - * @param {Module} module the current module - * @returns {void} - */ - const addModuleToChunksInfoMap = ( - cacheGroup, - cacheGroupIndex, - selectedChunks, - selectedChunksKey, - module - ) => { - // Break if minimum number of chunks is not reached - if (selectedChunks.length < cacheGroup.minChunks) return; - // Determine name for split chunk - const name = cacheGroup.getName( - module, - selectedChunks, - cacheGroup.key - ); - // Check if the name is ok - const existingChunk = compilation.namedChunks.get(name); - if (existingChunk) { - const parentValidationKey = `${name}|${ - typeof selectedChunksKey === "bigint" - ? selectedChunksKey - : selectedChunksKey.debugId - }`; - const valid = alreadyValidatedParents.get(parentValidationKey); - if (valid === false) return; - if (valid === undefined) { - // Module can only be moved into the existing chunk if the existing chunk - // is a parent of all selected chunks - let isInAllParents = true; - /** @type {Set} */ - const queue = new Set(); - for (const chunk of selectedChunks) { - for (const group of chunk.groupsIterable) { - queue.add(group); - } - } - for (const group of queue) { - if (existingChunk.isInGroup(group)) continue; - let hasParent = false; - for (const parent of group.parentsIterable) { - hasParent = true; - queue.add(parent); - } - if (!hasParent) { - isInAllParents = false; - } - } - const valid = isInAllParents; - alreadyValidatedParents.set(parentValidationKey, valid); - if (!valid) { - if (!alreadyReportedErrors.has(name)) { - alreadyReportedErrors.add(name); - compilation.errors.push( - new WebpackError( - "SplitChunksPlugin\n" + - `Cache group "${cacheGroup.key}" conflicts with existing chunk.\n` + - `Both have the same name "${name}" and existing chunk is not a parent of the selected modules.\n` + - "Use a different name for the cache group or make sure that the existing chunk is a parent (e. g. via dependOn).\n" + - 'HINT: You can omit "name" to automatically create a name.\n' + - "BREAKING CHANGE: webpack < 5 used to allow to use an entrypoint as splitChunk. " + - "This is no longer allowed when the entrypoint is not a parent of the selected modules.\n" + - "Remove this entrypoint and add modules to cache group's 'test' instead. " + - "If you need modules to be evaluated on startup, add them to the existing entrypoints (make them arrays). " + - "See migration guide of more info." - ) - ); - } - return; - } - } - } - // Create key for maps - // When it has a name we use the name as key - // Otherwise we create the key from chunks and cache group key - // This automatically merges equal names - const key = - cacheGroup.key + - (name - ? ` name:${name}` - : ` chunks:${keyToString(selectedChunksKey)}`); - // Add module to maps - let info = chunksInfoMap.get(key); - if (info === undefined) { - chunksInfoMap.set( - key, - (info = { - modules: new SortableSet( - undefined, - compareModulesByIdentifier - ), - cacheGroup, - cacheGroupIndex, - name, - sizes: {}, - chunks: new Set(), - reuseableChunks: new Set(), - chunksKeys: new Set() - }) - ); - } - const oldSize = info.modules.size; - info.modules.add(module); - if (info.modules.size !== oldSize) { - for (const type of module.getSourceTypes()) { - info.sizes[type] = (info.sizes[type] || 0) + module.size(type); - } - } - const oldChunksKeysSize = info.chunksKeys.size; - info.chunksKeys.add(selectedChunksKey); - if (oldChunksKeysSize !== info.chunksKeys.size) { - for (const chunk of selectedChunks) { - info.chunks.add(chunk); - } - } - }; - - const context = { - moduleGraph, - chunkGraph - }; - - logger.timeEnd("prepare"); - - logger.time("modules"); - - // Walk through all modules - for (const module of compilation.modules) { - // Get cache group - let cacheGroups = this.options.getCacheGroups(module, context); - if (!Array.isArray(cacheGroups) || cacheGroups.length === 0) { - continue; - } - - // Prepare some values (usedExports = false) - const getCombs = memoize(() => { - const chunks = chunkGraph.getModuleChunksIterable(module); - const chunksKey = getKey(chunks); - return getCombinations(chunksKey); - }); - - // Prepare some values (usedExports = true) - const getCombsByUsedExports = memoize(() => { - // fill the groupedByExportsMap - getExportsChunkSetsInGraph(); - /** @type {Set | Chunk>} */ - const set = new Set(); - const groupedByUsedExports = groupedByExportsMap.get(module); - for (const chunks of groupedByUsedExports) { - const chunksKey = getKey(chunks); - for (const comb of getExportsCombinations(chunksKey)) - set.add(comb); - } - return set; - }); - - let cacheGroupIndex = 0; - for (const cacheGroupSource of cacheGroups) { - const cacheGroup = this._getCacheGroup(cacheGroupSource); - - const combs = cacheGroup.usedExports - ? getCombsByUsedExports() - : getCombs(); - // For all combination of chunk selection - for (const chunkCombination of combs) { - // Break if minimum number of chunks is not reached - const count = - chunkCombination instanceof Chunk ? 1 : chunkCombination.size; - if (count < cacheGroup.minChunks) continue; - // Select chunks by configuration - const { chunks: selectedChunks, key: selectedChunksKey } = - getSelectedChunks(chunkCombination, cacheGroup.chunksFilter); - - addModuleToChunksInfoMap( - cacheGroup, - cacheGroupIndex, - selectedChunks, - selectedChunksKey, - module - ); - } - cacheGroupIndex++; - } - } - - logger.timeEnd("modules"); - - logger.time("queue"); - - /** - * @param {ChunksInfoItem} info entry - * @param {string[]} sourceTypes source types to be removed - */ - const removeModulesWithSourceType = (info, sourceTypes) => { - for (const module of info.modules) { - const types = module.getSourceTypes(); - if (sourceTypes.some(type => types.has(type))) { - info.modules.delete(module); - for (const type of types) { - info.sizes[type] -= module.size(type); - } - } - } - }; - - /** - * @param {ChunksInfoItem} info entry - * @returns {boolean} true, if entry become empty - */ - const removeMinSizeViolatingModules = info => { - if (!info.cacheGroup._validateSize) return false; - const violatingSizes = getViolatingMinSizes( - info.sizes, - info.cacheGroup.minSize - ); - if (violatingSizes === undefined) return false; - removeModulesWithSourceType(info, violatingSizes); - return info.modules.size === 0; - }; - - // Filter items were size < minSize - for (const [key, info] of chunksInfoMap) { - if (removeMinSizeViolatingModules(info)) { - chunksInfoMap.delete(key); - } else if ( - !checkMinSizeReduction( - info.sizes, - info.cacheGroup.minSizeReduction, - info.chunks.size - ) - ) { - chunksInfoMap.delete(key); - } - } - - /** - * @typedef {Object} MaxSizeQueueItem - * @property {SplitChunksSizes} minSize - * @property {SplitChunksSizes} maxAsyncSize - * @property {SplitChunksSizes} maxInitialSize - * @property {string} automaticNameDelimiter - * @property {string[]} keys - */ - - /** @type {Map} */ - const maxSizeQueueMap = new Map(); - - while (chunksInfoMap.size > 0) { - // Find best matching entry - let bestEntryKey; - let bestEntry; - for (const pair of chunksInfoMap) { - const key = pair[0]; - const info = pair[1]; - if ( - bestEntry === undefined || - compareEntries(bestEntry, info) < 0 - ) { - bestEntry = info; - bestEntryKey = key; - } - } - - const item = bestEntry; - chunksInfoMap.delete(bestEntryKey); - - let chunkName = item.name; - // Variable for the new chunk (lazy created) - /** @type {Chunk} */ - let newChunk; - // When no chunk name, check if we can reuse a chunk instead of creating a new one - let isExistingChunk = false; - let isReusedWithAllModules = false; - if (chunkName) { - const chunkByName = compilation.namedChunks.get(chunkName); - if (chunkByName !== undefined) { - newChunk = chunkByName; - const oldSize = item.chunks.size; - item.chunks.delete(newChunk); - isExistingChunk = item.chunks.size !== oldSize; - } - } else if (item.cacheGroup.reuseExistingChunk) { - outer: for (const chunk of item.chunks) { - if ( - chunkGraph.getNumberOfChunkModules(chunk) !== - item.modules.size - ) { - continue; - } - if ( - item.chunks.size > 1 && - chunkGraph.getNumberOfEntryModules(chunk) > 0 - ) { - continue; - } - for (const module of item.modules) { - if (!chunkGraph.isModuleInChunk(module, chunk)) { - continue outer; - } - } - if (!newChunk || !newChunk.name) { - newChunk = chunk; - } else if ( - chunk.name && - chunk.name.length < newChunk.name.length - ) { - newChunk = chunk; - } else if ( - chunk.name && - chunk.name.length === newChunk.name.length && - chunk.name < newChunk.name - ) { - newChunk = chunk; - } - } - if (newChunk) { - item.chunks.delete(newChunk); - chunkName = undefined; - isExistingChunk = true; - isReusedWithAllModules = true; - } - } - - const enforced = - item.cacheGroup._conditionalEnforce && - checkMinSize(item.sizes, item.cacheGroup.enforceSizeThreshold); - - const usedChunks = new Set(item.chunks); - - // Check if maxRequests condition can be fulfilled - if ( - !enforced && - (Number.isFinite(item.cacheGroup.maxInitialRequests) || - Number.isFinite(item.cacheGroup.maxAsyncRequests)) - ) { - for (const chunk of usedChunks) { - // respect max requests - const maxRequests = chunk.isOnlyInitial() - ? item.cacheGroup.maxInitialRequests - : chunk.canBeInitial() - ? Math.min( - item.cacheGroup.maxInitialRequests, - item.cacheGroup.maxAsyncRequests - ) - : item.cacheGroup.maxAsyncRequests; - if ( - isFinite(maxRequests) && - getRequests(chunk) >= maxRequests - ) { - usedChunks.delete(chunk); - } - } - } - - outer: for (const chunk of usedChunks) { - for (const module of item.modules) { - if (chunkGraph.isModuleInChunk(module, chunk)) continue outer; - } - usedChunks.delete(chunk); - } - - // Were some (invalid) chunks removed from usedChunks? - // => readd all modules to the queue, as things could have been changed - if (usedChunks.size < item.chunks.size) { - if (isExistingChunk) usedChunks.add(newChunk); - if (usedChunks.size >= item.cacheGroup.minChunks) { - const chunksArr = Array.from(usedChunks); - for (const module of item.modules) { - addModuleToChunksInfoMap( - item.cacheGroup, - item.cacheGroupIndex, - chunksArr, - getKey(usedChunks), - module - ); - } - } - continue; - } - - // Validate minRemainingSize constraint when a single chunk is left over - if ( - !enforced && - item.cacheGroup._validateRemainingSize && - usedChunks.size === 1 - ) { - const [chunk] = usedChunks; - let chunkSizes = Object.create(null); - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (!item.modules.has(module)) { - for (const type of module.getSourceTypes()) { - chunkSizes[type] = - (chunkSizes[type] || 0) + module.size(type); - } - } - } - const violatingSizes = getViolatingMinSizes( - chunkSizes, - item.cacheGroup.minRemainingSize - ); - if (violatingSizes !== undefined) { - const oldModulesSize = item.modules.size; - removeModulesWithSourceType(item, violatingSizes); - if ( - item.modules.size > 0 && - item.modules.size !== oldModulesSize - ) { - // queue this item again to be processed again - // without violating modules - chunksInfoMap.set(bestEntryKey, item); - } - continue; - } - } - - // Create the new chunk if not reusing one - if (newChunk === undefined) { - newChunk = compilation.addChunk(chunkName); - } - // Walk through all chunks - for (const chunk of usedChunks) { - // Add graph connections for splitted chunk - chunk.split(newChunk); - } - - // Add a note to the chunk - newChunk.chunkReason = - (newChunk.chunkReason ? newChunk.chunkReason + ", " : "") + - (isReusedWithAllModules - ? "reused as split chunk" - : "split chunk"); - if (item.cacheGroup.key) { - newChunk.chunkReason += ` (cache group: ${item.cacheGroup.key})`; - } - if (chunkName) { - newChunk.chunkReason += ` (name: ${chunkName})`; - } - if (item.cacheGroup.filename) { - newChunk.filenameTemplate = item.cacheGroup.filename; - } - if (item.cacheGroup.idHint) { - newChunk.idNameHints.add(item.cacheGroup.idHint); - } - if (!isReusedWithAllModules) { - // Add all modules to the new chunk - for (const module of item.modules) { - if (!module.chunkCondition(newChunk, compilation)) continue; - // Add module to new chunk - chunkGraph.connectChunkAndModule(newChunk, module); - // Remove module from used chunks - for (const chunk of usedChunks) { - chunkGraph.disconnectChunkAndModule(chunk, module); - } - } - } else { - // Remove all modules from used chunks - for (const module of item.modules) { - for (const chunk of usedChunks) { - chunkGraph.disconnectChunkAndModule(chunk, module); - } - } - } - - if ( - Object.keys(item.cacheGroup.maxAsyncSize).length > 0 || - Object.keys(item.cacheGroup.maxInitialSize).length > 0 - ) { - const oldMaxSizeSettings = maxSizeQueueMap.get(newChunk); - maxSizeQueueMap.set(newChunk, { - minSize: oldMaxSizeSettings - ? combineSizes( - oldMaxSizeSettings.minSize, - item.cacheGroup._minSizeForMaxSize, - Math.max - ) - : item.cacheGroup.minSize, - maxAsyncSize: oldMaxSizeSettings - ? combineSizes( - oldMaxSizeSettings.maxAsyncSize, - item.cacheGroup.maxAsyncSize, - Math.min - ) - : item.cacheGroup.maxAsyncSize, - maxInitialSize: oldMaxSizeSettings - ? combineSizes( - oldMaxSizeSettings.maxInitialSize, - item.cacheGroup.maxInitialSize, - Math.min - ) - : item.cacheGroup.maxInitialSize, - automaticNameDelimiter: item.cacheGroup.automaticNameDelimiter, - keys: oldMaxSizeSettings - ? oldMaxSizeSettings.keys.concat(item.cacheGroup.key) - : [item.cacheGroup.key] - }); - } - - // remove all modules from other entries and update size - for (const [key, info] of chunksInfoMap) { - if (isOverlap(info.chunks, usedChunks)) { - // update modules and total size - // may remove it from the map when < minSize - let updated = false; - for (const module of item.modules) { - if (info.modules.has(module)) { - // remove module - info.modules.delete(module); - // update size - for (const key of module.getSourceTypes()) { - info.sizes[key] -= module.size(key); - } - updated = true; - } - } - if (updated) { - if (info.modules.size === 0) { - chunksInfoMap.delete(key); - continue; - } - if ( - removeMinSizeViolatingModules(info) || - !checkMinSizeReduction( - info.sizes, - info.cacheGroup.minSizeReduction, - info.chunks.size - ) - ) { - chunksInfoMap.delete(key); - continue; - } - } - } - } - } - - logger.timeEnd("queue"); - - logger.time("maxSize"); - - /** @type {Set} */ - const incorrectMinMaxSizeSet = new Set(); - - const { outputOptions } = compilation; - - // Make sure that maxSize is fulfilled - const { fallbackCacheGroup } = this.options; - for (const chunk of Array.from(compilation.chunks)) { - const chunkConfig = maxSizeQueueMap.get(chunk); - const { - minSize, - maxAsyncSize, - maxInitialSize, - automaticNameDelimiter - } = chunkConfig || fallbackCacheGroup; - if (!chunkConfig && !fallbackCacheGroup.chunksFilter(chunk)) - continue; - /** @type {SplitChunksSizes} */ - let maxSize; - if (chunk.isOnlyInitial()) { - maxSize = maxInitialSize; - } else if (chunk.canBeInitial()) { - maxSize = combineSizes(maxAsyncSize, maxInitialSize, Math.min); - } else { - maxSize = maxAsyncSize; - } - if (Object.keys(maxSize).length === 0) { - continue; - } - for (const key of Object.keys(maxSize)) { - const maxSizeValue = maxSize[key]; - const minSizeValue = minSize[key]; - if ( - typeof minSizeValue === "number" && - minSizeValue > maxSizeValue - ) { - const keys = chunkConfig && chunkConfig.keys; - const warningKey = `${ - keys && keys.join() - } ${minSizeValue} ${maxSizeValue}`; - if (!incorrectMinMaxSizeSet.has(warningKey)) { - incorrectMinMaxSizeSet.add(warningKey); - compilation.warnings.push( - new MinMaxSizeWarning(keys, minSizeValue, maxSizeValue) - ); - } - } - } - const results = deterministicGroupingForModules({ - minSize, - maxSize: mapObject(maxSize, (value, key) => { - const minSizeValue = minSize[key]; - return typeof minSizeValue === "number" - ? Math.max(value, minSizeValue) - : value; - }), - items: chunkGraph.getChunkModulesIterable(chunk), - getKey(module) { - const cache = getKeyCache.get(module); - if (cache !== undefined) return cache; - const ident = cachedMakePathsRelative(module.identifier()); - const nameForCondition = - module.nameForCondition && module.nameForCondition(); - const name = nameForCondition - ? cachedMakePathsRelative(nameForCondition) - : ident.replace(/^.*!|\?[^?!]*$/g, ""); - const fullKey = - name + - automaticNameDelimiter + - hashFilename(ident, outputOptions); - const key = requestToId(fullKey); - getKeyCache.set(module, key); - return key; - }, - getSize(module) { - const size = Object.create(null); - for (const key of module.getSourceTypes()) { - size[key] = module.size(key); - } - return size; - } - }); - if (results.length <= 1) { - continue; - } - for (let i = 0; i < results.length; i++) { - const group = results[i]; - const key = this.options.hidePathInfo - ? hashFilename(group.key, outputOptions) - : group.key; - let name = chunk.name - ? chunk.name + automaticNameDelimiter + key - : null; - if (name && name.length > 100) { - name = - name.slice(0, 100) + - automaticNameDelimiter + - hashFilename(name, outputOptions); - } - if (i !== results.length - 1) { - const newPart = compilation.addChunk(name); - chunk.split(newPart); - newPart.chunkReason = chunk.chunkReason; - // Add all modules to the new chunk - for (const module of group.items) { - if (!module.chunkCondition(newPart, compilation)) { - continue; - } - // Add module to new chunk - chunkGraph.connectChunkAndModule(newPart, module); - // Remove module from used chunks - chunkGraph.disconnectChunkAndModule(chunk, module); - } - } else { - // change the chunk to be a part - chunk.name = name; - } - } - } - logger.timeEnd("maxSize"); - } - ); - }); - } -}; - - -/***/ }), - -/***/ 41778: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const { formatSize } = __webpack_require__(67309); -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./SizeLimitsPlugin").AssetDetails} AssetDetails */ - -module.exports = class AssetsOverSizeLimitWarning extends WebpackError { - /** - * @param {AssetDetails[]} assetsOverSizeLimit the assets - * @param {number} assetLimit the size limit - */ - constructor(assetsOverSizeLimit, assetLimit) { - const assetLists = assetsOverSizeLimit - .map(asset => `\n ${asset.name} (${formatSize(asset.size)})`) - .join(""); - - super(`asset size limit: The following asset(s) exceed the recommended size limit (${formatSize( - assetLimit - )}). -This can impact web performance. -Assets: ${assetLists}`); - - this.name = "AssetsOverSizeLimitWarning"; - this.assets = assetsOverSizeLimit; - } -}; - - -/***/ }), - -/***/ 59439: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const { formatSize } = __webpack_require__(67309); -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("./SizeLimitsPlugin").EntrypointDetails} EntrypointDetails */ - -module.exports = class EntrypointsOverSizeLimitWarning extends WebpackError { - /** - * @param {EntrypointDetails[]} entrypoints the entrypoints - * @param {number} entrypointLimit the size limit - */ - constructor(entrypoints, entrypointLimit) { - const entrypointList = entrypoints - .map( - entrypoint => - `\n ${entrypoint.name} (${formatSize( - entrypoint.size - )})\n${entrypoint.files.map(asset => ` ${asset}`).join("\n")}` - ) - .join(""); - super(`entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (${formatSize( - entrypointLimit - )}). This can impact web performance. -Entrypoints:${entrypointList}\n`); - - this.name = "EntrypointsOverSizeLimitWarning"; - this.entrypoints = entrypoints; - } -}; - - -/***/ }), - -/***/ 91208: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const WebpackError = __webpack_require__(27154); - -module.exports = class NoAsyncChunksWarning extends WebpackError { - constructor() { - super( - "webpack performance recommendations: \n" + - "You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\n" + - "For more info visit https://webpack.js.org/guides/code-splitting/" - ); - - this.name = "NoAsyncChunksWarning"; - } -}; - - -/***/ }), - -/***/ 96740: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - - - -const { find } = __webpack_require__(73268); -const AssetsOverSizeLimitWarning = __webpack_require__(41778); -const EntrypointsOverSizeLimitWarning = __webpack_require__(59439); -const NoAsyncChunksWarning = __webpack_require__(91208); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../../declarations/WebpackOptions").PerformanceOptions} PerformanceOptions */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Entrypoint")} Entrypoint */ -/** @typedef {import("../WebpackError")} WebpackError */ - -/** - * @typedef {Object} AssetDetails - * @property {string} name - * @property {number} size - */ - -/** - * @typedef {Object} EntrypointDetails - * @property {string} name - * @property {number} size - * @property {string[]} files - */ - -const isOverSizeLimitSet = new WeakSet(); - -const excludeSourceMap = (name, source, info) => !info.development; - -module.exports = class SizeLimitsPlugin { - /** - * @param {PerformanceOptions} options the plugin options - */ - constructor(options) { - this.hints = options.hints; - this.maxAssetSize = options.maxAssetSize; - this.maxEntrypointSize = options.maxEntrypointSize; - this.assetFilter = options.assetFilter; - } - - /** - * @param {ChunkGroup | Source} thing the resource to test - * @returns {boolean} true if over the limit - */ - static isOverSizeLimit(thing) { - return isOverSizeLimitSet.has(thing); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const entrypointSizeLimit = this.maxEntrypointSize; - const assetSizeLimit = this.maxAssetSize; - const hints = this.hints; - const assetFilter = this.assetFilter || excludeSourceMap; - - compiler.hooks.afterEmit.tap("SizeLimitsPlugin", compilation => { - /** @type {WebpackError[]} */ - const warnings = []; - - /** - * @param {Entrypoint} entrypoint an entrypoint - * @returns {number} the size of the entrypoint - */ - const getEntrypointSize = entrypoint => { - let size = 0; - for (const file of entrypoint.getFiles()) { - const asset = compilation.getAsset(file); - if ( - asset && - assetFilter(asset.name, asset.source, asset.info) && - asset.source - ) { - size += asset.info.size || asset.source.size(); - } - } - return size; - }; - - /** @type {AssetDetails[]} */ - const assetsOverSizeLimit = []; - for (const { name, source, info } of compilation.getAssets()) { - if (!assetFilter(name, source, info) || !source) { - continue; - } - - const size = info.size || source.size(); - if (size > assetSizeLimit) { - assetsOverSizeLimit.push({ - name, - size - }); - isOverSizeLimitSet.add(source); - } - } - - const fileFilter = name => { - const asset = compilation.getAsset(name); - return asset && assetFilter(asset.name, asset.source, asset.info); - }; - - /** @type {EntrypointDetails[]} */ - const entrypointsOverLimit = []; - for (const [name, entry] of compilation.entrypoints) { - const size = getEntrypointSize(entry); - - if (size > entrypointSizeLimit) { - entrypointsOverLimit.push({ - name: name, - size: size, - files: entry.getFiles().filter(fileFilter) - }); - isOverSizeLimitSet.add(entry); - } - } - - if (hints) { - // 1. Individual Chunk: Size < 250kb - // 2. Collective Initial Chunks [entrypoint] (Each Set?): Size < 250kb - // 3. No Async Chunks - // if !1, then 2, if !2 return - if (assetsOverSizeLimit.length > 0) { - warnings.push( - new AssetsOverSizeLimitWarning(assetsOverSizeLimit, assetSizeLimit) - ); - } - if (entrypointsOverLimit.length > 0) { - warnings.push( - new EntrypointsOverSizeLimitWarning( - entrypointsOverLimit, - entrypointSizeLimit - ) - ); - } - - if (warnings.length > 0) { - const someAsyncChunk = find( - compilation.chunks, - chunk => !chunk.canBeInitial() - ); - - if (!someAsyncChunk) { - warnings.push(new NoAsyncChunksWarning()); - } - - if (hints === "error") { - compilation.errors.push(...warnings); - } else { - compilation.warnings.push(...warnings); - } - } - } - }); - } -}; - - -/***/ }), - -/***/ 72913: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -class ChunkPrefetchFunctionRuntimeModule extends RuntimeModule { - /** - * @param {string} childType TODO - * @param {string} runtimeFunction TODO - * @param {string} runtimeHandlers TODO - */ - constructor(childType, runtimeFunction, runtimeHandlers) { - super(`chunk ${childType} function`); - this.childType = childType; - this.runtimeFunction = runtimeFunction; - this.runtimeHandlers = runtimeHandlers; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeFunction, runtimeHandlers } = this; - const { runtimeTemplate } = this.compilation; - return Template.asString([ - `${runtimeHandlers} = {};`, - `${runtimeFunction} = ${runtimeTemplate.basicFunction("chunkId", [ - // map is shorter than forEach - `Object.keys(${runtimeHandlers}).map(${runtimeTemplate.basicFunction( - "key", - `${runtimeHandlers}[key](chunkId);` - )});` - ])}` - ]); - } -} - -module.exports = ChunkPrefetchFunctionRuntimeModule; - - -/***/ }), - -/***/ 7006: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const ChunkPrefetchFunctionRuntimeModule = __webpack_require__(72913); -const ChunkPrefetchStartupRuntimeModule = __webpack_require__(80767); -const ChunkPrefetchTriggerRuntimeModule = __webpack_require__(38730); -const ChunkPreloadTriggerRuntimeModule = __webpack_require__(89870); - -/** @typedef {import("../Compiler")} Compiler */ - -class ChunkPrefetchPreloadPlugin { - /** - * @param {Compiler} compiler the compiler - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "ChunkPrefetchPreloadPlugin", - compilation => { - compilation.hooks.additionalChunkRuntimeRequirements.tap( - "ChunkPrefetchPreloadPlugin", - (chunk, set, { chunkGraph }) => { - if (chunkGraph.getNumberOfEntryModules(chunk) === 0) return; - const startupChildChunks = chunk.getChildrenOfTypeInOrder( - chunkGraph, - "prefetchOrder" - ); - if (startupChildChunks) { - set.add(RuntimeGlobals.prefetchChunk); - set.add(RuntimeGlobals.onChunksLoaded); - compilation.addRuntimeModule( - chunk, - new ChunkPrefetchStartupRuntimeModule(startupChildChunks) - ); - } - } - ); - compilation.hooks.additionalTreeRuntimeRequirements.tap( - "ChunkPrefetchPreloadPlugin", - (chunk, set, { chunkGraph }) => { - const chunkMap = chunk.getChildIdsByOrdersMap(chunkGraph, false); - - if (chunkMap.prefetch) { - set.add(RuntimeGlobals.prefetchChunk); - compilation.addRuntimeModule( - chunk, - new ChunkPrefetchTriggerRuntimeModule(chunkMap.prefetch) - ); - } - if (chunkMap.preload) { - set.add(RuntimeGlobals.preloadChunk); - compilation.addRuntimeModule( - chunk, - new ChunkPreloadTriggerRuntimeModule(chunkMap.preload) - ); - } - } - ); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.prefetchChunk) - .tap("ChunkPrefetchPreloadPlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new ChunkPrefetchFunctionRuntimeModule( - "prefetch", - RuntimeGlobals.prefetchChunk, - RuntimeGlobals.prefetchChunkHandlers - ) - ); - set.add(RuntimeGlobals.prefetchChunkHandlers); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.preloadChunk) - .tap("ChunkPrefetchPreloadPlugin", (chunk, set) => { - compilation.addRuntimeModule( - chunk, - new ChunkPrefetchFunctionRuntimeModule( - "preload", - RuntimeGlobals.preloadChunk, - RuntimeGlobals.preloadChunkHandlers - ) - ); - set.add(RuntimeGlobals.preloadChunkHandlers); - }); - } - ); - } -} - -module.exports = ChunkPrefetchPreloadPlugin; - - -/***/ }), - -/***/ 80767: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -class ChunkPrefetchStartupRuntimeModule extends RuntimeModule { - /** - * @param {{ onChunks: Chunk[], chunks: Set }[]} startupChunks chunk ids to trigger when chunks are loaded - */ - constructor(startupChunks) { - super("startup prefetch", RuntimeModule.STAGE_TRIGGER); - this.startupChunks = startupChunks; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { startupChunks, chunk } = this; - const { runtimeTemplate } = this.compilation; - return Template.asString( - startupChunks.map( - ({ onChunks, chunks }) => - `${RuntimeGlobals.onChunksLoaded}(0, ${JSON.stringify( - // This need to include itself to delay execution after this chunk has been fully loaded - onChunks.filter(c => c === chunk).map(c => c.id) - )}, ${runtimeTemplate.basicFunction( - "", - chunks.size < 3 - ? Array.from( - chunks, - c => - `${RuntimeGlobals.prefetchChunk}(${JSON.stringify(c.id)});` - ) - : `${JSON.stringify(Array.from(chunks, c => c.id))}.map(${ - RuntimeGlobals.prefetchChunk - });` - )}, 5);` - ) - ); - } -} - -module.exports = ChunkPrefetchStartupRuntimeModule; - - -/***/ }), - -/***/ 38730: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -class ChunkPrefetchTriggerRuntimeModule extends RuntimeModule { - /** - * @param {Record} chunkMap map from chunk to - */ - constructor(chunkMap) { - super(`chunk prefetch trigger`, RuntimeModule.STAGE_TRIGGER); - this.chunkMap = chunkMap; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkMap } = this; - const { runtimeTemplate } = this.compilation; - const body = [ - "var chunks = chunkToChildrenMap[chunkId];", - `Array.isArray(chunks) && chunks.map(${RuntimeGlobals.prefetchChunk});` - ]; - return Template.asString([ - Template.asString([ - `var chunkToChildrenMap = ${JSON.stringify(chunkMap, null, "\t")};`, - `${ - RuntimeGlobals.ensureChunkHandlers - }.prefetch = ${runtimeTemplate.expressionFunction( - `Promise.all(promises).then(${runtimeTemplate.basicFunction( - "", - body - )})`, - "chunkId, promises" - )};` - ]) - ]); - } -} - -module.exports = ChunkPrefetchTriggerRuntimeModule; - - -/***/ }), - -/***/ 89870: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -class ChunkPreloadTriggerRuntimeModule extends RuntimeModule { - /** - * @param {Record} chunkMap map from chunk to chunks - */ - constructor(chunkMap) { - super(`chunk preload trigger`, RuntimeModule.STAGE_TRIGGER); - this.chunkMap = chunkMap; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkMap } = this; - const { runtimeTemplate } = this.compilation; - const body = [ - "var chunks = chunkToChildrenMap[chunkId];", - `Array.isArray(chunks) && chunks.map(${RuntimeGlobals.preloadChunk});` - ]; - return Template.asString([ - Template.asString([ - `var chunkToChildrenMap = ${JSON.stringify(chunkMap, null, "\t")};`, - `${ - RuntimeGlobals.ensureChunkHandlers - }.preload = ${runtimeTemplate.basicFunction("chunkId", body)};` - ]) - ]); - } -} - -module.exports = ChunkPreloadTriggerRuntimeModule; - - -/***/ }), - -/***/ 19110: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ - -class BasicEffectRulePlugin { - constructor(ruleProperty, effectType) { - this.ruleProperty = ruleProperty; - this.effectType = effectType || ruleProperty; - } - - /** - * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler - * @returns {void} - */ - apply(ruleSetCompiler) { - ruleSetCompiler.hooks.rule.tap( - "BasicEffectRulePlugin", - (path, rule, unhandledProperties, result, references) => { - if (unhandledProperties.has(this.ruleProperty)) { - unhandledProperties.delete(this.ruleProperty); - - const value = rule[this.ruleProperty]; - - result.effects.push({ - type: this.effectType, - value - }); - } - } - ); - } -} - -module.exports = BasicEffectRulePlugin; - - -/***/ }), - -/***/ 85732: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ -/** @typedef {import("./RuleSetCompiler").RuleCondition} RuleCondition */ - -class BasicMatcherRulePlugin { - constructor(ruleProperty, dataProperty, invert) { - this.ruleProperty = ruleProperty; - this.dataProperty = dataProperty || ruleProperty; - this.invert = invert || false; - } - - /** - * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler - * @returns {void} - */ - apply(ruleSetCompiler) { - ruleSetCompiler.hooks.rule.tap( - "BasicMatcherRulePlugin", - (path, rule, unhandledProperties, result) => { - if (unhandledProperties.has(this.ruleProperty)) { - unhandledProperties.delete(this.ruleProperty); - const value = rule[this.ruleProperty]; - const condition = ruleSetCompiler.compileCondition( - `${path}.${this.ruleProperty}`, - value - ); - const fn = condition.fn; - result.conditions.push({ - property: this.dataProperty, - matchWhenEmpty: this.invert - ? !condition.matchWhenEmpty - : condition.matchWhenEmpty, - fn: this.invert ? v => !fn(v) : fn - }); - } - } - ); - } -} - -module.exports = BasicMatcherRulePlugin; - - -/***/ }), - -/***/ 75802: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ -/** @typedef {import("./RuleSetCompiler").RuleCondition} RuleCondition */ - -class ObjectMatcherRulePlugin { - constructor(ruleProperty, dataProperty) { - this.ruleProperty = ruleProperty; - this.dataProperty = dataProperty || ruleProperty; - } - - /** - * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler - * @returns {void} - */ - apply(ruleSetCompiler) { - const { ruleProperty, dataProperty } = this; - ruleSetCompiler.hooks.rule.tap( - "ObjectMatcherRulePlugin", - (path, rule, unhandledProperties, result) => { - if (unhandledProperties.has(ruleProperty)) { - unhandledProperties.delete(ruleProperty); - const value = rule[ruleProperty]; - for (const property of Object.keys(value)) { - const nestedDataProperties = property.split("."); - const condition = ruleSetCompiler.compileCondition( - `${path}.${ruleProperty}.${property}`, - value[property] - ); - result.conditions.push({ - property: [dataProperty, ...nestedDataProperties], - matchWhenEmpty: condition.matchWhenEmpty, - fn: condition.fn - }); - } - } - } - ); - } -} - -module.exports = ObjectMatcherRulePlugin; - - -/***/ }), - -/***/ 53059: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncHook } = __webpack_require__(44217); - -/** - * @typedef {Object} RuleCondition - * @property {string | string[]} property - * @property {boolean} matchWhenEmpty - * @property {function(string): boolean} fn - */ - -/** - * @typedef {Object} Condition - * @property {boolean} matchWhenEmpty - * @property {function(string): boolean} fn - */ - -/** - * @typedef {Object} CompiledRule - * @property {RuleCondition[]} conditions - * @property {(Effect|function(object): Effect[])[]} effects - * @property {CompiledRule[]=} rules - * @property {CompiledRule[]=} oneOf - */ - -/** - * @typedef {Object} Effect - * @property {string} type - * @property {any} value - */ - -/** - * @typedef {Object} RuleSet - * @property {Map} references map of references in the rule set (may grow over time) - * @property {function(object): Effect[]} exec execute the rule set - */ - -class RuleSetCompiler { - constructor(plugins) { - this.hooks = Object.freeze({ - /** @type {SyncHook<[string, object, Set, CompiledRule, Map]>} */ - rule: new SyncHook([ - "path", - "rule", - "unhandledProperties", - "compiledRule", - "references" - ]) - }); - if (plugins) { - for (const plugin of plugins) { - plugin.apply(this); - } - } - } - - /** - * @param {object[]} ruleSet raw user provided rules - * @returns {RuleSet} compiled RuleSet - */ - compile(ruleSet) { - const refs = new Map(); - const rules = this.compileRules("ruleSet", ruleSet, refs); - - /** - * @param {object} data data passed in - * @param {CompiledRule} rule the compiled rule - * @param {Effect[]} effects an array where effects are pushed to - * @returns {boolean} true, if the rule has matched - */ - const execRule = (data, rule, effects) => { - for (const condition of rule.conditions) { - const p = condition.property; - if (Array.isArray(p)) { - let current = data; - for (const subProperty of p) { - if ( - current && - typeof current === "object" && - Object.prototype.hasOwnProperty.call(current, subProperty) - ) { - current = current[subProperty]; - } else { - current = undefined; - break; - } - } - if (current !== undefined) { - if (!condition.fn(current)) return false; - continue; - } - } else if (p in data) { - const value = data[p]; - if (value !== undefined) { - if (!condition.fn(value)) return false; - continue; - } - } - if (!condition.matchWhenEmpty) { - return false; - } - } - for (const effect of rule.effects) { - if (typeof effect === "function") { - const returnedEffects = effect(data); - for (const effect of returnedEffects) { - effects.push(effect); - } - } else { - effects.push(effect); - } - } - if (rule.rules) { - for (const childRule of rule.rules) { - execRule(data, childRule, effects); - } - } - if (rule.oneOf) { - for (const childRule of rule.oneOf) { - if (execRule(data, childRule, effects)) { - break; - } - } - } - return true; - }; - - return { - references: refs, - exec: data => { - /** @type {Effect[]} */ - const effects = []; - for (const rule of rules) { - execRule(data, rule, effects); - } - return effects; - } - }; - } - - /** - * @param {string} path current path - * @param {object[]} rules the raw rules provided by user - * @param {Map} refs references - * @returns {CompiledRule[]} rules - */ - compileRules(path, rules, refs) { - return rules.map((rule, i) => - this.compileRule(`${path}[${i}]`, rule, refs) - ); - } - - /** - * @param {string} path current path - * @param {object} rule the raw rule provided by user - * @param {Map} refs references - * @returns {CompiledRule} normalized and compiled rule for processing - */ - compileRule(path, rule, refs) { - const unhandledProperties = new Set( - Object.keys(rule).filter(key => rule[key] !== undefined) - ); - - /** @type {CompiledRule} */ - const compiledRule = { - conditions: [], - effects: [], - rules: undefined, - oneOf: undefined - }; - - this.hooks.rule.call(path, rule, unhandledProperties, compiledRule, refs); - - if (unhandledProperties.has("rules")) { - unhandledProperties.delete("rules"); - const rules = rule.rules; - if (!Array.isArray(rules)) - throw this.error(path, rules, "Rule.rules must be an array of rules"); - compiledRule.rules = this.compileRules(`${path}.rules`, rules, refs); - } - - if (unhandledProperties.has("oneOf")) { - unhandledProperties.delete("oneOf"); - const oneOf = rule.oneOf; - if (!Array.isArray(oneOf)) - throw this.error(path, oneOf, "Rule.oneOf must be an array of rules"); - compiledRule.oneOf = this.compileRules(`${path}.oneOf`, oneOf, refs); - } - - if (unhandledProperties.size > 0) { - throw this.error( - path, - rule, - `Properties ${Array.from(unhandledProperties).join(", ")} are unknown` - ); - } - - return compiledRule; - } - - /** - * @param {string} path current path - * @param {any} condition user provided condition value - * @returns {Condition} compiled condition - */ - compileCondition(path, condition) { - if (condition === "") { - return { - matchWhenEmpty: true, - fn: str => str === "" - }; - } - if (!condition) { - throw this.error( - path, - condition, - "Expected condition but got falsy value" - ); - } - if (typeof condition === "string") { - return { - matchWhenEmpty: condition.length === 0, - fn: str => typeof str === "string" && str.startsWith(condition) - }; - } - if (typeof condition === "function") { - try { - return { - matchWhenEmpty: condition(""), - fn: condition - }; - } catch (err) { - throw this.error( - path, - condition, - "Evaluation of condition function threw error" - ); - } - } - if (condition instanceof RegExp) { - return { - matchWhenEmpty: condition.test(""), - fn: v => typeof v === "string" && condition.test(v) - }; - } - if (Array.isArray(condition)) { - const items = condition.map((c, i) => - this.compileCondition(`${path}[${i}]`, c) - ); - return this.combineConditionsOr(items); - } - - if (typeof condition !== "object") { - throw this.error( - path, - condition, - `Unexpected ${typeof condition} when condition was expected` - ); - } - - const conditions = []; - for (const key of Object.keys(condition)) { - const value = condition[key]; - switch (key) { - case "or": - if (value) { - if (!Array.isArray(value)) { - throw this.error( - `${path}.or`, - condition.and, - "Expected array of conditions" - ); - } - conditions.push(this.compileCondition(`${path}.or`, value)); - } - break; - case "and": - if (value) { - if (!Array.isArray(value)) { - throw this.error( - `${path}.and`, - condition.and, - "Expected array of conditions" - ); - } - let i = 0; - for (const item of value) { - conditions.push(this.compileCondition(`${path}.and[${i}]`, item)); - i++; - } - } - break; - case "not": - if (value) { - const matcher = this.compileCondition(`${path}.not`, value); - const fn = matcher.fn; - conditions.push({ - matchWhenEmpty: !matcher.matchWhenEmpty, - fn: v => !fn(v) - }); - } - break; - default: - throw this.error( - `${path}.${key}`, - condition[key], - `Unexpected property ${key} in condition` - ); - } - } - if (conditions.length === 0) { - throw this.error( - path, - condition, - "Expected condition, but got empty thing" - ); - } - return this.combineConditionsAnd(conditions); - } - - /** - * @param {Condition[]} conditions some conditions - * @returns {Condition} merged condition - */ - combineConditionsOr(conditions) { - if (conditions.length === 0) { - return { - matchWhenEmpty: false, - fn: () => false - }; - } else if (conditions.length === 1) { - return conditions[0]; - } else { - return { - matchWhenEmpty: conditions.some(c => c.matchWhenEmpty), - fn: v => conditions.some(c => c.fn(v)) - }; - } - } - - /** - * @param {Condition[]} conditions some conditions - * @returns {Condition} merged condition - */ - combineConditionsAnd(conditions) { - if (conditions.length === 0) { - return { - matchWhenEmpty: false, - fn: () => false - }; - } else if (conditions.length === 1) { - return conditions[0]; - } else { - return { - matchWhenEmpty: conditions.every(c => c.matchWhenEmpty), - fn: v => conditions.every(c => c.fn(v)) - }; - } - } - - /** - * @param {string} path current path - * @param {any} value value at the error location - * @param {string} message message explaining the problem - * @returns {Error} an error object - */ - error(path, value, message) { - return new Error( - `Compiling RuleSet failed: ${message} (at ${path}: ${value})` - ); - } -} - -module.exports = RuleSetCompiler; - - -/***/ }), - -/***/ 67859: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); - -/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ -/** @typedef {import("./RuleSetCompiler").Effect} Effect */ - -class UseEffectRulePlugin { - /** - * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler - * @returns {void} - */ - apply(ruleSetCompiler) { - ruleSetCompiler.hooks.rule.tap( - "UseEffectRulePlugin", - (path, rule, unhandledProperties, result, references) => { - const conflictWith = (property, correctProperty) => { - if (unhandledProperties.has(property)) { - throw ruleSetCompiler.error( - `${path}.${property}`, - rule[property], - `A Rule must not have a '${property}' property when it has a '${correctProperty}' property` - ); - } - }; - - if (unhandledProperties.has("use")) { - unhandledProperties.delete("use"); - unhandledProperties.delete("enforce"); - - conflictWith("loader", "use"); - conflictWith("options", "use"); - - const use = rule.use; - const enforce = rule.enforce; - - const type = enforce ? `use-${enforce}` : "use"; - - /** - * - * @param {string} path options path - * @param {string} defaultIdent default ident when none is provided - * @param {object} item user provided use value - * @returns {Effect|function(any): Effect[]} effect - */ - const useToEffect = (path, defaultIdent, item) => { - if (typeof item === "function") { - return data => useToEffectsWithoutIdent(path, item(data)); - } else { - return useToEffectRaw(path, defaultIdent, item); - } - }; - - /** - * - * @param {string} path options path - * @param {string} defaultIdent default ident when none is provided - * @param {object} item user provided use value - * @returns {Effect} effect - */ - const useToEffectRaw = (path, defaultIdent, item) => { - if (typeof item === "string") { - return { - type, - value: { - loader: item, - options: undefined, - ident: undefined - } - }; - } else { - const loader = item.loader; - const options = item.options; - let ident = item.ident; - if (options && typeof options === "object") { - if (!ident) ident = defaultIdent; - references.set(ident, options); - } - if (typeof options === "string") { - util.deprecate( - () => {}, - `Using a string as loader options is deprecated (${path}.options)`, - "DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING" - )(); - } - return { - type: enforce ? `use-${enforce}` : "use", - value: { - loader, - options, - ident - } - }; - } - }; - - /** - * @param {string} path options path - * @param {any} items user provided use value - * @returns {Effect[]} effects - */ - const useToEffectsWithoutIdent = (path, items) => { - if (Array.isArray(items)) { - return items.map((item, idx) => - useToEffectRaw(`${path}[${idx}]`, "[[missing ident]]", item) - ); - } - return [useToEffectRaw(path, "[[missing ident]]", items)]; - }; - - /** - * @param {string} path current path - * @param {any} items user provided use value - * @returns {(Effect|function(any): Effect[])[]} effects - */ - const useToEffects = (path, items) => { - if (Array.isArray(items)) { - return items.map((item, idx) => { - const subPath = `${path}[${idx}]`; - return useToEffect(subPath, subPath, item); - }); - } - return [useToEffect(path, path, items)]; - }; - - if (typeof use === "function") { - result.effects.push(data => - useToEffectsWithoutIdent(`${path}.use`, use(data)) - ); - } else { - for (const effect of useToEffects(`${path}.use`, use)) { - result.effects.push(effect); - } - } - } - - if (unhandledProperties.has("loader")) { - unhandledProperties.delete("loader"); - unhandledProperties.delete("options"); - unhandledProperties.delete("enforce"); - - const loader = rule.loader; - const options = rule.options; - const enforce = rule.enforce; - - if (loader.includes("!")) { - throw ruleSetCompiler.error( - `${path}.loader`, - loader, - "Exclamation mark separated loader lists has been removed in favor of the 'use' property with arrays" - ); - } - - if (loader.includes("?")) { - throw ruleSetCompiler.error( - `${path}.loader`, - loader, - "Query arguments on 'loader' has been removed in favor of the 'options' property" - ); - } - - if (typeof options === "string") { - util.deprecate( - () => {}, - `Using a string as loader options is deprecated (${path}.options)`, - "DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING" - )(); - } - - const ident = - options && typeof options === "object" ? path : undefined; - references.set(ident, options); - result.effects.push({ - type: enforce ? `use-${enforce}` : "use", - value: { - loader, - options, - ident - } - }); - } - } - ); - } - - useItemToEffects(path, item) {} -} - -module.exports = UseEffectRulePlugin; - - -/***/ }), - -/***/ 57969: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class AsyncModuleRuntimeModule extends HelperRuntimeModule { - constructor() { - super("async module"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.asyncModule; - return Template.asString([ - 'var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";', - 'var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";', - 'var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";', - `var resolveQueue = ${runtimeTemplate.basicFunction("queue", [ - "if(queue && !queue.d) {", - Template.indent([ - "queue.d = 1;", - `queue.forEach(${runtimeTemplate.expressionFunction( - "fn.r--", - "fn" - )});`, - `queue.forEach(${runtimeTemplate.expressionFunction( - "fn.r-- ? fn.r++ : fn()", - "fn" - )});` - ]), - "}" - ])}`, - `var wrapDeps = ${runtimeTemplate.returningFunction( - `deps.map(${runtimeTemplate.basicFunction("dep", [ - 'if(dep !== null && typeof dep === "object") {', - Template.indent([ - "if(dep[webpackQueues]) return dep;", - "if(dep.then) {", - Template.indent([ - "var queue = [];", - "queue.d = 0;", - `dep.then(${runtimeTemplate.basicFunction("r", [ - "obj[webpackExports] = r;", - "resolveQueue(queue);" - ])}, ${runtimeTemplate.basicFunction("e", [ - "obj[webpackError] = e;", - "resolveQueue(queue);" - ])});`, - "var obj = {};", - `obj[webpackQueues] = ${runtimeTemplate.expressionFunction( - `fn(queue)`, - "fn" - )};`, - "return obj;" - ]), - "}" - ]), - "}", - "var ret = {};", - `ret[webpackQueues] = ${runtimeTemplate.emptyFunction()};`, - "ret[webpackExports] = dep;", - "return ret;" - ])})`, - "deps" - )};`, - `${fn} = ${runtimeTemplate.basicFunction("module, body, hasAwait", [ - "var queue;", - "hasAwait && ((queue = []).d = 1);", - "var depQueues = new Set();", - "var exports = module.exports;", - "var currentDeps;", - "var outerResolve;", - "var reject;", - `var promise = new Promise(${runtimeTemplate.basicFunction( - "resolve, rej", - ["reject = rej;", "outerResolve = resolve;"] - )});`, - "promise[webpackExports] = exports;", - `promise[webpackQueues] = ${runtimeTemplate.expressionFunction( - `queue && fn(queue), depQueues.forEach(fn), promise["catch"](${runtimeTemplate.emptyFunction()})`, - "fn" - )};`, - "module.exports = promise;", - `body(${runtimeTemplate.basicFunction("deps", [ - "currentDeps = wrapDeps(deps);", - "var fn;", - `var getResult = ${runtimeTemplate.returningFunction( - `currentDeps.map(${runtimeTemplate.basicFunction("d", [ - "if(d[webpackError]) throw d[webpackError];", - "return d[webpackExports];" - ])})` - )}`, - `var promise = new Promise(${runtimeTemplate.basicFunction( - "resolve", - [ - `fn = ${runtimeTemplate.expressionFunction( - "resolve(getResult)", - "" - )};`, - "fn.r = 0;", - `var fnQueue = ${runtimeTemplate.expressionFunction( - "q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))", - "q" - )};`, - `currentDeps.map(${runtimeTemplate.expressionFunction( - "dep[webpackQueues](fnQueue)", - "dep" - )});` - ] - )});`, - "return fn.r ? promise : getResult();" - ])}, ${runtimeTemplate.expressionFunction( - "(err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)", - "err" - )});`, - "queue && (queue.d = 0);" - ])};` - ]); - } -} - -module.exports = AsyncModuleRuntimeModule; - - -/***/ }), - -/***/ 48178: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const JavascriptModulesPlugin = __webpack_require__(36109); -const { getUndoPath } = __webpack_require__(20162); - -class AutoPublicPathRuntimeModule extends RuntimeModule { - constructor() { - super("publicPath", RuntimeModule.STAGE_BASIC); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { scriptType, importMetaName, path } = compilation.outputOptions; - const chunkName = compilation.getPath( - JavascriptModulesPlugin.getChunkFilenameTemplate( - this.chunk, - compilation.outputOptions - ), - { - chunk: this.chunk, - contentHashType: "javascript" - } - ); - const undoPath = getUndoPath(chunkName, path, false); - - return Template.asString([ - "var scriptUrl;", - scriptType === "module" - ? `if (typeof ${importMetaName}.url === "string") scriptUrl = ${importMetaName}.url` - : Template.asString([ - `if (${RuntimeGlobals.global}.importScripts) scriptUrl = ${RuntimeGlobals.global}.location + "";`, - `var document = ${RuntimeGlobals.global}.document;`, - "if (!scriptUrl && document) {", - Template.indent([ - `if (document.currentScript)`, - Template.indent(`scriptUrl = document.currentScript.src`), - "if (!scriptUrl) {", - Template.indent([ - 'var scripts = document.getElementsByTagName("script");', - "if(scripts.length) scriptUrl = scripts[scripts.length - 1].src" - ]), - "}" - ]), - "}" - ]), - "// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", - '// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', - 'if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");', - 'scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/");', - !undoPath - ? `${RuntimeGlobals.publicPath} = scriptUrl;` - : `${RuntimeGlobals.publicPath} = scriptUrl + ${JSON.stringify( - undoPath - )};` - ]); - } -} - -module.exports = AutoPublicPathRuntimeModule; - - -/***/ }), - -/***/ 60758: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -class BaseUriRuntimeModule extends RuntimeModule { - constructor() { - super("base uri", RuntimeModule.STAGE_ATTACH); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunk } = this; - - const options = chunk.getEntryOptions(); - return `${RuntimeGlobals.baseURI} = ${ - options.baseUri === undefined - ? "undefined" - : JSON.stringify(options.baseUri) - };`; - } -} - -module.exports = BaseUriRuntimeModule; - - -/***/ }), - -/***/ 83162: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -class ChunkNameRuntimeModule extends RuntimeModule { - /** - * @param {string} chunkName the chunk's name - */ - constructor(chunkName) { - super("chunkName"); - this.chunkName = chunkName; - } - - /** - * @returns {string} runtime code - */ - generate() { - return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`; - } -} - -module.exports = ChunkNameRuntimeModule; - - -/***/ }), - -/***/ 75410: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class CompatGetDefaultExportRuntimeModule extends HelperRuntimeModule { - constructor() { - super("compat get default export"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.compatGetDefaultExport; - return Template.asString([ - "// getDefaultExport function for compatibility with non-harmony modules", - `${fn} = ${runtimeTemplate.basicFunction("module", [ - "var getter = module && module.__esModule ?", - Template.indent([ - `${runtimeTemplate.returningFunction("module['default']")} :`, - `${runtimeTemplate.returningFunction("module")};` - ]), - `${RuntimeGlobals.definePropertyGetters}(getter, { a: getter });`, - "return getter;" - ])};` - ]); - } -} - -module.exports = CompatGetDefaultExportRuntimeModule; - - -/***/ }), - -/***/ 28349: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -/** @typedef {import("../MainTemplate")} MainTemplate */ - -class CompatRuntimeModule extends RuntimeModule { - constructor() { - super("compat", RuntimeModule.STAGE_ATTACH); - this.fullHash = true; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, chunk, compilation } = this; - const { - runtimeTemplate, - mainTemplate, - moduleTemplates, - dependencyTemplates - } = compilation; - const bootstrap = mainTemplate.hooks.bootstrap.call( - "", - chunk, - compilation.hash || "XXXX", - moduleTemplates.javascript, - dependencyTemplates - ); - const localVars = mainTemplate.hooks.localVars.call( - "", - chunk, - compilation.hash || "XXXX" - ); - const requireExtensions = mainTemplate.hooks.requireExtensions.call( - "", - chunk, - compilation.hash || "XXXX" - ); - const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); - let requireEnsure = ""; - if (runtimeRequirements.has(RuntimeGlobals.ensureChunk)) { - const requireEnsureHandler = mainTemplate.hooks.requireEnsure.call( - "", - chunk, - compilation.hash || "XXXX", - "chunkId" - ); - if (requireEnsureHandler) { - requireEnsure = `${ - RuntimeGlobals.ensureChunkHandlers - }.compat = ${runtimeTemplate.basicFunction( - "chunkId, promises", - requireEnsureHandler - )};`; - } - } - return [bootstrap, localVars, requireEnsure, requireExtensions] - .filter(Boolean) - .join("\n"); - } - - /** - * @returns {boolean} true, if the runtime module should get it's own scope - */ - shouldIsolate() { - // We avoid isolating this to have better backward-compat - return false; - } -} - -module.exports = CompatRuntimeModule; - - -/***/ }), - -/***/ 82865: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class CreateFakeNamespaceObjectRuntimeModule extends HelperRuntimeModule { - constructor() { - super("create fake namespace object"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.createFakeNamespaceObject; - return Template.asString([ - `var getProto = Object.getPrototypeOf ? ${runtimeTemplate.returningFunction( - "Object.getPrototypeOf(obj)", - "obj" - )} : ${runtimeTemplate.returningFunction("obj.__proto__", "obj")};`, - "var leafPrototypes;", - "// create a fake namespace object", - "// mode & 1: value is a module id, require it", - "// mode & 2: merge all properties of value into the ns", - "// mode & 4: return value when already ns object", - "// mode & 16: return value when it's Promise-like", - "// mode & 8|1: behave like require", - // Note: must be a function (not arrow), because this is used in body! - `${fn} = function(value, mode) {`, - Template.indent([ - `if(mode & 1) value = this(value);`, - `if(mode & 8) return value;`, - "if(typeof value === 'object' && value) {", - Template.indent([ - "if((mode & 4) && value.__esModule) return value;", - "if((mode & 16) && typeof value.then === 'function') return value;" - ]), - "}", - "var ns = Object.create(null);", - `${RuntimeGlobals.makeNamespaceObject}(ns);`, - "var def = {};", - "leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];", - "for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {", - Template.indent([ - `Object.getOwnPropertyNames(current).forEach(${runtimeTemplate.expressionFunction( - `def[key] = ${runtimeTemplate.returningFunction("value[key]", "")}`, - "key" - )});` - ]), - "}", - `def['default'] = ${runtimeTemplate.returningFunction("value", "")};`, - `${RuntimeGlobals.definePropertyGetters}(ns, def);`, - "return ns;" - ]), - "};" - ]); - } -} - -module.exports = CreateFakeNamespaceObjectRuntimeModule; - - -/***/ }), - -/***/ 44263: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class CreateScriptRuntimeModule extends HelperRuntimeModule { - constructor() { - super("trusted types script"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate, outputOptions } = compilation; - const { trustedTypes } = outputOptions; - const fn = RuntimeGlobals.createScript; - - return Template.asString( - `${fn} = ${runtimeTemplate.returningFunction( - trustedTypes - ? `${RuntimeGlobals.getTrustedTypesPolicy}().createScript(script)` - : "script", - "script" - )};` - ); - } -} - -module.exports = CreateScriptRuntimeModule; - - -/***/ }), - -/***/ 71822: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class CreateScriptUrlRuntimeModule extends HelperRuntimeModule { - constructor() { - super("trusted types script url"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate, outputOptions } = compilation; - const { trustedTypes } = outputOptions; - const fn = RuntimeGlobals.createScriptUrl; - - return Template.asString( - `${fn} = ${runtimeTemplate.returningFunction( - trustedTypes - ? `${RuntimeGlobals.getTrustedTypesPolicy}().createScriptURL(url)` - : "url", - "url" - )};` - ); - } -} - -module.exports = CreateScriptUrlRuntimeModule; - - -/***/ }), - -/***/ 62277: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class DefinePropertyGettersRuntimeModule extends HelperRuntimeModule { - constructor() { - super("define property getters"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.definePropertyGetters; - return Template.asString([ - "// define getter functions for harmony exports", - `${fn} = ${runtimeTemplate.basicFunction("exports, definition", [ - `for(var key in definition) {`, - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(definition, key) && !${RuntimeGlobals.hasOwnProperty}(exports, key)) {`, - Template.indent([ - "Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });" - ]), - "}" - ]), - "}" - ])};` - ]); - } -} - -module.exports = DefinePropertyGettersRuntimeModule; - - -/***/ }), - -/***/ 5079: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class EnsureChunkRuntimeModule extends RuntimeModule { - constructor(runtimeRequirements) { - super("ensure chunk"); - this.runtimeRequirements = runtimeRequirements; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - // Check if there are non initial chunks which need to be imported using require-ensure - if (this.runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers)) { - const handlers = RuntimeGlobals.ensureChunkHandlers; - return Template.asString([ - `${handlers} = {};`, - "// This file contains only the entry chunk.", - "// The chunk loading function for additional chunks", - `${RuntimeGlobals.ensureChunk} = ${runtimeTemplate.basicFunction( - "chunkId", - [ - `return Promise.all(Object.keys(${handlers}).reduce(${runtimeTemplate.basicFunction( - "promises, key", - [`${handlers}[key](chunkId, promises);`, "return promises;"] - )}, []));` - ] - )};` - ]); - } else { - // There ensureChunk is used somewhere in the tree, so we need an empty requireEnsure - // function. This can happen with multiple entrypoints. - return Template.asString([ - "// The chunk loading function for additional chunks", - "// Since all referenced chunks are already included", - "// in this file, this function is empty here.", - `${RuntimeGlobals.ensureChunk} = ${runtimeTemplate.returningFunction( - "Promise.resolve()" - )};` - ]); - } - } -} - -module.exports = EnsureChunkRuntimeModule; - - -/***/ }), - -/***/ 44033: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { first } = __webpack_require__(73268); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("../Compilation").PathData} PathData */ - -/** @typedef {function(PathData, AssetInfo=): string} FilenameFunction */ - -class GetChunkFilenameRuntimeModule extends RuntimeModule { - /** - * @param {string} contentType the contentType to use the content hash for - * @param {string} name kind of filename - * @param {string} global function name to be assigned - * @param {function(Chunk): string | FilenameFunction} getFilenameForChunk functor to get the filename or function - * @param {boolean} allChunks when false, only async chunks are included - */ - constructor(contentType, name, global, getFilenameForChunk, allChunks) { - super(`get ${name} chunk filename`); - this.contentType = contentType; - this.global = global; - this.getFilenameForChunk = getFilenameForChunk; - this.allChunks = allChunks; - this.dependentHash = true; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { - global, - chunk, - chunkGraph, - contentType, - getFilenameForChunk, - allChunks, - compilation - } = this; - const { runtimeTemplate } = compilation; - - /** @type {Map>} */ - const chunkFilenames = new Map(); - let maxChunks = 0; - /** @type {string} */ - let dynamicFilename; - - /** - * @param {Chunk} c the chunk - * @returns {void} - */ - const addChunk = c => { - const chunkFilename = getFilenameForChunk(c); - if (chunkFilename) { - let set = chunkFilenames.get(chunkFilename); - if (set === undefined) { - chunkFilenames.set(chunkFilename, (set = new Set())); - } - set.add(c); - if (typeof chunkFilename === "string") { - if (set.size < maxChunks) return; - if (set.size === maxChunks) { - if (chunkFilename.length < dynamicFilename.length) return; - if (chunkFilename.length === dynamicFilename.length) { - if (chunkFilename < dynamicFilename) return; - } - } - maxChunks = set.size; - dynamicFilename = chunkFilename; - } - } - }; - - /** @type {string[]} */ - const includedChunksMessages = []; - if (allChunks) { - includedChunksMessages.push("all chunks"); - for (const c of chunk.getAllReferencedChunks()) { - addChunk(c); - } - } else { - includedChunksMessages.push("async chunks"); - for (const c of chunk.getAllAsyncChunks()) { - addChunk(c); - } - const includeEntries = chunkGraph - .getTreeRuntimeRequirements(chunk) - .has(RuntimeGlobals.ensureChunkIncludeEntries); - if (includeEntries) { - includedChunksMessages.push("sibling chunks for the entrypoint"); - for (const c of chunkGraph.getChunkEntryDependentChunksIterable( - chunk - )) { - addChunk(c); - } - } - } - for (const entrypoint of chunk.getAllReferencedAsyncEntrypoints()) { - addChunk(entrypoint.chunks[entrypoint.chunks.length - 1]); - } - - /** @type {Map>} */ - const staticUrls = new Map(); - /** @type {Set} */ - const dynamicUrlChunks = new Set(); - - /** - * @param {Chunk} c the chunk - * @param {string | FilenameFunction} chunkFilename the filename template for the chunk - * @returns {void} - */ - const addStaticUrl = (c, chunkFilename) => { - /** - * @param {string | number} value a value - * @returns {string} string to put in quotes - */ - const unquotedStringify = value => { - const str = `${value}`; - if (str.length >= 5 && str === `${c.id}`) { - // This is shorter and generates the same result - return '" + chunkId + "'; - } - const s = JSON.stringify(str); - return s.slice(1, s.length - 1); - }; - const unquotedStringifyWithLength = value => length => - unquotedStringify(`${value}`.slice(0, length)); - const chunkFilenameValue = - typeof chunkFilename === "function" - ? JSON.stringify( - chunkFilename({ - chunk: c, - contentHashType: contentType - }) - ) - : JSON.stringify(chunkFilename); - const staticChunkFilename = compilation.getPath(chunkFilenameValue, { - hash: `" + ${RuntimeGlobals.getFullHash}() + "`, - hashWithLength: length => - `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, - chunk: { - id: unquotedStringify(c.id), - hash: unquotedStringify(c.renderedHash), - hashWithLength: unquotedStringifyWithLength(c.renderedHash), - name: unquotedStringify(c.name || c.id), - contentHash: { - [contentType]: unquotedStringify(c.contentHash[contentType]) - }, - contentHashWithLength: { - [contentType]: unquotedStringifyWithLength( - c.contentHash[contentType] - ) - } - }, - contentHashType: contentType - }); - let set = staticUrls.get(staticChunkFilename); - if (set === undefined) { - staticUrls.set(staticChunkFilename, (set = new Set())); - } - set.add(c.id); - }; - - for (const [filename, chunks] of chunkFilenames) { - if (filename !== dynamicFilename) { - for (const c of chunks) addStaticUrl(c, filename); - } else { - for (const c of chunks) dynamicUrlChunks.add(c); - } - } - - /** - * @param {function(Chunk): string | number} fn function from chunk to value - * @returns {string} code with static mapping of results of fn - */ - const createMap = fn => { - const obj = {}; - let useId = false; - let lastKey; - let entries = 0; - for (const c of dynamicUrlChunks) { - const value = fn(c); - if (value === c.id) { - useId = true; - } else { - obj[c.id] = value; - lastKey = c.id; - entries++; - } - } - if (entries === 0) return "chunkId"; - if (entries === 1) { - return useId - ? `(chunkId === ${JSON.stringify(lastKey)} ? ${JSON.stringify( - obj[lastKey] - )} : chunkId)` - : JSON.stringify(obj[lastKey]); - } - return useId - ? `(${JSON.stringify(obj)}[chunkId] || chunkId)` - : `${JSON.stringify(obj)}[chunkId]`; - }; - - /** - * @param {function(Chunk): string | number} fn function from chunk to value - * @returns {string} code with static mapping of results of fn for including in quoted string - */ - const mapExpr = fn => { - return `" + ${createMap(fn)} + "`; - }; - - /** - * @param {function(Chunk): string | number} fn function from chunk to value - * @returns {function(number): string} function which generates code with static mapping of results of fn for including in quoted string for specific length - */ - const mapExprWithLength = fn => length => { - return `" + ${createMap(c => `${fn(c)}`.slice(0, length))} + "`; - }; - - const url = - dynamicFilename && - compilation.getPath(JSON.stringify(dynamicFilename), { - hash: `" + ${RuntimeGlobals.getFullHash}() + "`, - hashWithLength: length => - `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, - chunk: { - id: `" + chunkId + "`, - hash: mapExpr(c => c.renderedHash), - hashWithLength: mapExprWithLength(c => c.renderedHash), - name: mapExpr(c => c.name || c.id), - contentHash: { - [contentType]: mapExpr(c => c.contentHash[contentType]) - }, - contentHashWithLength: { - [contentType]: mapExprWithLength(c => c.contentHash[contentType]) - } - }, - contentHashType: contentType - }); - - return Template.asString([ - `// This function allow to reference ${includedChunksMessages.join( - " and " - )}`, - `${global} = ${runtimeTemplate.basicFunction( - "chunkId", - - staticUrls.size > 0 - ? [ - "// return url for filenames not based on template", - // it minimizes to `x===1?"...":x===2?"...":"..."` - Template.asString( - Array.from(staticUrls, ([url, ids]) => { - const condition = - ids.size === 1 - ? `chunkId === ${JSON.stringify(first(ids))}` - : `{${Array.from( - ids, - id => `${JSON.stringify(id)}:1` - ).join(",")}}[chunkId]`; - return `if (${condition}) return ${url};`; - }) - ), - "// return url for filenames based on template", - `return ${url};` - ] - : ["// return url for filenames based on template", `return ${url};`] - )};` - ]); - } -} - -module.exports = GetChunkFilenameRuntimeModule; - - -/***/ }), - -/***/ 61126: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -/** @typedef {import("../Compilation")} Compilation */ - -class GetFullHashRuntimeModule extends RuntimeModule { - constructor() { - super("getFullHash"); - this.fullHash = true; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - return `${RuntimeGlobals.getFullHash} = ${runtimeTemplate.returningFunction( - JSON.stringify(this.compilation.hash || "XXXX") - )}`; - } -} - -module.exports = GetFullHashRuntimeModule; - - -/***/ }), - -/***/ 69496: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -/** @typedef {import("../Compilation")} Compilation */ - -class GetMainFilenameRuntimeModule extends RuntimeModule { - /** - * @param {string} name readable name - * @param {string} global global object binding - * @param {string} filename main file name - */ - constructor(name, global, filename) { - super(`get ${name} filename`); - this.global = global; - this.filename = filename; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { global, filename, compilation, chunk } = this; - const { runtimeTemplate } = compilation; - const url = compilation.getPath(JSON.stringify(filename), { - hash: `" + ${RuntimeGlobals.getFullHash}() + "`, - hashWithLength: length => - `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, - chunk, - runtime: chunk.runtime - }); - return Template.asString([ - `${global} = ${runtimeTemplate.returningFunction(url)};` - ]); - } -} - -module.exports = GetMainFilenameRuntimeModule; - - -/***/ }), - -/***/ 36011: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class GetTrustedTypesPolicyRuntimeModule extends HelperRuntimeModule { - /** - * @param {Set} runtimeRequirements runtime requirements - */ - constructor(runtimeRequirements) { - super("trusted types policy"); - this.runtimeRequirements = runtimeRequirements; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate, outputOptions } = compilation; - const { trustedTypes } = outputOptions; - const fn = RuntimeGlobals.getTrustedTypesPolicy; - - return Template.asString([ - "var policy;", - `${fn} = ${runtimeTemplate.basicFunction("", [ - "// Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.", - "if (policy === undefined) {", - Template.indent([ - "policy = {", - Template.indent( - [ - ...(this.runtimeRequirements.has(RuntimeGlobals.createScript) - ? [ - `createScript: ${runtimeTemplate.returningFunction( - "script", - "script" - )}` - ] - : []), - ...(this.runtimeRequirements.has(RuntimeGlobals.createScriptUrl) - ? [ - `createScriptURL: ${runtimeTemplate.returningFunction( - "url", - "url" - )}` - ] - : []) - ].join(",\n") - ), - "};", - ...(trustedTypes - ? [ - 'if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {', - Template.indent([ - `policy = trustedTypes.createPolicy(${JSON.stringify( - trustedTypes.policyName - )}, policy);` - ]), - "}" - ] - : []) - ]), - "}", - "return policy;" - ])};` - ]); - } -} - -module.exports = GetTrustedTypesPolicyRuntimeModule; - - -/***/ }), - -/***/ 91164: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class GlobalRuntimeModule extends RuntimeModule { - constructor() { - super("global"); - } - - /** - * @returns {string} runtime code - */ - generate() { - return Template.asString([ - `${RuntimeGlobals.global} = (function() {`, - Template.indent([ - "if (typeof globalThis === 'object') return globalThis;", - "try {", - Template.indent( - // This works in non-strict mode - // or - // This works if eval is allowed (see CSP) - "return this || new Function('return this')();" - ), - "} catch (e) {", - Template.indent( - // This works if the window reference is available - "if (typeof window === 'object') return window;" - ), - "}" - // It can still be `undefined`, but nothing to do about it... - // We return `undefined`, instead of nothing here, so it's - // easier to handle this case: - // if (!global) { … } - ]), - "})();" - ]); - } -} - -module.exports = GlobalRuntimeModule; - - -/***/ }), - -/***/ 9698: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class HasOwnPropertyRuntimeModule extends RuntimeModule { - constructor() { - super("hasOwnProperty shorthand"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - - return Template.asString([ - `${RuntimeGlobals.hasOwnProperty} = ${runtimeTemplate.returningFunction( - "Object.prototype.hasOwnProperty.call(obj, prop)", - "obj, prop" - )}` - ]); - } -} - -module.exports = HasOwnPropertyRuntimeModule; - - -/***/ }), - -/***/ 17163: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeModule = __webpack_require__(93496); - -class HelperRuntimeModule extends RuntimeModule { - /** - * @param {string} name a readable name - */ - constructor(name) { - super(name); - } -} - -module.exports = HelperRuntimeModule; - - -/***/ }), - -/***/ 46750: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compiler")} Compiler */ - -/** - * @typedef {Object} LoadScriptCompilationHooks - * @property {SyncWaterfallHook<[string, Chunk]>} createScript - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class LoadScriptRuntimeModule extends HelperRuntimeModule { - /** - * @param {Compilation} compilation the compilation - * @returns {LoadScriptCompilationHooks} hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - createScript: new SyncWaterfallHook(["source", "chunk"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - /** - * @param {boolean=} withCreateScriptUrl use create script url for trusted types - */ - constructor(withCreateScriptUrl) { - super("load script"); - this._withCreateScriptUrl = withCreateScriptUrl; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate, outputOptions } = compilation; - const { - scriptType, - chunkLoadTimeout: loadTimeout, - crossOriginLoading, - uniqueName, - charset - } = outputOptions; - const fn = RuntimeGlobals.loadScript; - - const { createScript } = - LoadScriptRuntimeModule.getCompilationHooks(compilation); - - const code = Template.asString([ - "script = document.createElement('script');", - scriptType ? `script.type = ${JSON.stringify(scriptType)};` : "", - charset ? "script.charset = 'utf-8';" : "", - `script.timeout = ${loadTimeout / 1000};`, - `if (${RuntimeGlobals.scriptNonce}) {`, - Template.indent( - `script.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` - ), - "}", - uniqueName - ? 'script.setAttribute("data-webpack", dataWebpackPrefix + key);' - : "", - `script.src = ${ - this._withCreateScriptUrl - ? `${RuntimeGlobals.createScriptUrl}(url)` - : "url" - };`, - crossOriginLoading - ? crossOriginLoading === "use-credentials" - ? 'script.crossOrigin = "use-credentials";' - : Template.asString([ - "if (script.src.indexOf(window.location.origin + '/') !== 0) {", - Template.indent( - `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` - ), - "}" - ]) - : "" - ]); - - return Template.asString([ - "var inProgress = {};", - uniqueName - ? `var dataWebpackPrefix = ${JSON.stringify(uniqueName + ":")};` - : "// data-webpack is not used as build has no uniqueName", - "// loadScript function to load a script via script tag", - `${fn} = ${runtimeTemplate.basicFunction("url, done, key, chunkId", [ - "if(inProgress[url]) { inProgress[url].push(done); return; }", - "var script, needAttach;", - "if(key !== undefined) {", - Template.indent([ - 'var scripts = document.getElementsByTagName("script");', - "for(var i = 0; i < scripts.length; i++) {", - Template.indent([ - "var s = scripts[i];", - `if(s.getAttribute("src") == url${ - uniqueName - ? ' || s.getAttribute("data-webpack") == dataWebpackPrefix + key' - : "" - }) { script = s; break; }` - ]), - "}" - ]), - "}", - "if(!script) {", - Template.indent([ - "needAttach = true;", - createScript.call(code, this.chunk) - ]), - "}", - "inProgress[url] = [done];", - "var onScriptComplete = " + - runtimeTemplate.basicFunction( - "prev, event", - Template.asString([ - "// avoid mem leaks in IE.", - "script.onerror = script.onload = null;", - "clearTimeout(timeout);", - "var doneFns = inProgress[url];", - "delete inProgress[url];", - "script.parentNode && script.parentNode.removeChild(script);", - `doneFns && doneFns.forEach(${runtimeTemplate.returningFunction( - "fn(event)", - "fn" - )});`, - "if(prev) return prev(event);" - ]) - ), - ";", - `var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), ${loadTimeout});`, - "script.onerror = onScriptComplete.bind(null, script.onerror);", - "script.onload = onScriptComplete.bind(null, script.onload);", - "needAttach && document.head.appendChild(script);" - ])};` - ]); - } -} - -module.exports = LoadScriptRuntimeModule; - - -/***/ }), - -/***/ 77159: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class MakeNamespaceObjectRuntimeModule extends HelperRuntimeModule { - constructor() { - super("make namespace object"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - const fn = RuntimeGlobals.makeNamespaceObject; - return Template.asString([ - "// define __esModule on exports", - `${fn} = ${runtimeTemplate.basicFunction("exports", [ - "if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {", - Template.indent([ - "Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });" - ]), - "}", - "Object.defineProperty(exports, '__esModule', { value: true });" - ])};` - ]); - } -} - -module.exports = MakeNamespaceObjectRuntimeModule; - - -/***/ }), - -/***/ 85856: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -class NonceRuntimeModule extends RuntimeModule { - constructor() { - super("nonce", RuntimeModule.STAGE_ATTACH); - } - - /** - * @returns {string} runtime code - */ - generate() { - return `${RuntimeGlobals.scriptNonce} = undefined;`; - } -} - -module.exports = NonceRuntimeModule; - - -/***/ }), - -/***/ 94800: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class OnChunksLoadedRuntimeModule extends RuntimeModule { - constructor() { - super("chunk loaded"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate } = compilation; - return Template.asString([ - "var deferred = [];", - `${RuntimeGlobals.onChunksLoaded} = ${runtimeTemplate.basicFunction( - "result, chunkIds, fn, priority", - [ - "if(chunkIds) {", - Template.indent([ - "priority = priority || 0;", - "for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];", - "deferred[i] = [chunkIds, fn, priority];", - "return;" - ]), - "}", - "var notFulfilled = Infinity;", - "for (var i = 0; i < deferred.length; i++) {", - Template.indent([ - runtimeTemplate.destructureArray( - ["chunkIds", "fn", "priority"], - "deferred[i]" - ), - "var fulfilled = true;", - "for (var j = 0; j < chunkIds.length; j++) {", - Template.indent([ - `if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(${ - RuntimeGlobals.onChunksLoaded - }).every(${runtimeTemplate.returningFunction( - `${RuntimeGlobals.onChunksLoaded}[key](chunkIds[j])`, - "key" - )})) {`, - Template.indent(["chunkIds.splice(j--, 1);"]), - "} else {", - Template.indent([ - "fulfilled = false;", - "if(priority < notFulfilled) notFulfilled = priority;" - ]), - "}" - ]), - "}", - "if(fulfilled) {", - Template.indent([ - "deferred.splice(i--, 1)", - "var r = fn();", - "if (r !== undefined) result = r;" - ]), - "}" - ]), - "}", - "return result;" - ] - )};` - ]); - } -} - -module.exports = OnChunksLoadedRuntimeModule; - - -/***/ }), - -/***/ 86747: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -class PublicPathRuntimeModule extends RuntimeModule { - constructor(publicPath) { - super("publicPath", RuntimeModule.STAGE_BASIC); - this.publicPath = publicPath; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, publicPath } = this; - - return `${RuntimeGlobals.publicPath} = ${JSON.stringify( - compilation.getPath(publicPath || "", { - hash: compilation.hash || "XXXX" - }) - )};`; - } -} - -module.exports = PublicPathRuntimeModule; - - -/***/ }), - -/***/ 89926: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const HelperRuntimeModule = __webpack_require__(17163); - -class RelativeUrlRuntimeModule extends HelperRuntimeModule { - constructor() { - super("relative url"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { runtimeTemplate } = this.compilation; - return Template.asString([ - `${RuntimeGlobals.relativeUrl} = function RelativeURL(url) {`, - Template.indent([ - 'var realUrl = new URL(url, "x:/");', - "var values = {};", - "for (var key in realUrl) values[key] = realUrl[key];", - "values.href = url;", - 'values.pathname = url.replace(/[?#].*/, "");', - 'values.origin = values.protocol = "";', - `values.toString = values.toJSON = ${runtimeTemplate.returningFunction( - "url" - )};`, - "for (var key in values) Object.defineProperty(this, key, { enumerable: true, configurable: true, value: values[key] });" - ]), - "};", - `${RuntimeGlobals.relativeUrl}.prototype = URL.prototype;` - ]); - } -} - -module.exports = RelativeUrlRuntimeModule; - - -/***/ }), - -/***/ 86841: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -class RuntimeIdRuntimeModule extends RuntimeModule { - constructor() { - super("runtimeId"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, chunk } = this; - const runtime = chunk.runtime; - if (typeof runtime !== "string") - throw new Error("RuntimeIdRuntimeModule must be in a single runtime"); - const id = chunkGraph.getRuntimeId(runtime); - return `${RuntimeGlobals.runtimeId} = ${JSON.stringify(id)};`; - } -} - -module.exports = RuntimeIdRuntimeModule; - - -/***/ }), - -/***/ 61411: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const StartupChunkDependenciesRuntimeModule = __webpack_require__(56586); -const StartupEntrypointRuntimeModule = __webpack_require__(99213); - -/** @typedef {import("../Compiler")} Compiler */ - -class StartupChunkDependenciesPlugin { - constructor(options) { - this.chunkLoading = options.chunkLoading; - this.asyncChunkLoading = - typeof options.asyncChunkLoading === "boolean" - ? options.asyncChunkLoading - : true; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "StartupChunkDependenciesPlugin", - compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === this.chunkLoading; - }; - compilation.hooks.additionalTreeRuntimeRequirements.tap( - "StartupChunkDependenciesPlugin", - (chunk, set, { chunkGraph }) => { - if (!isEnabledForChunk(chunk)) return; - if (chunkGraph.hasChunkEntryDependentChunks(chunk)) { - set.add(RuntimeGlobals.startup); - set.add(RuntimeGlobals.ensureChunk); - set.add(RuntimeGlobals.ensureChunkIncludeEntries); - compilation.addRuntimeModule( - chunk, - new StartupChunkDependenciesRuntimeModule( - this.asyncChunkLoading - ) - ); - } - } - ); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.startupEntrypoint) - .tap("StartupChunkDependenciesPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.require); - set.add(RuntimeGlobals.ensureChunk); - set.add(RuntimeGlobals.ensureChunkIncludeEntries); - compilation.addRuntimeModule( - chunk, - new StartupEntrypointRuntimeModule(this.asyncChunkLoading) - ); - }); - } - ); - } -} - -module.exports = StartupChunkDependenciesPlugin; - - -/***/ }), - -/***/ 56586: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class StartupChunkDependenciesRuntimeModule extends RuntimeModule { - constructor(asyncChunkLoading) { - super("startup chunk dependencies", RuntimeModule.STAGE_TRIGGER); - this.asyncChunkLoading = asyncChunkLoading; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, chunk, compilation } = this; - const { runtimeTemplate } = compilation; - const chunkIds = Array.from( - chunkGraph.getChunkEntryDependentChunksIterable(chunk) - ).map(chunk => { - return chunk.id; - }); - return Template.asString([ - `var next = ${RuntimeGlobals.startup};`, - `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction( - "", - !this.asyncChunkLoading - ? chunkIds - .map( - id => `${RuntimeGlobals.ensureChunk}(${JSON.stringify(id)});` - ) - .concat("return next();") - : chunkIds.length === 1 - ? `return ${RuntimeGlobals.ensureChunk}(${JSON.stringify( - chunkIds[0] - )}).then(next);` - : chunkIds.length > 2 - ? [ - // using map is shorter for 3 or more chunks - `return Promise.all(${JSON.stringify(chunkIds)}.map(${ - RuntimeGlobals.ensureChunk - }, __webpack_require__)).then(next);` - ] - : [ - // calling ensureChunk directly is shorter for 0 - 2 chunks - "return Promise.all([", - Template.indent( - chunkIds - .map( - id => `${RuntimeGlobals.ensureChunk}(${JSON.stringify(id)})` - ) - .join(",\n") - ), - "]).then(next);" - ] - )};` - ]); - } -} - -module.exports = StartupChunkDependenciesRuntimeModule; - - -/***/ }), - -/***/ 99213: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -/** @typedef {import("../MainTemplate")} MainTemplate */ - -class StartupEntrypointRuntimeModule extends RuntimeModule { - constructor(asyncChunkLoading) { - super("startup entrypoint"); - this.asyncChunkLoading = asyncChunkLoading; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation } = this; - const { runtimeTemplate } = compilation; - return `${ - RuntimeGlobals.startupEntrypoint - } = ${runtimeTemplate.basicFunction("result, chunkIds, fn", [ - "// arguments: chunkIds, moduleId are deprecated", - "var moduleId = chunkIds;", - `if(!fn) chunkIds = result, fn = ${runtimeTemplate.returningFunction( - `__webpack_require__(${RuntimeGlobals.entryModuleId} = moduleId)` - )};`, - ...(this.asyncChunkLoading - ? [ - `return Promise.all(chunkIds.map(${ - RuntimeGlobals.ensureChunk - }, __webpack_require__)).then(${runtimeTemplate.basicFunction("", [ - "var r = fn();", - "return r === undefined ? result : r;" - ])})` - ] - : [ - `chunkIds.map(${RuntimeGlobals.ensureChunk}, __webpack_require__)`, - "var r = fn();", - "return r === undefined ? result : r;" - ]) - ])}`; - } -} - -module.exports = StartupEntrypointRuntimeModule; - - -/***/ }), - -/***/ 63135: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); - -/** @typedef {import("../Compilation")} Compilation */ - -class SystemContextRuntimeModule extends RuntimeModule { - constructor() { - super("__system_context__"); - } - - /** - * @returns {string} runtime code - */ - generate() { - return `${RuntimeGlobals.systemContext} = __system_context__;`; - } -} - -module.exports = SystemContextRuntimeModule; - - -/***/ }), - -/***/ 36435: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NormalModule = __webpack_require__(89417); - -/** @typedef {import("../Compiler")} Compiler */ - -// data URL scheme: "data:text/javascript;charset=utf-8;base64,some-string" -// http://www.ietf.org/rfc/rfc2397.txt -const URIRegEx = /^data:([^;,]+)?((?:;[^;,]+)*?)(?:;(base64))?,(.*)$/i; - -const decodeDataURI = uri => { - const match = URIRegEx.exec(uri); - if (!match) return null; - - const isBase64 = match[3]; - const body = match[4]; - return isBase64 - ? Buffer.from(body, "base64") - : Buffer.from(decodeURIComponent(body), "ascii"); -}; - -class DataUriPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "DataUriPlugin", - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.resolveForScheme - .for("data") - .tap("DataUriPlugin", resourceData => { - const match = URIRegEx.exec(resourceData.resource); - if (match) { - resourceData.data.mimetype = match[1] || ""; - resourceData.data.parameters = match[2] || ""; - resourceData.data.encoding = match[3] || false; - resourceData.data.encodedContent = match[4] || ""; - } - }); - NormalModule.getCompilationHooks(compilation) - .readResourceForScheme.for("data") - .tap("DataUriPlugin", resource => decodeDataURI(resource)); - } - ); - } -} - -module.exports = DataUriPlugin; - - -/***/ }), - -/***/ 17613: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { URL, fileURLToPath } = __webpack_require__(57310); -const { NormalModule } = __webpack_require__(13733); - -/** @typedef {import("../Compiler")} Compiler */ - -class FileUriPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "FileUriPlugin", - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.resolveForScheme - .for("file") - .tap("FileUriPlugin", resourceData => { - const url = new URL(resourceData.resource); - const path = fileURLToPath(url); - const query = url.search; - const fragment = url.hash; - resourceData.path = path; - resourceData.query = query; - resourceData.fragment = fragment; - resourceData.resource = path + query + fragment; - return true; - }); - const hooks = NormalModule.getCompilationHooks(compilation); - hooks.readResource - .for(undefined) - .tapAsync("FileUriPlugin", (loaderContext, callback) => { - const { resourcePath } = loaderContext; - loaderContext.addDependency(resourcePath); - loaderContext.fs.readFile(resourcePath, callback); - }); - } - ); - } -} - -module.exports = FileUriPlugin; - - -/***/ }), - -/***/ 89674: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const EventEmitter = __webpack_require__(82361); -const { extname, basename } = __webpack_require__(71017); -const { URL } = __webpack_require__(57310); -const { createGunzip, createBrotliDecompress, createInflate } = __webpack_require__(59796); -const NormalModule = __webpack_require__(89417); -const createSchemaValidation = __webpack_require__(89699); -const createHash = __webpack_require__(85205); -const { mkdirp, dirname, join } = __webpack_require__(47077); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../../declarations/plugins/schemes/HttpUriPlugin").HttpUriPluginOptions} HttpUriPluginOptions */ -/** @typedef {import("../Compiler")} Compiler */ - -const getHttp = memoize(() => __webpack_require__(13685)); -const getHttps = memoize(() => __webpack_require__(95687)); -const proxyFetch = (request, proxy) => (url, options, callback) => { - const eventEmitter = new EventEmitter(); - const doRequest = socket => - request - .get(url, { ...options, ...(socket && { socket }) }, callback) - .on("error", eventEmitter.emit.bind(eventEmitter, "error")); - - if (proxy) { - const { hostname: host, port } = new URL(proxy); - - getHttp() - .request({ - host, // IP address of proxy server - port, // port of proxy server - method: "CONNECT", - path: url.host - }) - .on("connect", (res, socket) => { - if (res.statusCode === 200) { - // connected to proxy server - doRequest(socket); - } - }) - .on("error", err => { - eventEmitter.emit( - "error", - new Error( - `Failed to connect to proxy server "${proxy}": ${err.message}` - ) - ); - }) - .end(); - } else { - doRequest(); - } - - return eventEmitter; -}; - -/** @type {(() => void)[] | undefined} */ -let inProgressWrite = undefined; - -const validate = createSchemaValidation( - __webpack_require__(29911), - () => __webpack_require__(92693), - { - name: "Http Uri Plugin", - baseDataPath: "options" - } -); - -const toSafePath = str => - str - .replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "") - .replace(/[^a-zA-Z0-9._-]+/g, "_"); - -const computeIntegrity = content => { - const hash = createHash("sha512"); - hash.update(content); - const integrity = "sha512-" + hash.digest("base64"); - return integrity; -}; - -const verifyIntegrity = (content, integrity) => { - if (integrity === "ignore") return true; - return computeIntegrity(content) === integrity; -}; - -/** - * @param {string} str input - * @returns {Record} parsed - */ -const parseKeyValuePairs = str => { - /** @type {Record} */ - const result = {}; - for (const item of str.split(",")) { - const i = item.indexOf("="); - if (i >= 0) { - const key = item.slice(0, i).trim(); - const value = item.slice(i + 1).trim(); - result[key] = value; - } else { - const key = item.trim(); - if (!key) continue; - result[key] = key; - } - } - return result; -}; - -const parseCacheControl = (cacheControl, requestTime) => { - // When false resource is not stored in cache - let storeCache = true; - // When false resource is not stored in lockfile cache - let storeLock = true; - // Resource is only revalidated, after that timestamp and when upgrade is chosen - let validUntil = 0; - if (cacheControl) { - const parsed = parseKeyValuePairs(cacheControl); - if (parsed["no-cache"]) storeCache = storeLock = false; - if (parsed["max-age"] && !isNaN(+parsed["max-age"])) { - validUntil = requestTime + +parsed["max-age"] * 1000; - } - if (parsed["must-revalidate"]) validUntil = 0; - } - return { - storeLock, - storeCache, - validUntil - }; -}; - -/** - * @typedef {Object} LockfileEntry - * @property {string} resolved - * @property {string} integrity - * @property {string} contentType - */ - -const areLockfileEntriesEqual = (a, b) => { - return ( - a.resolved === b.resolved && - a.integrity === b.integrity && - a.contentType === b.contentType - ); -}; - -const entryToString = entry => { - return `resolved: ${entry.resolved}, integrity: ${entry.integrity}, contentType: ${entry.contentType}`; -}; - -class Lockfile { - constructor() { - this.version = 1; - /** @type {Map} */ - this.entries = new Map(); - } - - static parse(content) { - // TODO handle merge conflicts - const data = JSON.parse(content); - if (data.version !== 1) - throw new Error(`Unsupported lockfile version ${data.version}`); - const lockfile = new Lockfile(); - for (const key of Object.keys(data)) { - if (key === "version") continue; - const entry = data[key]; - lockfile.entries.set( - key, - typeof entry === "string" - ? entry - : { - resolved: key, - ...entry - } - ); - } - return lockfile; - } - - toString() { - let str = "{\n"; - const entries = Array.from(this.entries).sort(([a], [b]) => - a < b ? -1 : 1 - ); - for (const [key, entry] of entries) { - if (typeof entry === "string") { - str += ` ${JSON.stringify(key)}: ${JSON.stringify(entry)},\n`; - } else { - str += ` ${JSON.stringify(key)}: { `; - if (entry.resolved !== key) - str += `"resolved": ${JSON.stringify(entry.resolved)}, `; - str += `"integrity": ${JSON.stringify( - entry.integrity - )}, "contentType": ${JSON.stringify(entry.contentType)} },\n`; - } - } - str += ` "version": ${this.version}\n}\n`; - return str; - } -} - -/** - * @template R - * @param {function(function(Error=, R=): void): void} fn function - * @returns {function(function((Error | null)=, R=): void): void} cached function - */ -const cachedWithoutKey = fn => { - let inFlight = false; - /** @type {Error | undefined} */ - let cachedError = undefined; - /** @type {R | undefined} */ - let cachedResult = undefined; - /** @type {(function(Error=, R=): void)[] | undefined} */ - let cachedCallbacks = undefined; - return callback => { - if (inFlight) { - if (cachedResult !== undefined) return callback(null, cachedResult); - if (cachedError !== undefined) return callback(cachedError); - if (cachedCallbacks === undefined) cachedCallbacks = [callback]; - else cachedCallbacks.push(callback); - return; - } - inFlight = true; - fn((err, result) => { - if (err) cachedError = err; - else cachedResult = result; - const callbacks = cachedCallbacks; - cachedCallbacks = undefined; - callback(err, result); - if (callbacks !== undefined) for (const cb of callbacks) cb(err, result); - }); - }; -}; - -/** - * @template T - * @template R - * @param {function(T, function(Error=, R=): void): void} fn function - * @param {function(T, function(Error=, R=): void): void=} forceFn function for the second try - * @returns {(function(T, function((Error | null)=, R=): void): void) & { force: function(T, function((Error | null)=, R=): void): void }} cached function - */ -const cachedWithKey = (fn, forceFn = fn) => { - /** @typedef {{ result?: R, error?: Error, callbacks?: (function((Error | null)=, R=): void)[], force?: true }} CacheEntry */ - /** @type {Map} */ - const cache = new Map(); - const resultFn = (arg, callback) => { - const cacheEntry = cache.get(arg); - if (cacheEntry !== undefined) { - if (cacheEntry.result !== undefined) - return callback(null, cacheEntry.result); - if (cacheEntry.error !== undefined) return callback(cacheEntry.error); - if (cacheEntry.callbacks === undefined) cacheEntry.callbacks = [callback]; - else cacheEntry.callbacks.push(callback); - return; - } - /** @type {CacheEntry} */ - const newCacheEntry = { - result: undefined, - error: undefined, - callbacks: undefined - }; - cache.set(arg, newCacheEntry); - fn(arg, (err, result) => { - if (err) newCacheEntry.error = err; - else newCacheEntry.result = result; - const callbacks = newCacheEntry.callbacks; - newCacheEntry.callbacks = undefined; - callback(err, result); - if (callbacks !== undefined) for (const cb of callbacks) cb(err, result); - }); - }; - resultFn.force = (arg, callback) => { - const cacheEntry = cache.get(arg); - if (cacheEntry !== undefined && cacheEntry.force) { - if (cacheEntry.result !== undefined) - return callback(null, cacheEntry.result); - if (cacheEntry.error !== undefined) return callback(cacheEntry.error); - if (cacheEntry.callbacks === undefined) cacheEntry.callbacks = [callback]; - else cacheEntry.callbacks.push(callback); - return; - } - /** @type {CacheEntry} */ - const newCacheEntry = { - result: undefined, - error: undefined, - callbacks: undefined, - force: true - }; - cache.set(arg, newCacheEntry); - forceFn(arg, (err, result) => { - if (err) newCacheEntry.error = err; - else newCacheEntry.result = result; - const callbacks = newCacheEntry.callbacks; - newCacheEntry.callbacks = undefined; - callback(err, result); - if (callbacks !== undefined) for (const cb of callbacks) cb(err, result); - }); - }; - return resultFn; -}; - -class HttpUriPlugin { - /** - * @param {HttpUriPluginOptions} options options - */ - constructor(options) { - validate(options); - this._lockfileLocation = options.lockfileLocation; - this._cacheLocation = options.cacheLocation; - this._upgrade = options.upgrade; - this._frozen = options.frozen; - this._allowedUris = options.allowedUris; - this._proxy = options.proxy; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const proxy = - this._proxy || process.env["http_proxy"] || process.env["HTTP_PROXY"]; - const schemes = [ - { - scheme: "http", - fetch: proxyFetch(getHttp(), proxy) - }, - { - scheme: "https", - fetch: proxyFetch(getHttps(), proxy) - } - ]; - let lockfileCache; - compiler.hooks.compilation.tap( - "HttpUriPlugin", - (compilation, { normalModuleFactory }) => { - const intermediateFs = compiler.intermediateFileSystem; - const fs = compilation.inputFileSystem; - const cache = compilation.getCache("webpack.HttpUriPlugin"); - const logger = compilation.getLogger("webpack.HttpUriPlugin"); - const lockfileLocation = - this._lockfileLocation || - join( - intermediateFs, - compiler.context, - compiler.name - ? `${toSafePath(compiler.name)}.webpack.lock` - : "webpack.lock" - ); - const cacheLocation = - this._cacheLocation !== undefined - ? this._cacheLocation - : lockfileLocation + ".data"; - const upgrade = this._upgrade || false; - const frozen = this._frozen || false; - const hashFunction = "sha512"; - const hashDigest = "hex"; - const hashDigestLength = 20; - const allowedUris = this._allowedUris; - - let warnedAboutEol = false; - - const cacheKeyCache = new Map(); - /** - * @param {string} url the url - * @returns {string} the key - */ - const getCacheKey = url => { - const cachedResult = cacheKeyCache.get(url); - if (cachedResult !== undefined) return cachedResult; - const result = _getCacheKey(url); - cacheKeyCache.set(url, result); - return result; - }; - - /** - * @param {string} url the url - * @returns {string} the key - */ - const _getCacheKey = url => { - const parsedUrl = new URL(url); - const folder = toSafePath(parsedUrl.origin); - const name = toSafePath(parsedUrl.pathname); - const query = toSafePath(parsedUrl.search); - let ext = extname(name); - if (ext.length > 20) ext = ""; - const basename = ext ? name.slice(0, -ext.length) : name; - const hash = createHash(hashFunction); - hash.update(url); - const digest = hash.digest(hashDigest).slice(0, hashDigestLength); - return `${folder.slice(-50)}/${`${basename}${ - query ? `_${query}` : "" - }`.slice(0, 150)}_${digest}${ext}`; - }; - - const getLockfile = cachedWithoutKey( - /** - * @param {function((Error | null)=, Lockfile=): void} callback callback - * @returns {void} - */ - callback => { - const readLockfile = () => { - intermediateFs.readFile(lockfileLocation, (err, buffer) => { - if (err && err.code !== "ENOENT") { - compilation.missingDependencies.add(lockfileLocation); - return callback(err); - } - compilation.fileDependencies.add(lockfileLocation); - compilation.fileSystemInfo.createSnapshot( - compiler.fsStartTime, - buffer ? [lockfileLocation] : [], - [], - buffer ? [] : [lockfileLocation], - { timestamp: true }, - (err, snapshot) => { - if (err) return callback(err); - const lockfile = buffer - ? Lockfile.parse(buffer.toString("utf-8")) - : new Lockfile(); - lockfileCache = { - lockfile, - snapshot - }; - callback(null, lockfile); - } - ); - }); - }; - if (lockfileCache) { - compilation.fileSystemInfo.checkSnapshotValid( - lockfileCache.snapshot, - (err, valid) => { - if (err) return callback(err); - if (!valid) return readLockfile(); - callback(null, lockfileCache.lockfile); - } - ); - } else { - readLockfile(); - } - } - ); - - /** @type {Map | undefined} */ - let lockfileUpdates = undefined; - const storeLockEntry = (lockfile, url, entry) => { - const oldEntry = lockfile.entries.get(url); - if (lockfileUpdates === undefined) lockfileUpdates = new Map(); - lockfileUpdates.set(url, entry); - lockfile.entries.set(url, entry); - if (!oldEntry) { - logger.log(`${url} added to lockfile`); - } else if (typeof oldEntry === "string") { - if (typeof entry === "string") { - logger.log(`${url} updated in lockfile: ${oldEntry} -> ${entry}`); - } else { - logger.log( - `${url} updated in lockfile: ${oldEntry} -> ${entry.resolved}` - ); - } - } else if (typeof entry === "string") { - logger.log( - `${url} updated in lockfile: ${oldEntry.resolved} -> ${entry}` - ); - } else if (oldEntry.resolved !== entry.resolved) { - logger.log( - `${url} updated in lockfile: ${oldEntry.resolved} -> ${entry.resolved}` - ); - } else if (oldEntry.integrity !== entry.integrity) { - logger.log(`${url} updated in lockfile: content changed`); - } else if (oldEntry.contentType !== entry.contentType) { - logger.log( - `${url} updated in lockfile: ${oldEntry.contentType} -> ${entry.contentType}` - ); - } else { - logger.log(`${url} updated in lockfile`); - } - }; - - const storeResult = (lockfile, url, result, callback) => { - if (result.storeLock) { - storeLockEntry(lockfile, url, result.entry); - if (!cacheLocation || !result.content) - return callback(null, result); - const key = getCacheKey(result.entry.resolved); - const filePath = join(intermediateFs, cacheLocation, key); - mkdirp(intermediateFs, dirname(intermediateFs, filePath), err => { - if (err) return callback(err); - intermediateFs.writeFile(filePath, result.content, err => { - if (err) return callback(err); - callback(null, result); - }); - }); - } else { - storeLockEntry(lockfile, url, "no-cache"); - callback(null, result); - } - }; - - for (const { scheme, fetch } of schemes) { - /** - * - * @param {string} url URL - * @param {string} integrity integrity - * @param {function((Error | null)=, { entry: LockfileEntry, content: Buffer, storeLock: boolean }=): void} callback callback - */ - const resolveContent = (url, integrity, callback) => { - const handleResult = (err, result) => { - if (err) return callback(err); - if ("location" in result) { - return resolveContent( - result.location, - integrity, - (err, innerResult) => { - if (err) return callback(err); - callback(null, { - entry: innerResult.entry, - content: innerResult.content, - storeLock: innerResult.storeLock && result.storeLock - }); - } - ); - } else { - if ( - !result.fresh && - integrity && - result.entry.integrity !== integrity && - !verifyIntegrity(result.content, integrity) - ) { - return fetchContent.force(url, handleResult); - } - return callback(null, { - entry: result.entry, - content: result.content, - storeLock: result.storeLock - }); - } - }; - fetchContent(url, handleResult); - }; - - /** @typedef {{ storeCache: boolean, storeLock: boolean, validUntil: number, etag: string | undefined, fresh: boolean }} FetchResultMeta */ - /** @typedef {FetchResultMeta & { location: string }} RedirectFetchResult */ - /** @typedef {FetchResultMeta & { entry: LockfileEntry, content: Buffer }} ContentFetchResult */ - /** @typedef {RedirectFetchResult | ContentFetchResult} FetchResult */ - - /** - * @param {string} url URL - * @param {FetchResult | RedirectFetchResult} cachedResult result from cache - * @param {function((Error | null)=, FetchResult=): void} callback callback - * @returns {void} - */ - const fetchContentRaw = (url, cachedResult, callback) => { - const requestTime = Date.now(); - fetch( - new URL(url), - { - headers: { - "accept-encoding": "gzip, deflate, br", - "user-agent": "webpack", - "if-none-match": cachedResult - ? cachedResult.etag || null - : null - } - }, - res => { - const etag = res.headers["etag"]; - const location = res.headers["location"]; - const cacheControl = res.headers["cache-control"]; - const { storeLock, storeCache, validUntil } = parseCacheControl( - cacheControl, - requestTime - ); - /** - * @param {Partial> & (Pick | Pick)} partialResult result - * @returns {void} - */ - const finishWith = partialResult => { - if ("location" in partialResult) { - logger.debug( - `GET ${url} [${res.statusCode}] -> ${partialResult.location}` - ); - } else { - logger.debug( - `GET ${url} [${res.statusCode}] ${Math.ceil( - partialResult.content.length / 1024 - )} kB${!storeLock ? " no-cache" : ""}` - ); - } - const result = { - ...partialResult, - fresh: true, - storeLock, - storeCache, - validUntil, - etag - }; - if (!storeCache) { - logger.log( - `${url} can't be stored in cache, due to Cache-Control header: ${cacheControl}` - ); - return callback(null, result); - } - cache.store( - url, - null, - { - ...result, - fresh: false - }, - err => { - if (err) { - logger.warn( - `${url} can't be stored in cache: ${err.message}` - ); - logger.debug(err.stack); - } - callback(null, result); - } - ); - }; - if (res.statusCode === 304) { - if ( - cachedResult.validUntil < validUntil || - cachedResult.storeLock !== storeLock || - cachedResult.storeCache !== storeCache || - cachedResult.etag !== etag - ) { - return finishWith(cachedResult); - } else { - logger.debug(`GET ${url} [${res.statusCode}] (unchanged)`); - return callback(null, { - ...cachedResult, - fresh: true - }); - } - } - if ( - location && - res.statusCode >= 301 && - res.statusCode <= 308 - ) { - const result = { - location: new URL(location, url).href - }; - if ( - !cachedResult || - !("location" in cachedResult) || - cachedResult.location !== result.location || - cachedResult.validUntil < validUntil || - cachedResult.storeLock !== storeLock || - cachedResult.storeCache !== storeCache || - cachedResult.etag !== etag - ) { - return finishWith(result); - } else { - logger.debug(`GET ${url} [${res.statusCode}] (unchanged)`); - return callback(null, { - ...result, - fresh: true, - storeLock, - storeCache, - validUntil, - etag - }); - } - } - const contentType = res.headers["content-type"] || ""; - const bufferArr = []; - - const contentEncoding = res.headers["content-encoding"]; - let stream = res; - if (contentEncoding === "gzip") { - stream = stream.pipe(createGunzip()); - } else if (contentEncoding === "br") { - stream = stream.pipe(createBrotliDecompress()); - } else if (contentEncoding === "deflate") { - stream = stream.pipe(createInflate()); - } - - stream.on("data", chunk => { - bufferArr.push(chunk); - }); - - stream.on("end", () => { - if (!res.complete) { - logger.log(`GET ${url} [${res.statusCode}] (terminated)`); - return callback(new Error(`${url} request was terminated`)); - } - - const content = Buffer.concat(bufferArr); - - if (res.statusCode !== 200) { - logger.log(`GET ${url} [${res.statusCode}]`); - return callback( - new Error( - `${url} request status code = ${ - res.statusCode - }\n${content.toString("utf-8")}` - ) - ); - } - - const integrity = computeIntegrity(content); - const entry = { resolved: url, integrity, contentType }; - - finishWith({ - entry, - content - }); - }); - } - ).on("error", err => { - logger.log(`GET ${url} (error)`); - err.message += `\nwhile fetching ${url}`; - callback(err); - }); - }; - - const fetchContent = cachedWithKey( - /** - * @param {string} url URL - * @param {function((Error | null)=, { validUntil: number, etag?: string, entry: LockfileEntry, content: Buffer, fresh: boolean } | { validUntil: number, etag?: string, location: string, fresh: boolean }=): void} callback callback - * @returns {void} - */ (url, callback) => { - cache.get(url, null, (err, cachedResult) => { - if (err) return callback(err); - if (cachedResult) { - const isValid = cachedResult.validUntil >= Date.now(); - if (isValid) return callback(null, cachedResult); - } - fetchContentRaw(url, cachedResult, callback); - }); - }, - (url, callback) => fetchContentRaw(url, undefined, callback) - ); - - const isAllowed = uri => { - for (const allowed of allowedUris) { - if (typeof allowed === "string") { - if (uri.startsWith(allowed)) return true; - } else if (typeof allowed === "function") { - if (allowed(uri)) return true; - } else { - if (allowed.test(uri)) return true; - } - } - return false; - }; - - const getInfo = cachedWithKey( - /** - * @param {string} url the url - * @param {function((Error | null)=, { entry: LockfileEntry, content: Buffer }=): void} callback callback - * @returns {void} - */ - (url, callback) => { - if (!isAllowed(url)) { - return callback( - new Error( - `${url} doesn't match the allowedUris policy. These URIs are allowed:\n${allowedUris - .map(uri => ` - ${uri}`) - .join("\n")}` - ) - ); - } - getLockfile((err, lockfile) => { - if (err) return callback(err); - const entryOrString = lockfile.entries.get(url); - if (!entryOrString) { - if (frozen) { - return callback( - new Error( - `${url} has no lockfile entry and lockfile is frozen` - ) - ); - } - resolveContent(url, null, (err, result) => { - if (err) return callback(err); - storeResult(lockfile, url, result, callback); - }); - return; - } - if (typeof entryOrString === "string") { - const entryTag = entryOrString; - resolveContent(url, null, (err, result) => { - if (err) return callback(err); - if (!result.storeLock || entryTag === "ignore") - return callback(null, result); - if (frozen) { - return callback( - new Error( - `${url} used to have ${entryTag} lockfile entry and has content now, but lockfile is frozen` - ) - ); - } - if (!upgrade) { - return callback( - new Error( - `${url} used to have ${entryTag} lockfile entry and has content now. -This should be reflected in the lockfile, so this lockfile entry must be upgraded, but upgrading is not enabled. -Remove this line from the lockfile to force upgrading.` - ) - ); - } - storeResult(lockfile, url, result, callback); - }); - return; - } - let entry = entryOrString; - const doFetch = lockedContent => { - resolveContent(url, entry.integrity, (err, result) => { - if (err) { - if (lockedContent) { - logger.warn( - `Upgrade request to ${url} failed: ${err.message}` - ); - logger.debug(err.stack); - return callback(null, { - entry, - content: lockedContent - }); - } - return callback(err); - } - if (!result.storeLock) { - // When the lockfile entry should be no-cache - // we need to update the lockfile - if (frozen) { - return callback( - new Error( - `${url} has a lockfile entry and is no-cache now, but lockfile is frozen\nLockfile: ${entryToString( - entry - )}` - ) - ); - } - storeResult(lockfile, url, result, callback); - return; - } - if (!areLockfileEntriesEqual(result.entry, entry)) { - // When the lockfile entry is outdated - // we need to update the lockfile - if (frozen) { - return callback( - new Error( - `${url} has an outdated lockfile entry, but lockfile is frozen\nLockfile: ${entryToString( - entry - )}\nExpected: ${entryToString(result.entry)}` - ) - ); - } - storeResult(lockfile, url, result, callback); - return; - } - if (!lockedContent && cacheLocation) { - // When the lockfile cache content is missing - // we need to update the lockfile - if (frozen) { - return callback( - new Error( - `${url} is missing content in the lockfile cache, but lockfile is frozen\nLockfile: ${entryToString( - entry - )}` - ) - ); - } - storeResult(lockfile, url, result, callback); - return; - } - return callback(null, result); - }); - }; - if (cacheLocation) { - // When there is a lockfile cache - // we read the content from there - const key = getCacheKey(entry.resolved); - const filePath = join(intermediateFs, cacheLocation, key); - fs.readFile(filePath, (err, result) => { - const content = /** @type {Buffer} */ (result); - if (err) { - if (err.code === "ENOENT") return doFetch(); - return callback(err); - } - const continueWithCachedContent = result => { - if (!upgrade) { - // When not in upgrade mode, we accept the result from the lockfile cache - return callback(null, { entry, content }); - } - return doFetch(content); - }; - if (!verifyIntegrity(content, entry.integrity)) { - let contentWithChangedEol; - let isEolChanged = false; - try { - contentWithChangedEol = Buffer.from( - content.toString("utf-8").replace(/\r\n/g, "\n") - ); - isEolChanged = verifyIntegrity( - contentWithChangedEol, - entry.integrity - ); - } catch (e) { - // ignore - } - if (isEolChanged) { - if (!warnedAboutEol) { - const explainer = `Incorrect end of line sequence was detected in the lockfile cache. -The lockfile cache is protected by integrity checks, so any external modification will lead to a corrupted lockfile cache. -When using git make sure to configure .gitattributes correctly for the lockfile cache: - **/*webpack.lock.data/** -text -This will avoid that the end of line sequence is changed by git on Windows.`; - if (frozen) { - logger.error(explainer); - } else { - logger.warn(explainer); - logger.info( - "Lockfile cache will be automatically fixed now, but when lockfile is frozen this would result in an error." - ); - } - warnedAboutEol = true; - } - if (!frozen) { - // "fix" the end of line sequence of the lockfile content - logger.log( - `${filePath} fixed end of line sequence (\\r\\n instead of \\n).` - ); - intermediateFs.writeFile( - filePath, - contentWithChangedEol, - err => { - if (err) return callback(err); - continueWithCachedContent(contentWithChangedEol); - } - ); - return; - } - } - if (frozen) { - return callback( - new Error( - `${ - entry.resolved - } integrity mismatch, expected content with integrity ${ - entry.integrity - } but got ${computeIntegrity(content)}. -Lockfile corrupted (${ - isEolChanged - ? "end of line sequence was unexpectedly changed" - : "incorrectly merged? changed by other tools?" - }). -Run build with un-frozen lockfile to automatically fix lockfile.` - ) - ); - } else { - // "fix" the lockfile entry to the correct integrity - // the content has priority over the integrity value - entry = { - ...entry, - integrity: computeIntegrity(content) - }; - storeLockEntry(lockfile, url, entry); - } - } - continueWithCachedContent(result); - }); - } else { - doFetch(); - } - }); - } - ); - - const respondWithUrlModule = (url, resourceData, callback) => { - getInfo(url.href, (err, result) => { - if (err) return callback(err); - resourceData.resource = url.href; - resourceData.path = url.origin + url.pathname; - resourceData.query = url.search; - resourceData.fragment = url.hash; - resourceData.context = new URL( - ".", - result.entry.resolved - ).href.slice(0, -1); - resourceData.data.mimetype = result.entry.contentType; - callback(null, true); - }); - }; - normalModuleFactory.hooks.resolveForScheme - .for(scheme) - .tapAsync( - "HttpUriPlugin", - (resourceData, resolveData, callback) => { - respondWithUrlModule( - new URL(resourceData.resource), - resourceData, - callback - ); - } - ); - normalModuleFactory.hooks.resolveInScheme - .for(scheme) - .tapAsync("HttpUriPlugin", (resourceData, data, callback) => { - // Only handle relative urls (./xxx, ../xxx, /xxx, //xxx) - if ( - data.dependencyType !== "url" && - !/^\.{0,2}\//.test(resourceData.resource) - ) { - return callback(); - } - respondWithUrlModule( - new URL(resourceData.resource, data.context + "/"), - resourceData, - callback - ); - }); - const hooks = NormalModule.getCompilationHooks(compilation); - hooks.readResourceForScheme - .for(scheme) - .tapAsync("HttpUriPlugin", (resource, module, callback) => { - return getInfo(resource, (err, result) => { - if (err) return callback(err); - module.buildInfo.resourceIntegrity = result.entry.integrity; - callback(null, result.content); - }); - }); - hooks.needBuild.tapAsync( - "HttpUriPlugin", - (module, context, callback) => { - if ( - module.resource && - module.resource.startsWith(`${scheme}://`) - ) { - getInfo(module.resource, (err, result) => { - if (err) return callback(err); - if ( - result.entry.integrity !== - module.buildInfo.resourceIntegrity - ) { - return callback(null, true); - } - callback(); - }); - } else { - return callback(); - } - } - ); - } - compilation.hooks.finishModules.tapAsync( - "HttpUriPlugin", - (modules, callback) => { - if (!lockfileUpdates) return callback(); - const ext = extname(lockfileLocation); - const tempFile = join( - intermediateFs, - dirname(intermediateFs, lockfileLocation), - `.${basename(lockfileLocation, ext)}.${ - (Math.random() * 10000) | 0 - }${ext}` - ); - - const writeDone = () => { - const nextOperation = inProgressWrite.shift(); - if (nextOperation) { - nextOperation(); - } else { - inProgressWrite = undefined; - } - }; - const runWrite = () => { - intermediateFs.readFile(lockfileLocation, (err, buffer) => { - if (err && err.code !== "ENOENT") { - writeDone(); - return callback(err); - } - const lockfile = buffer - ? Lockfile.parse(buffer.toString("utf-8")) - : new Lockfile(); - for (const [key, value] of lockfileUpdates) { - lockfile.entries.set(key, value); - } - intermediateFs.writeFile(tempFile, lockfile.toString(), err => { - if (err) { - writeDone(); - return intermediateFs.unlink(tempFile, () => callback(err)); - } - intermediateFs.rename(tempFile, lockfileLocation, err => { - if (err) { - writeDone(); - return intermediateFs.unlink(tempFile, () => - callback(err) - ); - } - writeDone(); - callback(); - }); - }); - }); - }; - if (inProgressWrite) { - inProgressWrite.push(runWrite); - } else { - inProgressWrite = []; - runWrite(); - } - } - ); - } - ); - } -} - -module.exports = HttpUriPlugin; - - -/***/ }), - -/***/ 86424: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class ArraySerializer { - serialize(array, { write }) { - write(array.length); - for (const item of array) write(item); - } - deserialize({ read }) { - const length = read(); - const array = []; - for (let i = 0; i < length; i++) { - array.push(read()); - } - return array; - } -} - -module.exports = ArraySerializer; - - -/***/ }), - -/***/ 32490: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const memoize = __webpack_require__(61374); -const SerializerMiddleware = __webpack_require__(51947); - -/** @typedef {import("./types").BufferSerializableType} BufferSerializableType */ -/** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */ - -/* -Format: - -File -> Section* - -Section -> NullsSection | - BooleansSection | - F64NumbersSection | - I32NumbersSection | - I8NumbersSection | - ShortStringSection | - StringSection | - BufferSection | - NopSection - - - -NullsSection -> - NullHeaderByte | Null2HeaderByte | Null3HeaderByte | - Nulls8HeaderByte 0xnn (n:count - 4) | - Nulls32HeaderByte n:ui32 (n:count - 260) | -BooleansSection -> TrueHeaderByte | FalseHeaderByte | BooleansSectionHeaderByte BooleansCountAndBitsByte -F64NumbersSection -> F64NumbersSectionHeaderByte f64* -I32NumbersSection -> I32NumbersSectionHeaderByte i32* -I8NumbersSection -> I8NumbersSectionHeaderByte i8* -ShortStringSection -> ShortStringSectionHeaderByte ascii-byte* -StringSection -> StringSectionHeaderByte i32:length utf8-byte* -BufferSection -> BufferSectionHeaderByte i32:length byte* -NopSection --> NopSectionHeaderByte - -ShortStringSectionHeaderByte -> 0b1nnn_nnnn (n:length) - -F64NumbersSectionHeaderByte -> 0b001n_nnnn (n:count - 1) -I32NumbersSectionHeaderByte -> 0b010n_nnnn (n:count - 1) -I8NumbersSectionHeaderByte -> 0b011n_nnnn (n:count - 1) - -NullsSectionHeaderByte -> 0b0001_nnnn (n:count - 1) -BooleansCountAndBitsByte -> - 0b0000_1xxx (count = 3) | - 0b0001_xxxx (count = 4) | - 0b001x_xxxx (count = 5) | - 0b01xx_xxxx (count = 6) | - 0b1nnn_nnnn (n:count - 7, 7 <= count <= 133) - 0xff n:ui32 (n:count, 134 <= count < 2^32) - -StringSectionHeaderByte -> 0b0000_1110 -BufferSectionHeaderByte -> 0b0000_1111 -NopSectionHeaderByte -> 0b0000_1011 -FalseHeaderByte -> 0b0000_1100 -TrueHeaderByte -> 0b0000_1101 - -RawNumber -> n (n <= 10) - -*/ - -const LAZY_HEADER = 0x0b; -const TRUE_HEADER = 0x0c; -const FALSE_HEADER = 0x0d; -const BOOLEANS_HEADER = 0x0e; -const NULL_HEADER = 0x10; -const NULL2_HEADER = 0x11; -const NULL3_HEADER = 0x12; -const NULLS8_HEADER = 0x13; -const NULLS32_HEADER = 0x14; -const NULL_AND_I8_HEADER = 0x15; -const NULL_AND_I32_HEADER = 0x16; -const NULL_AND_TRUE_HEADER = 0x17; -const NULL_AND_FALSE_HEADER = 0x18; -const STRING_HEADER = 0x1e; -const BUFFER_HEADER = 0x1f; -const I8_HEADER = 0x60; -const I32_HEADER = 0x40; -const F64_HEADER = 0x20; -const SHORT_STRING_HEADER = 0x80; - -/** Uplift high-order bits */ -const NUMBERS_HEADER_MASK = 0xe0; -const NUMBERS_COUNT_MASK = 0x1f; // 0b0001_1111 -const SHORT_STRING_LENGTH_MASK = 0x7f; // 0b0111_1111 - -const HEADER_SIZE = 1; -const I8_SIZE = 1; -const I32_SIZE = 4; -const F64_SIZE = 8; - -const MEASURE_START_OPERATION = Symbol("MEASURE_START_OPERATION"); -const MEASURE_END_OPERATION = Symbol("MEASURE_END_OPERATION"); - -/** @typedef {typeof MEASURE_START_OPERATION} MEASURE_START_OPERATION_TYPE */ -/** @typedef {typeof MEASURE_END_OPERATION} MEASURE_END_OPERATION_TYPE */ - -const identifyNumber = n => { - if (n === (n | 0)) { - if (n <= 127 && n >= -128) return 0; - if (n <= 2147483647 && n >= -2147483648) return 1; - } - return 2; -}; - -/** - * @typedef {PrimitiveSerializableType[]} DeserializedType - * @typedef {BufferSerializableType[]} SerializedType - * @extends {SerializerMiddleware} - */ -class BinaryMiddleware extends SerializerMiddleware { - /** - * @param {DeserializedType} data data - * @param {Object} context context object - * @returns {SerializedType|Promise} serialized data - */ - serialize(data, context) { - return this._serialize(data, context); - } - - _serializeLazy(fn, context) { - return SerializerMiddleware.serializeLazy(fn, data => - this._serialize(data, context) - ); - } - - /** - * @param {DeserializedType} data data - * @param {Object} context context object - * @param {{ leftOverBuffer: Buffer | null, allocationSize: number, increaseCounter: number }} allocationScope allocation scope - * @returns {SerializedType} serialized data - */ - _serialize( - data, - context, - allocationScope = { - allocationSize: 1024, - increaseCounter: 0, - leftOverBuffer: null - } - ) { - /** @type {Buffer} */ - let leftOverBuffer = null; - /** @type {BufferSerializableType[]} */ - let buffers = []; - /** @type {Buffer} */ - let currentBuffer = allocationScope ? allocationScope.leftOverBuffer : null; - allocationScope.leftOverBuffer = null; - let currentPosition = 0; - if (currentBuffer === null) { - currentBuffer = Buffer.allocUnsafe(allocationScope.allocationSize); - } - const allocate = bytesNeeded => { - if (currentBuffer !== null) { - if (currentBuffer.length - currentPosition >= bytesNeeded) return; - flush(); - } - if (leftOverBuffer && leftOverBuffer.length >= bytesNeeded) { - currentBuffer = leftOverBuffer; - leftOverBuffer = null; - } else { - currentBuffer = Buffer.allocUnsafe( - Math.max(bytesNeeded, allocationScope.allocationSize) - ); - if ( - !(allocationScope.increaseCounter = - (allocationScope.increaseCounter + 1) % 4) && - allocationScope.allocationSize < 16777216 - ) { - allocationScope.allocationSize = allocationScope.allocationSize << 1; - } - } - }; - const flush = () => { - if (currentBuffer !== null) { - if (currentPosition > 0) { - buffers.push( - Buffer.from( - currentBuffer.buffer, - currentBuffer.byteOffset, - currentPosition - ) - ); - } - if ( - !leftOverBuffer || - leftOverBuffer.length < currentBuffer.length - currentPosition - ) { - leftOverBuffer = Buffer.from( - currentBuffer.buffer, - currentBuffer.byteOffset + currentPosition, - currentBuffer.byteLength - currentPosition - ); - } - - currentBuffer = null; - currentPosition = 0; - } - }; - const writeU8 = byte => { - currentBuffer.writeUInt8(byte, currentPosition++); - }; - const writeU32 = ui32 => { - currentBuffer.writeUInt32LE(ui32, currentPosition); - currentPosition += 4; - }; - const measureStack = []; - const measureStart = () => { - measureStack.push(buffers.length, currentPosition); - }; - const measureEnd = () => { - const oldPos = measureStack.pop(); - const buffersIndex = measureStack.pop(); - let size = currentPosition - oldPos; - for (let i = buffersIndex; i < buffers.length; i++) { - size += buffers[i].length; - } - return size; - }; - for (let i = 0; i < data.length; i++) { - const thing = data[i]; - switch (typeof thing) { - case "function": { - if (!SerializerMiddleware.isLazy(thing)) - throw new Error("Unexpected function " + thing); - /** @type {SerializedType | (() => SerializedType)} */ - let serializedData = - SerializerMiddleware.getLazySerializedValue(thing); - if (serializedData === undefined) { - if (SerializerMiddleware.isLazy(thing, this)) { - flush(); - allocationScope.leftOverBuffer = leftOverBuffer; - const result = - /** @type {(Exclude>)[]} */ ( - thing() - ); - const data = this._serialize(result, context, allocationScope); - leftOverBuffer = allocationScope.leftOverBuffer; - allocationScope.leftOverBuffer = null; - SerializerMiddleware.setLazySerializedValue(thing, data); - serializedData = data; - } else { - serializedData = this._serializeLazy(thing, context); - flush(); - buffers.push(serializedData); - break; - } - } else { - if (typeof serializedData === "function") { - flush(); - buffers.push(serializedData); - break; - } - } - const lengths = []; - for (const item of serializedData) { - let last; - if (typeof item === "function") { - lengths.push(0); - } else if (item.length === 0) { - // ignore - } else if ( - lengths.length > 0 && - (last = lengths[lengths.length - 1]) !== 0 - ) { - const remaining = 0xffffffff - last; - if (remaining >= item.length) { - lengths[lengths.length - 1] += item.length; - } else { - lengths.push(item.length - remaining); - lengths[lengths.length - 2] = 0xffffffff; - } - } else { - lengths.push(item.length); - } - } - allocate(5 + lengths.length * 4); - writeU8(LAZY_HEADER); - writeU32(lengths.length); - for (const l of lengths) { - writeU32(l); - } - flush(); - for (const item of serializedData) { - buffers.push(item); - } - break; - } - case "string": { - const len = Buffer.byteLength(thing); - if (len >= 128 || len !== thing.length) { - allocate(len + HEADER_SIZE + I32_SIZE); - writeU8(STRING_HEADER); - writeU32(len); - currentBuffer.write(thing, currentPosition); - currentPosition += len; - } else if (len >= 70) { - allocate(len + HEADER_SIZE); - writeU8(SHORT_STRING_HEADER | len); - - currentBuffer.write(thing, currentPosition, "latin1"); - currentPosition += len; - } else { - allocate(len + HEADER_SIZE); - writeU8(SHORT_STRING_HEADER | len); - - for (let i = 0; i < len; i++) { - currentBuffer[currentPosition++] = thing.charCodeAt(i); - } - } - break; - } - case "number": { - const type = identifyNumber(thing); - if (type === 0 && thing >= 0 && thing <= 10) { - // shortcut for very small numbers - allocate(I8_SIZE); - writeU8(thing); - break; - } - /** - * amount of numbers to write - * @type {number} - */ - let n = 1; - for (; n < 32 && i + n < data.length; n++) { - const item = data[i + n]; - if (typeof item !== "number") break; - if (identifyNumber(item) !== type) break; - } - switch (type) { - case 0: - allocate(HEADER_SIZE + I8_SIZE * n); - writeU8(I8_HEADER | (n - 1)); - while (n > 0) { - currentBuffer.writeInt8( - /** @type {number} */ (data[i]), - currentPosition - ); - currentPosition += I8_SIZE; - n--; - i++; - } - break; - case 1: - allocate(HEADER_SIZE + I32_SIZE * n); - writeU8(I32_HEADER | (n - 1)); - while (n > 0) { - currentBuffer.writeInt32LE( - /** @type {number} */ (data[i]), - currentPosition - ); - currentPosition += I32_SIZE; - n--; - i++; - } - break; - case 2: - allocate(HEADER_SIZE + F64_SIZE * n); - writeU8(F64_HEADER | (n - 1)); - while (n > 0) { - currentBuffer.writeDoubleLE( - /** @type {number} */ (data[i]), - currentPosition - ); - currentPosition += F64_SIZE; - n--; - i++; - } - break; - } - - i--; - break; - } - case "boolean": { - let lastByte = thing === true ? 1 : 0; - const bytes = []; - let count = 1; - let n; - for (n = 1; n < 0xffffffff && i + n < data.length; n++) { - const item = data[i + n]; - if (typeof item !== "boolean") break; - const pos = count & 0x7; - if (pos === 0) { - bytes.push(lastByte); - lastByte = item === true ? 1 : 0; - } else if (item === true) { - lastByte |= 1 << pos; - } - count++; - } - i += count - 1; - if (count === 1) { - allocate(HEADER_SIZE); - writeU8(lastByte === 1 ? TRUE_HEADER : FALSE_HEADER); - } else if (count === 2) { - allocate(HEADER_SIZE * 2); - writeU8(lastByte & 1 ? TRUE_HEADER : FALSE_HEADER); - writeU8(lastByte & 2 ? TRUE_HEADER : FALSE_HEADER); - } else if (count <= 6) { - allocate(HEADER_SIZE + I8_SIZE); - writeU8(BOOLEANS_HEADER); - writeU8((1 << count) | lastByte); - } else if (count <= 133) { - allocate(HEADER_SIZE + I8_SIZE + I8_SIZE * bytes.length + I8_SIZE); - writeU8(BOOLEANS_HEADER); - writeU8(0x80 | (count - 7)); - for (const byte of bytes) writeU8(byte); - writeU8(lastByte); - } else { - allocate( - HEADER_SIZE + - I8_SIZE + - I32_SIZE + - I8_SIZE * bytes.length + - I8_SIZE - ); - writeU8(BOOLEANS_HEADER); - writeU8(0xff); - writeU32(count); - for (const byte of bytes) writeU8(byte); - writeU8(lastByte); - } - break; - } - case "object": { - if (thing === null) { - let n; - for (n = 1; n < 0x100000104 && i + n < data.length; n++) { - const item = data[i + n]; - if (item !== null) break; - } - i += n - 1; - if (n === 1) { - if (i + 1 < data.length) { - const next = data[i + 1]; - if (next === true) { - allocate(HEADER_SIZE); - writeU8(NULL_AND_TRUE_HEADER); - i++; - } else if (next === false) { - allocate(HEADER_SIZE); - writeU8(NULL_AND_FALSE_HEADER); - i++; - } else if (typeof next === "number") { - const type = identifyNumber(next); - if (type === 0) { - allocate(HEADER_SIZE + I8_SIZE); - writeU8(NULL_AND_I8_HEADER); - currentBuffer.writeInt8(next, currentPosition); - currentPosition += I8_SIZE; - i++; - } else if (type === 1) { - allocate(HEADER_SIZE + I32_SIZE); - writeU8(NULL_AND_I32_HEADER); - currentBuffer.writeInt32LE(next, currentPosition); - currentPosition += I32_SIZE; - i++; - } else { - allocate(HEADER_SIZE); - writeU8(NULL_HEADER); - } - } else { - allocate(HEADER_SIZE); - writeU8(NULL_HEADER); - } - } else { - allocate(HEADER_SIZE); - writeU8(NULL_HEADER); - } - } else if (n === 2) { - allocate(HEADER_SIZE); - writeU8(NULL2_HEADER); - } else if (n === 3) { - allocate(HEADER_SIZE); - writeU8(NULL3_HEADER); - } else if (n < 260) { - allocate(HEADER_SIZE + I8_SIZE); - writeU8(NULLS8_HEADER); - writeU8(n - 4); - } else { - allocate(HEADER_SIZE + I32_SIZE); - writeU8(NULLS32_HEADER); - writeU32(n - 260); - } - } else if (Buffer.isBuffer(thing)) { - if (thing.length < 8192) { - allocate(HEADER_SIZE + I32_SIZE + thing.length); - writeU8(BUFFER_HEADER); - writeU32(thing.length); - thing.copy(currentBuffer, currentPosition); - currentPosition += thing.length; - } else { - allocate(HEADER_SIZE + I32_SIZE); - writeU8(BUFFER_HEADER); - writeU32(thing.length); - flush(); - buffers.push(thing); - } - } - break; - } - case "symbol": { - if (thing === MEASURE_START_OPERATION) { - measureStart(); - } else if (thing === MEASURE_END_OPERATION) { - const size = measureEnd(); - allocate(HEADER_SIZE + I32_SIZE); - writeU8(I32_HEADER); - currentBuffer.writeInt32LE(size, currentPosition); - currentPosition += I32_SIZE; - } - break; - } - } - } - flush(); - - allocationScope.leftOverBuffer = leftOverBuffer; - - // avoid leaking memory - currentBuffer = null; - leftOverBuffer = null; - allocationScope = undefined; - const _buffers = buffers; - buffers = undefined; - return _buffers; - } - - /** - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType|Promise} deserialized data - */ - deserialize(data, context) { - return this._deserialize(data, context); - } - - _createLazyDeserialized(content, context) { - return SerializerMiddleware.createLazy( - memoize(() => this._deserialize(content, context)), - this, - undefined, - content - ); - } - - _deserializeLazy(fn, context) { - return SerializerMiddleware.deserializeLazy(fn, data => - this._deserialize(data, context) - ); - } - - /** - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType} deserialized data - */ - _deserialize(data, context) { - let currentDataItem = 0; - let currentBuffer = data[0]; - let currentIsBuffer = Buffer.isBuffer(currentBuffer); - let currentPosition = 0; - - const retainedBuffer = context.retainedBuffer || (x => x); - - const checkOverflow = () => { - if (currentPosition >= currentBuffer.length) { - currentPosition = 0; - currentDataItem++; - currentBuffer = - currentDataItem < data.length ? data[currentDataItem] : null; - currentIsBuffer = Buffer.isBuffer(currentBuffer); - } - }; - const isInCurrentBuffer = n => { - return currentIsBuffer && n + currentPosition <= currentBuffer.length; - }; - const ensureBuffer = () => { - if (!currentIsBuffer) { - throw new Error( - currentBuffer === null - ? "Unexpected end of stream" - : "Unexpected lazy element in stream" - ); - } - }; - /** - * Reads n bytes - * @param {number} n amount of bytes to read - * @returns {Buffer} buffer with bytes - */ - const read = n => { - ensureBuffer(); - const rem = currentBuffer.length - currentPosition; - if (rem < n) { - const buffers = [read(rem)]; - n -= rem; - ensureBuffer(); - while (currentBuffer.length < n) { - const b = /** @type {Buffer} */ (currentBuffer); - buffers.push(b); - n -= b.length; - currentDataItem++; - currentBuffer = - currentDataItem < data.length ? data[currentDataItem] : null; - currentIsBuffer = Buffer.isBuffer(currentBuffer); - ensureBuffer(); - } - buffers.push(read(n)); - return Buffer.concat(buffers); - } - const b = /** @type {Buffer} */ (currentBuffer); - const res = Buffer.from(b.buffer, b.byteOffset + currentPosition, n); - currentPosition += n; - checkOverflow(); - return res; - }; - /** - * Reads up to n bytes - * @param {number} n amount of bytes to read - * @returns {Buffer} buffer with bytes - */ - const readUpTo = n => { - ensureBuffer(); - const rem = currentBuffer.length - currentPosition; - if (rem < n) { - n = rem; - } - const b = /** @type {Buffer} */ (currentBuffer); - const res = Buffer.from(b.buffer, b.byteOffset + currentPosition, n); - currentPosition += n; - checkOverflow(); - return res; - }; - const readU8 = () => { - ensureBuffer(); - /** - * There is no need to check remaining buffer size here - * since {@link checkOverflow} guarantees at least one byte remaining - */ - const byte = /** @type {Buffer} */ (currentBuffer).readUInt8( - currentPosition - ); - currentPosition += I8_SIZE; - checkOverflow(); - return byte; - }; - const readU32 = () => { - return read(I32_SIZE).readUInt32LE(0); - }; - const readBits = (data, n) => { - let mask = 1; - while (n !== 0) { - result.push((data & mask) !== 0); - mask = mask << 1; - n--; - } - }; - const dispatchTable = Array.from({ length: 256 }).map((_, header) => { - switch (header) { - case LAZY_HEADER: - return () => { - const count = readU32(); - const lengths = Array.from({ length: count }).map(() => readU32()); - const content = []; - for (let l of lengths) { - if (l === 0) { - if (typeof currentBuffer !== "function") { - throw new Error("Unexpected non-lazy element in stream"); - } - content.push(currentBuffer); - currentDataItem++; - currentBuffer = - currentDataItem < data.length ? data[currentDataItem] : null; - currentIsBuffer = Buffer.isBuffer(currentBuffer); - } else { - do { - const buf = readUpTo(l); - l -= buf.length; - content.push(retainedBuffer(buf)); - } while (l > 0); - } - } - result.push(this._createLazyDeserialized(content, context)); - }; - case BUFFER_HEADER: - return () => { - const len = readU32(); - result.push(retainedBuffer(read(len))); - }; - case TRUE_HEADER: - return () => result.push(true); - case FALSE_HEADER: - return () => result.push(false); - case NULL3_HEADER: - return () => result.push(null, null, null); - case NULL2_HEADER: - return () => result.push(null, null); - case NULL_HEADER: - return () => result.push(null); - case NULL_AND_TRUE_HEADER: - return () => result.push(null, true); - case NULL_AND_FALSE_HEADER: - return () => result.push(null, false); - case NULL_AND_I8_HEADER: - return () => { - if (currentIsBuffer) { - result.push( - null, - /** @type {Buffer} */ (currentBuffer).readInt8(currentPosition) - ); - currentPosition += I8_SIZE; - checkOverflow(); - } else { - result.push(null, read(I8_SIZE).readInt8(0)); - } - }; - case NULL_AND_I32_HEADER: - return () => { - result.push(null); - if (isInCurrentBuffer(I32_SIZE)) { - result.push( - /** @type {Buffer} */ (currentBuffer).readInt32LE( - currentPosition - ) - ); - currentPosition += I32_SIZE; - checkOverflow(); - } else { - result.push(read(I32_SIZE).readInt32LE(0)); - } - }; - case NULLS8_HEADER: - return () => { - const len = readU8() + 4; - for (let i = 0; i < len; i++) { - result.push(null); - } - }; - case NULLS32_HEADER: - return () => { - const len = readU32() + 260; - for (let i = 0; i < len; i++) { - result.push(null); - } - }; - case BOOLEANS_HEADER: - return () => { - const innerHeader = readU8(); - if ((innerHeader & 0xf0) === 0) { - readBits(innerHeader, 3); - } else if ((innerHeader & 0xe0) === 0) { - readBits(innerHeader, 4); - } else if ((innerHeader & 0xc0) === 0) { - readBits(innerHeader, 5); - } else if ((innerHeader & 0x80) === 0) { - readBits(innerHeader, 6); - } else if (innerHeader !== 0xff) { - let count = (innerHeader & 0x7f) + 7; - while (count > 8) { - readBits(readU8(), 8); - count -= 8; - } - readBits(readU8(), count); - } else { - let count = readU32(); - while (count > 8) { - readBits(readU8(), 8); - count -= 8; - } - readBits(readU8(), count); - } - }; - case STRING_HEADER: - return () => { - const len = readU32(); - if (isInCurrentBuffer(len) && currentPosition + len < 0x7fffffff) { - result.push( - currentBuffer.toString( - undefined, - currentPosition, - currentPosition + len - ) - ); - currentPosition += len; - checkOverflow(); - } else { - result.push(read(len).toString()); - } - }; - case SHORT_STRING_HEADER: - return () => result.push(""); - case SHORT_STRING_HEADER | 1: - return () => { - if (currentIsBuffer && currentPosition < 0x7ffffffe) { - result.push( - currentBuffer.toString( - "latin1", - currentPosition, - currentPosition + 1 - ) - ); - currentPosition++; - checkOverflow(); - } else { - result.push(read(1).toString("latin1")); - } - }; - case I8_HEADER: - return () => { - if (currentIsBuffer) { - result.push( - /** @type {Buffer} */ (currentBuffer).readInt8(currentPosition) - ); - currentPosition++; - checkOverflow(); - } else { - result.push(read(1).readInt8(0)); - } - }; - default: - if (header <= 10) { - return () => result.push(header); - } else if ((header & SHORT_STRING_HEADER) === SHORT_STRING_HEADER) { - const len = header & SHORT_STRING_LENGTH_MASK; - return () => { - if ( - isInCurrentBuffer(len) && - currentPosition + len < 0x7fffffff - ) { - result.push( - currentBuffer.toString( - "latin1", - currentPosition, - currentPosition + len - ) - ); - currentPosition += len; - checkOverflow(); - } else { - result.push(read(len).toString("latin1")); - } - }; - } else if ((header & NUMBERS_HEADER_MASK) === F64_HEADER) { - const len = (header & NUMBERS_COUNT_MASK) + 1; - return () => { - const need = F64_SIZE * len; - if (isInCurrentBuffer(need)) { - for (let i = 0; i < len; i++) { - result.push( - /** @type {Buffer} */ (currentBuffer).readDoubleLE( - currentPosition - ) - ); - currentPosition += F64_SIZE; - } - checkOverflow(); - } else { - const buf = read(need); - for (let i = 0; i < len; i++) { - result.push(buf.readDoubleLE(i * F64_SIZE)); - } - } - }; - } else if ((header & NUMBERS_HEADER_MASK) === I32_HEADER) { - const len = (header & NUMBERS_COUNT_MASK) + 1; - return () => { - const need = I32_SIZE * len; - if (isInCurrentBuffer(need)) { - for (let i = 0; i < len; i++) { - result.push( - /** @type {Buffer} */ (currentBuffer).readInt32LE( - currentPosition - ) - ); - currentPosition += I32_SIZE; - } - checkOverflow(); - } else { - const buf = read(need); - for (let i = 0; i < len; i++) { - result.push(buf.readInt32LE(i * I32_SIZE)); - } - } - }; - } else if ((header & NUMBERS_HEADER_MASK) === I8_HEADER) { - const len = (header & NUMBERS_COUNT_MASK) + 1; - return () => { - const need = I8_SIZE * len; - if (isInCurrentBuffer(need)) { - for (let i = 0; i < len; i++) { - result.push( - /** @type {Buffer} */ (currentBuffer).readInt8( - currentPosition - ) - ); - currentPosition += I8_SIZE; - } - checkOverflow(); - } else { - const buf = read(need); - for (let i = 0; i < len; i++) { - result.push(buf.readInt8(i * I8_SIZE)); - } - } - }; - } else { - return () => { - throw new Error( - `Unexpected header byte 0x${header.toString(16)}` - ); - }; - } - } - }); - - /** @type {DeserializedType} */ - let result = []; - while (currentBuffer !== null) { - if (typeof currentBuffer === "function") { - result.push(this._deserializeLazy(currentBuffer, context)); - currentDataItem++; - currentBuffer = - currentDataItem < data.length ? data[currentDataItem] : null; - currentIsBuffer = Buffer.isBuffer(currentBuffer); - } else { - const header = readU8(); - dispatchTable[header](); - } - } - - // avoid leaking memory in context - let _result = result; - result = undefined; - return _result; - } -} - -module.exports = BinaryMiddleware; - -module.exports.MEASURE_START_OPERATION = MEASURE_START_OPERATION; -module.exports.MEASURE_END_OPERATION = MEASURE_END_OPERATION; - - -/***/ }), - -/***/ 19507: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class DateObjectSerializer { - serialize(obj, { write }) { - write(obj.getTime()); - } - deserialize({ read }) { - return new Date(read()); - } -} - -module.exports = DateObjectSerializer; - - -/***/ }), - -/***/ 30275: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class ErrorObjectSerializer { - constructor(Type) { - this.Type = Type; - } - - serialize(obj, { write }) { - write(obj.message); - write(obj.stack); - } - - deserialize({ read }) { - const err = new this.Type(); - - err.message = read(); - err.stack = read(); - - return err; - } -} - -module.exports = ErrorObjectSerializer; - - -/***/ }), - -/***/ 42404: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { constants } = __webpack_require__(14300); -const { pipeline } = __webpack_require__(12781); -const { - createBrotliCompress, - createBrotliDecompress, - createGzip, - createGunzip, - constants: zConstants -} = __webpack_require__(59796); -const createHash = __webpack_require__(85205); -const { dirname, join, mkdirp } = __webpack_require__(47077); -const memoize = __webpack_require__(61374); -const SerializerMiddleware = __webpack_require__(51947); - -/** @typedef {typeof import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ -/** @typedef {import("./types").BufferSerializableType} BufferSerializableType */ - -/* -Format: - -File -> Header Section* - -Version -> u32 -AmountOfSections -> u32 -SectionSize -> i32 (if less than zero represents lazy value) - -Header -> Version AmountOfSections SectionSize* - -Buffer -> n bytes -Section -> Buffer - -*/ - -// "wpc" + 1 in little-endian -const VERSION = 0x01637077; -const WRITE_LIMIT_TOTAL = 0x7fff0000; -const WRITE_LIMIT_CHUNK = 511 * 1024 * 1024; - -/** - * @param {Buffer[]} buffers buffers - * @param {string | Hash} hashFunction hash function to use - * @returns {string} hash - */ -const hashForName = (buffers, hashFunction) => { - const hash = createHash(hashFunction); - for (const buf of buffers) hash.update(buf); - return /** @type {string} */ (hash.digest("hex")); -}; - -const COMPRESSION_CHUNK_SIZE = 100 * 1024 * 1024; -const DECOMPRESSION_CHUNK_SIZE = 100 * 1024 * 1024; - -const writeUInt64LE = Buffer.prototype.writeBigUInt64LE - ? (buf, value, offset) => { - buf.writeBigUInt64LE(BigInt(value), offset); - } - : (buf, value, offset) => { - const low = value % 0x100000000; - const high = (value - low) / 0x100000000; - buf.writeUInt32LE(low, offset); - buf.writeUInt32LE(high, offset + 4); - }; - -const readUInt64LE = Buffer.prototype.readBigUInt64LE - ? (buf, offset) => { - return Number(buf.readBigUInt64LE(offset)); - } - : (buf, offset) => { - const low = buf.readUInt32LE(offset); - const high = buf.readUInt32LE(offset + 4); - return high * 0x100000000 + low; - }; - -/** - * @typedef {Object} SerializeResult - * @property {string | false} name - * @property {number} size - * @property {Promise=} backgroundJob - */ - -/** - * @param {FileMiddleware} middleware this - * @param {BufferSerializableType[] | Promise} data data to be serialized - * @param {string | boolean} name file base name - * @param {function(string | false, Buffer[], number): Promise} writeFile writes a file - * @param {string | Hash} hashFunction hash function to use - * @returns {Promise} resulting file pointer and promise - */ -const serialize = async ( - middleware, - data, - name, - writeFile, - hashFunction = "md4" -) => { - /** @type {(Buffer[] | Buffer | SerializeResult | Promise)[]} */ - const processedData = []; - /** @type {WeakMap>} */ - const resultToLazy = new WeakMap(); - /** @type {Buffer[]} */ - let lastBuffers = undefined; - for (const item of await data) { - if (typeof item === "function") { - if (!SerializerMiddleware.isLazy(item)) - throw new Error("Unexpected function"); - if (!SerializerMiddleware.isLazy(item, middleware)) { - throw new Error( - "Unexpected lazy value with non-this target (can't pass through lazy values)" - ); - } - lastBuffers = undefined; - const serializedInfo = SerializerMiddleware.getLazySerializedValue(item); - if (serializedInfo) { - if (typeof serializedInfo === "function") { - throw new Error( - "Unexpected lazy value with non-this target (can't pass through lazy values)" - ); - } else { - processedData.push(serializedInfo); - } - } else { - const content = item(); - if (content) { - const options = SerializerMiddleware.getLazyOptions(item); - processedData.push( - serialize( - middleware, - content, - (options && options.name) || true, - writeFile, - hashFunction - ).then(result => { - /** @type {any} */ (item).options.size = result.size; - resultToLazy.set(result, item); - return result; - }) - ); - } else { - throw new Error( - "Unexpected falsy value returned by lazy value function" - ); - } - } - } else if (item) { - if (lastBuffers) { - lastBuffers.push(item); - } else { - lastBuffers = [item]; - processedData.push(lastBuffers); - } - } else { - throw new Error("Unexpected falsy value in items array"); - } - } - /** @type {Promise[]} */ - const backgroundJobs = []; - const resolvedData = ( - await Promise.all( - /** @type {Promise[]} */ ( - processedData - ) - ) - ).map(item => { - if (Array.isArray(item) || Buffer.isBuffer(item)) return item; - - backgroundJobs.push(item.backgroundJob); - // create pointer buffer from size and name - const name = /** @type {string} */ (item.name); - const nameBuffer = Buffer.from(name); - const buf = Buffer.allocUnsafe(8 + nameBuffer.length); - writeUInt64LE(buf, item.size, 0); - nameBuffer.copy(buf, 8, 0); - const lazy = resultToLazy.get(item); - SerializerMiddleware.setLazySerializedValue(lazy, buf); - return buf; - }); - const lengths = []; - for (const item of resolvedData) { - if (Array.isArray(item)) { - let l = 0; - for (const b of item) l += b.length; - while (l > 0x7fffffff) { - lengths.push(0x7fffffff); - l -= 0x7fffffff; - } - lengths.push(l); - } else if (item) { - lengths.push(-item.length); - } else { - throw new Error("Unexpected falsy value in resolved data " + item); - } - } - const header = Buffer.allocUnsafe(8 + lengths.length * 4); - header.writeUInt32LE(VERSION, 0); - header.writeUInt32LE(lengths.length, 4); - for (let i = 0; i < lengths.length; i++) { - header.writeInt32LE(lengths[i], 8 + i * 4); - } - const buf = [header]; - for (const item of resolvedData) { - if (Array.isArray(item)) { - for (const b of item) buf.push(b); - } else if (item) { - buf.push(item); - } - } - if (name === true) { - name = hashForName(buf, hashFunction); - } - let size = 0; - for (const b of buf) size += b.length; - backgroundJobs.push(writeFile(name, buf, size)); - return { - size, - name, - backgroundJob: - backgroundJobs.length === 1 - ? backgroundJobs[0] - : Promise.all(backgroundJobs) - }; -}; - -/** - * @param {FileMiddleware} middleware this - * @param {string | false} name filename - * @param {function(string | false): Promise} readFile read content of a file - * @returns {Promise} deserialized data - */ -const deserialize = async (middleware, name, readFile) => { - const contents = await readFile(name); - if (contents.length === 0) throw new Error("Empty file " + name); - let contentsIndex = 0; - let contentItem = contents[0]; - let contentItemLength = contentItem.length; - let contentPosition = 0; - if (contentItemLength === 0) throw new Error("Empty file " + name); - const nextContent = () => { - contentsIndex++; - contentItem = contents[contentsIndex]; - contentItemLength = contentItem.length; - contentPosition = 0; - }; - const ensureData = n => { - if (contentPosition === contentItemLength) { - nextContent(); - } - while (contentItemLength - contentPosition < n) { - const remaining = contentItem.slice(contentPosition); - let lengthFromNext = n - remaining.length; - const buffers = [remaining]; - for (let i = contentsIndex + 1; i < contents.length; i++) { - const l = contents[i].length; - if (l > lengthFromNext) { - buffers.push(contents[i].slice(0, lengthFromNext)); - contents[i] = contents[i].slice(lengthFromNext); - lengthFromNext = 0; - break; - } else { - buffers.push(contents[i]); - contentsIndex = i; - lengthFromNext -= l; - } - } - if (lengthFromNext > 0) throw new Error("Unexpected end of data"); - contentItem = Buffer.concat(buffers, n); - contentItemLength = n; - contentPosition = 0; - } - }; - const readUInt32LE = () => { - ensureData(4); - const value = contentItem.readUInt32LE(contentPosition); - contentPosition += 4; - return value; - }; - const readInt32LE = () => { - ensureData(4); - const value = contentItem.readInt32LE(contentPosition); - contentPosition += 4; - return value; - }; - const readSlice = l => { - ensureData(l); - if (contentPosition === 0 && contentItemLength === l) { - const result = contentItem; - if (contentsIndex + 1 < contents.length) { - nextContent(); - } else { - contentPosition = l; - } - return result; - } - const result = contentItem.slice(contentPosition, contentPosition + l); - contentPosition += l; - // we clone the buffer here to allow the original content to be garbage collected - return l * 2 < contentItem.buffer.byteLength ? Buffer.from(result) : result; - }; - const version = readUInt32LE(); - if (version !== VERSION) { - throw new Error("Invalid file version"); - } - const sectionCount = readUInt32LE(); - const lengths = []; - let lastLengthPositive = false; - for (let i = 0; i < sectionCount; i++) { - const value = readInt32LE(); - const valuePositive = value >= 0; - if (lastLengthPositive && valuePositive) { - lengths[lengths.length - 1] += value; - } else { - lengths.push(value); - lastLengthPositive = valuePositive; - } - } - const result = []; - for (let length of lengths) { - if (length < 0) { - const slice = readSlice(-length); - const size = Number(readUInt64LE(slice, 0)); - const nameBuffer = slice.slice(8); - const name = nameBuffer.toString(); - result.push( - SerializerMiddleware.createLazy( - memoize(() => deserialize(middleware, name, readFile)), - middleware, - { - name, - size - }, - slice - ) - ); - } else { - if (contentPosition === contentItemLength) { - nextContent(); - } else if (contentPosition !== 0) { - if (length <= contentItemLength - contentPosition) { - result.push( - Buffer.from( - contentItem.buffer, - contentItem.byteOffset + contentPosition, - length - ) - ); - contentPosition += length; - length = 0; - } else { - const l = contentItemLength - contentPosition; - result.push( - Buffer.from( - contentItem.buffer, - contentItem.byteOffset + contentPosition, - l - ) - ); - length -= l; - contentPosition = contentItemLength; - } - } else { - if (length >= contentItemLength) { - result.push(contentItem); - length -= contentItemLength; - contentPosition = contentItemLength; - } else { - result.push( - Buffer.from(contentItem.buffer, contentItem.byteOffset, length) - ); - contentPosition += length; - length = 0; - } - } - while (length > 0) { - nextContent(); - if (length >= contentItemLength) { - result.push(contentItem); - length -= contentItemLength; - contentPosition = contentItemLength; - } else { - result.push( - Buffer.from(contentItem.buffer, contentItem.byteOffset, length) - ); - contentPosition += length; - length = 0; - } - } - } - } - return result; -}; - -/** - * @typedef {BufferSerializableType[]} DeserializedType - * @typedef {true} SerializedType - * @extends {SerializerMiddleware} - */ -class FileMiddleware extends SerializerMiddleware { - /** - * @param {IntermediateFileSystem} fs filesystem - * @param {string | Hash} hashFunction hash function to use - */ - constructor(fs, hashFunction = "md4") { - super(); - this.fs = fs; - this._hashFunction = hashFunction; - } - /** - * @param {DeserializedType} data data - * @param {Object} context context object - * @returns {SerializedType|Promise} serialized data - */ - serialize(data, context) { - const { filename, extension = "" } = context; - return new Promise((resolve, reject) => { - mkdirp(this.fs, dirname(this.fs, filename), err => { - if (err) return reject(err); - - // It's important that we don't touch existing files during serialization - // because serialize may read existing files (when deserializing) - const allWrittenFiles = new Set(); - const writeFile = async (name, content, size) => { - const file = name - ? join(this.fs, filename, `../${name}${extension}`) - : filename; - await new Promise((resolve, reject) => { - let stream = this.fs.createWriteStream(file + "_"); - let compression; - if (file.endsWith(".gz")) { - compression = createGzip({ - chunkSize: COMPRESSION_CHUNK_SIZE, - level: zConstants.Z_BEST_SPEED - }); - } else if (file.endsWith(".br")) { - compression = createBrotliCompress({ - chunkSize: COMPRESSION_CHUNK_SIZE, - params: { - [zConstants.BROTLI_PARAM_MODE]: zConstants.BROTLI_MODE_TEXT, - [zConstants.BROTLI_PARAM_QUALITY]: 2, - [zConstants.BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING]: true, - [zConstants.BROTLI_PARAM_SIZE_HINT]: size - } - }); - } - if (compression) { - pipeline(compression, stream, reject); - stream = compression; - stream.on("finish", () => resolve()); - } else { - stream.on("error", err => reject(err)); - stream.on("finish", () => resolve()); - } - // split into chunks for WRITE_LIMIT_CHUNK size - const chunks = []; - for (const b of content) { - if (b.length < WRITE_LIMIT_CHUNK) { - chunks.push(b); - } else { - for (let i = 0; i < b.length; i += WRITE_LIMIT_CHUNK) { - chunks.push(b.slice(i, i + WRITE_LIMIT_CHUNK)); - } - } - } - - const len = chunks.length; - let i = 0; - const batchWrite = err => { - // will be handled in "on" error handler - if (err) return; - - if (i === len) { - stream.end(); - return; - } - - // queue up a batch of chunks up to the write limit - // end is exclusive - let end = i; - let sum = chunks[end++].length; - while (end < len) { - sum += chunks[end].length; - if (sum > WRITE_LIMIT_TOTAL) break; - end++; - } - while (i < end - 1) { - stream.write(chunks[i++]); - } - stream.write(chunks[i++], batchWrite); - }; - batchWrite(); - }); - if (name) allWrittenFiles.add(file); - }; - - resolve( - serialize(this, data, false, writeFile, this._hashFunction).then( - async ({ backgroundJob }) => { - await backgroundJob; - - // Rename the index file to disallow access during inconsistent file state - await new Promise(resolve => - this.fs.rename(filename, filename + ".old", err => { - resolve(); - }) - ); - - // update all written files - await Promise.all( - Array.from( - allWrittenFiles, - file => - new Promise((resolve, reject) => { - this.fs.rename(file + "_", file, err => { - if (err) return reject(err); - resolve(); - }); - }) - ) - ); - - // As final step automatically update the index file to have a consistent pack again - await new Promise(resolve => { - this.fs.rename(filename + "_", filename, err => { - if (err) return reject(err); - resolve(); - }); - }); - return /** @type {true} */ (true); - } - ) - ); - }); - }); - } - - /** - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType|Promise} deserialized data - */ - deserialize(data, context) { - const { filename, extension = "" } = context; - const readFile = name => - new Promise((resolve, reject) => { - const file = name - ? join(this.fs, filename, `../${name}${extension}`) - : filename; - this.fs.stat(file, (err, stats) => { - if (err) { - reject(err); - return; - } - let remaining = /** @type {number} */ (stats.size); - let currentBuffer; - let currentBufferUsed; - const buf = []; - let decompression; - if (file.endsWith(".gz")) { - decompression = createGunzip({ - chunkSize: DECOMPRESSION_CHUNK_SIZE - }); - } else if (file.endsWith(".br")) { - decompression = createBrotliDecompress({ - chunkSize: DECOMPRESSION_CHUNK_SIZE - }); - } - if (decompression) { - let newResolve, newReject; - resolve( - Promise.all([ - new Promise((rs, rj) => { - newResolve = rs; - newReject = rj; - }), - new Promise((resolve, reject) => { - decompression.on("data", chunk => buf.push(chunk)); - decompression.on("end", () => resolve()); - decompression.on("error", err => reject(err)); - }) - ]).then(() => buf) - ); - resolve = newResolve; - reject = newReject; - } - this.fs.open(file, "r", (err, fd) => { - if (err) { - reject(err); - return; - } - const read = () => { - if (currentBuffer === undefined) { - currentBuffer = Buffer.allocUnsafeSlow( - Math.min( - constants.MAX_LENGTH, - remaining, - decompression ? DECOMPRESSION_CHUNK_SIZE : Infinity - ) - ); - currentBufferUsed = 0; - } - let readBuffer = currentBuffer; - let readOffset = currentBufferUsed; - let readLength = currentBuffer.length - currentBufferUsed; - // values passed to fs.read must be valid int32 values - if (readOffset > 0x7fffffff) { - readBuffer = currentBuffer.slice(readOffset); - readOffset = 0; - } - if (readLength > 0x7fffffff) { - readLength = 0x7fffffff; - } - this.fs.read( - fd, - readBuffer, - readOffset, - readLength, - null, - (err, bytesRead) => { - if (err) { - this.fs.close(fd, () => { - reject(err); - }); - return; - } - currentBufferUsed += bytesRead; - remaining -= bytesRead; - if (currentBufferUsed === currentBuffer.length) { - if (decompression) { - decompression.write(currentBuffer); - } else { - buf.push(currentBuffer); - } - currentBuffer = undefined; - if (remaining === 0) { - if (decompression) { - decompression.end(); - } - this.fs.close(fd, err => { - if (err) { - reject(err); - return; - } - resolve(buf); - }); - return; - } - } - read(); - } - ); - }; - read(); - }); - }); - }); - return deserialize(this, false, readFile); - } -} - -module.exports = FileMiddleware; - - -/***/ }), - -/***/ 86393: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class MapObjectSerializer { - serialize(obj, { write }) { - write(obj.size); - for (const key of obj.keys()) { - write(key); - } - for (const value of obj.values()) { - write(value); - } - } - deserialize({ read }) { - let size = read(); - const map = new Map(); - const keys = []; - for (let i = 0; i < size; i++) { - keys.push(read()); - } - for (let i = 0; i < size; i++) { - map.set(keys[i], read()); - } - return map; - } -} - -module.exports = MapObjectSerializer; - - -/***/ }), - -/***/ 26224: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class NullPrototypeObjectSerializer { - serialize(obj, { write }) { - const keys = Object.keys(obj); - for (const key of keys) { - write(key); - } - write(null); - for (const key of keys) { - write(obj[key]); - } - } - deserialize({ read }) { - const obj = Object.create(null); - const keys = []; - let key = read(); - while (key !== null) { - keys.push(key); - key = read(); - } - for (const key of keys) { - obj[key] = read(); - } - return obj; - } -} - -module.exports = NullPrototypeObjectSerializer; - - -/***/ }), - -/***/ 19066: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const createHash = __webpack_require__(85205); -const ArraySerializer = __webpack_require__(86424); -const DateObjectSerializer = __webpack_require__(19507); -const ErrorObjectSerializer = __webpack_require__(30275); -const MapObjectSerializer = __webpack_require__(86393); -const NullPrototypeObjectSerializer = __webpack_require__(26224); -const PlainObjectSerializer = __webpack_require__(44182); -const RegExpObjectSerializer = __webpack_require__(71500); -const SerializerMiddleware = __webpack_require__(51947); -const SetObjectSerializer = __webpack_require__(50435); - -/** @typedef {typeof import("../util/Hash")} Hash */ -/** @typedef {import("./types").ComplexSerializableType} ComplexSerializableType */ -/** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */ - -/** @typedef {new (...params: any[]) => any} Constructor */ - -/* - -Format: - -File -> Section* -Section -> ObjectSection | ReferenceSection | EscapeSection | OtherSection - -ObjectSection -> ESCAPE ( - number:relativeOffset (number > 0) | - string:request (string|null):export -) Section:value* ESCAPE ESCAPE_END_OBJECT -ReferenceSection -> ESCAPE number:relativeOffset (number < 0) -EscapeSection -> ESCAPE ESCAPE_ESCAPE_VALUE (escaped value ESCAPE) -EscapeSection -> ESCAPE ESCAPE_UNDEFINED (escaped value ESCAPE) -OtherSection -> any (except ESCAPE) - -Why using null as escape value? -Multiple null values can merged by the BinaryMiddleware, which makes it very efficient -Technically any value can be used. - -*/ - -/** - * @typedef {Object} ObjectSerializerContext - * @property {function(any): void} write - */ - -/** - * @typedef {Object} ObjectDeserializerContext - * @property {function(): any} read - */ - -/** - * @typedef {Object} ObjectSerializer - * @property {function(any, ObjectSerializerContext): void} serialize - * @property {function(ObjectDeserializerContext): any} deserialize - */ - -const setSetSize = (set, size) => { - let i = 0; - for (const item of set) { - if (i++ >= size) { - set.delete(item); - } - } -}; - -const setMapSize = (map, size) => { - let i = 0; - for (const item of map.keys()) { - if (i++ >= size) { - map.delete(item); - } - } -}; - -/** - * @param {Buffer} buffer buffer - * @param {string | Hash} hashFunction hash function to use - * @returns {string} hash - */ -const toHash = (buffer, hashFunction) => { - const hash = createHash(hashFunction); - hash.update(buffer); - return /** @type {string} */ (hash.digest("latin1")); -}; - -const ESCAPE = null; -const ESCAPE_ESCAPE_VALUE = null; -const ESCAPE_END_OBJECT = true; -const ESCAPE_UNDEFINED = false; - -const CURRENT_VERSION = 2; - -const serializers = new Map(); -const serializerInversed = new Map(); - -const loadedRequests = new Set(); - -const NOT_SERIALIZABLE = {}; - -const jsTypes = new Map(); -jsTypes.set(Object, new PlainObjectSerializer()); -jsTypes.set(Array, new ArraySerializer()); -jsTypes.set(null, new NullPrototypeObjectSerializer()); -jsTypes.set(Map, new MapObjectSerializer()); -jsTypes.set(Set, new SetObjectSerializer()); -jsTypes.set(Date, new DateObjectSerializer()); -jsTypes.set(RegExp, new RegExpObjectSerializer()); -jsTypes.set(Error, new ErrorObjectSerializer(Error)); -jsTypes.set(EvalError, new ErrorObjectSerializer(EvalError)); -jsTypes.set(RangeError, new ErrorObjectSerializer(RangeError)); -jsTypes.set(ReferenceError, new ErrorObjectSerializer(ReferenceError)); -jsTypes.set(SyntaxError, new ErrorObjectSerializer(SyntaxError)); -jsTypes.set(TypeError, new ErrorObjectSerializer(TypeError)); - -// If in a sandboxed environment (e. g. jest), this escapes the sandbox and registers -// real Object and Array types to. These types may occur in the wild too, e. g. when -// using Structured Clone in postMessage. -if (exports.constructor !== Object) { - const Obj = /** @type {typeof Object} */ (exports.constructor); - const Fn = /** @type {typeof Function} */ (Obj.constructor); - for (const [type, config] of Array.from(jsTypes)) { - if (type) { - const Type = new Fn(`return ${type.name};`)(); - jsTypes.set(Type, config); - } - } -} - -{ - let i = 1; - for (const [type, serializer] of jsTypes) { - serializers.set(type, { - request: "", - name: i++, - serializer - }); - } -} - -for (const { request, name, serializer } of serializers.values()) { - serializerInversed.set(`${request}/${name}`, serializer); -} - -/** @type {Map boolean>} */ -const loaders = new Map(); - -/** - * @typedef {ComplexSerializableType[]} DeserializedType - * @typedef {PrimitiveSerializableType[]} SerializedType - * @extends {SerializerMiddleware} - */ -class ObjectMiddleware extends SerializerMiddleware { - /** - * @param {function(any): void} extendContext context extensions - * @param {string | Hash} hashFunction hash function to use - */ - constructor(extendContext, hashFunction = "md4") { - super(); - this.extendContext = extendContext; - this._hashFunction = hashFunction; - } - /** - * @param {RegExp} regExp RegExp for which the request is tested - * @param {function(string): boolean} loader loader to load the request, returns true when successful - * @returns {void} - */ - static registerLoader(regExp, loader) { - loaders.set(regExp, loader); - } - - /** - * @param {Constructor} Constructor the constructor - * @param {string} request the request which will be required when deserializing - * @param {string} name the name to make multiple serializer unique when sharing a request - * @param {ObjectSerializer} serializer the serializer - * @returns {void} - */ - static register(Constructor, request, name, serializer) { - const key = request + "/" + name; - - if (serializers.has(Constructor)) { - throw new Error( - `ObjectMiddleware.register: serializer for ${Constructor.name} is already registered` - ); - } - - if (serializerInversed.has(key)) { - throw new Error( - `ObjectMiddleware.register: serializer for ${key} is already registered` - ); - } - - serializers.set(Constructor, { - request, - name, - serializer - }); - - serializerInversed.set(key, serializer); - } - - /** - * @param {Constructor} Constructor the constructor - * @returns {void} - */ - static registerNotSerializable(Constructor) { - if (serializers.has(Constructor)) { - throw new Error( - `ObjectMiddleware.registerNotSerializable: serializer for ${Constructor.name} is already registered` - ); - } - - serializers.set(Constructor, NOT_SERIALIZABLE); - } - - static getSerializerFor(object) { - const proto = Object.getPrototypeOf(object); - let c; - if (proto === null) { - // Object created with Object.create(null) - c = null; - } else { - c = proto.constructor; - if (!c) { - throw new Error( - "Serialization of objects with prototype without valid constructor property not possible" - ); - } - } - const config = serializers.get(c); - - if (!config) throw new Error(`No serializer registered for ${c.name}`); - if (config === NOT_SERIALIZABLE) throw NOT_SERIALIZABLE; - - return config; - } - - static getDeserializerFor(request, name) { - const key = request + "/" + name; - const serializer = serializerInversed.get(key); - - if (serializer === undefined) { - throw new Error(`No deserializer registered for ${key}`); - } - - return serializer; - } - - static _getDeserializerForWithoutError(request, name) { - const key = request + "/" + name; - const serializer = serializerInversed.get(key); - return serializer; - } - - /** - * @param {DeserializedType} data data - * @param {Object} context context object - * @returns {SerializedType|Promise} serialized data - */ - serialize(data, context) { - /** @type {any[]} */ - let result = [CURRENT_VERSION]; - let currentPos = 0; - let referenceable = new Map(); - const addReferenceable = item => { - referenceable.set(item, currentPos++); - }; - let bufferDedupeMap = new Map(); - const dedupeBuffer = buf => { - const len = buf.length; - const entry = bufferDedupeMap.get(len); - if (entry === undefined) { - bufferDedupeMap.set(len, buf); - return buf; - } - if (Buffer.isBuffer(entry)) { - if (len < 32) { - if (buf.equals(entry)) { - return entry; - } - bufferDedupeMap.set(len, [entry, buf]); - return buf; - } else { - const hash = toHash(entry, this._hashFunction); - const newMap = new Map(); - newMap.set(hash, entry); - bufferDedupeMap.set(len, newMap); - const hashBuf = toHash(buf, this._hashFunction); - if (hash === hashBuf) { - return entry; - } - return buf; - } - } else if (Array.isArray(entry)) { - if (entry.length < 16) { - for (const item of entry) { - if (buf.equals(item)) { - return item; - } - } - entry.push(buf); - return buf; - } else { - const newMap = new Map(); - const hash = toHash(buf, this._hashFunction); - let found; - for (const item of entry) { - const itemHash = toHash(item, this._hashFunction); - newMap.set(itemHash, item); - if (found === undefined && itemHash === hash) found = item; - } - bufferDedupeMap.set(len, newMap); - if (found === undefined) { - newMap.set(hash, buf); - return buf; - } else { - return found; - } - } - } else { - const hash = toHash(buf, this._hashFunction); - const item = entry.get(hash); - if (item !== undefined) { - return item; - } - entry.set(hash, buf); - return buf; - } - }; - let currentPosTypeLookup = 0; - let objectTypeLookup = new Map(); - const cycleStack = new Set(); - const stackToString = item => { - const arr = Array.from(cycleStack); - arr.push(item); - return arr - .map(item => { - if (typeof item === "string") { - if (item.length > 100) { - return `String ${JSON.stringify(item.slice(0, 100)).slice( - 0, - -1 - )}..."`; - } - return `String ${JSON.stringify(item)}`; - } - try { - const { request, name } = ObjectMiddleware.getSerializerFor(item); - if (request) { - return `${request}${name ? `.${name}` : ""}`; - } - } catch (e) { - // ignore -> fallback - } - if (typeof item === "object" && item !== null) { - if (item.constructor) { - if (item.constructor === Object) - return `Object { ${Object.keys(item).join(", ")} }`; - if (item.constructor === Map) return `Map { ${item.size} items }`; - if (item.constructor === Array) - return `Array { ${item.length} items }`; - if (item.constructor === Set) return `Set { ${item.size} items }`; - if (item.constructor === RegExp) return item.toString(); - return `${item.constructor.name}`; - } - return `Object [null prototype] { ${Object.keys(item).join( - ", " - )} }`; - } - try { - return `${item}`; - } catch (e) { - return `(${e.message})`; - } - }) - .join(" -> "); - }; - let hasDebugInfoAttached; - let ctx = { - write(value, key) { - try { - process(value); - } catch (e) { - if (e !== NOT_SERIALIZABLE) { - if (hasDebugInfoAttached === undefined) - hasDebugInfoAttached = new WeakSet(); - if (!hasDebugInfoAttached.has(e)) { - e.message += `\nwhile serializing ${stackToString(value)}`; - hasDebugInfoAttached.add(e); - } - } - throw e; - } - }, - setCircularReference(ref) { - addReferenceable(ref); - }, - snapshot() { - return { - length: result.length, - cycleStackSize: cycleStack.size, - referenceableSize: referenceable.size, - currentPos, - objectTypeLookupSize: objectTypeLookup.size, - currentPosTypeLookup - }; - }, - rollback(snapshot) { - result.length = snapshot.length; - setSetSize(cycleStack, snapshot.cycleStackSize); - setMapSize(referenceable, snapshot.referenceableSize); - currentPos = snapshot.currentPos; - setMapSize(objectTypeLookup, snapshot.objectTypeLookupSize); - currentPosTypeLookup = snapshot.currentPosTypeLookup; - }, - ...context - }; - this.extendContext(ctx); - const process = item => { - if (Buffer.isBuffer(item)) { - // check if we can emit a reference - const ref = referenceable.get(item); - if (ref !== undefined) { - result.push(ESCAPE, ref - currentPos); - return; - } - const alreadyUsedBuffer = dedupeBuffer(item); - if (alreadyUsedBuffer !== item) { - const ref = referenceable.get(alreadyUsedBuffer); - if (ref !== undefined) { - referenceable.set(item, ref); - result.push(ESCAPE, ref - currentPos); - return; - } - item = alreadyUsedBuffer; - } - addReferenceable(item); - - result.push(item); - } else if (item === ESCAPE) { - result.push(ESCAPE, ESCAPE_ESCAPE_VALUE); - } else if ( - typeof item === "object" - // We don't have to check for null as ESCAPE is null and this has been checked before - ) { - // check if we can emit a reference - const ref = referenceable.get(item); - if (ref !== undefined) { - result.push(ESCAPE, ref - currentPos); - return; - } - - if (cycleStack.has(item)) { - throw new Error( - `This is a circular references. To serialize circular references use 'setCircularReference' somewhere in the circle during serialize and deserialize.` - ); - } - - const { request, name, serializer } = - ObjectMiddleware.getSerializerFor(item); - const key = `${request}/${name}`; - const lastIndex = objectTypeLookup.get(key); - - if (lastIndex === undefined) { - objectTypeLookup.set(key, currentPosTypeLookup++); - - result.push(ESCAPE, request, name); - } else { - result.push(ESCAPE, currentPosTypeLookup - lastIndex); - } - - cycleStack.add(item); - - try { - serializer.serialize(item, ctx); - } finally { - cycleStack.delete(item); - } - - result.push(ESCAPE, ESCAPE_END_OBJECT); - - addReferenceable(item); - } else if (typeof item === "string") { - if (item.length > 1) { - // short strings are shorter when not emitting a reference (this saves 1 byte per empty string) - // check if we can emit a reference - const ref = referenceable.get(item); - if (ref !== undefined) { - result.push(ESCAPE, ref - currentPos); - return; - } - addReferenceable(item); - } - - if (item.length > 102400 && context.logger) { - context.logger.warn( - `Serializing big strings (${Math.round( - item.length / 1024 - )}kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)` - ); - } - - result.push(item); - } else if (typeof item === "function") { - if (!SerializerMiddleware.isLazy(item)) - throw new Error("Unexpected function " + item); - /** @type {SerializedType} */ - const serializedData = - SerializerMiddleware.getLazySerializedValue(item); - if (serializedData !== undefined) { - if (typeof serializedData === "function") { - result.push(serializedData); - } else { - throw new Error("Not implemented"); - } - } else if (SerializerMiddleware.isLazy(item, this)) { - throw new Error("Not implemented"); - } else { - const data = SerializerMiddleware.serializeLazy(item, data => - this.serialize([data], context) - ); - SerializerMiddleware.setLazySerializedValue(item, data); - result.push(data); - } - } else if (item === undefined) { - result.push(ESCAPE, ESCAPE_UNDEFINED); - } else { - result.push(item); - } - }; - - try { - for (const item of data) { - process(item); - } - return result; - } catch (e) { - if (e === NOT_SERIALIZABLE) return null; - - throw e; - } finally { - // Get rid of these references to avoid leaking memory - // This happens because the optimized code v8 generates - // is optimized for our "ctx.write" method so it will reference - // it from e. g. Dependency.prototype.serialize -(IC)-> ctx.write - data = - result = - referenceable = - bufferDedupeMap = - objectTypeLookup = - ctx = - undefined; - } - } - - /** - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType|Promise} deserialized data - */ - deserialize(data, context) { - let currentDataPos = 0; - const read = () => { - if (currentDataPos >= data.length) - throw new Error("Unexpected end of stream"); - - return data[currentDataPos++]; - }; - - if (read() !== CURRENT_VERSION) - throw new Error("Version mismatch, serializer changed"); - - let currentPos = 0; - let referenceable = []; - const addReferenceable = item => { - referenceable.push(item); - currentPos++; - }; - let currentPosTypeLookup = 0; - let objectTypeLookup = []; - let result = []; - let ctx = { - read() { - return decodeValue(); - }, - setCircularReference(ref) { - addReferenceable(ref); - }, - ...context - }; - this.extendContext(ctx); - const decodeValue = () => { - const item = read(); - - if (item === ESCAPE) { - const nextItem = read(); - - if (nextItem === ESCAPE_ESCAPE_VALUE) { - return ESCAPE; - } else if (nextItem === ESCAPE_UNDEFINED) { - return undefined; - } else if (nextItem === ESCAPE_END_OBJECT) { - throw new Error( - `Unexpected end of object at position ${currentDataPos - 1}` - ); - } else { - const request = nextItem; - let serializer; - - if (typeof request === "number") { - if (request < 0) { - // relative reference - return referenceable[currentPos + request]; - } - serializer = objectTypeLookup[currentPosTypeLookup - request]; - } else { - if (typeof request !== "string") { - throw new Error( - `Unexpected type (${typeof request}) of request ` + - `at position ${currentDataPos - 1}` - ); - } - const name = read(); - - serializer = ObjectMiddleware._getDeserializerForWithoutError( - request, - name - ); - - if (serializer === undefined) { - if (request && !loadedRequests.has(request)) { - let loaded = false; - for (const [regExp, loader] of loaders) { - if (regExp.test(request)) { - if (loader(request)) { - loaded = true; - break; - } - } - } - if (!loaded) { - require(request); - } - - loadedRequests.add(request); - } - - serializer = ObjectMiddleware.getDeserializerFor(request, name); - } - - objectTypeLookup.push(serializer); - currentPosTypeLookup++; - } - try { - const item = serializer.deserialize(ctx); - const end1 = read(); - - if (end1 !== ESCAPE) { - throw new Error("Expected end of object"); - } - - const end2 = read(); - - if (end2 !== ESCAPE_END_OBJECT) { - throw new Error("Expected end of object"); - } - - addReferenceable(item); - - return item; - } catch (err) { - // As this is only for error handling, we omit creating a Map for - // faster access to this information, as this would affect performance - // in the good case - let serializerEntry; - for (const entry of serializers) { - if (entry[1].serializer === serializer) { - serializerEntry = entry; - break; - } - } - const name = !serializerEntry - ? "unknown" - : !serializerEntry[1].request - ? serializerEntry[0].name - : serializerEntry[1].name - ? `${serializerEntry[1].request} ${serializerEntry[1].name}` - : serializerEntry[1].request; - err.message += `\n(during deserialization of ${name})`; - throw err; - } - } - } else if (typeof item === "string") { - if (item.length > 1) { - addReferenceable(item); - } - - return item; - } else if (Buffer.isBuffer(item)) { - addReferenceable(item); - - return item; - } else if (typeof item === "function") { - return SerializerMiddleware.deserializeLazy( - item, - data => this.deserialize(data, context)[0] - ); - } else { - return item; - } - }; - - try { - while (currentDataPos < data.length) { - result.push(decodeValue()); - } - return result; - } finally { - // Get rid of these references to avoid leaking memory - // This happens because the optimized code v8 generates - // is optimized for our "ctx.read" method so it will reference - // it from e. g. Dependency.prototype.deserialize -(IC)-> ctx.read - result = referenceable = data = objectTypeLookup = ctx = undefined; - } - } -} - -module.exports = ObjectMiddleware; -module.exports.NOT_SERIALIZABLE = NOT_SERIALIZABLE; - - -/***/ }), - -/***/ 44182: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const cache = new WeakMap(); - -class ObjectStructure { - constructor() { - this.keys = undefined; - this.children = undefined; - } - - getKeys(keys) { - if (this.keys === undefined) this.keys = keys; - return this.keys; - } - - key(key) { - if (this.children === undefined) this.children = new Map(); - const child = this.children.get(key); - if (child !== undefined) return child; - const newChild = new ObjectStructure(); - this.children.set(key, newChild); - return newChild; - } -} - -const getCachedKeys = (keys, cacheAssoc) => { - let root = cache.get(cacheAssoc); - if (root === undefined) { - root = new ObjectStructure(); - cache.set(cacheAssoc, root); - } - let current = root; - for (const key of keys) { - current = current.key(key); - } - return current.getKeys(keys); -}; - -class PlainObjectSerializer { - serialize(obj, { write }) { - const keys = Object.keys(obj); - if (keys.length > 128) { - // Objects with so many keys are unlikely to share structure - // with other objects - write(keys); - for (const key of keys) { - write(obj[key]); - } - } else if (keys.length > 1) { - write(getCachedKeys(keys, write)); - for (const key of keys) { - write(obj[key]); - } - } else if (keys.length === 1) { - const key = keys[0]; - write(key); - write(obj[key]); - } else { - write(null); - } - } - deserialize({ read }) { - const keys = read(); - const obj = {}; - if (Array.isArray(keys)) { - for (const key of keys) { - obj[key] = read(); - } - } else if (keys !== null) { - obj[keys] = read(); - } - return obj; - } -} - -module.exports = PlainObjectSerializer; - - -/***/ }), - -/***/ 71500: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class RegExpObjectSerializer { - serialize(obj, { write }) { - write(obj.source); - write(obj.flags); - } - deserialize({ read }) { - return new RegExp(read(), read()); - } -} - -module.exports = RegExpObjectSerializer; - - -/***/ }), - -/***/ 25347: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class Serializer { - constructor(middlewares, context) { - this.serializeMiddlewares = middlewares.slice(); - this.deserializeMiddlewares = middlewares.slice().reverse(); - this.context = context; - } - - serialize(obj, context) { - const ctx = { ...context, ...this.context }; - let current = obj; - for (const middleware of this.serializeMiddlewares) { - if (current && typeof current.then === "function") { - current = current.then(data => data && middleware.serialize(data, ctx)); - } else if (current) { - try { - current = middleware.serialize(current, ctx); - } catch (err) { - current = Promise.reject(err); - } - } else break; - } - return current; - } - - deserialize(value, context) { - const ctx = { ...context, ...this.context }; - /** @type {any} */ - let current = value; - for (const middleware of this.deserializeMiddlewares) { - if (current && typeof current.then === "function") { - current = current.then(data => middleware.deserialize(data, ctx)); - } else { - current = middleware.deserialize(current, ctx); - } - } - return current; - } -} - -module.exports = Serializer; - - -/***/ }), - -/***/ 51947: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const memoize = __webpack_require__(61374); - -const LAZY_TARGET = Symbol("lazy serialization target"); -const LAZY_SERIALIZED_VALUE = Symbol("lazy serialization data"); - -/** - * @template DeserializedType - * @template SerializedType - */ -class SerializerMiddleware { - /* istanbul ignore next */ - /** - * @abstract - * @param {DeserializedType} data data - * @param {Object} context context object - * @returns {SerializedType|Promise} serialized data - */ - serialize(data, context) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * @abstract - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType|Promise} deserialized data - */ - deserialize(data, context) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /** - * @param {any | function(): Promise | any} value contained value or function to value - * @param {SerializerMiddleware} target target middleware - * @param {object=} options lazy options - * @param {any=} serializedValue serialized value - * @returns {function(): Promise | any} lazy function - */ - static createLazy(value, target, options = {}, serializedValue) { - if (SerializerMiddleware.isLazy(value, target)) return value; - const fn = typeof value === "function" ? value : () => value; - fn[LAZY_TARGET] = target; - /** @type {any} */ (fn).options = options; - fn[LAZY_SERIALIZED_VALUE] = serializedValue; - return fn; - } - - /** - * @param {function(): Promise | any} fn lazy function - * @param {SerializerMiddleware=} target target middleware - * @returns {boolean} true, when fn is a lazy function (optionally of that target) - */ - static isLazy(fn, target) { - if (typeof fn !== "function") return false; - const t = fn[LAZY_TARGET]; - return target ? t === target : !!t; - } - - /** - * @param {function(): Promise | any} fn lazy function - * @returns {object} options - */ - static getLazyOptions(fn) { - if (typeof fn !== "function") return undefined; - return /** @type {any} */ (fn).options; - } - - /** - * @param {function(): Promise | any} fn lazy function - * @returns {any} serialized value - */ - static getLazySerializedValue(fn) { - if (typeof fn !== "function") return undefined; - return fn[LAZY_SERIALIZED_VALUE]; - } - - /** - * @param {function(): Promise | any} fn lazy function - * @param {any} value serialized value - * @returns {void} - */ - static setLazySerializedValue(fn, value) { - fn[LAZY_SERIALIZED_VALUE] = value; - } - - /** - * @param {function(): Promise | any} lazy lazy function - * @param {function(any): Promise | any} serialize serialize function - * @returns {function(): Promise | any} new lazy - */ - static serializeLazy(lazy, serialize) { - const fn = memoize(() => { - const r = lazy(); - if (r && typeof r.then === "function") { - return r.then(data => data && serialize(data)); - } - return serialize(r); - }); - fn[LAZY_TARGET] = lazy[LAZY_TARGET]; - /** @type {any} */ (fn).options = /** @type {any} */ (lazy).options; - lazy[LAZY_SERIALIZED_VALUE] = fn; - return fn; - } - - /** - * @param {function(): Promise | any} lazy lazy function - * @param {function(any): Promise | any} deserialize deserialize function - * @returns {function(): Promise | any} new lazy - */ - static deserializeLazy(lazy, deserialize) { - const fn = memoize(() => { - const r = lazy(); - if (r && typeof r.then === "function") { - return r.then(data => deserialize(data)); - } - return deserialize(r); - }); - fn[LAZY_TARGET] = lazy[LAZY_TARGET]; - /** @type {any} */ (fn).options = /** @type {any} */ (lazy).options; - fn[LAZY_SERIALIZED_VALUE] = lazy; - return fn; - } - - /** - * @param {function(): Promise | any} lazy lazy function - * @returns {function(): Promise | any} new lazy - */ - static unMemoizeLazy(lazy) { - if (!SerializerMiddleware.isLazy(lazy)) return lazy; - const fn = () => { - throw new Error( - "A lazy value that has been unmemorized can't be called again" - ); - }; - fn[LAZY_SERIALIZED_VALUE] = SerializerMiddleware.unMemoizeLazy( - lazy[LAZY_SERIALIZED_VALUE] - ); - fn[LAZY_TARGET] = lazy[LAZY_TARGET]; - fn.options = /** @type {any} */ (lazy).options; - return fn; - } -} - -module.exports = SerializerMiddleware; - - -/***/ }), - -/***/ 50435: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -class SetObjectSerializer { - serialize(obj, { write }) { - write(obj.size); - for (const value of obj) { - write(value); - } - } - deserialize({ read }) { - let size = read(); - const set = new Set(); - for (let i = 0; i < size; i++) { - set.add(read()); - } - return set; - } -} - -module.exports = SetObjectSerializer; - - -/***/ }), - -/***/ 11625: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const SerializerMiddleware = __webpack_require__(51947); - -/** - * @typedef {any} DeserializedType - * @typedef {any[]} SerializedType - * @extends {SerializerMiddleware} - */ -class SingleItemMiddleware extends SerializerMiddleware { - /** - * @param {DeserializedType} data data - * @param {Object} context context object - * @returns {SerializedType|Promise} serialized data - */ - serialize(data, context) { - return [data]; - } - - /** - * @param {SerializedType} data data - * @param {Object} context context object - * @returns {DeserializedType|Promise} deserialized data - */ - deserialize(data, context) { - return data[0]; - } -} - -module.exports = SingleItemMiddleware; - - -/***/ }), - -/***/ 64519: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); -const makeSerializable = __webpack_require__(65764); - -class ConsumeSharedFallbackDependency extends ModuleDependency { - constructor(request) { - super(request); - } - - get type() { - return "consume shared fallback"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ConsumeSharedFallbackDependency, - "webpack/lib/sharing/ConsumeSharedFallbackDependency" -); - -module.exports = ConsumeSharedFallbackDependency; - - -/***/ }), - -/***/ 89683: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const AsyncDependenciesBlock = __webpack_require__(42290); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const { rangeToString, stringifyHoley } = __webpack_require__(27773); -const ConsumeSharedFallbackDependency = __webpack_require__(64519); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ -/** @typedef {import("../util/semver").SemVerRange} SemVerRange */ - -/** - * @typedef {Object} ConsumeOptions - * @property {string=} import fallback request - * @property {string=} importResolved resolved fallback request - * @property {string} shareKey global share key - * @property {string} shareScope share scope - * @property {SemVerRange | false | undefined} requiredVersion version requirement - * @property {string} packageName package name to determine required version automatically - * @property {boolean} strictVersion don't use shared version even if version isn't valid - * @property {boolean} singleton use single global version - * @property {boolean} eager include the fallback module in a sync way - */ - -const TYPES = new Set(["consume-shared"]); - -class ConsumeSharedModule extends Module { - /** - * @param {string} context context - * @param {ConsumeOptions} options consume options - */ - constructor(context, options) { - super("consume-shared-module", context); - this.options = options; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - const { - shareKey, - shareScope, - importResolved, - requiredVersion, - strictVersion, - singleton, - eager - } = this.options; - return `consume-shared-module|${shareScope}|${shareKey}|${ - requiredVersion && rangeToString(requiredVersion) - }|${strictVersion}|${importResolved}|${singleton}|${eager}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - const { - shareKey, - shareScope, - importResolved, - requiredVersion, - strictVersion, - singleton, - eager - } = this.options; - return `consume shared module (${shareScope}) ${shareKey}@${ - requiredVersion ? rangeToString(requiredVersion) : "*" - }${strictVersion ? " (strict)" : ""}${singleton ? " (singleton)" : ""}${ - importResolved - ? ` (fallback: ${requestShortener.shorten(importResolved)})` - : "" - }${eager ? " (eager)" : ""}`; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - const { shareKey, shareScope, import: request } = this.options; - return `${ - this.layer ? `(${this.layer})/` : "" - }webpack/sharing/consume/${shareScope}/${shareKey}${ - request ? `/${request}` : "" - }`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback(null, !this.buildInfo); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = {}; - if (this.options.import) { - const dep = new ConsumeSharedFallbackDependency(this.options.import); - if (this.options.eager) { - this.addDependency(dep); - } else { - const block = new AsyncDependenciesBlock({}); - block.addDependency(dep); - this.addBlock(block); - } - } - callback(); - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 42; - } - - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - hash.update(JSON.stringify(this.options)); - super.updateHash(hash, context); - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ chunkGraph, moduleGraph, runtimeTemplate }) { - const runtimeRequirements = new Set([RuntimeGlobals.shareScopeMap]); - const { - shareScope, - shareKey, - strictVersion, - requiredVersion, - import: request, - singleton, - eager - } = this.options; - let fallbackCode; - if (request) { - if (eager) { - const dep = this.dependencies[0]; - fallbackCode = runtimeTemplate.syncModuleFactory({ - dependency: dep, - chunkGraph, - runtimeRequirements, - request: this.options.import - }); - } else { - const block = this.blocks[0]; - fallbackCode = runtimeTemplate.asyncModuleFactory({ - block, - chunkGraph, - runtimeRequirements, - request: this.options.import - }); - } - } - let fn = "load"; - const args = [JSON.stringify(shareScope), JSON.stringify(shareKey)]; - if (requiredVersion) { - if (strictVersion) { - fn += "Strict"; - } - if (singleton) { - fn += "Singleton"; - } - args.push(stringifyHoley(requiredVersion)); - fn += "VersionCheck"; - } else { - if (singleton) { - fn += "Singleton"; - } - } - if (fallbackCode) { - fn += "Fallback"; - args.push(fallbackCode); - } - const code = runtimeTemplate.returningFunction(`${fn}(${args.join(", ")})`); - const sources = new Map(); - sources.set("consume-shared", new RawSource(code)); - return { - runtimeRequirements, - sources - }; - } - - serialize(context) { - const { write } = context; - write(this.options); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.options = read(); - super.deserialize(context); - } -} - -makeSerializable( - ConsumeSharedModule, - "webpack/lib/sharing/ConsumeSharedModule" -); - -module.exports = ConsumeSharedModule; - - -/***/ }), - -/***/ 40724: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleNotFoundError = __webpack_require__(16554); -const RuntimeGlobals = __webpack_require__(39201); -const WebpackError = __webpack_require__(27154); -const { parseOptions } = __webpack_require__(58491); -const LazySet = __webpack_require__(96522); -const createSchemaValidation = __webpack_require__(89699); -const { parseRange } = __webpack_require__(27773); -const ConsumeSharedFallbackDependency = __webpack_require__(64519); -const ConsumeSharedModule = __webpack_require__(89683); -const ConsumeSharedRuntimeModule = __webpack_require__(15147); -const ProvideForSharedDependency = __webpack_require__(98425); -const { resolveMatchedConfigs } = __webpack_require__(303); -const { - isRequiredVersion, - getDescriptionFile, - getRequiredVersionFromDescriptionFile -} = __webpack_require__(539); - -/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumeSharedPluginOptions} ConsumeSharedPluginOptions */ -/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumesConfig} ConsumesConfig */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../ResolverFactory").ResolveOptionsWithDependencyType} ResolveOptionsWithDependencyType */ -/** @typedef {import("./ConsumeSharedModule").ConsumeOptions} ConsumeOptions */ - -const validate = createSchemaValidation( - __webpack_require__(16183), - () => __webpack_require__(33231), - { - name: "Consume Shared Plugin", - baseDataPath: "options" - } -); - -/** @type {ResolveOptionsWithDependencyType} */ -const RESOLVE_OPTIONS = { dependencyType: "esm" }; -const PLUGIN_NAME = "ConsumeSharedPlugin"; - -class ConsumeSharedPlugin { - /** - * @param {ConsumeSharedPluginOptions} options options - */ - constructor(options) { - if (typeof options !== "string") { - validate(options); - } - - /** @type {[string, ConsumeOptions][]} */ - this._consumes = parseOptions( - options.consumes, - (item, key) => { - if (Array.isArray(item)) throw new Error("Unexpected array in options"); - /** @type {ConsumeOptions} */ - let result = - item === key || !isRequiredVersion(item) - ? // item is a request/key - { - import: key, - shareScope: options.shareScope || "default", - shareKey: key, - requiredVersion: undefined, - packageName: undefined, - strictVersion: false, - singleton: false, - eager: false - } - : // key is a request/key - // item is a version - { - import: key, - shareScope: options.shareScope || "default", - shareKey: key, - requiredVersion: parseRange(item), - strictVersion: true, - packageName: undefined, - singleton: false, - eager: false - }; - return result; - }, - (item, key) => ({ - import: item.import === false ? undefined : item.import || key, - shareScope: item.shareScope || options.shareScope || "default", - shareKey: item.shareKey || key, - requiredVersion: - typeof item.requiredVersion === "string" - ? parseRange(item.requiredVersion) - : item.requiredVersion, - strictVersion: - typeof item.strictVersion === "boolean" - ? item.strictVersion - : item.import !== false && !item.singleton, - packageName: item.packageName, - singleton: !!item.singleton, - eager: !!item.eager - }) - ); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - PLUGIN_NAME, - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - ConsumeSharedFallbackDependency, - normalModuleFactory - ); - - let unresolvedConsumes, resolvedConsumes, prefixedConsumes; - const promise = resolveMatchedConfigs(compilation, this._consumes).then( - ({ resolved, unresolved, prefixed }) => { - resolvedConsumes = resolved; - unresolvedConsumes = unresolved; - prefixedConsumes = prefixed; - } - ); - - const resolver = compilation.resolverFactory.get( - "normal", - RESOLVE_OPTIONS - ); - - /** - * @param {string} context issuer directory - * @param {string} request request - * @param {ConsumeOptions} config options - * @returns {Promise} create module - */ - const createConsumeSharedModule = (context, request, config) => { - const requiredVersionWarning = details => { - const error = new WebpackError( - `No required version specified and unable to automatically determine one. ${details}` - ); - error.file = `shared module ${request}`; - compilation.warnings.push(error); - }; - const directFallback = - config.import && - /^(\.\.?(\/|$)|\/|[A-Za-z]:|\\\\)/.test(config.import); - return Promise.all([ - new Promise(resolve => { - if (!config.import) return resolve(); - const resolveContext = { - /** @type {LazySet} */ - fileDependencies: new LazySet(), - /** @type {LazySet} */ - contextDependencies: new LazySet(), - /** @type {LazySet} */ - missingDependencies: new LazySet() - }; - resolver.resolve( - {}, - directFallback ? compiler.context : context, - config.import, - resolveContext, - (err, result) => { - compilation.contextDependencies.addAll( - resolveContext.contextDependencies - ); - compilation.fileDependencies.addAll( - resolveContext.fileDependencies - ); - compilation.missingDependencies.addAll( - resolveContext.missingDependencies - ); - if (err) { - compilation.errors.push( - new ModuleNotFoundError(null, err, { - name: `resolving fallback for shared module ${request}` - }) - ); - return resolve(); - } - resolve(result); - } - ); - }), - new Promise(resolve => { - if (config.requiredVersion !== undefined) - return resolve(config.requiredVersion); - let packageName = config.packageName; - if (packageName === undefined) { - if (/^(\/|[A-Za-z]:|\\\\)/.test(request)) { - // For relative or absolute requests we don't automatically use a packageName. - // If wished one can specify one with the packageName option. - return resolve(); - } - const match = /^((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(request); - if (!match) { - requiredVersionWarning( - "Unable to extract the package name from request." - ); - return resolve(); - } - packageName = match[0]; - } - - getDescriptionFile( - compilation.inputFileSystem, - context, - ["package.json"], - (err, result) => { - if (err) { - requiredVersionWarning( - `Unable to read description file: ${err}` - ); - return resolve(); - } - const { data, path: descriptionPath } = result; - if (!data) { - requiredVersionWarning( - `Unable to find description file in ${context}.` - ); - return resolve(); - } - const requiredVersion = getRequiredVersionFromDescriptionFile( - data, - packageName - ); - if (typeof requiredVersion !== "string") { - requiredVersionWarning( - `Unable to find required version for "${packageName}" in description file (${descriptionPath}). It need to be in dependencies, devDependencies or peerDependencies.` - ); - return resolve(); - } - resolve(parseRange(requiredVersion)); - } - ); - }) - ]).then(([importResolved, requiredVersion]) => { - return new ConsumeSharedModule( - directFallback ? compiler.context : context, - { - ...config, - importResolved, - import: importResolved ? config.import : undefined, - requiredVersion - } - ); - }); - }; - - normalModuleFactory.hooks.factorize.tapPromise( - PLUGIN_NAME, - ({ context, request, dependencies }) => - // wait for resolving to be complete - promise.then(() => { - if ( - dependencies[0] instanceof ConsumeSharedFallbackDependency || - dependencies[0] instanceof ProvideForSharedDependency - ) { - return; - } - const match = unresolvedConsumes.get(request); - if (match !== undefined) { - return createConsumeSharedModule(context, request, match); - } - for (const [prefix, options] of prefixedConsumes) { - if (request.startsWith(prefix)) { - const remainder = request.slice(prefix.length); - return createConsumeSharedModule(context, request, { - ...options, - import: options.import - ? options.import + remainder - : undefined, - shareKey: options.shareKey + remainder - }); - } - } - }) - ); - normalModuleFactory.hooks.createModule.tapPromise( - PLUGIN_NAME, - ({ resource }, { context, dependencies }) => { - if ( - dependencies[0] instanceof ConsumeSharedFallbackDependency || - dependencies[0] instanceof ProvideForSharedDependency - ) { - return Promise.resolve(); - } - const options = resolvedConsumes.get(resource); - if (options !== undefined) { - return createConsumeSharedModule(context, resource, options); - } - return Promise.resolve(); - } - ); - compilation.hooks.additionalTreeRuntimeRequirements.tap( - PLUGIN_NAME, - (chunk, set) => { - set.add(RuntimeGlobals.module); - set.add(RuntimeGlobals.moduleCache); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.shareScopeMap); - set.add(RuntimeGlobals.initializeSharing); - set.add(RuntimeGlobals.hasOwnProperty); - compilation.addRuntimeModule( - chunk, - new ConsumeSharedRuntimeModule(set) - ); - } - ); - } - ); - } -} - -module.exports = ConsumeSharedPlugin; - - -/***/ }), - -/***/ 15147: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - parseVersionRuntimeCode, - versionLtRuntimeCode, - rangeToStringRuntimeCode, - satisfyRuntimeCode -} = __webpack_require__(27773); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("./ConsumeSharedModule")} ConsumeSharedModule */ - -class ConsumeSharedRuntimeModule extends RuntimeModule { - constructor(runtimeRequirements) { - super("consumes", RuntimeModule.STAGE_ATTACH); - this._runtimeRequirements = runtimeRequirements; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunkGraph } = this; - const { runtimeTemplate, codeGenerationResults } = compilation; - const chunkToModuleMapping = {}; - /** @type {Map} */ - const moduleIdToSourceMapping = new Map(); - const initialConsumes = []; - /** - * - * @param {Iterable} modules modules - * @param {Chunk} chunk the chunk - * @param {(string | number)[]} list list of ids - */ - const addModules = (modules, chunk, list) => { - for (const m of modules) { - const module = /** @type {ConsumeSharedModule} */ (m); - const id = chunkGraph.getModuleId(module); - list.push(id); - moduleIdToSourceMapping.set( - id, - codeGenerationResults.getSource( - module, - chunk.runtime, - "consume-shared" - ) - ); - } - }; - for (const chunk of this.chunk.getAllAsyncChunks()) { - const modules = chunkGraph.getChunkModulesIterableBySourceType( - chunk, - "consume-shared" - ); - if (!modules) continue; - addModules(modules, chunk, (chunkToModuleMapping[chunk.id] = [])); - } - for (const chunk of this.chunk.getAllInitialChunks()) { - const modules = chunkGraph.getChunkModulesIterableBySourceType( - chunk, - "consume-shared" - ); - if (!modules) continue; - addModules(modules, chunk, initialConsumes); - } - if (moduleIdToSourceMapping.size === 0) return null; - return Template.asString([ - parseVersionRuntimeCode(runtimeTemplate), - versionLtRuntimeCode(runtimeTemplate), - rangeToStringRuntimeCode(runtimeTemplate), - satisfyRuntimeCode(runtimeTemplate), - `var ensureExistence = ${runtimeTemplate.basicFunction("scopeName, key", [ - `var scope = ${RuntimeGlobals.shareScopeMap}[scopeName];`, - `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) throw new Error("Shared module " + key + " doesn't exist in shared scope " + scopeName);`, - "return scope;" - ])};`, - `var findVersion = ${runtimeTemplate.basicFunction("scope, key", [ - "var versions = scope[key];", - `var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction( - "a, b", - ["return !a || versionLt(a, b) ? b : a;"] - )}, 0);`, - "return key && versions[key]" - ])};`, - `var findSingletonVersionKey = ${runtimeTemplate.basicFunction( - "scope, key", - [ - "var versions = scope[key];", - `return Object.keys(versions).reduce(${runtimeTemplate.basicFunction( - "a, b", - ["return !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;"] - )}, 0);` - ] - )};`, - `var getInvalidSingletonVersionMessage = ${runtimeTemplate.basicFunction( - "scope, key, version, requiredVersion", - [ - `return "Unsatisfied version " + version + " from " + (version && scope[key][version].from) + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"` - ] - )};`, - `var getSingleton = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - "var version = findSingletonVersionKey(scope, key);", - "return get(scope[key][version]);" - ] - )};`, - `var getSingletonVersion = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - "var version = findSingletonVersionKey(scope, key);", - "if (!satisfy(requiredVersion, version)) " + - 'typeof console !== "undefined" && console.warn && console.warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));', - "return get(scope[key][version]);" - ] - )};`, - `var getStrictSingletonVersion = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - "var version = findSingletonVersionKey(scope, key);", - "if (!satisfy(requiredVersion, version)) " + - "throw new Error(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));", - "return get(scope[key][version]);" - ] - )};`, - `var findValidVersion = ${runtimeTemplate.basicFunction( - "scope, key, requiredVersion", - [ - "var versions = scope[key];", - `var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction( - "a, b", - [ - "if (!satisfy(requiredVersion, b)) return a;", - "return !a || versionLt(a, b) ? b : a;" - ] - )}, 0);`, - "return key && versions[key]" - ] - )};`, - `var getInvalidVersionMessage = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - "var versions = scope[key];", - 'return "No satisfying version (" + rangeToString(requiredVersion) + ") of shared module " + key + " found in shared scope " + scopeName + ".\\n" +', - `\t"Available versions: " + Object.keys(versions).map(${runtimeTemplate.basicFunction( - "key", - ['return key + " from " + versions[key].from;'] - )}).join(", ");` - ] - )};`, - `var getValidVersion = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - "var entry = findValidVersion(scope, key, requiredVersion);", - "if(entry) return get(entry);", - "throw new Error(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));" - ] - )};`, - `var warnInvalidVersion = ${runtimeTemplate.basicFunction( - "scope, scopeName, key, requiredVersion", - [ - 'typeof console !== "undefined" && console.warn && console.warn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));' - ] - )};`, - `var get = ${runtimeTemplate.basicFunction("entry", [ - "entry.loaded = 1;", - "return entry.get()" - ])};`, - `var init = ${runtimeTemplate.returningFunction( - Template.asString([ - "function(scopeName, a, b, c) {", - Template.indent([ - `var promise = ${RuntimeGlobals.initializeSharing}(scopeName);`, - `if (promise && promise.then) return promise.then(fn.bind(fn, scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], a, b, c));`, - `return fn(scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], a, b, c);` - ]), - "}" - ]), - "fn" - )};`, - "", - `var load = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key", - [ - "ensureExistence(scopeName, key);", - "return get(findVersion(scope, key));" - ] - )});`, - `var loadFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, fallback", - [ - `return scope && ${RuntimeGlobals.hasOwnProperty}(scope, key) ? get(findVersion(scope, key)) : fallback();` - ] - )});`, - `var loadVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version", - [ - "ensureExistence(scopeName, key);", - "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" - ] - )});`, - `var loadSingleton = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key", - [ - "ensureExistence(scopeName, key);", - "return getSingleton(scope, scopeName, key);" - ] - )});`, - `var loadSingletonVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version", - [ - "ensureExistence(scopeName, key);", - "return getSingletonVersion(scope, scopeName, key, version);" - ] - )});`, - `var loadStrictVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version", - [ - "ensureExistence(scopeName, key);", - "return getValidVersion(scope, scopeName, key, version);" - ] - )});`, - `var loadStrictSingletonVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version", - [ - "ensureExistence(scopeName, key);", - "return getStrictSingletonVersion(scope, scopeName, key, version);" - ] - )});`, - `var loadVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version, fallback", - [ - `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, - "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" - ] - )});`, - `var loadSingletonFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, fallback", - [ - `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, - "return getSingleton(scope, scopeName, key);" - ] - )});`, - `var loadSingletonVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version, fallback", - [ - `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, - "return getSingletonVersion(scope, scopeName, key, version);" - ] - )});`, - `var loadStrictVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version, fallback", - [ - `var entry = scope && ${RuntimeGlobals.hasOwnProperty}(scope, key) && findValidVersion(scope, key, version);`, - `return entry ? get(entry) : fallback();` - ] - )});`, - `var loadStrictSingletonVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( - "scopeName, scope, key, version, fallback", - [ - `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, - "return getStrictSingletonVersion(scope, scopeName, key, version);" - ] - )});`, - "var installedModules = {};", - "var moduleToHandlerMapping = {", - Template.indent( - Array.from( - moduleIdToSourceMapping, - ([key, source]) => `${JSON.stringify(key)}: ${source.source()}` - ).join(",\n") - ), - "};", - - initialConsumes.length > 0 - ? Template.asString([ - `var initialConsumes = ${JSON.stringify(initialConsumes)};`, - `initialConsumes.forEach(${runtimeTemplate.basicFunction("id", [ - `${ - RuntimeGlobals.moduleFactories - }[id] = ${runtimeTemplate.basicFunction("module", [ - "// Handle case when module is used sync", - "installedModules[id] = 0;", - `delete ${RuntimeGlobals.moduleCache}[id];`, - "var factory = moduleToHandlerMapping[id]();", - 'if(typeof factory !== "function") throw new Error("Shared module is not available for eager consumption: " + id);', - `module.exports = factory();` - ])}` - ])});` - ]) - : "// no consumes in initial chunks", - this._runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers) - ? Template.asString([ - `var chunkMapping = ${JSON.stringify( - chunkToModuleMapping, - null, - "\t" - )};`, - `${ - RuntimeGlobals.ensureChunkHandlers - }.consumes = ${runtimeTemplate.basicFunction("chunkId, promises", [ - `if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`, - Template.indent([ - `chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction( - "id", - [ - `if(${RuntimeGlobals.hasOwnProperty}(installedModules, id)) return promises.push(installedModules[id]);`, - `var onFactory = ${runtimeTemplate.basicFunction( - "factory", - [ - "installedModules[id] = 0;", - `${ - RuntimeGlobals.moduleFactories - }[id] = ${runtimeTemplate.basicFunction("module", [ - `delete ${RuntimeGlobals.moduleCache}[id];`, - "module.exports = factory();" - ])}` - ] - )};`, - `var onError = ${runtimeTemplate.basicFunction("error", [ - "delete installedModules[id];", - `${ - RuntimeGlobals.moduleFactories - }[id] = ${runtimeTemplate.basicFunction("module", [ - `delete ${RuntimeGlobals.moduleCache}[id];`, - "throw error;" - ])}` - ])};`, - "try {", - Template.indent([ - "var promise = moduleToHandlerMapping[id]();", - "if(promise.then) {", - Template.indent( - "promises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));" - ), - "} else onFactory(promise);" - ]), - "} catch(e) { onError(e); }" - ] - )});` - ]), - "}" - ])}` - ]) - : "// no chunk loading of consumes" - ]); - } -} - -module.exports = ConsumeSharedRuntimeModule; - - -/***/ }), - -/***/ 98425: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleDependency = __webpack_require__(99809); -const makeSerializable = __webpack_require__(65764); - -class ProvideForSharedDependency extends ModuleDependency { - /** - * - * @param {string} request request string - */ - constructor(request) { - super(request); - } - - get type() { - return "provide module for shared"; - } - - get category() { - return "esm"; - } -} - -makeSerializable( - ProvideForSharedDependency, - "webpack/lib/sharing/ProvideForSharedDependency" -); - -module.exports = ProvideForSharedDependency; - - -/***/ }), - -/***/ 94140: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Dependency = __webpack_require__(87056); -const makeSerializable = __webpack_require__(65764); - -class ProvideSharedDependency extends Dependency { - constructor(shareScope, name, version, request, eager) { - super(); - this.shareScope = shareScope; - this.name = name; - this.version = version; - this.request = request; - this.eager = eager; - } - - get type() { - return "provide shared module"; - } - - /** - * @returns {string | null} an identifier to merge equal requests - */ - getResourceIdentifier() { - return `provide module (${this.shareScope}) ${this.request} as ${ - this.name - } @ ${this.version}${this.eager ? " (eager)" : ""}`; - } - - serialize(context) { - context.write(this.shareScope); - context.write(this.name); - context.write(this.request); - context.write(this.version); - context.write(this.eager); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new ProvideSharedDependency( - read(), - read(), - read(), - read(), - read() - ); - this.shareScope = context.read(); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - ProvideSharedDependency, - "webpack/lib/sharing/ProvideSharedDependency" -); - -module.exports = ProvideSharedDependency; - - -/***/ }), - -/***/ 95148: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const AsyncDependenciesBlock = __webpack_require__(42290); -const Module = __webpack_require__(53840); -const RuntimeGlobals = __webpack_require__(39201); -const makeSerializable = __webpack_require__(65764); -const ProvideForSharedDependency = __webpack_require__(98425); - -/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ -/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ -/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/Hash")} Hash */ -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -const TYPES = new Set(["share-init"]); - -class ProvideSharedModule extends Module { - /** - * @param {string} shareScope shared scope name - * @param {string} name shared key - * @param {string | false} version version - * @param {string} request request to the provided module - * @param {boolean} eager include the module in sync way - */ - constructor(shareScope, name, version, request, eager) { - super("provide-module"); - this._shareScope = shareScope; - this._name = name; - this._version = version; - this._request = request; - this._eager = eager; - } - - /** - * @returns {string} a unique identifier of the module - */ - identifier() { - return `provide module (${this._shareScope}) ${this._name}@${this._version} = ${this._request}`; - } - - /** - * @param {RequestShortener} requestShortener the request shortener - * @returns {string} a user readable identifier of the module - */ - readableIdentifier(requestShortener) { - return `provide shared module (${this._shareScope}) ${this._name}@${ - this._version - } = ${requestShortener.shorten(this._request)}`; - } - - /** - * @param {LibIdentOptions} options options - * @returns {string | null} an identifier for library inclusion - */ - libIdent(options) { - return `${this.layer ? `(${this.layer})/` : ""}webpack/sharing/provide/${ - this._shareScope - }/${this._name}`; - } - - /** - * @param {NeedBuildContext} context context info - * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild - * @returns {void} - */ - needBuild(context, callback) { - callback(null, !this.buildInfo); - } - - /** - * @param {WebpackOptions} options webpack options - * @param {Compilation} compilation the compilation - * @param {ResolverWithOptions} resolver the resolver - * @param {InputFileSystem} fs the file system - * @param {function(WebpackError=): void} callback callback function - * @returns {void} - */ - build(options, compilation, resolver, fs, callback) { - this.buildMeta = {}; - this.buildInfo = { - strict: true - }; - - this.clearDependenciesAndBlocks(); - const dep = new ProvideForSharedDependency(this._request); - if (this._eager) { - this.addDependency(dep); - } else { - const block = new AsyncDependenciesBlock({}); - block.addDependency(dep); - this.addBlock(block); - } - - callback(); - } - - /** - * @param {string=} type the source type for which the size should be estimated - * @returns {number} the estimated size of the module (must be non-zero) - */ - size(type) { - return 42; - } - - /** - * @returns {Set} types available (do not mutate) - */ - getSourceTypes() { - return TYPES; - } - - /** - * @param {CodeGenerationContext} context context for code generation - * @returns {CodeGenerationResult} result - */ - codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { - const runtimeRequirements = new Set([RuntimeGlobals.initializeSharing]); - const code = `register(${JSON.stringify(this._name)}, ${JSON.stringify( - this._version || "0" - )}, ${ - this._eager - ? runtimeTemplate.syncModuleFactory({ - dependency: this.dependencies[0], - chunkGraph, - request: this._request, - runtimeRequirements - }) - : runtimeTemplate.asyncModuleFactory({ - block: this.blocks[0], - chunkGraph, - request: this._request, - runtimeRequirements - }) - }${this._eager ? ", 1" : ""});`; - const sources = new Map(); - const data = new Map(); - data.set("share-init", [ - { - shareScope: this._shareScope, - initStage: 10, - init: code - } - ]); - return { sources, data, runtimeRequirements }; - } - - serialize(context) { - const { write } = context; - write(this._shareScope); - write(this._name); - write(this._version); - write(this._request); - write(this._eager); - super.serialize(context); - } - - static deserialize(context) { - const { read } = context; - const obj = new ProvideSharedModule(read(), read(), read(), read(), read()); - obj.deserialize(context); - return obj; - } -} - -makeSerializable( - ProvideSharedModule, - "webpack/lib/sharing/ProvideSharedModule" -); - -module.exports = ProvideSharedModule; - - -/***/ }), - -/***/ 91397: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const ModuleFactory = __webpack_require__(39744); -const ProvideSharedModule = __webpack_require__(95148); - -/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ -/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ -/** @typedef {import("./ProvideSharedDependency")} ProvideSharedDependency */ - -class ProvideSharedModuleFactory extends ModuleFactory { - /** - * @param {ModuleFactoryCreateData} data data object - * @param {function(Error=, ModuleFactoryResult=): void} callback callback - * @returns {void} - */ - create(data, callback) { - const dep = /** @type {ProvideSharedDependency} */ (data.dependencies[0]); - callback(null, { - module: new ProvideSharedModule( - dep.shareScope, - dep.name, - dep.version, - dep.request, - dep.eager - ) - }); - } -} - -module.exports = ProvideSharedModuleFactory; - - -/***/ }), - -/***/ 90432: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const WebpackError = __webpack_require__(27154); -const { parseOptions } = __webpack_require__(58491); -const createSchemaValidation = __webpack_require__(89699); -const ProvideForSharedDependency = __webpack_require__(98425); -const ProvideSharedDependency = __webpack_require__(94140); -const ProvideSharedModuleFactory = __webpack_require__(91397); - -/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvideSharedPluginOptions} ProvideSharedPluginOptions */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compiler")} Compiler */ - -const validate = createSchemaValidation( - __webpack_require__(80557), - () => __webpack_require__(11720), - { - name: "Provide Shared Plugin", - baseDataPath: "options" - } -); - -/** - * @typedef {Object} ProvideOptions - * @property {string} shareKey - * @property {string} shareScope - * @property {string | undefined | false} version - * @property {boolean} eager - */ - -/** @typedef {Map} ResolvedProvideMap */ - -class ProvideSharedPlugin { - /** - * @param {ProvideSharedPluginOptions} options options - */ - constructor(options) { - validate(options); - - /** @type {[string, ProvideOptions][]} */ - this._provides = parseOptions( - options.provides, - item => { - if (Array.isArray(item)) - throw new Error("Unexpected array of provides"); - /** @type {ProvideOptions} */ - const result = { - shareKey: item, - version: undefined, - shareScope: options.shareScope || "default", - eager: false - }; - return result; - }, - item => ({ - shareKey: item.shareKey, - version: item.version, - shareScope: item.shareScope || options.shareScope || "default", - eager: !!item.eager - }) - ); - this._provides.sort(([a], [b]) => { - if (a < b) return -1; - if (b < a) return 1; - return 0; - }); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - /** @type {WeakMap} */ - const compilationData = new WeakMap(); - - compiler.hooks.compilation.tap( - "ProvideSharedPlugin", - (compilation, { normalModuleFactory }) => { - /** @type {ResolvedProvideMap} */ - const resolvedProvideMap = new Map(); - /** @type {Map} */ - const matchProvides = new Map(); - /** @type {Map} */ - const prefixMatchProvides = new Map(); - for (const [request, config] of this._provides) { - if (/^(\/|[A-Za-z]:\\|\\\\|\.\.?(\/|$))/.test(request)) { - // relative request - resolvedProvideMap.set(request, { - config, - version: config.version - }); - } else if (/^(\/|[A-Za-z]:\\|\\\\)/.test(request)) { - // absolute path - resolvedProvideMap.set(request, { - config, - version: config.version - }); - } else if (request.endsWith("/")) { - // module request prefix - prefixMatchProvides.set(request, config); - } else { - // module request - matchProvides.set(request, config); - } - } - compilationData.set(compilation, resolvedProvideMap); - const provideSharedModule = ( - key, - config, - resource, - resourceResolveData - ) => { - let version = config.version; - if (version === undefined) { - let details = ""; - if (!resourceResolveData) { - details = `No resolve data provided from resolver.`; - } else { - const descriptionFileData = - resourceResolveData.descriptionFileData; - if (!descriptionFileData) { - details = - "No description file (usually package.json) found. Add description file with name and version, or manually specify version in shared config."; - } else if (!descriptionFileData.version) { - details = `No version in description file (usually package.json). Add version to description file ${resourceResolveData.descriptionFilePath}, or manually specify version in shared config.`; - } else { - version = descriptionFileData.version; - } - } - if (!version) { - const error = new WebpackError( - `No version specified and unable to automatically determine one. ${details}` - ); - error.file = `shared module ${key} -> ${resource}`; - compilation.warnings.push(error); - } - } - resolvedProvideMap.set(resource, { - config, - version - }); - }; - normalModuleFactory.hooks.module.tap( - "ProvideSharedPlugin", - (module, { resource, resourceResolveData }, resolveData) => { - if (resolvedProvideMap.has(resource)) { - return module; - } - const { request } = resolveData; - { - const config = matchProvides.get(request); - if (config !== undefined) { - provideSharedModule( - request, - config, - resource, - resourceResolveData - ); - resolveData.cacheable = false; - } - } - for (const [prefix, config] of prefixMatchProvides) { - if (request.startsWith(prefix)) { - const remainder = request.slice(prefix.length); - provideSharedModule( - resource, - { - ...config, - shareKey: config.shareKey + remainder - }, - resource, - resourceResolveData - ); - resolveData.cacheable = false; - } - } - return module; - } - ); - } - ); - compiler.hooks.finishMake.tapPromise("ProvideSharedPlugin", compilation => { - const resolvedProvideMap = compilationData.get(compilation); - if (!resolvedProvideMap) return Promise.resolve(); - return Promise.all( - Array.from( - resolvedProvideMap, - ([resource, { config, version }]) => - new Promise((resolve, reject) => { - compilation.addInclude( - compiler.context, - new ProvideSharedDependency( - config.shareScope, - config.shareKey, - version || false, - resource, - config.eager - ), - { - name: undefined - }, - err => { - if (err) return reject(err); - resolve(); - } - ); - }) - ) - ).then(() => {}); - }); - - compiler.hooks.compilation.tap( - "ProvideSharedPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - ProvideForSharedDependency, - normalModuleFactory - ); - - compilation.dependencyFactories.set( - ProvideSharedDependency, - new ProvideSharedModuleFactory() - ); - } - ); - } -} - -module.exports = ProvideSharedPlugin; - - -/***/ }), - -/***/ 77443: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy -*/ - - - -const { parseOptions } = __webpack_require__(58491); -const ConsumeSharedPlugin = __webpack_require__(40724); -const ProvideSharedPlugin = __webpack_require__(90432); -const { isRequiredVersion } = __webpack_require__(539); - -/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumeSharedPluginOptions} ConsumeSharedPluginOptions */ -/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumesConfig} ConsumesConfig */ -/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvideSharedPluginOptions} ProvideSharedPluginOptions */ -/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvidesConfig} ProvidesConfig */ -/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharePluginOptions} SharePluginOptions */ -/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharedConfig} SharedConfig */ -/** @typedef {import("../Compiler")} Compiler */ - -class SharePlugin { - /** - * @param {SharePluginOptions} options options - */ - constructor(options) { - /** @type {[string, SharedConfig][]} */ - const sharedOptions = parseOptions( - options.shared, - (item, key) => { - if (typeof item !== "string") - throw new Error("Unexpected array in shared"); - /** @type {SharedConfig} */ - const config = - item === key || !isRequiredVersion(item) - ? { - import: item - } - : { - import: key, - requiredVersion: item - }; - return config; - }, - item => item - ); - /** @type {Record[]} */ - const consumes = sharedOptions.map(([key, options]) => ({ - [key]: { - import: options.import, - shareKey: options.shareKey || key, - shareScope: options.shareScope, - requiredVersion: options.requiredVersion, - strictVersion: options.strictVersion, - singleton: options.singleton, - packageName: options.packageName, - eager: options.eager - } - })); - /** @type {Record[]} */ - const provides = sharedOptions - .filter(([, options]) => options.import !== false) - .map(([key, options]) => ({ - [options.import || key]: { - shareKey: options.shareKey || key, - shareScope: options.shareScope, - version: options.version, - eager: options.eager - } - })); - this._shareScope = options.shareScope; - this._consumes = consumes; - this._provides = provides; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - new ConsumeSharedPlugin({ - shareScope: this._shareScope, - consumes: this._consumes - }).apply(compiler); - new ProvideSharedPlugin({ - shareScope: this._shareScope, - provides: this._provides - }).apply(compiler); - } -} - -module.exports = SharePlugin; - - -/***/ }), - -/***/ 59694: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - compareModulesByIdentifier, - compareStrings -} = __webpack_require__(58792); - -class ShareRuntimeModule extends RuntimeModule { - constructor() { - super("sharing"); - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunkGraph } = this; - const { - runtimeTemplate, - codeGenerationResults, - outputOptions: { uniqueName } - } = compilation; - /** @type {Map>>} */ - const initCodePerScope = new Map(); - for (const chunk of this.chunk.getAllReferencedChunks()) { - const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( - chunk, - "share-init", - compareModulesByIdentifier - ); - if (!modules) continue; - for (const m of modules) { - const data = codeGenerationResults.getData( - m, - chunk.runtime, - "share-init" - ); - if (!data) continue; - for (const item of data) { - const { shareScope, initStage, init } = item; - let stages = initCodePerScope.get(shareScope); - if (stages === undefined) { - initCodePerScope.set(shareScope, (stages = new Map())); - } - let list = stages.get(initStage || 0); - if (list === undefined) { - stages.set(initStage || 0, (list = new Set())); - } - list.add(init); - } - } - } - return Template.asString([ - `${RuntimeGlobals.shareScopeMap} = {};`, - "var initPromises = {};", - "var initTokens = {};", - `${RuntimeGlobals.initializeSharing} = ${runtimeTemplate.basicFunction( - "name, initScope", - [ - "if(!initScope) initScope = [];", - "// handling circular init calls", - "var initToken = initTokens[name];", - "if(!initToken) initToken = initTokens[name] = {};", - "if(initScope.indexOf(initToken) >= 0) return;", - "initScope.push(initToken);", - "// only runs once", - "if(initPromises[name]) return initPromises[name];", - "// creates a new share scope if needed", - `if(!${RuntimeGlobals.hasOwnProperty}(${RuntimeGlobals.shareScopeMap}, name)) ${RuntimeGlobals.shareScopeMap}[name] = {};`, - "// runs all init snippets from all modules reachable", - `var scope = ${RuntimeGlobals.shareScopeMap}[name];`, - `var warn = ${runtimeTemplate.returningFunction( - 'typeof console !== "undefined" && console.warn && console.warn(msg)', - "msg" - )};`, - `var uniqueName = ${JSON.stringify(uniqueName || undefined)};`, - `var register = ${runtimeTemplate.basicFunction( - "name, version, factory, eager", - [ - "var versions = scope[name] = scope[name] || {};", - "var activeVersion = versions[version];", - "if(!activeVersion || (!activeVersion.loaded && (!eager != !activeVersion.eager ? eager : uniqueName > activeVersion.from))) versions[version] = { get: factory, from: uniqueName, eager: !!eager };" - ] - )};`, - `var initExternal = ${runtimeTemplate.basicFunction("id", [ - `var handleError = ${runtimeTemplate.expressionFunction( - 'warn("Initialization of sharing external failed: " + err)', - "err" - )};`, - "try {", - Template.indent([ - "var module = __webpack_require__(id);", - "if(!module) return;", - `var initFn = ${runtimeTemplate.returningFunction( - `module && module.init && module.init(${RuntimeGlobals.shareScopeMap}[name], initScope)`, - "module" - )}`, - "if(module.then) return promises.push(module.then(initFn, handleError));", - "var initResult = initFn(module);", - "if(initResult && initResult.then) return promises.push(initResult['catch'](handleError));" - ]), - "} catch(err) { handleError(err); }" - ])}`, - "var promises = [];", - "switch(name) {", - ...Array.from(initCodePerScope) - .sort(([a], [b]) => compareStrings(a, b)) - .map(([name, stages]) => - Template.indent([ - `case ${JSON.stringify(name)}: {`, - Template.indent( - Array.from(stages) - .sort(([a], [b]) => a - b) - .map(([, initCode]) => - Template.asString(Array.from(initCode)) - ) - ), - "}", - "break;" - ]) - ), - "}", - "if(!promises.length) return initPromises[name] = 1;", - `return initPromises[name] = Promise.all(promises).then(${runtimeTemplate.returningFunction( - "initPromises[name] = 1" - )});` - ] - )};` - ]); - } -} - -module.exports = ShareRuntimeModule; - - -/***/ }), - -/***/ 303: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ModuleNotFoundError = __webpack_require__(16554); -const LazySet = __webpack_require__(96522); - -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../ResolverFactory").ResolveOptionsWithDependencyType} ResolveOptionsWithDependencyType */ - -/** - * @template T - * @typedef {Object} MatchedConfigs - * @property {Map} resolved - * @property {Map} unresolved - * @property {Map} prefixed - */ - -/** @type {ResolveOptionsWithDependencyType} */ -const RESOLVE_OPTIONS = { dependencyType: "esm" }; - -/** - * @template T - * @param {Compilation} compilation the compilation - * @param {[string, T][]} configs to be processed configs - * @returns {Promise>} resolved matchers - */ -exports.resolveMatchedConfigs = (compilation, configs) => { - /** @type {Map} */ - const resolved = new Map(); - /** @type {Map} */ - const unresolved = new Map(); - /** @type {Map} */ - const prefixed = new Map(); - const resolveContext = { - /** @type {LazySet} */ - fileDependencies: new LazySet(), - /** @type {LazySet} */ - contextDependencies: new LazySet(), - /** @type {LazySet} */ - missingDependencies: new LazySet() - }; - const resolver = compilation.resolverFactory.get("normal", RESOLVE_OPTIONS); - const context = compilation.compiler.context; - - return Promise.all( - configs.map(([request, config]) => { - if (/^\.\.?(\/|$)/.test(request)) { - // relative request - return new Promise(resolve => { - resolver.resolve( - {}, - context, - request, - resolveContext, - (err, result) => { - if (err || result === false) { - err = err || new Error(`Can't resolve ${request}`); - compilation.errors.push( - new ModuleNotFoundError(null, err, { - name: `shared module ${request}` - }) - ); - return resolve(); - } - resolved.set(result, config); - resolve(); - } - ); - }); - } else if (/^(\/|[A-Za-z]:\\|\\\\)/.test(request)) { - // absolute path - resolved.set(request, config); - } else if (request.endsWith("/")) { - // module request prefix - prefixed.set(request, config); - } else { - // module request - unresolved.set(request, config); - } - }) - ).then(() => { - compilation.contextDependencies.addAll(resolveContext.contextDependencies); - compilation.fileDependencies.addAll(resolveContext.fileDependencies); - compilation.missingDependencies.addAll(resolveContext.missingDependencies); - return { resolved, unresolved, prefixed }; - }); -}; - - -/***/ }), - -/***/ 539: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { join, dirname, readJson } = __webpack_require__(47077); - -/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ - -/** - * @param {string} str maybe required version - * @returns {boolean} true, if it looks like a version - */ -exports.isRequiredVersion = str => { - return /^([\d^=v<>~]|[*xX]$)/.test(str); -}; - -/** - * - * @param {InputFileSystem} fs file system - * @param {string} directory directory to start looking into - * @param {string[]} descriptionFiles possible description filenames - * @param {function((Error | null)=, {data: object, path: string}=): void} callback callback - */ -const getDescriptionFile = (fs, directory, descriptionFiles, callback) => { - let i = 0; - const tryLoadCurrent = () => { - if (i >= descriptionFiles.length) { - const parentDirectory = dirname(fs, directory); - if (!parentDirectory || parentDirectory === directory) return callback(); - return getDescriptionFile( - fs, - parentDirectory, - descriptionFiles, - callback - ); - } - const filePath = join(fs, directory, descriptionFiles[i]); - readJson(fs, filePath, (err, data) => { - if (err) { - if ("code" in err && err.code === "ENOENT") { - i++; - return tryLoadCurrent(); - } - return callback(err); - } - if (!data || typeof data !== "object" || Array.isArray(data)) { - return callback( - new Error(`Description file ${filePath} is not an object`) - ); - } - callback(null, { data, path: filePath }); - }); - }; - tryLoadCurrent(); -}; -exports.getDescriptionFile = getDescriptionFile; - -exports.getRequiredVersionFromDescriptionFile = (data, packageName) => { - if ( - data.optionalDependencies && - typeof data.optionalDependencies === "object" && - packageName in data.optionalDependencies - ) { - return data.optionalDependencies[packageName]; - } - if ( - data.dependencies && - typeof data.dependencies === "object" && - packageName in data.dependencies - ) { - return data.dependencies[packageName]; - } - if ( - data.peerDependencies && - typeof data.peerDependencies === "object" && - packageName in data.peerDependencies - ) { - return data.peerDependencies[packageName]; - } - if ( - data.devDependencies && - typeof data.devDependencies === "object" && - packageName in data.devDependencies - ) { - return data.devDependencies[packageName]; - } -}; - - -/***/ }), - -/***/ 11285: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const ModuleDependency = __webpack_require__(99809); -const formatLocation = __webpack_require__(24014); -const { LogType } = __webpack_require__(33594); -const AggressiveSplittingPlugin = __webpack_require__(97239); -const SizeLimitsPlugin = __webpack_require__(96740); -const { countIterable } = __webpack_require__(30922); -const { - compareLocations, - compareChunksById, - compareNumbers, - compareIds, - concatComparators, - compareSelect, - compareModulesByIdentifier -} = __webpack_require__(58792); -const { makePathsRelative, parseResource } = __webpack_require__(20162); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../ChunkGroup").OriginRecord} OriginRecord */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compilation").Asset} Asset */ -/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("../Compilation").NormalizedStatsOptions} NormalizedStatsOptions */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ -/** @typedef {import("../ModuleProfile")} ModuleProfile */ -/** @typedef {import("../RequestShortener")} RequestShortener */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @template T @typedef {import("../util/comparators").Comparator} Comparator */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ -/** @typedef {import("../util/smartGrouping").GroupConfig} GroupConfig */ -/** @typedef {import("./StatsFactory")} StatsFactory */ -/** @typedef {import("./StatsFactory").StatsFactoryContext} StatsFactoryContext */ - -/** @typedef {KnownStatsCompilation & Record} StatsCompilation */ -/** - * @typedef {Object} KnownStatsCompilation - * @property {any=} env - * @property {string=} name - * @property {string=} hash - * @property {string=} version - * @property {number=} time - * @property {number=} builtAt - * @property {boolean=} needAdditionalPass - * @property {string=} publicPath - * @property {string=} outputPath - * @property {Record=} assetsByChunkName - * @property {StatsAsset[]=} assets - * @property {number=} filteredAssets - * @property {StatsChunk[]=} chunks - * @property {StatsModule[]=} modules - * @property {number=} filteredModules - * @property {Record=} entrypoints - * @property {Record=} namedChunkGroups - * @property {StatsError[]=} errors - * @property {number=} errorsCount - * @property {StatsError[]=} warnings - * @property {number=} warningsCount - * @property {StatsCompilation[]=} children - * @property {Record=} logging - */ - -/** @typedef {KnownStatsLogging & Record} StatsLogging */ -/** - * @typedef {Object} KnownStatsLogging - * @property {StatsLoggingEntry[]} entries - * @property {number} filteredEntries - * @property {boolean} debug - */ - -/** @typedef {KnownStatsLoggingEntry & Record} StatsLoggingEntry */ -/** - * @typedef {Object} KnownStatsLoggingEntry - * @property {string} type - * @property {string} message - * @property {string[]=} trace - * @property {StatsLoggingEntry[]=} children - * @property {any[]=} args - * @property {number=} time - */ - -/** @typedef {KnownStatsAsset & Record} StatsAsset */ -/** - * @typedef {Object} KnownStatsAsset - * @property {string} type - * @property {string} name - * @property {AssetInfo} info - * @property {number} size - * @property {boolean} emitted - * @property {boolean} comparedForEmit - * @property {boolean} cached - * @property {StatsAsset[]=} related - * @property {(string|number)[]=} chunkNames - * @property {(string|number)[]=} chunkIdHints - * @property {(string|number)[]=} chunks - * @property {(string|number)[]=} auxiliaryChunkNames - * @property {(string|number)[]=} auxiliaryChunks - * @property {(string|number)[]=} auxiliaryChunkIdHints - * @property {number=} filteredRelated - * @property {boolean=} isOverSizeLimit - */ - -/** @typedef {KnownStatsChunkGroup & Record} StatsChunkGroup */ -/** - * @typedef {Object} KnownStatsChunkGroup - * @property {string=} name - * @property {(string|number)[]=} chunks - * @property {({ name: string, size?: number })[]=} assets - * @property {number=} filteredAssets - * @property {number=} assetsSize - * @property {({ name: string, size?: number })[]=} auxiliaryAssets - * @property {number=} filteredAuxiliaryAssets - * @property {number=} auxiliaryAssetsSize - * @property {{ [x: string]: StatsChunkGroup[] }=} children - * @property {{ [x: string]: string[] }=} childAssets - * @property {boolean=} isOverSizeLimit - */ - -/** @typedef {KnownStatsModule & Record} StatsModule */ -/** - * @typedef {Object} KnownStatsModule - * @property {string=} type - * @property {string=} moduleType - * @property {string=} layer - * @property {string=} identifier - * @property {string=} name - * @property {string=} nameForCondition - * @property {number=} index - * @property {number=} preOrderIndex - * @property {number=} index2 - * @property {number=} postOrderIndex - * @property {number=} size - * @property {{[x: string]: number}=} sizes - * @property {boolean=} cacheable - * @property {boolean=} built - * @property {boolean=} codeGenerated - * @property {boolean=} buildTimeExecuted - * @property {boolean=} cached - * @property {boolean=} optional - * @property {boolean=} orphan - * @property {string|number=} id - * @property {string|number=} issuerId - * @property {(string|number)[]=} chunks - * @property {(string|number)[]=} assets - * @property {boolean=} dependent - * @property {string=} issuer - * @property {string=} issuerName - * @property {StatsModuleIssuer[]=} issuerPath - * @property {boolean=} failed - * @property {number=} errors - * @property {number=} warnings - * @property {StatsProfile=} profile - * @property {StatsModuleReason[]=} reasons - * @property {(boolean | string[])=} usedExports - * @property {string[]=} providedExports - * @property {string[]=} optimizationBailout - * @property {number=} depth - * @property {StatsModule[]=} modules - * @property {number=} filteredModules - * @property {ReturnType=} source - */ - -/** @typedef {KnownStatsProfile & Record} StatsProfile */ -/** - * @typedef {Object} KnownStatsProfile - * @property {number} total - * @property {number} resolving - * @property {number} restoring - * @property {number} building - * @property {number} integration - * @property {number} storing - * @property {number} additionalResolving - * @property {number} additionalIntegration - * @property {number} factory - * @property {number} dependencies - */ - -/** @typedef {KnownStatsModuleIssuer & Record} StatsModuleIssuer */ -/** - * @typedef {Object} KnownStatsModuleIssuer - * @property {string=} identifier - * @property {string=} name - * @property {(string|number)=} id - * @property {StatsProfile=} profile - */ - -/** @typedef {KnownStatsModuleReason & Record} StatsModuleReason */ -/** - * @typedef {Object} KnownStatsModuleReason - * @property {string=} moduleIdentifier - * @property {string=} module - * @property {string=} moduleName - * @property {string=} resolvedModuleIdentifier - * @property {string=} resolvedModule - * @property {string=} type - * @property {boolean} active - * @property {string=} explanation - * @property {string=} userRequest - * @property {string=} loc - * @property {(string|number)=} moduleId - * @property {(string|number)=} resolvedModuleId - */ - -/** @typedef {KnownStatsChunk & Record} StatsChunk */ -/** - * @typedef {Object} KnownStatsChunk - * @property {boolean} rendered - * @property {boolean} initial - * @property {boolean} entry - * @property {boolean} recorded - * @property {string=} reason - * @property {number} size - * @property {Record=} sizes - * @property {string[]=} names - * @property {string[]=} idHints - * @property {string[]=} runtime - * @property {string[]=} files - * @property {string[]=} auxiliaryFiles - * @property {string} hash - * @property {Record=} childrenByOrder - * @property {(string|number)=} id - * @property {(string|number)[]=} siblings - * @property {(string|number)[]=} parents - * @property {(string|number)[]=} children - * @property {StatsModule[]=} modules - * @property {number=} filteredModules - * @property {StatsChunkOrigin[]=} origins - */ - -/** @typedef {KnownStatsChunkOrigin & Record} StatsChunkOrigin */ -/** - * @typedef {Object} KnownStatsChunkOrigin - * @property {string=} module - * @property {string=} moduleIdentifier - * @property {string=} moduleName - * @property {string=} loc - * @property {string=} request - * @property {(string|number)=} moduleId - */ - -/** @typedef {KnownStatsModuleTraceItem & Record} StatsModuleTraceItem */ -/** - * @typedef {Object} KnownStatsModuleTraceItem - * @property {string=} originIdentifier - * @property {string=} originName - * @property {string=} moduleIdentifier - * @property {string=} moduleName - * @property {StatsModuleTraceDependency[]=} dependencies - * @property {(string|number)=} originId - * @property {(string|number)=} moduleId - */ - -/** @typedef {KnownStatsModuleTraceDependency & Record} StatsModuleTraceDependency */ -/** - * @typedef {Object} KnownStatsModuleTraceDependency - * @property {string=} loc - */ - -/** @typedef {KnownStatsError & Record} StatsError */ -/** - * @typedef {Object} KnownStatsError - * @property {string} message - * @property {string=} chunkName - * @property {boolean=} chunkEntry - * @property {boolean=} chunkInitial - * @property {string=} file - * @property {string=} moduleIdentifier - * @property {string=} moduleName - * @property {string=} loc - * @property {string|number=} chunkId - * @property {string|number=} moduleId - * @property {StatsModuleTraceItem[]=} moduleTrace - * @property {any=} details - * @property {string=} stack - */ - -/** @typedef {Asset & { type: string, related: PreprocessedAsset[] }} PreprocessedAsset */ - -/** - * @template T - * @template O - * @typedef {Record void>} ExtractorsByOption - */ - -/** - * @typedef {Object} SimpleExtractors - * @property {ExtractorsByOption} compilation - * @property {ExtractorsByOption} asset - * @property {ExtractorsByOption} asset$visible - * @property {ExtractorsByOption<{ name: string, chunkGroup: ChunkGroup }, StatsChunkGroup>} chunkGroup - * @property {ExtractorsByOption} module - * @property {ExtractorsByOption} module$visible - * @property {ExtractorsByOption} moduleIssuer - * @property {ExtractorsByOption} profile - * @property {ExtractorsByOption} moduleReason - * @property {ExtractorsByOption} chunk - * @property {ExtractorsByOption} chunkOrigin - * @property {ExtractorsByOption} error - * @property {ExtractorsByOption} warning - * @property {ExtractorsByOption<{ origin: Module, module: Module }, StatsModuleTraceItem>} moduleTraceItem - * @property {ExtractorsByOption} moduleTraceDependency - */ - -/** - * @template T - * @template I - * @param {Iterable} items items to select from - * @param {function(T): Iterable} selector selector function to select values from item - * @returns {I[]} array of values - */ -const uniqueArray = (items, selector) => { - /** @type {Set} */ - const set = new Set(); - for (const item of items) { - for (const i of selector(item)) { - set.add(i); - } - } - return Array.from(set); -}; - -/** - * @template T - * @template I - * @param {Iterable} items items to select from - * @param {function(T): Iterable} selector selector function to select values from item - * @param {Comparator} comparator comparator function - * @returns {I[]} array of values - */ -const uniqueOrderedArray = (items, selector, comparator) => { - return uniqueArray(items, selector).sort(comparator); -}; - -/** @template T @template R @typedef {{ [P in keyof T]: R }} MappedValues */ - -/** - * @template T - * @template R - * @param {T} obj object to be mapped - * @param {function(T[keyof T], keyof T): R} fn mapping function - * @returns {MappedValues} mapped object - */ -const mapObject = (obj, fn) => { - const newObj = Object.create(null); - for (const key of Object.keys(obj)) { - newObj[key] = fn(obj[key], /** @type {keyof T} */ (key)); - } - return newObj; -}; - -/** - * @param {Compilation} compilation the compilation - * @param {function(Compilation, string): any[]} getItems get items - * @returns {number} total number - */ -const countWithChildren = (compilation, getItems) => { - let count = getItems(compilation, "").length; - for (const child of compilation.children) { - count += countWithChildren(child, (c, type) => - getItems(c, `.children[].compilation${type}`) - ); - } - return count; -}; - -/** @type {ExtractorsByOption} */ -const EXTRACT_ERROR = { - _: (object, error, context, { requestShortener }) => { - // TODO webpack 6 disallow strings in the errors/warnings list - if (typeof error === "string") { - object.message = error; - } else { - if (error.chunk) { - object.chunkName = error.chunk.name; - object.chunkEntry = error.chunk.hasRuntime(); - object.chunkInitial = error.chunk.canBeInitial(); - } - if (error.file) { - object.file = error.file; - } - if (error.module) { - object.moduleIdentifier = error.module.identifier(); - object.moduleName = error.module.readableIdentifier(requestShortener); - } - if (error.loc) { - object.loc = formatLocation(error.loc); - } - object.message = error.message; - } - }, - ids: (object, error, { compilation: { chunkGraph } }) => { - if (typeof error !== "string") { - if (error.chunk) { - object.chunkId = error.chunk.id; - } - if (error.module) { - object.moduleId = chunkGraph.getModuleId(error.module); - } - } - }, - moduleTrace: (object, error, context, options, factory) => { - if (typeof error !== "string" && error.module) { - const { - type, - compilation: { moduleGraph } - } = context; - /** @type {Set} */ - const visitedModules = new Set(); - const moduleTrace = []; - let current = error.module; - while (current) { - if (visitedModules.has(current)) break; // circular (technically impossible, but how knows) - visitedModules.add(current); - const origin = moduleGraph.getIssuer(current); - if (!origin) break; - moduleTrace.push({ origin, module: current }); - current = origin; - } - object.moduleTrace = factory.create( - `${type}.moduleTrace`, - moduleTrace, - context - ); - } - }, - errorDetails: ( - object, - error, - { type, compilation, cachedGetErrors, cachedGetWarnings }, - { errorDetails } - ) => { - if ( - typeof error !== "string" && - (errorDetails === true || - (type.endsWith(".error") && cachedGetErrors(compilation).length < 3)) - ) { - object.details = error.details; - } - }, - errorStack: (object, error) => { - if (typeof error !== "string") { - object.stack = error.stack; - } - } -}; - -/** @type {SimpleExtractors} */ -const SIMPLE_EXTRACTORS = { - compilation: { - _: (object, compilation, context, options) => { - if (!context.makePathsRelative) { - context.makePathsRelative = makePathsRelative.bindContextCache( - compilation.compiler.context, - compilation.compiler.root - ); - } - if (!context.cachedGetErrors) { - const map = new WeakMap(); - context.cachedGetErrors = compilation => { - return ( - map.get(compilation) || - (errors => (map.set(compilation, errors), errors))( - compilation.getErrors() - ) - ); - }; - } - if (!context.cachedGetWarnings) { - const map = new WeakMap(); - context.cachedGetWarnings = compilation => { - return ( - map.get(compilation) || - (warnings => (map.set(compilation, warnings), warnings))( - compilation.getWarnings() - ) - ); - }; - } - if (compilation.name) { - object.name = compilation.name; - } - if (compilation.needAdditionalPass) { - object.needAdditionalPass = true; - } - - const { logging, loggingDebug, loggingTrace } = options; - if (logging || (loggingDebug && loggingDebug.length > 0)) { - const util = __webpack_require__(73837); - object.logging = {}; - let acceptedTypes; - let collapsedGroups = false; - switch (logging) { - default: - acceptedTypes = new Set(); - break; - case "error": - acceptedTypes = new Set([LogType.error]); - break; - case "warn": - acceptedTypes = new Set([LogType.error, LogType.warn]); - break; - case "info": - acceptedTypes = new Set([ - LogType.error, - LogType.warn, - LogType.info - ]); - break; - case "log": - acceptedTypes = new Set([ - LogType.error, - LogType.warn, - LogType.info, - LogType.log, - LogType.group, - LogType.groupEnd, - LogType.groupCollapsed, - LogType.clear - ]); - break; - case "verbose": - acceptedTypes = new Set([ - LogType.error, - LogType.warn, - LogType.info, - LogType.log, - LogType.group, - LogType.groupEnd, - LogType.groupCollapsed, - LogType.profile, - LogType.profileEnd, - LogType.time, - LogType.status, - LogType.clear - ]); - collapsedGroups = true; - break; - } - const cachedMakePathsRelative = makePathsRelative.bindContextCache( - options.context, - compilation.compiler.root - ); - let depthInCollapsedGroup = 0; - for (const [origin, logEntries] of compilation.logging) { - const debugMode = loggingDebug.some(fn => fn(origin)); - if (logging === false && !debugMode) continue; - /** @type {KnownStatsLoggingEntry[]} */ - const groupStack = []; - /** @type {KnownStatsLoggingEntry[]} */ - const rootList = []; - let currentList = rootList; - let processedLogEntries = 0; - for (const entry of logEntries) { - let type = entry.type; - if (!debugMode && !acceptedTypes.has(type)) continue; - - // Expand groups in verbose and debug modes - if ( - type === LogType.groupCollapsed && - (debugMode || collapsedGroups) - ) - type = LogType.group; - - if (depthInCollapsedGroup === 0) { - processedLogEntries++; - } - - if (type === LogType.groupEnd) { - groupStack.pop(); - if (groupStack.length > 0) { - currentList = groupStack[groupStack.length - 1].children; - } else { - currentList = rootList; - } - if (depthInCollapsedGroup > 0) depthInCollapsedGroup--; - continue; - } - let message = undefined; - if (entry.type === LogType.time) { - message = `${entry.args[0]}: ${ - entry.args[1] * 1000 + entry.args[2] / 1000000 - } ms`; - } else if (entry.args && entry.args.length > 0) { - message = util.format(entry.args[0], ...entry.args.slice(1)); - } - /** @type {KnownStatsLoggingEntry} */ - const newEntry = { - ...entry, - type, - message, - trace: loggingTrace ? entry.trace : undefined, - children: - type === LogType.group || type === LogType.groupCollapsed - ? [] - : undefined - }; - currentList.push(newEntry); - if (newEntry.children) { - groupStack.push(newEntry); - currentList = newEntry.children; - if (depthInCollapsedGroup > 0) { - depthInCollapsedGroup++; - } else if (type === LogType.groupCollapsed) { - depthInCollapsedGroup = 1; - } - } - } - let name = cachedMakePathsRelative(origin).replace(/\|/g, " "); - if (name in object.logging) { - let i = 1; - while (`${name}#${i}` in object.logging) { - i++; - } - name = `${name}#${i}`; - } - object.logging[name] = { - entries: rootList, - filteredEntries: logEntries.length - processedLogEntries, - debug: debugMode - }; - } - } - }, - hash: (object, compilation) => { - object.hash = compilation.hash; - }, - version: object => { - object.version = (__webpack_require__(27012)/* .version */ .i8); - }, - env: (object, compilation, context, { _env }) => { - object.env = _env; - }, - timings: (object, compilation) => { - object.time = compilation.endTime - compilation.startTime; - }, - builtAt: (object, compilation) => { - object.builtAt = compilation.endTime; - }, - publicPath: (object, compilation) => { - object.publicPath = compilation.getPath( - compilation.outputOptions.publicPath - ); - }, - outputPath: (object, compilation) => { - object.outputPath = compilation.outputOptions.path; - }, - assets: (object, compilation, context, options, factory) => { - const { type } = context; - /** @type {Map} */ - const compilationFileToChunks = new Map(); - /** @type {Map} */ - const compilationAuxiliaryFileToChunks = new Map(); - for (const chunk of compilation.chunks) { - for (const file of chunk.files) { - let array = compilationFileToChunks.get(file); - if (array === undefined) { - array = []; - compilationFileToChunks.set(file, array); - } - array.push(chunk); - } - for (const file of chunk.auxiliaryFiles) { - let array = compilationAuxiliaryFileToChunks.get(file); - if (array === undefined) { - array = []; - compilationAuxiliaryFileToChunks.set(file, array); - } - array.push(chunk); - } - } - /** @type {Map} */ - const assetMap = new Map(); - /** @type {Set} */ - const assets = new Set(); - for (const asset of compilation.getAssets()) { - /** @type {PreprocessedAsset} */ - const item = { - ...asset, - type: "asset", - related: undefined - }; - assets.add(item); - assetMap.set(asset.name, item); - } - for (const item of assetMap.values()) { - const related = item.info.related; - if (!related) continue; - for (const type of Object.keys(related)) { - const relatedEntry = related[type]; - const deps = Array.isArray(relatedEntry) - ? relatedEntry - : [relatedEntry]; - for (const dep of deps) { - const depItem = assetMap.get(dep); - if (!depItem) continue; - assets.delete(depItem); - depItem.type = type; - item.related = item.related || []; - item.related.push(depItem); - } - } - } - - object.assetsByChunkName = {}; - for (const [file, chunks] of compilationFileToChunks) { - for (const chunk of chunks) { - const name = chunk.name; - if (!name) continue; - if ( - !Object.prototype.hasOwnProperty.call( - object.assetsByChunkName, - name - ) - ) { - object.assetsByChunkName[name] = []; - } - object.assetsByChunkName[name].push(file); - } - } - - const groupedAssets = factory.create( - `${type}.assets`, - Array.from(assets), - { - ...context, - compilationFileToChunks, - compilationAuxiliaryFileToChunks - } - ); - const limited = spaceLimited(groupedAssets, options.assetsSpace); - object.assets = limited.children; - object.filteredAssets = limited.filteredChildren; - }, - chunks: (object, compilation, context, options, factory) => { - const { type } = context; - object.chunks = factory.create( - `${type}.chunks`, - Array.from(compilation.chunks), - context - ); - }, - modules: (object, compilation, context, options, factory) => { - const { type } = context; - const array = Array.from(compilation.modules); - const groupedModules = factory.create(`${type}.modules`, array, context); - const limited = spaceLimited(groupedModules, options.modulesSpace); - object.modules = limited.children; - object.filteredModules = limited.filteredChildren; - }, - entrypoints: ( - object, - compilation, - context, - { entrypoints, chunkGroups, chunkGroupAuxiliary, chunkGroupChildren }, - factory - ) => { - const { type } = context; - const array = Array.from(compilation.entrypoints, ([key, value]) => ({ - name: key, - chunkGroup: value - })); - if (entrypoints === "auto" && !chunkGroups) { - if (array.length > 5) return; - if ( - !chunkGroupChildren && - array.every(({ chunkGroup }) => { - if (chunkGroup.chunks.length !== 1) return false; - const chunk = chunkGroup.chunks[0]; - return ( - chunk.files.size === 1 && - (!chunkGroupAuxiliary || chunk.auxiliaryFiles.size === 0) - ); - }) - ) { - return; - } - } - object.entrypoints = factory.create( - `${type}.entrypoints`, - array, - context - ); - }, - chunkGroups: (object, compilation, context, options, factory) => { - const { type } = context; - const array = Array.from( - compilation.namedChunkGroups, - ([key, value]) => ({ - name: key, - chunkGroup: value - }) - ); - object.namedChunkGroups = factory.create( - `${type}.namedChunkGroups`, - array, - context - ); - }, - errors: (object, compilation, context, options, factory) => { - const { type, cachedGetErrors } = context; - object.errors = factory.create( - `${type}.errors`, - cachedGetErrors(compilation), - context - ); - }, - errorsCount: (object, compilation, { cachedGetErrors }) => { - object.errorsCount = countWithChildren(compilation, c => - cachedGetErrors(c) - ); - }, - warnings: (object, compilation, context, options, factory) => { - const { type, cachedGetWarnings } = context; - object.warnings = factory.create( - `${type}.warnings`, - cachedGetWarnings(compilation), - context - ); - }, - warningsCount: ( - object, - compilation, - context, - { warningsFilter }, - factory - ) => { - const { type, cachedGetWarnings } = context; - object.warningsCount = countWithChildren(compilation, (c, childType) => { - if (!warningsFilter && warningsFilter.length === 0) - return cachedGetWarnings(c); - return factory - .create(`${type}${childType}.warnings`, cachedGetWarnings(c), context) - .filter(warning => { - const warningString = Object.keys(warning) - .map(key => `${warning[key]}`) - .join("\n"); - return !warningsFilter.some(filter => - filter(warning, warningString) - ); - }); - }); - }, - errorDetails: ( - object, - compilation, - { cachedGetErrors, cachedGetWarnings }, - { errorDetails, errors, warnings } - ) => { - if (errorDetails === "auto") { - if (warnings) { - const warnings = cachedGetWarnings(compilation); - object.filteredWarningDetailsCount = warnings - .map(e => typeof e !== "string" && e.details) - .filter(Boolean).length; - } - if (errors) { - const errors = cachedGetErrors(compilation); - if (errors.length >= 3) { - object.filteredErrorDetailsCount = errors - .map(e => typeof e !== "string" && e.details) - .filter(Boolean).length; - } - } - } - }, - children: (object, compilation, context, options, factory) => { - const { type } = context; - object.children = factory.create( - `${type}.children`, - compilation.children, - context - ); - } - }, - asset: { - _: (object, asset, context, options, factory) => { - const { compilation } = context; - object.type = asset.type; - object.name = asset.name; - object.size = asset.source.size(); - object.emitted = compilation.emittedAssets.has(asset.name); - object.comparedForEmit = compilation.comparedForEmitAssets.has( - asset.name - ); - const cached = !object.emitted && !object.comparedForEmit; - object.cached = cached; - object.info = asset.info; - if (!cached || options.cachedAssets) { - Object.assign( - object, - factory.create(`${context.type}$visible`, asset, context) - ); - } - } - }, - asset$visible: { - _: ( - object, - asset, - { compilation, compilationFileToChunks, compilationAuxiliaryFileToChunks } - ) => { - const chunks = compilationFileToChunks.get(asset.name) || []; - const auxiliaryChunks = - compilationAuxiliaryFileToChunks.get(asset.name) || []; - object.chunkNames = uniqueOrderedArray( - chunks, - c => (c.name ? [c.name] : []), - compareIds - ); - object.chunkIdHints = uniqueOrderedArray( - chunks, - c => Array.from(c.idNameHints), - compareIds - ); - object.auxiliaryChunkNames = uniqueOrderedArray( - auxiliaryChunks, - c => (c.name ? [c.name] : []), - compareIds - ); - object.auxiliaryChunkIdHints = uniqueOrderedArray( - auxiliaryChunks, - c => Array.from(c.idNameHints), - compareIds - ); - object.filteredRelated = asset.related ? asset.related.length : undefined; - }, - relatedAssets: (object, asset, context, options, factory) => { - const { type } = context; - object.related = factory.create( - `${type.slice(0, -8)}.related`, - asset.related, - context - ); - object.filteredRelated = asset.related - ? asset.related.length - object.related.length - : undefined; - }, - ids: ( - object, - asset, - { compilationFileToChunks, compilationAuxiliaryFileToChunks } - ) => { - const chunks = compilationFileToChunks.get(asset.name) || []; - const auxiliaryChunks = - compilationAuxiliaryFileToChunks.get(asset.name) || []; - object.chunks = uniqueOrderedArray(chunks, c => c.ids, compareIds); - object.auxiliaryChunks = uniqueOrderedArray( - auxiliaryChunks, - c => c.ids, - compareIds - ); - }, - performance: (object, asset) => { - object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(asset.source); - } - }, - chunkGroup: { - _: ( - object, - { name, chunkGroup }, - { compilation, compilation: { moduleGraph, chunkGraph } }, - { ids, chunkGroupAuxiliary, chunkGroupChildren, chunkGroupMaxAssets } - ) => { - const children = - chunkGroupChildren && - chunkGroup.getChildrenByOrders(moduleGraph, chunkGraph); - /** - * @param {string} name Name - * @returns {{ name: string, size: number }} Asset object - */ - const toAsset = name => { - const asset = compilation.getAsset(name); - return { - name, - size: asset ? asset.info.size : -1 - }; - }; - /** @type {(total: number, asset: { size: number }) => number} */ - const sizeReducer = (total, { size }) => total + size; - const assets = uniqueArray(chunkGroup.chunks, c => c.files).map(toAsset); - const auxiliaryAssets = uniqueOrderedArray( - chunkGroup.chunks, - c => c.auxiliaryFiles, - compareIds - ).map(toAsset); - const assetsSize = assets.reduce(sizeReducer, 0); - const auxiliaryAssetsSize = auxiliaryAssets.reduce(sizeReducer, 0); - /** @type {KnownStatsChunkGroup} */ - const statsChunkGroup = { - name, - chunks: ids ? chunkGroup.chunks.map(c => c.id) : undefined, - assets: assets.length <= chunkGroupMaxAssets ? assets : undefined, - filteredAssets: - assets.length <= chunkGroupMaxAssets ? 0 : assets.length, - assetsSize, - auxiliaryAssets: - chunkGroupAuxiliary && auxiliaryAssets.length <= chunkGroupMaxAssets - ? auxiliaryAssets - : undefined, - filteredAuxiliaryAssets: - chunkGroupAuxiliary && auxiliaryAssets.length <= chunkGroupMaxAssets - ? 0 - : auxiliaryAssets.length, - auxiliaryAssetsSize, - children: children - ? mapObject(children, groups => - groups.map(group => { - const assets = uniqueArray(group.chunks, c => c.files).map( - toAsset - ); - const auxiliaryAssets = uniqueOrderedArray( - group.chunks, - c => c.auxiliaryFiles, - compareIds - ).map(toAsset); - - /** @type {KnownStatsChunkGroup} */ - const childStatsChunkGroup = { - name: group.name, - chunks: ids ? group.chunks.map(c => c.id) : undefined, - assets: - assets.length <= chunkGroupMaxAssets ? assets : undefined, - filteredAssets: - assets.length <= chunkGroupMaxAssets ? 0 : assets.length, - auxiliaryAssets: - chunkGroupAuxiliary && - auxiliaryAssets.length <= chunkGroupMaxAssets - ? auxiliaryAssets - : undefined, - filteredAuxiliaryAssets: - chunkGroupAuxiliary && - auxiliaryAssets.length <= chunkGroupMaxAssets - ? 0 - : auxiliaryAssets.length - }; - - return childStatsChunkGroup; - }) - ) - : undefined, - childAssets: children - ? mapObject(children, groups => { - /** @type {Set} */ - const set = new Set(); - for (const group of groups) { - for (const chunk of group.chunks) { - for (const asset of chunk.files) { - set.add(asset); - } - } - } - return Array.from(set); - }) - : undefined - }; - Object.assign(object, statsChunkGroup); - }, - performance: (object, { chunkGroup }) => { - object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(chunkGroup); - } - }, - module: { - _: (object, module, context, options, factory) => { - const { compilation, type } = context; - const built = compilation.builtModules.has(module); - const codeGenerated = compilation.codeGeneratedModules.has(module); - const buildTimeExecuted = - compilation.buildTimeExecutedModules.has(module); - /** @type {{[x: string]: number}} */ - const sizes = {}; - for (const sourceType of module.getSourceTypes()) { - sizes[sourceType] = module.size(sourceType); - } - /** @type {KnownStatsModule} */ - const statsModule = { - type: "module", - moduleType: module.type, - layer: module.layer, - size: module.size(), - sizes, - built, - codeGenerated, - buildTimeExecuted, - cached: !built && !codeGenerated - }; - Object.assign(object, statsModule); - - if (built || codeGenerated || options.cachedModules) { - Object.assign( - object, - factory.create(`${type}$visible`, module, context) - ); - } - } - }, - module$visible: { - _: (object, module, context, { requestShortener }, factory) => { - const { compilation, type, rootModules } = context; - const { moduleGraph } = compilation; - /** @type {Module[]} */ - const path = []; - const issuer = moduleGraph.getIssuer(module); - let current = issuer; - while (current) { - path.push(current); - current = moduleGraph.getIssuer(current); - } - path.reverse(); - const profile = moduleGraph.getProfile(module); - const errors = module.getErrors(); - const errorsCount = errors !== undefined ? countIterable(errors) : 0; - const warnings = module.getWarnings(); - const warningsCount = - warnings !== undefined ? countIterable(warnings) : 0; - /** @type {{[x: string]: number}} */ - const sizes = {}; - for (const sourceType of module.getSourceTypes()) { - sizes[sourceType] = module.size(sourceType); - } - /** @type {KnownStatsModule} */ - const statsModule = { - identifier: module.identifier(), - name: module.readableIdentifier(requestShortener), - nameForCondition: module.nameForCondition(), - index: moduleGraph.getPreOrderIndex(module), - preOrderIndex: moduleGraph.getPreOrderIndex(module), - index2: moduleGraph.getPostOrderIndex(module), - postOrderIndex: moduleGraph.getPostOrderIndex(module), - cacheable: module.buildInfo.cacheable, - optional: module.isOptional(moduleGraph), - orphan: - !type.endsWith("module.modules[].module$visible") && - compilation.chunkGraph.getNumberOfModuleChunks(module) === 0, - dependent: rootModules ? !rootModules.has(module) : undefined, - issuer: issuer && issuer.identifier(), - issuerName: issuer && issuer.readableIdentifier(requestShortener), - issuerPath: - issuer && - factory.create(`${type.slice(0, -8)}.issuerPath`, path, context), - failed: errorsCount > 0, - errors: errorsCount, - warnings: warningsCount - }; - Object.assign(object, statsModule); - if (profile) { - object.profile = factory.create( - `${type.slice(0, -8)}.profile`, - profile, - context - ); - } - }, - ids: (object, module, { compilation: { chunkGraph, moduleGraph } }) => { - object.id = chunkGraph.getModuleId(module); - const issuer = moduleGraph.getIssuer(module); - object.issuerId = issuer && chunkGraph.getModuleId(issuer); - object.chunks = Array.from( - chunkGraph.getOrderedModuleChunksIterable(module, compareChunksById), - chunk => chunk.id - ); - }, - moduleAssets: (object, module) => { - object.assets = module.buildInfo.assets - ? Object.keys(module.buildInfo.assets) - : []; - }, - reasons: (object, module, context, options, factory) => { - const { - type, - compilation: { moduleGraph } - } = context; - const groupsReasons = factory.create( - `${type.slice(0, -8)}.reasons`, - Array.from(moduleGraph.getIncomingConnections(module)), - context - ); - const limited = spaceLimited(groupsReasons, options.reasonsSpace); - object.reasons = limited.children; - object.filteredReasons = limited.filteredChildren; - }, - usedExports: ( - object, - module, - { runtime, compilation: { moduleGraph } } - ) => { - const usedExports = moduleGraph.getUsedExports(module, runtime); - if (usedExports === null) { - object.usedExports = null; - } else if (typeof usedExports === "boolean") { - object.usedExports = usedExports; - } else { - object.usedExports = Array.from(usedExports); - } - }, - providedExports: (object, module, { compilation: { moduleGraph } }) => { - const providedExports = moduleGraph.getProvidedExports(module); - object.providedExports = Array.isArray(providedExports) - ? providedExports - : null; - }, - optimizationBailout: ( - object, - module, - { compilation: { moduleGraph } }, - { requestShortener } - ) => { - object.optimizationBailout = moduleGraph - .getOptimizationBailout(module) - .map(item => { - if (typeof item === "function") return item(requestShortener); - return item; - }); - }, - depth: (object, module, { compilation: { moduleGraph } }) => { - object.depth = moduleGraph.getDepth(module); - }, - nestedModules: (object, module, context, options, factory) => { - const { type } = context; - const innerModules = /** @type {Module & { modules?: Module[] }} */ ( - module - ).modules; - if (Array.isArray(innerModules)) { - const groupedModules = factory.create( - `${type.slice(0, -8)}.modules`, - innerModules, - context - ); - const limited = spaceLimited( - groupedModules, - options.nestedModulesSpace - ); - object.modules = limited.children; - object.filteredModules = limited.filteredChildren; - } - }, - source: (object, module) => { - const originalSource = module.originalSource(); - if (originalSource) { - object.source = originalSource.source(); - } - } - }, - profile: { - _: (object, profile) => { - /** @type {KnownStatsProfile} */ - const statsProfile = { - total: - profile.factory + - profile.restoring + - profile.integration + - profile.building + - profile.storing, - resolving: profile.factory, - restoring: profile.restoring, - building: profile.building, - integration: profile.integration, - storing: profile.storing, - additionalResolving: profile.additionalFactories, - additionalIntegration: profile.additionalIntegration, - // TODO remove this in webpack 6 - factory: profile.factory, - // TODO remove this in webpack 6 - dependencies: profile.additionalFactories - }; - Object.assign(object, statsProfile); - } - }, - moduleIssuer: { - _: (object, module, context, { requestShortener }, factory) => { - const { compilation, type } = context; - const { moduleGraph } = compilation; - const profile = moduleGraph.getProfile(module); - /** @type {KnownStatsModuleIssuer} */ - const statsModuleIssuer = { - identifier: module.identifier(), - name: module.readableIdentifier(requestShortener) - }; - Object.assign(object, statsModuleIssuer); - if (profile) { - object.profile = factory.create(`${type}.profile`, profile, context); - } - }, - ids: (object, module, { compilation: { chunkGraph } }) => { - object.id = chunkGraph.getModuleId(module); - } - }, - moduleReason: { - _: (object, reason, { runtime }, { requestShortener }) => { - const dep = reason.dependency; - const moduleDep = - dep && dep instanceof ModuleDependency ? dep : undefined; - /** @type {KnownStatsModuleReason} */ - const statsModuleReason = { - moduleIdentifier: reason.originModule - ? reason.originModule.identifier() - : null, - module: reason.originModule - ? reason.originModule.readableIdentifier(requestShortener) - : null, - moduleName: reason.originModule - ? reason.originModule.readableIdentifier(requestShortener) - : null, - resolvedModuleIdentifier: reason.resolvedOriginModule - ? reason.resolvedOriginModule.identifier() - : null, - resolvedModule: reason.resolvedOriginModule - ? reason.resolvedOriginModule.readableIdentifier(requestShortener) - : null, - type: reason.dependency ? reason.dependency.type : null, - active: reason.isActive(runtime), - explanation: reason.explanation, - userRequest: (moduleDep && moduleDep.userRequest) || null - }; - Object.assign(object, statsModuleReason); - if (reason.dependency) { - const locInfo = formatLocation(reason.dependency.loc); - if (locInfo) { - object.loc = locInfo; - } - } - }, - ids: (object, reason, { compilation: { chunkGraph } }) => { - object.moduleId = reason.originModule - ? chunkGraph.getModuleId(reason.originModule) - : null; - object.resolvedModuleId = reason.resolvedOriginModule - ? chunkGraph.getModuleId(reason.resolvedOriginModule) - : null; - } - }, - chunk: { - _: (object, chunk, { makePathsRelative, compilation: { chunkGraph } }) => { - const childIdByOrder = chunk.getChildIdsByOrders(chunkGraph); - - /** @type {KnownStatsChunk} */ - const statsChunk = { - rendered: chunk.rendered, - initial: chunk.canBeInitial(), - entry: chunk.hasRuntime(), - recorded: AggressiveSplittingPlugin.wasChunkRecorded(chunk), - reason: chunk.chunkReason, - size: chunkGraph.getChunkModulesSize(chunk), - sizes: chunkGraph.getChunkModulesSizes(chunk), - names: chunk.name ? [chunk.name] : [], - idHints: Array.from(chunk.idNameHints), - runtime: - chunk.runtime === undefined - ? undefined - : typeof chunk.runtime === "string" - ? [makePathsRelative(chunk.runtime)] - : Array.from(chunk.runtime.sort(), makePathsRelative), - files: Array.from(chunk.files), - auxiliaryFiles: Array.from(chunk.auxiliaryFiles).sort(compareIds), - hash: chunk.renderedHash, - childrenByOrder: childIdByOrder - }; - Object.assign(object, statsChunk); - }, - ids: (object, chunk) => { - object.id = chunk.id; - }, - chunkRelations: (object, chunk, { compilation: { chunkGraph } }) => { - /** @type {Set} */ - const parents = new Set(); - /** @type {Set} */ - const children = new Set(); - /** @type {Set} */ - const siblings = new Set(); - - for (const chunkGroup of chunk.groupsIterable) { - for (const parentGroup of chunkGroup.parentsIterable) { - for (const chunk of parentGroup.chunks) { - parents.add(chunk.id); - } - } - for (const childGroup of chunkGroup.childrenIterable) { - for (const chunk of childGroup.chunks) { - children.add(chunk.id); - } - } - for (const sibling of chunkGroup.chunks) { - if (sibling !== chunk) siblings.add(sibling.id); - } - } - object.siblings = Array.from(siblings).sort(compareIds); - object.parents = Array.from(parents).sort(compareIds); - object.children = Array.from(children).sort(compareIds); - }, - chunkModules: (object, chunk, context, options, factory) => { - const { - type, - compilation: { chunkGraph } - } = context; - const array = chunkGraph.getChunkModules(chunk); - const groupedModules = factory.create(`${type}.modules`, array, { - ...context, - runtime: chunk.runtime, - rootModules: new Set(chunkGraph.getChunkRootModules(chunk)) - }); - const limited = spaceLimited(groupedModules, options.chunkModulesSpace); - object.modules = limited.children; - object.filteredModules = limited.filteredChildren; - }, - chunkOrigins: (object, chunk, context, options, factory) => { - const { - type, - compilation: { chunkGraph } - } = context; - /** @type {Set} */ - const originsKeySet = new Set(); - const origins = []; - for (const g of chunk.groupsIterable) { - origins.push(...g.origins); - } - const array = origins.filter(origin => { - const key = [ - origin.module ? chunkGraph.getModuleId(origin.module) : undefined, - formatLocation(origin.loc), - origin.request - ].join(); - if (originsKeySet.has(key)) return false; - originsKeySet.add(key); - return true; - }); - object.origins = factory.create(`${type}.origins`, array, context); - } - }, - chunkOrigin: { - _: (object, origin, context, { requestShortener }) => { - /** @type {KnownStatsChunkOrigin} */ - const statsChunkOrigin = { - module: origin.module ? origin.module.identifier() : "", - moduleIdentifier: origin.module ? origin.module.identifier() : "", - moduleName: origin.module - ? origin.module.readableIdentifier(requestShortener) - : "", - loc: formatLocation(origin.loc), - request: origin.request - }; - Object.assign(object, statsChunkOrigin); - }, - ids: (object, origin, { compilation: { chunkGraph } }) => { - object.moduleId = origin.module - ? chunkGraph.getModuleId(origin.module) - : undefined; - } - }, - error: EXTRACT_ERROR, - warning: EXTRACT_ERROR, - moduleTraceItem: { - _: (object, { origin, module }, context, { requestShortener }, factory) => { - const { - type, - compilation: { moduleGraph } - } = context; - object.originIdentifier = origin.identifier(); - object.originName = origin.readableIdentifier(requestShortener); - object.moduleIdentifier = module.identifier(); - object.moduleName = module.readableIdentifier(requestShortener); - const dependencies = Array.from( - moduleGraph.getIncomingConnections(module) - ) - .filter(c => c.resolvedOriginModule === origin && c.dependency) - .map(c => c.dependency); - object.dependencies = factory.create( - `${type}.dependencies`, - Array.from(new Set(dependencies)), - context - ); - }, - ids: (object, { origin, module }, { compilation: { chunkGraph } }) => { - object.originId = chunkGraph.getModuleId(origin); - object.moduleId = chunkGraph.getModuleId(module); - } - }, - moduleTraceDependency: { - _: (object, dependency) => { - object.loc = formatLocation(dependency.loc); - } - } -}; - -/** @type {Record boolean | undefined>>} */ -const FILTER = { - "module.reasons": { - "!orphanModules": (reason, { compilation: { chunkGraph } }) => { - if ( - reason.originModule && - chunkGraph.getNumberOfModuleChunks(reason.originModule) === 0 - ) { - return false; - } - } - } -}; - -/** @type {Record boolean | undefined>>} */ -const FILTER_RESULTS = { - "compilation.warnings": { - warningsFilter: util.deprecate( - (warning, context, { warningsFilter }) => { - const warningString = Object.keys(warning) - .map(key => `${warning[key]}`) - .join("\n"); - return !warningsFilter.some(filter => filter(warning, warningString)); - }, - "config.stats.warningsFilter is deprecated in favor of config.ignoreWarnings", - "DEP_WEBPACK_STATS_WARNINGS_FILTER" - ) - } -}; - -/** @type {Record void>} */ -const MODULES_SORTER = { - _: (comparators, { compilation: { moduleGraph } }) => { - comparators.push( - compareSelect( - /** - * @param {Module} m module - * @returns {number} depth - */ - m => moduleGraph.getDepth(m), - compareNumbers - ), - compareSelect( - /** - * @param {Module} m module - * @returns {number} index - */ - m => moduleGraph.getPreOrderIndex(m), - compareNumbers - ), - compareSelect( - /** - * @param {Module} m module - * @returns {string} identifier - */ - m => m.identifier(), - compareIds - ) - ); - } -}; - -/** @type {Record void>>} */ -const SORTERS = { - "compilation.chunks": { - _: comparators => { - comparators.push(compareSelect(c => c.id, compareIds)); - } - }, - "compilation.modules": MODULES_SORTER, - "chunk.rootModules": MODULES_SORTER, - "chunk.modules": MODULES_SORTER, - "module.modules": MODULES_SORTER, - "module.reasons": { - _: (comparators, { compilation: { chunkGraph } }) => { - comparators.push( - compareSelect(x => x.originModule, compareModulesByIdentifier) - ); - comparators.push( - compareSelect(x => x.resolvedOriginModule, compareModulesByIdentifier) - ); - comparators.push( - compareSelect( - x => x.dependency, - concatComparators( - compareSelect( - /** - * @param {Dependency} x dependency - * @returns {DependencyLocation} location - */ - x => x.loc, - compareLocations - ), - compareSelect(x => x.type, compareIds) - ) - ) - ); - } - }, - "chunk.origins": { - _: (comparators, { compilation: { chunkGraph } }) => { - comparators.push( - compareSelect( - origin => - origin.module ? chunkGraph.getModuleId(origin.module) : undefined, - compareIds - ), - compareSelect(origin => formatLocation(origin.loc), compareIds), - compareSelect(origin => origin.request, compareIds) - ); - } - } -}; - -const getItemSize = item => { - // Each item takes 1 line - // + the size of the children - // + 1 extra line when it has children and filteredChildren - return !item.children - ? 1 - : item.filteredChildren - ? 2 + getTotalSize(item.children) - : 1 + getTotalSize(item.children); -}; - -const getTotalSize = children => { - let size = 0; - for (const child of children) { - size += getItemSize(child); - } - return size; -}; - -const getTotalItems = children => { - let count = 0; - for (const child of children) { - if (!child.children && !child.filteredChildren) { - count++; - } else { - if (child.children) count += getTotalItems(child.children); - if (child.filteredChildren) count += child.filteredChildren; - } - } - return count; -}; - -const collapse = children => { - // After collapse each child must take exactly one line - const newChildren = []; - for (const child of children) { - if (child.children) { - let filteredChildren = child.filteredChildren || 0; - filteredChildren += getTotalItems(child.children); - newChildren.push({ - ...child, - children: undefined, - filteredChildren - }); - } else { - newChildren.push(child); - } - } - return newChildren; -}; - -const spaceLimited = ( - itemsAndGroups, - max, - filteredChildrenLineReserved = false -) => { - if (max < 1) { - return { - children: undefined, - filteredChildren: getTotalItems(itemsAndGroups) - }; - } - /** @type {any[] | undefined} */ - let children = undefined; - /** @type {number | undefined} */ - let filteredChildren = undefined; - // This are the groups, which take 1+ lines each - const groups = []; - // The sizes of the groups are stored in groupSizes - const groupSizes = []; - // This are the items, which take 1 line each - const items = []; - // The total of group sizes - let groupsSize = 0; - - for (const itemOrGroup of itemsAndGroups) { - // is item - if (!itemOrGroup.children && !itemOrGroup.filteredChildren) { - items.push(itemOrGroup); - } else { - groups.push(itemOrGroup); - const size = getItemSize(itemOrGroup); - groupSizes.push(size); - groupsSize += size; - } - } - - if (groupsSize + items.length <= max) { - // The total size in the current state fits into the max - // keep all - children = groups.length > 0 ? groups.concat(items) : items; - } else if (groups.length === 0) { - // slice items to max - // inner space marks that lines for filteredChildren already reserved - const limit = max - (filteredChildrenLineReserved ? 0 : 1); - filteredChildren = items.length - limit; - items.length = limit; - children = items; - } else { - // limit is the size when all groups are collapsed - const limit = - groups.length + - (filteredChildrenLineReserved || items.length === 0 ? 0 : 1); - if (limit < max) { - // calculate how much we are over the size limit - // this allows to approach the limit faster - let oversize; - // If each group would take 1 line the total would be below the maximum - // collapse some groups, keep items - while ( - (oversize = - groupsSize + - items.length + - (filteredChildren && !filteredChildrenLineReserved ? 1 : 0) - - max) > 0 - ) { - // Find the maximum group and process only this one - const maxGroupSize = Math.max(...groupSizes); - if (maxGroupSize < items.length) { - filteredChildren = items.length; - items.length = 0; - continue; - } - for (let i = 0; i < groups.length; i++) { - if (groupSizes[i] === maxGroupSize) { - const group = groups[i]; - // run this algorithm recursively and limit the size of the children to - // current size - oversize / number of groups - // So it should always end up being smaller - const headerSize = group.filteredChildren ? 2 : 1; - const limited = spaceLimited( - group.children, - maxGroupSize - - // we should use ceil to always feet in max - Math.ceil(oversize / groups.length) - - // we substitute size of group head - headerSize, - headerSize === 2 - ); - groups[i] = { - ...group, - children: limited.children, - filteredChildren: limited.filteredChildren - ? (group.filteredChildren || 0) + limited.filteredChildren - : group.filteredChildren - }; - const newSize = getItemSize(groups[i]); - groupsSize -= maxGroupSize - newSize; - groupSizes[i] = newSize; - break; - } - } - } - children = groups.concat(items); - } else if (limit === max) { - // If we have only enough space to show one line per group and one line for the filtered items - // collapse all groups and items - children = collapse(groups); - filteredChildren = items.length; - } else { - // If we have no space - // collapse complete group - filteredChildren = getTotalItems(itemsAndGroups); - } - } - - return { - children, - filteredChildren - }; -}; - -const assetGroup = (children, assets) => { - let size = 0; - for (const asset of children) { - size += asset.size; - } - return { - size - }; -}; - -const moduleGroup = (children, modules) => { - let size = 0; - const sizes = {}; - for (const module of children) { - size += module.size; - for (const key of Object.keys(module.sizes)) { - sizes[key] = (sizes[key] || 0) + module.sizes[key]; - } - } - return { - size, - sizes - }; -}; - -const reasonGroup = (children, reasons) => { - let active = false; - for (const reason of children) { - active = active || reason.active; - } - return { - active - }; -}; - -const GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/; -const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/; - -/** @type {Record void>} */ -const ASSETS_GROUPERS = { - _: (groupConfigs, context, options) => { - const groupByFlag = (name, exclude) => { - groupConfigs.push({ - getKeys: asset => { - return asset[name] ? ["1"] : undefined; - }, - getOptions: () => { - return { - groupChildren: !exclude, - force: exclude - }; - }, - createGroup: (key, children, assets) => { - return exclude - ? { - type: "assets by status", - [name]: !!key, - filteredChildren: assets.length, - ...assetGroup(children, assets) - } - : { - type: "assets by status", - [name]: !!key, - children, - ...assetGroup(children, assets) - }; - } - }); - }; - const { - groupAssetsByEmitStatus, - groupAssetsByPath, - groupAssetsByExtension - } = options; - if (groupAssetsByEmitStatus) { - groupByFlag("emitted"); - groupByFlag("comparedForEmit"); - groupByFlag("isOverSizeLimit"); - } - if (groupAssetsByEmitStatus || !options.cachedAssets) { - groupByFlag("cached", !options.cachedAssets); - } - if (groupAssetsByPath || groupAssetsByExtension) { - groupConfigs.push({ - getKeys: asset => { - const extensionMatch = - groupAssetsByExtension && GROUP_EXTENSION_REGEXP.exec(asset.name); - const extension = extensionMatch ? extensionMatch[1] : ""; - const pathMatch = - groupAssetsByPath && GROUP_PATH_REGEXP.exec(asset.name); - const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; - const keys = []; - if (groupAssetsByPath) { - keys.push("."); - if (extension) - keys.push( - path.length - ? `${path.join("/")}/*${extension}` - : `*${extension}` - ); - while (path.length > 0) { - keys.push(path.join("/") + "/"); - path.pop(); - } - } else { - if (extension) keys.push(`*${extension}`); - } - return keys; - }, - createGroup: (key, children, assets) => { - return { - type: groupAssetsByPath ? "assets by path" : "assets by extension", - name: key, - children, - ...assetGroup(children, assets) - }; - } - }); - } - }, - groupAssetsByInfo: (groupConfigs, context, options) => { - const groupByAssetInfoFlag = name => { - groupConfigs.push({ - getKeys: asset => { - return asset.info && asset.info[name] ? ["1"] : undefined; - }, - createGroup: (key, children, assets) => { - return { - type: "assets by info", - info: { - [name]: !!key - }, - children, - ...assetGroup(children, assets) - }; - } - }); - }; - groupByAssetInfoFlag("immutable"); - groupByAssetInfoFlag("development"); - groupByAssetInfoFlag("hotModuleReplacement"); - }, - groupAssetsByChunk: (groupConfigs, context, options) => { - const groupByNames = name => { - groupConfigs.push({ - getKeys: asset => { - return asset[name]; - }, - createGroup: (key, children, assets) => { - return { - type: "assets by chunk", - [name]: [key], - children, - ...assetGroup(children, assets) - }; - } - }); - }; - groupByNames("chunkNames"); - groupByNames("auxiliaryChunkNames"); - groupByNames("chunkIdHints"); - groupByNames("auxiliaryChunkIdHints"); - }, - excludeAssets: (groupConfigs, context, { excludeAssets }) => { - groupConfigs.push({ - getKeys: asset => { - const ident = asset.name; - const excluded = excludeAssets.some(fn => fn(ident, asset)); - if (excluded) return ["excluded"]; - }, - getOptions: () => ({ - groupChildren: false, - force: true - }), - createGroup: (key, children, assets) => ({ - type: "hidden assets", - filteredChildren: assets.length, - ...assetGroup(children, assets) - }) - }); - } -}; - -/** @type {function("module" | "chunk" | "root-of-chunk" | "nested"): Record void>} */ -const MODULES_GROUPERS = type => ({ - _: (groupConfigs, context, options) => { - const groupByFlag = (name, type, exclude) => { - groupConfigs.push({ - getKeys: module => { - return module[name] ? ["1"] : undefined; - }, - getOptions: () => { - return { - groupChildren: !exclude, - force: exclude - }; - }, - createGroup: (key, children, modules) => { - return { - type, - [name]: !!key, - ...(exclude ? { filteredChildren: modules.length } : { children }), - ...moduleGroup(children, modules) - }; - } - }); - }; - const { - groupModulesByCacheStatus, - groupModulesByLayer, - groupModulesByAttributes, - groupModulesByType, - groupModulesByPath, - groupModulesByExtension - } = options; - if (groupModulesByAttributes) { - groupByFlag("errors", "modules with errors"); - groupByFlag("warnings", "modules with warnings"); - groupByFlag("assets", "modules with assets"); - groupByFlag("optional", "optional modules"); - } - if (groupModulesByCacheStatus) { - groupByFlag("cacheable", "cacheable modules"); - groupByFlag("built", "built modules"); - groupByFlag("codeGenerated", "code generated modules"); - } - if (groupModulesByCacheStatus || !options.cachedModules) { - groupByFlag("cached", "cached modules", !options.cachedModules); - } - if (groupModulesByAttributes || !options.orphanModules) { - groupByFlag("orphan", "orphan modules", !options.orphanModules); - } - if (groupModulesByAttributes || !options.dependentModules) { - groupByFlag("dependent", "dependent modules", !options.dependentModules); - } - if (groupModulesByType || !options.runtimeModules) { - groupConfigs.push({ - getKeys: module => { - if (!module.moduleType) return; - if (groupModulesByType) { - return [module.moduleType.split("/", 1)[0]]; - } else if (module.moduleType === "runtime") { - return ["runtime"]; - } - }, - getOptions: key => { - const exclude = key === "runtime" && !options.runtimeModules; - return { - groupChildren: !exclude, - force: exclude - }; - }, - createGroup: (key, children, modules) => { - const exclude = key === "runtime" && !options.runtimeModules; - return { - type: `${key} modules`, - moduleType: key, - ...(exclude ? { filteredChildren: modules.length } : { children }), - ...moduleGroup(children, modules) - }; - } - }); - } - if (groupModulesByLayer) { - groupConfigs.push({ - getKeys: module => { - return [module.layer]; - }, - createGroup: (key, children, modules) => { - return { - type: "modules by layer", - layer: key, - children, - ...moduleGroup(children, modules) - }; - } - }); - } - if (groupModulesByPath || groupModulesByExtension) { - groupConfigs.push({ - getKeys: module => { - if (!module.name) return; - const resource = parseResource(module.name.split("!").pop()).path; - const dataUrl = /^data:[^,;]+/.exec(resource); - if (dataUrl) return [dataUrl[0]]; - const extensionMatch = - groupModulesByExtension && GROUP_EXTENSION_REGEXP.exec(resource); - const extension = extensionMatch ? extensionMatch[1] : ""; - const pathMatch = - groupModulesByPath && GROUP_PATH_REGEXP.exec(resource); - const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; - const keys = []; - if (groupModulesByPath) { - if (extension) - keys.push( - path.length - ? `${path.join("/")}/*${extension}` - : `*${extension}` - ); - while (path.length > 0) { - keys.push(path.join("/") + "/"); - path.pop(); - } - } else { - if (extension) keys.push(`*${extension}`); - } - return keys; - }, - createGroup: (key, children, modules) => { - const isDataUrl = key.startsWith("data:"); - return { - type: isDataUrl - ? "modules by mime type" - : groupModulesByPath - ? "modules by path" - : "modules by extension", - name: isDataUrl ? key.slice(/* 'data:'.length */ 5) : key, - children, - ...moduleGroup(children, modules) - }; - } - }); - } - }, - excludeModules: (groupConfigs, context, { excludeModules }) => { - groupConfigs.push({ - getKeys: module => { - const name = module.name; - if (name) { - const excluded = excludeModules.some(fn => fn(name, module, type)); - if (excluded) return ["1"]; - } - }, - getOptions: () => ({ - groupChildren: false, - force: true - }), - createGroup: (key, children, modules) => ({ - type: "hidden modules", - filteredChildren: children.length, - ...moduleGroup(children, modules) - }) - }); - } -}); - -/** @type {Record void>>} */ -const RESULT_GROUPERS = { - "compilation.assets": ASSETS_GROUPERS, - "asset.related": ASSETS_GROUPERS, - "compilation.modules": MODULES_GROUPERS("module"), - "chunk.modules": MODULES_GROUPERS("chunk"), - "chunk.rootModules": MODULES_GROUPERS("root-of-chunk"), - "module.modules": MODULES_GROUPERS("nested"), - "module.reasons": { - groupReasonsByOrigin: groupConfigs => { - groupConfigs.push({ - getKeys: reason => { - return [reason.module]; - }, - createGroup: (key, children, reasons) => { - return { - type: "from origin", - module: key, - children, - ...reasonGroup(children, reasons) - }; - } - }); - } - } -}; - -// remove a prefixed "!" that can be specified to reverse sort order -const normalizeFieldKey = field => { - if (field[0] === "!") { - return field.slice(1); - } - return field; -}; - -// if a field is prefixed by a "!" reverse sort order -const sortOrderRegular = field => { - if (field[0] === "!") { - return false; - } - return true; -}; - -/** - * @param {string} field field name - * @returns {function(Object, Object): number} comparators - */ -const sortByField = field => { - if (!field) { - /** - * @param {any} a first - * @param {any} b second - * @returns {-1|0|1} zero - */ - const noSort = (a, b) => 0; - return noSort; - } - - const fieldKey = normalizeFieldKey(field); - - let sortFn = compareSelect(m => m[fieldKey], compareIds); - - // if a field is prefixed with a "!" the sort is reversed! - const sortIsRegular = sortOrderRegular(field); - - if (!sortIsRegular) { - const oldSortFn = sortFn; - sortFn = (a, b) => oldSortFn(b, a); - } - - return sortFn; -}; - -const ASSET_SORTERS = { - /** @type {(comparators: Function[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void} */ - assetsSort: (comparators, context, { assetsSort }) => { - comparators.push(sortByField(assetsSort)); - }, - _: comparators => { - comparators.push(compareSelect(a => a.name, compareIds)); - } -}; - -/** @type {Record void>>} */ -const RESULT_SORTERS = { - "compilation.chunks": { - chunksSort: (comparators, context, { chunksSort }) => { - comparators.push(sortByField(chunksSort)); - } - }, - "compilation.modules": { - modulesSort: (comparators, context, { modulesSort }) => { - comparators.push(sortByField(modulesSort)); - } - }, - "chunk.modules": { - chunkModulesSort: (comparators, context, { chunkModulesSort }) => { - comparators.push(sortByField(chunkModulesSort)); - } - }, - "module.modules": { - nestedModulesSort: (comparators, context, { nestedModulesSort }) => { - comparators.push(sortByField(nestedModulesSort)); - } - }, - "compilation.assets": ASSET_SORTERS, - "asset.related": ASSET_SORTERS -}; - -/** - * @param {Record>} config the config see above - * @param {NormalizedStatsOptions} options stats options - * @param {function(string, Function): void} fn handler function called for every active line in config - * @returns {void} - */ -const iterateConfig = (config, options, fn) => { - for (const hookFor of Object.keys(config)) { - const subConfig = config[hookFor]; - for (const option of Object.keys(subConfig)) { - if (option !== "_") { - if (option.startsWith("!")) { - if (options[option.slice(1)]) continue; - } else { - const value = options[option]; - if ( - value === false || - value === undefined || - (Array.isArray(value) && value.length === 0) - ) - continue; - } - } - fn(hookFor, subConfig[option]); - } - } -}; - -/** @type {Record} */ -const ITEM_NAMES = { - "compilation.children[]": "compilation", - "compilation.modules[]": "module", - "compilation.entrypoints[]": "chunkGroup", - "compilation.namedChunkGroups[]": "chunkGroup", - "compilation.errors[]": "error", - "compilation.warnings[]": "warning", - "chunk.modules[]": "module", - "chunk.rootModules[]": "module", - "chunk.origins[]": "chunkOrigin", - "compilation.chunks[]": "chunk", - "compilation.assets[]": "asset", - "asset.related[]": "asset", - "module.issuerPath[]": "moduleIssuer", - "module.reasons[]": "moduleReason", - "module.modules[]": "module", - "module.children[]": "module", - "moduleTrace[]": "moduleTraceItem", - "moduleTraceItem.dependencies[]": "moduleTraceDependency" -}; - -/** - * @param {Object[]} items items to be merged - * @returns {Object} an object - */ -const mergeToObject = items => { - const obj = Object.create(null); - for (const item of items) { - obj[item.name] = item; - } - return obj; -}; - -/** @type {Record any>} */ -const MERGER = { - "compilation.entrypoints": mergeToObject, - "compilation.namedChunkGroups": mergeToObject -}; - -class DefaultStatsFactoryPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("DefaultStatsFactoryPlugin", compilation => { - compilation.hooks.statsFactory.tap( - "DefaultStatsFactoryPlugin", - (stats, options, context) => { - iterateConfig(SIMPLE_EXTRACTORS, options, (hookFor, fn) => { - stats.hooks.extract - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (obj, data, ctx) => - fn(obj, data, ctx, options, stats) - ); - }); - iterateConfig(FILTER, options, (hookFor, fn) => { - stats.hooks.filter - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => - fn(item, ctx, options, idx, i) - ); - }); - iterateConfig(FILTER_RESULTS, options, (hookFor, fn) => { - stats.hooks.filterResults - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => - fn(item, ctx, options, idx, i) - ); - }); - iterateConfig(SORTERS, options, (hookFor, fn) => { - stats.hooks.sort - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => - fn(comparators, ctx, options) - ); - }); - iterateConfig(RESULT_SORTERS, options, (hookFor, fn) => { - stats.hooks.sortResults - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => - fn(comparators, ctx, options) - ); - }); - iterateConfig(RESULT_GROUPERS, options, (hookFor, fn) => { - stats.hooks.groupResults - .for(hookFor) - .tap("DefaultStatsFactoryPlugin", (groupConfigs, ctx) => - fn(groupConfigs, ctx, options) - ); - }); - for (const key of Object.keys(ITEM_NAMES)) { - const itemName = ITEM_NAMES[key]; - stats.hooks.getItemName - .for(key) - .tap("DefaultStatsFactoryPlugin", () => itemName); - } - for (const key of Object.keys(MERGER)) { - const merger = MERGER[key]; - stats.hooks.merge.for(key).tap("DefaultStatsFactoryPlugin", merger); - } - if (options.children) { - if (Array.isArray(options.children)) { - stats.hooks.getItemFactory - .for("compilation.children[].compilation") - .tap("DefaultStatsFactoryPlugin", (comp, { _index: idx }) => { - if (idx < options.children.length) { - return compilation.createStatsFactory( - compilation.createStatsOptions( - options.children[idx], - context - ) - ); - } - }); - } else if (options.children !== true) { - const childFactory = compilation.createStatsFactory( - compilation.createStatsOptions(options.children, context) - ); - stats.hooks.getItemFactory - .for("compilation.children[].compilation") - .tap("DefaultStatsFactoryPlugin", () => { - return childFactory; - }); - } - } - } - ); - }); - } -} -module.exports = DefaultStatsFactoryPlugin; - - -/***/ }), - -/***/ 16478: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RequestShortener = __webpack_require__(41483); - -/** @typedef {import("../../declarations/WebpackOptions").StatsOptions} StatsOptions */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compilation").CreateStatsOptionsContext} CreateStatsOptionsContext */ -/** @typedef {import("../Compiler")} Compiler */ - -const applyDefaults = (options, defaults) => { - for (const key of Object.keys(defaults)) { - if (typeof options[key] === "undefined") { - options[key] = defaults[key]; - } - } -}; - -const NAMED_PRESETS = { - verbose: { - hash: true, - builtAt: true, - relatedAssets: true, - entrypoints: true, - chunkGroups: true, - ids: true, - modules: false, - chunks: true, - chunkRelations: true, - chunkModules: true, - dependentModules: true, - chunkOrigins: true, - depth: true, - env: true, - reasons: true, - usedExports: true, - providedExports: true, - optimizationBailout: true, - errorDetails: true, - errorStack: true, - publicPath: true, - logging: "verbose", - orphanModules: true, - runtimeModules: true, - exclude: false, - modulesSpace: Infinity, - chunkModulesSpace: Infinity, - assetsSpace: Infinity, - reasonsSpace: Infinity, - children: true - }, - detailed: { - hash: true, - builtAt: true, - relatedAssets: true, - entrypoints: true, - chunkGroups: true, - ids: true, - chunks: true, - chunkRelations: true, - chunkModules: false, - chunkOrigins: true, - depth: true, - usedExports: true, - providedExports: true, - optimizationBailout: true, - errorDetails: true, - publicPath: true, - logging: true, - runtimeModules: true, - exclude: false, - modulesSpace: 1000, - assetsSpace: 1000, - reasonsSpace: 1000 - }, - minimal: { - all: false, - version: true, - timings: true, - modules: true, - modulesSpace: 0, - assets: true, - assetsSpace: 0, - errors: true, - errorsCount: true, - warnings: true, - warningsCount: true, - logging: "warn" - }, - "errors-only": { - all: false, - errors: true, - errorsCount: true, - moduleTrace: true, - logging: "error" - }, - "errors-warnings": { - all: false, - errors: true, - errorsCount: true, - warnings: true, - warningsCount: true, - logging: "warn" - }, - summary: { - all: false, - version: true, - errorsCount: true, - warningsCount: true - }, - none: { - all: false - } -}; - -const NORMAL_ON = ({ all }) => all !== false; -const NORMAL_OFF = ({ all }) => all === true; -const ON_FOR_TO_STRING = ({ all }, { forToString }) => - forToString ? all !== false : all === true; -const OFF_FOR_TO_STRING = ({ all }, { forToString }) => - forToString ? all === true : all !== false; -const AUTO_FOR_TO_STRING = ({ all }, { forToString }) => { - if (all === false) return false; - if (all === true) return true; - if (forToString) return "auto"; - return true; -}; - -/** @type {Record any>} */ -const DEFAULTS = { - context: (options, context, compilation) => compilation.compiler.context, - requestShortener: (options, context, compilation) => - compilation.compiler.context === options.context - ? compilation.requestShortener - : new RequestShortener(options.context, compilation.compiler.root), - performance: NORMAL_ON, - hash: OFF_FOR_TO_STRING, - env: NORMAL_OFF, - version: NORMAL_ON, - timings: NORMAL_ON, - builtAt: OFF_FOR_TO_STRING, - assets: NORMAL_ON, - entrypoints: AUTO_FOR_TO_STRING, - chunkGroups: OFF_FOR_TO_STRING, - chunkGroupAuxiliary: OFF_FOR_TO_STRING, - chunkGroupChildren: OFF_FOR_TO_STRING, - chunkGroupMaxAssets: (o, { forToString }) => (forToString ? 5 : Infinity), - chunks: OFF_FOR_TO_STRING, - chunkRelations: OFF_FOR_TO_STRING, - chunkModules: ({ all, modules }) => { - if (all === false) return false; - if (all === true) return true; - if (modules) return false; - return true; - }, - dependentModules: OFF_FOR_TO_STRING, - chunkOrigins: OFF_FOR_TO_STRING, - ids: OFF_FOR_TO_STRING, - modules: ({ all, chunks, chunkModules }, { forToString }) => { - if (all === false) return false; - if (all === true) return true; - if (forToString && chunks && chunkModules) return false; - return true; - }, - nestedModules: OFF_FOR_TO_STRING, - groupModulesByType: ON_FOR_TO_STRING, - groupModulesByCacheStatus: ON_FOR_TO_STRING, - groupModulesByLayer: ON_FOR_TO_STRING, - groupModulesByAttributes: ON_FOR_TO_STRING, - groupModulesByPath: ON_FOR_TO_STRING, - groupModulesByExtension: ON_FOR_TO_STRING, - modulesSpace: (o, { forToString }) => (forToString ? 15 : Infinity), - chunkModulesSpace: (o, { forToString }) => (forToString ? 10 : Infinity), - nestedModulesSpace: (o, { forToString }) => (forToString ? 10 : Infinity), - relatedAssets: OFF_FOR_TO_STRING, - groupAssetsByEmitStatus: ON_FOR_TO_STRING, - groupAssetsByInfo: ON_FOR_TO_STRING, - groupAssetsByPath: ON_FOR_TO_STRING, - groupAssetsByExtension: ON_FOR_TO_STRING, - groupAssetsByChunk: ON_FOR_TO_STRING, - assetsSpace: (o, { forToString }) => (forToString ? 15 : Infinity), - orphanModules: OFF_FOR_TO_STRING, - runtimeModules: ({ all, runtime }, { forToString }) => - runtime !== undefined - ? runtime - : forToString - ? all === true - : all !== false, - cachedModules: ({ all, cached }, { forToString }) => - cached !== undefined ? cached : forToString ? all === true : all !== false, - moduleAssets: OFF_FOR_TO_STRING, - depth: OFF_FOR_TO_STRING, - cachedAssets: OFF_FOR_TO_STRING, - reasons: OFF_FOR_TO_STRING, - reasonsSpace: (o, { forToString }) => (forToString ? 15 : Infinity), - groupReasonsByOrigin: ON_FOR_TO_STRING, - usedExports: OFF_FOR_TO_STRING, - providedExports: OFF_FOR_TO_STRING, - optimizationBailout: OFF_FOR_TO_STRING, - children: OFF_FOR_TO_STRING, - source: NORMAL_OFF, - moduleTrace: NORMAL_ON, - errors: NORMAL_ON, - errorsCount: NORMAL_ON, - errorDetails: AUTO_FOR_TO_STRING, - errorStack: OFF_FOR_TO_STRING, - warnings: NORMAL_ON, - warningsCount: NORMAL_ON, - publicPath: OFF_FOR_TO_STRING, - logging: ({ all }, { forToString }) => - forToString && all !== false ? "info" : false, - loggingDebug: () => [], - loggingTrace: OFF_FOR_TO_STRING, - excludeModules: () => [], - excludeAssets: () => [], - modulesSort: () => "depth", - chunkModulesSort: () => "name", - nestedModulesSort: () => false, - chunksSort: () => false, - assetsSort: () => "!size", - outputPath: OFF_FOR_TO_STRING, - colors: () => false -}; - -const normalizeFilter = item => { - if (typeof item === "string") { - const regExp = new RegExp( - `[\\\\/]${item.replace( - // eslint-disable-next-line no-useless-escape - /[-[\]{}()*+?.\\^$|]/g, - "\\$&" - )}([\\\\/]|$|!|\\?)` - ); - return ident => regExp.test(ident); - } - if (item && typeof item === "object" && typeof item.test === "function") { - return ident => item.test(ident); - } - if (typeof item === "function") { - return item; - } - if (typeof item === "boolean") { - return () => item; - } -}; - -const NORMALIZER = { - excludeModules: value => { - if (!Array.isArray(value)) { - value = value ? [value] : []; - } - return value.map(normalizeFilter); - }, - excludeAssets: value => { - if (!Array.isArray(value)) { - value = value ? [value] : []; - } - return value.map(normalizeFilter); - }, - warningsFilter: value => { - if (!Array.isArray(value)) { - value = value ? [value] : []; - } - return value.map(filter => { - if (typeof filter === "string") { - return (warning, warningString) => warningString.includes(filter); - } - if (filter instanceof RegExp) { - return (warning, warningString) => filter.test(warningString); - } - if (typeof filter === "function") { - return filter; - } - throw new Error( - `Can only filter warnings with Strings or RegExps. (Given: ${filter})` - ); - }); - }, - logging: value => { - if (value === true) value = "log"; - return value; - }, - loggingDebug: value => { - if (!Array.isArray(value)) { - value = value ? [value] : []; - } - return value.map(normalizeFilter); - } -}; - -class DefaultStatsPresetPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("DefaultStatsPresetPlugin", compilation => { - for (const key of Object.keys(NAMED_PRESETS)) { - const defaults = NAMED_PRESETS[key]; - compilation.hooks.statsPreset - .for(key) - .tap("DefaultStatsPresetPlugin", (options, context) => { - applyDefaults(options, defaults); - }); - } - compilation.hooks.statsNormalize.tap( - "DefaultStatsPresetPlugin", - (options, context) => { - for (const key of Object.keys(DEFAULTS)) { - if (options[key] === undefined) - options[key] = DEFAULTS[key](options, context, compilation); - } - for (const key of Object.keys(NORMALIZER)) { - options[key] = NORMALIZER[key](options[key]); - } - } - ); - }); - } -} -module.exports = DefaultStatsPresetPlugin; - - -/***/ }), - -/***/ 7058: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("./StatsPrinter")} StatsPrinter */ -/** @typedef {import("./StatsPrinter").StatsPrinterContext} StatsPrinterContext */ - -const DATA_URI_CONTENT_LENGTH = 16; - -const plural = (n, singular, plural) => (n === 1 ? singular : plural); - -/** - * @param {Record} sizes sizes by source type - * @param {Object} options options - * @param {(number) => string=} options.formatSize size formatter - * @returns {string} text - */ -const printSizes = (sizes, { formatSize = n => `${n}` }) => { - const keys = Object.keys(sizes); - if (keys.length > 1) { - return keys.map(key => `${formatSize(sizes[key])} (${key})`).join(" "); - } else if (keys.length === 1) { - return formatSize(sizes[keys[0]]); - } -}; - -const getResourceName = resource => { - const dataUrl = /^data:[^,]+,/.exec(resource); - if (!dataUrl) return resource; - - const len = dataUrl[0].length + DATA_URI_CONTENT_LENGTH; - if (resource.length < len) return resource; - return `${resource.slice( - 0, - Math.min(resource.length - /* '..'.length */ 2, len) - )}..`; -}; - -const getModuleName = name => { - const [, prefix, resource] = /^(.*!)?([^!]*)$/.exec(name); - return [prefix, getResourceName(resource)]; -}; - -const mapLines = (str, fn) => str.split("\n").map(fn).join("\n"); - -/** - * @param {number} n a number - * @returns {string} number as two digit string, leading 0 - */ -const twoDigit = n => (n >= 10 ? `${n}` : `0${n}`); - -const isValidId = id => { - return typeof id === "number" || id; -}; - -const moreCount = (list, count) => { - return list && list.length > 0 ? `+ ${count}` : `${count}`; -}; - -/** @type {Record string | void>} */ -const SIMPLE_PRINTERS = { - "compilation.summary!": ( - _, - { - type, - bold, - green, - red, - yellow, - formatDateTime, - formatTime, - compilation: { - name, - hash, - version, - time, - builtAt, - errorsCount, - warningsCount - } - } - ) => { - const root = type === "compilation.summary!"; - const warningsMessage = - warningsCount > 0 - ? yellow( - `${warningsCount} ${plural(warningsCount, "warning", "warnings")}` - ) - : ""; - const errorsMessage = - errorsCount > 0 - ? red(`${errorsCount} ${plural(errorsCount, "error", "errors")}`) - : ""; - const timeMessage = root && time ? ` in ${formatTime(time)}` : ""; - const hashMessage = hash ? ` (${hash})` : ""; - const builtAtMessage = - root && builtAt ? `${formatDateTime(builtAt)}: ` : ""; - const versionMessage = root && version ? `webpack ${version}` : ""; - const nameMessage = - root && name - ? bold(name) - : name - ? `Child ${bold(name)}` - : root - ? "" - : "Child"; - const subjectMessage = - nameMessage && versionMessage - ? `${nameMessage} (${versionMessage})` - : versionMessage || nameMessage || "webpack"; - let statusMessage; - if (errorsMessage && warningsMessage) { - statusMessage = `compiled with ${errorsMessage} and ${warningsMessage}`; - } else if (errorsMessage) { - statusMessage = `compiled with ${errorsMessage}`; - } else if (warningsMessage) { - statusMessage = `compiled with ${warningsMessage}`; - } else if (errorsCount === 0 && warningsCount === 0) { - statusMessage = `compiled ${green("successfully")}`; - } else { - statusMessage = `compiled`; - } - if ( - builtAtMessage || - versionMessage || - errorsMessage || - warningsMessage || - (errorsCount === 0 && warningsCount === 0) || - timeMessage || - hashMessage - ) - return `${builtAtMessage}${subjectMessage} ${statusMessage}${timeMessage}${hashMessage}`; - }, - "compilation.filteredWarningDetailsCount": count => - count - ? `${count} ${plural( - count, - "warning has", - "warnings have" - )} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.` - : undefined, - "compilation.filteredErrorDetailsCount": (count, { yellow }) => - count - ? yellow( - `${count} ${plural( - count, - "error has", - "errors have" - )} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.` - ) - : undefined, - "compilation.env": (env, { bold }) => - env - ? `Environment (--env): ${bold(JSON.stringify(env, null, 2))}` - : undefined, - "compilation.publicPath": (publicPath, { bold }) => - `PublicPath: ${bold(publicPath || "(none)")}`, - "compilation.entrypoints": (entrypoints, context, printer) => - Array.isArray(entrypoints) - ? undefined - : printer.print(context.type, Object.values(entrypoints), { - ...context, - chunkGroupKind: "Entrypoint" - }), - "compilation.namedChunkGroups": (namedChunkGroups, context, printer) => { - if (!Array.isArray(namedChunkGroups)) { - const { - compilation: { entrypoints } - } = context; - let chunkGroups = Object.values(namedChunkGroups); - if (entrypoints) { - chunkGroups = chunkGroups.filter( - group => - !Object.prototype.hasOwnProperty.call(entrypoints, group.name) - ); - } - return printer.print(context.type, chunkGroups, { - ...context, - chunkGroupKind: "Chunk Group" - }); - } - }, - "compilation.assetsByChunkName": () => "", - - "compilation.filteredModules": ( - filteredModules, - { compilation: { modules } } - ) => - filteredModules > 0 - ? `${moreCount(modules, filteredModules)} ${plural( - filteredModules, - "module", - "modules" - )}` - : undefined, - "compilation.filteredAssets": (filteredAssets, { compilation: { assets } }) => - filteredAssets > 0 - ? `${moreCount(assets, filteredAssets)} ${plural( - filteredAssets, - "asset", - "assets" - )}` - : undefined, - "compilation.logging": (logging, context, printer) => - Array.isArray(logging) - ? undefined - : printer.print( - context.type, - Object.entries(logging).map(([name, value]) => ({ ...value, name })), - context - ), - "compilation.warningsInChildren!": (_, { yellow, compilation }) => { - if ( - !compilation.children && - compilation.warningsCount > 0 && - compilation.warnings - ) { - const childWarnings = - compilation.warningsCount - compilation.warnings.length; - if (childWarnings > 0) { - return yellow( - `${childWarnings} ${plural( - childWarnings, - "WARNING", - "WARNINGS" - )} in child compilations${ - compilation.children - ? "" - : " (Use 'stats.children: true' resp. '--stats-children' for more details)" - }` - ); - } - } - }, - "compilation.errorsInChildren!": (_, { red, compilation }) => { - if ( - !compilation.children && - compilation.errorsCount > 0 && - compilation.errors - ) { - const childErrors = compilation.errorsCount - compilation.errors.length; - if (childErrors > 0) { - return red( - `${childErrors} ${plural( - childErrors, - "ERROR", - "ERRORS" - )} in child compilations${ - compilation.children - ? "" - : " (Use 'stats.children: true' resp. '--stats-children' for more details)" - }` - ); - } - } - }, - - "asset.type": type => type, - "asset.name": (name, { formatFilename, asset: { isOverSizeLimit } }) => - formatFilename(name, isOverSizeLimit), - "asset.size": ( - size, - { asset: { isOverSizeLimit }, yellow, green, formatSize } - ) => (isOverSizeLimit ? yellow(formatSize(size)) : formatSize(size)), - "asset.emitted": (emitted, { green, formatFlag }) => - emitted ? green(formatFlag("emitted")) : undefined, - "asset.comparedForEmit": (comparedForEmit, { yellow, formatFlag }) => - comparedForEmit ? yellow(formatFlag("compared for emit")) : undefined, - "asset.cached": (cached, { green, formatFlag }) => - cached ? green(formatFlag("cached")) : undefined, - "asset.isOverSizeLimit": (isOverSizeLimit, { yellow, formatFlag }) => - isOverSizeLimit ? yellow(formatFlag("big")) : undefined, - - "asset.info.immutable": (immutable, { green, formatFlag }) => - immutable ? green(formatFlag("immutable")) : undefined, - "asset.info.javascriptModule": (javascriptModule, { formatFlag }) => - javascriptModule ? formatFlag("javascript module") : undefined, - "asset.info.sourceFilename": (sourceFilename, { formatFlag }) => - sourceFilename - ? formatFlag( - sourceFilename === true - ? "from source file" - : `from: ${sourceFilename}` - ) - : undefined, - "asset.info.development": (development, { green, formatFlag }) => - development ? green(formatFlag("dev")) : undefined, - "asset.info.hotModuleReplacement": ( - hotModuleReplacement, - { green, formatFlag } - ) => (hotModuleReplacement ? green(formatFlag("hmr")) : undefined), - "asset.separator!": () => "\n", - "asset.filteredRelated": (filteredRelated, { asset: { related } }) => - filteredRelated > 0 - ? `${moreCount(related, filteredRelated)} related ${plural( - filteredRelated, - "asset", - "assets" - )}` - : undefined, - "asset.filteredChildren": (filteredChildren, { asset: { children } }) => - filteredChildren > 0 - ? `${moreCount(children, filteredChildren)} ${plural( - filteredChildren, - "asset", - "assets" - )}` - : undefined, - - assetChunk: (id, { formatChunkId }) => formatChunkId(id), - - assetChunkName: name => name, - assetChunkIdHint: name => name, - - "module.type": type => (type !== "module" ? type : undefined), - "module.id": (id, { formatModuleId }) => - isValidId(id) ? formatModuleId(id) : undefined, - "module.name": (name, { bold }) => { - const [prefix, resource] = getModuleName(name); - return `${prefix || ""}${bold(resource || "")}`; - }, - "module.identifier": identifier => undefined, - "module.layer": (layer, { formatLayer }) => - layer ? formatLayer(layer) : undefined, - "module.sizes": printSizes, - "module.chunks[]": (id, { formatChunkId }) => formatChunkId(id), - "module.depth": (depth, { formatFlag }) => - depth !== null ? formatFlag(`depth ${depth}`) : undefined, - "module.cacheable": (cacheable, { formatFlag, red }) => - cacheable === false ? red(formatFlag("not cacheable")) : undefined, - "module.orphan": (orphan, { formatFlag, yellow }) => - orphan ? yellow(formatFlag("orphan")) : undefined, - "module.runtime": (runtime, { formatFlag, yellow }) => - runtime ? yellow(formatFlag("runtime")) : undefined, - "module.optional": (optional, { formatFlag, yellow }) => - optional ? yellow(formatFlag("optional")) : undefined, - "module.dependent": (dependent, { formatFlag, cyan }) => - dependent ? cyan(formatFlag("dependent")) : undefined, - "module.built": (built, { formatFlag, yellow }) => - built ? yellow(formatFlag("built")) : undefined, - "module.codeGenerated": (codeGenerated, { formatFlag, yellow }) => - codeGenerated ? yellow(formatFlag("code generated")) : undefined, - "module.buildTimeExecuted": (buildTimeExecuted, { formatFlag, green }) => - buildTimeExecuted ? green(formatFlag("build time executed")) : undefined, - "module.cached": (cached, { formatFlag, green }) => - cached ? green(formatFlag("cached")) : undefined, - "module.assets": (assets, { formatFlag, magenta }) => - assets && assets.length - ? magenta( - formatFlag( - `${assets.length} ${plural(assets.length, "asset", "assets")}` - ) - ) - : undefined, - "module.warnings": (warnings, { formatFlag, yellow }) => - warnings === true - ? yellow(formatFlag("warnings")) - : warnings - ? yellow( - formatFlag(`${warnings} ${plural(warnings, "warning", "warnings")}`) - ) - : undefined, - "module.errors": (errors, { formatFlag, red }) => - errors === true - ? red(formatFlag("errors")) - : errors - ? red(formatFlag(`${errors} ${plural(errors, "error", "errors")}`)) - : undefined, - "module.providedExports": (providedExports, { formatFlag, cyan }) => { - if (Array.isArray(providedExports)) { - if (providedExports.length === 0) return cyan(formatFlag("no exports")); - return cyan(formatFlag(`exports: ${providedExports.join(", ")}`)); - } - }, - "module.usedExports": (usedExports, { formatFlag, cyan, module }) => { - if (usedExports !== true) { - if (usedExports === null) return cyan(formatFlag("used exports unknown")); - if (usedExports === false) return cyan(formatFlag("module unused")); - if (Array.isArray(usedExports)) { - if (usedExports.length === 0) - return cyan(formatFlag("no exports used")); - const providedExportsCount = Array.isArray(module.providedExports) - ? module.providedExports.length - : null; - if ( - providedExportsCount !== null && - providedExportsCount === usedExports.length - ) { - return cyan(formatFlag("all exports used")); - } else { - return cyan( - formatFlag(`only some exports used: ${usedExports.join(", ")}`) - ); - } - } - } - }, - "module.optimizationBailout[]": (optimizationBailout, { yellow }) => - yellow(optimizationBailout), - "module.issuerPath": (issuerPath, { module }) => - module.profile ? undefined : "", - "module.profile": profile => undefined, - "module.filteredModules": (filteredModules, { module: { modules } }) => - filteredModules > 0 - ? `${moreCount(modules, filteredModules)} nested ${plural( - filteredModules, - "module", - "modules" - )}` - : undefined, - "module.filteredReasons": (filteredReasons, { module: { reasons } }) => - filteredReasons > 0 - ? `${moreCount(reasons, filteredReasons)} ${plural( - filteredReasons, - "reason", - "reasons" - )}` - : undefined, - "module.filteredChildren": (filteredChildren, { module: { children } }) => - filteredChildren > 0 - ? `${moreCount(children, filteredChildren)} ${plural( - filteredChildren, - "module", - "modules" - )}` - : undefined, - "module.separator!": () => "\n", - - "moduleIssuer.id": (id, { formatModuleId }) => formatModuleId(id), - "moduleIssuer.profile.total": (value, { formatTime }) => formatTime(value), - - "moduleReason.type": type => type, - "moduleReason.userRequest": (userRequest, { cyan }) => - cyan(getResourceName(userRequest)), - "moduleReason.moduleId": (moduleId, { formatModuleId }) => - isValidId(moduleId) ? formatModuleId(moduleId) : undefined, - "moduleReason.module": (module, { magenta }) => magenta(module), - "moduleReason.loc": loc => loc, - "moduleReason.explanation": (explanation, { cyan }) => cyan(explanation), - "moduleReason.active": (active, { formatFlag }) => - active ? undefined : formatFlag("inactive"), - "moduleReason.resolvedModule": (module, { magenta }) => magenta(module), - "moduleReason.filteredChildren": ( - filteredChildren, - { moduleReason: { children } } - ) => - filteredChildren > 0 - ? `${moreCount(children, filteredChildren)} ${plural( - filteredChildren, - "reason", - "reasons" - )}` - : undefined, - - "module.profile.total": (value, { formatTime }) => formatTime(value), - "module.profile.resolving": (value, { formatTime }) => - `resolving: ${formatTime(value)}`, - "module.profile.restoring": (value, { formatTime }) => - `restoring: ${formatTime(value)}`, - "module.profile.integration": (value, { formatTime }) => - `integration: ${formatTime(value)}`, - "module.profile.building": (value, { formatTime }) => - `building: ${formatTime(value)}`, - "module.profile.storing": (value, { formatTime }) => - `storing: ${formatTime(value)}`, - "module.profile.additionalResolving": (value, { formatTime }) => - value ? `additional resolving: ${formatTime(value)}` : undefined, - "module.profile.additionalIntegration": (value, { formatTime }) => - value ? `additional integration: ${formatTime(value)}` : undefined, - - "chunkGroup.kind!": (_, { chunkGroupKind }) => chunkGroupKind, - "chunkGroup.separator!": () => "\n", - "chunkGroup.name": (name, { bold }) => bold(name), - "chunkGroup.isOverSizeLimit": (isOverSizeLimit, { formatFlag, yellow }) => - isOverSizeLimit ? yellow(formatFlag("big")) : undefined, - "chunkGroup.assetsSize": (size, { formatSize }) => - size ? formatSize(size) : undefined, - "chunkGroup.auxiliaryAssetsSize": (size, { formatSize }) => - size ? `(${formatSize(size)})` : undefined, - "chunkGroup.filteredAssets": (n, { chunkGroup: { assets } }) => - n > 0 - ? `${moreCount(assets, n)} ${plural(n, "asset", "assets")}` - : undefined, - "chunkGroup.filteredAuxiliaryAssets": ( - n, - { chunkGroup: { auxiliaryAssets } } - ) => - n > 0 - ? `${moreCount(auxiliaryAssets, n)} auxiliary ${plural( - n, - "asset", - "assets" - )}` - : undefined, - "chunkGroup.is!": () => "=", - "chunkGroupAsset.name": (asset, { green }) => green(asset), - "chunkGroupAsset.size": (size, { formatSize, chunkGroup }) => - chunkGroup.assets.length > 1 || - (chunkGroup.auxiliaryAssets && chunkGroup.auxiliaryAssets.length > 0) - ? formatSize(size) - : undefined, - "chunkGroup.children": (children, context, printer) => - Array.isArray(children) - ? undefined - : printer.print( - context.type, - Object.keys(children).map(key => ({ - type: key, - children: children[key] - })), - context - ), - "chunkGroupChildGroup.type": type => `${type}:`, - "chunkGroupChild.assets[]": (file, { formatFilename }) => - formatFilename(file), - "chunkGroupChild.chunks[]": (id, { formatChunkId }) => formatChunkId(id), - "chunkGroupChild.name": name => (name ? `(name: ${name})` : undefined), - - "chunk.id": (id, { formatChunkId }) => formatChunkId(id), - "chunk.files[]": (file, { formatFilename }) => formatFilename(file), - "chunk.names[]": name => name, - "chunk.idHints[]": name => name, - "chunk.runtime[]": name => name, - "chunk.sizes": (sizes, context) => printSizes(sizes, context), - "chunk.parents[]": (parents, context) => - context.formatChunkId(parents, "parent"), - "chunk.siblings[]": (siblings, context) => - context.formatChunkId(siblings, "sibling"), - "chunk.children[]": (children, context) => - context.formatChunkId(children, "child"), - "chunk.childrenByOrder": (childrenByOrder, context, printer) => - Array.isArray(childrenByOrder) - ? undefined - : printer.print( - context.type, - Object.keys(childrenByOrder).map(key => ({ - type: key, - children: childrenByOrder[key] - })), - context - ), - "chunk.childrenByOrder[].type": type => `${type}:`, - "chunk.childrenByOrder[].children[]": (id, { formatChunkId }) => - isValidId(id) ? formatChunkId(id) : undefined, - "chunk.entry": (entry, { formatFlag, yellow }) => - entry ? yellow(formatFlag("entry")) : undefined, - "chunk.initial": (initial, { formatFlag, yellow }) => - initial ? yellow(formatFlag("initial")) : undefined, - "chunk.rendered": (rendered, { formatFlag, green }) => - rendered ? green(formatFlag("rendered")) : undefined, - "chunk.recorded": (recorded, { formatFlag, green }) => - recorded ? green(formatFlag("recorded")) : undefined, - "chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined), - "chunk.filteredModules": (filteredModules, { chunk: { modules } }) => - filteredModules > 0 - ? `${moreCount(modules, filteredModules)} chunk ${plural( - filteredModules, - "module", - "modules" - )}` - : undefined, - "chunk.separator!": () => "\n", - - "chunkOrigin.request": request => request, - "chunkOrigin.moduleId": (moduleId, { formatModuleId }) => - isValidId(moduleId) ? formatModuleId(moduleId) : undefined, - "chunkOrigin.moduleName": (moduleName, { bold }) => bold(moduleName), - "chunkOrigin.loc": loc => loc, - - "error.compilerPath": (compilerPath, { bold }) => - compilerPath ? bold(`(${compilerPath})`) : undefined, - "error.chunkId": (chunkId, { formatChunkId }) => - isValidId(chunkId) ? formatChunkId(chunkId) : undefined, - "error.chunkEntry": (chunkEntry, { formatFlag }) => - chunkEntry ? formatFlag("entry") : undefined, - "error.chunkInitial": (chunkInitial, { formatFlag }) => - chunkInitial ? formatFlag("initial") : undefined, - "error.file": (file, { bold }) => bold(file), - "error.moduleName": (moduleName, { bold }) => { - return moduleName.includes("!") - ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` - : `${bold(moduleName)}`; - }, - "error.loc": (loc, { green }) => green(loc), - "error.message": (message, { bold, formatError }) => - message.includes("\u001b[") ? message : bold(formatError(message)), - "error.details": (details, { formatError }) => formatError(details), - "error.stack": stack => stack, - "error.moduleTrace": moduleTrace => undefined, - "error.separator!": () => "\n", - - "loggingEntry(error).loggingEntry.message": (message, { red }) => - mapLines(message, x => ` ${red(x)}`), - "loggingEntry(warn).loggingEntry.message": (message, { yellow }) => - mapLines(message, x => ` ${yellow(x)}`), - "loggingEntry(info).loggingEntry.message": (message, { green }) => - mapLines(message, x => ` ${green(x)}`), - "loggingEntry(log).loggingEntry.message": (message, { bold }) => - mapLines(message, x => ` ${bold(x)}`), - "loggingEntry(debug).loggingEntry.message": message => - mapLines(message, x => ` ${x}`), - "loggingEntry(trace).loggingEntry.message": message => - mapLines(message, x => ` ${x}`), - "loggingEntry(status).loggingEntry.message": (message, { magenta }) => - mapLines(message, x => ` ${magenta(x)}`), - "loggingEntry(profile).loggingEntry.message": (message, { magenta }) => - mapLines(message, x => `

${magenta(x)}`), - "loggingEntry(profileEnd).loggingEntry.message": (message, { magenta }) => - mapLines(message, x => `

${magenta(x)}`), - "loggingEntry(time).loggingEntry.message": (message, { magenta }) => - mapLines(message, x => ` ${magenta(x)}`), - "loggingEntry(group).loggingEntry.message": (message, { cyan }) => - mapLines(message, x => `<-> ${cyan(x)}`), - "loggingEntry(groupCollapsed).loggingEntry.message": (message, { cyan }) => - mapLines(message, x => `<+> ${cyan(x)}`), - "loggingEntry(clear).loggingEntry": () => " -------", - "loggingEntry(groupCollapsed).loggingEntry.children": () => "", - "loggingEntry.trace[]": trace => - trace ? mapLines(trace, x => `| ${x}`) : undefined, - - "moduleTraceItem.originName": originName => originName, - - loggingGroup: loggingGroup => - loggingGroup.entries.length === 0 ? "" : undefined, - "loggingGroup.debug": (flag, { red }) => (flag ? red("DEBUG") : undefined), - "loggingGroup.name": (name, { bold }) => bold(`LOG from ${name}`), - "loggingGroup.separator!": () => "\n", - "loggingGroup.filteredEntries": filteredEntries => - filteredEntries > 0 ? `+ ${filteredEntries} hidden lines` : undefined, - - "moduleTraceDependency.loc": loc => loc -}; - -/** @type {Record} */ -const ITEM_NAMES = { - "compilation.assets[]": "asset", - "compilation.modules[]": "module", - "compilation.chunks[]": "chunk", - "compilation.entrypoints[]": "chunkGroup", - "compilation.namedChunkGroups[]": "chunkGroup", - "compilation.errors[]": "error", - "compilation.warnings[]": "error", - "compilation.logging[]": "loggingGroup", - "compilation.children[]": "compilation", - "asset.related[]": "asset", - "asset.children[]": "asset", - "asset.chunks[]": "assetChunk", - "asset.auxiliaryChunks[]": "assetChunk", - "asset.chunkNames[]": "assetChunkName", - "asset.chunkIdHints[]": "assetChunkIdHint", - "asset.auxiliaryChunkNames[]": "assetChunkName", - "asset.auxiliaryChunkIdHints[]": "assetChunkIdHint", - "chunkGroup.assets[]": "chunkGroupAsset", - "chunkGroup.auxiliaryAssets[]": "chunkGroupAsset", - "chunkGroupChild.assets[]": "chunkGroupAsset", - "chunkGroupChild.auxiliaryAssets[]": "chunkGroupAsset", - "chunkGroup.children[]": "chunkGroupChildGroup", - "chunkGroupChildGroup.children[]": "chunkGroupChild", - "module.modules[]": "module", - "module.children[]": "module", - "module.reasons[]": "moduleReason", - "moduleReason.children[]": "moduleReason", - "module.issuerPath[]": "moduleIssuer", - "chunk.origins[]": "chunkOrigin", - "chunk.modules[]": "module", - "loggingGroup.entries[]": logEntry => - `loggingEntry(${logEntry.type}).loggingEntry`, - "loggingEntry.children[]": logEntry => - `loggingEntry(${logEntry.type}).loggingEntry`, - "error.moduleTrace[]": "moduleTraceItem", - "moduleTraceItem.dependencies[]": "moduleTraceDependency" -}; - -const ERROR_PREFERRED_ORDER = [ - "compilerPath", - "chunkId", - "chunkEntry", - "chunkInitial", - "file", - "separator!", - "moduleName", - "loc", - "separator!", - "message", - "separator!", - "details", - "separator!", - "stack", - "separator!", - "missing", - "separator!", - "moduleTrace" -]; - -/** @type {Record} */ -const PREFERRED_ORDERS = { - compilation: [ - "name", - "hash", - "version", - "time", - "builtAt", - "env", - "publicPath", - "assets", - "filteredAssets", - "entrypoints", - "namedChunkGroups", - "chunks", - "modules", - "filteredModules", - "children", - "logging", - "warnings", - "warningsInChildren!", - "filteredWarningDetailsCount", - "errors", - "errorsInChildren!", - "filteredErrorDetailsCount", - "summary!", - "needAdditionalPass" - ], - asset: [ - "type", - "name", - "size", - "chunks", - "auxiliaryChunks", - "emitted", - "comparedForEmit", - "cached", - "info", - "isOverSizeLimit", - "chunkNames", - "auxiliaryChunkNames", - "chunkIdHints", - "auxiliaryChunkIdHints", - "related", - "filteredRelated", - "children", - "filteredChildren" - ], - "asset.info": [ - "immutable", - "sourceFilename", - "javascriptModule", - "development", - "hotModuleReplacement" - ], - chunkGroup: [ - "kind!", - "name", - "isOverSizeLimit", - "assetsSize", - "auxiliaryAssetsSize", - "is!", - "assets", - "filteredAssets", - "auxiliaryAssets", - "filteredAuxiliaryAssets", - "separator!", - "children" - ], - chunkGroupAsset: ["name", "size"], - chunkGroupChildGroup: ["type", "children"], - chunkGroupChild: ["assets", "chunks", "name"], - module: [ - "type", - "name", - "identifier", - "id", - "layer", - "sizes", - "chunks", - "depth", - "cacheable", - "orphan", - "runtime", - "optional", - "dependent", - "built", - "codeGenerated", - "cached", - "assets", - "failed", - "warnings", - "errors", - "children", - "filteredChildren", - "providedExports", - "usedExports", - "optimizationBailout", - "reasons", - "filteredReasons", - "issuerPath", - "profile", - "modules", - "filteredModules" - ], - moduleReason: [ - "active", - "type", - "userRequest", - "moduleId", - "module", - "resolvedModule", - "loc", - "explanation", - "children", - "filteredChildren" - ], - "module.profile": [ - "total", - "separator!", - "resolving", - "restoring", - "integration", - "building", - "storing", - "additionalResolving", - "additionalIntegration" - ], - chunk: [ - "id", - "runtime", - "files", - "names", - "idHints", - "sizes", - "parents", - "siblings", - "children", - "childrenByOrder", - "entry", - "initial", - "rendered", - "recorded", - "reason", - "separator!", - "origins", - "separator!", - "modules", - "separator!", - "filteredModules" - ], - chunkOrigin: ["request", "moduleId", "moduleName", "loc"], - error: ERROR_PREFERRED_ORDER, - warning: ERROR_PREFERRED_ORDER, - "chunk.childrenByOrder[]": ["type", "children"], - loggingGroup: [ - "debug", - "name", - "separator!", - "entries", - "separator!", - "filteredEntries" - ], - loggingEntry: ["message", "trace", "children"] -}; - -const itemsJoinOneLine = items => items.filter(Boolean).join(" "); -const itemsJoinOneLineBrackets = items => - items.length > 0 ? `(${items.filter(Boolean).join(" ")})` : undefined; -const itemsJoinMoreSpacing = items => items.filter(Boolean).join("\n\n"); -const itemsJoinComma = items => items.filter(Boolean).join(", "); -const itemsJoinCommaBrackets = items => - items.length > 0 ? `(${items.filter(Boolean).join(", ")})` : undefined; -const itemsJoinCommaBracketsWithName = name => items => - items.length > 0 - ? `(${name}: ${items.filter(Boolean).join(", ")})` - : undefined; - -/** @type {Record string>} */ -const SIMPLE_ITEMS_JOINER = { - "chunk.parents": itemsJoinOneLine, - "chunk.siblings": itemsJoinOneLine, - "chunk.children": itemsJoinOneLine, - "chunk.names": itemsJoinCommaBrackets, - "chunk.idHints": itemsJoinCommaBracketsWithName("id hint"), - "chunk.runtime": itemsJoinCommaBracketsWithName("runtime"), - "chunk.files": itemsJoinComma, - "chunk.childrenByOrder": itemsJoinOneLine, - "chunk.childrenByOrder[].children": itemsJoinOneLine, - "chunkGroup.assets": itemsJoinOneLine, - "chunkGroup.auxiliaryAssets": itemsJoinOneLineBrackets, - "chunkGroupChildGroup.children": itemsJoinComma, - "chunkGroupChild.assets": itemsJoinOneLine, - "chunkGroupChild.auxiliaryAssets": itemsJoinOneLineBrackets, - "asset.chunks": itemsJoinComma, - "asset.auxiliaryChunks": itemsJoinCommaBrackets, - "asset.chunkNames": itemsJoinCommaBracketsWithName("name"), - "asset.auxiliaryChunkNames": itemsJoinCommaBracketsWithName("auxiliary name"), - "asset.chunkIdHints": itemsJoinCommaBracketsWithName("id hint"), - "asset.auxiliaryChunkIdHints": - itemsJoinCommaBracketsWithName("auxiliary id hint"), - "module.chunks": itemsJoinOneLine, - "module.issuerPath": items => - items - .filter(Boolean) - .map(item => `${item} ->`) - .join(" "), - "compilation.errors": itemsJoinMoreSpacing, - "compilation.warnings": itemsJoinMoreSpacing, - "compilation.logging": itemsJoinMoreSpacing, - "compilation.children": items => indent(itemsJoinMoreSpacing(items), " "), - "moduleTraceItem.dependencies": itemsJoinOneLine, - "loggingEntry.children": items => - indent(items.filter(Boolean).join("\n"), " ", false) -}; - -const joinOneLine = items => - items - .map(item => item.content) - .filter(Boolean) - .join(" "); - -const joinInBrackets = items => { - const res = []; - let mode = 0; - for (const item of items) { - if (item.element === "separator!") { - switch (mode) { - case 0: - case 1: - mode += 2; - break; - case 4: - res.push(")"); - mode = 3; - break; - } - } - if (!item.content) continue; - switch (mode) { - case 0: - mode = 1; - break; - case 1: - res.push(" "); - break; - case 2: - res.push("("); - mode = 4; - break; - case 3: - res.push(" ("); - mode = 4; - break; - case 4: - res.push(", "); - break; - } - res.push(item.content); - } - if (mode === 4) res.push(")"); - return res.join(""); -}; - -const indent = (str, prefix, noPrefixInFirstLine) => { - const rem = str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); - if (noPrefixInFirstLine) return rem; - const ind = str[0] === "\n" ? "" : prefix; - return ind + rem; -}; - -const joinExplicitNewLine = (items, indenter) => { - let firstInLine = true; - let first = true; - return items - .map(item => { - if (!item || !item.content) return; - let content = indent(item.content, first ? "" : indenter, !firstInLine); - if (firstInLine) { - content = content.replace(/^\n+/, ""); - } - if (!content) return; - first = false; - const noJoiner = firstInLine || content.startsWith("\n"); - firstInLine = content.endsWith("\n"); - return noJoiner ? content : " " + content; - }) - .filter(Boolean) - .join("") - .trim(); -}; - -const joinError = - error => - (items, { red, yellow }) => - `${error ? red("ERROR") : yellow("WARNING")} in ${joinExplicitNewLine( - items, - "" - )}`; - -/** @type {Record string>} */ -const SIMPLE_ELEMENT_JOINERS = { - compilation: items => { - const result = []; - let lastNeedMore = false; - for (const item of items) { - if (!item.content) continue; - const needMoreSpace = - item.element === "warnings" || - item.element === "filteredWarningDetailsCount" || - item.element === "errors" || - item.element === "filteredErrorDetailsCount" || - item.element === "logging"; - if (result.length !== 0) { - result.push(needMoreSpace || lastNeedMore ? "\n\n" : "\n"); - } - result.push(item.content); - lastNeedMore = needMoreSpace; - } - if (lastNeedMore) result.push("\n"); - return result.join(""); - }, - asset: items => - joinExplicitNewLine( - items.map(item => { - if ( - (item.element === "related" || item.element === "children") && - item.content - ) { - return { - ...item, - content: `\n${item.content}\n` - }; - } - return item; - }), - " " - ), - "asset.info": joinOneLine, - module: (items, { module }) => { - let hasName = false; - return joinExplicitNewLine( - items.map(item => { - switch (item.element) { - case "id": - if (module.id === module.name) { - if (hasName) return false; - if (item.content) hasName = true; - } - break; - case "name": - if (hasName) return false; - if (item.content) hasName = true; - break; - case "providedExports": - case "usedExports": - case "optimizationBailout": - case "reasons": - case "issuerPath": - case "profile": - case "children": - case "modules": - if (item.content) { - return { - ...item, - content: `\n${item.content}\n` - }; - } - break; - } - return item; - }), - " " - ); - }, - chunk: items => { - let hasEntry = false; - return ( - "chunk " + - joinExplicitNewLine( - items.filter(item => { - switch (item.element) { - case "entry": - if (item.content) hasEntry = true; - break; - case "initial": - if (hasEntry) return false; - break; - } - return true; - }), - " " - ) - ); - }, - "chunk.childrenByOrder[]": items => `(${joinOneLine(items)})`, - chunkGroup: items => joinExplicitNewLine(items, " "), - chunkGroupAsset: joinOneLine, - chunkGroupChildGroup: joinOneLine, - chunkGroupChild: joinOneLine, - // moduleReason: (items, { moduleReason }) => { - // let hasName = false; - // return joinOneLine( - // items.filter(item => { - // switch (item.element) { - // case "moduleId": - // if (moduleReason.moduleId === moduleReason.module && item.content) - // hasName = true; - // break; - // case "module": - // if (hasName) return false; - // break; - // case "resolvedModule": - // return ( - // moduleReason.module !== moduleReason.resolvedModule && - // item.content - // ); - // } - // return true; - // }) - // ); - // }, - moduleReason: (items, { moduleReason }) => { - let hasName = false; - return joinExplicitNewLine( - items.map(item => { - switch (item.element) { - case "moduleId": - if (moduleReason.moduleId === moduleReason.module && item.content) - hasName = true; - break; - case "module": - if (hasName) return false; - break; - case "resolvedModule": - if (moduleReason.module === moduleReason.resolvedModule) - return false; - break; - case "children": - if (item.content) { - return { - ...item, - content: `\n${item.content}\n` - }; - } - break; - } - return item; - }), - " " - ); - }, - "module.profile": joinInBrackets, - moduleIssuer: joinOneLine, - chunkOrigin: items => "> " + joinOneLine(items), - "errors[].error": joinError(true), - "warnings[].error": joinError(false), - loggingGroup: items => joinExplicitNewLine(items, "").trimRight(), - moduleTraceItem: items => " @ " + joinOneLine(items), - moduleTraceDependency: joinOneLine -}; - -const AVAILABLE_COLORS = { - bold: "\u001b[1m", - yellow: "\u001b[1m\u001b[33m", - red: "\u001b[1m\u001b[31m", - green: "\u001b[1m\u001b[32m", - cyan: "\u001b[1m\u001b[36m", - magenta: "\u001b[1m\u001b[35m" -}; - -const AVAILABLE_FORMATS = { - formatChunkId: (id, { yellow }, direction) => { - switch (direction) { - case "parent": - return `<{${yellow(id)}}>`; - case "sibling": - return `={${yellow(id)}}=`; - case "child": - return `>{${yellow(id)}}<`; - default: - return `{${yellow(id)}}`; - } - }, - formatModuleId: id => `[${id}]`, - formatFilename: (filename, { green, yellow }, oversize) => - (oversize ? yellow : green)(filename), - formatFlag: flag => `[${flag}]`, - formatLayer: layer => `(in ${layer})`, - formatSize: (__webpack_require__(67309).formatSize), - formatDateTime: (dateTime, { bold }) => { - const d = new Date(dateTime); - const x = twoDigit; - const date = `${d.getFullYear()}-${x(d.getMonth() + 1)}-${x(d.getDate())}`; - const time = `${x(d.getHours())}:${x(d.getMinutes())}:${x(d.getSeconds())}`; - return `${date} ${bold(time)}`; - }, - formatTime: ( - time, - { timeReference, bold, green, yellow, red }, - boldQuantity - ) => { - const unit = " ms"; - if (timeReference && time !== timeReference) { - const times = [ - timeReference / 2, - timeReference / 4, - timeReference / 8, - timeReference / 16 - ]; - if (time < times[3]) return `${time}${unit}`; - else if (time < times[2]) return bold(`${time}${unit}`); - else if (time < times[1]) return green(`${time}${unit}`); - else if (time < times[0]) return yellow(`${time}${unit}`); - else return red(`${time}${unit}`); - } else { - return `${boldQuantity ? bold(time) : time}${unit}`; - } - }, - formatError: (message, { green, yellow, red }) => { - if (message.includes("\u001b[")) return message; - const highlights = [ - { regExp: /(Did you mean .+)/g, format: green }, - { - regExp: /(Set 'mode' option to 'development' or 'production')/g, - format: green - }, - { regExp: /(\(module has no exports\))/g, format: red }, - { regExp: /\(possible exports: (.+)\)/g, format: green }, - { regExp: /(?:^|\n)(.* doesn't exist)/g, format: red }, - { regExp: /('\w+' option has not been set)/g, format: red }, - { - regExp: /(Emitted value instead of an instance of Error)/g, - format: yellow - }, - { regExp: /(Used? .+ instead)/gi, format: yellow }, - { regExp: /\b(deprecated|must|required)\b/g, format: yellow }, - { - regExp: /\b(BREAKING CHANGE)\b/gi, - format: red - }, - { - regExp: - /\b(error|failed|unexpected|invalid|not found|not supported|not available|not possible|not implemented|doesn't support|conflict|conflicting|not existing|duplicate)\b/gi, - format: red - } - ]; - for (const { regExp, format } of highlights) { - message = message.replace(regExp, (match, content) => { - return match.replace(content, format(content)); - }); - } - return message; - } -}; - -const RESULT_MODIFIER = { - "module.modules": result => { - return indent(result, "| "); - } -}; - -const createOrder = (array, preferredOrder) => { - const originalArray = array.slice(); - const set = new Set(array); - const usedSet = new Set(); - array.length = 0; - for (const element of preferredOrder) { - if (element.endsWith("!") || set.has(element)) { - array.push(element); - usedSet.add(element); - } - } - for (const element of originalArray) { - if (!usedSet.has(element)) { - array.push(element); - } - } - return array; -}; - -class DefaultStatsPrinterPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("DefaultStatsPrinterPlugin", compilation => { - compilation.hooks.statsPrinter.tap( - "DefaultStatsPrinterPlugin", - (stats, options, context) => { - // Put colors into context - stats.hooks.print - .for("compilation") - .tap("DefaultStatsPrinterPlugin", (compilation, context) => { - for (const color of Object.keys(AVAILABLE_COLORS)) { - let start; - if (options.colors) { - if ( - typeof options.colors === "object" && - typeof options.colors[color] === "string" - ) { - start = options.colors[color]; - } else { - start = AVAILABLE_COLORS[color]; - } - } - if (start) { - context[color] = str => - `${start}${ - typeof str === "string" - ? str.replace( - /((\u001b\[39m|\u001b\[22m|\u001b\[0m)+)/g, - `$1${start}` - ) - : str - }\u001b[39m\u001b[22m`; - } else { - context[color] = str => str; - } - } - for (const format of Object.keys(AVAILABLE_FORMATS)) { - context[format] = (content, ...args) => - AVAILABLE_FORMATS[format](content, context, ...args); - } - context.timeReference = compilation.time; - }); - - for (const key of Object.keys(SIMPLE_PRINTERS)) { - stats.hooks.print - .for(key) - .tap("DefaultStatsPrinterPlugin", (obj, ctx) => - SIMPLE_PRINTERS[key](obj, ctx, stats) - ); - } - - for (const key of Object.keys(PREFERRED_ORDERS)) { - const preferredOrder = PREFERRED_ORDERS[key]; - stats.hooks.sortElements - .for(key) - .tap("DefaultStatsPrinterPlugin", (elements, context) => { - createOrder(elements, preferredOrder); - }); - } - - for (const key of Object.keys(ITEM_NAMES)) { - const itemName = ITEM_NAMES[key]; - stats.hooks.getItemName - .for(key) - .tap( - "DefaultStatsPrinterPlugin", - typeof itemName === "string" ? () => itemName : itemName - ); - } - - for (const key of Object.keys(SIMPLE_ITEMS_JOINER)) { - const joiner = SIMPLE_ITEMS_JOINER[key]; - stats.hooks.printItems - .for(key) - .tap("DefaultStatsPrinterPlugin", joiner); - } - - for (const key of Object.keys(SIMPLE_ELEMENT_JOINERS)) { - const joiner = SIMPLE_ELEMENT_JOINERS[key]; - stats.hooks.printElements - .for(key) - .tap("DefaultStatsPrinterPlugin", joiner); - } - - for (const key of Object.keys(RESULT_MODIFIER)) { - const modifier = RESULT_MODIFIER[key]; - stats.hooks.result - .for(key) - .tap("DefaultStatsPrinterPlugin", modifier); - } - } - ); - }); - } -} -module.exports = DefaultStatsPrinterPlugin; - - -/***/ }), - -/***/ 70900: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { HookMap, SyncBailHook, SyncWaterfallHook } = __webpack_require__(44217); -const { concatComparators, keepOriginalOrder } = __webpack_require__(58792); -const smartGrouping = __webpack_require__(64726); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../WebpackError")} WebpackError */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -/** @typedef {import("../util/smartGrouping").GroupConfig} GroupConfig */ - -/** - * @typedef {Object} KnownStatsFactoryContext - * @property {string} type - * @property {function(string): string=} makePathsRelative - * @property {Compilation=} compilation - * @property {Set=} rootModules - * @property {Map=} compilationFileToChunks - * @property {Map=} compilationAuxiliaryFileToChunks - * @property {RuntimeSpec=} runtime - * @property {function(Compilation): WebpackError[]=} cachedGetErrors - * @property {function(Compilation): WebpackError[]=} cachedGetWarnings - */ - -/** @typedef {KnownStatsFactoryContext & Record} StatsFactoryContext */ - -class StatsFactory { - constructor() { - this.hooks = Object.freeze({ - /** @type {HookMap>} */ - extract: new HookMap( - () => new SyncBailHook(["object", "data", "context"]) - ), - /** @type {HookMap>} */ - filter: new HookMap( - () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) - ), - /** @type {HookMap>} */ - sort: new HookMap(() => new SyncBailHook(["comparators", "context"])), - /** @type {HookMap>} */ - filterSorted: new HookMap( - () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) - ), - /** @type {HookMap>} */ - groupResults: new HookMap( - () => new SyncBailHook(["groupConfigs", "context"]) - ), - /** @type {HookMap>} */ - sortResults: new HookMap( - () => new SyncBailHook(["comparators", "context"]) - ), - /** @type {HookMap>} */ - filterResults: new HookMap( - () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) - ), - /** @type {HookMap>} */ - merge: new HookMap(() => new SyncBailHook(["items", "context"])), - /** @type {HookMap>} */ - result: new HookMap(() => new SyncWaterfallHook(["result", "context"])), - /** @type {HookMap>} */ - getItemName: new HookMap(() => new SyncBailHook(["item", "context"])), - /** @type {HookMap>} */ - getItemFactory: new HookMap(() => new SyncBailHook(["item", "context"])) - }); - const hooks = this.hooks; - this._caches = - /** @type {Record[]>>} */ ({}); - for (const key of Object.keys(hooks)) { - this._caches[key] = new Map(); - } - this._inCreate = false; - } - - _getAllLevelHooks(hookMap, cache, type) { - const cacheEntry = cache.get(type); - if (cacheEntry !== undefined) { - return cacheEntry; - } - const hooks = []; - const typeParts = type.split("."); - for (let i = 0; i < typeParts.length; i++) { - const hook = hookMap.get(typeParts.slice(i).join(".")); - if (hook) { - hooks.push(hook); - } - } - cache.set(type, hooks); - return hooks; - } - - _forEachLevel(hookMap, cache, type, fn) { - for (const hook of this._getAllLevelHooks(hookMap, cache, type)) { - const result = fn(hook); - if (result !== undefined) return result; - } - } - - _forEachLevelWaterfall(hookMap, cache, type, data, fn) { - for (const hook of this._getAllLevelHooks(hookMap, cache, type)) { - data = fn(hook, data); - } - return data; - } - - _forEachLevelFilter(hookMap, cache, type, items, fn, forceClone) { - const hooks = this._getAllLevelHooks(hookMap, cache, type); - if (hooks.length === 0) return forceClone ? items.slice() : items; - let i = 0; - return items.filter((item, idx) => { - for (const hook of hooks) { - const r = fn(hook, item, idx, i); - if (r !== undefined) { - if (r) i++; - return r; - } - } - i++; - return true; - }); - } - - /** - * @param {string} type type - * @param {any} data factory data - * @param {Omit} baseContext context used as base - * @returns {any} created object - */ - create(type, data, baseContext) { - if (this._inCreate) { - return this._create(type, data, baseContext); - } else { - try { - this._inCreate = true; - return this._create(type, data, baseContext); - } finally { - for (const key of Object.keys(this._caches)) this._caches[key].clear(); - this._inCreate = false; - } - } - } - - _create(type, data, baseContext) { - const context = { - ...baseContext, - type, - [type]: data - }; - if (Array.isArray(data)) { - // run filter on unsorted items - const items = this._forEachLevelFilter( - this.hooks.filter, - this._caches.filter, - type, - data, - (h, r, idx, i) => h.call(r, context, idx, i), - true - ); - - // sort items - const comparators = []; - this._forEachLevel(this.hooks.sort, this._caches.sort, type, h => - h.call(comparators, context) - ); - if (comparators.length > 0) { - items.sort( - // @ts-expect-error number of arguments is correct - concatComparators(...comparators, keepOriginalOrder(items)) - ); - } - - // run filter on sorted items - const items2 = this._forEachLevelFilter( - this.hooks.filterSorted, - this._caches.filterSorted, - type, - items, - (h, r, idx, i) => h.call(r, context, idx, i), - false - ); - - // for each item - let resultItems = items2.map((item, i) => { - const itemContext = { - ...context, - _index: i - }; - - // run getItemName - const itemName = this._forEachLevel( - this.hooks.getItemName, - this._caches.getItemName, - `${type}[]`, - h => h.call(item, itemContext) - ); - if (itemName) itemContext[itemName] = item; - const innerType = itemName ? `${type}[].${itemName}` : `${type}[]`; - - // run getItemFactory - const itemFactory = - this._forEachLevel( - this.hooks.getItemFactory, - this._caches.getItemFactory, - innerType, - h => h.call(item, itemContext) - ) || this; - - // run item factory - return itemFactory.create(innerType, item, itemContext); - }); - - // sort result items - const comparators2 = []; - this._forEachLevel( - this.hooks.sortResults, - this._caches.sortResults, - type, - h => h.call(comparators2, context) - ); - if (comparators2.length > 0) { - resultItems.sort( - // @ts-expect-error number of arguments is correct - concatComparators(...comparators2, keepOriginalOrder(resultItems)) - ); - } - - // group result items - const groupConfigs = []; - this._forEachLevel( - this.hooks.groupResults, - this._caches.groupResults, - type, - h => h.call(groupConfigs, context) - ); - if (groupConfigs.length > 0) { - resultItems = smartGrouping(resultItems, groupConfigs); - } - - // run filter on sorted result items - const finalResultItems = this._forEachLevelFilter( - this.hooks.filterResults, - this._caches.filterResults, - type, - resultItems, - (h, r, idx, i) => h.call(r, context, idx, i), - false - ); - - // run merge on mapped items - let result = this._forEachLevel( - this.hooks.merge, - this._caches.merge, - type, - h => h.call(finalResultItems, context) - ); - if (result === undefined) result = finalResultItems; - - // run result on merged items - return this._forEachLevelWaterfall( - this.hooks.result, - this._caches.result, - type, - result, - (h, r) => h.call(r, context) - ); - } else { - const object = {}; - - // run extract on value - this._forEachLevel(this.hooks.extract, this._caches.extract, type, h => - h.call(object, data, context) - ); - - // run result on extracted object - return this._forEachLevelWaterfall( - this.hooks.result, - this._caches.result, - type, - object, - (h, r) => h.call(r, context) - ); - } - } -} -module.exports = StatsFactory; - - -/***/ }), - -/***/ 67793: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { HookMap, SyncWaterfallHook, SyncBailHook } = __webpack_require__(44217); - -/** @template T @typedef {import("tapable").AsArray} AsArray */ -/** @typedef {import("tapable").Hook} Hook */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsChunk} StatsChunk */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsChunkGroup} StatsChunkGroup */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsCompilation} StatsCompilation */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModule} StatsModule */ -/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModuleReason} StatsModuleReason */ - -/** - * @typedef {Object} PrintedElement - * @property {string} element - * @property {string} content - */ - -/** - * @typedef {Object} KnownStatsPrinterContext - * @property {string=} type - * @property {StatsCompilation=} compilation - * @property {StatsChunkGroup=} chunkGroup - * @property {StatsAsset=} asset - * @property {StatsModule=} module - * @property {StatsChunk=} chunk - * @property {StatsModuleReason=} moduleReason - * @property {(str: string) => string=} bold - * @property {(str: string) => string=} yellow - * @property {(str: string) => string=} red - * @property {(str: string) => string=} green - * @property {(str: string) => string=} magenta - * @property {(str: string) => string=} cyan - * @property {(file: string, oversize?: boolean) => string=} formatFilename - * @property {(id: string) => string=} formatModuleId - * @property {(id: string, direction?: "parent"|"child"|"sibling") => string=} formatChunkId - * @property {(size: number) => string=} formatSize - * @property {(dateTime: number) => string=} formatDateTime - * @property {(flag: string) => string=} formatFlag - * @property {(time: number, boldQuantity?: boolean) => string=} formatTime - * @property {string=} chunkGroupKind - */ - -/** @typedef {KnownStatsPrinterContext & Record} StatsPrinterContext */ - -class StatsPrinter { - constructor() { - this.hooks = Object.freeze({ - /** @type {HookMap>} */ - sortElements: new HookMap( - () => new SyncBailHook(["elements", "context"]) - ), - /** @type {HookMap>} */ - printElements: new HookMap( - () => new SyncBailHook(["printedElements", "context"]) - ), - /** @type {HookMap>} */ - sortItems: new HookMap(() => new SyncBailHook(["items", "context"])), - /** @type {HookMap>} */ - getItemName: new HookMap(() => new SyncBailHook(["item", "context"])), - /** @type {HookMap>} */ - printItems: new HookMap( - () => new SyncBailHook(["printedItems", "context"]) - ), - /** @type {HookMap>} */ - print: new HookMap(() => new SyncBailHook(["object", "context"])), - /** @type {HookMap>} */ - result: new HookMap(() => new SyncWaterfallHook(["result", "context"])) - }); - /** @type {Map, Map>} */ - this._levelHookCache = new Map(); - this._inPrint = false; - } - - /** - * get all level hooks - * @private - * @template {Hook} T - * @param {HookMap} hookMap HookMap - * @param {string} type type - * @returns {T[]} hooks - */ - _getAllLevelHooks(hookMap, type) { - let cache = /** @type {Map} */ ( - this._levelHookCache.get(hookMap) - ); - if (cache === undefined) { - cache = new Map(); - this._levelHookCache.set(hookMap, cache); - } - const cacheEntry = cache.get(type); - if (cacheEntry !== undefined) { - return cacheEntry; - } - /** @type {T[]} */ - const hooks = []; - const typeParts = type.split("."); - for (let i = 0; i < typeParts.length; i++) { - const hook = hookMap.get(typeParts.slice(i).join(".")); - if (hook) { - hooks.push(hook); - } - } - cache.set(type, hooks); - return hooks; - } - - /** - * Run `fn` for each level - * @private - * @template T - * @template R - * @param {HookMap>} hookMap HookMap - * @param {string} type type - * @param {(hook: SyncBailHook) => R} fn function - * @returns {R} result of `fn` - */ - _forEachLevel(hookMap, type, fn) { - for (const hook of this._getAllLevelHooks(hookMap, type)) { - const result = fn(hook); - if (result !== undefined) return result; - } - } - - /** - * Run `fn` for each level - * @private - * @template T - * @param {HookMap>} hookMap HookMap - * @param {string} type type - * @param {AsArray[0]} data data - * @param {(hook: SyncWaterfallHook, data: AsArray[0]) => AsArray[0]} fn function - * @returns {AsArray[0]} result of `fn` - */ - _forEachLevelWaterfall(hookMap, type, data, fn) { - for (const hook of this._getAllLevelHooks(hookMap, type)) { - data = fn(hook, data); - } - return data; - } - - /** - * @param {string} type The type - * @param {Object} object Object to print - * @param {Object=} baseContext The base context - * @returns {string} printed result - */ - print(type, object, baseContext) { - if (this._inPrint) { - return this._print(type, object, baseContext); - } else { - try { - this._inPrint = true; - return this._print(type, object, baseContext); - } finally { - this._levelHookCache.clear(); - this._inPrint = false; - } - } - } - - /** - * @private - * @param {string} type type - * @param {Object} object object - * @param {Object=} baseContext context - * @returns {string} printed result - */ - _print(type, object, baseContext) { - const context = { - ...baseContext, - type, - [type]: object - }; - - let printResult = this._forEachLevel(this.hooks.print, type, hook => - hook.call(object, context) - ); - if (printResult === undefined) { - if (Array.isArray(object)) { - const sortedItems = object.slice(); - this._forEachLevel(this.hooks.sortItems, type, h => - h.call(sortedItems, context) - ); - const printedItems = sortedItems.map((item, i) => { - const itemContext = { - ...context, - _index: i - }; - const itemName = this._forEachLevel( - this.hooks.getItemName, - `${type}[]`, - h => h.call(item, itemContext) - ); - if (itemName) itemContext[itemName] = item; - return this.print( - itemName ? `${type}[].${itemName}` : `${type}[]`, - item, - itemContext - ); - }); - printResult = this._forEachLevel(this.hooks.printItems, type, h => - h.call(printedItems, context) - ); - if (printResult === undefined) { - const result = printedItems.filter(Boolean); - if (result.length > 0) printResult = result.join("\n"); - } - } else if (object !== null && typeof object === "object") { - const elements = Object.keys(object).filter( - key => object[key] !== undefined - ); - this._forEachLevel(this.hooks.sortElements, type, h => - h.call(elements, context) - ); - const printedElements = elements.map(element => { - const content = this.print(`${type}.${element}`, object[element], { - ...context, - _parent: object, - _element: element, - [element]: object[element] - }); - return { element, content }; - }); - printResult = this._forEachLevel(this.hooks.printElements, type, h => - h.call(printedElements, context) - ); - if (printResult === undefined) { - const result = printedElements.map(e => e.content).filter(Boolean); - if (result.length > 0) printResult = result.join("\n"); - } - } - } - - return this._forEachLevelWaterfall( - this.hooks.result, - type, - printResult, - (h, r) => h.call(r, context) - ); - } -} -module.exports = StatsPrinter; - - -/***/ }), - -/***/ 28087: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * Compare two arrays or strings by performing strict equality check for each value. - * @template T [T=any] - * @param {ArrayLike} a Array of values to be compared - * @param {ArrayLike} b Array of values to be compared - * @returns {boolean} returns true if all the elements of passed arrays are strictly equal. - */ - -exports.equals = (a, b) => { - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; - } - return true; -}; - -/** - * Partition an array by calling a predicate function on each value. - * @template T [T=any] - * @param {Array} arr Array of values to be partitioned - * @param {(value: T) => boolean} fn Partition function which partitions based on truthiness of result. - * @returns {[Array, Array]} returns the values of `arr` partitioned into two new arrays based on fn predicate. - */ -exports.groupBy = (arr = [], fn) => { - return arr.reduce( - /** - * @param {[Array, Array]} groups An accumulator storing already partitioned values returned from previous call. - * @param {T} value The value of the current element - * @returns {[Array, Array]} returns an array of partitioned groups accumulator resulting from calling a predicate on the current value. - */ - (groups, value) => { - groups[fn(value) ? 0 : 1].push(value); - return groups; - }, - [[], []] - ); -}; - - -/***/ }), - -/***/ 52074: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template T - */ -class ArrayQueue { - /** - * @param {Iterable=} items The initial elements. - */ - constructor(items) { - /** @private @type {T[]} */ - this._list = items ? Array.from(items) : []; - /** @private @type {T[]} */ - this._listReversed = []; - } - - /** - * Returns the number of elements in this queue. - * @returns {number} The number of elements in this queue. - */ - get length() { - return this._list.length + this._listReversed.length; - } - - /** - * Empties the queue. - */ - clear() { - this._list.length = 0; - this._listReversed.length = 0; - } - - /** - * Appends the specified element to this queue. - * @param {T} item The element to add. - * @returns {void} - */ - enqueue(item) { - this._list.push(item); - } - - /** - * Retrieves and removes the head of this queue. - * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. - */ - dequeue() { - if (this._listReversed.length === 0) { - if (this._list.length === 0) return undefined; - if (this._list.length === 1) return this._list.pop(); - if (this._list.length < 16) return this._list.shift(); - const temp = this._listReversed; - this._listReversed = this._list; - this._listReversed.reverse(); - this._list = temp; - } - return this._listReversed.pop(); - } - - /** - * Finds and removes an item - * @param {T} item the item - * @returns {void} - */ - delete(item) { - const i = this._list.indexOf(item); - if (i >= 0) { - this._list.splice(i, 1); - } else { - const i = this._listReversed.indexOf(item); - if (i >= 0) this._listReversed.splice(i, 1); - } - } - - [Symbol.iterator]() { - let i = -1; - let reversed = false; - return { - next: () => { - if (!reversed) { - i++; - if (i < this._list.length) { - return { - done: false, - value: this._list[i] - }; - } - reversed = true; - i = this._listReversed.length; - } - i--; - if (i < 0) { - return { - done: true, - value: undefined - }; - } - return { - done: false, - value: this._listReversed[i] - }; - } - }; - } -} - -module.exports = ArrayQueue; - - -/***/ }), - -/***/ 51491: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncHook, AsyncSeriesHook } = __webpack_require__(44217); -const { makeWebpackError } = __webpack_require__(35230); -const WebpackError = __webpack_require__(27154); -const ArrayQueue = __webpack_require__(52074); - -const QUEUED_STATE = 0; -const PROCESSING_STATE = 1; -const DONE_STATE = 2; - -let inHandleResult = 0; - -/** - * @template T - * @callback Callback - * @param {(WebpackError | null)=} err - * @param {T=} result - */ - -/** - * @template T - * @template K - * @template R - */ -class AsyncQueueEntry { - /** - * @param {T} item the item - * @param {Callback} callback the callback - */ - constructor(item, callback) { - this.item = item; - /** @type {typeof QUEUED_STATE | typeof PROCESSING_STATE | typeof DONE_STATE} */ - this.state = QUEUED_STATE; - this.callback = callback; - /** @type {Callback[] | undefined} */ - this.callbacks = undefined; - this.result = undefined; - /** @type {WebpackError | undefined} */ - this.error = undefined; - } -} - -/** - * @template T - * @template K - * @template R - */ -class AsyncQueue { - /** - * @param {Object} options options object - * @param {string=} options.name name of the queue - * @param {number=} options.parallelism how many items should be processed at once - * @param {AsyncQueue=} options.parent parent queue, which will have priority over this queue and with shared parallelism - * @param {function(T): K=} options.getKey extract key from item - * @param {function(T, Callback): void} options.processor async function to process items - */ - constructor({ name, parallelism, parent, processor, getKey }) { - this._name = name; - this._parallelism = parallelism || 1; - this._processor = processor; - this._getKey = - getKey || /** @type {(T) => K} */ (item => /** @type {any} */ (item)); - /** @type {Map>} */ - this._entries = new Map(); - /** @type {ArrayQueue>} */ - this._queued = new ArrayQueue(); - /** @type {AsyncQueue[]} */ - this._children = undefined; - this._activeTasks = 0; - this._willEnsureProcessing = false; - this._needProcessing = false; - this._stopped = false; - this._root = parent ? parent._root : this; - if (parent) { - if (this._root._children === undefined) { - this._root._children = [this]; - } else { - this._root._children.push(this); - } - } - - this.hooks = { - /** @type {AsyncSeriesHook<[T]>} */ - beforeAdd: new AsyncSeriesHook(["item"]), - /** @type {SyncHook<[T]>} */ - added: new SyncHook(["item"]), - /** @type {AsyncSeriesHook<[T]>} */ - beforeStart: new AsyncSeriesHook(["item"]), - /** @type {SyncHook<[T]>} */ - started: new SyncHook(["item"]), - /** @type {SyncHook<[T, Error, R]>} */ - result: new SyncHook(["item", "error", "result"]) - }; - - this._ensureProcessing = this._ensureProcessing.bind(this); - } - - /** - * @param {T} item an item - * @param {Callback} callback callback function - * @returns {void} - */ - add(item, callback) { - if (this._stopped) return callback(new WebpackError("Queue was stopped")); - this.hooks.beforeAdd.callAsync(item, err => { - if (err) { - callback( - makeWebpackError(err, `AsyncQueue(${this._name}).hooks.beforeAdd`) - ); - return; - } - const key = this._getKey(item); - const entry = this._entries.get(key); - if (entry !== undefined) { - if (entry.state === DONE_STATE) { - if (inHandleResult++ > 3) { - process.nextTick(() => callback(entry.error, entry.result)); - } else { - callback(entry.error, entry.result); - } - inHandleResult--; - } else if (entry.callbacks === undefined) { - entry.callbacks = [callback]; - } else { - entry.callbacks.push(callback); - } - return; - } - const newEntry = new AsyncQueueEntry(item, callback); - if (this._stopped) { - this.hooks.added.call(item); - this._root._activeTasks++; - process.nextTick(() => - this._handleResult(newEntry, new WebpackError("Queue was stopped")) - ); - } else { - this._entries.set(key, newEntry); - this._queued.enqueue(newEntry); - const root = this._root; - root._needProcessing = true; - if (root._willEnsureProcessing === false) { - root._willEnsureProcessing = true; - setImmediate(root._ensureProcessing); - } - this.hooks.added.call(item); - } - }); - } - - /** - * @param {T} item an item - * @returns {void} - */ - invalidate(item) { - const key = this._getKey(item); - const entry = this._entries.get(key); - this._entries.delete(key); - if (entry.state === QUEUED_STATE) { - this._queued.delete(entry); - } - } - - /** - * Waits for an already started item - * @param {T} item an item - * @param {Callback} callback callback function - * @returns {void} - */ - waitFor(item, callback) { - const key = this._getKey(item); - const entry = this._entries.get(key); - if (entry === undefined) { - return callback( - new WebpackError( - "waitFor can only be called for an already started item" - ) - ); - } - if (entry.state === DONE_STATE) { - process.nextTick(() => callback(entry.error, entry.result)); - } else if (entry.callbacks === undefined) { - entry.callbacks = [callback]; - } else { - entry.callbacks.push(callback); - } - } - - /** - * @returns {void} - */ - stop() { - this._stopped = true; - const queue = this._queued; - this._queued = new ArrayQueue(); - const root = this._root; - for (const entry of queue) { - this._entries.delete(this._getKey(entry.item)); - root._activeTasks++; - this._handleResult(entry, new WebpackError("Queue was stopped")); - } - } - - /** - * @returns {void} - */ - increaseParallelism() { - const root = this._root; - root._parallelism++; - /* istanbul ignore next */ - if (root._willEnsureProcessing === false && root._needProcessing) { - root._willEnsureProcessing = true; - setImmediate(root._ensureProcessing); - } - } - - /** - * @returns {void} - */ - decreaseParallelism() { - const root = this._root; - root._parallelism--; - } - - /** - * @param {T} item an item - * @returns {boolean} true, if the item is currently being processed - */ - isProcessing(item) { - const key = this._getKey(item); - const entry = this._entries.get(key); - return entry !== undefined && entry.state === PROCESSING_STATE; - } - - /** - * @param {T} item an item - * @returns {boolean} true, if the item is currently queued - */ - isQueued(item) { - const key = this._getKey(item); - const entry = this._entries.get(key); - return entry !== undefined && entry.state === QUEUED_STATE; - } - - /** - * @param {T} item an item - * @returns {boolean} true, if the item is currently queued - */ - isDone(item) { - const key = this._getKey(item); - const entry = this._entries.get(key); - return entry !== undefined && entry.state === DONE_STATE; - } - - /** - * @returns {void} - */ - _ensureProcessing() { - while (this._activeTasks < this._parallelism) { - const entry = this._queued.dequeue(); - if (entry === undefined) break; - this._activeTasks++; - entry.state = PROCESSING_STATE; - this._startProcessing(entry); - } - this._willEnsureProcessing = false; - if (this._queued.length > 0) return; - if (this._children !== undefined) { - for (const child of this._children) { - while (this._activeTasks < this._parallelism) { - const entry = child._queued.dequeue(); - if (entry === undefined) break; - this._activeTasks++; - entry.state = PROCESSING_STATE; - child._startProcessing(entry); - } - if (child._queued.length > 0) return; - } - } - if (!this._willEnsureProcessing) this._needProcessing = false; - } - - /** - * @param {AsyncQueueEntry} entry the entry - * @returns {void} - */ - _startProcessing(entry) { - this.hooks.beforeStart.callAsync(entry.item, err => { - if (err) { - this._handleResult( - entry, - makeWebpackError(err, `AsyncQueue(${this._name}).hooks.beforeStart`) - ); - return; - } - let inCallback = false; - try { - this._processor(entry.item, (e, r) => { - inCallback = true; - this._handleResult(entry, e, r); - }); - } catch (err) { - if (inCallback) throw err; - this._handleResult(entry, err, null); - } - this.hooks.started.call(entry.item); - }); - } - - /** - * @param {AsyncQueueEntry} entry the entry - * @param {WebpackError=} err error, if any - * @param {R=} result result, if any - * @returns {void} - */ - _handleResult(entry, err, result) { - this.hooks.result.callAsync(entry.item, err, result, hookError => { - const error = hookError - ? makeWebpackError(hookError, `AsyncQueue(${this._name}).hooks.result`) - : err; - - const callback = entry.callback; - const callbacks = entry.callbacks; - entry.state = DONE_STATE; - entry.callback = undefined; - entry.callbacks = undefined; - entry.result = result; - entry.error = error; - - const root = this._root; - root._activeTasks--; - if (root._willEnsureProcessing === false && root._needProcessing) { - root._willEnsureProcessing = true; - setImmediate(root._ensureProcessing); - } - - if (inHandleResult++ > 3) { - process.nextTick(() => { - callback(error, result); - if (callbacks !== undefined) { - for (const callback of callbacks) { - callback(error, result); - } - } - }); - } else { - callback(error, result); - if (callbacks !== undefined) { - for (const callback of callbacks) { - callback(error, result); - } - } - } - inHandleResult--; - }); - } - - clear() { - this._entries.clear(); - this._queued.clear(); - this._activeTasks = 0; - this._willEnsureProcessing = false; - this._needProcessing = false; - this._stopped = false; - } -} - -module.exports = AsyncQueue; - - -/***/ }), - -/***/ 14577: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -class Hash { - /* istanbul ignore next */ - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @abstract - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } - - /* istanbul ignore next */ - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @abstract - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - const AbstractMethodError = __webpack_require__(73846); - throw new AbstractMethodError(); - } -} - -module.exports = Hash; - - -/***/ }), - -/***/ 30922: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template T - * @param {Iterable} set a set - * @returns {T | undefined} last item - */ -const last = set => { - let last; - for (const item of set) last = item; - return last; -}; - -/** - * @template T - * @param {Iterable} iterable iterable - * @param {function(T): boolean} filter predicate - * @returns {boolean} true, if some items match the filter predicate - */ -const someInIterable = (iterable, filter) => { - for (const item of iterable) { - if (filter(item)) return true; - } - return false; -}; - -/** - * @template T - * @param {Iterable} iterable an iterable - * @returns {number} count of items - */ -const countIterable = iterable => { - let i = 0; - // eslint-disable-next-line no-unused-vars - for (const _ of iterable) i++; - return i; -}; - -exports.last = last; -exports.someInIterable = someInIterable; -exports.countIterable = countIterable; - - -/***/ }), - -/***/ 57126: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { first } = __webpack_require__(73268); -const SortableSet = __webpack_require__(87122); - -/** - * Multi layer bucket sorted set: - * Supports adding non-existing items (DO NOT ADD ITEM TWICE), - * Supports removing exiting items (DO NOT REMOVE ITEM NOT IN SET), - * Supports popping the first items according to defined order, - * Supports iterating all items without order, - * Supports updating an item in an efficient way, - * Supports size property, which is the number of items, - * Items are lazy partially sorted when needed - * @template T - * @template K - */ -class LazyBucketSortedSet { - /** - * @param {function(T): K} getKey function to get key from item - * @param {function(K, K): number} comparator comparator to sort keys - * @param {...((function(T): any) | (function(any, any): number))} args more pairs of getKey and comparator plus optional final comparator for the last layer - */ - constructor(getKey, comparator, ...args) { - this._getKey = getKey; - this._innerArgs = args; - this._leaf = args.length <= 1; - this._keys = new SortableSet(undefined, comparator); - /** @type {Map | SortableSet>} */ - this._map = new Map(); - this._unsortedItems = new Set(); - this.size = 0; - } - - /** - * @param {T} item an item - * @returns {void} - */ - add(item) { - this.size++; - this._unsortedItems.add(item); - } - - /** - * @param {K} key key of item - * @param {T} item the item - * @returns {void} - */ - _addInternal(key, item) { - let entry = this._map.get(key); - if (entry === undefined) { - entry = this._leaf - ? new SortableSet(undefined, this._innerArgs[0]) - : new /** @type {any} */ (LazyBucketSortedSet)(...this._innerArgs); - this._keys.add(key); - this._map.set(key, entry); - } - entry.add(item); - } - - /** - * @param {T} item an item - * @returns {void} - */ - delete(item) { - this.size--; - if (this._unsortedItems.has(item)) { - this._unsortedItems.delete(item); - return; - } - const key = this._getKey(item); - const entry = this._map.get(key); - entry.delete(item); - if (entry.size === 0) { - this._deleteKey(key); - } - } - - /** - * @param {K} key key to be removed - * @returns {void} - */ - _deleteKey(key) { - this._keys.delete(key); - this._map.delete(key); - } - - /** - * @returns {T | undefined} an item - */ - popFirst() { - if (this.size === 0) return undefined; - this.size--; - if (this._unsortedItems.size > 0) { - for (const item of this._unsortedItems) { - const key = this._getKey(item); - this._addInternal(key, item); - } - this._unsortedItems.clear(); - } - this._keys.sort(); - const key = first(this._keys); - const entry = this._map.get(key); - if (this._leaf) { - const leafEntry = /** @type {SortableSet} */ (entry); - leafEntry.sort(); - const item = first(leafEntry); - leafEntry.delete(item); - if (leafEntry.size === 0) { - this._deleteKey(key); - } - return item; - } else { - const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); - const item = nodeEntry.popFirst(); - if (nodeEntry.size === 0) { - this._deleteKey(key); - } - return item; - } - } - - /** - * @param {T} item to be updated item - * @returns {function(true=): void} finish update - */ - startUpdate(item) { - if (this._unsortedItems.has(item)) { - return remove => { - if (remove) { - this._unsortedItems.delete(item); - this.size--; - return; - } - }; - } - const key = this._getKey(item); - if (this._leaf) { - const oldEntry = /** @type {SortableSet} */ (this._map.get(key)); - return remove => { - if (remove) { - this.size--; - oldEntry.delete(item); - if (oldEntry.size === 0) { - this._deleteKey(key); - } - return; - } - const newKey = this._getKey(item); - if (key === newKey) { - // This flags the sortable set as unordered - oldEntry.add(item); - } else { - oldEntry.delete(item); - if (oldEntry.size === 0) { - this._deleteKey(key); - } - this._addInternal(newKey, item); - } - }; - } else { - const oldEntry = /** @type {LazyBucketSortedSet} */ ( - this._map.get(key) - ); - const finishUpdate = oldEntry.startUpdate(item); - return remove => { - if (remove) { - this.size--; - finishUpdate(true); - if (oldEntry.size === 0) { - this._deleteKey(key); - } - return; - } - const newKey = this._getKey(item); - if (key === newKey) { - finishUpdate(); - } else { - finishUpdate(true); - if (oldEntry.size === 0) { - this._deleteKey(key); - } - this._addInternal(newKey, item); - } - }; - } - } - - /** - * @param {Iterator[]} iterators list of iterators to append to - * @returns {void} - */ - _appendIterators(iterators) { - if (this._unsortedItems.size > 0) - iterators.push(this._unsortedItems[Symbol.iterator]()); - for (const key of this._keys) { - const entry = this._map.get(key); - if (this._leaf) { - const leafEntry = /** @type {SortableSet} */ (entry); - const iterator = leafEntry[Symbol.iterator](); - iterators.push(iterator); - } else { - const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); - nodeEntry._appendIterators(iterators); - } - } - } - - /** - * @returns {Iterator} the iterator - */ - [Symbol.iterator]() { - const iterators = []; - this._appendIterators(iterators); - iterators.reverse(); - let currentIterator = iterators.pop(); - return { - next: () => { - const res = currentIterator.next(); - if (res.done) { - if (iterators.length === 0) return res; - currentIterator = iterators.pop(); - return currentIterator.next(); - } - return res; - } - }; - } -} - -module.exports = LazyBucketSortedSet; - - -/***/ }), - -/***/ 96522: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const makeSerializable = __webpack_require__(65764); - -/** - * @template T - * @param {Set} targetSet set where items should be added - * @param {Set>} toMerge iterables to be merged - * @returns {void} - */ -const merge = (targetSet, toMerge) => { - for (const set of toMerge) { - for (const item of set) { - targetSet.add(item); - } - } -}; - -/** - * @template T - * @param {Set>} targetSet set where iterables should be added - * @param {Array>} toDeepMerge lazy sets to be flattened - * @returns {void} - */ -const flatten = (targetSet, toDeepMerge) => { - for (const set of toDeepMerge) { - if (set._set.size > 0) targetSet.add(set._set); - if (set._needMerge) { - for (const mergedSet of set._toMerge) { - targetSet.add(mergedSet); - } - flatten(targetSet, set._toDeepMerge); - } - } -}; - -/** - * Like Set but with an addAll method to eventually add items from another iterable. - * Access methods make sure that all delayed operations are executed. - * Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration). - * @template T - */ -class LazySet { - /** - * @param {Iterable=} iterable init iterable - */ - constructor(iterable) { - /** @type {Set} */ - this._set = new Set(iterable); - /** @type {Set>} */ - this._toMerge = new Set(); - /** @type {Array>} */ - this._toDeepMerge = []; - this._needMerge = false; - this._deopt = false; - } - - _flatten() { - flatten(this._toMerge, this._toDeepMerge); - this._toDeepMerge.length = 0; - } - - _merge() { - this._flatten(); - merge(this._set, this._toMerge); - this._toMerge.clear(); - this._needMerge = false; - } - - _isEmpty() { - return ( - this._set.size === 0 && - this._toMerge.size === 0 && - this._toDeepMerge.length === 0 - ); - } - - get size() { - if (this._needMerge) this._merge(); - return this._set.size; - } - - /** - * @param {T} item an item - * @returns {this} itself - */ - add(item) { - this._set.add(item); - return this; - } - - /** - * @param {Iterable | LazySet} iterable a immutable iterable or another immutable LazySet which will eventually be merged into the Set - * @returns {this} itself - */ - addAll(iterable) { - if (this._deopt) { - const _set = this._set; - for (const item of iterable) { - _set.add(item); - } - } else { - if (iterable instanceof LazySet) { - if (iterable._isEmpty()) return this; - this._toDeepMerge.push(iterable); - this._needMerge = true; - if (this._toDeepMerge.length > 100000) { - this._flatten(); - } - } else { - this._toMerge.add(iterable); - this._needMerge = true; - } - if (this._toMerge.size > 100000) this._merge(); - } - return this; - } - - clear() { - this._set.clear(); - this._toMerge.clear(); - this._toDeepMerge.length = 0; - this._needMerge = false; - this._deopt = false; - } - - /** - * @param {T} value an item - * @returns {boolean} true, if the value was in the Set before - */ - delete(value) { - if (this._needMerge) this._merge(); - return this._set.delete(value); - } - - entries() { - this._deopt = true; - if (this._needMerge) this._merge(); - return this._set.entries(); - } - - /** - * @param {function(T, T, Set): void} callbackFn function called for each entry - * @param {any} thisArg this argument for the callbackFn - * @returns {void} - */ - forEach(callbackFn, thisArg) { - this._deopt = true; - if (this._needMerge) this._merge(); - this._set.forEach(callbackFn, thisArg); - } - - /** - * @param {T} item an item - * @returns {boolean} true, when the item is in the Set - */ - has(item) { - if (this._needMerge) this._merge(); - return this._set.has(item); - } - - keys() { - this._deopt = true; - if (this._needMerge) this._merge(); - return this._set.keys(); - } - - values() { - this._deopt = true; - if (this._needMerge) this._merge(); - return this._set.values(); - } - - [Symbol.iterator]() { - this._deopt = true; - if (this._needMerge) this._merge(); - return this._set[Symbol.iterator](); - } - - /* istanbul ignore next */ - get [Symbol.toStringTag]() { - return "LazySet"; - } - - serialize({ write }) { - if (this._needMerge) this._merge(); - write(this._set.size); - for (const item of this._set) write(item); - } - - static deserialize({ read }) { - const count = read(); - const items = []; - for (let i = 0; i < count; i++) { - items.push(read()); - } - return new LazySet(items); - } -} - -makeSerializable(LazySet, "webpack/lib/util/LazySet"); - -module.exports = LazySet; - - -/***/ }), - -/***/ 94970: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template K - * @template V - * @param {Map} map a map - * @param {K} key the key - * @param {function(): V} computer compute value - * @returns {V} value - */ -exports.provide = (map, key, computer) => { - const value = map.get(key); - if (value !== undefined) return value; - const newValue = computer(); - map.set(key, newValue); - return newValue; -}; - - -/***/ }), - -/***/ 15924: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const binarySearchBounds = __webpack_require__(12076); - -class ParallelismFactorCalculator { - constructor() { - this._rangePoints = []; - this._rangeCallbacks = []; - } - - range(start, end, callback) { - if (start === end) return callback(1); - this._rangePoints.push(start); - this._rangePoints.push(end); - this._rangeCallbacks.push(callback); - } - - calculate() { - const segments = Array.from(new Set(this._rangePoints)).sort((a, b) => - a < b ? -1 : 1 - ); - const parallelism = segments.map(() => 0); - const rangeStartIndices = []; - for (let i = 0; i < this._rangePoints.length; i += 2) { - const start = this._rangePoints[i]; - const end = this._rangePoints[i + 1]; - let idx = binarySearchBounds.eq(segments, start); - rangeStartIndices.push(idx); - do { - parallelism[idx]++; - idx++; - } while (segments[idx] < end); - } - for (let i = 0; i < this._rangeCallbacks.length; i++) { - const start = this._rangePoints[i * 2]; - const end = this._rangePoints[i * 2 + 1]; - let idx = rangeStartIndices[i]; - let sum = 0; - let totalDuration = 0; - let current = start; - do { - const p = parallelism[idx]; - idx++; - const duration = segments[idx] - current; - totalDuration += duration; - current = segments[idx]; - sum += p * duration; - } while (current < end); - this._rangeCallbacks[i](sum / totalDuration); - } - } -} - -module.exports = ParallelismFactorCalculator; - - -/***/ }), - -/***/ 83690: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template T - */ -class Queue { - /** - * @param {Iterable=} items The initial elements. - */ - constructor(items) { - /** @private @type {Set} */ - this._set = new Set(items); - /** @private @type {Iterator} */ - this._iterator = this._set[Symbol.iterator](); - } - - /** - * Returns the number of elements in this queue. - * @returns {number} The number of elements in this queue. - */ - get length() { - return this._set.size; - } - - /** - * Appends the specified element to this queue. - * @param {T} item The element to add. - * @returns {void} - */ - enqueue(item) { - this._set.add(item); - } - - /** - * Retrieves and removes the head of this queue. - * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. - */ - dequeue() { - const result = this._iterator.next(); - if (result.done) return undefined; - this._set.delete(result.value); - return result.value; - } -} - -module.exports = Queue; - - -/***/ }), - -/***/ 73268: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * intersect creates Set containing the intersection of elements between all sets - * @template T - * @param {Set[]} sets an array of sets being checked for shared elements - * @returns {Set} returns a new Set containing the intersecting items - */ -const intersect = sets => { - if (sets.length === 0) return new Set(); - if (sets.length === 1) return new Set(sets[0]); - let minSize = Infinity; - let minIndex = -1; - for (let i = 0; i < sets.length; i++) { - const size = sets[i].size; - if (size < minSize) { - minIndex = i; - minSize = size; - } - } - const current = new Set(sets[minIndex]); - for (let i = 0; i < sets.length; i++) { - if (i === minIndex) continue; - const set = sets[i]; - for (const item of current) { - if (!set.has(item)) { - current.delete(item); - } - } - } - return current; -}; - -/** - * Checks if a set is the subset of another set - * @template T - * @param {Set} bigSet a Set which contains the original elements to compare against - * @param {Set} smallSet the set whose elements might be contained inside of bigSet - * @returns {boolean} returns true if smallSet contains all elements inside of the bigSet - */ -const isSubset = (bigSet, smallSet) => { - if (bigSet.size < smallSet.size) return false; - for (const item of smallSet) { - if (!bigSet.has(item)) return false; - } - return true; -}; - -/** - * @template T - * @param {Set} set a set - * @param {function(T): boolean} fn selector function - * @returns {T | undefined} found item - */ -const find = (set, fn) => { - for (const item of set) { - if (fn(item)) return item; - } -}; - -/** - * @template T - * @param {Set} set a set - * @returns {T | undefined} first item - */ -const first = set => { - const entry = set.values().next(); - return entry.done ? undefined : entry.value; -}; - -/** - * @template T - * @param {Set} a first - * @param {Set} b second - * @returns {Set} combined set, may be identical to a or b - */ -const combine = (a, b) => { - if (b.size === 0) return a; - if (a.size === 0) return b; - const set = new Set(a); - for (const item of b) set.add(item); - return set; -}; - -exports.intersect = intersect; -exports.isSubset = isSubset; -exports.find = find; -exports.first = first; -exports.combine = combine; - - -/***/ }), - -/***/ 87122: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NONE = Symbol("not sorted"); - -/** - * A subset of Set that offers sorting functionality - * @template T item type in set - * @extends {Set} - */ -class SortableSet extends Set { - /** - * Create a new sortable set - * @param {Iterable=} initialIterable The initial iterable value - * @typedef {function(T, T): number} SortFunction - * @param {SortFunction=} defaultSort Default sorting function - */ - constructor(initialIterable, defaultSort) { - super(initialIterable); - /** @private @type {undefined | function(T, T): number}} */ - this._sortFn = defaultSort; - /** @private @type {typeof NONE | undefined | function(T, T): number}} */ - this._lastActiveSortFn = NONE; - /** @private @type {Map | undefined} */ - this._cache = undefined; - /** @private @type {Map | undefined} */ - this._cacheOrderIndependent = undefined; - } - - /** - * @param {T} value value to add to set - * @returns {this} returns itself - */ - add(value) { - this._lastActiveSortFn = NONE; - this._invalidateCache(); - this._invalidateOrderedCache(); - super.add(value); - return this; - } - - /** - * @param {T} value value to delete - * @returns {boolean} true if value existed in set, false otherwise - */ - delete(value) { - this._invalidateCache(); - this._invalidateOrderedCache(); - return super.delete(value); - } - - /** - * @returns {void} - */ - clear() { - this._invalidateCache(); - this._invalidateOrderedCache(); - return super.clear(); - } - - /** - * Sort with a comparer function - * @param {SortFunction} sortFn Sorting comparer function - * @returns {void} - */ - sortWith(sortFn) { - if (this.size <= 1 || sortFn === this._lastActiveSortFn) { - // already sorted - nothing to do - return; - } - - const sortedArray = Array.from(this).sort(sortFn); - super.clear(); - for (let i = 0; i < sortedArray.length; i += 1) { - super.add(sortedArray[i]); - } - this._lastActiveSortFn = sortFn; - this._invalidateCache(); - } - - sort() { - this.sortWith(this._sortFn); - return this; - } - - /** - * Get data from cache - * @template R - * @param {function(SortableSet): R} fn function to calculate value - * @returns {R} returns result of fn(this), cached until set changes - */ - getFromCache(fn) { - if (this._cache === undefined) { - this._cache = new Map(); - } else { - const result = this._cache.get(fn); - const data = /** @type {R} */ (result); - if (data !== undefined) { - return data; - } - } - const newData = fn(this); - this._cache.set(fn, newData); - return newData; - } - - /** - * Get data from cache (ignoring sorting) - * @template R - * @param {function(SortableSet): R} fn function to calculate value - * @returns {R} returns result of fn(this), cached until set changes - */ - getFromUnorderedCache(fn) { - if (this._cacheOrderIndependent === undefined) { - this._cacheOrderIndependent = new Map(); - } else { - const result = this._cacheOrderIndependent.get(fn); - const data = /** @type {R} */ (result); - if (data !== undefined) { - return data; - } - } - const newData = fn(this); - this._cacheOrderIndependent.set(fn, newData); - return newData; - } - - /** - * @private - * @returns {void} - */ - _invalidateCache() { - if (this._cache !== undefined) { - this._cache.clear(); - } - } - - /** - * @private - * @returns {void} - */ - _invalidateOrderedCache() { - if (this._cacheOrderIndependent !== undefined) { - this._cacheOrderIndependent.clear(); - } - } - - /** - * @returns {T[]} the raw array - */ - toJSON() { - return Array.from(this); - } -} - -module.exports = SortableSet; - - -/***/ }), - -/***/ 91047: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template K - * @template V - */ -class StackedCacheMap { - constructor() { - /** @type {Map} */ - this.map = new Map(); - /** @type {ReadonlyMap[]} */ - this.stack = []; - } - - /** - * @param {ReadonlyMap} map map to add - * @param {boolean} immutable if 'map' is immutable and StackedCacheMap can keep referencing it - */ - addAll(map, immutable) { - if (immutable) { - this.stack.push(map); - - // largest map should go first - for (let i = this.stack.length - 1; i > 0; i--) { - const beforeLast = this.stack[i - 1]; - if (beforeLast.size >= map.size) break; - this.stack[i] = beforeLast; - this.stack[i - 1] = map; - } - } else { - for (const [key, value] of map) { - this.map.set(key, value); - } - } - } - - /** - * @param {K} item the key of the element to add - * @param {V} value the value of the element to add - * @returns {void} - */ - set(item, value) { - this.map.set(item, value); - } - - /** - * @param {K} item the item to delete - * @returns {void} - */ - delete(item) { - throw new Error("Items can't be deleted from a StackedCacheMap"); - } - - /** - * @param {K} item the item to test - * @returns {boolean} true if the item exists in this set - */ - has(item) { - throw new Error( - "Checking StackedCacheMap.has before reading is inefficient, use StackedCacheMap.get and check for undefined" - ); - } - - /** - * @param {K} item the key of the element to return - * @returns {V} the value of the element - */ - get(item) { - for (const map of this.stack) { - const value = map.get(item); - if (value !== undefined) return value; - } - return this.map.get(item); - } - - clear() { - this.stack.length = 0; - this.map.clear(); - } - - get size() { - let size = this.map.size; - for (const map of this.stack) { - size += map.size; - } - return size; - } - - [Symbol.iterator]() { - const iterators = this.stack.map(map => map[Symbol.iterator]()); - let current = this.map[Symbol.iterator](); - return { - next() { - let result = current.next(); - while (result.done && iterators.length > 0) { - current = iterators.pop(); - result = current.next(); - } - return result; - } - }; - } -} - -module.exports = StackedCacheMap; - - -/***/ }), - -/***/ 53214: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const TOMBSTONE = Symbol("tombstone"); -const UNDEFINED_MARKER = Symbol("undefined"); - -/** - * @template T - * @typedef {T | undefined} Cell - */ - -/** - * @template T - * @typedef {T | typeof TOMBSTONE | typeof UNDEFINED_MARKER} InternalCell - */ - -/** - * @template K - * @template V - * @param {[K, InternalCell]} pair the internal cell - * @returns {[K, Cell]} its “safe” representation - */ -const extractPair = pair => { - const key = pair[0]; - const val = pair[1]; - if (val === UNDEFINED_MARKER || val === TOMBSTONE) { - return [key, undefined]; - } else { - return /** @type {[K, Cell]} */ (pair); - } -}; - -/** - * @template K - * @template V - */ -class StackedMap { - /** - * @param {Map>[]=} parentStack an optional parent - */ - constructor(parentStack) { - /** @type {Map>} */ - this.map = new Map(); - /** @type {Map>[]} */ - this.stack = parentStack === undefined ? [] : parentStack.slice(); - this.stack.push(this.map); - } - - /** - * @param {K} item the key of the element to add - * @param {V} value the value of the element to add - * @returns {void} - */ - set(item, value) { - this.map.set(item, value === undefined ? UNDEFINED_MARKER : value); - } - - /** - * @param {K} item the item to delete - * @returns {void} - */ - delete(item) { - if (this.stack.length > 1) { - this.map.set(item, TOMBSTONE); - } else { - this.map.delete(item); - } - } - - /** - * @param {K} item the item to test - * @returns {boolean} true if the item exists in this set - */ - has(item) { - const topValue = this.map.get(item); - if (topValue !== undefined) { - return topValue !== TOMBSTONE; - } - if (this.stack.length > 1) { - for (let i = this.stack.length - 2; i >= 0; i--) { - const value = this.stack[i].get(item); - if (value !== undefined) { - this.map.set(item, value); - return value !== TOMBSTONE; - } - } - this.map.set(item, TOMBSTONE); - } - return false; - } - - /** - * @param {K} item the key of the element to return - * @returns {Cell} the value of the element - */ - get(item) { - const topValue = this.map.get(item); - if (topValue !== undefined) { - return topValue === TOMBSTONE || topValue === UNDEFINED_MARKER - ? undefined - : topValue; - } - if (this.stack.length > 1) { - for (let i = this.stack.length - 2; i >= 0; i--) { - const value = this.stack[i].get(item); - if (value !== undefined) { - this.map.set(item, value); - return value === TOMBSTONE || value === UNDEFINED_MARKER - ? undefined - : value; - } - } - this.map.set(item, TOMBSTONE); - } - return undefined; - } - - _compress() { - if (this.stack.length === 1) return; - this.map = new Map(); - for (const data of this.stack) { - for (const pair of data) { - if (pair[1] === TOMBSTONE) { - this.map.delete(pair[0]); - } else { - this.map.set(pair[0], pair[1]); - } - } - } - this.stack = [this.map]; - } - - asArray() { - this._compress(); - return Array.from(this.map.keys()); - } - - asSet() { - this._compress(); - return new Set(this.map.keys()); - } - - asPairArray() { - this._compress(); - return Array.from(this.map.entries(), extractPair); - } - - asMap() { - return new Map(this.asPairArray()); - } - - get size() { - this._compress(); - return this.map.size; - } - - createChild() { - return new StackedMap(this.stack); - } -} - -module.exports = StackedMap; - - -/***/ }), - -/***/ 8382: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -class StringXor { - constructor() { - this._value = undefined; - } - - /** - * @param {string} str string - * @returns {void} - */ - add(str) { - const len = str.length; - const value = this._value; - if (value === undefined) { - const newValue = (this._value = Buffer.allocUnsafe(len)); - for (let i = 0; i < len; i++) { - newValue[i] = str.charCodeAt(i); - } - return; - } - const valueLen = value.length; - if (valueLen < len) { - const newValue = (this._value = Buffer.allocUnsafe(len)); - let i; - for (i = 0; i < valueLen; i++) { - newValue[i] = value[i] ^ str.charCodeAt(i); - } - for (; i < len; i++) { - newValue[i] = str.charCodeAt(i); - } - } else { - for (let i = 0; i < len; i++) { - value[i] = value[i] ^ str.charCodeAt(i); - } - } - } - - toString() { - const value = this._value; - return value === undefined ? "" : value.toString("latin1"); - } - - updateHash(hash) { - const value = this._value; - if (value !== undefined) hash.update(value); - } -} - -module.exports = StringXor; - - -/***/ }), - -/***/ 22796: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const TupleSet = __webpack_require__(12178); - -/** - * @template {any[]} T - */ -class TupleQueue { - /** - * @param {Iterable=} items The initial elements. - */ - constructor(items) { - /** @private @type {TupleSet} */ - this._set = new TupleSet(items); - /** @private @type {Iterator} */ - this._iterator = this._set[Symbol.iterator](); - } - - /** - * Returns the number of elements in this queue. - * @returns {number} The number of elements in this queue. - */ - get length() { - return this._set.size; - } - - /** - * Appends the specified element to this queue. - * @param {T} item The element to add. - * @returns {void} - */ - enqueue(...item) { - this._set.add(...item); - } - - /** - * Retrieves and removes the head of this queue. - * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. - */ - dequeue() { - const result = this._iterator.next(); - if (result.done) { - if (this._set.size > 0) { - this._iterator = this._set[Symbol.iterator](); - const value = this._iterator.next().value; - this._set.delete(...value); - return value; - } - return undefined; - } - this._set.delete(...result.value); - return result.value; - } -} - -module.exports = TupleQueue; - - -/***/ }), - -/***/ 12178: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template {any[]} T - */ -class TupleSet { - constructor(init) { - this._map = new Map(); - this.size = 0; - if (init) { - for (const tuple of init) { - this.add(...tuple); - } - } - } - - /** - * @param {T} args tuple - * @returns {void} - */ - add(...args) { - let map = this._map; - for (let i = 0; i < args.length - 2; i++) { - const arg = args[i]; - const innerMap = map.get(arg); - if (innerMap === undefined) { - map.set(arg, (map = new Map())); - } else { - map = innerMap; - } - } - - const beforeLast = args[args.length - 2]; - let set = map.get(beforeLast); - if (set === undefined) { - map.set(beforeLast, (set = new Set())); - } - - const last = args[args.length - 1]; - this.size -= set.size; - set.add(last); - this.size += set.size; - } - - /** - * @param {T} args tuple - * @returns {boolean} true, if the tuple is in the Set - */ - has(...args) { - let map = this._map; - for (let i = 0; i < args.length - 2; i++) { - const arg = args[i]; - map = map.get(arg); - if (map === undefined) { - return false; - } - } - - const beforeLast = args[args.length - 2]; - let set = map.get(beforeLast); - if (set === undefined) { - return false; - } - - const last = args[args.length - 1]; - return set.has(last); - } - - /** - * @param {T} args tuple - * @returns {void} - */ - delete(...args) { - let map = this._map; - for (let i = 0; i < args.length - 2; i++) { - const arg = args[i]; - map = map.get(arg); - if (map === undefined) { - return; - } - } - - const beforeLast = args[args.length - 2]; - let set = map.get(beforeLast); - if (set === undefined) { - return; - } - - const last = args[args.length - 1]; - this.size -= set.size; - set.delete(last); - this.size += set.size; - } - - /** - * @returns {Iterator} iterator - */ - [Symbol.iterator]() { - const iteratorStack = []; - const tuple = []; - let currentSetIterator = undefined; - - const next = it => { - const result = it.next(); - if (result.done) { - if (iteratorStack.length === 0) return false; - tuple.pop(); - return next(iteratorStack.pop()); - } - const [key, value] = result.value; - iteratorStack.push(it); - tuple.push(key); - if (value instanceof Set) { - currentSetIterator = value[Symbol.iterator](); - return true; - } else { - return next(value[Symbol.iterator]()); - } - }; - - next(this._map[Symbol.iterator]()); - - return { - next() { - while (currentSetIterator) { - const result = currentSetIterator.next(); - if (result.done) { - tuple.pop(); - if (!next(iteratorStack.pop())) { - currentSetIterator = undefined; - } - } else { - return { - done: false, - value: /** @type {T} */ (tuple.concat(result.value)) - }; - } - } - return { done: true, value: undefined }; - } - }; - } -} - -module.exports = TupleSet; - - -/***/ }), - -/***/ 99716: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -/** @typedef {import("./fs").InputFileSystem} InputFileSystem */ -/** @typedef {(error: Error|null, result?: Buffer) => void} ErrorFirstCallback */ - -const backSlashCharCode = "\\".charCodeAt(0); -const slashCharCode = "/".charCodeAt(0); -const aLowerCaseCharCode = "a".charCodeAt(0); -const zLowerCaseCharCode = "z".charCodeAt(0); -const aUpperCaseCharCode = "A".charCodeAt(0); -const zUpperCaseCharCode = "Z".charCodeAt(0); -const _0CharCode = "0".charCodeAt(0); -const _9CharCode = "9".charCodeAt(0); -const plusCharCode = "+".charCodeAt(0); -const hyphenCharCode = "-".charCodeAt(0); -const colonCharCode = ":".charCodeAt(0); -const hashCharCode = "#".charCodeAt(0); -const queryCharCode = "?".charCodeAt(0); -/** - * Get scheme if specifier is an absolute URL specifier - * e.g. Absolute specifiers like 'file:///user/webpack/index.js' - * https://tools.ietf.org/html/rfc3986#section-3.1 - * @param {string} specifier specifier - * @returns {string|undefined} scheme if absolute URL specifier provided - */ -function getScheme(specifier) { - const start = specifier.charCodeAt(0); - - // First char maybe only a letter - if ( - (start < aLowerCaseCharCode || start > zLowerCaseCharCode) && - (start < aUpperCaseCharCode || start > zUpperCaseCharCode) - ) { - return undefined; - } - - let i = 1; - let ch = specifier.charCodeAt(i); - - while ( - (ch >= aLowerCaseCharCode && ch <= zLowerCaseCharCode) || - (ch >= aUpperCaseCharCode && ch <= zUpperCaseCharCode) || - (ch >= _0CharCode && ch <= _9CharCode) || - ch === plusCharCode || - ch === hyphenCharCode - ) { - if (++i === specifier.length) return undefined; - ch = specifier.charCodeAt(i); - } - - // Scheme must end with colon - if (ch !== colonCharCode) return undefined; - - // Check for Windows absolute path - // https://url.spec.whatwg.org/#url-miscellaneous - if (i === 1) { - const nextChar = i + 1 < specifier.length ? specifier.charCodeAt(i + 1) : 0; - if ( - nextChar === 0 || - nextChar === backSlashCharCode || - nextChar === slashCharCode || - nextChar === hashCharCode || - nextChar === queryCharCode - ) { - return undefined; - } - } - - return specifier.slice(0, i).toLowerCase(); -} - -/** - * @param {string} specifier specifier - * @returns {string|null} protocol if absolute URL specifier provided - */ -function getProtocol(specifier) { - const scheme = getScheme(specifier); - return scheme === undefined ? undefined : scheme + ":"; -} - -exports.getScheme = getScheme; -exports.getProtocol = getProtocol; - - -/***/ }), - -/***/ 20427: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const isWeakKey = thing => typeof thing === "object" && thing !== null; - -/** - * @template {any[]} T - * @template V - */ -class WeakTupleMap { - constructor() { - /** @private */ - this.f = 0; - /** @private @type {any} */ - this.v = undefined; - /** @private @type {Map> | undefined} */ - this.m = undefined; - /** @private @type {WeakMap> | undefined} */ - this.w = undefined; - } - - /** - * @param {[...T, V]} args tuple - * @returns {void} - */ - set(...args) { - /** @type {WeakTupleMap} */ - let node = this; - for (let i = 0; i < args.length - 1; i++) { - node = node._get(args[i]); - } - node._setValue(args[args.length - 1]); - } - - /** - * @param {T} args tuple - * @returns {boolean} true, if the tuple is in the Set - */ - has(...args) { - /** @type {WeakTupleMap} */ - let node = this; - for (let i = 0; i < args.length; i++) { - node = node._peek(args[i]); - if (node === undefined) return false; - } - return node._hasValue(); - } - - /** - * @param {T} args tuple - * @returns {V} the value - */ - get(...args) { - /** @type {WeakTupleMap} */ - let node = this; - for (let i = 0; i < args.length; i++) { - node = node._peek(args[i]); - if (node === undefined) return undefined; - } - return node._getValue(); - } - - /** - * @param {[...T, function(): V]} args tuple - * @returns {V} the value - */ - provide(...args) { - /** @type {WeakTupleMap} */ - let node = this; - for (let i = 0; i < args.length - 1; i++) { - node = node._get(args[i]); - } - if (node._hasValue()) return node._getValue(); - const fn = args[args.length - 1]; - const newValue = fn(...args.slice(0, -1)); - node._setValue(newValue); - return newValue; - } - - /** - * @param {T} args tuple - * @returns {void} - */ - delete(...args) { - /** @type {WeakTupleMap} */ - let node = this; - for (let i = 0; i < args.length; i++) { - node = node._peek(args[i]); - if (node === undefined) return; - } - node._deleteValue(); - } - - /** - * @returns {void} - */ - clear() { - this.f = 0; - this.v = undefined; - this.w = undefined; - this.m = undefined; - } - - _getValue() { - return this.v; - } - - _hasValue() { - return (this.f & 1) === 1; - } - - _setValue(v) { - this.f |= 1; - this.v = v; - } - - _deleteValue() { - this.f &= 6; - this.v = undefined; - } - - _peek(thing) { - if (isWeakKey(thing)) { - if ((this.f & 4) !== 4) return undefined; - return this.w.get(thing); - } else { - if ((this.f & 2) !== 2) return undefined; - return this.m.get(thing); - } - } - - _get(thing) { - if (isWeakKey(thing)) { - if ((this.f & 4) !== 4) { - const newMap = new WeakMap(); - this.f |= 4; - const newNode = new WeakTupleMap(); - (this.w = newMap).set(thing, newNode); - return newNode; - } - const entry = this.w.get(thing); - if (entry !== undefined) { - return entry; - } - const newNode = new WeakTupleMap(); - this.w.set(thing, newNode); - return newNode; - } else { - if ((this.f & 2) !== 2) { - const newMap = new Map(); - this.f |= 2; - const newNode = new WeakTupleMap(); - (this.m = newMap).set(thing, newNode); - return newNode; - } - const entry = this.m.get(thing); - if (entry !== undefined) { - return entry; - } - const newNode = new WeakTupleMap(); - this.m.set(thing, newNode); - return newNode; - } - } -} - -module.exports = WeakTupleMap; - - -/***/ }), - -/***/ 12076: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Mikola Lysenko @mikolalysenko -*/ - - - -/* cspell:disable-next-line */ -// Refactor: Peter Somogyvari @petermetz - -const compileSearch = (funcName, predicate, reversed, extraArgs, earlyOut) => { - const code = [ - "function ", - funcName, - "(a,l,h,", - extraArgs.join(","), - "){", - earlyOut ? "" : "var i=", - reversed ? "l-1" : "h+1", - ";while(l<=h){var m=(l+h)>>>1,x=a[m]" - ]; - - if (earlyOut) { - if (predicate.indexOf("c") < 0) { - code.push(";if(x===y){return m}else if(x<=y){"); - } else { - code.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"); - } - } else { - code.push(";if(", predicate, "){i=m;"); - } - if (reversed) { - code.push("l=m+1}else{h=m-1}"); - } else { - code.push("h=m-1}else{l=m+1}"); - } - code.push("}"); - if (earlyOut) { - code.push("return -1};"); - } else { - code.push("return i};"); - } - return code.join(""); -}; - -const compileBoundsSearch = (predicate, reversed, suffix, earlyOut) => { - const arg1 = compileSearch( - "A", - "x" + predicate + "y", - reversed, - ["y"], - earlyOut - ); - - const arg2 = compileSearch( - "P", - "c(x,y)" + predicate + "0", - reversed, - ["y", "c"], - earlyOut - ); - - const fnHeader = "function dispatchBinarySearch"; - - const fnBody = - "(a,y,c,l,h){\ -if(typeof(c)==='function'){\ -return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)\ -}else{\ -return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)\ -}}\ -return dispatchBinarySearch"; - - const fnArgList = [arg1, arg2, fnHeader, suffix, fnBody, suffix]; - const fnSource = fnArgList.join(""); - const result = new Function(fnSource); - return result(); -}; - -module.exports = { - ge: compileBoundsSearch(">=", false, "GE"), - gt: compileBoundsSearch(">", false, "GT"), - lt: compileBoundsSearch("<", true, "LT"), - le: compileBoundsSearch("<=", true, "LE"), - eq: compileBoundsSearch("-", true, "EQ", true) -}; - - -/***/ }), - -/***/ 22093: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @type {WeakMap>} */ -const mergeCache = new WeakMap(); -/** @type {WeakMap>>} */ -const setPropertyCache = new WeakMap(); -const DELETE = Symbol("DELETE"); -const DYNAMIC_INFO = Symbol("cleverMerge dynamic info"); - -/** - * Merges two given objects and caches the result to avoid computation if same objects passed as arguments again. - * @template T - * @template O - * @example - * // performs cleverMerge(first, second), stores the result in WeakMap and returns result - * cachedCleverMerge({a: 1}, {a: 2}) - * {a: 2} - * // when same arguments passed, gets the result from WeakMap and returns it. - * cachedCleverMerge({a: 1}, {a: 2}) - * {a: 2} - * @param {T} first first object - * @param {O} second second object - * @returns {T & O | T | O} merged object of first and second object - */ -const cachedCleverMerge = (first, second) => { - if (second === undefined) return first; - if (first === undefined) return second; - if (typeof second !== "object" || second === null) return second; - if (typeof first !== "object" || first === null) return first; - - let innerCache = mergeCache.get(first); - if (innerCache === undefined) { - innerCache = new WeakMap(); - mergeCache.set(first, innerCache); - } - const prevMerge = innerCache.get(second); - if (prevMerge !== undefined) return prevMerge; - const newMerge = _cleverMerge(first, second, true); - innerCache.set(second, newMerge); - return newMerge; -}; - -/** - * @template T - * @param {Partial} obj object - * @param {string} property property - * @param {string|number|boolean} value assignment value - * @returns {T} new object - */ -const cachedSetProperty = (obj, property, value) => { - let mapByProperty = setPropertyCache.get(obj); - - if (mapByProperty === undefined) { - mapByProperty = new Map(); - setPropertyCache.set(obj, mapByProperty); - } - - let mapByValue = mapByProperty.get(property); - - if (mapByValue === undefined) { - mapByValue = new Map(); - mapByProperty.set(property, mapByValue); - } - - let result = mapByValue.get(value); - - if (result) return result; - - result = { - ...obj, - [property]: value - }; - mapByValue.set(value, result); - - return result; -}; - -/** - * @typedef {Object} ObjectParsedPropertyEntry - * @property {any | undefined} base base value - * @property {string | undefined} byProperty the name of the selector property - * @property {Map} byValues value depending on selector property, merged with base - */ - -/** - * @typedef {Object} ParsedObject - * @property {Map} static static properties (key is property name) - * @property {{ byProperty: string, fn: Function } | undefined} dynamic dynamic part - */ - -/** @type {WeakMap} */ -const parseCache = new WeakMap(); - -/** - * @param {object} obj the object - * @returns {ParsedObject} parsed object - */ -const cachedParseObject = obj => { - const entry = parseCache.get(obj); - if (entry !== undefined) return entry; - const result = parseObject(obj); - parseCache.set(obj, result); - return result; -}; - -/** - * @param {object} obj the object - * @returns {ParsedObject} parsed object - */ -const parseObject = obj => { - const info = new Map(); - let dynamicInfo; - const getInfo = p => { - const entry = info.get(p); - if (entry !== undefined) return entry; - const newEntry = { - base: undefined, - byProperty: undefined, - byValues: undefined - }; - info.set(p, newEntry); - return newEntry; - }; - for (const key of Object.keys(obj)) { - if (key.startsWith("by")) { - const byProperty = key; - const byObj = obj[byProperty]; - if (typeof byObj === "object") { - for (const byValue of Object.keys(byObj)) { - const obj = byObj[byValue]; - for (const key of Object.keys(obj)) { - const entry = getInfo(key); - if (entry.byProperty === undefined) { - entry.byProperty = byProperty; - entry.byValues = new Map(); - } else if (entry.byProperty !== byProperty) { - throw new Error( - `${byProperty} and ${entry.byProperty} for a single property is not supported` - ); - } - entry.byValues.set(byValue, obj[key]); - if (byValue === "default") { - for (const otherByValue of Object.keys(byObj)) { - if (!entry.byValues.has(otherByValue)) - entry.byValues.set(otherByValue, undefined); - } - } - } - } - } else if (typeof byObj === "function") { - if (dynamicInfo === undefined) { - dynamicInfo = { - byProperty: key, - fn: byObj - }; - } else { - throw new Error( - `${key} and ${dynamicInfo.byProperty} when both are functions is not supported` - ); - } - } else { - const entry = getInfo(key); - entry.base = obj[key]; - } - } else { - const entry = getInfo(key); - entry.base = obj[key]; - } - } - return { - static: info, - dynamic: dynamicInfo - }; -}; - -/** - * @param {Map} info static properties (key is property name) - * @param {{ byProperty: string, fn: Function } | undefined} dynamicInfo dynamic part - * @returns {object} the object - */ -const serializeObject = (info, dynamicInfo) => { - const obj = {}; - // Setup byProperty structure - for (const entry of info.values()) { - if (entry.byProperty !== undefined) { - const byObj = (obj[entry.byProperty] = obj[entry.byProperty] || {}); - for (const byValue of entry.byValues.keys()) { - byObj[byValue] = byObj[byValue] || {}; - } - } - } - for (const [key, entry] of info) { - if (entry.base !== undefined) { - obj[key] = entry.base; - } - // Fill byProperty structure - if (entry.byProperty !== undefined) { - const byObj = (obj[entry.byProperty] = obj[entry.byProperty] || {}); - for (const byValue of Object.keys(byObj)) { - const value = getFromByValues(entry.byValues, byValue); - if (value !== undefined) byObj[byValue][key] = value; - } - } - } - if (dynamicInfo !== undefined) { - obj[dynamicInfo.byProperty] = dynamicInfo.fn; - } - return obj; -}; - -const VALUE_TYPE_UNDEFINED = 0; -const VALUE_TYPE_ATOM = 1; -const VALUE_TYPE_ARRAY_EXTEND = 2; -const VALUE_TYPE_OBJECT = 3; -const VALUE_TYPE_DELETE = 4; - -/** - * @param {any} value a single value - * @returns {VALUE_TYPE_UNDEFINED | VALUE_TYPE_ATOM | VALUE_TYPE_ARRAY_EXTEND | VALUE_TYPE_OBJECT | VALUE_TYPE_DELETE} value type - */ -const getValueType = value => { - if (value === undefined) { - return VALUE_TYPE_UNDEFINED; - } else if (value === DELETE) { - return VALUE_TYPE_DELETE; - } else if (Array.isArray(value)) { - if (value.lastIndexOf("...") !== -1) return VALUE_TYPE_ARRAY_EXTEND; - return VALUE_TYPE_ATOM; - } else if ( - typeof value === "object" && - value !== null && - (!value.constructor || value.constructor === Object) - ) { - return VALUE_TYPE_OBJECT; - } - return VALUE_TYPE_ATOM; -}; - -/** - * Merges two objects. Objects are deeply clever merged. - * Arrays might reference the old value with "...". - * Non-object values take preference over object values. - * @template T - * @template O - * @param {T} first first object - * @param {O} second second object - * @returns {T & O | T | O} merged object of first and second object - */ -const cleverMerge = (first, second) => { - if (second === undefined) return first; - if (first === undefined) return second; - if (typeof second !== "object" || second === null) return second; - if (typeof first !== "object" || first === null) return first; - - return _cleverMerge(first, second, false); -}; - -/** - * Merges two objects. Objects are deeply clever merged. - * @param {object} first first object - * @param {object} second second object - * @param {boolean} internalCaching should parsing of objects and nested merges be cached - * @returns {object} merged object of first and second object - */ -const _cleverMerge = (first, second, internalCaching = false) => { - const firstObject = internalCaching - ? cachedParseObject(first) - : parseObject(first); - const { static: firstInfo, dynamic: firstDynamicInfo } = firstObject; - - // If the first argument has a dynamic part we modify the dynamic part to merge the second argument - if (firstDynamicInfo !== undefined) { - let { byProperty, fn } = firstDynamicInfo; - const fnInfo = fn[DYNAMIC_INFO]; - if (fnInfo) { - second = internalCaching - ? cachedCleverMerge(fnInfo[1], second) - : cleverMerge(fnInfo[1], second); - fn = fnInfo[0]; - } - const newFn = (...args) => { - const fnResult = fn(...args); - return internalCaching - ? cachedCleverMerge(fnResult, second) - : cleverMerge(fnResult, second); - }; - newFn[DYNAMIC_INFO] = [fn, second]; - return serializeObject(firstObject.static, { byProperty, fn: newFn }); - } - - // If the first part is static only, we merge the static parts and keep the dynamic part of the second argument - const secondObject = internalCaching - ? cachedParseObject(second) - : parseObject(second); - const { static: secondInfo, dynamic: secondDynamicInfo } = secondObject; - /** @type {Map} */ - const resultInfo = new Map(); - for (const [key, firstEntry] of firstInfo) { - const secondEntry = secondInfo.get(key); - const entry = - secondEntry !== undefined - ? mergeEntries(firstEntry, secondEntry, internalCaching) - : firstEntry; - resultInfo.set(key, entry); - } - for (const [key, secondEntry] of secondInfo) { - if (!firstInfo.has(key)) { - resultInfo.set(key, secondEntry); - } - } - return serializeObject(resultInfo, secondDynamicInfo); -}; - -/** - * @param {ObjectParsedPropertyEntry} firstEntry a - * @param {ObjectParsedPropertyEntry} secondEntry b - * @param {boolean} internalCaching should parsing of objects and nested merges be cached - * @returns {ObjectParsedPropertyEntry} new entry - */ -const mergeEntries = (firstEntry, secondEntry, internalCaching) => { - switch (getValueType(secondEntry.base)) { - case VALUE_TYPE_ATOM: - case VALUE_TYPE_DELETE: - // No need to consider firstEntry at all - // second value override everything - // = second.base + second.byProperty - return secondEntry; - case VALUE_TYPE_UNDEFINED: - if (!firstEntry.byProperty) { - // = first.base + second.byProperty - return { - base: firstEntry.base, - byProperty: secondEntry.byProperty, - byValues: secondEntry.byValues - }; - } else if (firstEntry.byProperty !== secondEntry.byProperty) { - throw new Error( - `${firstEntry.byProperty} and ${secondEntry.byProperty} for a single property is not supported` - ); - } else { - // = first.base + (first.byProperty + second.byProperty) - // need to merge first and second byValues - const newByValues = new Map(firstEntry.byValues); - for (const [key, value] of secondEntry.byValues) { - const firstValue = getFromByValues(firstEntry.byValues, key); - newByValues.set( - key, - mergeSingleValue(firstValue, value, internalCaching) - ); - } - return { - base: firstEntry.base, - byProperty: firstEntry.byProperty, - byValues: newByValues - }; - } - default: { - if (!firstEntry.byProperty) { - // The simple case - // = (first.base + second.base) + second.byProperty - return { - base: mergeSingleValue( - firstEntry.base, - secondEntry.base, - internalCaching - ), - byProperty: secondEntry.byProperty, - byValues: secondEntry.byValues - }; - } - let newBase; - const intermediateByValues = new Map(firstEntry.byValues); - for (const [key, value] of intermediateByValues) { - intermediateByValues.set( - key, - mergeSingleValue(value, secondEntry.base, internalCaching) - ); - } - if ( - Array.from(firstEntry.byValues.values()).every(value => { - const type = getValueType(value); - return type === VALUE_TYPE_ATOM || type === VALUE_TYPE_DELETE; - }) - ) { - // = (first.base + second.base) + ((first.byProperty + second.base) + second.byProperty) - newBase = mergeSingleValue( - firstEntry.base, - secondEntry.base, - internalCaching - ); - } else { - // = first.base + ((first.byProperty (+default) + second.base) + second.byProperty) - newBase = firstEntry.base; - if (!intermediateByValues.has("default")) - intermediateByValues.set("default", secondEntry.base); - } - if (!secondEntry.byProperty) { - // = first.base + (first.byProperty + second.base) - return { - base: newBase, - byProperty: firstEntry.byProperty, - byValues: intermediateByValues - }; - } else if (firstEntry.byProperty !== secondEntry.byProperty) { - throw new Error( - `${firstEntry.byProperty} and ${secondEntry.byProperty} for a single property is not supported` - ); - } - const newByValues = new Map(intermediateByValues); - for (const [key, value] of secondEntry.byValues) { - const firstValue = getFromByValues(intermediateByValues, key); - newByValues.set( - key, - mergeSingleValue(firstValue, value, internalCaching) - ); - } - return { - base: newBase, - byProperty: firstEntry.byProperty, - byValues: newByValues - }; - } - } -}; - -/** - * @param {Map} byValues all values - * @param {string} key value of the selector - * @returns {any | undefined} value - */ -const getFromByValues = (byValues, key) => { - if (key !== "default" && byValues.has(key)) { - return byValues.get(key); - } - return byValues.get("default"); -}; - -/** - * @param {any} a value - * @param {any} b value - * @param {boolean} internalCaching should parsing of objects and nested merges be cached - * @returns {any} value - */ -const mergeSingleValue = (a, b, internalCaching) => { - const bType = getValueType(b); - const aType = getValueType(a); - switch (bType) { - case VALUE_TYPE_DELETE: - case VALUE_TYPE_ATOM: - return b; - case VALUE_TYPE_OBJECT: { - return aType !== VALUE_TYPE_OBJECT - ? b - : internalCaching - ? cachedCleverMerge(a, b) - : cleverMerge(a, b); - } - case VALUE_TYPE_UNDEFINED: - return a; - case VALUE_TYPE_ARRAY_EXTEND: - switch ( - aType !== VALUE_TYPE_ATOM - ? aType - : Array.isArray(a) - ? VALUE_TYPE_ARRAY_EXTEND - : VALUE_TYPE_OBJECT - ) { - case VALUE_TYPE_UNDEFINED: - return b; - case VALUE_TYPE_DELETE: - return b.filter(item => item !== "..."); - case VALUE_TYPE_ARRAY_EXTEND: { - const newArray = []; - for (const item of b) { - if (item === "...") { - for (const item of a) { - newArray.push(item); - } - } else { - newArray.push(item); - } - } - return newArray; - } - case VALUE_TYPE_OBJECT: - return b.map(item => (item === "..." ? a : item)); - default: - throw new Error("Not implemented"); - } - default: - throw new Error("Not implemented"); - } -}; - -/** - * @template T - * @param {T} obj the object - * @returns {T} the object without operations like "..." or DELETE - */ -const removeOperations = obj => { - const newObj = /** @type {T} */ ({}); - for (const key of Object.keys(obj)) { - const value = obj[key]; - const type = getValueType(value); - switch (type) { - case VALUE_TYPE_UNDEFINED: - case VALUE_TYPE_DELETE: - break; - case VALUE_TYPE_OBJECT: - newObj[key] = removeOperations(value); - break; - case VALUE_TYPE_ARRAY_EXTEND: - newObj[key] = value.filter(i => i !== "..."); - break; - default: - newObj[key] = value; - break; - } - } - return newObj; -}; - -/** - * @template T - * @template {string} P - * @param {T} obj the object - * @param {P} byProperty the by description - * @param {...any} values values - * @returns {Omit} object with merged byProperty - */ -const resolveByProperty = (obj, byProperty, ...values) => { - if (typeof obj !== "object" || obj === null || !(byProperty in obj)) { - return obj; - } - const { [byProperty]: _byValue, ..._remaining } = /** @type {object} */ (obj); - const remaining = /** @type {T} */ (_remaining); - const byValue = /** @type {Record | function(...any[]): T} */ ( - _byValue - ); - if (typeof byValue === "object") { - const key = values[0]; - if (key in byValue) { - return cachedCleverMerge(remaining, byValue[key]); - } else if ("default" in byValue) { - return cachedCleverMerge(remaining, byValue.default); - } else { - return /** @type {T} */ (remaining); - } - } else if (typeof byValue === "function") { - const result = byValue.apply(null, values); - return cachedCleverMerge( - remaining, - resolveByProperty(result, byProperty, ...values) - ); - } -}; - -exports.cachedSetProperty = cachedSetProperty; -exports.cachedCleverMerge = cachedCleverMerge; -exports.cleverMerge = cleverMerge; -exports.resolveByProperty = resolveByProperty; -exports.removeOperations = removeOperations; -exports.DELETE = DELETE; - - -/***/ }), - -/***/ 58792: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { compareRuntime } = __webpack_require__(47462); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../ChunkGroup")} ChunkGroup */ -/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -/** @template T @typedef {function(T, T): -1|0|1} Comparator */ -/** @template TArg @template T @typedef {function(TArg, T, T): -1|0|1} RawParameterizedComparator */ -/** @template TArg @template T @typedef {function(TArg): Comparator} ParameterizedComparator */ - -/** - * @template T - * @param {RawParameterizedComparator} fn comparator with argument - * @returns {ParameterizedComparator} comparator - */ -const createCachedParameterizedComparator = fn => { - /** @type {WeakMap>} */ - const map = new WeakMap(); - return arg => { - const cachedResult = map.get(arg); - if (cachedResult !== undefined) return cachedResult; - /** - * @param {T} a first item - * @param {T} b second item - * @returns {-1|0|1} compare result - */ - const result = fn.bind(null, arg); - map.set(arg, result); - return result; - }; -}; - -/** - * @param {Chunk} a chunk - * @param {Chunk} b chunk - * @returns {-1|0|1} compare result - */ -exports.compareChunksById = (a, b) => { - return compareIds(a.id, b.id); -}; - -/** - * @param {Module} a module - * @param {Module} b module - * @returns {-1|0|1} compare result - */ -exports.compareModulesByIdentifier = (a, b) => { - return compareIds(a.identifier(), b.identifier()); -}; - -/** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Module} a module - * @param {Module} b module - * @returns {-1|0|1} compare result - */ -const compareModulesById = (chunkGraph, a, b) => { - return compareIds(chunkGraph.getModuleId(a), chunkGraph.getModuleId(b)); -}; -/** @type {ParameterizedComparator} */ -exports.compareModulesById = - createCachedParameterizedComparator(compareModulesById); - -/** - * @param {number} a number - * @param {number} b number - * @returns {-1|0|1} compare result - */ -const compareNumbers = (a, b) => { - if (typeof a !== typeof b) { - return typeof a < typeof b ? -1 : 1; - } - if (a < b) return -1; - if (a > b) return 1; - return 0; -}; -exports.compareNumbers = compareNumbers; - -/** - * @param {string} a string - * @param {string} b string - * @returns {-1|0|1} compare result - */ -const compareStringsNumeric = (a, b) => { - const partsA = a.split(/(\d+)/); - const partsB = b.split(/(\d+)/); - const len = Math.min(partsA.length, partsB.length); - for (let i = 0; i < len; i++) { - const pA = partsA[i]; - const pB = partsB[i]; - if (i % 2 === 0) { - if (pA.length > pB.length) { - if (pA.slice(0, pB.length) > pB) return 1; - return -1; - } else if (pB.length > pA.length) { - if (pB.slice(0, pA.length) > pA) return -1; - return 1; - } else { - if (pA < pB) return -1; - if (pA > pB) return 1; - } - } else { - const nA = +pA; - const nB = +pB; - if (nA < nB) return -1; - if (nA > nB) return 1; - } - } - if (partsB.length < partsA.length) return 1; - if (partsB.length > partsA.length) return -1; - return 0; -}; -exports.compareStringsNumeric = compareStringsNumeric; - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {Module} a module - * @param {Module} b module - * @returns {-1|0|1} compare result - */ -const compareModulesByPostOrderIndexOrIdentifier = (moduleGraph, a, b) => { - const cmp = compareNumbers( - moduleGraph.getPostOrderIndex(a), - moduleGraph.getPostOrderIndex(b) - ); - if (cmp !== 0) return cmp; - return compareIds(a.identifier(), b.identifier()); -}; -/** @type {ParameterizedComparator} */ -exports.compareModulesByPostOrderIndexOrIdentifier = - createCachedParameterizedComparator( - compareModulesByPostOrderIndexOrIdentifier - ); - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {Module} a module - * @param {Module} b module - * @returns {-1|0|1} compare result - */ -const compareModulesByPreOrderIndexOrIdentifier = (moduleGraph, a, b) => { - const cmp = compareNumbers( - moduleGraph.getPreOrderIndex(a), - moduleGraph.getPreOrderIndex(b) - ); - if (cmp !== 0) return cmp; - return compareIds(a.identifier(), b.identifier()); -}; -/** @type {ParameterizedComparator} */ -exports.compareModulesByPreOrderIndexOrIdentifier = - createCachedParameterizedComparator( - compareModulesByPreOrderIndexOrIdentifier - ); - -/** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Module} a module - * @param {Module} b module - * @returns {-1|0|1} compare result - */ -const compareModulesByIdOrIdentifier = (chunkGraph, a, b) => { - const cmp = compareIds(chunkGraph.getModuleId(a), chunkGraph.getModuleId(b)); - if (cmp !== 0) return cmp; - return compareIds(a.identifier(), b.identifier()); -}; -/** @type {ParameterizedComparator} */ -exports.compareModulesByIdOrIdentifier = createCachedParameterizedComparator( - compareModulesByIdOrIdentifier -); - -/** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Chunk} a chunk - * @param {Chunk} b chunk - * @returns {-1|0|1} compare result - */ -const compareChunks = (chunkGraph, a, b) => { - return chunkGraph.compareChunks(a, b); -}; -/** @type {ParameterizedComparator} */ -exports.compareChunks = createCachedParameterizedComparator(compareChunks); - -/** - * @param {string|number} a first id - * @param {string|number} b second id - * @returns {-1|0|1} compare result - */ -const compareIds = (a, b) => { - if (typeof a !== typeof b) { - return typeof a < typeof b ? -1 : 1; - } - if (a < b) return -1; - if (a > b) return 1; - return 0; -}; - -exports.compareIds = compareIds; - -/** - * @param {string} a first string - * @param {string} b second string - * @returns {-1|0|1} compare result - */ -const compareStrings = (a, b) => { - if (a < b) return -1; - if (a > b) return 1; - return 0; -}; - -exports.compareStrings = compareStrings; - -/** - * @param {ChunkGroup} a first chunk group - * @param {ChunkGroup} b second chunk group - * @returns {-1|0|1} compare result - */ -const compareChunkGroupsByIndex = (a, b) => { - return a.index < b.index ? -1 : 1; -}; - -exports.compareChunkGroupsByIndex = compareChunkGroupsByIndex; - -/** - * @template K1 {Object} - * @template K2 - * @template T - */ -class TwoKeyWeakMap { - constructor() { - /** @private @type {WeakMap>} */ - this._map = new WeakMap(); - } - - /** - * @param {K1} key1 first key - * @param {K2} key2 second key - * @returns {T | undefined} value - */ - get(key1, key2) { - const childMap = this._map.get(key1); - if (childMap === undefined) { - return undefined; - } - return childMap.get(key2); - } - - /** - * @param {K1} key1 first key - * @param {K2} key2 second key - * @param {T | undefined} value new value - * @returns {void} - */ - set(key1, key2, value) { - let childMap = this._map.get(key1); - if (childMap === undefined) { - childMap = new WeakMap(); - this._map.set(key1, childMap); - } - childMap.set(key2, value); - } -} - -/** @type {TwoKeyWeakMap, Comparator, Comparator>}} */ -const concatComparatorsCache = new TwoKeyWeakMap(); - -/** - * @template T - * @param {Comparator} c1 comparator - * @param {Comparator} c2 comparator - * @param {Comparator[]} cRest comparators - * @returns {Comparator} comparator - */ -const concatComparators = (c1, c2, ...cRest) => { - if (cRest.length > 0) { - const [c3, ...cRest2] = cRest; - return concatComparators(c1, concatComparators(c2, c3, ...cRest2)); - } - const cacheEntry = /** @type {Comparator} */ ( - concatComparatorsCache.get(c1, c2) - ); - if (cacheEntry !== undefined) return cacheEntry; - /** - * @param {T} a first value - * @param {T} b second value - * @returns {-1|0|1} compare result - */ - const result = (a, b) => { - const res = c1(a, b); - if (res !== 0) return res; - return c2(a, b); - }; - concatComparatorsCache.set(c1, c2, result); - return result; -}; -exports.concatComparators = concatComparators; - -/** @template A, B @typedef {(input: A) => B} Selector */ - -/** @type {TwoKeyWeakMap, Comparator, Comparator>}} */ -const compareSelectCache = new TwoKeyWeakMap(); - -/** - * @template T - * @template R - * @param {Selector} getter getter for value - * @param {Comparator} comparator comparator - * @returns {Comparator} comparator - */ -const compareSelect = (getter, comparator) => { - const cacheEntry = compareSelectCache.get(getter, comparator); - if (cacheEntry !== undefined) return cacheEntry; - /** - * @param {T} a first value - * @param {T} b second value - * @returns {-1|0|1} compare result - */ - const result = (a, b) => { - const aValue = getter(a); - const bValue = getter(b); - if (aValue !== undefined && aValue !== null) { - if (bValue !== undefined && bValue !== null) { - return comparator(aValue, bValue); - } - return -1; - } else { - if (bValue !== undefined && bValue !== null) { - return 1; - } - return 0; - } - }; - compareSelectCache.set(getter, comparator, result); - return result; -}; -exports.compareSelect = compareSelect; - -/** @type {WeakMap, Comparator>>} */ -const compareIteratorsCache = new WeakMap(); - -/** - * @template T - * @param {Comparator} elementComparator comparator for elements - * @returns {Comparator>} comparator for iterables of elements - */ -const compareIterables = elementComparator => { - const cacheEntry = compareIteratorsCache.get(elementComparator); - if (cacheEntry !== undefined) return cacheEntry; - /** - * @param {Iterable} a first value - * @param {Iterable} b second value - * @returns {-1|0|1} compare result - */ - const result = (a, b) => { - const aI = a[Symbol.iterator](); - const bI = b[Symbol.iterator](); - // eslint-disable-next-line no-constant-condition - while (true) { - const aItem = aI.next(); - const bItem = bI.next(); - if (aItem.done) { - return bItem.done ? 0 : -1; - } else if (bItem.done) { - return 1; - } - const res = elementComparator(aItem.value, bItem.value); - if (res !== 0) return res; - } - }; - compareIteratorsCache.set(elementComparator, result); - return result; -}; -exports.compareIterables = compareIterables; - -// TODO this is no longer needed when minimum node.js version is >= 12 -// since these versions ship with a stable sort function -/** - * @template T - * @param {Iterable} iterable original ordered list - * @returns {Comparator} comparator - */ -exports.keepOriginalOrder = iterable => { - /** @type {Map} */ - const map = new Map(); - let i = 0; - for (const item of iterable) { - map.set(item, i++); - } - return (a, b) => compareNumbers(map.get(a), map.get(b)); -}; - -/** - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {Comparator} comparator - */ -exports.compareChunksNatural = chunkGraph => { - const cmpFn = exports.compareModulesById(chunkGraph); - const cmpIterableFn = compareIterables(cmpFn); - return concatComparators( - compareSelect(chunk => chunk.name, compareIds), - compareSelect(chunk => chunk.runtime, compareRuntime), - compareSelect( - /** - * @param {Chunk} chunk a chunk - * @returns {Iterable} modules - */ - chunk => chunkGraph.getOrderedChunkModulesIterable(chunk, cmpFn), - cmpIterableFn - ) - ); -}; - -/** - * Compare two locations - * @param {DependencyLocation} a A location node - * @param {DependencyLocation} b A location node - * @returns {-1|0|1} sorting comparator value - */ -exports.compareLocations = (a, b) => { - let isObjectA = typeof a === "object" && a !== null; - let isObjectB = typeof b === "object" && b !== null; - if (!isObjectA || !isObjectB) { - if (isObjectA) return 1; - if (isObjectB) return -1; - return 0; - } - if ("start" in a) { - if ("start" in b) { - const ap = a.start; - const bp = b.start; - if (ap.line < bp.line) return -1; - if (ap.line > bp.line) return 1; - if (ap.column < bp.column) return -1; - if (ap.column > bp.column) return 1; - } else return -1; - } else if ("start" in b) return 1; - if ("name" in a) { - if ("name" in b) { - if (a.name < b.name) return -1; - if (a.name > b.name) return 1; - } else return -1; - } else if ("name" in b) return 1; - if ("index" in a) { - if ("index" in b) { - if (a.index < b.index) return -1; - if (a.index > b.index) return 1; - } else return -1; - } else if ("index" in b) return 1; - return 0; -}; - - -/***/ }), - -/***/ 73897: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const quoteMeta = str => { - return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); -}; - -const toSimpleString = str => { - if (`${+str}` === str) { - return str; - } - return JSON.stringify(str); -}; - -/** - * @param {Record} map value map - * @returns {boolean|(function(string): string)} true/false, when unconditionally true/false, or a template function to determine the value at runtime - */ -const compileBooleanMatcher = map => { - const positiveItems = Object.keys(map).filter(i => map[i]); - const negativeItems = Object.keys(map).filter(i => !map[i]); - if (positiveItems.length === 0) return false; - if (negativeItems.length === 0) return true; - return compileBooleanMatcherFromLists(positiveItems, negativeItems); -}; - -/** - * @param {string[]} positiveItems positive items - * @param {string[]} negativeItems negative items - * @returns {function(string): string} a template function to determine the value at runtime - */ -const compileBooleanMatcherFromLists = (positiveItems, negativeItems) => { - if (positiveItems.length === 0) return () => "false"; - if (negativeItems.length === 0) return () => "true"; - if (positiveItems.length === 1) - return value => `${toSimpleString(positiveItems[0])} == ${value}`; - if (negativeItems.length === 1) - return value => `${toSimpleString(negativeItems[0])} != ${value}`; - const positiveRegexp = itemsToRegexp(positiveItems); - const negativeRegexp = itemsToRegexp(negativeItems); - if (positiveRegexp.length <= negativeRegexp.length) { - return value => `/^${positiveRegexp}$/.test(${value})`; - } else { - return value => `!/^${negativeRegexp}$/.test(${value})`; - } -}; - -const popCommonItems = (itemsSet, getKey, condition) => { - const map = new Map(); - for (const item of itemsSet) { - const key = getKey(item); - if (key) { - let list = map.get(key); - if (list === undefined) { - list = []; - map.set(key, list); - } - list.push(item); - } - } - const result = []; - for (const list of map.values()) { - if (condition(list)) { - for (const item of list) { - itemsSet.delete(item); - } - result.push(list); - } - } - return result; -}; - -const getCommonPrefix = items => { - let prefix = items[0]; - for (let i = 1; i < items.length; i++) { - const item = items[i]; - for (let p = 0; p < prefix.length; p++) { - if (item[p] !== prefix[p]) { - prefix = prefix.slice(0, p); - break; - } - } - } - return prefix; -}; - -const getCommonSuffix = items => { - let suffix = items[0]; - for (let i = 1; i < items.length; i++) { - const item = items[i]; - for (let p = item.length - 1, s = suffix.length - 1; s >= 0; p--, s--) { - if (item[p] !== suffix[s]) { - suffix = suffix.slice(s + 1); - break; - } - } - } - return suffix; -}; - -const itemsToRegexp = itemsArr => { - if (itemsArr.length === 1) { - return quoteMeta(itemsArr[0]); - } - const finishedItems = []; - - // merge single char items: (a|b|c|d|ef) => ([abcd]|ef) - let countOfSingleCharItems = 0; - for (const item of itemsArr) { - if (item.length === 1) { - countOfSingleCharItems++; - } - } - // special case for only single char items - if (countOfSingleCharItems === itemsArr.length) { - return `[${quoteMeta(itemsArr.sort().join(""))}]`; - } - const items = new Set(itemsArr.sort()); - if (countOfSingleCharItems > 2) { - let singleCharItems = ""; - for (const item of items) { - if (item.length === 1) { - singleCharItems += item; - items.delete(item); - } - } - finishedItems.push(`[${quoteMeta(singleCharItems)}]`); - } - - // special case for 2 items with common prefix/suffix - if (finishedItems.length === 0 && items.size === 2) { - const prefix = getCommonPrefix(itemsArr); - const suffix = getCommonSuffix( - itemsArr.map(item => item.slice(prefix.length)) - ); - if (prefix.length > 0 || suffix.length > 0) { - return `${quoteMeta(prefix)}${itemsToRegexp( - itemsArr.map(i => i.slice(prefix.length, -suffix.length || undefined)) - )}${quoteMeta(suffix)}`; - } - } - - // special case for 2 items with common suffix - if (finishedItems.length === 0 && items.size === 2) { - const it = items[Symbol.iterator](); - const a = it.next().value; - const b = it.next().value; - if (a.length > 0 && b.length > 0 && a.slice(-1) === b.slice(-1)) { - return `${itemsToRegexp([a.slice(0, -1), b.slice(0, -1)])}${quoteMeta( - a.slice(-1) - )}`; - } - } - - // find common prefix: (a1|a2|a3|a4|b5) => (a(1|2|3|4)|b5) - const prefixed = popCommonItems( - items, - item => (item.length >= 1 ? item[0] : false), - list => { - if (list.length >= 3) return true; - if (list.length <= 1) return false; - return list[0][1] === list[1][1]; - } - ); - for (const prefixedItems of prefixed) { - const prefix = getCommonPrefix(prefixedItems); - finishedItems.push( - `${quoteMeta(prefix)}${itemsToRegexp( - prefixedItems.map(i => i.slice(prefix.length)) - )}` - ); - } - - // find common suffix: (a1|b1|c1|d1|e2) => ((a|b|c|d)1|e2) - const suffixed = popCommonItems( - items, - item => (item.length >= 1 ? item.slice(-1) : false), - list => { - if (list.length >= 3) return true; - if (list.length <= 1) return false; - return list[0].slice(-2) === list[1].slice(-2); - } - ); - for (const suffixedItems of suffixed) { - const suffix = getCommonSuffix(suffixedItems); - finishedItems.push( - `${itemsToRegexp( - suffixedItems.map(i => i.slice(0, -suffix.length)) - )}${quoteMeta(suffix)}` - ); - } - - // TODO further optimize regexp, i. e. - // use ranges: (1|2|3|4|a) => [1-4a] - const conditional = finishedItems.concat(Array.from(items, quoteMeta)); - if (conditional.length === 1) return conditional[0]; - return `(${conditional.join("|")})`; -}; - -compileBooleanMatcher.fromLists = compileBooleanMatcherFromLists; -compileBooleanMatcher.itemsToRegexp = itemsToRegexp; -module.exports = compileBooleanMatcher; - - -/***/ }), - -/***/ 89699: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const memoize = __webpack_require__(61374); - -const getValidate = memoize(() => (__webpack_require__(38476).validate)); - -const createSchemaValidation = (check, getSchema, options) => { - getSchema = memoize(getSchema); - return value => { - if (check && !check(value)) { - getValidate()(getSchema(), value, options); - if (check) { - (__webpack_require__(73837).deprecate)( - () => {}, - "webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.", - "DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID" - )(); - } - } - }; -}; - -module.exports = createSchemaValidation; - - -/***/ }), - -/***/ 85205: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Hash = __webpack_require__(14577); - -const BULK_SIZE = 2000; - -// We are using an object instead of a Map as this will stay static during the runtime -// so access to it can be optimized by v8 -const digestCaches = {}; - -class BulkUpdateDecorator extends Hash { - /** - * @param {Hash | function(): Hash} hashOrFactory function to create a hash - * @param {string=} hashKey key for caching - */ - constructor(hashOrFactory, hashKey) { - super(); - this.hashKey = hashKey; - if (typeof hashOrFactory === "function") { - this.hashFactory = hashOrFactory; - this.hash = undefined; - } else { - this.hashFactory = undefined; - this.hash = hashOrFactory; - } - this.buffer = ""; - } - - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if ( - inputEncoding !== undefined || - typeof data !== "string" || - data.length > BULK_SIZE - ) { - if (this.hash === undefined) this.hash = this.hashFactory(); - if (this.buffer.length > 0) { - this.hash.update(this.buffer); - this.buffer = ""; - } - this.hash.update(data, inputEncoding); - } else { - this.buffer += data; - if (this.buffer.length > BULK_SIZE) { - if (this.hash === undefined) this.hash = this.hashFactory(); - this.hash.update(this.buffer); - this.buffer = ""; - } - } - return this; - } - - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - let digestCache; - const buffer = this.buffer; - if (this.hash === undefined) { - // short data for hash, we can use caching - const cacheKey = `${this.hashKey}-${encoding}`; - digestCache = digestCaches[cacheKey]; - if (digestCache === undefined) { - digestCache = digestCaches[cacheKey] = new Map(); - } - const cacheEntry = digestCache.get(buffer); - if (cacheEntry !== undefined) return cacheEntry; - this.hash = this.hashFactory(); - } - if (buffer.length > 0) { - this.hash.update(buffer); - } - const digestResult = this.hash.digest(encoding); - const result = - typeof digestResult === "string" ? digestResult : digestResult.toString(); - if (digestCache !== undefined) { - digestCache.set(buffer, result); - } - return result; - } -} - -/* istanbul ignore next */ -class DebugHash extends Hash { - constructor() { - super(); - this.string = ""; - } - - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if (typeof data !== "string") data = data.toString("utf-8"); - if (data.startsWith("debug-digest-")) { - data = Buffer.from(data.slice("debug-digest-".length), "hex").toString(); - } - this.string += `[${data}](${new Error().stack.split("\n", 3)[2]})\n`; - return this; - } - - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - return "debug-digest-" + Buffer.from(this.string).toString("hex"); - } -} - -let crypto = undefined; -let createXXHash64 = undefined; -let createMd4 = undefined; -let BatchedHash = undefined; - -/** - * Creates a hash by name or function - * @param {string | typeof Hash} algorithm the algorithm name or a constructor creating a hash - * @returns {Hash} the hash - */ -module.exports = algorithm => { - if (typeof algorithm === "function") { - return new BulkUpdateDecorator(() => new algorithm()); - } - switch (algorithm) { - // TODO add non-cryptographic algorithm here - case "debug": - return new DebugHash(); - case "xxhash64": - if (createXXHash64 === undefined) { - createXXHash64 = __webpack_require__(29518); - if (BatchedHash === undefined) { - BatchedHash = __webpack_require__(86406); - } - } - return new BatchedHash(createXXHash64()); - case "md4": - if (createMd4 === undefined) { - createMd4 = __webpack_require__(44829); - if (BatchedHash === undefined) { - BatchedHash = __webpack_require__(86406); - } - } - return new BatchedHash(createMd4()); - case "native-md4": - if (crypto === undefined) crypto = __webpack_require__(6113); - return new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4"); - default: - if (crypto === undefined) crypto = __webpack_require__(6113); - return new BulkUpdateDecorator( - () => crypto.createHash(algorithm), - algorithm - ); - } -}; - - -/***/ }), - -/***/ 99321: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); - -/** @type {Map} */ -const deprecationCache = new Map(); - -/** - * @typedef {Object} FakeHookMarker - * @property {true} _fakeHook it's a fake hook - */ - -/** @template T @typedef {T & FakeHookMarker} FakeHook */ - -/** - * @param {string} message deprecation message - * @param {string} code deprecation code - * @returns {Function} function to trigger deprecation - */ -const createDeprecation = (message, code) => { - const cached = deprecationCache.get(message); - if (cached !== undefined) return cached; - const fn = util.deprecate( - () => {}, - message, - "DEP_WEBPACK_DEPRECATION_" + code - ); - deprecationCache.set(message, fn); - return fn; -}; - -const COPY_METHODS = [ - "concat", - "entry", - "filter", - "find", - "findIndex", - "includes", - "indexOf", - "join", - "lastIndexOf", - "map", - "reduce", - "reduceRight", - "slice", - "some" -]; - -const DISABLED_METHODS = [ - "copyWithin", - "entries", - "fill", - "keys", - "pop", - "reverse", - "shift", - "splice", - "sort", - "unshift" -]; - -/** - * @param {any} set new set - * @param {string} name property name - * @returns {void} - */ -exports.arrayToSetDeprecation = (set, name) => { - for (const method of COPY_METHODS) { - if (set[method]) continue; - const d = createDeprecation( - `${name} was changed from Array to Set (using Array method '${method}' is deprecated)`, - "ARRAY_TO_SET" - ); - /** - * @deprecated - * @this {Set} - * @returns {number} count - */ - set[method] = function () { - d(); - const array = Array.from(this); - return Array.prototype[method].apply(array, arguments); - }; - } - const dPush = createDeprecation( - `${name} was changed from Array to Set (using Array method 'push' is deprecated)`, - "ARRAY_TO_SET_PUSH" - ); - const dLength = createDeprecation( - `${name} was changed from Array to Set (using Array property 'length' is deprecated)`, - "ARRAY_TO_SET_LENGTH" - ); - const dIndexer = createDeprecation( - `${name} was changed from Array to Set (indexing Array is deprecated)`, - "ARRAY_TO_SET_INDEXER" - ); - /** - * @deprecated - * @this {Set} - * @returns {number} count - */ - set.push = function () { - dPush(); - for (const item of Array.from(arguments)) { - this.add(item); - } - return this.size; - }; - for (const method of DISABLED_METHODS) { - if (set[method]) continue; - set[method] = () => { - throw new Error( - `${name} was changed from Array to Set (using Array method '${method}' is not possible)` - ); - }; - } - const createIndexGetter = index => { - /** - * @this {Set} a Set - * @returns {any} the value at this location - */ - const fn = function () { - dIndexer(); - let i = 0; - for (const item of this) { - if (i++ === index) return item; - } - return undefined; - }; - return fn; - }; - const defineIndexGetter = index => { - Object.defineProperty(set, index, { - get: createIndexGetter(index), - set(value) { - throw new Error( - `${name} was changed from Array to Set (indexing Array with write is not possible)` - ); - } - }); - }; - defineIndexGetter(0); - let indexerDefined = 1; - Object.defineProperty(set, "length", { - get() { - dLength(); - const length = this.size; - for (indexerDefined; indexerDefined < length + 1; indexerDefined++) { - defineIndexGetter(indexerDefined); - } - return length; - }, - set(value) { - throw new Error( - `${name} was changed from Array to Set (writing to Array property 'length' is not possible)` - ); - } - }); - set[Symbol.isConcatSpreadable] = true; -}; - -exports.createArrayToSetDeprecationSet = name => { - let initialized = false; - class SetDeprecatedArray extends Set { - constructor(items) { - super(items); - if (!initialized) { - initialized = true; - exports.arrayToSetDeprecation(SetDeprecatedArray.prototype, name); - } - } - } - return SetDeprecatedArray; -}; - -exports.soonFrozenObjectDeprecation = (obj, name, code, note = "") => { - const message = `${name} will be frozen in future, all modifications are deprecated.${ - note && `\n${note}` - }`; - return new Proxy(obj, { - set: util.deprecate( - (target, property, value, receiver) => - Reflect.set(target, property, value, receiver), - message, - code - ), - defineProperty: util.deprecate( - (target, property, descriptor) => - Reflect.defineProperty(target, property, descriptor), - message, - code - ), - deleteProperty: util.deprecate( - (target, property) => Reflect.deleteProperty(target, property), - message, - code - ), - setPrototypeOf: util.deprecate( - (target, proto) => Reflect.setPrototypeOf(target, proto), - message, - code - ) - }); -}; - -/** - * @template T - * @param {T} obj object - * @param {string} message deprecation message - * @param {string} code deprecation code - * @returns {T} object with property access deprecated - */ -const deprecateAllProperties = (obj, message, code) => { - const newObj = {}; - const descriptors = Object.getOwnPropertyDescriptors(obj); - for (const name of Object.keys(descriptors)) { - const descriptor = descriptors[name]; - if (typeof descriptor.value === "function") { - Object.defineProperty(newObj, name, { - ...descriptor, - value: util.deprecate(descriptor.value, message, code) - }); - } else if (descriptor.get || descriptor.set) { - Object.defineProperty(newObj, name, { - ...descriptor, - get: descriptor.get && util.deprecate(descriptor.get, message, code), - set: descriptor.set && util.deprecate(descriptor.set, message, code) - }); - } else { - let value = descriptor.value; - Object.defineProperty(newObj, name, { - configurable: descriptor.configurable, - enumerable: descriptor.enumerable, - get: util.deprecate(() => value, message, code), - set: descriptor.writable - ? util.deprecate(v => (value = v), message, code) - : undefined - }); - } - } - return /** @type {T} */ (newObj); -}; -exports.deprecateAllProperties = deprecateAllProperties; - -/** - * @template T - * @param {T} fakeHook fake hook implementation - * @param {string=} message deprecation message (not deprecated when unset) - * @param {string=} code deprecation code (not deprecated when unset) - * @returns {FakeHook} fake hook which redirects - */ -exports.createFakeHook = (fakeHook, message, code) => { - if (message && code) { - fakeHook = deprecateAllProperties(fakeHook, message, code); - } - return Object.freeze( - Object.assign(fakeHook, { _fakeHook: /** @type {true} */ (true) }) - ); -}; - - -/***/ }), - -/***/ 75843: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -// Simulations show these probabilities for a single change -// 93.1% that one group is invalidated -// 4.8% that two groups are invalidated -// 1.1% that 3 groups are invalidated -// 0.1% that 4 or more groups are invalidated -// -// And these for removing/adding 10 lexically adjacent files -// 64.5% that one group is invalidated -// 24.8% that two groups are invalidated -// 7.8% that 3 groups are invalidated -// 2.7% that 4 or more groups are invalidated -// -// And these for removing/adding 3 random files -// 0% that one group is invalidated -// 3.7% that two groups are invalidated -// 80.8% that 3 groups are invalidated -// 12.3% that 4 groups are invalidated -// 3.2% that 5 or more groups are invalidated - -/** - * - * @param {string} a key - * @param {string} b key - * @returns {number} the similarity as number - */ -const similarity = (a, b) => { - const l = Math.min(a.length, b.length); - let dist = 0; - for (let i = 0; i < l; i++) { - const ca = a.charCodeAt(i); - const cb = b.charCodeAt(i); - dist += Math.max(0, 10 - Math.abs(ca - cb)); - } - return dist; -}; - -/** - * @param {string} a key - * @param {string} b key - * @param {Set} usedNames set of already used names - * @returns {string} the common part and a single char for the difference - */ -const getName = (a, b, usedNames) => { - const l = Math.min(a.length, b.length); - let i = 0; - while (i < l) { - if (a.charCodeAt(i) !== b.charCodeAt(i)) { - i++; - break; - } - i++; - } - while (i < l) { - const name = a.slice(0, i); - const lowerName = name.toLowerCase(); - if (!usedNames.has(lowerName)) { - usedNames.add(lowerName); - return name; - } - i++; - } - // names always contain a hash, so this is always unique - // we don't need to check usedNames nor add it - return a; -}; - -/** - * @param {Record} total total size - * @param {Record} size single size - * @returns {void} - */ -const addSizeTo = (total, size) => { - for (const key of Object.keys(size)) { - total[key] = (total[key] || 0) + size[key]; - } -}; - -/** - * @param {Record} total total size - * @param {Record} size single size - * @returns {void} - */ -const subtractSizeFrom = (total, size) => { - for (const key of Object.keys(size)) { - total[key] -= size[key]; - } -}; - -/** - * @param {Iterable} nodes some nodes - * @returns {Record} total size - */ -const sumSize = nodes => { - const sum = Object.create(null); - for (const node of nodes) { - addSizeTo(sum, node.size); - } - return sum; -}; - -const isTooBig = (size, maxSize) => { - for (const key of Object.keys(size)) { - const s = size[key]; - if (s === 0) continue; - const maxSizeValue = maxSize[key]; - if (typeof maxSizeValue === "number") { - if (s > maxSizeValue) return true; - } - } - return false; -}; - -const isTooSmall = (size, minSize) => { - for (const key of Object.keys(size)) { - const s = size[key]; - if (s === 0) continue; - const minSizeValue = minSize[key]; - if (typeof minSizeValue === "number") { - if (s < minSizeValue) return true; - } - } - return false; -}; - -const getTooSmallTypes = (size, minSize) => { - const types = new Set(); - for (const key of Object.keys(size)) { - const s = size[key]; - if (s === 0) continue; - const minSizeValue = minSize[key]; - if (typeof minSizeValue === "number") { - if (s < minSizeValue) types.add(key); - } - } - return types; -}; - -const getNumberOfMatchingSizeTypes = (size, types) => { - let i = 0; - for (const key of Object.keys(size)) { - if (size[key] !== 0 && types.has(key)) i++; - } - return i; -}; - -const selectiveSizeSum = (size, types) => { - let sum = 0; - for (const key of Object.keys(size)) { - if (size[key] !== 0 && types.has(key)) sum += size[key]; - } - return sum; -}; - -/** - * @template T - */ -class Node { - /** - * @param {T} item item - * @param {string} key key - * @param {Record} size size - */ - constructor(item, key, size) { - this.item = item; - this.key = key; - this.size = size; - } -} - -/** - * @template T - */ -class Group { - /** - * @param {Node[]} nodes nodes - * @param {number[]} similarities similarities between the nodes (length = nodes.length - 1) - * @param {Record=} size size of the group - */ - constructor(nodes, similarities, size) { - this.nodes = nodes; - this.similarities = similarities; - this.size = size || sumSize(nodes); - /** @type {string} */ - this.key = undefined; - } - - /** - * @param {function(Node): boolean} filter filter function - * @returns {Node[]} removed nodes - */ - popNodes(filter) { - const newNodes = []; - const newSimilarities = []; - const resultNodes = []; - let lastNode; - for (let i = 0; i < this.nodes.length; i++) { - const node = this.nodes[i]; - if (filter(node)) { - resultNodes.push(node); - } else { - if (newNodes.length > 0) { - newSimilarities.push( - lastNode === this.nodes[i - 1] - ? this.similarities[i - 1] - : similarity(lastNode.key, node.key) - ); - } - newNodes.push(node); - lastNode = node; - } - } - if (resultNodes.length === this.nodes.length) return undefined; - this.nodes = newNodes; - this.similarities = newSimilarities; - this.size = sumSize(newNodes); - return resultNodes; - } -} - -/** - * @param {Iterable} nodes nodes - * @returns {number[]} similarities - */ -const getSimilarities = nodes => { - // calculate similarities between lexically adjacent nodes - /** @type {number[]} */ - const similarities = []; - let last = undefined; - for (const node of nodes) { - if (last !== undefined) { - similarities.push(similarity(last.key, node.key)); - } - last = node; - } - return similarities; -}; - -/** - * @template T - * @typedef {Object} GroupedItems - * @property {string} key - * @property {T[]} items - * @property {Record} size - */ - -/** - * @template T - * @typedef {Object} Options - * @property {Record} maxSize maximum size of a group - * @property {Record} minSize minimum size of a group (preferred over maximum size) - * @property {Iterable} items a list of items - * @property {function(T): Record} getSize function to get size of an item - * @property {function(T): string} getKey function to get the key of an item - */ - -/** - * @template T - * @param {Options} options options object - * @returns {GroupedItems[]} grouped items - */ -module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { - /** @type {Group[]} */ - const result = []; - - const nodes = Array.from( - items, - item => new Node(item, getKey(item), getSize(item)) - ); - - /** @type {Node[]} */ - const initialNodes = []; - - // lexically ordering of keys - nodes.sort((a, b) => { - if (a.key < b.key) return -1; - if (a.key > b.key) return 1; - return 0; - }); - - // return nodes bigger than maxSize directly as group - // But make sure that minSize is not violated - for (const node of nodes) { - if (isTooBig(node.size, maxSize) && !isTooSmall(node.size, minSize)) { - result.push(new Group([node], [])); - } else { - initialNodes.push(node); - } - } - - if (initialNodes.length > 0) { - const initialGroup = new Group(initialNodes, getSimilarities(initialNodes)); - - const removeProblematicNodes = (group, consideredSize = group.size) => { - const problemTypes = getTooSmallTypes(consideredSize, minSize); - if (problemTypes.size > 0) { - // We hit an edge case where the working set is already smaller than minSize - // We merge problematic nodes with the smallest result node to keep minSize intact - const problemNodes = group.popNodes( - n => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0 - ); - if (problemNodes === undefined) return false; - // Only merge it with result nodes that have the problematic size type - const possibleResultGroups = result.filter( - n => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0 - ); - if (possibleResultGroups.length > 0) { - const bestGroup = possibleResultGroups.reduce((min, group) => { - const minMatches = getNumberOfMatchingSizeTypes(min, problemTypes); - const groupMatches = getNumberOfMatchingSizeTypes( - group, - problemTypes - ); - if (minMatches !== groupMatches) - return minMatches < groupMatches ? group : min; - if ( - selectiveSizeSum(min.size, problemTypes) > - selectiveSizeSum(group.size, problemTypes) - ) - return group; - return min; - }); - for (const node of problemNodes) bestGroup.nodes.push(node); - bestGroup.nodes.sort((a, b) => { - if (a.key < b.key) return -1; - if (a.key > b.key) return 1; - return 0; - }); - } else { - // There are no other nodes with the same size types - // We create a new group and have to accept that it's smaller than minSize - result.push(new Group(problemNodes, null)); - } - return true; - } else { - return false; - } - }; - - if (initialGroup.nodes.length > 0) { - const queue = [initialGroup]; - - while (queue.length) { - const group = queue.pop(); - // only groups bigger than maxSize need to be splitted - if (!isTooBig(group.size, maxSize)) { - result.push(group); - continue; - } - // If the group is already too small - // we try to work only with the unproblematic nodes - if (removeProblematicNodes(group)) { - // This changed something, so we try this group again - queue.push(group); - continue; - } - - // find unsplittable area from left and right - // going minSize from left and right - // at least one node need to be included otherwise we get stuck - let left = 1; - let leftSize = Object.create(null); - addSizeTo(leftSize, group.nodes[0].size); - while (left < group.nodes.length && isTooSmall(leftSize, minSize)) { - addSizeTo(leftSize, group.nodes[left].size); - left++; - } - let right = group.nodes.length - 2; - let rightSize = Object.create(null); - addSizeTo(rightSize, group.nodes[group.nodes.length - 1].size); - while (right >= 0 && isTooSmall(rightSize, minSize)) { - addSizeTo(rightSize, group.nodes[right].size); - right--; - } - - // left v v right - // [ O O O ] O O O [ O O O ] - // ^^^^^^^^^ leftSize - // rightSize ^^^^^^^^^ - // leftSize > minSize - // rightSize > minSize - - // Perfect split: [ O O O ] [ O O O ] - // right === left - 1 - - if (left - 1 > right) { - // We try to remove some problematic nodes to "fix" that - let prevSize; - if (right < group.nodes.length - left) { - subtractSizeFrom(rightSize, group.nodes[right + 1].size); - prevSize = rightSize; - } else { - subtractSizeFrom(leftSize, group.nodes[left - 1].size); - prevSize = leftSize; - } - if (removeProblematicNodes(group, prevSize)) { - // This changed something, so we try this group again - queue.push(group); - continue; - } - // can't split group while holding minSize - // because minSize is preferred of maxSize we return - // the problematic nodes as result here even while it's too big - // To avoid this make sure maxSize > minSize * 3 - result.push(group); - continue; - } - if (left <= right) { - // when there is a area between left and right - // we look for best split point - // we split at the minimum similarity - // here key space is separated the most - // But we also need to make sure to not create too small groups - let best = -1; - let bestSimilarity = Infinity; - let pos = left; - let rightSize = sumSize(group.nodes.slice(pos)); - - // pos v v right - // [ O O O ] O O O [ O O O ] - // ^^^^^^^^^ leftSize - // rightSize ^^^^^^^^^^^^^^^ - - while (pos <= right + 1) { - const similarity = group.similarities[pos - 1]; - if ( - similarity < bestSimilarity && - !isTooSmall(leftSize, minSize) && - !isTooSmall(rightSize, minSize) - ) { - best = pos; - bestSimilarity = similarity; - } - addSizeTo(leftSize, group.nodes[pos].size); - subtractSizeFrom(rightSize, group.nodes[pos].size); - pos++; - } - if (best < 0) { - // This can't happen - // but if that assumption is wrong - // fallback to a big group - result.push(group); - continue; - } - left = best; - right = best - 1; - } - - // create two new groups for left and right area - // and queue them up - const rightNodes = [group.nodes[right + 1]]; - /** @type {number[]} */ - const rightSimilarities = []; - for (let i = right + 2; i < group.nodes.length; i++) { - rightSimilarities.push(group.similarities[i - 1]); - rightNodes.push(group.nodes[i]); - } - queue.push(new Group(rightNodes, rightSimilarities)); - - const leftNodes = [group.nodes[0]]; - /** @type {number[]} */ - const leftSimilarities = []; - for (let i = 1; i < left; i++) { - leftSimilarities.push(group.similarities[i - 1]); - leftNodes.push(group.nodes[i]); - } - queue.push(new Group(leftNodes, leftSimilarities)); - } - } - } - - // lexically ordering - result.sort((a, b) => { - if (a.nodes[0].key < b.nodes[0].key) return -1; - if (a.nodes[0].key > b.nodes[0].key) return 1; - return 0; - }); - - // give every group a name - const usedNames = new Set(); - for (let i = 0; i < result.length; i++) { - const group = result[i]; - if (group.nodes.length === 1) { - group.key = group.nodes[0].key; - } else { - const first = group.nodes[0]; - const last = group.nodes[group.nodes.length - 1]; - const name = getName(first.key, last.key, usedNames); - group.key = name; - } - } - - // return the results - return result.map(group => { - /** @type {GroupedItems} */ - return { - key: group.key, - items: group.nodes.map(node => node.item), - size: group.size - }; - }); -}; - - -/***/ }), - -/***/ 45045: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sam Chen @chenxsan -*/ - - - -/** - * @param {string} urlAndGlobal the script request - * @returns {string[]} script url and its global variable - */ -module.exports = function extractUrlAndGlobal(urlAndGlobal) { - const index = urlAndGlobal.indexOf("@"); - if (index <= 0 || index === urlAndGlobal.length - 1) { - throw new Error(`Invalid request "${urlAndGlobal}"`); - } - return [urlAndGlobal.substring(index + 1), urlAndGlobal.substring(0, index)]; -}; - - -/***/ }), - -/***/ 30584: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const NO_MARKER = 0; -const IN_PROGRESS_MARKER = 1; -const DONE_MARKER = 2; -const DONE_MAYBE_ROOT_CYCLE_MARKER = 3; -const DONE_AND_ROOT_MARKER = 4; - -/** - * @template T - */ -class Node { - /** - * @param {T} item the value of the node - */ - constructor(item) { - this.item = item; - /** @type {Set>} */ - this.dependencies = new Set(); - this.marker = NO_MARKER; - /** @type {Cycle | undefined} */ - this.cycle = undefined; - this.incoming = 0; - } -} - -/** - * @template T - */ -class Cycle { - constructor() { - /** @type {Set>} */ - this.nodes = new Set(); - } -} - -/** - * @template T - * @typedef {Object} StackEntry - * @property {Node} node - * @property {Node[]} openEdges - */ - -/** - * @template T - * @param {Iterable} items list of items - * @param {function(T): Iterable} getDependencies function to get dependencies of an item (items that are not in list are ignored) - * @returns {Iterable} graph roots of the items - */ -module.exports = (items, getDependencies) => { - /** @type {Map>} */ - const itemToNode = new Map(); - for (const item of items) { - const node = new Node(item); - itemToNode.set(item, node); - } - - // early exit when there is only a single item - if (itemToNode.size <= 1) return items; - - // grab all the dependencies - for (const node of itemToNode.values()) { - for (const dep of getDependencies(node.item)) { - const depNode = itemToNode.get(dep); - if (depNode !== undefined) { - node.dependencies.add(depNode); - } - } - } - - // Set of current root modules - // items will be removed if a new reference to it has been found - /** @type {Set>} */ - const roots = new Set(); - - // Set of current cycles without references to it - // cycles will be removed if a new reference to it has been found - // that is not part of the cycle - /** @type {Set>} */ - const rootCycles = new Set(); - - // For all non-marked nodes - for (const selectedNode of itemToNode.values()) { - if (selectedNode.marker === NO_MARKER) { - // deep-walk all referenced modules - // in a non-recursive way - - // start by entering the selected node - selectedNode.marker = IN_PROGRESS_MARKER; - - // keep a stack to avoid recursive walk - /** @type {StackEntry[]} */ - const stack = [ - { - node: selectedNode, - openEdges: Array.from(selectedNode.dependencies) - } - ]; - - // process the top item until stack is empty - while (stack.length > 0) { - const topOfStack = stack[stack.length - 1]; - - // Are there still edges unprocessed in the current node? - if (topOfStack.openEdges.length > 0) { - // Process one dependency - const dependency = topOfStack.openEdges.pop(); - switch (dependency.marker) { - case NO_MARKER: - // dependency has not be visited yet - // mark it as in-progress and recurse - stack.push({ - node: dependency, - openEdges: Array.from(dependency.dependencies) - }); - dependency.marker = IN_PROGRESS_MARKER; - break; - case IN_PROGRESS_MARKER: { - // It's a in-progress cycle - let cycle = dependency.cycle; - if (!cycle) { - cycle = new Cycle(); - cycle.nodes.add(dependency); - dependency.cycle = cycle; - } - // set cycle property for each node in the cycle - // if nodes are already part of a cycle - // we merge the cycles to a shared cycle - for ( - let i = stack.length - 1; - stack[i].node !== dependency; - i-- - ) { - const node = stack[i].node; - if (node.cycle) { - if (node.cycle !== cycle) { - // merge cycles - for (const cycleNode of node.cycle.nodes) { - cycleNode.cycle = cycle; - cycle.nodes.add(cycleNode); - } - } - } else { - node.cycle = cycle; - cycle.nodes.add(node); - } - } - // don't recurse into dependencies - // these are already on the stack - break; - } - case DONE_AND_ROOT_MARKER: - // This node has be visited yet and is currently a root node - // But as this is a new reference to the node - // it's not really a root - // so we have to convert it to a normal node - dependency.marker = DONE_MARKER; - roots.delete(dependency); - break; - case DONE_MAYBE_ROOT_CYCLE_MARKER: - // This node has be visited yet and - // is maybe currently part of a completed root cycle - // we found a new reference to the cycle - // so it's not really a root cycle - // remove the cycle from the root cycles - // and convert it to a normal node - rootCycles.delete(dependency.cycle); - dependency.marker = DONE_MARKER; - break; - // DONE_MARKER: nothing to do, don't recurse into dependencies - } - } else { - // All dependencies of the current node has been visited - // we leave the node - stack.pop(); - topOfStack.node.marker = DONE_MARKER; - } - } - const cycle = selectedNode.cycle; - if (cycle) { - for (const node of cycle.nodes) { - node.marker = DONE_MAYBE_ROOT_CYCLE_MARKER; - } - rootCycles.add(cycle); - } else { - selectedNode.marker = DONE_AND_ROOT_MARKER; - roots.add(selectedNode); - } - } - } - - // Extract roots from root cycles - // We take the nodes with most incoming edges - // inside of the cycle - for (const cycle of rootCycles) { - let max = 0; - /** @type {Set>} */ - const cycleRoots = new Set(); - const nodes = cycle.nodes; - for (const node of nodes) { - for (const dep of node.dependencies) { - if (nodes.has(dep)) { - dep.incoming++; - if (dep.incoming < max) continue; - if (dep.incoming > max) { - cycleRoots.clear(); - max = dep.incoming; - } - cycleRoots.add(dep); - } - } - } - for (const cycleRoot of cycleRoots) { - roots.add(cycleRoot); - } - } - - // When roots were found, return them - if (roots.size > 0) { - return Array.from(roots, r => r.item); - } else { - throw new Error("Implementation of findGraphRoots is broken"); - } -}; - - -/***/ }), - -/***/ 47077: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const path = __webpack_require__(71017); - -/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */ -/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ - -/** - * @typedef {Object} IStats - * @property {() => boolean} isFile - * @property {() => boolean} isDirectory - * @property {() => boolean} isBlockDevice - * @property {() => boolean} isCharacterDevice - * @property {() => boolean} isSymbolicLink - * @property {() => boolean} isFIFO - * @property {() => boolean} isSocket - * @property {number | bigint} dev - * @property {number | bigint} ino - * @property {number | bigint} mode - * @property {number | bigint} nlink - * @property {number | bigint} uid - * @property {number | bigint} gid - * @property {number | bigint} rdev - * @property {number | bigint} size - * @property {number | bigint} blksize - * @property {number | bigint} blocks - * @property {number | bigint} atimeMs - * @property {number | bigint} mtimeMs - * @property {number | bigint} ctimeMs - * @property {number | bigint} birthtimeMs - * @property {Date} atime - * @property {Date} mtime - * @property {Date} ctime - * @property {Date} birthtime - */ - -/** - * @typedef {Object} IDirent - * @property {() => boolean} isFile - * @property {() => boolean} isDirectory - * @property {() => boolean} isBlockDevice - * @property {() => boolean} isCharacterDevice - * @property {() => boolean} isSymbolicLink - * @property {() => boolean} isFIFO - * @property {() => boolean} isSocket - * @property {string | Buffer} name - */ - -/** @typedef {function((NodeJS.ErrnoException | null)=): void} Callback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, Buffer=): void} BufferCallback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, Buffer|string=): void} BufferOrStringCallback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, (string | Buffer)[] | IDirent[]=): void} DirentArrayCallback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, string=): void} StringCallback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, number=): void} NumberCallback */ -/** @typedef {function((NodeJS.ErrnoException | null)=, IStats=): void} StatsCallback */ -/** @typedef {function((NodeJS.ErrnoException | Error | null)=, any=): void} ReadJsonCallback */ -/** @typedef {function((NodeJS.ErrnoException | Error | null)=, IStats|string=): void} LstatReadlinkAbsoluteCallback */ - -/** - * @typedef {Object} WatcherInfo - * @property {Set} changes get current aggregated changes that have not yet send to callback - * @property {Set} removals get current aggregated removals that have not yet send to callback - * @property {Map} fileTimeInfoEntries get info about files - * @property {Map} contextTimeInfoEntries get info about directories - */ - -// TODO webpack 6 deprecate missing getInfo -/** - * @typedef {Object} Watcher - * @property {function(): void} close closes the watcher and all underlying file watchers - * @property {function(): void} pause closes the watcher, but keeps underlying file watchers alive until the next watch call - * @property {function(): Set=} getAggregatedChanges get current aggregated changes that have not yet send to callback - * @property {function(): Set=} getAggregatedRemovals get current aggregated removals that have not yet send to callback - * @property {function(): Map} getFileTimeInfoEntries get info about files - * @property {function(): Map} getContextTimeInfoEntries get info about directories - * @property {function(): WatcherInfo=} getInfo get info about timestamps and changes - */ - -/** - * @callback WatchMethod - * @param {Iterable} files watched files - * @param {Iterable} directories watched directories - * @param {Iterable} missing watched exitance entries - * @param {number} startTime timestamp of start time - * @param {WatchOptions} options options object - * @param {function(Error=, Map, Map, Set, Set): void} callback aggregated callback - * @param {function(string, number): void} callbackUndelayed callback when the first change was detected - * @returns {Watcher} a watcher - */ - -// TODO webpack 6 make optional methods required - -/** - * @typedef {Object} OutputFileSystem - * @property {function(string, Buffer|string, Callback): void} writeFile - * @property {function(string, Callback): void} mkdir - * @property {function(string, DirentArrayCallback): void=} readdir - * @property {function(string, Callback): void=} rmdir - * @property {function(string, Callback): void=} unlink - * @property {function(string, StatsCallback): void} stat - * @property {function(string, StatsCallback): void=} lstat - * @property {function(string, BufferOrStringCallback): void} readFile - * @property {(function(string, string): string)=} join - * @property {(function(string, string): string)=} relative - * @property {(function(string): string)=} dirname - */ - -/** - * @typedef {Object} InputFileSystem - * @property {function(string, BufferOrStringCallback): void} readFile - * @property {(function(string, ReadJsonCallback): void)=} readJson - * @property {function(string, BufferOrStringCallback): void} readlink - * @property {function(string, DirentArrayCallback): void} readdir - * @property {function(string, StatsCallback): void} stat - * @property {function(string, StatsCallback): void=} lstat - * @property {(function(string, BufferOrStringCallback): void)=} realpath - * @property {(function(string=): void)=} purge - * @property {(function(string, string): string)=} join - * @property {(function(string, string): string)=} relative - * @property {(function(string): string)=} dirname - */ - -/** - * @typedef {Object} WatchFileSystem - * @property {WatchMethod} watch - */ - -/** - * @typedef {Object} IntermediateFileSystemExtras - * @property {function(string): void} mkdirSync - * @property {function(string): NodeJS.WritableStream} createWriteStream - * @property {function(string, string, NumberCallback): void} open - * @property {function(number, Buffer, number, number, number, NumberCallback): void} read - * @property {function(number, Callback): void} close - * @property {function(string, string, Callback): void} rename - */ - -/** @typedef {InputFileSystem & OutputFileSystem & IntermediateFileSystemExtras} IntermediateFileSystem */ - -/** - * - * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system - * @param {string} rootPath the root path - * @param {string} targetPath the target path - * @returns {string} location of targetPath relative to rootPath - */ -const relative = (fs, rootPath, targetPath) => { - if (fs && fs.relative) { - return fs.relative(rootPath, targetPath); - } else if (path.posix.isAbsolute(rootPath)) { - return path.posix.relative(rootPath, targetPath); - } else if (path.win32.isAbsolute(rootPath)) { - return path.win32.relative(rootPath, targetPath); - } else { - throw new Error( - `${rootPath} is neither a posix nor a windows path, and there is no 'relative' method defined in the file system` - ); - } -}; -exports.relative = relative; - -/** - * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system - * @param {string} rootPath a path - * @param {string} filename a filename - * @returns {string} the joined path - */ -const join = (fs, rootPath, filename) => { - if (fs && fs.join) { - return fs.join(rootPath, filename); - } else if (path.posix.isAbsolute(rootPath)) { - return path.posix.join(rootPath, filename); - } else if (path.win32.isAbsolute(rootPath)) { - return path.win32.join(rootPath, filename); - } else { - throw new Error( - `${rootPath} is neither a posix nor a windows path, and there is no 'join' method defined in the file system` - ); - } -}; -exports.join = join; - -/** - * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system - * @param {string} absPath an absolute path - * @returns {string} the parent directory of the absolute path - */ -const dirname = (fs, absPath) => { - if (fs && fs.dirname) { - return fs.dirname(absPath); - } else if (path.posix.isAbsolute(absPath)) { - return path.posix.dirname(absPath); - } else if (path.win32.isAbsolute(absPath)) { - return path.win32.dirname(absPath); - } else { - throw new Error( - `${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system` - ); - } -}; -exports.dirname = dirname; - -/** - * @param {OutputFileSystem} fs a file system - * @param {string} p an absolute path - * @param {function(Error=): void} callback callback function for the error - * @returns {void} - */ -const mkdirp = (fs, p, callback) => { - fs.mkdir(p, err => { - if (err) { - if (err.code === "ENOENT") { - const dir = dirname(fs, p); - if (dir === p) { - callback(err); - return; - } - mkdirp(fs, dir, err => { - if (err) { - callback(err); - return; - } - fs.mkdir(p, err => { - if (err) { - if (err.code === "EEXIST") { - callback(); - return; - } - callback(err); - return; - } - callback(); - }); - }); - return; - } else if (err.code === "EEXIST") { - callback(); - return; - } - callback(err); - return; - } - callback(); - }); -}; -exports.mkdirp = mkdirp; - -/** - * @param {IntermediateFileSystem} fs a file system - * @param {string} p an absolute path - * @returns {void} - */ -const mkdirpSync = (fs, p) => { - try { - fs.mkdirSync(p); - } catch (err) { - if (err) { - if (err.code === "ENOENT") { - const dir = dirname(fs, p); - if (dir === p) { - throw err; - } - mkdirpSync(fs, dir); - fs.mkdirSync(p); - return; - } else if (err.code === "EEXIST") { - return; - } - throw err; - } - } -}; -exports.mkdirpSync = mkdirpSync; - -/** - * @param {InputFileSystem} fs a file system - * @param {string} p an absolute path - * @param {ReadJsonCallback} callback callback - * @returns {void} - */ -const readJson = (fs, p, callback) => { - if ("readJson" in fs) return fs.readJson(p, callback); - fs.readFile(p, (err, buf) => { - if (err) return callback(err); - let data; - try { - data = JSON.parse(buf.toString("utf-8")); - } catch (e) { - return callback(e); - } - return callback(null, data); - }); -}; -exports.readJson = readJson; - -/** - * @param {InputFileSystem} fs a file system - * @param {string} p an absolute path - * @param {ReadJsonCallback} callback callback - * @returns {void} - */ -const lstatReadlinkAbsolute = (fs, p, callback) => { - let i = 3; - const doReadLink = () => { - fs.readlink(p, (err, target) => { - if (err && --i > 0) { - // It might was just changed from symlink to file - // we retry 2 times to catch this case before throwing the error - return doStat(); - } - if (err || !target) return doStat(); - const value = target.toString(); - callback(null, join(fs, dirname(fs, p), value)); - }); - }; - const doStat = () => { - if ("lstat" in fs) { - return fs.lstat(p, (err, stats) => { - if (err) return callback(err); - if (stats.isSymbolicLink()) { - return doReadLink(); - } - callback(null, stats); - }); - } else { - return fs.stat(p, callback); - } - }; - if ("lstat" in fs) return doStat(); - doReadLink(); -}; -exports.lstatReadlinkAbsolute = lstatReadlinkAbsolute; - - -/***/ }), - -/***/ 86406: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Hash = __webpack_require__(14577); -const MAX_SHORT_STRING = (__webpack_require__(726).MAX_SHORT_STRING); - -class BatchedHash extends Hash { - constructor(hash) { - super(); - this.string = undefined; - this.encoding = undefined; - this.hash = hash; - } - - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if (this.string !== undefined) { - if ( - typeof data === "string" && - inputEncoding === this.encoding && - this.string.length + data.length < MAX_SHORT_STRING - ) { - this.string += data; - return this; - } - this.hash.update(this.string, this.encoding); - this.string = undefined; - } - if (typeof data === "string") { - if ( - data.length < MAX_SHORT_STRING && - // base64 encoding is not valid since it may contain padding chars - (!inputEncoding || !inputEncoding.startsWith("ba")) - ) { - this.string = data; - this.encoding = inputEncoding; - } else { - this.hash.update(data, inputEncoding); - } - } else { - this.hash.update(data); - } - return this; - } - - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - if (this.string !== undefined) { - this.hash.update(this.string, this.encoding); - } - return this.hash.digest(encoding); - } -} - -module.exports = BatchedHash; - - -/***/ }), - -/***/ 44829: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const create = __webpack_require__(726); - -//#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1 -const md4 = new WebAssembly.Module( - Buffer.from( - // 2156 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqLEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvSCgEZfyMBIQUjAiECIwMhAyMEIQQDQCAAIAFLBEAgASgCJCISIAEoAiAiEyABKAIcIgkgASgCGCIIIAEoAhQiByABKAIQIg4gASgCDCIGIAEoAggiDyABKAIEIhAgASgCACIRIAMgBHMgAnEgBHMgBWpqQQN3IgogAiADc3EgA3MgBGpqQQd3IgsgAiAKc3EgAnMgA2pqQQt3IgwgCiALc3EgCnMgAmpqQRN3Ig0gCyAMc3EgC3MgCmpqQQN3IgogDCANc3EgDHMgC2pqQQd3IgsgCiANc3EgDXMgDGpqQQt3IgwgCiALc3EgCnMgDWpqQRN3Ig0gCyAMc3EgC3MgCmpqQQN3IhQgDCANc3EgDHMgC2pqQQd3IRUgASgCLCILIAEoAigiCiAMIA0gDSAUcyAVcXNqakELdyIWIBQgFXNxIBRzIA1qakETdyEXIAEoAjQiGCABKAIwIhkgFSAWcyAXcSAVcyAUampBA3ciFCAWIBdzcSAWcyAVampBB3chFSABKAI8Ig0gASgCOCIMIBQgF3MgFXEgF3MgFmpqQQt3IhYgFCAVc3EgFHMgF2pqQRN3IRcgEyAOIBEgFCAVIBZyIBdxIBUgFnFyampBmfOJ1AVqQQN3IhQgFiAXcnEgFiAXcXIgFWpqQZnzidQFakEFdyIVIBQgF3JxIBQgF3FyIBZqakGZ84nUBWpBCXchFiAPIBggEiAWIAcgFSAQIBQgGSAUIBVyIBZxIBQgFXFyIBdqakGZ84nUBWpBDXciFCAVIBZycSAVIBZxcmpqQZnzidQFakEDdyIVIBQgFnJxIBQgFnFyampBmfOJ1AVqQQV3IhcgFCAVcnEgFCAVcXJqakGZ84nUBWpBCXciFiAVIBdycSAVIBdxciAUampBmfOJ1AVqQQ13IhQgFiAXcnEgFiAXcXIgFWpqQZnzidQFakEDdyEVIBEgBiAVIAwgFCAKIBYgCCAUIBZyIBVxIBQgFnFyIBdqakGZ84nUBWpBBXciFyAUIBVycSAUIBVxcmpqQZnzidQFakEJdyIWIBUgF3JxIBUgF3FyampBmfOJ1AVqQQ13IhQgFiAXcnEgFiAXcXJqakGZ84nUBWpBA3ciFSALIBYgCSAUIBZyIBVxIBQgFnFyIBdqakGZ84nUBWpBBXciFiAUIBVycSAUIBVxcmpqQZnzidQFakEJdyIXIA0gFSAWciAXcSAVIBZxciAUampBmfOJ1AVqQQ13IhRzIBZzampBodfn9gZqQQN3IREgByAIIA4gFCARIBcgESAUc3MgFmogE2pBodfn9gZqQQl3IhNzcyAXampBodfn9gZqQQt3Ig4gDyARIBMgDiARIA4gE3NzIBRqIBlqQaHX5/YGakEPdyIRc3NqakGh1+f2BmpBA3ciDyAOIA8gEXNzIBNqIApqQaHX5/YGakEJdyIKcyARc2pqQaHX5/YGakELdyIIIBAgDyAKIAggDCAPIAggCnNzIBFqakGh1+f2BmpBD3ciDHNzampBodfn9gZqQQN3Ig4gEiAIIAwgDnNzIApqakGh1+f2BmpBCXciCHMgDHNqakGh1+f2BmpBC3chByAFIAYgCCAHIBggDiAHIAhzcyAMampBodfn9gZqQQ93IgpzcyAOampBodfn9gZqQQN3IgZqIQUgDSAGIAkgByAGIAsgByAGIApzcyAIampBodfn9gZqQQl3IgdzIApzampBodfn9gZqQQt3IgYgB3NzIApqakGh1+f2BmpBD3cgAmohAiADIAZqIQMgBCAHaiEEIAFBQGshAQwBCwsgBSQBIAIkAiADJAMgBCQECw0AIAAQASAAIwBqJAAL/wQCA38BfiAAIwBqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", - "base64" - ) -); -//#endregion - -module.exports = create.bind(null, md4, [], 64, 32); - - -/***/ }), - -/***/ 726: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -// 65536 is the size of a wasm memory page -// 64 is the maximum chunk size for every possible wasm hash implementation -// 4 is the maximum number of bytes per char for string encoding (max is utf-8) -// ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64 -const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3; - -class WasmHash { - /** - * @param {WebAssembly.Instance} instance wasm instance - * @param {WebAssembly.Instance[]} instancesPool pool of instances - * @param {number} chunkSize size of data chunks passed to wasm - * @param {number} digestSize size of digest returned by wasm - */ - constructor(instance, instancesPool, chunkSize, digestSize) { - const exports = /** @type {any} */ (instance.exports); - exports.init(); - this.exports = exports; - this.mem = Buffer.from(exports.memory.buffer, 0, 65536); - this.buffered = 0; - this.instancesPool = instancesPool; - this.chunkSize = chunkSize; - this.digestSize = digestSize; - } - - reset() { - this.buffered = 0; - this.exports.init(); - } - - /** - * @param {Buffer | string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {this} itself - */ - update(data, encoding) { - if (typeof data === "string") { - while (data.length > MAX_SHORT_STRING) { - this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding); - data = data.slice(MAX_SHORT_STRING); - } - this._updateWithShortString(data, encoding); - return this; - } - this._updateWithBuffer(data); - return this; - } - - /** - * @param {string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {void} - */ - _updateWithShortString(data, encoding) { - const { exports, buffered, mem, chunkSize } = this; - let endPos; - if (data.length < 70) { - if (!encoding || encoding === "utf-8" || encoding === "utf8") { - endPos = buffered; - for (let i = 0; i < data.length; i++) { - const cc = data.charCodeAt(i); - if (cc < 0x80) mem[endPos++] = cc; - else if (cc < 0x800) { - mem[endPos] = (cc >> 6) | 0xc0; - mem[endPos + 1] = (cc & 0x3f) | 0x80; - endPos += 2; - } else { - // bail-out for weird chars - endPos += mem.write(data.slice(i), endPos, encoding); - break; - } - } - } else if (encoding === "latin1") { - endPos = buffered; - for (let i = 0; i < data.length; i++) { - const cc = data.charCodeAt(i); - mem[endPos++] = cc; - } - } else { - endPos = buffered + mem.write(data, buffered, encoding); - } - } else { - endPos = buffered + mem.write(data, buffered, encoding); - } - if (endPos < chunkSize) { - this.buffered = endPos; - } else { - const l = endPos & ~(this.chunkSize - 1); - exports.update(l); - const newBuffered = endPos - l; - this.buffered = newBuffered; - if (newBuffered > 0) mem.copyWithin(0, l, endPos); - } - } - - /** - * @param {Buffer} data data - * @returns {void} - */ - _updateWithBuffer(data) { - const { exports, buffered, mem } = this; - const length = data.length; - if (buffered + length < this.chunkSize) { - data.copy(mem, buffered, 0, length); - this.buffered += length; - } else { - const l = (buffered + length) & ~(this.chunkSize - 1); - if (l > 65536) { - let i = 65536 - buffered; - data.copy(mem, buffered, 0, i); - exports.update(65536); - const stop = l - buffered - 65536; - while (i < stop) { - data.copy(mem, 0, i, i + 65536); - exports.update(65536); - i += 65536; - } - data.copy(mem, 0, i, l - buffered); - exports.update(l - buffered - i); - } else { - data.copy(mem, buffered, 0, l - buffered); - exports.update(l); - } - const newBuffered = length + buffered - l; - this.buffered = newBuffered; - if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length); - } - } - - digest(type) { - const { exports, buffered, mem, digestSize } = this; - exports.final(buffered); - this.instancesPool.push(this); - const hex = mem.toString("latin1", 0, digestSize); - if (type === "hex") return hex; - if (type === "binary" || !type) return Buffer.from(hex, "hex"); - return Buffer.from(hex, "hex").toString(type); - } -} - -const create = (wasmModule, instancesPool, chunkSize, digestSize) => { - if (instancesPool.length > 0) { - const old = instancesPool.pop(); - old.reset(); - return old; - } else { - return new WasmHash( - new WebAssembly.Instance(wasmModule), - instancesPool, - chunkSize, - digestSize - ); - } -}; - -module.exports = create; -module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING; - - -/***/ }), - -/***/ 29518: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const create = __webpack_require__(726); - -//#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1 -const xxhash64 = new WebAssembly.Module( - Buffer.from( - // 1170 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrIIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqAYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEAgAiABNQIAQoeVr6+Ytt6bnn9+hUIXiULP1tO+0ser2UJ+Qvnz3fGZ9pmrFnwhAiABQQRqIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAkIdiCAChUL5893xmfaZqxZ+IgJCIIggAoUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", - "base64" - ) -); -//#endregion - -module.exports = create.bind(null, xxhash64, [], 32, 16); - - -/***/ }), - -/***/ 20162: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const path = __webpack_require__(71017); - -const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/; -const SEGMENTS_SPLIT_REGEXP = /([|!])/; -const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g; - -/** - * @typedef {Object} MakeRelativePathsCache - * @property {Map>=} relativePaths - */ - -const relativePathToRequest = relativePath => { - if (relativePath === "") return "./."; - if (relativePath === "..") return "../."; - if (relativePath.startsWith("../")) return relativePath; - return `./${relativePath}`; -}; - -/** - * @param {string} context context for relative path - * @param {string} maybeAbsolutePath path to make relative - * @returns {string} relative path in request style - */ -const absoluteToRequest = (context, maybeAbsolutePath) => { - if (maybeAbsolutePath[0] === "/") { - if ( - maybeAbsolutePath.length > 1 && - maybeAbsolutePath[maybeAbsolutePath.length - 1] === "/" - ) { - // this 'path' is actually a regexp generated by dynamic requires. - // Don't treat it as an absolute path. - return maybeAbsolutePath; - } - - const querySplitPos = maybeAbsolutePath.indexOf("?"); - let resource = - querySplitPos === -1 - ? maybeAbsolutePath - : maybeAbsolutePath.slice(0, querySplitPos); - resource = relativePathToRequest(path.posix.relative(context, resource)); - return querySplitPos === -1 - ? resource - : resource + maybeAbsolutePath.slice(querySplitPos); - } - - if (WINDOWS_ABS_PATH_REGEXP.test(maybeAbsolutePath)) { - const querySplitPos = maybeAbsolutePath.indexOf("?"); - let resource = - querySplitPos === -1 - ? maybeAbsolutePath - : maybeAbsolutePath.slice(0, querySplitPos); - resource = path.win32.relative(context, resource); - if (!WINDOWS_ABS_PATH_REGEXP.test(resource)) { - resource = relativePathToRequest( - resource.replace(WINDOWS_PATH_SEPARATOR_REGEXP, "/") - ); - } - return querySplitPos === -1 - ? resource - : resource + maybeAbsolutePath.slice(querySplitPos); - } - - // not an absolute path - return maybeAbsolutePath; -}; - -/** - * @param {string} context context for relative path - * @param {string} relativePath path - * @returns {string} absolute path - */ -const requestToAbsolute = (context, relativePath) => { - if (relativePath.startsWith("./") || relativePath.startsWith("../")) - return path.join(context, relativePath); - return relativePath; -}; - -const makeCacheable = realFn => { - /** @type {WeakMap>} */ - const cache = new WeakMap(); - - const getCache = associatedObjectForCache => { - const entry = cache.get(associatedObjectForCache); - if (entry !== undefined) return entry; - /** @type {Map} */ - const map = new Map(); - cache.set(associatedObjectForCache, map); - return map; - }; - - /** - * @param {string} str the path with query and fragment - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {ParsedResource} parsed parts - */ - const fn = (str, associatedObjectForCache) => { - if (!associatedObjectForCache) return realFn(str); - const cache = getCache(associatedObjectForCache); - const entry = cache.get(str); - if (entry !== undefined) return entry; - const result = realFn(str); - cache.set(str, result); - return result; - }; - - fn.bindCache = associatedObjectForCache => { - const cache = getCache(associatedObjectForCache); - return str => { - const entry = cache.get(str); - if (entry !== undefined) return entry; - const result = realFn(str); - cache.set(str, result); - return result; - }; - }; - - return fn; -}; - -const makeCacheableWithContext = fn => { - /** @type {WeakMap>>} */ - const cache = new WeakMap(); - - /** - * @param {string} context context used to create relative path - * @param {string} identifier identifier used to create relative path - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {string} the returned relative path - */ - const cachedFn = (context, identifier, associatedObjectForCache) => { - if (!associatedObjectForCache) return fn(context, identifier); - - let innerCache = cache.get(associatedObjectForCache); - if (innerCache === undefined) { - innerCache = new Map(); - cache.set(associatedObjectForCache, innerCache); - } - - let cachedResult; - let innerSubCache = innerCache.get(context); - if (innerSubCache === undefined) { - innerCache.set(context, (innerSubCache = new Map())); - } else { - cachedResult = innerSubCache.get(identifier); - } - - if (cachedResult !== undefined) { - return cachedResult; - } else { - const result = fn(context, identifier); - innerSubCache.set(identifier, result); - return result; - } - }; - - /** - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {function(string, string): string} cached function - */ - cachedFn.bindCache = associatedObjectForCache => { - let innerCache; - if (associatedObjectForCache) { - innerCache = cache.get(associatedObjectForCache); - if (innerCache === undefined) { - innerCache = new Map(); - cache.set(associatedObjectForCache, innerCache); - } - } else { - innerCache = new Map(); - } - - /** - * @param {string} context context used to create relative path - * @param {string} identifier identifier used to create relative path - * @returns {string} the returned relative path - */ - const boundFn = (context, identifier) => { - let cachedResult; - let innerSubCache = innerCache.get(context); - if (innerSubCache === undefined) { - innerCache.set(context, (innerSubCache = new Map())); - } else { - cachedResult = innerSubCache.get(identifier); - } - - if (cachedResult !== undefined) { - return cachedResult; - } else { - const result = fn(context, identifier); - innerSubCache.set(identifier, result); - return result; - } - }; - - return boundFn; - }; - - /** - * @param {string} context context used to create relative path - * @param {Object=} associatedObjectForCache an object to which the cache will be attached - * @returns {function(string): string} cached function - */ - cachedFn.bindContextCache = (context, associatedObjectForCache) => { - let innerSubCache; - if (associatedObjectForCache) { - let innerCache = cache.get(associatedObjectForCache); - if (innerCache === undefined) { - innerCache = new Map(); - cache.set(associatedObjectForCache, innerCache); - } - - innerSubCache = innerCache.get(context); - if (innerSubCache === undefined) { - innerCache.set(context, (innerSubCache = new Map())); - } - } else { - innerSubCache = new Map(); - } - - /** - * @param {string} identifier identifier used to create relative path - * @returns {string} the returned relative path - */ - const boundFn = identifier => { - const cachedResult = innerSubCache.get(identifier); - if (cachedResult !== undefined) { - return cachedResult; - } else { - const result = fn(context, identifier); - innerSubCache.set(identifier, result); - return result; - } - }; - - return boundFn; - }; - - return cachedFn; -}; - -/** - * - * @param {string} context context for relative path - * @param {string} identifier identifier for path - * @returns {string} a converted relative path - */ -const _makePathsRelative = (context, identifier) => { - return identifier - .split(SEGMENTS_SPLIT_REGEXP) - .map(str => absoluteToRequest(context, str)) - .join(""); -}; - -exports.makePathsRelative = makeCacheableWithContext(_makePathsRelative); - -/** - * - * @param {string} context context for relative path - * @param {string} identifier identifier for path - * @returns {string} a converted relative path - */ -const _makePathsAbsolute = (context, identifier) => { - return identifier - .split(SEGMENTS_SPLIT_REGEXP) - .map(str => requestToAbsolute(context, str)) - .join(""); -}; - -exports.makePathsAbsolute = makeCacheableWithContext(_makePathsAbsolute); - -/** - * @param {string} context absolute context path - * @param {string} request any request string may containing absolute paths, query string, etc. - * @returns {string} a new request string avoiding absolute paths when possible - */ -const _contextify = (context, request) => { - return request - .split("!") - .map(r => absoluteToRequest(context, r)) - .join("!"); -}; - -const contextify = makeCacheableWithContext(_contextify); -exports.contextify = contextify; - -/** - * @param {string} context absolute context path - * @param {string} request any request string - * @returns {string} a new request string using absolute paths when possible - */ -const _absolutify = (context, request) => { - return request - .split("!") - .map(r => requestToAbsolute(context, r)) - .join("!"); -}; - -const absolutify = makeCacheableWithContext(_absolutify); -exports.absolutify = absolutify; - -const PATH_QUERY_FRAGMENT_REGEXP = - /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; -const PATH_QUERY_REGEXP = /^((?:\0.|[^?\0])*)(\?.*)?$/; - -/** @typedef {{ resource: string, path: string, query: string, fragment: string }} ParsedResource */ -/** @typedef {{ resource: string, path: string, query: string }} ParsedResourceWithoutFragment */ - -/** - * @param {string} str the path with query and fragment - * @returns {ParsedResource} parsed parts - */ -const _parseResource = str => { - const match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); - return { - resource: str, - path: match[1].replace(/\0(.)/g, "$1"), - query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", - fragment: match[3] || "" - }; -}; -exports.parseResource = makeCacheable(_parseResource); - -/** - * Parse resource, skips fragment part - * @param {string} str the path with query and fragment - * @returns {ParsedResourceWithoutFragment} parsed parts - */ -const _parseResourceWithoutFragment = str => { - const match = PATH_QUERY_REGEXP.exec(str); - return { - resource: str, - path: match[1].replace(/\0(.)/g, "$1"), - query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "" - }; -}; -exports.parseResourceWithoutFragment = makeCacheable( - _parseResourceWithoutFragment -); - -/** - * @param {string} filename the filename which should be undone - * @param {string} outputPath the output path that is restored (only relevant when filename contains "..") - * @param {boolean} enforceRelative true returns ./ for empty paths - * @returns {string} repeated ../ to leave the directory of the provided filename to be back on output dir - */ -exports.getUndoPath = (filename, outputPath, enforceRelative) => { - let depth = -1; - let append = ""; - outputPath = outputPath.replace(/[\\/]$/, ""); - for (const part of filename.split(/[/\\]+/)) { - if (part === "..") { - if (depth > -1) { - depth--; - } else { - const i = outputPath.lastIndexOf("/"); - const j = outputPath.lastIndexOf("\\"); - const pos = i < 0 ? j : j < 0 ? i : Math.max(i, j); - if (pos < 0) return outputPath + "/"; - append = outputPath.slice(pos + 1) + "/" + append; - outputPath = outputPath.slice(0, pos); - } - } else if (part !== ".") { - depth++; - } - } - return depth > 0 - ? `${"../".repeat(depth)}${append}` - : enforceRelative - ? `./${append}` - : append; -}; - - -/***/ }), - -/***/ 6280: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -// We need to include a list of requires here -// to allow webpack to be bundled with only static requires -// We could use a dynamic require(`../${request}`) but this -// would include too many modules and not every tool is able -// to process this -module.exports = { - AsyncDependenciesBlock: () => __webpack_require__(42290), - CommentCompilationWarning: () => __webpack_require__(54437), - ContextModule: () => __webpack_require__(49994), - "cache/PackFileCacheStrategy": () => - __webpack_require__(26174), - "cache/ResolverCachePlugin": () => __webpack_require__(94834), - "container/ContainerEntryDependency": () => - __webpack_require__(77033), - "container/ContainerEntryModule": () => - __webpack_require__(17438), - "container/ContainerExposedDependency": () => - __webpack_require__(91571), - "container/FallbackDependency": () => - __webpack_require__(65917), - "container/FallbackItemDependency": () => - __webpack_require__(25742), - "container/FallbackModule": () => __webpack_require__(39387), - "container/RemoteModule": () => __webpack_require__(40452), - "container/RemoteToExternalDependency": () => - __webpack_require__(21290), - "dependencies/AMDDefineDependency": () => - __webpack_require__(80463), - "dependencies/AMDRequireArrayDependency": () => - __webpack_require__(73090), - "dependencies/AMDRequireContextDependency": () => - __webpack_require__(39985), - "dependencies/AMDRequireDependenciesBlock": () => - __webpack_require__(93897), - "dependencies/AMDRequireDependency": () => - __webpack_require__(45137), - "dependencies/AMDRequireItemDependency": () => - __webpack_require__(61261), - "dependencies/CachedConstDependency": () => - __webpack_require__(83106), - "dependencies/CreateScriptUrlDependency": () => - __webpack_require__(37857), - "dependencies/CommonJsRequireContextDependency": () => - __webpack_require__(85190), - "dependencies/CommonJsExportRequireDependency": () => - __webpack_require__(70241), - "dependencies/CommonJsExportsDependency": () => - __webpack_require__(65086), - "dependencies/CommonJsFullRequireDependency": () => - __webpack_require__(96107), - "dependencies/CommonJsRequireDependency": () => - __webpack_require__(90345), - "dependencies/CommonJsSelfReferenceDependency": () => - __webpack_require__(27647), - "dependencies/ConstDependency": () => - __webpack_require__(14367), - "dependencies/ContextDependency": () => - __webpack_require__(22429), - "dependencies/ContextElementDependency": () => - __webpack_require__(34192), - "dependencies/CriticalDependencyWarning": () => - __webpack_require__(34219), - "dependencies/CssImportDependency": () => - __webpack_require__(2951), - "dependencies/CssLocalIdentifierDependency": () => - __webpack_require__(75689), - "dependencies/CssSelfLocalIdentifierDependency": () => - __webpack_require__(24769), - "dependencies/CssExportDependency": () => - __webpack_require__(12778), - "dependencies/CssUrlDependency": () => - __webpack_require__(75178), - "dependencies/DelegatedSourceDependency": () => - __webpack_require__(70688), - "dependencies/DllEntryDependency": () => - __webpack_require__(21467), - "dependencies/EntryDependency": () => - __webpack_require__(17380), - "dependencies/ExportsInfoDependency": () => - __webpack_require__(36853), - "dependencies/HarmonyAcceptDependency": () => - __webpack_require__(98702), - "dependencies/HarmonyAcceptImportDependency": () => - __webpack_require__(13345), - "dependencies/HarmonyCompatibilityDependency": () => - __webpack_require__(48180), - "dependencies/HarmonyExportExpressionDependency": () => - __webpack_require__(61404), - "dependencies/HarmonyExportHeaderDependency": () => - __webpack_require__(31623), - "dependencies/HarmonyExportImportedSpecifierDependency": () => - __webpack_require__(96577), - "dependencies/HarmonyExportSpecifierDependency": () => - __webpack_require__(22437), - "dependencies/HarmonyImportSideEffectDependency": () => - __webpack_require__(95913), - "dependencies/HarmonyImportSpecifierDependency": () => - __webpack_require__(577), - "dependencies/HarmonyEvaluatedImportSpecifierDependency": () => - __webpack_require__(87799), - "dependencies/ImportContextDependency": () => - __webpack_require__(28801), - "dependencies/ImportDependency": () => - __webpack_require__(36074), - "dependencies/ImportEagerDependency": () => - __webpack_require__(29646), - "dependencies/ImportWeakDependency": () => - __webpack_require__(97001), - "dependencies/JsonExportsDependency": () => - __webpack_require__(67762), - "dependencies/LocalModule": () => __webpack_require__(71195), - "dependencies/LocalModuleDependency": () => - __webpack_require__(81600), - "dependencies/ModuleDecoratorDependency": () => - __webpack_require__(1569), - "dependencies/ModuleHotAcceptDependency": () => - __webpack_require__(72674), - "dependencies/ModuleHotDeclineDependency": () => - __webpack_require__(40213), - "dependencies/ImportMetaHotAcceptDependency": () => - __webpack_require__(94717), - "dependencies/ImportMetaHotDeclineDependency": () => - __webpack_require__(15491), - "dependencies/ImportMetaContextDependency": () => - __webpack_require__(14894), - "dependencies/ProvidedDependency": () => - __webpack_require__(13996), - "dependencies/PureExpressionDependency": () => - __webpack_require__(72926), - "dependencies/RequireContextDependency": () => - __webpack_require__(30174), - "dependencies/RequireEnsureDependenciesBlock": () => - __webpack_require__(45375), - "dependencies/RequireEnsureDependency": () => - __webpack_require__(87182), - "dependencies/RequireEnsureItemDependency": () => - __webpack_require__(33154), - "dependencies/RequireHeaderDependency": () => - __webpack_require__(61820), - "dependencies/RequireIncludeDependency": () => - __webpack_require__(90040), - "dependencies/RequireIncludeDependencyParserPlugin": () => - __webpack_require__(98034), - "dependencies/RequireResolveContextDependency": () => - __webpack_require__(99703), - "dependencies/RequireResolveDependency": () => - __webpack_require__(57485), - "dependencies/RequireResolveHeaderDependency": () => - __webpack_require__(2254), - "dependencies/RuntimeRequirementsDependency": () => - __webpack_require__(12446), - "dependencies/StaticExportsDependency": () => - __webpack_require__(19383), - "dependencies/SystemPlugin": () => __webpack_require__(90020), - "dependencies/UnsupportedDependency": () => - __webpack_require__(42809), - "dependencies/URLDependency": () => __webpack_require__(71278), - "dependencies/WebAssemblyExportImportedDependency": () => - __webpack_require__(76598), - "dependencies/WebAssemblyImportDependency": () => - __webpack_require__(60718), - "dependencies/WebpackIsIncludedDependency": () => - __webpack_require__(64111), - "dependencies/WorkerDependency": () => - __webpack_require__(30598), - "json/JsonData": () => __webpack_require__(67927), - "optimize/ConcatenatedModule": () => - __webpack_require__(4272), - DelegatedModule: () => __webpack_require__(18481), - DependenciesBlock: () => __webpack_require__(82618), - DllModule: () => __webpack_require__(28526), - ExternalModule: () => __webpack_require__(73096), - FileSystemInfo: () => __webpack_require__(67469), - InitFragment: () => __webpack_require__(64768), - InvalidDependenciesModuleWarning: () => - __webpack_require__(7787), - Module: () => __webpack_require__(53840), - ModuleBuildError: () => __webpack_require__(12530), - ModuleDependencyWarning: () => __webpack_require__(76218), - ModuleError: () => __webpack_require__(74938), - ModuleGraph: () => __webpack_require__(13487), - ModuleParseError: () => __webpack_require__(30417), - ModuleWarning: () => __webpack_require__(49537), - NormalModule: () => __webpack_require__(89417), - RawDataUrlModule: () => __webpack_require__(66788), - RawModule: () => __webpack_require__(71133), - "sharing/ConsumeSharedModule": () => - __webpack_require__(89683), - "sharing/ConsumeSharedFallbackDependency": () => - __webpack_require__(64519), - "sharing/ProvideSharedModule": () => - __webpack_require__(95148), - "sharing/ProvideSharedDependency": () => - __webpack_require__(94140), - "sharing/ProvideForSharedDependency": () => - __webpack_require__(98425), - UnsupportedFeatureWarning: () => __webpack_require__(17623), - "util/LazySet": () => __webpack_require__(96522), - UnhandledSchemeError: () => __webpack_require__(69898), - NodeStuffInWebError: () => __webpack_require__(75199), - WebpackError: () => __webpack_require__(27154), - - "util/registerExternalSerializer": () => { - // already registered - } -}; - - -/***/ }), - -/***/ 65764: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { register } = __webpack_require__(7591); - -class ClassSerializer { - constructor(Constructor) { - this.Constructor = Constructor; - } - - serialize(obj, context) { - obj.serialize(context); - } - - deserialize(context) { - if (typeof this.Constructor.deserialize === "function") { - return this.Constructor.deserialize(context); - } - const obj = new this.Constructor(); - obj.deserialize(context); - return obj; - } -} - -module.exports = (Constructor, request, name = null) => { - register(Constructor, request, name, new ClassSerializer(Constructor)); -}; - - -/***/ }), - -/***/ 61374: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -/** @template T @typedef {function(): T} FunctionReturning */ - -/** - * @template T - * @param {FunctionReturning} fn memorized function - * @returns {FunctionReturning} new function - */ -const memoize = fn => { - let cache = false; - /** @type {T} */ - let result = undefined; - return () => { - if (cache) { - return result; - } else { - result = fn(); - cache = true; - // Allow to clean up memory for fn - // and all dependent resources - fn = undefined; - return result; - } - }; -}; - -module.exports = memoize; - - -/***/ }), - -/***/ 46849: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const A_CODE = "a".charCodeAt(0); - -/** - * @param {string} hash hash - * @param {number} hashLength hash length - * @returns {string} returns hash that has at least one non numeric char - */ -module.exports = (hash, hashLength) => { - if (hashLength < 1) return ""; - const slice = hash.slice(0, hashLength); - if (slice.match(/[^\d]/)) return slice; - return `${String.fromCharCode( - A_CODE + (parseInt(hash[0], 10) % 6) - )}${slice.slice(1)}`; -}; - - -/***/ }), - -/***/ 49167: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const SAFE_LIMIT = 0x80000000; -const SAFE_PART = SAFE_LIMIT - 1; -const COUNT = 4; -const arr = [0, 0, 0, 0, 0]; -const primes = [3, 7, 17, 19]; - -module.exports = (str, range) => { - arr.fill(0); - for (let i = 0; i < str.length; i++) { - const c = str.charCodeAt(i); - for (let j = 0; j < COUNT; j++) { - const p = (j + COUNT - 1) % COUNT; - arr[j] = (arr[j] + c * primes[j] + arr[p]) & SAFE_PART; - } - for (let j = 0; j < COUNT; j++) { - const q = arr[j] % COUNT; - arr[j] = arr[j] ^ (arr[q] >> 1); - } - } - if (range <= SAFE_PART) { - let sum = 0; - for (let j = 0; j < COUNT; j++) { - sum = (sum + arr[j]) % range; - } - return sum; - } else { - let sum1 = 0; - let sum2 = 0; - const rangeExt = Math.floor(range / SAFE_LIMIT); - for (let j = 0; j < COUNT; j += 2) { - sum1 = (sum1 + arr[j]) & SAFE_PART; - } - for (let j = 1; j < COUNT; j += 2) { - sum2 = (sum2 + arr[j]) % rangeExt; - } - return (sum2 * SAFE_LIMIT + sum1) % range; - } -}; - - -/***/ }), - -/***/ 64102: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @template T - * @template {Error} E - * @param {Iterable} items initial items - * @param {number} concurrency number of items running in parallel - * @param {function(T, function(T): void, function(E=): void): void} processor worker which pushes more items - * @param {function(E=): void} callback all items processed - * @returns {void} - */ -const processAsyncTree = (items, concurrency, processor, callback) => { - const queue = Array.from(items); - if (queue.length === 0) return callback(); - let processing = 0; - let finished = false; - let processScheduled = true; - - const push = item => { - queue.push(item); - if (!processScheduled && processing < concurrency) { - processScheduled = true; - process.nextTick(processQueue); - } - }; - - const processorCallback = err => { - processing--; - if (err && !finished) { - finished = true; - callback(err); - return; - } - if (!processScheduled) { - processScheduled = true; - process.nextTick(processQueue); - } - }; - - const processQueue = () => { - if (finished) return; - while (processing < concurrency && queue.length > 0) { - processing++; - const item = queue.pop(); - processor(item, push, processorCallback); - } - processScheduled = false; - if (queue.length === 0 && processing === 0 && !finished) { - finished = true; - callback(); - } - }; - - processQueue(); -}; - -module.exports = processAsyncTree; - - -/***/ }), - -/***/ 67603: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const SAFE_IDENTIFIER = /^[_a-zA-Z$][_a-zA-Z$0-9]*$/; -const RESERVED_IDENTIFIER = new Set([ - "break", - "case", - "catch", - "class", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "export", - "extends", - "finally", - "for", - "function", - "if", - "import", - "in", - "instanceof", - "new", - "return", - "super", - "switch", - "this", - "throw", - "try", - "typeof", - "var", - "void", - "while", - "with", - "enum", - // strict mode - "implements", - "interface", - "let", - "package", - "private", - "protected", - "public", - "static", - "yield", - "yield", - // module code - "await", - // skip future reserved keywords defined under ES1 till ES3 - // additional - "null", - "true", - "false" -]); - -const propertyAccess = (properties, start = 0) => { - let str = ""; - for (let i = start; i < properties.length; i++) { - const p = properties[i]; - if (`${+p}` === p) { - str += `[${p}]`; - } else if (SAFE_IDENTIFIER.test(p) && !RESERVED_IDENTIFIER.has(p)) { - str += `.${p}`; - } else { - str += `[${JSON.stringify(p)}]`; - } - } - return str; -}; - -module.exports = propertyAccess; - - -/***/ }), - -/***/ 35804: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { register } = __webpack_require__(7591); - -const Position = /** @type {TODO} */ (__webpack_require__(31988).Position); -const SourceLocation = (__webpack_require__(31988).SourceLocation); -const ValidationError = (__webpack_require__(62825)/* ["default"] */ .Z); -const { - CachedSource, - ConcatSource, - OriginalSource, - PrefixSource, - RawSource, - ReplaceSource, - SourceMapSource -} = __webpack_require__(51255); - -/** @typedef {import("acorn").Position} Position */ -/** @typedef {import("../Dependency").RealDependencyLocation} RealDependencyLocation */ -/** @typedef {import("../Dependency").SourcePosition} SourcePosition */ -/** @typedef {import("./serialization").ObjectDeserializerContext} ObjectDeserializerContext */ -/** @typedef {import("./serialization").ObjectSerializerContext} ObjectSerializerContext */ - -/** @typedef {ObjectSerializerContext & { writeLazy?: (any) => void }} WebpackObjectSerializerContext */ - -const CURRENT_MODULE = "webpack/lib/util/registerExternalSerializer"; - -register( - CachedSource, - CURRENT_MODULE, - "webpack-sources/CachedSource", - new (class CachedSourceSerializer { - /** - * @param {CachedSource} source the cached source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write, writeLazy }) { - if (writeLazy) { - writeLazy(source.originalLazy()); - } else { - write(source.original()); - } - write(source.getCachedData()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {CachedSource} cached source - */ - deserialize({ read }) { - const source = read(); - const cachedData = read(); - return new CachedSource(source, cachedData); - } - })() -); - -register( - RawSource, - CURRENT_MODULE, - "webpack-sources/RawSource", - new (class RawSourceSerializer { - /** - * @param {RawSource} source the raw source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.buffer()); - write(!source.isBuffer()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {RawSource} raw source - */ - deserialize({ read }) { - const source = read(); - const convertToString = read(); - return new RawSource(source, convertToString); - } - })() -); - -register( - ConcatSource, - CURRENT_MODULE, - "webpack-sources/ConcatSource", - new (class ConcatSourceSerializer { - /** - * @param {ConcatSource} source the concat source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.getChildren()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {ConcatSource} concat source - */ - deserialize({ read }) { - const source = new ConcatSource(); - source.addAllSkipOptimizing(read()); - return source; - } - })() -); - -register( - PrefixSource, - CURRENT_MODULE, - "webpack-sources/PrefixSource", - new (class PrefixSourceSerializer { - /** - * @param {PrefixSource} source the prefix source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.getPrefix()); - write(source.original()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {PrefixSource} prefix source - */ - deserialize({ read }) { - return new PrefixSource(read(), read()); - } - })() -); - -register( - ReplaceSource, - CURRENT_MODULE, - "webpack-sources/ReplaceSource", - new (class ReplaceSourceSerializer { - /** - * @param {ReplaceSource} source the replace source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.original()); - write(source.getName()); - const replacements = source.getReplacements(); - write(replacements.length); - for (const repl of replacements) { - write(repl.start); - write(repl.end); - } - for (const repl of replacements) { - write(repl.content); - write(repl.name); - } - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {ReplaceSource} replace source - */ - deserialize({ read }) { - const source = new ReplaceSource(read(), read()); - const len = read(); - const startEndBuffer = []; - for (let i = 0; i < len; i++) { - startEndBuffer.push(read(), read()); - } - let j = 0; - for (let i = 0; i < len; i++) { - source.replace( - startEndBuffer[j++], - startEndBuffer[j++], - read(), - read() - ); - } - return source; - } - })() -); - -register( - OriginalSource, - CURRENT_MODULE, - "webpack-sources/OriginalSource", - new (class OriginalSourceSerializer { - /** - * @param {OriginalSource} source the original source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.buffer()); - write(source.getName()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {OriginalSource} original source - */ - deserialize({ read }) { - const buffer = read(); - const name = read(); - return new OriginalSource(buffer, name); - } - })() -); - -register( - SourceLocation, - CURRENT_MODULE, - "acorn/SourceLocation", - new (class SourceLocationSerializer { - /** - * @param {SourceLocation} loc the location to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(loc, { write }) { - write(loc.start.line); - write(loc.start.column); - write(loc.end.line); - write(loc.end.column); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {RealDependencyLocation} location - */ - deserialize({ read }) { - return { - start: { - line: read(), - column: read() - }, - end: { - line: read(), - column: read() - } - }; - } - })() -); - -register( - Position, - CURRENT_MODULE, - "acorn/Position", - new (class PositionSerializer { - /** - * @param {Position} pos the position to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(pos, { write }) { - write(pos.line); - write(pos.column); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {SourcePosition} position - */ - deserialize({ read }) { - return { - line: read(), - column: read() - }; - } - })() -); - -register( - SourceMapSource, - CURRENT_MODULE, - "webpack-sources/SourceMapSource", - new (class SourceMapSourceSerializer { - /** - * @param {SourceMapSource} source the source map source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(source, { write }) { - write(source.getArgsAsBuffers()); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {SourceMapSource} source source map source - */ - deserialize({ read }) { - // @ts-expect-error - return new SourceMapSource(...read()); - } - })() -); - -register( - ValidationError, - CURRENT_MODULE, - "schema-utils/ValidationError", - new (class ValidationErrorSerializer { - // TODO error should be ValidationError, but this fails the type checks - /** - * @param {TODO} error the source map source to be serialized - * @param {WebpackObjectSerializerContext} context context - * @returns {void} - */ - serialize(error, { write }) { - write(error.errors); - write(error.schema); - write({ - name: error.headerName, - baseDataPath: error.baseDataPath, - postFormatter: error.postFormatter - }); - } - - /** - * @param {ObjectDeserializerContext} context context - * @returns {TODO} error - */ - deserialize({ read }) { - return new ValidationError(read(), read(), read()); - } - })() -); - - -/***/ }), - -/***/ 47462: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const SortableSet = __webpack_require__(87122); - -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */ - -/** @typedef {string | SortableSet | undefined} RuntimeSpec */ -/** @typedef {RuntimeSpec | boolean} RuntimeCondition */ - -/** - * @param {Compilation} compilation the compilation - * @param {string} name name of the entry - * @param {EntryOptions=} options optionally already received entry options - * @returns {RuntimeSpec} runtime - */ -exports.getEntryRuntime = (compilation, name, options) => { - let dependOn; - let runtime; - if (options) { - ({ dependOn, runtime } = options); - } else { - const entry = compilation.entries.get(name); - if (!entry) return name; - ({ dependOn, runtime } = entry.options); - } - if (dependOn) { - /** @type {RuntimeSpec} */ - let result = undefined; - const queue = new Set(dependOn); - for (const name of queue) { - const dep = compilation.entries.get(name); - if (!dep) continue; - const { dependOn, runtime } = dep.options; - if (dependOn) { - for (const name of dependOn) { - queue.add(name); - } - } else { - result = mergeRuntimeOwned(result, runtime || name); - } - } - return result || name; - } else { - return runtime || name; - } -}; - -/** - * @param {RuntimeSpec} runtime runtime - * @param {function(string): void} fn functor - * @param {boolean} deterministicOrder enforce a deterministic order - * @returns {void} - */ -exports.forEachRuntime = (runtime, fn, deterministicOrder = false) => { - if (runtime === undefined) { - fn(undefined); - } else if (typeof runtime === "string") { - fn(runtime); - } else { - if (deterministicOrder) runtime.sort(); - for (const r of runtime) { - fn(r); - } - } -}; - -const getRuntimesKey = set => { - set.sort(); - return Array.from(set).join("\n"); -}; - -/** - * @param {RuntimeSpec} runtime runtime(s) - * @returns {string} key of runtimes - */ -const getRuntimeKey = runtime => { - if (runtime === undefined) return "*"; - if (typeof runtime === "string") return runtime; - return runtime.getFromUnorderedCache(getRuntimesKey); -}; -exports.getRuntimeKey = getRuntimeKey; - -/** - * @param {string} key key of runtimes - * @returns {RuntimeSpec} runtime(s) - */ -const keyToRuntime = key => { - if (key === "*") return undefined; - const items = key.split("\n"); - if (items.length === 1) return items[0]; - return new SortableSet(items); -}; -exports.keyToRuntime = keyToRuntime; - -const getRuntimesString = set => { - set.sort(); - return Array.from(set).join("+"); -}; - -/** - * @param {RuntimeSpec} runtime runtime(s) - * @returns {string} readable version - */ -const runtimeToString = runtime => { - if (runtime === undefined) return "*"; - if (typeof runtime === "string") return runtime; - return runtime.getFromUnorderedCache(getRuntimesString); -}; -exports.runtimeToString = runtimeToString; - -/** - * @param {RuntimeCondition} runtimeCondition runtime condition - * @returns {string} readable version - */ -exports.runtimeConditionToString = runtimeCondition => { - if (runtimeCondition === true) return "true"; - if (runtimeCondition === false) return "false"; - return runtimeToString(runtimeCondition); -}; - -/** - * @param {RuntimeSpec} a first - * @param {RuntimeSpec} b second - * @returns {boolean} true, when they are equal - */ -const runtimeEqual = (a, b) => { - if (a === b) { - return true; - } else if ( - a === undefined || - b === undefined || - typeof a === "string" || - typeof b === "string" - ) { - return false; - } else if (a.size !== b.size) { - return false; - } else { - a.sort(); - b.sort(); - const aIt = a[Symbol.iterator](); - const bIt = b[Symbol.iterator](); - for (;;) { - const aV = aIt.next(); - if (aV.done) return true; - const bV = bIt.next(); - if (aV.value !== bV.value) return false; - } - } -}; -exports.runtimeEqual = runtimeEqual; - -/** - * @param {RuntimeSpec} a first - * @param {RuntimeSpec} b second - * @returns {-1|0|1} compare - */ -exports.compareRuntime = (a, b) => { - if (a === b) { - return 0; - } else if (a === undefined) { - return -1; - } else if (b === undefined) { - return 1; - } else { - const aKey = getRuntimeKey(a); - const bKey = getRuntimeKey(b); - if (aKey < bKey) return -1; - if (aKey > bKey) return 1; - return 0; - } -}; - -/** - * @param {RuntimeSpec} a first - * @param {RuntimeSpec} b second - * @returns {RuntimeSpec} merged - */ -const mergeRuntime = (a, b) => { - if (a === undefined) { - return b; - } else if (b === undefined) { - return a; - } else if (a === b) { - return a; - } else if (typeof a === "string") { - if (typeof b === "string") { - const set = new SortableSet(); - set.add(a); - set.add(b); - return set; - } else if (b.has(a)) { - return b; - } else { - const set = new SortableSet(b); - set.add(a); - return set; - } - } else { - if (typeof b === "string") { - if (a.has(b)) return a; - const set = new SortableSet(a); - set.add(b); - return set; - } else { - const set = new SortableSet(a); - for (const item of b) set.add(item); - if (set.size === a.size) return a; - return set; - } - } -}; -exports.mergeRuntime = mergeRuntime; - -/** - * @param {RuntimeCondition} a first - * @param {RuntimeCondition} b second - * @param {RuntimeSpec} runtime full runtime - * @returns {RuntimeCondition} result - */ -exports.mergeRuntimeCondition = (a, b, runtime) => { - if (a === false) return b; - if (b === false) return a; - if (a === true || b === true) return true; - const merged = mergeRuntime(a, b); - if (merged === undefined) return undefined; - if (typeof merged === "string") { - if (typeof runtime === "string" && merged === runtime) return true; - return merged; - } - if (typeof runtime === "string" || runtime === undefined) return merged; - if (merged.size === runtime.size) return true; - return merged; -}; - -/** - * @param {RuntimeSpec | true} a first - * @param {RuntimeSpec | true} b second - * @param {RuntimeSpec} runtime full runtime - * @returns {RuntimeSpec | true} result - */ -exports.mergeRuntimeConditionNonFalse = (a, b, runtime) => { - if (a === true || b === true) return true; - const merged = mergeRuntime(a, b); - if (merged === undefined) return undefined; - if (typeof merged === "string") { - if (typeof runtime === "string" && merged === runtime) return true; - return merged; - } - if (typeof runtime === "string" || runtime === undefined) return merged; - if (merged.size === runtime.size) return true; - return merged; -}; - -/** - * @param {RuntimeSpec} a first (may be modified) - * @param {RuntimeSpec} b second - * @returns {RuntimeSpec} merged - */ -const mergeRuntimeOwned = (a, b) => { - if (b === undefined) { - return a; - } else if (a === b) { - return a; - } else if (a === undefined) { - if (typeof b === "string") { - return b; - } else { - return new SortableSet(b); - } - } else if (typeof a === "string") { - if (typeof b === "string") { - const set = new SortableSet(); - set.add(a); - set.add(b); - return set; - } else { - const set = new SortableSet(b); - set.add(a); - return set; - } - } else { - if (typeof b === "string") { - a.add(b); - return a; - } else { - for (const item of b) a.add(item); - return a; - } - } -}; -exports.mergeRuntimeOwned = mergeRuntimeOwned; - -/** - * @param {RuntimeSpec} a first - * @param {RuntimeSpec} b second - * @returns {RuntimeSpec} merged - */ -exports.intersectRuntime = (a, b) => { - if (a === undefined) { - return b; - } else if (b === undefined) { - return a; - } else if (a === b) { - return a; - } else if (typeof a === "string") { - if (typeof b === "string") { - return undefined; - } else if (b.has(a)) { - return a; - } else { - return undefined; - } - } else { - if (typeof b === "string") { - if (a.has(b)) return b; - return undefined; - } else { - const set = new SortableSet(); - for (const item of b) { - if (a.has(item)) set.add(item); - } - if (set.size === 0) return undefined; - if (set.size === 1) for (const item of set) return item; - return set; - } - } -}; - -/** - * @param {RuntimeSpec} a first - * @param {RuntimeSpec} b second - * @returns {RuntimeSpec} result - */ -const subtractRuntime = (a, b) => { - if (a === undefined) { - return undefined; - } else if (b === undefined) { - return a; - } else if (a === b) { - return undefined; - } else if (typeof a === "string") { - if (typeof b === "string") { - return a; - } else if (b.has(a)) { - return undefined; - } else { - return a; - } - } else { - if (typeof b === "string") { - if (!a.has(b)) return a; - if (a.size === 2) { - for (const item of a) { - if (item !== b) return item; - } - } - const set = new SortableSet(a); - set.delete(b); - } else { - const set = new SortableSet(); - for (const item of a) { - if (!b.has(item)) set.add(item); - } - if (set.size === 0) return undefined; - if (set.size === 1) for (const item of set) return item; - return set; - } - } -}; -exports.subtractRuntime = subtractRuntime; - -/** - * @param {RuntimeCondition} a first - * @param {RuntimeCondition} b second - * @param {RuntimeSpec} runtime runtime - * @returns {RuntimeCondition} result - */ -exports.subtractRuntimeCondition = (a, b, runtime) => { - if (b === true) return false; - if (b === false) return a; - if (a === false) return false; - const result = subtractRuntime(a === true ? runtime : a, b); - return result === undefined ? false : result; -}; - -/** - * @param {RuntimeSpec} runtime runtime - * @param {function(RuntimeSpec): boolean} filter filter function - * @returns {boolean | RuntimeSpec} true/false if filter is constant for all runtimes, otherwise runtimes that are active - */ -exports.filterRuntime = (runtime, filter) => { - if (runtime === undefined) return filter(undefined); - if (typeof runtime === "string") return filter(runtime); - let some = false; - let every = true; - let result = undefined; - for (const r of runtime) { - const v = filter(r); - if (v) { - some = true; - result = mergeRuntimeOwned(result, r); - } else { - every = false; - } - } - if (!some) return false; - if (every) return true; - return result; -}; - -/** - * @template T - */ -class RuntimeSpecMap { - /** - * @param {RuntimeSpecMap=} clone copy form this - */ - constructor(clone) { - this._mode = clone ? clone._mode : 0; // 0 = empty, 1 = single entry, 2 = map - /** @type {RuntimeSpec} */ - this._singleRuntime = clone ? clone._singleRuntime : undefined; - /** @type {T} */ - this._singleValue = clone ? clone._singleValue : undefined; - /** @type {Map | undefined} */ - this._map = clone && clone._map ? new Map(clone._map) : undefined; - } - - /** - * @param {RuntimeSpec} runtime the runtimes - * @returns {T} value - */ - get(runtime) { - switch (this._mode) { - case 0: - return undefined; - case 1: - return runtimeEqual(this._singleRuntime, runtime) - ? this._singleValue - : undefined; - default: - return this._map.get(getRuntimeKey(runtime)); - } - } - - /** - * @param {RuntimeSpec} runtime the runtimes - * @returns {boolean} true, when the runtime is stored - */ - has(runtime) { - switch (this._mode) { - case 0: - return false; - case 1: - return runtimeEqual(this._singleRuntime, runtime); - default: - return this._map.has(getRuntimeKey(runtime)); - } - } - - set(runtime, value) { - switch (this._mode) { - case 0: - this._mode = 1; - this._singleRuntime = runtime; - this._singleValue = value; - break; - case 1: - if (runtimeEqual(this._singleRuntime, runtime)) { - this._singleValue = value; - break; - } - this._mode = 2; - this._map = new Map(); - this._map.set(getRuntimeKey(this._singleRuntime), this._singleValue); - this._singleRuntime = undefined; - this._singleValue = undefined; - /* falls through */ - default: - this._map.set(getRuntimeKey(runtime), value); - } - } - - provide(runtime, computer) { - switch (this._mode) { - case 0: - this._mode = 1; - this._singleRuntime = runtime; - return (this._singleValue = computer()); - case 1: { - if (runtimeEqual(this._singleRuntime, runtime)) { - return this._singleValue; - } - this._mode = 2; - this._map = new Map(); - this._map.set(getRuntimeKey(this._singleRuntime), this._singleValue); - this._singleRuntime = undefined; - this._singleValue = undefined; - const newValue = computer(); - this._map.set(getRuntimeKey(runtime), newValue); - return newValue; - } - default: { - const key = getRuntimeKey(runtime); - const value = this._map.get(key); - if (value !== undefined) return value; - const newValue = computer(); - this._map.set(key, newValue); - return newValue; - } - } - } - - delete(runtime) { - switch (this._mode) { - case 0: - return; - case 1: - if (runtimeEqual(this._singleRuntime, runtime)) { - this._mode = 0; - this._singleRuntime = undefined; - this._singleValue = undefined; - } - return; - default: - this._map.delete(getRuntimeKey(runtime)); - } - } - - update(runtime, fn) { - switch (this._mode) { - case 0: - throw new Error("runtime passed to update must exist"); - case 1: { - if (runtimeEqual(this._singleRuntime, runtime)) { - this._singleValue = fn(this._singleValue); - break; - } - const newValue = fn(undefined); - if (newValue !== undefined) { - this._mode = 2; - this._map = new Map(); - this._map.set(getRuntimeKey(this._singleRuntime), this._singleValue); - this._singleRuntime = undefined; - this._singleValue = undefined; - this._map.set(getRuntimeKey(runtime), newValue); - } - break; - } - default: { - const key = getRuntimeKey(runtime); - const oldValue = this._map.get(key); - const newValue = fn(oldValue); - if (newValue !== oldValue) this._map.set(key, newValue); - } - } - } - - keys() { - switch (this._mode) { - case 0: - return []; - case 1: - return [this._singleRuntime]; - default: - return Array.from(this._map.keys(), keyToRuntime); - } - } - - values() { - switch (this._mode) { - case 0: - return [][Symbol.iterator](); - case 1: - return [this._singleValue][Symbol.iterator](); - default: - return this._map.values(); - } - } - - get size() { - if (this._mode <= 1) return this._mode; - return this._map.size; - } -} - -exports.RuntimeSpecMap = RuntimeSpecMap; - -class RuntimeSpecSet { - constructor(iterable) { - /** @type {Map} */ - this._map = new Map(); - if (iterable) { - for (const item of iterable) { - this.add(item); - } - } - } - - add(runtime) { - this._map.set(getRuntimeKey(runtime), runtime); - } - - has(runtime) { - return this._map.has(getRuntimeKey(runtime)); - } - - [Symbol.iterator]() { - return this._map.values(); - } - - get size() { - return this._map.size; - } -} - -exports.RuntimeSpecSet = RuntimeSpecSet; - - -/***/ }), - -/***/ 27773: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {(string|number|undefined|[])[]} SemVerRange */ - -/** - * @param {string} str version string - * @returns {(string|number|undefined|[])[]} parsed version - */ -const parseVersion = str => { - var splitAndConvert = function (str) { - return str.split(".").map(function (item) { - // eslint-disable-next-line eqeqeq - return +item == item ? +item : item; - }); - }; - var match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str); - /** @type {(string|number|undefined|[])[]} */ - var ver = match[1] ? splitAndConvert(match[1]) : []; - if (match[2]) { - ver.length++; - ver.push.apply(ver, splitAndConvert(match[2])); - } - if (match[3]) { - ver.push([]); - ver.push.apply(ver, splitAndConvert(match[3])); - } - return ver; -}; -exports.parseVersion = parseVersion; - -/* eslint-disable eqeqeq */ -/** - * @param {string} a version - * @param {string} b version - * @returns {boolean} true, iff a < b - */ -const versionLt = (a, b) => { - // @ts-expect-error - a = parseVersion(a); - // @ts-expect-error - b = parseVersion(b); - var i = 0; - for (;;) { - // a b EOA object undefined number string - // EOA a == b a < b b < a a < b a < b - // object b < a (0) b < a a < b a < b - // undefined a < b a < b (0) a < b a < b - // number b < a b < a b < a (1) a < b - // string b < a b < a b < a b < a (1) - // EOA end of array - // (0) continue on - // (1) compare them via "<" - - // Handles first row in table - if (i >= a.length) return i < b.length && (typeof b[i])[0] != "u"; - - var aValue = a[i]; - var aType = (typeof aValue)[0]; - - // Handles first column in table - if (i >= b.length) return aType == "u"; - - var bValue = b[i]; - var bType = (typeof bValue)[0]; - - if (aType == bType) { - if (aType != "o" && aType != "u" && aValue != bValue) { - return aValue < bValue; - } - i++; - } else { - // Handles remaining cases - if (aType == "o" && bType == "n") return true; - return bType == "s" || aType == "u"; - } - } -}; -/* eslint-enable eqeqeq */ -exports.versionLt = versionLt; - -/** - * @param {string} str range string - * @returns {SemVerRange} parsed range - */ -exports.parseRange = str => { - const splitAndConvert = str => { - return str - .split(".") - .map(item => (item !== "NaN" && `${+item}` === item ? +item : item)); - }; - // see https://docs.npmjs.com/misc/semver#range-grammar for grammar - const parsePartial = str => { - const match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str); - /** @type {(string|number|undefined|[])[]} */ - const ver = match[1] ? [0, ...splitAndConvert(match[1])] : [0]; - if (match[2]) { - ver.length++; - ver.push.apply(ver, splitAndConvert(match[2])); - } - - // remove trailing any matchers - let last = ver[ver.length - 1]; - while ( - ver.length && - (last === undefined || /^[*xX]$/.test(/** @type {string} */ (last))) - ) { - ver.pop(); - last = ver[ver.length - 1]; - } - - return ver; - }; - const toFixed = range => { - if (range.length === 1) { - // Special case for "*" is "x.x.x" instead of "=" - return [0]; - } else if (range.length === 2) { - // Special case for "1" is "1.x.x" instead of "=1" - return [1, ...range.slice(1)]; - } else if (range.length === 3) { - // Special case for "1.2" is "1.2.x" instead of "=1.2" - return [2, ...range.slice(1)]; - } else { - return [range.length, ...range.slice(1)]; - } - }; - const negate = range => { - return [-range[0] - 1, ...range.slice(1)]; - }; - const parseSimple = str => { - // simple ::= primitive | partial | tilde | caret - // primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | '!' ) ( ' ' ) * partial - // tilde ::= '~' ( ' ' ) * partial - // caret ::= '^' ( ' ' ) * partial - const match = /^(\^|~|<=|<|>=|>|=|v|!)/.exec(str); - const start = match ? match[0] : ""; - const remainder = parsePartial( - start.length ? str.slice(start.length).trim() : str.trim() - ); - switch (start) { - case "^": - if (remainder.length > 1 && remainder[1] === 0) { - if (remainder.length > 2 && remainder[2] === 0) { - return [3, ...remainder.slice(1)]; - } - return [2, ...remainder.slice(1)]; - } - return [1, ...remainder.slice(1)]; - case "~": - return [2, ...remainder.slice(1)]; - case ">=": - return remainder; - case "=": - case "v": - case "": - return toFixed(remainder); - case "<": - return negate(remainder); - case ">": { - // and( >=, not( = ) ) => >=, =, not, and - const fixed = toFixed(remainder); - // eslint-disable-next-line no-sparse-arrays - return [, fixed, 0, remainder, 2]; - } - case "<=": - // or( <, = ) => <, =, or - // eslint-disable-next-line no-sparse-arrays - return [, toFixed(remainder), negate(remainder), 1]; - case "!": { - // not = - const fixed = toFixed(remainder); - // eslint-disable-next-line no-sparse-arrays - return [, fixed, 0]; - } - default: - throw new Error("Unexpected start value"); - } - }; - const combine = (items, fn) => { - if (items.length === 1) return items[0]; - const arr = []; - for (const item of items.slice().reverse()) { - if (0 in item) { - arr.push(item); - } else { - arr.push(...item.slice(1)); - } - } - // eslint-disable-next-line no-sparse-arrays - return [, ...arr, ...items.slice(1).map(() => fn)]; - }; - const parseRange = str => { - // range ::= hyphen | simple ( ' ' ( ' ' ) * simple ) * | '' - // hyphen ::= partial ( ' ' ) * ' - ' ( ' ' ) * partial - const items = str.split(/\s+-\s+/); - if (items.length === 1) { - const items = str - .trim() - .split(/(?<=[-0-9A-Za-z])\s+/g) - .map(parseSimple); - return combine(items, 2); - } - const a = parsePartial(items[0]); - const b = parsePartial(items[1]); - // >=a <=b => and( >=a, or( >=a, { - // range-set ::= range ( logical-or range ) * - // logical-or ::= ( ' ' ) * '||' ( ' ' ) * - const items = str.split(/\s*\|\|\s*/).map(parseRange); - return combine(items, 1); - }; - return parseLogicalOr(str); -}; - -/* eslint-disable eqeqeq */ -const rangeToString = range => { - var fixCount = range[0]; - var str = ""; - if (range.length === 1) { - return "*"; - } else if (fixCount + 0.5) { - str += - fixCount == 0 - ? ">=" - : fixCount == -1 - ? "<" - : fixCount == 1 - ? "^" - : fixCount == 2 - ? "~" - : fixCount > 0 - ? "=" - : "!="; - var needDot = 1; - // eslint-disable-next-line no-redeclare - for (var i = 1; i < range.length; i++) { - var item = range[i]; - var t = (typeof item)[0]; - needDot--; - str += - t == "u" - ? // undefined: prerelease marker, add an "-" - "-" - : // number or string: add the item, set flag to add an "." between two of them - (needDot > 0 ? "." : "") + ((needDot = 2), item); - } - return str; - } else { - var stack = []; - // eslint-disable-next-line no-redeclare - for (var i = 1; i < range.length; i++) { - // eslint-disable-next-line no-redeclare - var item = range[i]; - stack.push( - item === 0 - ? "not(" + pop() + ")" - : item === 1 - ? "(" + pop() + " || " + pop() + ")" - : item === 2 - ? stack.pop() + " " + stack.pop() - : rangeToString(item) - ); - } - return pop(); - } - function pop() { - return stack.pop().replace(/^\((.+)\)$/, "$1"); - } -}; -/* eslint-enable eqeqeq */ -exports.rangeToString = rangeToString; - -/* eslint-disable eqeqeq */ -/** - * @param {SemVerRange} range version range - * @param {string} version the version - * @returns {boolean} if version satisfy the range - */ -const satisfy = (range, version) => { - if (0 in range) { - // @ts-expect-error - version = parseVersion(version); - var fixCount = range[0]; - // when negated is set it swill set for < instead of >= - var negated = fixCount < 0; - if (negated) fixCount = -fixCount - 1; - for (var i = 0, j = 1, isEqual = true; ; j++, i++) { - // cspell:word nequal nequ - - // when isEqual = true: - // range version: EOA/object undefined number string - // EOA equal block big-ver big-ver - // undefined bigger next big-ver big-ver - // number smaller block cmp big-cmp - // fixed number smaller block cmp-fix differ - // string smaller block differ cmp - // fixed string smaller block small-cmp cmp-fix - - // when isEqual = false: - // range version: EOA/object undefined number string - // EOA nequal block next-ver next-ver - // undefined nequal block next-ver next-ver - // number nequal block next next - // fixed number nequal block next next (this never happens) - // string nequal block next next - // fixed string nequal block next next (this never happens) - - // EOA end of array - // equal (version is equal range): - // when !negated: return true, - // when negated: return false - // bigger (version is bigger as range): - // when fixed: return false, - // when !negated: return true, - // when negated: return false, - // smaller (version is smaller as range): - // when !negated: return false, - // when negated: return true - // nequal (version is not equal range (> resp <)): return true - // block (version is in different prerelease area): return false - // differ (version is different from fixed range (string vs. number)): return false - // next: continues to the next items - // next-ver: when fixed: return false, continues to the next item only for the version, sets isEqual=false - // big-ver: when fixed || negated: return false, continues to the next item only for the version, sets isEqual=false - // next-nequ: continues to the next items, sets isEqual=false - // cmp (negated === false): version < range => return false, version > range => next-nequ, else => next - // cmp (negated === true): version > range => return false, version < range => next-nequ, else => next - // cmp-fix: version == range => next, else => return false - // big-cmp: when negated => return false, else => next-nequ - // small-cmp: when negated => next-nequ, else => return false - - var rangeType = j < range.length ? (typeof range[j])[0] : ""; - - var versionValue; - var versionType; - - // Handles first column in both tables (end of version or object) - if ( - i >= version.length || - ((versionValue = version[i]), - (versionType = (typeof versionValue)[0]) == "o") - ) { - // Handles nequal - if (!isEqual) return true; - // Handles bigger - if (rangeType == "u") return j > fixCount && !negated; - // Handles equal and smaller: (range === EOA) XOR negated - return (rangeType == "") != negated; // equal + smaller - } - - // Handles second column in both tables (version = undefined) - if (versionType == "u") { - if (!isEqual || rangeType != "u") { - return false; - } - } - - // switch between first and second table - else if (isEqual) { - // Handle diagonal - if (rangeType == versionType) { - if (j <= fixCount) { - // Handles "cmp-fix" cases - if (versionValue != range[j]) { - return false; - } - } else { - // Handles "cmp" cases - if (negated ? versionValue > range[j] : versionValue < range[j]) { - return false; - } - if (versionValue != range[j]) isEqual = false; - } - } - - // Handle big-ver - else if (rangeType != "s" && rangeType != "n") { - if (negated || j <= fixCount) return false; - isEqual = false; - j--; - } - - // Handle differ, big-cmp and small-cmp - else if (j <= fixCount || versionType < rangeType != negated) { - return false; - } else { - isEqual = false; - } - } else { - // Handles all "next-ver" cases in the second table - if (rangeType != "s" && rangeType != "n") { - isEqual = false; - j--; - } - - // next is applied by default - } - } - } - /** @type {(boolean | number)[]} */ - var stack = []; - var p = stack.pop.bind(stack); - // eslint-disable-next-line no-redeclare - for (var i = 1; i < range.length; i++) { - var item = /** @type {SemVerRange | 0 | 1 | 2} */ (range[i]); - stack.push( - item == 1 - ? p() | p() - : item == 2 - ? p() & p() - : item - ? satisfy(item, version) - : !p() - ); - } - return !!p(); -}; -/* eslint-enable eqeqeq */ -exports.satisfy = satisfy; - -exports.stringifyHoley = json => { - switch (typeof json) { - case "undefined": - return ""; - case "object": - if (Array.isArray(json)) { - let str = "["; - for (let i = 0; i < json.length; i++) { - if (i !== 0) str += ","; - str += this.stringifyHoley(json[i]); - } - str += "]"; - return str; - } else { - return JSON.stringify(json); - } - default: - return JSON.stringify(json); - } -}; - -//#region runtime code: parseVersion -exports.parseVersionRuntimeCode = runtimeTemplate => - `var parseVersion = ${runtimeTemplate.basicFunction("str", [ - "// see webpack/lib/util/semver.js for original code", - `var p=${ - runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)" - }{return p.split(".").map((${ - runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)" - }{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;` - ])}`; -//#endregion - -//#region runtime code: versionLt -exports.versionLtRuntimeCode = runtimeTemplate => - `var versionLt = ${runtimeTemplate.basicFunction("a, b", [ - "// see webpack/lib/util/semver.js for original code", - 'a=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r=b.length)return"u"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return"o"==n&&"n"==f||("s"==f||"u"==n);if("o"!=n&&"u"!=n&&e!=t)return e - `var rangeToString = ${runtimeTemplate.basicFunction("range", [ - "// see webpack/lib/util/semver.js for original code", - 'var r=range[0],n="";if(1===range.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var e=1,a=1;a0?".":"")+(e=2,t)}return n}var g=[];for(a=1;a - `var satisfy = ${runtimeTemplate.basicFunction("range, version", [ - "// see webpack/lib/util/semver.js for original code", - 'if(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i=version.length||"o"==(s=(typeof(f=version[n]))[0]))return!a||("u"==g?i>e&&!r:""==g!=r);if("u"==s){if(!a||"u"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f - __webpack_require__(32490) -); -const getObjectMiddleware = memoize(() => - __webpack_require__(19066) -); -const getSingleItemMiddleware = memoize(() => - __webpack_require__(11625) -); -const getSerializer = memoize(() => __webpack_require__(25347)); -const getSerializerMiddleware = memoize(() => - __webpack_require__(51947) -); - -const getBinaryMiddlewareInstance = memoize( - () => new (getBinaryMiddleware())() -); - -const registerSerializers = memoize(() => { - __webpack_require__(35804); - - // Load internal paths with a relative require - // This allows bundling all internal serializers - const internalSerializables = __webpack_require__(6280); - getObjectMiddleware().registerLoader(/^webpack\/lib\//, req => { - const loader = internalSerializables[req.slice("webpack/lib/".length)]; - if (loader) { - loader(); - } else { - console.warn(`${req} not found in internalSerializables`); - } - return true; - }); -}); - -/** @type {Serializer} */ -let buffersSerializer; - -// Expose serialization API -module.exports = { - get register() { - return getObjectMiddleware().register; - }, - get registerLoader() { - return getObjectMiddleware().registerLoader; - }, - get registerNotSerializable() { - return getObjectMiddleware().registerNotSerializable; - }, - get NOT_SERIALIZABLE() { - return getObjectMiddleware().NOT_SERIALIZABLE; - }, - /** @type {MEASURE_START_OPERATION} */ - get MEASURE_START_OPERATION() { - return getBinaryMiddleware().MEASURE_START_OPERATION; - }, - /** @type {MEASURE_END_OPERATION} */ - get MEASURE_END_OPERATION() { - return getBinaryMiddleware().MEASURE_END_OPERATION; - }, - get buffersSerializer() { - if (buffersSerializer !== undefined) return buffersSerializer; - registerSerializers(); - const Serializer = getSerializer(); - const binaryMiddleware = getBinaryMiddlewareInstance(); - const SerializerMiddleware = getSerializerMiddleware(); - const SingleItemMiddleware = getSingleItemMiddleware(); - return (buffersSerializer = new Serializer([ - new SingleItemMiddleware(), - new (getObjectMiddleware())(context => { - if (context.write) { - context.writeLazy = value => { - context.write( - SerializerMiddleware.createLazy(value, binaryMiddleware) - ); - }; - } - }, "md4"), - binaryMiddleware - ])); - }, - createFileSerializer: (fs, hashFunction) => { - registerSerializers(); - const Serializer = getSerializer(); - const FileMiddleware = __webpack_require__(42404); - const fileMiddleware = new FileMiddleware(fs, hashFunction); - const binaryMiddleware = getBinaryMiddlewareInstance(); - const SerializerMiddleware = getSerializerMiddleware(); - const SingleItemMiddleware = getSingleItemMiddleware(); - return new Serializer([ - new SingleItemMiddleware(), - new (getObjectMiddleware())(context => { - if (context.write) { - context.writeLazy = value => { - context.write( - SerializerMiddleware.createLazy(value, binaryMiddleware) - ); - }; - context.writeSeparate = (value, options) => { - const lazy = SerializerMiddleware.createLazy( - value, - fileMiddleware, - options - ); - context.write(lazy); - return lazy; - }; - } - }, hashFunction), - binaryMiddleware, - fileMiddleware - ]); - } -}; - - -/***/ }), - -/***/ 64726: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** - * @typedef {Object} GroupOptions - * @property {boolean=} groupChildren - * @property {boolean=} force - * @property {number=} targetGroupCount - */ - -/** - * @template T - * @template R - * @typedef {Object} GroupConfig - * @property {function(T): string[]} getKeys - * @property {function(string, (R | T)[], T[]): R} createGroup - * @property {function(string, T[]): GroupOptions=} getOptions - */ - -/** - * @template T - * @template R - * @typedef {Object} ItemWithGroups - * @property {T} item - * @property {Set>} groups - */ - -/** - * @template T - * @template R - * @typedef {{ config: GroupConfig, name: string, alreadyGrouped: boolean, items: Set> | undefined }} Group - */ - -/** - * @template T - * @template R - * @param {T[]} items the list of items - * @param {GroupConfig[]} groupConfigs configuration - * @returns {(R | T)[]} grouped items - */ -const smartGrouping = (items, groupConfigs) => { - /** @type {Set>} */ - const itemsWithGroups = new Set(); - /** @type {Map>} */ - const allGroups = new Map(); - for (const item of items) { - /** @type {Set>} */ - const groups = new Set(); - for (let i = 0; i < groupConfigs.length; i++) { - const groupConfig = groupConfigs[i]; - const keys = groupConfig.getKeys(item); - if (keys) { - for (const name of keys) { - const key = `${i}:${name}`; - let group = allGroups.get(key); - if (group === undefined) { - allGroups.set( - key, - (group = { - config: groupConfig, - name, - alreadyGrouped: false, - items: undefined - }) - ); - } - groups.add(group); - } - } - } - itemsWithGroups.add({ - item, - groups - }); - } - /** - * @param {Set>} itemsWithGroups input items with groups - * @returns {(T | R)[]} groups items - */ - const runGrouping = itemsWithGroups => { - const totalSize = itemsWithGroups.size; - for (const entry of itemsWithGroups) { - for (const group of entry.groups) { - if (group.alreadyGrouped) continue; - const items = group.items; - if (items === undefined) { - group.items = new Set([entry]); - } else { - items.add(entry); - } - } - } - /** @type {Map, { items: Set>, options: GroupOptions | false | undefined, used: boolean }>} */ - const groupMap = new Map(); - for (const group of allGroups.values()) { - if (group.items) { - const items = group.items; - group.items = undefined; - groupMap.set(group, { - items, - options: undefined, - used: false - }); - } - } - /** @type {(T | R)[]} */ - const results = []; - for (;;) { - /** @type {Group} */ - let bestGroup = undefined; - let bestGroupSize = -1; - let bestGroupItems = undefined; - let bestGroupOptions = undefined; - for (const [group, state] of groupMap) { - const { items, used } = state; - let options = state.options; - if (options === undefined) { - const groupConfig = group.config; - state.options = options = - (groupConfig.getOptions && - groupConfig.getOptions( - group.name, - Array.from(items, ({ item }) => item) - )) || - false; - } - - const force = options && options.force; - if (!force) { - if (bestGroupOptions && bestGroupOptions.force) continue; - if (used) continue; - if (items.size <= 1 || totalSize - items.size <= 1) { - continue; - } - } - const targetGroupCount = (options && options.targetGroupCount) || 4; - let sizeValue = force - ? items.size - : Math.min( - items.size, - (totalSize * 2) / targetGroupCount + - itemsWithGroups.size - - items.size - ); - if ( - sizeValue > bestGroupSize || - (force && (!bestGroupOptions || !bestGroupOptions.force)) - ) { - bestGroup = group; - bestGroupSize = sizeValue; - bestGroupItems = items; - bestGroupOptions = options; - } - } - if (bestGroup === undefined) { - break; - } - const items = new Set(bestGroupItems); - const options = bestGroupOptions; - - const groupChildren = !options || options.groupChildren !== false; - - for (const item of items) { - itemsWithGroups.delete(item); - // Remove all groups that items have from the map to not select them again - for (const group of item.groups) { - const state = groupMap.get(group); - if (state !== undefined) { - state.items.delete(item); - if (state.items.size === 0) { - groupMap.delete(group); - } else { - state.options = undefined; - if (groupChildren) { - state.used = true; - } - } - } - } - } - groupMap.delete(bestGroup); - - const key = bestGroup.name; - const groupConfig = bestGroup.config; - - const allItems = Array.from(items, ({ item }) => item); - - bestGroup.alreadyGrouped = true; - const children = groupChildren ? runGrouping(items) : allItems; - bestGroup.alreadyGrouped = false; - - results.push(groupConfig.createGroup(key, children, allItems)); - } - for (const { item } of itemsWithGroups) { - results.push(item); - } - return results; - }; - return runGrouping(itemsWithGroups); -}; - -module.exports = smartGrouping; - - -/***/ }), - -/***/ 22307: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("webpack-sources").Source} Source */ - -/** @type {WeakMap>} */ -const equalityCache = new WeakMap(); - -/** - * @param {Source} a a source - * @param {Source} b another source - * @returns {boolean} true, when both sources are equal - */ -const _isSourceEqual = (a, b) => { - // prefer .buffer(), it's called anyway during emit - /** @type {Buffer|string} */ - let aSource = typeof a.buffer === "function" ? a.buffer() : a.source(); - /** @type {Buffer|string} */ - let bSource = typeof b.buffer === "function" ? b.buffer() : b.source(); - if (aSource === bSource) return true; - if (typeof aSource === "string" && typeof bSource === "string") return false; - if (!Buffer.isBuffer(aSource)) aSource = Buffer.from(aSource, "utf-8"); - if (!Buffer.isBuffer(bSource)) bSource = Buffer.from(bSource, "utf-8"); - return aSource.equals(bSource); -}; - -/** - * @param {Source} a a source - * @param {Source} b another source - * @returns {boolean} true, when both sources are equal - */ -const isSourceEqual = (a, b) => { - if (a === b) return true; - const cache1 = equalityCache.get(a); - if (cache1 !== undefined) { - const result = cache1.get(b); - if (result !== undefined) return result; - } - const result = _isSourceEqual(a, b); - if (cache1 !== undefined) { - cache1.set(b, result); - } else { - const map = new WeakMap(); - map.set(b, result); - equalityCache.set(a, map); - } - const cache2 = equalityCache.get(b); - if (cache2 !== undefined) { - cache2.set(a, result); - } else { - const map = new WeakMap(); - map.set(a, result); - equalityCache.set(b, map); - } - return result; -}; -exports.isSourceEqual = isSourceEqual; - - -/***/ }), - -/***/ 71732: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { validate } = __webpack_require__(38476); - -/* cSpell:disable */ -const DID_YOU_MEAN = { - rules: "module.rules", - loaders: "module.rules or module.rules.*.use", - query: "module.rules.*.options (BREAKING CHANGE since webpack 5)", - noParse: "module.noParse", - filename: "output.filename or module.rules.*.generator.filename", - file: "output.filename", - chunkFilename: "output.chunkFilename", - chunkfilename: "output.chunkFilename", - ecmaVersion: - "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", - ecmaversion: - "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", - ecma: "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", - path: "output.path", - pathinfo: "output.pathinfo", - pathInfo: "output.pathinfo", - jsonpFunction: "output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)", - chunkCallbackName: - "output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)", - jsonpScriptType: "output.scriptType (BREAKING CHANGE since webpack 5)", - hotUpdateFunction: "output.hotUpdateGlobal (BREAKING CHANGE since webpack 5)", - splitChunks: "optimization.splitChunks", - immutablePaths: "snapshot.immutablePaths", - managedPaths: "snapshot.managedPaths", - maxModules: "stats.modulesSpace (BREAKING CHANGE since webpack 5)", - hashedModuleIds: - 'optimization.moduleIds: "hashed" (BREAKING CHANGE since webpack 5)', - namedChunks: - 'optimization.chunkIds: "named" (BREAKING CHANGE since webpack 5)', - namedModules: - 'optimization.moduleIds: "named" (BREAKING CHANGE since webpack 5)', - occurrenceOrder: - 'optimization.chunkIds: "size" and optimization.moduleIds: "size" (BREAKING CHANGE since webpack 5)', - automaticNamePrefix: - "optimization.splitChunks.[cacheGroups.*].idHint (BREAKING CHANGE since webpack 5)", - noEmitOnErrors: - "optimization.emitOnErrors (BREAKING CHANGE since webpack 5: logic is inverted to avoid negative flags)", - Buffer: - "to use the ProvidePlugin to process the Buffer variable to modules as polyfill\n" + - "BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n" + - "Note: if you are using 'node.Buffer: false', you can just remove that as this is the default behavior now.\n" + - "To provide a polyfill to modules use:\n" + - 'new ProvidePlugin({ Buffer: ["buffer", "Buffer"] }) and npm install buffer.', - process: - "to use the ProvidePlugin to process the process variable to modules as polyfill\n" + - "BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n" + - "Note: if you are using 'node.process: false', you can just remove that as this is the default behavior now.\n" + - "To provide a polyfill to modules use:\n" + - 'new ProvidePlugin({ process: "process" }) and npm install buffer.' -}; - -const REMOVED = { - concord: - "BREAKING CHANGE: resolve.concord has been removed and is no longer available.", - devtoolLineToLine: - "BREAKING CHANGE: output.devtoolLineToLine has been removed and is no longer available." -}; -/* cSpell:enable */ - -/** - * @param {Parameters[0]} schema a json schema - * @param {Parameters[1]} options the options that should be validated - * @param {Parameters[2]=} validationConfiguration configuration for generating errors - * @returns {void} - */ -const validateSchema = (schema, options, validationConfiguration) => { - validate( - schema, - options, - validationConfiguration || { - name: "Webpack", - postFormatter: (formattedError, error) => { - const children = error.children; - if ( - children && - children.some( - child => - child.keyword === "absolutePath" && - child.dataPath === ".output.filename" - ) - ) { - return `${formattedError}\nPlease use output.path to specify absolute path and output.filename for the file name.`; - } - - if ( - children && - children.some( - child => - child.keyword === "pattern" && child.dataPath === ".devtool" - ) - ) { - return ( - `${formattedError}\n` + - "BREAKING CHANGE since webpack 5: The devtool option is more strict.\n" + - "Please strictly follow the order of the keywords in the pattern." - ); - } - - if (error.keyword === "additionalProperties") { - const params = - /** @type {import("ajv").AdditionalPropertiesParams} */ ( - error.params - ); - if ( - Object.prototype.hasOwnProperty.call( - DID_YOU_MEAN, - params.additionalProperty - ) - ) { - return `${formattedError}\nDid you mean ${ - DID_YOU_MEAN[params.additionalProperty] - }?`; - } - - if ( - Object.prototype.hasOwnProperty.call( - REMOVED, - params.additionalProperty - ) - ) { - return `${formattedError}\n${REMOVED[params.additionalProperty]}?`; - } - - if (!error.dataPath) { - if (params.additionalProperty === "debug") { - return ( - `${formattedError}\n` + - "The 'debug' property was removed in webpack 2.0.0.\n" + - "Loaders should be updated to allow passing this option via loader options in module.rules.\n" + - "Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n" + - "plugins: [\n" + - " new webpack.LoaderOptionsPlugin({\n" + - " debug: true\n" + - " })\n" + - "]" - ); - } - - if (params.additionalProperty) { - return ( - `${formattedError}\n` + - "For typos: please correct them.\n" + - "For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.\n" + - " Loaders should be updated to allow passing options via loader options in module.rules.\n" + - " Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n" + - " plugins: [\n" + - " new webpack.LoaderOptionsPlugin({\n" + - " // test: /\\.xxx$/, // may apply this only for some modules\n" + - " options: {\n" + - ` ${params.additionalProperty}: …\n` + - " }\n" + - " })\n" + - " ]" - ); - } - } - } - - return formattedError; - } - } - ); -}; -module.exports = validateSchema; - - -/***/ }), - -/***/ 12501: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); - -class AsyncWasmLoadingRuntimeModule extends RuntimeModule { - constructor({ generateLoadBinaryCode, supportsStreaming }) { - super("wasm loading", RuntimeModule.STAGE_NORMAL); - this.generateLoadBinaryCode = generateLoadBinaryCode; - this.supportsStreaming = supportsStreaming; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { compilation, chunk } = this; - const { outputOptions, runtimeTemplate } = compilation; - const fn = RuntimeGlobals.instantiateWasm; - const wasmModuleSrcPath = compilation.getPath( - JSON.stringify(outputOptions.webassemblyModuleFilename), - { - hash: `" + ${RuntimeGlobals.getFullHash}() + "`, - hashWithLength: length => - `" + ${RuntimeGlobals.getFullHash}}().slice(0, ${length}) + "`, - module: { - id: '" + wasmModuleId + "', - hash: `" + wasmModuleHash + "`, - hashWithLength(length) { - return `" + wasmModuleHash.slice(0, ${length}) + "`; - } - }, - runtime: chunk.runtime - } - ); - return `${fn} = ${runtimeTemplate.basicFunction( - "exports, wasmModuleId, wasmModuleHash, importsObj", - [ - `var req = ${this.generateLoadBinaryCode(wasmModuleSrcPath)};`, - this.supportsStreaming - ? Template.asString([ - "if (typeof WebAssembly.instantiateStreaming === 'function') {", - Template.indent([ - "return WebAssembly.instantiateStreaming(req, importsObj)", - Template.indent([ - `.then(${runtimeTemplate.returningFunction( - "Object.assign(exports, res.instance.exports)", - "res" - )});` - ]) - ]), - "}" - ]) - : "// no support for streaming compilation", - "return req", - Template.indent([ - `.then(${runtimeTemplate.returningFunction("x.arrayBuffer()", "x")})`, - `.then(${runtimeTemplate.returningFunction( - "WebAssembly.instantiate(bytes, importsObj)", - "bytes" - )})`, - `.then(${runtimeTemplate.returningFunction( - "Object.assign(exports, res.instance.exports)", - "res" - )});` - ]) - ] - )};`; - } -} - -module.exports = AsyncWasmLoadingRuntimeModule; - - -/***/ }), - -/***/ 75903: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Generator = __webpack_require__(97152); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../NormalModule")} NormalModule */ - -const TYPES = new Set(["webassembly"]); - -class AsyncWebAssemblyGenerator extends Generator { - constructor(options) { - super(); - this.options = options; - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const originalSource = module.originalSource(); - if (!originalSource) { - return 0; - } - return originalSource.size(); - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - return module.originalSource(); - } -} - -module.exports = AsyncWebAssemblyGenerator; - - -/***/ }), - -/***/ 55554: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Generator = __webpack_require__(97152); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const WebAssemblyImportDependency = __webpack_require__(60718); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -const TYPES = new Set(["webassembly"]); - -class AsyncWebAssemblyJavascriptGenerator extends Generator { - constructor(filenameTemplate) { - super(); - this.filenameTemplate = filenameTemplate; - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - return 40 + module.dependencies.length * 10; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const { - runtimeTemplate, - chunkGraph, - moduleGraph, - runtimeRequirements, - runtime - } = generateContext; - runtimeRequirements.add(RuntimeGlobals.module); - runtimeRequirements.add(RuntimeGlobals.moduleId); - runtimeRequirements.add(RuntimeGlobals.exports); - runtimeRequirements.add(RuntimeGlobals.instantiateWasm); - /** @type {InitFragment[]} */ - const initFragments = []; - /** @type {Map} */ - const depModules = new Map(); - /** @type {Map} */ - const wasmDepsByRequest = new Map(); - for (const dep of module.dependencies) { - if (dep instanceof WebAssemblyImportDependency) { - const module = moduleGraph.getModule(dep); - if (!depModules.has(module)) { - depModules.set(module, { - request: dep.request, - importVar: `WEBPACK_IMPORTED_MODULE_${depModules.size}` - }); - } - let list = wasmDepsByRequest.get(dep.request); - if (list === undefined) { - list = []; - wasmDepsByRequest.set(dep.request, list); - } - list.push(dep); - } - } - - const promises = []; - - const importStatements = Array.from( - depModules, - ([importedModule, { request, importVar }]) => { - if (moduleGraph.isAsync(importedModule)) { - promises.push(importVar); - } - return runtimeTemplate.importStatement({ - update: false, - module: importedModule, - chunkGraph, - request, - originModule: module, - importVar, - runtimeRequirements - }); - } - ); - const importsCode = importStatements.map(([x]) => x).join(""); - const importsCompatCode = importStatements.map(([_, x]) => x).join(""); - - const importObjRequestItems = Array.from( - wasmDepsByRequest, - ([request, deps]) => { - const exportItems = deps.map(dep => { - const importedModule = moduleGraph.getModule(dep); - const importVar = depModules.get(importedModule).importVar; - return `${JSON.stringify( - dep.name - )}: ${runtimeTemplate.exportFromImport({ - moduleGraph, - module: importedModule, - request, - exportName: dep.name, - originModule: module, - asiSafe: true, - isCall: false, - callContext: false, - defaultInterop: true, - importVar, - initFragments, - runtime, - runtimeRequirements - })}`; - }); - return Template.asString([ - `${JSON.stringify(request)}: {`, - Template.indent(exportItems.join(",\n")), - "}" - ]); - } - ); - - const importsObj = - importObjRequestItems.length > 0 - ? Template.asString([ - "{", - Template.indent(importObjRequestItems.join(",\n")), - "}" - ]) - : undefined; - - const instantiateCall = - `${RuntimeGlobals.instantiateWasm}(${module.exportsArgument}, ${ - module.moduleArgument - }.id, ${JSON.stringify( - chunkGraph.getRenderedModuleHash(module, runtime) - )}` + (importsObj ? `, ${importsObj})` : `)`); - - if (promises.length > 0) - runtimeRequirements.add(RuntimeGlobals.asyncModule); - - const source = new RawSource( - promises.length > 0 - ? Template.asString([ - `var __webpack_instantiate__ = ${runtimeTemplate.basicFunction( - `[${promises.join(", ")}]`, - `${importsCompatCode}return ${instantiateCall};` - )}`, - `${RuntimeGlobals.asyncModule}(${ - module.moduleArgument - }, async ${runtimeTemplate.basicFunction( - "__webpack_handle_async_dependencies__, __webpack_async_result__", - [ - "try {", - importsCode, - `var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${promises.join( - ", " - )}]);`, - `var [${promises.join( - ", " - )}] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__;`, - `${importsCompatCode}await ${instantiateCall};`, - "__webpack_async_result__();", - "} catch(e) { __webpack_async_result__(e); }" - ] - )}, 1);` - ]) - : `${importsCode}${importsCompatCode}module.exports = ${instantiateCall};` - ); - - return InitFragment.addToSource(source, initFragments, generateContext); - } -} - -module.exports = AsyncWebAssemblyJavascriptGenerator; - - -/***/ }), - -/***/ 24979: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const Generator = __webpack_require__(97152); -const { tryRunOrWebpackError } = __webpack_require__(35230); -const WebAssemblyImportDependency = __webpack_require__(60718); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const memoize = __webpack_require__(61374); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../Template").RenderManifestEntry} RenderManifestEntry */ -/** @typedef {import("../Template").RenderManifestOptions} RenderManifestOptions */ - -const getAsyncWebAssemblyGenerator = memoize(() => - __webpack_require__(75903) -); -const getAsyncWebAssemblyJavascriptGenerator = memoize(() => - __webpack_require__(55554) -); -const getAsyncWebAssemblyParser = memoize(() => - __webpack_require__(15336) -); - -/** - * @typedef {Object} WebAssemblyRenderContext - * @property {Chunk} chunk the chunk - * @property {DependencyTemplates} dependencyTemplates the dependency templates - * @property {RuntimeTemplate} runtimeTemplate the runtime template - * @property {ModuleGraph} moduleGraph the module graph - * @property {ChunkGraph} chunkGraph the chunk graph - * @property {CodeGenerationResults} codeGenerationResults results of code generation - */ - -/** - * @typedef {Object} CompilationHooks - * @property {SyncWaterfallHook<[Source, Module, WebAssemblyRenderContext]>} renderModuleContent - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class AsyncWebAssemblyModulesPlugin { - /** - * @param {Compilation} compilation the compilation - * @returns {CompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - renderModuleContent: new SyncWaterfallHook([ - "source", - "module", - "renderContext" - ]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "AsyncWebAssemblyModulesPlugin", - (compilation, { normalModuleFactory }) => { - const hooks = - AsyncWebAssemblyModulesPlugin.getCompilationHooks(compilation); - compilation.dependencyFactories.set( - WebAssemblyImportDependency, - normalModuleFactory - ); - - normalModuleFactory.hooks.createParser - .for("webassembly/async") - .tap("AsyncWebAssemblyModulesPlugin", () => { - const AsyncWebAssemblyParser = getAsyncWebAssemblyParser(); - - return new AsyncWebAssemblyParser(); - }); - normalModuleFactory.hooks.createGenerator - .for("webassembly/async") - .tap("AsyncWebAssemblyModulesPlugin", () => { - const AsyncWebAssemblyJavascriptGenerator = - getAsyncWebAssemblyJavascriptGenerator(); - const AsyncWebAssemblyGenerator = getAsyncWebAssemblyGenerator(); - - return Generator.byType({ - javascript: new AsyncWebAssemblyJavascriptGenerator( - compilation.outputOptions.webassemblyModuleFilename - ), - webassembly: new AsyncWebAssemblyGenerator(this.options) - }); - }); - - compilation.hooks.renderManifest.tap( - "WebAssemblyModulesPlugin", - (result, options) => { - const { moduleGraph, chunkGraph, runtimeTemplate } = compilation; - const { - chunk, - outputOptions, - dependencyTemplates, - codeGenerationResults - } = options; - - for (const module of chunkGraph.getOrderedChunkModulesIterable( - chunk, - compareModulesByIdentifier - )) { - if (module.type === "webassembly/async") { - const filenameTemplate = - outputOptions.webassemblyModuleFilename; - - result.push({ - render: () => - this.renderModule( - module, - { - chunk, - dependencyTemplates, - runtimeTemplate, - moduleGraph, - chunkGraph, - codeGenerationResults - }, - hooks - ), - filenameTemplate, - pathOptions: { - module, - runtime: chunk.runtime, - chunkGraph - }, - auxiliary: true, - identifier: `webassemblyAsyncModule${chunkGraph.getModuleId( - module - )}`, - hash: chunkGraph.getModuleHash(module, chunk.runtime) - }); - } - } - - return result; - } - ); - } - ); - } - - renderModule(module, renderContext, hooks) { - const { codeGenerationResults, chunk } = renderContext; - try { - const moduleSource = codeGenerationResults.getSource( - module, - chunk.runtime, - "webassembly" - ); - return tryRunOrWebpackError( - () => - hooks.renderModuleContent.call(moduleSource, module, renderContext), - "AsyncWebAssemblyModulesPlugin.getCompilationHooks().renderModuleContent" - ); - } catch (e) { - e.module = module; - throw e; - } - } -} - -module.exports = AsyncWebAssemblyModulesPlugin; - - -/***/ }), - -/***/ 15336: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const t = __webpack_require__(44977); -const { decode } = __webpack_require__(41786); -const Parser = __webpack_require__(68646); -const StaticExportsDependency = __webpack_require__(19383); -const WebAssemblyImportDependency = __webpack_require__(60718); - -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -const decoderOpts = { - ignoreCodeSection: true, - ignoreDataSection: true, - - // this will avoid having to lookup with identifiers in the ModuleContext - ignoreCustomNameSection: true -}; - -class WebAssemblyParser extends Parser { - constructor(options) { - super(); - this.hooks = Object.freeze({}); - this.options = options; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (!Buffer.isBuffer(source)) { - throw new Error("WebAssemblyParser input must be a Buffer"); - } - - // flag it as async module - state.module.buildInfo.strict = true; - state.module.buildMeta.exportsType = "namespace"; - state.module.buildMeta.async = true; - - // parse it - const program = decode(source, decoderOpts); - const module = program.body[0]; - - const exports = []; - t.traverse(module, { - ModuleExport({ node }) { - exports.push(node.name); - }, - - ModuleImport({ node }) { - const dep = new WebAssemblyImportDependency( - node.module, - node.name, - node.descr, - false - ); - - state.module.addDependency(dep); - } - }); - - state.module.addDependency(new StaticExportsDependency(exports, false)); - - return state; - } -} - -module.exports = WebAssemblyParser; - - -/***/ }), - -/***/ 69889: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const WebpackError = __webpack_require__(27154); - -module.exports = class UnsupportedWebAssemblyFeatureError extends WebpackError { - /** @param {string} message Error message */ - constructor(message) { - super(message); - this.name = "UnsupportedWebAssemblyFeatureError"; - this.hideStack = true; - } -}; - - -/***/ }), - -/***/ 16671: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const WebAssemblyUtils = __webpack_require__(92050); - -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ - -// TODO webpack 6 remove the whole folder - -// Get all wasm modules -const getAllWasmModules = (moduleGraph, chunkGraph, chunk) => { - const wasmModules = chunk.getAllAsyncChunks(); - const array = []; - for (const chunk of wasmModules) { - for (const m of chunkGraph.getOrderedChunkModulesIterable( - chunk, - compareModulesByIdentifier - )) { - if (m.type.startsWith("webassembly")) { - array.push(m); - } - } - } - - return array; -}; - -/** - * generates the import object function for a module - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {Module} module the module - * @param {boolean} mangle mangle imports - * @param {string[]} declarations array where declarations are pushed to - * @param {RuntimeSpec} runtime the runtime - * @returns {string} source code - */ -const generateImportObject = ( - chunkGraph, - module, - mangle, - declarations, - runtime -) => { - const moduleGraph = chunkGraph.moduleGraph; - const waitForInstances = new Map(); - const properties = []; - const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies( - moduleGraph, - module, - mangle - ); - for (const usedDep of usedWasmDependencies) { - const dep = usedDep.dependency; - const importedModule = moduleGraph.getModule(dep); - const exportName = dep.name; - const usedName = - importedModule && - moduleGraph - .getExportsInfo(importedModule) - .getUsedName(exportName, runtime); - const description = dep.description; - const direct = dep.onlyDirectImport; - - const module = usedDep.module; - const name = usedDep.name; - - if (direct) { - const instanceVar = `m${waitForInstances.size}`; - waitForInstances.set(instanceVar, chunkGraph.getModuleId(importedModule)); - properties.push({ - module, - name, - value: `${instanceVar}[${JSON.stringify(usedName)}]` - }); - } else { - const params = description.signature.params.map( - (param, k) => "p" + k + param.valtype - ); - - const mod = `${RuntimeGlobals.moduleCache}[${JSON.stringify( - chunkGraph.getModuleId(importedModule) - )}]`; - const modExports = `${mod}.exports`; - - const cache = `wasmImportedFuncCache${declarations.length}`; - declarations.push(`var ${cache};`); - - properties.push({ - module, - name, - value: Template.asString([ - (importedModule.type.startsWith("webassembly") - ? `${mod} ? ${modExports}[${JSON.stringify(usedName)}] : ` - : "") + `function(${params}) {`, - Template.indent([ - `if(${cache} === undefined) ${cache} = ${modExports};`, - `return ${cache}[${JSON.stringify(usedName)}](${params});` - ]), - "}" - ]) - }); - } - } - - let importObject; - if (mangle) { - importObject = [ - "return {", - Template.indent([ - properties.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") - ]), - "};" - ]; - } else { - const propertiesByModule = new Map(); - for (const p of properties) { - let list = propertiesByModule.get(p.module); - if (list === undefined) { - propertiesByModule.set(p.module, (list = [])); - } - list.push(p); - } - importObject = [ - "return {", - Template.indent([ - Array.from(propertiesByModule, ([module, list]) => { - return Template.asString([ - `${JSON.stringify(module)}: {`, - Template.indent([ - list.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") - ]), - "}" - ]); - }).join(",\n") - ]), - "};" - ]; - } - - const moduleIdStringified = JSON.stringify(chunkGraph.getModuleId(module)); - if (waitForInstances.size === 1) { - const moduleId = Array.from(waitForInstances.values())[0]; - const promise = `installedWasmModules[${JSON.stringify(moduleId)}]`; - const variable = Array.from(waitForInstances.keys())[0]; - return Template.asString([ - `${moduleIdStringified}: function() {`, - Template.indent([ - `return promiseResolve().then(function() { return ${promise}; }).then(function(${variable}) {`, - Template.indent(importObject), - "});" - ]), - "}," - ]); - } else if (waitForInstances.size > 0) { - const promises = Array.from( - waitForInstances.values(), - id => `installedWasmModules[${JSON.stringify(id)}]` - ).join(", "); - const variables = Array.from( - waitForInstances.keys(), - (name, i) => `${name} = array[${i}]` - ).join(", "); - return Template.asString([ - `${moduleIdStringified}: function() {`, - Template.indent([ - `return promiseResolve().then(function() { return Promise.all([${promises}]); }).then(function(array) {`, - Template.indent([`var ${variables};`, ...importObject]), - "});" - ]), - "}," - ]); - } else { - return Template.asString([ - `${moduleIdStringified}: function() {`, - Template.indent(importObject), - "}," - ]); - } -}; - -class WasmChunkLoadingRuntimeModule extends RuntimeModule { - constructor({ - generateLoadBinaryCode, - supportsStreaming, - mangleImports, - runtimeRequirements - }) { - super("wasm chunk loading", RuntimeModule.STAGE_ATTACH); - this.generateLoadBinaryCode = generateLoadBinaryCode; - this.supportsStreaming = supportsStreaming; - this.mangleImports = mangleImports; - this._runtimeRequirements = runtimeRequirements; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, compilation, chunk, mangleImports } = this; - const { moduleGraph, outputOptions } = compilation; - const fn = RuntimeGlobals.ensureChunkHandlers; - const withHmr = this._runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const wasmModules = getAllWasmModules(moduleGraph, chunkGraph, chunk); - const declarations = []; - const importObjects = wasmModules.map(module => { - return generateImportObject( - chunkGraph, - module, - this.mangleImports, - declarations, - chunk.runtime - ); - }); - const chunkModuleIdMap = chunkGraph.getChunkModuleIdMap(chunk, m => - m.type.startsWith("webassembly") - ); - const createImportObject = content => - mangleImports - ? `{ ${JSON.stringify(WebAssemblyUtils.MANGLED_MODULE)}: ${content} }` - : content; - const wasmModuleSrcPath = compilation.getPath( - JSON.stringify(outputOptions.webassemblyModuleFilename), - { - hash: `" + ${RuntimeGlobals.getFullHash}() + "`, - hashWithLength: length => - `" + ${RuntimeGlobals.getFullHash}}().slice(0, ${length}) + "`, - module: { - id: '" + wasmModuleId + "', - hash: `" + ${JSON.stringify( - chunkGraph.getChunkModuleRenderedHashMap(chunk, m => - m.type.startsWith("webassembly") - ) - )}[chunkId][wasmModuleId] + "`, - hashWithLength(length) { - return `" + ${JSON.stringify( - chunkGraph.getChunkModuleRenderedHashMap( - chunk, - m => m.type.startsWith("webassembly"), - length - ) - )}[chunkId][wasmModuleId] + "`; - } - }, - runtime: chunk.runtime - } - ); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_wasm` - : undefined; - - return Template.asString([ - "// object to store loaded and loading wasm modules", - `var installedWasmModules = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{};`, - "", - // This function is used to delay reading the installed wasm module promises - // by a microtask. Sorting them doesn't help because there are edge cases where - // sorting is not possible (modules splitted into different chunks). - // So we not even trying and solve this by a microtask delay. - "function promiseResolve() { return Promise.resolve(); }", - "", - Template.asString(declarations), - "var wasmImportObjects = {", - Template.indent(importObjects), - "};", - "", - `var wasmModuleMap = ${JSON.stringify( - chunkModuleIdMap, - undefined, - "\t" - )};`, - "", - "// object with all WebAssembly.instance exports", - `${RuntimeGlobals.wasmInstances} = {};`, - "", - "// Fetch + compile chunk loading for webassembly", - `${fn}.wasm = function(chunkId, promises) {`, - Template.indent([ - "", - `var wasmModules = wasmModuleMap[chunkId] || [];`, - "", - "wasmModules.forEach(function(wasmModuleId, idx) {", - Template.indent([ - "var installedWasmModuleData = installedWasmModules[wasmModuleId];", - "", - '// a Promise means "currently loading" or "already loaded".', - "if(installedWasmModuleData)", - Template.indent(["promises.push(installedWasmModuleData);"]), - "else {", - Template.indent([ - `var importObject = wasmImportObjects[wasmModuleId]();`, - `var req = ${this.generateLoadBinaryCode(wasmModuleSrcPath)};`, - "var promise;", - this.supportsStreaming - ? Template.asString([ - "if(importObject && typeof importObject.then === 'function' && typeof WebAssembly.compileStreaming === 'function') {", - Template.indent([ - "promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {", - Template.indent([ - `return WebAssembly.instantiate(items[0], ${createImportObject( - "items[1]" - )});` - ]), - "});" - ]), - "} else if(typeof WebAssembly.instantiateStreaming === 'function') {", - Template.indent([ - `promise = WebAssembly.instantiateStreaming(req, ${createImportObject( - "importObject" - )});` - ]) - ]) - : Template.asString([ - "if(importObject && typeof importObject.then === 'function') {", - Template.indent([ - "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", - "promise = Promise.all([", - Template.indent([ - "bytesPromise.then(function(bytes) { return WebAssembly.compile(bytes); }),", - "importObject" - ]), - "]).then(function(items) {", - Template.indent([ - `return WebAssembly.instantiate(items[0], ${createImportObject( - "items[1]" - )});` - ]), - "});" - ]) - ]), - "} else {", - Template.indent([ - "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", - "promise = bytesPromise.then(function(bytes) {", - Template.indent([ - `return WebAssembly.instantiate(bytes, ${createImportObject( - "importObject" - )});` - ]), - "});" - ]), - "}", - "promises.push(installedWasmModules[wasmModuleId] = promise.then(function(res) {", - Template.indent([ - `return ${RuntimeGlobals.wasmInstances}[wasmModuleId] = (res.instance || res).exports;` - ]), - "}));" - ]), - "}" - ]), - "});" - ]), - "};" - ]); - } -} - -module.exports = WasmChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 15578: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const formatLocation = __webpack_require__(24014); -const UnsupportedWebAssemblyFeatureError = __webpack_require__(69889); - -/** @typedef {import("../Compiler")} Compiler */ - -class WasmFinalizeExportsPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap("WasmFinalizeExportsPlugin", compilation => { - compilation.hooks.finishModules.tap( - "WasmFinalizeExportsPlugin", - modules => { - for (const module of modules) { - // 1. if a WebAssembly module - if (module.type.startsWith("webassembly") === true) { - const jsIncompatibleExports = - module.buildMeta.jsIncompatibleExports; - - if (jsIncompatibleExports === undefined) { - continue; - } - - for (const connection of compilation.moduleGraph.getIncomingConnections( - module - )) { - // 2. is active and referenced by a non-WebAssembly module - if ( - connection.isTargetActive(undefined) && - connection.originModule.type.startsWith("webassembly") === - false - ) { - const referencedExports = - compilation.getDependencyReferencedExports( - connection.dependency, - undefined - ); - - for (const info of referencedExports) { - const names = Array.isArray(info) ? info : info.name; - if (names.length === 0) continue; - const name = names[0]; - if (typeof name === "object") continue; - // 3. and uses a func with an incompatible JS signature - if ( - Object.prototype.hasOwnProperty.call( - jsIncompatibleExports, - name - ) - ) { - // 4. error - const error = new UnsupportedWebAssemblyFeatureError( - `Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies\n` + - `It's used from ${connection.originModule.readableIdentifier( - compilation.requestShortener - )} at ${formatLocation(connection.dependency.loc)}.` - ); - error.module = module; - compilation.errors.push(error); - } - } - } - } - } - } - } - ); - }); - } -} - -module.exports = WasmFinalizeExportsPlugin; - - -/***/ }), - -/***/ 16415: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const Generator = __webpack_require__(97152); -const WebAssemblyUtils = __webpack_require__(92050); - -const t = __webpack_require__(44977); -const { moduleContextFromModuleAST } = __webpack_require__(44977); -const { editWithAST, addWithAST } = __webpack_require__(17696); -const { decode } = __webpack_require__(41786); - -const WebAssemblyExportImportedDependency = __webpack_require__(76598); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ -/** @typedef {import("./WebAssemblyUtils").UsedWasmDependency} UsedWasmDependency */ - -/** - * @typedef {(ArrayBuffer) => ArrayBuffer} ArrayBufferTransform - */ - -/** - * @template T - * @param {Function[]} fns transforms - * @returns {Function} composed transform - */ -const compose = (...fns) => { - return fns.reduce( - (prevFn, nextFn) => { - return value => nextFn(prevFn(value)); - }, - value => value - ); -}; - -/** - * Removes the start instruction - * - * @param {Object} state unused state - * @returns {ArrayBufferTransform} transform - */ -const removeStartFunc = state => bin => { - return editWithAST(state.ast, bin, { - Start(path) { - path.remove(); - } - }); -}; - -/** - * Get imported globals - * - * @param {Object} ast Module's AST - * @returns {Array} - nodes - */ -const getImportedGlobals = ast => { - const importedGlobals = []; - - t.traverse(ast, { - ModuleImport({ node }) { - if (t.isGlobalType(node.descr)) { - importedGlobals.push(node); - } - } - }); - - return importedGlobals; -}; - -/** - * Get the count for imported func - * - * @param {Object} ast Module's AST - * @returns {Number} - count - */ -const getCountImportedFunc = ast => { - let count = 0; - - t.traverse(ast, { - ModuleImport({ node }) { - if (t.isFuncImportDescr(node.descr)) { - count++; - } - } - }); - - return count; -}; - -/** - * Get next type index - * - * @param {Object} ast Module's AST - * @returns {t.Index} - index - */ -const getNextTypeIndex = ast => { - const typeSectionMetadata = t.getSectionMetadata(ast, "type"); - - if (typeSectionMetadata === undefined) { - return t.indexLiteral(0); - } - - return t.indexLiteral(typeSectionMetadata.vectorOfSize.value); -}; - -/** - * Get next func index - * - * The Func section metadata provide informations for implemented funcs - * in order to have the correct index we shift the index by number of external - * functions. - * - * @param {Object} ast Module's AST - * @param {Number} countImportedFunc number of imported funcs - * @returns {t.Index} - index - */ -const getNextFuncIndex = (ast, countImportedFunc) => { - const funcSectionMetadata = t.getSectionMetadata(ast, "func"); - - if (funcSectionMetadata === undefined) { - return t.indexLiteral(0 + countImportedFunc); - } - - const vectorOfSize = funcSectionMetadata.vectorOfSize.value; - - return t.indexLiteral(vectorOfSize + countImportedFunc); -}; - -/** - * Creates an init instruction for a global type - * @param {t.GlobalType} globalType the global type - * @returns {t.Instruction} init expression - */ -const createDefaultInitForGlobal = globalType => { - if (globalType.valtype[0] === "i") { - // create NumberLiteral global initializer - return t.objectInstruction("const", globalType.valtype, [ - t.numberLiteralFromRaw(66) - ]); - } else if (globalType.valtype[0] === "f") { - // create FloatLiteral global initializer - return t.objectInstruction("const", globalType.valtype, [ - t.floatLiteral(66, false, false, "66") - ]); - } else { - throw new Error("unknown type: " + globalType.valtype); - } -}; - -/** - * Rewrite the import globals: - * - removes the ModuleImport instruction - * - injects at the same offset a mutable global of the same type - * - * Since the imported globals are before the other global declarations, our - * indices will be preserved. - * - * Note that globals will become mutable. - * - * @param {Object} state unused state - * @returns {ArrayBufferTransform} transform - */ -const rewriteImportedGlobals = state => bin => { - const additionalInitCode = state.additionalInitCode; - const newGlobals = []; - - bin = editWithAST(state.ast, bin, { - ModuleImport(path) { - if (t.isGlobalType(path.node.descr)) { - const globalType = path.node.descr; - - globalType.mutability = "var"; - - const init = [ - createDefaultInitForGlobal(globalType), - t.instruction("end") - ]; - - newGlobals.push(t.global(globalType, init)); - - path.remove(); - } - }, - - // in order to preserve non-imported global's order we need to re-inject - // those as well - Global(path) { - const { node } = path; - const [init] = node.init; - - if (init.id === "get_global") { - node.globalType.mutability = "var"; - - const initialGlobalIdx = init.args[0]; - - node.init = [ - createDefaultInitForGlobal(node.globalType), - t.instruction("end") - ]; - - additionalInitCode.push( - /** - * get_global in global initializer only works for imported globals. - * They have the same indices as the init params, so use the - * same index. - */ - t.instruction("get_local", [initialGlobalIdx]), - t.instruction("set_global", [t.indexLiteral(newGlobals.length)]) - ); - } - - newGlobals.push(node); - - path.remove(); - } - }); - - // Add global declaration instructions - return addWithAST(state.ast, bin, newGlobals); -}; - -/** - * Rewrite the export names - * @param {Object} state state - * @param {Object} state.ast Module's ast - * @param {Module} state.module Module - * @param {ModuleGraph} state.moduleGraph module graph - * @param {Set} state.externalExports Module - * @param {RuntimeSpec} state.runtime runtime - * @returns {ArrayBufferTransform} transform - */ -const rewriteExportNames = - ({ ast, moduleGraph, module, externalExports, runtime }) => - bin => { - return editWithAST(ast, bin, { - ModuleExport(path) { - const isExternal = externalExports.has(path.node.name); - if (isExternal) { - path.remove(); - return; - } - const usedName = moduleGraph - .getExportsInfo(module) - .getUsedName(path.node.name, runtime); - if (!usedName) { - path.remove(); - return; - } - path.node.name = usedName; - } - }); - }; - -/** - * Mangle import names and modules - * @param {Object} state state - * @param {Object} state.ast Module's ast - * @param {Map} state.usedDependencyMap mappings to mangle names - * @returns {ArrayBufferTransform} transform - */ -const rewriteImports = - ({ ast, usedDependencyMap }) => - bin => { - return editWithAST(ast, bin, { - ModuleImport(path) { - const result = usedDependencyMap.get( - path.node.module + ":" + path.node.name - ); - - if (result !== undefined) { - path.node.module = result.module; - path.node.name = result.name; - } - } - }); - }; - -/** - * Add an init function. - * - * The init function fills the globals given input arguments. - * - * @param {Object} state transformation state - * @param {Object} state.ast Module's ast - * @param {t.Identifier} state.initFuncId identifier of the init function - * @param {t.Index} state.startAtFuncOffset index of the start function - * @param {t.ModuleImport[]} state.importedGlobals list of imported globals - * @param {t.Instruction[]} state.additionalInitCode list of addition instructions for the init function - * @param {t.Index} state.nextFuncIndex index of the next function - * @param {t.Index} state.nextTypeIndex index of the next type - * @returns {ArrayBufferTransform} transform - */ -const addInitFunction = - ({ - ast, - initFuncId, - startAtFuncOffset, - importedGlobals, - additionalInitCode, - nextFuncIndex, - nextTypeIndex - }) => - bin => { - const funcParams = importedGlobals.map(importedGlobal => { - // used for debugging - const id = t.identifier( - `${importedGlobal.module}.${importedGlobal.name}` - ); - - return t.funcParam(importedGlobal.descr.valtype, id); - }); - - const funcBody = []; - importedGlobals.forEach((importedGlobal, index) => { - const args = [t.indexLiteral(index)]; - const body = [ - t.instruction("get_local", args), - t.instruction("set_global", args) - ]; - - funcBody.push(...body); - }); - - if (typeof startAtFuncOffset === "number") { - funcBody.push( - t.callInstruction(t.numberLiteralFromRaw(startAtFuncOffset)) - ); - } - - for (const instr of additionalInitCode) { - funcBody.push(instr); - } - - funcBody.push(t.instruction("end")); - - const funcResults = []; - - // Code section - const funcSignature = t.signature(funcParams, funcResults); - const func = t.func(initFuncId, funcSignature, funcBody); - - // Type section - const functype = t.typeInstruction(undefined, funcSignature); - - // Func section - const funcindex = t.indexInFuncSection(nextTypeIndex); - - // Export section - const moduleExport = t.moduleExport( - initFuncId.value, - t.moduleExportDescr("Func", nextFuncIndex) - ); - - return addWithAST(ast, bin, [func, moduleExport, funcindex, functype]); - }; - -/** - * Extract mangle mappings from module - * @param {ModuleGraph} moduleGraph module graph - * @param {Module} module current module - * @param {boolean} mangle mangle imports - * @returns {Map} mappings to mangled names - */ -const getUsedDependencyMap = (moduleGraph, module, mangle) => { - /** @type {Map} */ - const map = new Map(); - for (const usedDep of WebAssemblyUtils.getUsedDependencies( - moduleGraph, - module, - mangle - )) { - const dep = usedDep.dependency; - const request = dep.request; - const exportName = dep.name; - map.set(request + ":" + exportName, usedDep); - } - return map; -}; - -const TYPES = new Set(["webassembly"]); - -class WebAssemblyGenerator extends Generator { - constructor(options) { - super(); - this.options = options; - } - - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - const originalSource = module.originalSource(); - if (!originalSource) { - return 0; - } - return originalSource.size(); - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, { moduleGraph, runtime }) { - const bin = module.originalSource().source(); - - const initFuncId = t.identifier(""); - - // parse it - const ast = decode(bin, { - ignoreDataSection: true, - ignoreCodeSection: true, - ignoreCustomNameSection: true - }); - - const moduleContext = moduleContextFromModuleAST(ast.body[0]); - - const importedGlobals = getImportedGlobals(ast); - const countImportedFunc = getCountImportedFunc(ast); - const startAtFuncOffset = moduleContext.getStart(); - const nextFuncIndex = getNextFuncIndex(ast, countImportedFunc); - const nextTypeIndex = getNextTypeIndex(ast); - - const usedDependencyMap = getUsedDependencyMap( - moduleGraph, - module, - this.options.mangleImports - ); - const externalExports = new Set( - module.dependencies - .filter(d => d instanceof WebAssemblyExportImportedDependency) - .map(d => { - const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ ( - d - ); - return wasmDep.exportName; - }) - ); - - /** @type {t.Instruction[]} */ - const additionalInitCode = []; - - const transform = compose( - rewriteExportNames({ - ast, - moduleGraph, - module, - externalExports, - runtime - }), - - removeStartFunc({ ast }), - - rewriteImportedGlobals({ ast, additionalInitCode }), - - rewriteImports({ - ast, - usedDependencyMap - }), - - addInitFunction({ - ast, - initFuncId, - importedGlobals, - additionalInitCode, - startAtFuncOffset, - nextFuncIndex, - nextTypeIndex - }) - ); - - const newBin = transform(bin); - - const newBuf = Buffer.from(newBin); - - return new RawSource(newBuf); - } -} - -module.exports = WebAssemblyGenerator; - - -/***/ }), - -/***/ 57650: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const WebpackError = __webpack_require__(27154); - -/** @typedef {import("../ChunkGraph")} ChunkGraph */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ -/** @typedef {import("../RequestShortener")} RequestShortener */ - -/** - * @param {Module} module module to get chains from - * @param {ModuleGraph} moduleGraph the module graph - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {RequestShortener} requestShortener to make readable identifiers - * @returns {string[]} all chains to the module - */ -const getInitialModuleChains = ( - module, - moduleGraph, - chunkGraph, - requestShortener -) => { - const queue = [ - { head: module, message: module.readableIdentifier(requestShortener) } - ]; - /** @type {Set} */ - const results = new Set(); - /** @type {Set} */ - const incompleteResults = new Set(); - /** @type {Set} */ - const visitedModules = new Set(); - - for (const chain of queue) { - const { head, message } = chain; - let final = true; - /** @type {Set} */ - const alreadyReferencedModules = new Set(); - for (const connection of moduleGraph.getIncomingConnections(head)) { - const newHead = connection.originModule; - if (newHead) { - if (!chunkGraph.getModuleChunks(newHead).some(c => c.canBeInitial())) - continue; - final = false; - if (alreadyReferencedModules.has(newHead)) continue; - alreadyReferencedModules.add(newHead); - const moduleName = newHead.readableIdentifier(requestShortener); - const detail = connection.explanation - ? ` (${connection.explanation})` - : ""; - const newMessage = `${moduleName}${detail} --> ${message}`; - if (visitedModules.has(newHead)) { - incompleteResults.add(`... --> ${newMessage}`); - continue; - } - visitedModules.add(newHead); - queue.push({ - head: newHead, - message: newMessage - }); - } else { - final = false; - const newMessage = connection.explanation - ? `(${connection.explanation}) --> ${message}` - : message; - results.add(newMessage); - } - } - if (final) { - results.add(message); - } - } - for (const result of incompleteResults) { - results.add(result); - } - return Array.from(results); -}; - -module.exports = class WebAssemblyInInitialChunkError extends WebpackError { - /** - * @param {Module} module WASM module - * @param {ModuleGraph} moduleGraph the module graph - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {RequestShortener} requestShortener request shortener - */ - constructor(module, moduleGraph, chunkGraph, requestShortener) { - const moduleChains = getInitialModuleChains( - module, - moduleGraph, - chunkGraph, - requestShortener - ); - const message = `WebAssembly module is included in initial chunk. -This is not allowed, because WebAssembly download and compilation must happen asynchronous. -Add an async split point (i. e. import()) somewhere between your entrypoint and the WebAssembly module: -${moduleChains.map(s => `* ${s}`).join("\n")}`; - - super(message); - this.name = "WebAssemblyInInitialChunkError"; - this.hideStack = true; - this.module = module; - } -}; - - -/***/ }), - -/***/ 30640: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const { RawSource } = __webpack_require__(51255); -const { UsageState } = __webpack_require__(13168); -const Generator = __webpack_require__(97152); -const InitFragment = __webpack_require__(64768); -const RuntimeGlobals = __webpack_require__(39201); -const Template = __webpack_require__(43841); -const ModuleDependency = __webpack_require__(99809); -const WebAssemblyExportImportedDependency = __webpack_require__(76598); -const WebAssemblyImportDependency = __webpack_require__(60718); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Dependency")} Dependency */ -/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ -/** @typedef {import("../Generator").GenerateContext} GenerateContext */ -/** @typedef {import("../NormalModule")} NormalModule */ -/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ - -const TYPES = new Set(["webassembly"]); - -class WebAssemblyJavascriptGenerator extends Generator { - /** - * @param {NormalModule} module fresh module - * @returns {Set} available types (do not mutate) - */ - getTypes(module) { - return TYPES; - } - - /** - * @param {NormalModule} module the module - * @param {string=} type source type - * @returns {number} estimate size of the module - */ - getSize(module, type) { - return 95 + module.dependencies.length * 5; - } - - /** - * @param {NormalModule} module module for which the code should be generated - * @param {GenerateContext} generateContext context for generate - * @returns {Source} generated code - */ - generate(module, generateContext) { - const { - runtimeTemplate, - moduleGraph, - chunkGraph, - runtimeRequirements, - runtime - } = generateContext; - /** @type {InitFragment[]} */ - const initFragments = []; - - const exportsInfo = moduleGraph.getExportsInfo(module); - - let needExportsCopy = false; - const importedModules = new Map(); - const initParams = []; - let index = 0; - for (const dep of module.dependencies) { - const moduleDep = - dep && dep instanceof ModuleDependency ? dep : undefined; - if (moduleGraph.getModule(dep)) { - let importData = importedModules.get(moduleGraph.getModule(dep)); - if (importData === undefined) { - importedModules.set( - moduleGraph.getModule(dep), - (importData = { - importVar: `m${index}`, - index, - request: (moduleDep && moduleDep.userRequest) || undefined, - names: new Set(), - reexports: [] - }) - ); - index++; - } - if (dep instanceof WebAssemblyImportDependency) { - importData.names.add(dep.name); - if (dep.description.type === "GlobalType") { - const exportName = dep.name; - const importedModule = moduleGraph.getModule(dep); - - if (importedModule) { - const usedName = moduleGraph - .getExportsInfo(importedModule) - .getUsedName(exportName, runtime); - if (usedName) { - initParams.push( - runtimeTemplate.exportFromImport({ - moduleGraph, - module: importedModule, - request: dep.request, - importVar: importData.importVar, - originModule: module, - exportName: dep.name, - asiSafe: true, - isCall: false, - callContext: null, - defaultInterop: true, - initFragments, - runtime, - runtimeRequirements - }) - ); - } - } - } - } - if (dep instanceof WebAssemblyExportImportedDependency) { - importData.names.add(dep.name); - const usedName = moduleGraph - .getExportsInfo(module) - .getUsedName(dep.exportName, runtime); - if (usedName) { - runtimeRequirements.add(RuntimeGlobals.exports); - const exportProp = `${module.exportsArgument}[${JSON.stringify( - usedName - )}]`; - const defineStatement = Template.asString([ - `${exportProp} = ${runtimeTemplate.exportFromImport({ - moduleGraph, - module: moduleGraph.getModule(dep), - request: dep.request, - importVar: importData.importVar, - originModule: module, - exportName: dep.name, - asiSafe: true, - isCall: false, - callContext: null, - defaultInterop: true, - initFragments, - runtime, - runtimeRequirements - })};`, - `if(WebAssembly.Global) ${exportProp} = ` + - `new WebAssembly.Global({ value: ${JSON.stringify( - dep.valueType - )} }, ${exportProp});` - ]); - importData.reexports.push(defineStatement); - needExportsCopy = true; - } - } - } - } - const importsCode = Template.asString( - Array.from( - importedModules, - ([module, { importVar, request, reexports }]) => { - const importStatement = runtimeTemplate.importStatement({ - module, - chunkGraph, - request, - importVar, - originModule: module, - runtimeRequirements - }); - return importStatement[0] + importStatement[1] + reexports.join("\n"); - } - ) - ); - - const copyAllExports = - exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused && - !needExportsCopy; - - // need these globals - runtimeRequirements.add(RuntimeGlobals.module); - runtimeRequirements.add(RuntimeGlobals.moduleId); - runtimeRequirements.add(RuntimeGlobals.wasmInstances); - if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { - runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); - runtimeRequirements.add(RuntimeGlobals.exports); - } - if (!copyAllExports) { - runtimeRequirements.add(RuntimeGlobals.exports); - } - - // create source - const source = new RawSource( - [ - '"use strict";', - "// Instantiate WebAssembly module", - `var wasmExports = ${RuntimeGlobals.wasmInstances}[${module.moduleArgument}.id];`, - - exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused - ? `${RuntimeGlobals.makeNamespaceObject}(${module.exportsArgument});` - : "", - - // this must be before import for circular dependencies - "// export exports from WebAssembly module", - copyAllExports - ? `${module.moduleArgument}.exports = wasmExports;` - : "for(var name in wasmExports) " + - `if(name) ` + - `${module.exportsArgument}[name] = wasmExports[name];`, - "// exec imports from WebAssembly module (for esm order)", - importsCode, - "", - "// exec wasm module", - `wasmExports[""](${initParams.join(", ")})` - ].join("\n") - ); - return InitFragment.addToSource(source, initFragments, generateContext); - } -} - -module.exports = WebAssemblyJavascriptGenerator; - - -/***/ }), - -/***/ 38372: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Generator = __webpack_require__(97152); -const WebAssemblyExportImportedDependency = __webpack_require__(76598); -const WebAssemblyImportDependency = __webpack_require__(60718); -const { compareModulesByIdentifier } = __webpack_require__(58792); -const memoize = __webpack_require__(61374); -const WebAssemblyInInitialChunkError = __webpack_require__(57650); - -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("../Compiler")} Compiler */ -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleTemplate")} ModuleTemplate */ -/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ - -const getWebAssemblyGenerator = memoize(() => - __webpack_require__(16415) -); -const getWebAssemblyJavascriptGenerator = memoize(() => - __webpack_require__(30640) -); -const getWebAssemblyParser = memoize(() => __webpack_require__(93347)); - -class WebAssemblyModulesPlugin { - constructor(options) { - this.options = options; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "WebAssemblyModulesPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - WebAssemblyImportDependency, - normalModuleFactory - ); - - compilation.dependencyFactories.set( - WebAssemblyExportImportedDependency, - normalModuleFactory - ); - - normalModuleFactory.hooks.createParser - .for("webassembly/sync") - .tap("WebAssemblyModulesPlugin", () => { - const WebAssemblyParser = getWebAssemblyParser(); - - return new WebAssemblyParser(); - }); - - normalModuleFactory.hooks.createGenerator - .for("webassembly/sync") - .tap("WebAssemblyModulesPlugin", () => { - const WebAssemblyJavascriptGenerator = - getWebAssemblyJavascriptGenerator(); - const WebAssemblyGenerator = getWebAssemblyGenerator(); - - return Generator.byType({ - javascript: new WebAssemblyJavascriptGenerator(), - webassembly: new WebAssemblyGenerator(this.options) - }); - }); - - compilation.hooks.renderManifest.tap( - "WebAssemblyModulesPlugin", - (result, options) => { - const { chunkGraph } = compilation; - const { chunk, outputOptions, codeGenerationResults } = options; - - for (const module of chunkGraph.getOrderedChunkModulesIterable( - chunk, - compareModulesByIdentifier - )) { - if (module.type === "webassembly/sync") { - const filenameTemplate = - outputOptions.webassemblyModuleFilename; - - result.push({ - render: () => - codeGenerationResults.getSource( - module, - chunk.runtime, - "webassembly" - ), - filenameTemplate, - pathOptions: { - module, - runtime: chunk.runtime, - chunkGraph - }, - auxiliary: true, - identifier: `webassemblyModule${chunkGraph.getModuleId( - module - )}`, - hash: chunkGraph.getModuleHash(module, chunk.runtime) - }); - } - } - - return result; - } - ); - - compilation.hooks.afterChunks.tap("WebAssemblyModulesPlugin", () => { - const chunkGraph = compilation.chunkGraph; - const initialWasmModules = new Set(); - for (const chunk of compilation.chunks) { - if (chunk.canBeInitial()) { - for (const module of chunkGraph.getChunkModulesIterable(chunk)) { - if (module.type === "webassembly/sync") { - initialWasmModules.add(module); - } - } - } - } - for (const module of initialWasmModules) { - compilation.errors.push( - new WebAssemblyInInitialChunkError( - module, - compilation.moduleGraph, - compilation.chunkGraph, - compilation.requestShortener - ) - ); - } - }); - } - ); - } -} - -module.exports = WebAssemblyModulesPlugin; - - -/***/ }), - -/***/ 93347: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const t = __webpack_require__(44977); -const { moduleContextFromModuleAST } = __webpack_require__(44977); -const { decode } = __webpack_require__(41786); -const Parser = __webpack_require__(68646); -const StaticExportsDependency = __webpack_require__(19383); -const WebAssemblyExportImportedDependency = __webpack_require__(76598); -const WebAssemblyImportDependency = __webpack_require__(60718); - -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../Parser").ParserState} ParserState */ -/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ - -const JS_COMPAT_TYPES = new Set(["i32", "f32", "f64"]); - -/** - * @param {t.Signature} signature the func signature - * @returns {null | string} the type incompatible with js types - */ -const getJsIncompatibleType = signature => { - for (const param of signature.params) { - if (!JS_COMPAT_TYPES.has(param.valtype)) { - return `${param.valtype} as parameter`; - } - } - for (const type of signature.results) { - if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; - } - return null; -}; - -/** - * TODO why are there two different Signature types? - * @param {t.FuncSignature} signature the func signature - * @returns {null | string} the type incompatible with js types - */ -const getJsIncompatibleTypeOfFuncSignature = signature => { - for (const param of signature.args) { - if (!JS_COMPAT_TYPES.has(param)) { - return `${param} as parameter`; - } - } - for (const type of signature.result) { - if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; - } - return null; -}; - -const decoderOpts = { - ignoreCodeSection: true, - ignoreDataSection: true, - - // this will avoid having to lookup with identifiers in the ModuleContext - ignoreCustomNameSection: true -}; - -class WebAssemblyParser extends Parser { - constructor(options) { - super(); - this.hooks = Object.freeze({}); - this.options = options; - } - - /** - * @param {string | Buffer | PreparsedAst} source the source to parse - * @param {ParserState} state the parser state - * @returns {ParserState} the parser state - */ - parse(source, state) { - if (!Buffer.isBuffer(source)) { - throw new Error("WebAssemblyParser input must be a Buffer"); - } - - // flag it as ESM - state.module.buildInfo.strict = true; - state.module.buildMeta.exportsType = "namespace"; - - // parse it - const program = decode(source, decoderOpts); - const module = program.body[0]; - - const moduleContext = moduleContextFromModuleAST(module); - - // extract imports and exports - const exports = []; - let jsIncompatibleExports = (state.module.buildMeta.jsIncompatibleExports = - undefined); - - const importedGlobals = []; - t.traverse(module, { - ModuleExport({ node }) { - const descriptor = node.descr; - - if (descriptor.exportType === "Func") { - const funcIdx = descriptor.id.value; - - /** @type {t.FuncSignature} */ - const funcSignature = moduleContext.getFunction(funcIdx); - - const incompatibleType = - getJsIncompatibleTypeOfFuncSignature(funcSignature); - - if (incompatibleType) { - if (jsIncompatibleExports === undefined) { - jsIncompatibleExports = - state.module.buildMeta.jsIncompatibleExports = {}; - } - jsIncompatibleExports[node.name] = incompatibleType; - } - } - - exports.push(node.name); - - if (node.descr && node.descr.exportType === "Global") { - const refNode = importedGlobals[node.descr.id.value]; - if (refNode) { - const dep = new WebAssemblyExportImportedDependency( - node.name, - refNode.module, - refNode.name, - refNode.descr.valtype - ); - - state.module.addDependency(dep); - } - } - }, - - Global({ node }) { - const init = node.init[0]; - - let importNode = null; - - if (init.id === "get_global") { - const globalIdx = init.args[0].value; - - if (globalIdx < importedGlobals.length) { - importNode = importedGlobals[globalIdx]; - } - } - - importedGlobals.push(importNode); - }, - - ModuleImport({ node }) { - /** @type {false | string} */ - let onlyDirectImport = false; - - if (t.isMemory(node.descr) === true) { - onlyDirectImport = "Memory"; - } else if (t.isTable(node.descr) === true) { - onlyDirectImport = "Table"; - } else if (t.isFuncImportDescr(node.descr) === true) { - const incompatibleType = getJsIncompatibleType(node.descr.signature); - if (incompatibleType) { - onlyDirectImport = `Non-JS-compatible Func Signature (${incompatibleType})`; - } - } else if (t.isGlobalType(node.descr) === true) { - const type = node.descr.valtype; - if (!JS_COMPAT_TYPES.has(type)) { - onlyDirectImport = `Non-JS-compatible Global Type (${type})`; - } - } - - const dep = new WebAssemblyImportDependency( - node.module, - node.name, - node.descr, - onlyDirectImport - ); - - state.module.addDependency(dep); - - if (t.isGlobalType(node.descr)) { - importedGlobals.push(node); - } - } - }); - - state.module.addDependency(new StaticExportsDependency(exports, false)); - - return state; - } -} - -module.exports = WebAssemblyParser; - - -/***/ }), - -/***/ 92050: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const Template = __webpack_require__(43841); -const WebAssemblyImportDependency = __webpack_require__(60718); - -/** @typedef {import("../Module")} Module */ -/** @typedef {import("../ModuleGraph")} ModuleGraph */ - -/** @typedef {Object} UsedWasmDependency - * @property {WebAssemblyImportDependency} dependency the dependency - * @property {string} name the export name - * @property {string} module the module name - */ - -const MANGLED_MODULE = "a"; - -/** - * @param {ModuleGraph} moduleGraph the module graph - * @param {Module} module the module - * @param {boolean} mangle mangle module and export names - * @returns {UsedWasmDependency[]} used dependencies and (mangled) name - */ -const getUsedDependencies = (moduleGraph, module, mangle) => { - /** @type {UsedWasmDependency[]} */ - const array = []; - let importIndex = 0; - for (const dep of module.dependencies) { - if (dep instanceof WebAssemblyImportDependency) { - if ( - dep.description.type === "GlobalType" || - moduleGraph.getModule(dep) === null - ) { - continue; - } - - const exportName = dep.name; - // TODO add the following 3 lines when removing of ModuleExport is possible - // const importedModule = moduleGraph.getModule(dep); - // const usedName = importedModule && moduleGraph.getExportsInfo(importedModule).getUsedName(exportName, runtime); - // if (usedName !== false) { - if (mangle) { - array.push({ - dependency: dep, - name: Template.numberToIdentifier(importIndex++), - module: MANGLED_MODULE - }); - } else { - array.push({ - dependency: dep, - name: exportName, - module: dep.request - }); - } - } - } - return array; -}; - -exports.getUsedDependencies = getUsedDependencies; -exports.MANGLED_MODULE = MANGLED_MODULE; - - -/***/ }), - -/***/ 90115: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ -/** @typedef {import("../../declarations/WebpackOptions").WasmLoadingType} WasmLoadingType */ -/** @typedef {import("../Compiler")} Compiler */ - -/** @type {WeakMap>} */ -const enabledTypes = new WeakMap(); - -const getEnabledTypes = compiler => { - let set = enabledTypes.get(compiler); - if (set === undefined) { - set = new Set(); - enabledTypes.set(compiler, set); - } - return set; -}; - -class EnableWasmLoadingPlugin { - /** - * @param {WasmLoadingType} type library type that should be available - */ - constructor(type) { - this.type = type; - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {WasmLoadingType} type type of library - * @returns {void} - */ - static setEnabled(compiler, type) { - getEnabledTypes(compiler).add(type); - } - - /** - * @param {Compiler} compiler the compiler instance - * @param {WasmLoadingType} type type of library - * @returns {void} - */ - static checkEnabled(compiler, type) { - if (!getEnabledTypes(compiler).has(type)) { - throw new Error( - `Library type "${type}" is not enabled. ` + - "EnableWasmLoadingPlugin need to be used to enable this type of wasm loading. " + - 'This usually happens through the "output.enabledWasmLoadingTypes" option. ' + - 'If you are using a function as entry which sets "wasmLoading", you need to add all potential library types to "output.enabledWasmLoadingTypes". ' + - "These types are enabled: " + - Array.from(getEnabledTypes(compiler)).join(", ") - ); - } - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const { type } = this; - - // Only enable once - const enabled = getEnabledTypes(compiler); - if (enabled.has(type)) return; - enabled.add(type); - - if (typeof type === "string") { - switch (type) { - case "fetch": { - // TODO webpack 6 remove FetchCompileWasmPlugin - const FetchCompileWasmPlugin = __webpack_require__(70390); - const FetchCompileAsyncWasmPlugin = __webpack_require__(90692); - new FetchCompileWasmPlugin({ - mangleImports: compiler.options.optimization.mangleWasmImports - }).apply(compiler); - new FetchCompileAsyncWasmPlugin().apply(compiler); - break; - } - case "async-node": { - // TODO webpack 6 remove ReadFileCompileWasmPlugin - const ReadFileCompileWasmPlugin = __webpack_require__(29023); - // @ts-expect-error typescript bug for duplicate require - const ReadFileCompileAsyncWasmPlugin = __webpack_require__(63582); - new ReadFileCompileWasmPlugin({ - mangleImports: compiler.options.optimization.mangleWasmImports - }).apply(compiler); - new ReadFileCompileAsyncWasmPlugin({ type }).apply(compiler); - break; - } - case "async-node-module": { - // @ts-expect-error typescript bug for duplicate require - const ReadFileCompileAsyncWasmPlugin = __webpack_require__(63582); - new ReadFileCompileAsyncWasmPlugin({ type, import: true }).apply( - compiler - ); - break; - } - case "universal": - throw new Error( - "Universal WebAssembly Loading is not implemented yet" - ); - default: - throw new Error(`Unsupported wasm loading type ${type}. -Plugins which provide custom wasm loading types must call EnableWasmLoadingPlugin.setEnabled(compiler, type) to disable this error.`); - } - } else { - // TODO support plugin instances here - // apply them to the compiler - } - } -} - -module.exports = EnableWasmLoadingPlugin; - - -/***/ }), - -/***/ 90692: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const AsyncWasmLoadingRuntimeModule = __webpack_require__(12501); - -/** @typedef {import("../Compiler")} Compiler */ - -class FetchCompileAsyncWasmPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "FetchCompileAsyncWasmPlugin", - compilation => { - const globalWasmLoading = compilation.outputOptions.wasmLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const wasmLoading = - options && options.wasmLoading !== undefined - ? options.wasmLoading - : globalWasmLoading; - return wasmLoading === "fetch"; - }; - const generateLoadBinaryCode = path => - `fetch(${RuntimeGlobals.publicPath} + ${path})`; - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.instantiateWasm) - .tap("FetchCompileAsyncWasmPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - const chunkGraph = compilation.chunkGraph; - if ( - !chunkGraph.hasModuleInGraph( - chunk, - m => m.type === "webassembly/async" - ) - ) { - return; - } - set.add(RuntimeGlobals.publicPath); - compilation.addRuntimeModule( - chunk, - new AsyncWasmLoadingRuntimeModule({ - generateLoadBinaryCode, - supportsStreaming: true - }) - ); - }); - } - ); - } -} - -module.exports = FetchCompileAsyncWasmPlugin; - - -/***/ }), - -/***/ 70390: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const WasmChunkLoadingRuntimeModule = __webpack_require__(16671); - -/** @typedef {import("../Compiler")} Compiler */ - -// TODO webpack 6 remove - -class FetchCompileWasmPlugin { - constructor(options) { - this.options = options || {}; - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "FetchCompileWasmPlugin", - compilation => { - const globalWasmLoading = compilation.outputOptions.wasmLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const wasmLoading = - options && options.wasmLoading !== undefined - ? options.wasmLoading - : globalWasmLoading; - return wasmLoading === "fetch"; - }; - const generateLoadBinaryCode = path => - `fetch(${RuntimeGlobals.publicPath} + ${path})`; - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("FetchCompileWasmPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - const chunkGraph = compilation.chunkGraph; - if ( - !chunkGraph.hasModuleInGraph( - chunk, - m => m.type === "webassembly/sync" - ) - ) { - return; - } - set.add(RuntimeGlobals.moduleCache); - set.add(RuntimeGlobals.publicPath); - compilation.addRuntimeModule( - chunk, - new WasmChunkLoadingRuntimeModule({ - generateLoadBinaryCode, - supportsStreaming: true, - mangleImports: this.options.mangleImports, - runtimeRequirements: set - }) - ); - }); - } - ); - } -} - -module.exports = FetchCompileWasmPlugin; - - -/***/ }), - -/***/ 21631: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const JsonpChunkLoadingRuntimeModule = __webpack_require__(6594); - -/** @typedef {import("../Compiler")} Compiler */ - -class JsonpChunkLoadingPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.thisCompilation.tap( - "JsonpChunkLoadingPlugin", - compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === "jsonp"; - }; - const onceForChunkSet = new WeakSet(); - const handler = (chunk, set) => { - if (onceForChunkSet.has(chunk)) return; - onceForChunkSet.add(chunk); - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.hasOwnProperty); - compilation.addRuntimeModule( - chunk, - new JsonpChunkLoadingRuntimeModule(set) - ); - }; - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("JsonpChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("JsonpChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("JsonpChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.baseURI) - .tap("JsonpChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.onChunksLoaded) - .tap("JsonpChunkLoadingPlugin", handler); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("JsonpChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.loadScript); - set.add(RuntimeGlobals.getChunkScriptFilename); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("JsonpChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.loadScript); - set.add(RuntimeGlobals.getChunkUpdateScriptFilename); - set.add(RuntimeGlobals.moduleCache); - set.add(RuntimeGlobals.hmrModuleData); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("JsonpChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.getUpdateManifestFilename); - }); - } - ); - } -} - -module.exports = JsonpChunkLoadingPlugin; - - -/***/ }), - -/***/ 6594: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const { SyncWaterfallHook } = __webpack_require__(44217); -const Compilation = __webpack_require__(73002); -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const chunkHasJs = (__webpack_require__(36109).chunkHasJs); -const { getInitialChunkIds } = __webpack_require__(82695); -const compileBooleanMatcher = __webpack_require__(73897); - -/** @typedef {import("../Chunk")} Chunk */ - -/** - * @typedef {Object} JsonpCompilationPluginHooks - * @property {SyncWaterfallHook<[string, Chunk]>} linkPreload - * @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch - */ - -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class JsonpChunkLoadingRuntimeModule extends RuntimeModule { - /** - * @param {Compilation} compilation the compilation - * @returns {JsonpCompilationPluginHooks} hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); - } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - linkPreload: new SyncWaterfallHook(["source", "chunk"]), - linkPrefetch: new SyncWaterfallHook(["source", "chunk"]) - }; - compilationHooksMap.set(compilation, hooks); - } - return hooks; - } - - constructor(runtimeRequirements) { - super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH); - this._runtimeRequirements = runtimeRequirements; - } - - /** - * @private - * @param {Chunk} chunk chunk - * @returns {string} generated code - */ - _generateBaseUri(chunk) { - const options = chunk.getEntryOptions(); - if (options && options.baseUri) { - return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`; - } else { - return `${RuntimeGlobals.baseURI} = document.baseURI || self.location.href;`; - } - } - - /** - * @returns {string} runtime code - */ - generate() { - const { chunkGraph, compilation, chunk } = this; - const { - runtimeTemplate, - outputOptions: { - chunkLoadingGlobal, - hotUpdateGlobal, - crossOriginLoading, - scriptType - } - } = compilation; - const globalObject = runtimeTemplate.globalObject; - const { linkPreload, linkPrefetch } = - JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); - const fn = RuntimeGlobals.ensureChunkHandlers; - const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI); - const withLoading = this._runtimeRequirements.has( - RuntimeGlobals.ensureChunkHandlers - ); - const withCallback = this._runtimeRequirements.has( - RuntimeGlobals.chunkCallback - ); - const withOnChunkLoad = this._runtimeRequirements.has( - RuntimeGlobals.onChunksLoaded - ); - const withHmr = this._runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const withHmrManifest = this._runtimeRequirements.has( - RuntimeGlobals.hmrDownloadManifest - ); - const withPrefetch = this._runtimeRequirements.has( - RuntimeGlobals.prefetchChunkHandlers - ); - const withPreload = this._runtimeRequirements.has( - RuntimeGlobals.preloadChunkHandlers - ); - const chunkLoadingGlobalExpr = `${globalObject}[${JSON.stringify( - chunkLoadingGlobal - )}]`; - const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs); - const hasJsMatcher = compileBooleanMatcher(conditionMap); - const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_jsonp` - : undefined; - - return Template.asString([ - withBaseURI ? this._generateBaseUri(chunk) : "// no baseURI", - "", - "// object to store loaded and loading chunks", - "// undefined = chunk not loaded, null = chunk preloaded/prefetched", - "// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded", - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{`, - Template.indent( - Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 0`).join( - ",\n" - ) - ), - "};", - "", - withLoading - ? Template.asString([ - `${fn}.j = ${runtimeTemplate.basicFunction( - "chunkId, promises", - hasJsMatcher !== false - ? Template.indent([ - "// JSONP chunk loading for javascript", - `var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`, - 'if(installedChunkData !== 0) { // 0 means "already installed".', - Template.indent([ - "", - '// a Promise means "currently loading".', - "if(installedChunkData) {", - Template.indent([ - "promises.push(installedChunkData[2]);" - ]), - "} else {", - Template.indent([ - hasJsMatcher === true - ? "if(true) { // all chunks have JS" - : `if(${hasJsMatcher("chunkId")}) {`, - Template.indent([ - "// setup Promise in chunk cache", - `var promise = new Promise(${runtimeTemplate.expressionFunction( - `installedChunkData = installedChunks[chunkId] = [resolve, reject]`, - "resolve, reject" - )});`, - "promises.push(installedChunkData[2] = promise);", - "", - "// start chunk loading", - `var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`, - "// create error before stack unwound to get useful stacktrace later", - "var error = new Error();", - `var loadingEnded = ${runtimeTemplate.basicFunction( - "event", - [ - `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId)) {`, - Template.indent([ - "installedChunkData = installedChunks[chunkId];", - "if(installedChunkData !== 0) installedChunks[chunkId] = undefined;", - "if(installedChunkData) {", - Template.indent([ - "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", - "var realSrc = event && event.target && event.target.src;", - "error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", - "error.name = 'ChunkLoadError';", - "error.type = errorType;", - "error.request = realSrc;", - "installedChunkData[1](error);" - ]), - "}" - ]), - "}" - ] - )};`, - `${RuntimeGlobals.loadScript}(url, loadingEnded, "chunk-" + chunkId, chunkId);` - ]), - "} else installedChunks[chunkId] = 0;" - ]), - "}" - ]), - "}" - ]) - : Template.indent(["installedChunks[chunkId] = 0;"]) - )};` - ]) - : "// no chunk on demand loading", - "", - withPrefetch && hasJsMatcher !== false - ? `${ - RuntimeGlobals.prefetchChunkHandlers - }.j = ${runtimeTemplate.basicFunction("chunkId", [ - `if((!${ - RuntimeGlobals.hasOwnProperty - }(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${ - hasJsMatcher === true ? "true" : hasJsMatcher("chunkId") - }) {`, - Template.indent([ - "installedChunks[chunkId] = null;", - linkPrefetch.call( - Template.asString([ - "var link = document.createElement('link');", - crossOriginLoading - ? `link.crossOrigin = ${JSON.stringify( - crossOriginLoading - )};` - : "", - `if (${RuntimeGlobals.scriptNonce}) {`, - Template.indent( - `link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` - ), - "}", - 'link.rel = "prefetch";', - 'link.as = "script";', - `link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);` - ]), - chunk - ), - "document.head.appendChild(link);" - ]), - "}" - ])};` - : "// no prefetching", - "", - withPreload && hasJsMatcher !== false - ? `${ - RuntimeGlobals.preloadChunkHandlers - }.j = ${runtimeTemplate.basicFunction("chunkId", [ - `if((!${ - RuntimeGlobals.hasOwnProperty - }(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${ - hasJsMatcher === true ? "true" : hasJsMatcher("chunkId") - }) {`, - Template.indent([ - "installedChunks[chunkId] = null;", - linkPreload.call( - Template.asString([ - "var link = document.createElement('link');", - scriptType - ? `link.type = ${JSON.stringify(scriptType)};` - : "", - "link.charset = 'utf-8';", - `if (${RuntimeGlobals.scriptNonce}) {`, - Template.indent( - `link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` - ), - "}", - 'link.rel = "preload";', - 'link.as = "script";', - `link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`, - crossOriginLoading - ? crossOriginLoading === "use-credentials" - ? 'link.crossOrigin = "use-credentials";' - : Template.asString([ - "if (link.href.indexOf(window.location.origin + '/') !== 0) {", - Template.indent( - `link.crossOrigin = ${JSON.stringify( - crossOriginLoading - )};` - ), - "}" - ]) - : "" - ]), - chunk - ), - "document.head.appendChild(link);" - ]), - "}" - ])};` - : "// no preloaded", - "", - withHmr - ? Template.asString([ - "var currentUpdatedModulesList;", - "var waitingUpdateResolves = {};", - "function loadUpdateChunk(chunkId, updatedModulesList) {", - Template.indent([ - "currentUpdatedModulesList = updatedModulesList;", - `return new Promise(${runtimeTemplate.basicFunction( - "resolve, reject", - [ - "waitingUpdateResolves[chunkId] = resolve;", - "// start update chunk loading", - `var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId);`, - "// create error before stack unwound to get useful stacktrace later", - "var error = new Error();", - `var loadingEnded = ${runtimeTemplate.basicFunction("event", [ - "if(waitingUpdateResolves[chunkId]) {", - Template.indent([ - "waitingUpdateResolves[chunkId] = undefined", - "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", - "var realSrc = event && event.target && event.target.src;", - "error.message = 'Loading hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", - "error.name = 'ChunkLoadError';", - "error.type = errorType;", - "error.request = realSrc;", - "reject(error);" - ]), - "}" - ])};`, - `${RuntimeGlobals.loadScript}(url, loadingEnded);` - ] - )});` - ]), - "}", - "", - `${globalObject}[${JSON.stringify( - hotUpdateGlobal - )}] = ${runtimeTemplate.basicFunction( - "chunkId, moreModules, runtime", - [ - "for(var moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent([ - "currentUpdate[moduleId] = moreModules[moduleId];", - "if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);" - ]), - "}" - ]), - "}", - "if(runtime) currentUpdateRuntime.push(runtime);", - "if(waitingUpdateResolves[chunkId]) {", - Template.indent([ - "waitingUpdateResolves[chunkId]();", - "waitingUpdateResolves[chunkId] = undefined;" - ]), - "}" - ] - )};`, - "", - Template.getFunctionContent( - require('./JavascriptHotModuleReplacement.runtime.js') - ) - .replace(/\$key\$/g, "jsonp") - .replace(/\$installedChunks\$/g, "installedChunks") - .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") - .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) - .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) - .replace( - /\$ensureChunkHandlers\$/g, - RuntimeGlobals.ensureChunkHandlers - ) - .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) - .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) - .replace( - /\$hmrDownloadUpdateHandlers\$/g, - RuntimeGlobals.hmrDownloadUpdateHandlers - ) - .replace( - /\$hmrInvalidateModuleHandlers\$/g, - RuntimeGlobals.hmrInvalidateModuleHandlers - ) - ]) - : "// no HMR", - "", - withHmrManifest - ? Template.asString([ - `${ - RuntimeGlobals.hmrDownloadManifest - } = ${runtimeTemplate.basicFunction("", [ - 'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");', - `return fetch(${RuntimeGlobals.publicPath} + ${ - RuntimeGlobals.getUpdateManifestFilename - }()).then(${runtimeTemplate.basicFunction("response", [ - "if(response.status === 404) return; // no update available", - 'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);', - "return response.json();" - ])});` - ])};` - ]) - : "// no HMR manifest", - "", - withOnChunkLoad - ? `${ - RuntimeGlobals.onChunksLoaded - }.j = ${runtimeTemplate.returningFunction( - "installedChunks[chunkId] === 0", - "chunkId" - )};` - : "// no on chunks loaded", - "", - withCallback || withLoading - ? Template.asString([ - "// install a JSONP callback for chunk loading", - `var webpackJsonpCallback = ${runtimeTemplate.basicFunction( - "parentChunkLoadingFunction, data", - [ - runtimeTemplate.destructureArray( - ["chunkIds", "moreModules", "runtime"], - "data" - ), - '// add "moreModules" to the modules object,', - '// then flag all "chunkIds" as loaded and fire callback', - "var moduleId, chunkId, i = 0;", - `if(chunkIds.some(${runtimeTemplate.returningFunction( - "installedChunks[id] !== 0", - "id" - )})) {`, - Template.indent([ - "for(moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent( - `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` - ), - "}" - ]), - "}", - "if(runtime) var result = runtime(__webpack_require__);" - ]), - "}", - "if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);", - "for(;i < chunkIds.length; i++) {", - Template.indent([ - "chunkId = chunkIds[i];", - `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`, - Template.indent("installedChunks[chunkId][0]();"), - "}", - "installedChunks[chunkId] = 0;" - ]), - "}", - withOnChunkLoad - ? `return ${RuntimeGlobals.onChunksLoaded}(result);` - : "" - ] - )}`, - "", - `var chunkLoadingGlobal = ${chunkLoadingGlobalExpr} = ${chunkLoadingGlobalExpr} || [];`, - "chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));", - "chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));" - ]) - : "// no jsonp function" - ]); - } -} - -module.exports = JsonpChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 44896: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(54433); -const EnableChunkLoadingPlugin = __webpack_require__(49548); -const JsonpChunkLoadingRuntimeModule = __webpack_require__(6594); - -/** @typedef {import("../Chunk")} Chunk */ -/** @typedef {import("../Compilation")} Compilation */ -/** @typedef {import("../Compiler")} Compiler */ - -class JsonpTemplatePlugin { - /** - * @deprecated use JsonpChunkLoadingRuntimeModule.getCompilationHooks instead - * @param {Compilation} compilation the compilation - * @returns {JsonpChunkLoadingRuntimeModule.JsonpCompilationPluginHooks} hooks - */ - static getCompilationHooks(compilation) { - return JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); - } - - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.options.output.chunkLoading = "jsonp"; - new ArrayPushCallbackChunkFormatPlugin().apply(compiler); - new EnableChunkLoadingPlugin("jsonp").apply(compiler); - } -} - -module.exports = JsonpTemplatePlugin; - - -/***/ }), - -/***/ 20761: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(73837); -const webpackOptionsSchemaCheck = __webpack_require__(62136); -const webpackOptionsSchema = __webpack_require__(13954); -const Compiler = __webpack_require__(37912); -const MultiCompiler = __webpack_require__(39601); -const WebpackOptionsApply = __webpack_require__(73305); -const { - applyWebpackOptionsDefaults, - applyWebpackOptionsBaseDefaults -} = __webpack_require__(64395); -const { getNormalizedWebpackOptions } = __webpack_require__(80593); -const NodeEnvironmentPlugin = __webpack_require__(27381); -const memoize = __webpack_require__(61374); - -/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ -/** @typedef {import("./Compiler").WatchOptions} WatchOptions */ -/** @typedef {import("./MultiCompiler").MultiCompilerOptions} MultiCompilerOptions */ -/** @typedef {import("./MultiStats")} MultiStats */ -/** @typedef {import("./Stats")} Stats */ - -const getValidateSchema = memoize(() => __webpack_require__(71732)); - -/** - * @template T - * @callback Callback - * @param {Error=} err - * @param {T=} stats - * @returns {void} - */ - -/** - * @param {ReadonlyArray} childOptions options array - * @param {MultiCompilerOptions} options options - * @returns {MultiCompiler} a multi-compiler - */ -const createMultiCompiler = (childOptions, options) => { - const compilers = childOptions.map(options => createCompiler(options)); - const compiler = new MultiCompiler(compilers, options); - for (const childCompiler of compilers) { - if (childCompiler.options.dependencies) { - compiler.setDependencies( - childCompiler, - childCompiler.options.dependencies - ); - } - } - return compiler; -}; - -/** - * @param {WebpackOptions} rawOptions options object - * @returns {Compiler} a compiler - */ -const createCompiler = rawOptions => { - const options = getNormalizedWebpackOptions(rawOptions); - applyWebpackOptionsBaseDefaults(options); - const compiler = new Compiler(options.context, options); - new NodeEnvironmentPlugin({ - infrastructureLogging: options.infrastructureLogging - }).apply(compiler); - if (Array.isArray(options.plugins)) { - for (const plugin of options.plugins) { - if (typeof plugin === "function") { - plugin.call(compiler, compiler); - } else { - plugin.apply(compiler); - } - } - } - applyWebpackOptionsDefaults(options); - compiler.hooks.environment.call(); - compiler.hooks.afterEnvironment.call(); - new WebpackOptionsApply().process(options, compiler); - compiler.hooks.initialize.call(); - return compiler; -}; - -/** - * @callback WebpackFunctionSingle - * @param {WebpackOptions} options options object - * @param {Callback=} callback callback - * @returns {Compiler} the compiler object - */ - -/** - * @callback WebpackFunctionMulti - * @param {ReadonlyArray & MultiCompilerOptions} options options objects - * @param {Callback=} callback callback - * @returns {MultiCompiler} the multi compiler object - */ - -const asArray = options => - Array.isArray(options) ? Array.from(options) : [options]; - -const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ ( - /** - * @param {WebpackOptions | (ReadonlyArray & MultiCompilerOptions)} options options - * @param {Callback & Callback=} callback callback - * @returns {Compiler | MultiCompiler} - */ - (options, callback) => { - const create = () => { - if (!asArray(options).every(webpackOptionsSchemaCheck)) { - getValidateSchema()(webpackOptionsSchema, options); - util.deprecate( - () => {}, - "webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.", - "DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID" - )(); - } - /** @type {MultiCompiler|Compiler} */ - let compiler; - let watch = false; - /** @type {WatchOptions|WatchOptions[]} */ - let watchOptions; - if (Array.isArray(options)) { - /** @type {MultiCompiler} */ - compiler = createMultiCompiler( - options, - /** @type {MultiCompilerOptions} */ (options) - ); - watch = options.some(options => options.watch); - watchOptions = options.map(options => options.watchOptions || {}); - } else { - const webpackOptions = /** @type {WebpackOptions} */ (options); - /** @type {Compiler} */ - compiler = createCompiler(webpackOptions); - watch = webpackOptions.watch; - watchOptions = webpackOptions.watchOptions || {}; - } - return { compiler, watch, watchOptions }; - }; - if (callback) { - try { - const { compiler, watch, watchOptions } = create(); - if (watch) { - compiler.watch(watchOptions, callback); - } else { - compiler.run((err, stats) => { - compiler.close(err2 => { - callback(err || err2, stats); - }); - }); - } - return compiler; - } catch (err) { - process.nextTick(() => callback(err)); - return null; - } - } else { - const { compiler, watch } = create(); - if (watch) { - util.deprecate( - () => {}, - "A 'callback' argument needs to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.", - "DEP_WEBPACK_WATCH_WITHOUT_CALLBACK" - )(); - } - return compiler; - } - } -); - -module.exports = webpack; - - -/***/ }), - -/***/ 22188: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const StartupChunkDependenciesPlugin = __webpack_require__(61411); -const ImportScriptsChunkLoadingRuntimeModule = __webpack_require__(98698); - -/** @typedef {import("../Compiler")} Compiler */ - -class ImportScriptsChunkLoadingPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - new StartupChunkDependenciesPlugin({ - chunkLoading: "import-scripts", - asyncChunkLoading: true - }).apply(compiler); - compiler.hooks.thisCompilation.tap( - "ImportScriptsChunkLoadingPlugin", - compilation => { - const globalChunkLoading = compilation.outputOptions.chunkLoading; - const isEnabledForChunk = chunk => { - const options = chunk.getEntryOptions(); - const chunkLoading = - options && options.chunkLoading !== undefined - ? options.chunkLoading - : globalChunkLoading; - return chunkLoading === "import-scripts"; - }; - const onceForChunkSet = new WeakSet(); - const handler = (chunk, set) => { - if (onceForChunkSet.has(chunk)) return; - onceForChunkSet.add(chunk); - if (!isEnabledForChunk(chunk)) return; - const withCreateScriptUrl = !!compilation.outputOptions.trustedTypes; - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - set.add(RuntimeGlobals.hasOwnProperty); - if (withCreateScriptUrl) { - set.add(RuntimeGlobals.createScriptUrl); - } - compilation.addRuntimeModule( - chunk, - new ImportScriptsChunkLoadingRuntimeModule(set, withCreateScriptUrl) - ); - }; - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ImportScriptsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("ImportScriptsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("ImportScriptsChunkLoadingPlugin", handler); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.baseURI) - .tap("ImportScriptsChunkLoadingPlugin", handler); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.ensureChunkHandlers) - .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.getChunkScriptFilename); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadUpdateHandlers) - .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.getChunkUpdateScriptFilename); - set.add(RuntimeGlobals.moduleCache); - set.add(RuntimeGlobals.hmrModuleData); - set.add(RuntimeGlobals.moduleFactoriesAddOnly); - }); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.hmrDownloadManifest) - .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { - if (!isEnabledForChunk(chunk)) return; - set.add(RuntimeGlobals.publicPath); - set.add(RuntimeGlobals.getUpdateManifestFilename); - }); - } - ); - } -} -module.exports = ImportScriptsChunkLoadingPlugin; - - -/***/ }), - -/***/ 98698: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -const RuntimeGlobals = __webpack_require__(39201); -const RuntimeModule = __webpack_require__(93496); -const Template = __webpack_require__(43841); -const { - getChunkFilenameTemplate, - chunkHasJs -} = __webpack_require__(36109); -const { getInitialChunkIds } = __webpack_require__(82695); -const compileBooleanMatcher = __webpack_require__(73897); -const { getUndoPath } = __webpack_require__(20162); - -/** @typedef {import("../Chunk")} Chunk */ - -class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule { - constructor(runtimeRequirements, withCreateScriptUrl) { - super("importScripts chunk loading", RuntimeModule.STAGE_ATTACH); - this.runtimeRequirements = runtimeRequirements; - this._withCreateScriptUrl = withCreateScriptUrl; - } - - /** - * @private - * @param {Chunk} chunk chunk - * @returns {string} generated code - */ - _generateBaseUri(chunk) { - const options = chunk.getEntryOptions(); - if (options && options.baseUri) { - return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`; - } - const outputName = this.compilation.getPath( - getChunkFilenameTemplate(chunk, this.compilation.outputOptions), - { - chunk, - contentHashType: "javascript" - } - ); - const rootOutputDir = getUndoPath( - outputName, - this.compilation.outputOptions.path, - false - ); - return `${RuntimeGlobals.baseURI} = self.location + ${JSON.stringify( - rootOutputDir ? "/../" + rootOutputDir : "" - )};`; - } - - /** - * @returns {string} runtime code - */ - generate() { - const { - chunk, - chunkGraph, - compilation: { - runtimeTemplate, - outputOptions: { chunkLoadingGlobal, hotUpdateGlobal } - }, - _withCreateScriptUrl: withCreateScriptUrl - } = this; - const globalObject = runtimeTemplate.globalObject; - const fn = RuntimeGlobals.ensureChunkHandlers; - const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); - const withLoading = this.runtimeRequirements.has( - RuntimeGlobals.ensureChunkHandlers - ); - const withHmr = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadUpdateHandlers - ); - const withHmrManifest = this.runtimeRequirements.has( - RuntimeGlobals.hmrDownloadManifest - ); - const chunkLoadingGlobalExpr = `${globalObject}[${JSON.stringify( - chunkLoadingGlobal - )}]`; - const hasJsMatcher = compileBooleanMatcher( - chunkGraph.getChunkConditionMap(chunk, chunkHasJs) - ); - const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs); - - const stateExpression = withHmr - ? `${RuntimeGlobals.hmrRuntimeStatePrefix}_importScripts` - : undefined; - - return Template.asString([ - withBaseURI ? this._generateBaseUri(chunk) : "// no baseURI", - "", - "// object to store loaded chunks", - '// "1" means "already loaded"', - `var installedChunks = ${ - stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" - }{`, - Template.indent( - Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 1`).join( - ",\n" - ) - ), - "};", - "", - withLoading - ? Template.asString([ - "// importScripts chunk loading", - `var installChunk = ${runtimeTemplate.basicFunction("data", [ - runtimeTemplate.destructureArray( - ["chunkIds", "moreModules", "runtime"], - "data" - ), - "for(var moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent( - `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` - ), - "}" - ]), - "}", - "if(runtime) runtime(__webpack_require__);", - "while(chunkIds.length)", - Template.indent("installedChunks[chunkIds.pop()] = 1;"), - "parentChunkLoadingFunction(data);" - ])};` - ]) - : "// no chunk install function needed", - withLoading - ? Template.asString([ - `${fn}.i = ${runtimeTemplate.basicFunction( - "chunkId, promises", - hasJsMatcher !== false - ? [ - '// "1" is the signal for "already loaded"', - "if(!installedChunks[chunkId]) {", - Template.indent([ - hasJsMatcher === true - ? "if(true) { // all chunks have JS" - : `if(${hasJsMatcher("chunkId")}) {`, - Template.indent( - `importScripts(${ - withCreateScriptUrl - ? `${RuntimeGlobals.createScriptUrl}(${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId))` - : `${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId)` - });` - ), - "}" - ]), - "}" - ] - : "installedChunks[chunkId] = 1;" - )};`, - "", - `var chunkLoadingGlobal = ${chunkLoadingGlobalExpr} = ${chunkLoadingGlobalExpr} || [];`, - "var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);", - "chunkLoadingGlobal.push = installChunk;" - ]) - : "// no chunk loading", - "", - withHmr - ? Template.asString([ - "function loadUpdateChunk(chunkId, updatedModulesList) {", - Template.indent([ - "var success = false;", - `${globalObject}[${JSON.stringify( - hotUpdateGlobal - )}] = ${runtimeTemplate.basicFunction("_, moreModules, runtime", [ - "for(var moduleId in moreModules) {", - Template.indent([ - `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, - Template.indent([ - "currentUpdate[moduleId] = moreModules[moduleId];", - "if(updatedModulesList) updatedModulesList.push(moduleId);" - ]), - "}" - ]), - "}", - "if(runtime) currentUpdateRuntime.push(runtime);", - "success = true;" - ])};`, - "// start update chunk loading", - `importScripts(${ - withCreateScriptUrl - ? `${RuntimeGlobals.createScriptUrl}(${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId))` - : `${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId)` - });`, - 'if(!success) throw new Error("Loading update chunk failed for unknown reason");' - ]), - "}", - "", - Template.getFunctionContent( - require('./JavascriptHotModuleReplacement.runtime.js') - ) - .replace(/\$key\$/g, "importScrips") - .replace(/\$installedChunks\$/g, "installedChunks") - .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") - .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) - .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) - .replace( - /\$ensureChunkHandlers\$/g, - RuntimeGlobals.ensureChunkHandlers - ) - .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) - .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) - .replace( - /\$hmrDownloadUpdateHandlers\$/g, - RuntimeGlobals.hmrDownloadUpdateHandlers - ) - .replace( - /\$hmrInvalidateModuleHandlers\$/g, - RuntimeGlobals.hmrInvalidateModuleHandlers - ) - ]) - : "// no HMR", - "", - withHmrManifest - ? Template.asString([ - `${ - RuntimeGlobals.hmrDownloadManifest - } = ${runtimeTemplate.basicFunction("", [ - 'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");', - `return fetch(${RuntimeGlobals.publicPath} + ${ - RuntimeGlobals.getUpdateManifestFilename - }()).then(${runtimeTemplate.basicFunction("response", [ - "if(response.status === 404) return; // no update available", - 'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);', - "return response.json();" - ])});` - ])};` - ]) - : "// no HMR manifest" - ]); - } -} - -module.exports = ImportScriptsChunkLoadingRuntimeModule; - - -/***/ }), - -/***/ 29649: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(54433); -const EnableChunkLoadingPlugin = __webpack_require__(49548); - -/** @typedef {import("../Compiler")} Compiler */ - -class WebWorkerTemplatePlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.options.output.chunkLoading = "import-scripts"; - new ArrayPushCallbackChunkFormatPlugin().apply(compiler); - new EnableChunkLoadingPlugin("import-scripts").apply(compiler); - } -} -module.exports = WebWorkerTemplatePlugin; - - -/***/ }), - -/***/ 62136: -/***/ (function(module) { - -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -const e=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=we,module.exports["default"]=we;const t={amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptions"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/Entry"},experiments:{$ref:"#/definitions/Experiments"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarnings"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptions"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/Optimization"},output:{$ref:"#/definitions/Output"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/Plugins"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},recordsPath:{$ref:"#/definitions/RecordsPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}},n=Object.prototype.hasOwnProperty,r={allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},compression:{enum:[!1,"gzip","brotli"]},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutAfterLargeChanges:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},memoryCacheUnaffected:{type:"boolean"},name:{type:"string"},profile:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}};function s(t,{instancePath:o="",parentData:a,parentDataProperty:i,rootData:l=t}={}){let p=null,u=0;const f=u;let c=!1;const m=u;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var y=m===u;if(c=c||y,!c){const s=u;if(u==u)if(t&&"object"==typeof t&&!Array.isArray(t)){let e;if(void 0===t.type&&(e="type")){const t={params:{missingProperty:e}};null===p?p=[t]:p.push(t),u++}else{const e=u;for(const e in t)if("cacheUnaffected"!==e&&"maxGenerations"!==e&&"type"!==e){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),u++;break}if(e===u){if(void 0!==t.cacheUnaffected){const e=u;if("boolean"!=typeof t.cacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),u++}var h=e===u}else h=!0;if(h){if(void 0!==t.maxGenerations){let e=t.maxGenerations;const n=u;if(u===n)if("number"==typeof e){if(e<1||isNaN(e)){const e={params:{comparison:">=",limit:1}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}h=n===u}else h=!0;if(h)if(void 0!==t.type){const e=u;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),u++}h=e===u}else h=!0}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),u++}if(y=s===u,c=c||y,!c){const s=u;if(u==u)if(t&&"object"==typeof t&&!Array.isArray(t)){let s;if(void 0===t.type&&(s="type")){const e={params:{missingProperty:s}};null===p?p=[e]:p.push(e),u++}else{const s=u;for(const e in t)if(!n.call(r,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),u++;break}if(s===u){if(void 0!==t.allowCollectingMemory){const e=u;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),u++}var d=e===u}else d=!0;if(d){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=u;if(u===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=u;if(u===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}d=n===u}else d=!0;if(d){if(void 0!==t.idleTimeoutAfterLargeChanges){let e=t.idleTimeoutAfterLargeChanges;const n=u;if(u===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}d=n===u}else d=!0;if(d){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=u;if(u===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}d=n===u}else d=!0;if(d){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=u;if(u===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}d=n===u}else d=!0;if(d){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=u;if(u===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),u++}d=n===u}else d=!0;if(d){if(void 0!==t.memoryCacheUnaffected){const e=u;if("boolean"!=typeof t.memoryCacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0;if(d){if(void 0!==t.name){const e=u;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0;if(d){if(void 0!==t.profile){const e=u;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0;if(d){if(void 0!==t.store){const e=u;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0;if(d){if(void 0!==t.type){const e=u;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0;if(d)if(void 0!==t.version){const e=u;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}d=e===u}else d=!0}}}}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),u++}y=s===u,c=c||y}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),u++,s.errors=p,!1}return u=f,null!==p&&(f?p.length=f:p=null),s.errors=p,0===u}function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:a=e}={}){let i=null,l=0;const p=l;let u=!1;const f=l;if(!0!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=f===l;if(u=u||c,!u){const o=l;s(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:a})||(i=null===i?s.errors:i.concat(s.errors),l=i.length),c=o===l,u=u||c}if(!u){const e={params:{}};return null===i?i=[e]:i.push(e),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}const a={asyncChunks:{type:"boolean"},baseUri:{type:"string"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const l=a;let p=!1;const u=a;if(!1!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=u===a;if(p=p||f,!p){const t=a,n=a;let r=!1;const s=a;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e&&"import"!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var c=s===a;if(r=r||c,!r){const t=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a,r=r||c}if(r)a=n,null!==o&&(n?o.length=n:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}f=t===a,p=p||f}if(!p){const e={params:{}};return null===o?o=[e]:o.push(e),a++,i.errors=o,!1}return a=l,null!==o&&(l?o.length=l:o=null),i.errors=o,0===a}function l(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let a=null,i=0;const p=i;let u=!1,f=null;const c=i,m=i;let y=!1;const h=i;if(i===h)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===a?a=[e]:a.push(e),i++}else if(t.length<1){const e={params:{}};null===a?a=[e]:a.push(e),i++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),i++}var d=h===i;if(y=y||d,!y){const e=i;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),i++}d=e===i,y=y||d}if(y)i=m,null!==a&&(m?a.length=m:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),i++}if(c===i&&(u=!0,f=0),!u){const e={params:{passingSchemas:f}};return null===a?a=[e]:a.push(e),i++,l.errors=a,!1}return i=p,null!==a&&(p?a.length=p:a=null),l.errors=a,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const u=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var f=u===a;if(l=l||f,!l){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===o?o=[e]:o.push(e),a++;break}if(t===a){if(void 0!==e.amd){const t=a;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var c=t===a}else c=!0;if(c){if(void 0!==e.commonjs){const t=a;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c){if(void 0!==e.commonjs2){const t=a;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c)if(void 0!==e.root){const t=a;if("string"!=typeof e.root){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0}}}}else{const e={params:{type:"object"}};null===o?o=[e]:o.push(e),a++}f=t===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,p.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),p.errors=o,0===a}function u(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(a===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),u++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),u++}var g=o===u;if(s=s||g,!s){const e=u;if(u===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}g=e===u,s=s||g}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),u++,y.errors=p,!1}u=r,null!==p&&(r?p.length=r:p=null),h=n===u}else h=!0;if(h){if(void 0!==e.filename){const n=u;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:o})||(p=null===p?l.errors:p.concat(l.errors),u=p.length),h=n===u}else h=!0;if(h){if(void 0!==e.import){let t=e.import;const n=u,r=u;let s=!1;const o=u;if(u===o)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),u++}else{var b=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),u++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),u++}var v=o===u;if(s=s||v,!s){const e=u;if(u===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}v=e===u,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),u++,y.errors=p,!1}u=r,null!==p&&(r?p.length=r:p=null),h=n===u}else h=!0;if(h){if(void 0!==e.layer){let t=e.layer;const n=u,r=u;let s=!1;const o=u;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var D=o===u;if(s=s||D,!s){const e=u;if(u===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}D=e===u,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),u++,y.errors=p,!1}u=r,null!==p&&(r?p.length=r:p=null),h=n===u}else h=!0;if(h){if(void 0!==e.library){const n=u;f(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:o})||(p=null===p?f.errors:p.concat(f.errors),u=p.length),h=n===u}else h=!0;if(h){if(void 0!==e.publicPath){const n=u;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:o})||(p=null===p?c.errors:p.concat(c.errors),u=p.length),h=n===u}else h=!0;if(h){if(void 0!==e.runtime){let t=e.runtime;const n=u,r=u;let s=!1;const o=u;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var P=o===u;if(s=s||P,!s){const e=u;if(u===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}P=e===u,s=s||P}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),u++,y.errors=p,!1}u=r,null!==p&&(r?p.length=r:p=null),h=n===u}else h=!0;if(h)if(void 0!==e.wasmLoading){const n=u;m(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:o})||(p=null===p?m.errors:p.concat(m.errors),u=p.length),h=n===u}else h=!0}}}}}}}}}}}}}return y.errors=p,0===u}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const u=a,f=a;let c=!1;const m=a,d=a;let g=!1;const b=a;if(a===b)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var i=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let s=r[t];if("string"==typeof s){if("number"==typeof n[s]){e=n[s];const r={params:{i:t,j:e}};null===o?o=[r]:o.push(r),a++;break}n[s]=t}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var l=b===a;if(g=g||l,!g){const e=a;if(a===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}l=e===a,g=g||l}if(g)a=d,null!==o&&(d?o.length=d:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}var p=m===a;if(c=c||p,!c){const i=a;y(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?y.errors:o.concat(y.errors),a=o.length),p=i===a,c=c||p}if(!c){const e={params:{}};return null===o?o=[e]:o.push(e),a++,h.errors=o,!1}if(a=f,null!==o&&(f?o.length=f:o=null),u!==a)break}}return h.errors=o,0===a}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const u=a,f=a;let c=!1;const m=a;if(a===m)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var y=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=e[n];if("string"==typeof s){if("number"==typeof r[s]){t=r[s];const e={params:{i:n,j:t}};null===o?o=[e]:o.push(e),a++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var h=m===a;if(c=c||h,!c){const t=a;if(a===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}h=t===a,c=c||h}if(c)a=f,null!==o&&(f?o.length=f:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}if(u===a&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===o?o=[e]:o.push(e),a++,d.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),d.errors=o,0===a}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?h.errors:o.concat(h.errors),a=o.length);var u=p===a;if(l=l||u,!l){const i=a;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?d.errors:o.concat(d.errors),a=o.length),u=i===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,g.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),g.errors=o,0===a}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof Function)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var u=p===a;if(l=l||u,!l){const i=a;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?g.errors:o.concat(g.errors),a=o.length),u=i===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,b.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),b.errors=o,0===a}const v={asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{anyOf:[{$ref:"#/definitions/HttpUriAllowedUris"},{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},css:{anyOf:[{type:"boolean"},{$ref:"#/definitions/CssExperimentOptions"}]},futureDefaults:{type:"boolean"},layers:{type:"boolean"},lazyCompilation:{anyOf:[{type:"boolean"},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"},topLevelAwait:{type:"boolean"}},D=new RegExp("^https?://","u");function P(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const u=a;if(a==a)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var f=m===l;if(c=c||f,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}f=t===l,c=c||f}if(c)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var c=a===l;if(o=o||c,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=e===l,o=o||c}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return pe.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var m=o===l;if(s=s||m,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(m=t===l,s=s||m,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}m=t===l,s=s||m}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var y=c===l;if(f=f||y,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}y=t===l,f=f||y}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=c===l;if(f=f||h,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=t===l,f=f||h}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=c===l;if(f=f||d,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=t===l,f=f||d}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=c===l;if(f=f||g,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=t===l,f=f||g}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=c===l;if(f=f||b,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=t===l,f=f||b}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=c===l;if(f=f||v,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=t===l,f=f||v}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var D=o===l;if(s=s||D,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(D=t===l,s=s||D,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}D=t===l,s=s||D}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){const e=l;if("number"!=typeof t.priority)return pe.errors=[{params:{type:"number"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var P=o===l;if(s=s||P,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(P=t===l,s=s||P,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=t===l,s=s||P}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var A=o===l;if(s=s||A,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(A=t===l,s=s||A,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}A=t===l,s=s||A}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}}return pe.errors=i,0===l}function ue(t,{instancePath:r="",parentData:s,parentDataProperty:o,rootData:a=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return ue.errors=[{params:{type:"object"}}],!1;{const s=l;for(const e in t)if(!n.call(ie,e))return ue.errors=[{params:{additionalProperty:e}}],!1;if(s===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return ue.errors=[{params:{type:"string"}}],!1;if(e.length<1)return ue.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,s=l,o=l;if(l===o)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===i?i=[e]:i.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const s=l;if(!(t instanceof RegExp)){const e={};null===i?i=[e]:i.push(e),l++}var u=s===l;if(r=r||u,!r){const e=l;if("string"!=typeof t){const e={};null===i?i=[e]:i.push(e),l++}if(u=e===l,r=r||u,!r){const e=l;if(!(t instanceof Function)){const e={};null===i?i=[e]:i.push(e),l++}u=e===l,r=r||u}}if(r)l=n,null!==i&&(n?i.length=n:i=null);else{const e={};null===i?i=[e]:i.push(e),l++}}}else{const e={};null===i?i=[e]:i.push(e),l++}if(o===l)return ue.errors=[{params:{}}],!1;if(l=s,null!==i&&(s?i.length=s:i=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return ue.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const s=l,o=l;let p=!1;const u=l;if(!1!==n){const e={params:{}};null===i?i=[e]:i.push(e),l++}var f=u===l;if(p=p||f,!p){const s=l;if(!(n instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(f=s===l,p=p||f,!p){const s=l;if("string"!=typeof n){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(f=s===l,p=p||f,!p){const s=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(f=s===l,p=p||f,!p){const s=l;pe(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:a})||(i=null===i?pe.errors:i.concat(pe.errors),l=i.length),f=s===l,p=p||f}}}}if(!p){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}if(l=o,null!==i&&(o?i.length=o:i=null),s!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=o===l;if(s=s||c,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=t===l,s=s||c}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return ue.errors=[{params:{type:"array"}}],!1;if(e.length<1)return ue.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var m=c===l;if(f=f||m,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}m=t===l,f=f||m}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return ue.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"chunks"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t&&"minSizeReduction"!==t)return ue.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return ue.errors=[{params:{type:"string"}}],!1;if(t.length<1)return ue.errors=[{params:{}}],!1}var y=n===l}else y=!0;if(y){if(void 0!==e.chunks){let t=e.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==t&&"async"!==t&&"all"!==t){const e={params:{}};null===i?i=[e]:i.push(e),l++}var h=o===l;if(s=s||h,!s){const e=l;if(!(t instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}h=e===l,s=s||h}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let u=!1;const f=l;if(l===f)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=f===l;if(u=u||d,!u){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=e===l,u=u||d}if(u)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let u=!1;const f=l;if(l===f)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=f===l;if(u=u||g,!u){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=e===l,u=u||g}if(u)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let u=!1;const f=l;if(l===f)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=f===l;if(u=u||b,!u){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=e===l,u=u||b}if(u)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let u=!1;const f=l;if(l===f)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=f===l;if(u=u||v,!u){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=e===l,u=u||v}if(u)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y)if(void 0!==e.minSizeReduction){let t=e.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let u=!1;const f=l;if(l===f)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var D=f===l;if(u=u||D,!u){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}D=e===l,u=u||D}if(u)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0}}}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var P=a===l;if(o=o||P,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=e===l,o=o||P}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return ue.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return ue.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var A=c===l;if(f=f||A,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}A=t===l,f=f||A}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return ue.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var x=c===l;if(f=f||x,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}x=t===l,f=f||x}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var k=c===l;if(f=f||k,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}k=t===l,f=f||k}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return ue.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var j=c===l;if(f=f||j,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}j=t===l,f=f||j}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var S=c===l;if(f=f||S,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}S=t===l,f=f||S}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,u=l;let f=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var C=c===l;if(f=f||C,!f){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}C=t===l,f=f||C}if(f)l=u,null!==i&&(u?i.length=u:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var O=o===l;if(s=s||O,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(O=t===l,s=s||O,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}O=t===l,s=s||O}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ue.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return ue.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}return ue.errors=i,0===l}function fe(e,{instancePath:t="",parentData:r,parentDataProperty:s,rootData:o=e}={}){let a=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return fe.errors=[{params:{type:"object"}}],!1;{const r=i;for(const t in e)if(!n.call(ae,t))return fe.errors=[{params:{additionalProperty:t}}],!1;if(r===i){if(void 0!==e.checkWasmTypes){const t=i;if("boolean"!=typeof e.checkWasmTypes)return fe.errors=[{params:{type:"boolean"}}],!1;var l=t===i}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=i;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return fe.errors=[{params:{}}],!1;l=n===i}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=i;if("boolean"!=typeof e.concatenateModules)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=i;if("boolean"!=typeof e.emitOnErrors)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=i;if("boolean"!=typeof e.flagIncludedChunks)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.innerGraph){const t=i;if("boolean"!=typeof e.innerGraph)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=i,r=i;let s=!1;const o=i;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===a?a=[e]:a.push(e),i++}var p=o===i;if(s=s||p,!s){const e=i;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===a?a=[e]:a.push(e),i++}p=e===i,s=s||p}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),i++,fe.errors=a,!1}i=r,null!==a&&(r?a.length=r:a=null),l=n===i}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=i;if("boolean"!=typeof e.mangleWasmImports)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=i;if("boolean"!=typeof e.mergeDuplicateChunks)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimize){const t=i;if("boolean"!=typeof e.minimize)return fe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=i;if(i===n){if(!Array.isArray(t))return fe.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}y=n===u}else y=!0;if(y){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=u,r=u;let s=!1;const o=u;if(u===o)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),u++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),u++}var v=o===u;if(s=s||v,!s){const t=u;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),u++}v=t===u,s=s||v}if(!s){const e={params:{}};return null===l?l=[e]:l.push(e),u++,xe.errors=l,!1}u=r,null!==l&&(r?l.length=r:l=null),y=n===u}else y=!0;if(y){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=u;if(u==u){if("string"!=typeof e)return xe.errors=[{params:{type:"string"}}],!1;if(e.length<1)return xe.errors=[{params:{}}],!1}y=n===u}else y=!0;if(y){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=u;if(u==u){if("string"!=typeof n)return xe.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return xe.errors=[{params:{}}],!1}y=r===u}else y=!0;if(y){if(void 0!==t.hotUpdateGlobal){const e=u;if("string"!=typeof t.hotUpdateGlobal)return xe.errors=[{params:{type:"string"}}],!1;y=e===u}else y=!0;if(y){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=u;if(u==u){if("string"!=typeof n)return xe.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return xe.errors=[{params:{}}],!1}y=r===u}else y=!0;if(y){if(void 0!==t.iife){const e=u;if("boolean"!=typeof t.iife)return xe.errors=[{params:{type:"boolean"}}],!1;y=e===u}else y=!0;if(y){if(void 0!==t.importFunctionName){const e=u;if("string"!=typeof t.importFunctionName)return xe.errors=[{params:{type:"string"}}],!1;y=e===u}else y=!0;if(y){if(void 0!==t.importMetaName){const e=u;if("string"!=typeof t.importMetaName)return xe.errors=[{params:{type:"string"}}],!1;y=e===u}else y=!0;if(y){if(void 0!==t.library){const e=u;Ae(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:a})||(l=null===l?Ae.errors:l.concat(Ae.errors),u=l.length),y=e===u}else y=!0;if(y){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=u,r=u;let s=!1,o=null;const a=u,i=u;let p=!1;const f=u;if(u===f)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===u}else c=!0;if(c){if(void 0!==r.performance){const e=u;ke(r.performance,{instancePath:s+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?ke.errors:p.concat(ke.errors),u=p.length),c=e===u}else c=!0;if(c){if(void 0!==r.plugins){const e=u;je(r.plugins,{instancePath:s+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?je.errors:p.concat(je.errors),u=p.length),c=e===u}else c=!0;if(c){if(void 0!==r.profile){const e=u;if("boolean"!=typeof r.profile)return we.errors=[{params:{type:"boolean"}}],!1;c=e===u}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=u,s=u;let o=!1;const a=u;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var g=a===u;if(o=o||g,!o){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}g=n===u,o=o||g}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),u++,we.errors=p,!1}u=s,null!==p&&(s?p.length=s:p=null),c=n===u}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=u,s=u;let o=!1;const a=u;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var v=a===u;if(o=o||v,!o){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}v=n===u,o=o||v}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),u++,we.errors=p,!1}u=s,null!==p&&(s?p.length=s:p=null),c=n===u}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=u,s=u;let o=!1;const a=u;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),u++}var D=a===u;if(o=o||D,!o){const n=u;if(u===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),u++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),u++}D=n===u,o=o||D}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),u++,we.errors=p,!1}u=s,null!==p&&(s?p.length=s:p=null),c=n===u}else c=!0;if(c){if(void 0!==r.resolve){const e=u;Se(r.resolve,{instancePath:s+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?Se.errors:p.concat(Se.errors),u=p.length),c=e===u}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=u;Ce(r.resolveLoader,{instancePath:s+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?Ce.errors:p.concat(Ce.errors),u=p.length),c=e===u}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=u;if(u==u){if(!t||"object"!=typeof t||Array.isArray(t))return we.errors=[{params:{type:"object"}}],!1;{const n=u;for(const e in t)if("buildDependencies"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e)return we.errors=[{params:{additionalProperty:e}}],!1;if(n===u){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=u;if(u===n){if(!e||"object"!=typeof e||Array.isArray(e))return we.errors=[{params:{type:"object"}}],!1;{const t=u;for(const t in e)if("hash"!==t&&"timestamp"!==t)return we.errors=[{params:{additionalProperty:t}}],!1;if(t===u){if(void 0!==e.hash){const t=u;if("boolean"!=typeof e.hash)return we.errors=[{params:{type:"boolean"}}],!1;var P=t===u}else P=!0;if(P)if(void 0!==e.timestamp){const t=u;if("boolean"!=typeof e.timestamp)return we.errors=[{params:{type:"boolean"}}],!1;P=t===u}else P=!0}}}var A=n===u}else A=!0;if(A){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=u;if(u===r){if(!Array.isArray(n))return we.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r=",limit:1}}],!1}u=s===l}else u=!0;if(u)if(void 0!==r.hashFunction){let t=r.hashFunction;const s=l,n=l;let a=!1,i=null;const p=l,h=l;let c=!1;const m=l;if(l===m)if("string"==typeof t){if(t.length<1){const t={params:{}};null===o?o=[t]:o.push(t),l++}}else{const t={params:{type:"string"}};null===o?o=[t]:o.push(t),l++}var f=m===l;if(c=c||f,!c){const e=l;if(!(t instanceof Function)){const t={params:{}};null===o?o=[t]:o.push(t),l++}f=e===l,c=c||f}if(c)l=h,null!==o&&(h?o.length=h:o=null);else{const t={params:{}};null===o?o=[t]:o.push(t),l++}if(p===l&&(a=!0,i=0),!a){const t={params:{passingSchemas:i}};return null===o?o=[t]:o.push(t),l++,e.errors=o,!1}l=n,null!==o&&(n?o.length=n:o=null),u=s===l}else u=!0}}}}}return e.errors=o,0===l}module.exports=e,module.exports["default"]=e; - -/***/ }), - -/***/ 89849: -/***/ (function(module) { - -"use strict"; -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -function e(s,{instancePath:o="",parentData:r,parentDataProperty:t,rootData:n=s}={}){let c=null,a=0;const p=a;let l=!1;const i=a;if(a===i)if(s&&"object"==typeof s&&!Array.isArray(s)){let e;if(void 0===s.resourceRegExp&&(e="resourceRegExp")){const s={params:{missingProperty:e}};null===c?c=[s]:c.push(s),a++}else{const e=a;for(const e in s)if("contextRegExp"!==e&&"resourceRegExp"!==e){const s={params:{additionalProperty:e}};null===c?c=[s]:c.push(s),a++;break}if(e===a){if(void 0!==s.contextRegExp){const e=a;if(!(s.contextRegExp instanceof RegExp)){const e={params:{}};null===c?c=[e]:c.push(e),a++}var u=e===a}else u=!0;if(u)if(void 0!==s.resourceRegExp){const e=a;if(!(s.resourceRegExp instanceof RegExp)){const e={params:{}};null===c?c=[e]:c.push(e),a++}u=e===a}else u=!0}}}else{const e={params:{type:"object"}};null===c?c=[e]:c.push(e),a++}var f=i===a;if(l=l||f,!l){const e=a;if(a===e)if(s&&"object"==typeof s&&!Array.isArray(s)){let e;if(void 0===s.checkResource&&(e="checkResource")){const s={params:{missingProperty:e}};null===c?c=[s]:c.push(s),a++}else{const e=a;for(const e in s)if("checkResource"!==e){const s={params:{additionalProperty:e}};null===c?c=[s]:c.push(s),a++;break}if(e===a&&void 0!==s.checkResource&&!(s.checkResource instanceof Function)){const e={params:{}};null===c?c=[e]:c.push(e),a++}}}else{const e={params:{type:"object"}};null===c?c=[e]:c.push(e),a++}f=e===a,l=l||f}if(!l){const s={params:{}};return null===c?c=[s]:c.push(s),a++,e.errors=c,!1}return a=p,null!==c&&(p?c.length=p:c=null),e.errors=c,0===a}module.exports=e,module.exports["default"]=e; - -/***/ }), - -/***/ 79327: -/***/ (function(module) { - -"use strict"; -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -function r(t,{instancePath:e="",parentData:a,parentDataProperty:o,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const e=0;for(const e in t)if("parse"!==e)return r.errors=[{params:{additionalProperty:e}}],!1;if(0===e&&void 0!==t.parse&&!(t.parse instanceof Function))return r.errors=[{params:{}}],!1}return r.errors=null,!0}module.exports=r,module.exports["default"]=r; - -/***/ }), - -/***/ 67892: -/***/ (function(module) { - -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function e(t,{instancePath:o="",parentData:a,parentDataProperty:i,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return e.errors=[{params:{type:"object"}}],!1;if(void 0!==t.debug){const r=0;if("boolean"!=typeof t.debug)return e.errors=[{params:{type:"boolean"}}],!1;var s=0===r}else s=!0;if(s){if(void 0!==t.minimize){const r=0;if("boolean"!=typeof t.minimize)return e.errors=[{params:{type:"boolean"}}],!1;s=0===r}else s=!0;if(s)if(void 0!==t.options){let o=t.options;const a=0;if(0===a){if(!o||"object"!=typeof o||Array.isArray(o))return e.errors=[{params:{type:"object"}}],!1;if(void 0!==o.context){let t=o.context;if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.includes("!")||!0!==r.test(t))return e.errors=[{params:{}}],!1}}s=0===a}else s=!0}return e.errors=null,!0}module.exports=e,module.exports["default"]=e; - -/***/ }), - -/***/ 49196: -/***/ (function(module) { - -"use strict"; -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -module.exports=t,module.exports["default"]=t;const e={activeModules:{type:"boolean"},dependencies:{type:"boolean"},dependenciesCount:{type:"number"},entries:{type:"boolean"},handler:{oneOf:[{$ref:"#/definitions/HandlerFunction"}]},modules:{type:"boolean"},modulesCount:{type:"number"},percentBy:{enum:["entries","modules","dependencies",null]},profile:{enum:[!0,!1,null]}},r=Object.prototype.hasOwnProperty;function n(t,{instancePath:o="",parentData:s,parentDataProperty:a,rootData:l=t}={}){let i=null,p=0;if(0===p){if(!t||"object"!=typeof t||Array.isArray(t))return n.errors=[{params:{type:"object"}}],!1;{const o=p;for(const o in t)if(!r.call(e,o))return n.errors=[{params:{additionalProperty:o}}],!1;if(o===p){if(void 0!==t.activeModules){const e=p;if("boolean"!=typeof t.activeModules)return n.errors=[{params:{type:"boolean"}}],!1;var u=e===p}else u=!0;if(u){if(void 0!==t.dependencies){const e=p;if("boolean"!=typeof t.dependencies)return n.errors=[{params:{type:"boolean"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.dependenciesCount){const e=p;if("number"!=typeof t.dependenciesCount)return n.errors=[{params:{type:"number"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.entries){const e=p;if("boolean"!=typeof t.entries)return n.errors=[{params:{type:"boolean"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.handler){const e=p,r=p;let o=!1,s=null;const a=p;if(!(t.handler instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),p++}if(a===p&&(o=!0,s=0),!o){const e={params:{passingSchemas:s}};return null===i?i=[e]:i.push(e),p++,n.errors=i,!1}p=r,null!==i&&(r?i.length=r:i=null),u=e===p}else u=!0;if(u){if(void 0!==t.modules){const e=p;if("boolean"!=typeof t.modules)return n.errors=[{params:{type:"boolean"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.modulesCount){const e=p;if("number"!=typeof t.modulesCount)return n.errors=[{params:{type:"number"}}],!1;u=e===p}else u=!0;if(u){if(void 0!==t.percentBy){let e=t.percentBy;const r=p;if("entries"!==e&&"modules"!==e&&"dependencies"!==e&&null!==e)return n.errors=[{params:{}}],!1;u=r===p}else u=!0;if(u)if(void 0!==t.profile){let e=t.profile;const r=p;if(!0!==e&&!1!==e&&null!==e)return n.errors=[{params:{}}],!1;u=r===p}else u=!0}}}}}}}}}}return n.errors=i,0===p}function t(e,{instancePath:r="",parentData:o,parentDataProperty:s,rootData:a=e}={}){let l=null,i=0;const p=i;let u=!1;const f=i;n(e,{instancePath:r,parentData:o,parentDataProperty:s,rootData:a})||(l=null===l?n.errors:l.concat(n.errors),i=l.length);var c=f===i;if(u=u||c,!u){const r=i;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),i++}c=r===i,u=u||c}if(!u){const e={params:{}};return null===l?l=[e]:l.push(e),i++,t.errors=l,!1}return i=p,null!==l&&(p?l.length=p:l=null),t.errors=l,0===i} - -/***/ }), - -/***/ 74633: -/***/ (function(module) { - -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -const e=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=l,module.exports["default"]=l;const n={append:{anyOf:[{enum:[!1,null]},{type:"string",minLength:1}]},columns:{type:"boolean"},exclude:{oneOf:[{$ref:"#/definitions/rules"}]},fallbackModuleFilenameTemplate:{anyOf:[{type:"string",minLength:1},{instanceof:"Function"}]},fileContext:{type:"string"},filename:{anyOf:[{enum:[!1,null]},{type:"string",absolutePath:!1,minLength:1}]},include:{oneOf:[{$ref:"#/definitions/rules"}]},module:{type:"boolean"},moduleFilenameTemplate:{anyOf:[{type:"string",minLength:1},{instanceof:"Function"}]},namespace:{type:"string"},noSources:{type:"boolean"},publicPath:{type:"string"},sourceRoot:{type:"string"},test:{$ref:"#/definitions/rules"}},t=Object.prototype.hasOwnProperty;function s(e,{instancePath:n="",parentData:t,parentDataProperty:l,rootData:r=e}={}){let o=null,a=0;const i=a;let u=!1;const p=a;if(a===p)if(Array.isArray(e)){const n=e.length;for(let t=0;t=",limit:1}}],!1}s=0===n}else s=!0}}}}return r.errors=null,!0}module.exports=r,module.exports["default"]=r; - -/***/ }), - -/***/ 927: -/***/ (function(module) { - -"use strict"; -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -function r(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:o=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{let t;if(void 0===e.minChunkSize&&(t="minChunkSize"))return r.errors=[{params:{missingProperty:t}}],!1;{const t=0;for(const t in e)if("chunkOverhead"!==t&&"entryChunkMultiplicator"!==t&&"minChunkSize"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.chunkOverhead){const t=0;if("number"!=typeof e.chunkOverhead)return r.errors=[{params:{type:"number"}}],!1;var a=0===t}else a=!0;if(a){if(void 0!==e.entryChunkMultiplicator){const t=0;if("number"!=typeof e.entryChunkMultiplicator)return r.errors=[{params:{type:"number"}}],!1;a=0===t}else a=!0;if(a)if(void 0!==e.minChunkSize){const t=0;if("number"!=typeof e.minChunkSize)return r.errors=[{params:{type:"number"}}],!1;a=0===t}else a=!0}}}}return r.errors=null,!0}module.exports=r,module.exports["default"]=r; - -/***/ }), - -/***/ 29911: -/***/ (function(module) { - -/* - * This file was automatically generated. - * DO NOT MODIFY BY HAND. - * Run `yarn special-lint-fix` to update - */ -const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=n,module.exports["default"]=n;const t=new RegExp("^https?://","u");function e(n,{instancePath:o="",parentData:s,parentDataProperty:a,rootData:l=n}={}){let i=null,p=0;if(0===p){if(!n||"object"!=typeof n||Array.isArray(n))return e.errors=[{params:{type:"object"}}],!1;{let o;if(void 0===n.allowedUris&&(o="allowedUris"))return e.errors=[{params:{missingProperty:o}}],!1;{const o=p;for(const r in n)if("allowedUris"!==r&&"cacheLocation"!==r&&"frozen"!==r&&"lockfileLocation"!==r&&"proxy"!==r&&"upgrade"!==r)return e.errors=[{params:{additionalProperty:r}}],!1;if(o===p){if(void 0!==n.allowedUris){let r=n.allowedUris;const o=p;if(p==p){if(!Array.isArray(r))return e.errors=[{params:{type:"array"}}],!1;{const n=r.length;for(let o=0;o1&&arguments[1]!==undefined?arguments[1]:"i32";var R=v;if(typeof v==="string"){v=v.replace(/_/g,"")}if(typeof v==="number"){return(0,j.numberLiteral)(v,String(R))}else{switch(E){case"i32":{return(0,j.numberLiteral)((0,$.parse32I)(v),String(R))}case"u32":{return(0,j.numberLiteral)((0,$.parseU32)(v),String(R))}case"i64":{return(0,j.longNumberLiteral)((0,$.parse64I)(v),String(R))}case"f32":{return(0,j.floatLiteral)((0,$.parse32F)(v),(0,$.isNanLiteral)(v),(0,$.isInfLiteral)(v),String(R))}default:{return(0,j.floatLiteral)((0,$.parse64F)(v),(0,$.isNanLiteral)(v),(0,$.isInfLiteral)(v),String(R))}}}}function instruction(v){var E=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var R=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,j.instr)(v,undefined,E,R)}function objectInstruction(v,E){var R=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var $=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};return(0,j.instr)(v,E,R,$)}function withLoc(v,E,R){var $={start:R,end:E};v.loc=$;return v}function withRaw(v,E){v.raw=E;return v}function funcParam(v,E){return{id:E,valtype:v}}function indexLiteral(v){var E=numberLiteralFromRaw(v,"u32");return E}function memIndexLiteral(v){var E=numberLiteralFromRaw(v,"u32");return E}},33301:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.createPath=createPath;function _extends(){_extends=Object.assign||function(v){for(var E=1;E2&&arguments[2]!==undefined?arguments[2]:0;if(!$){throw new Error("inList"+" error: "+("insert can only be used for nodes that are within lists"||0))}if(!(j!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var G=j.node[N];var ie=G.findIndex((function(v){return v===R}));G.splice(ie+q,0,E)}function remove(v){var E=v.node,R=v.parentKey,$=v.parentPath;if(!($!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var j=$.node;var N=j[R];if(Array.isArray(N)){j[R]=N.filter((function(v){return v!==E}))}else{delete j[R]}E._deleted=true}function stop(v){v.shouldStop=true}function replaceWith(v,E){var R=v.parentPath.node;var $=R[v.parentKey];if(Array.isArray($)){var j=$.findIndex((function(E){return E===v.node}));$.splice(j,1,E)}else{R[v.parentKey]=E}v.node._deleted=true;v.node=E}function bindNodeOperations(v,E){var R=Object.keys(v);var $={};R.forEach((function(R){$[R]=v[R].bind(null,E)}));return $}function createPathOperations(v){return bindNodeOperations({findParent:findParent,replaceWith:replaceWith,remove:remove,insertBefore:insertBefore,insertAfter:insertAfter,stop:stop},v)}function createPath(v){var E=_extends({},v);Object.assign(E,createPathOperations(E));return E}},23033:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.module=_module;E.moduleMetadata=moduleMetadata;E.moduleNameMetadata=moduleNameMetadata;E.functionNameMetadata=functionNameMetadata;E.localNameMetadata=localNameMetadata;E.binaryModule=binaryModule;E.quoteModule=quoteModule;E.sectionMetadata=sectionMetadata;E.producersSectionMetadata=producersSectionMetadata;E.producerMetadata=producerMetadata;E.producerMetadataVersionedName=producerMetadataVersionedName;E.loopInstruction=loopInstruction;E.instr=instr;E.ifInstruction=ifInstruction;E.stringLiteral=stringLiteral;E.numberLiteral=numberLiteral;E.longNumberLiteral=longNumberLiteral;E.floatLiteral=floatLiteral;E.elem=elem;E.indexInFuncSection=indexInFuncSection;E.valtypeLiteral=valtypeLiteral;E.typeInstruction=typeInstruction;E.start=start;E.globalType=globalType;E.leadingComment=leadingComment;E.blockComment=blockComment;E.data=data;E.global=global;E.table=table;E.memory=memory;E.funcImportDescr=funcImportDescr;E.moduleImport=moduleImport;E.moduleExportDescr=moduleExportDescr;E.moduleExport=moduleExport;E.limit=limit;E.signature=signature;E.program=program;E.identifier=identifier;E.blockInstruction=blockInstruction;E.callInstruction=callInstruction;E.callIndirectInstruction=callIndirectInstruction;E.byteArray=byteArray;E.func=func;E.internalBrUnless=internalBrUnless;E.internalGoto=internalGoto;E.internalCallExtern=internalCallExtern;E.internalEndAndReturn=internalEndAndReturn;E.assertInternalCallExtern=E.assertInternalGoto=E.assertInternalBrUnless=E.assertFunc=E.assertByteArray=E.assertCallIndirectInstruction=E.assertCallInstruction=E.assertBlockInstruction=E.assertIdentifier=E.assertProgram=E.assertSignature=E.assertLimit=E.assertModuleExport=E.assertModuleExportDescr=E.assertModuleImport=E.assertFuncImportDescr=E.assertMemory=E.assertTable=E.assertGlobal=E.assertData=E.assertBlockComment=E.assertLeadingComment=E.assertGlobalType=E.assertStart=E.assertTypeInstruction=E.assertValtypeLiteral=E.assertIndexInFuncSection=E.assertElem=E.assertFloatLiteral=E.assertLongNumberLiteral=E.assertNumberLiteral=E.assertStringLiteral=E.assertIfInstruction=E.assertInstr=E.assertLoopInstruction=E.assertProducerMetadataVersionedName=E.assertProducerMetadata=E.assertProducersSectionMetadata=E.assertSectionMetadata=E.assertQuoteModule=E.assertBinaryModule=E.assertLocalNameMetadata=E.assertFunctionNameMetadata=E.assertModuleNameMetadata=E.assertModuleMetadata=E.assertModule=E.isIntrinsic=E.isImportDescr=E.isNumericLiteral=E.isExpression=E.isInstruction=E.isBlock=E.isNode=E.isInternalEndAndReturn=E.isInternalCallExtern=E.isInternalGoto=E.isInternalBrUnless=E.isFunc=E.isByteArray=E.isCallIndirectInstruction=E.isCallInstruction=E.isBlockInstruction=E.isIdentifier=E.isProgram=E.isSignature=E.isLimit=E.isModuleExport=E.isModuleExportDescr=E.isModuleImport=E.isFuncImportDescr=E.isMemory=E.isTable=E.isGlobal=E.isData=E.isBlockComment=E.isLeadingComment=E.isGlobalType=E.isStart=E.isTypeInstruction=E.isValtypeLiteral=E.isIndexInFuncSection=E.isElem=E.isFloatLiteral=E.isLongNumberLiteral=E.isNumberLiteral=E.isStringLiteral=E.isIfInstruction=E.isInstr=E.isLoopInstruction=E.isProducerMetadataVersionedName=E.isProducerMetadata=E.isProducersSectionMetadata=E.isSectionMetadata=E.isQuoteModule=E.isBinaryModule=E.isLocalNameMetadata=E.isFunctionNameMetadata=E.isModuleNameMetadata=E.isModuleMetadata=E.isModule=void 0;E.nodeAndUnionTypes=E.unionTypesMap=E.assertInternalEndAndReturn=void 0;function _typeof(v){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function isTypeOf(v){return function(E){return E.type===v}}function assertTypeOf(v){return function(E){return function(){if(!(E.type===v)){throw new Error("n.type === t"+" error: "+(undefined||"unknown"))}}()}}function _module(v,E,R){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof fields === "object" && typeof fields.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"Module",id:v,fields:E};if(typeof R!=="undefined"){$.metadata=R}return $}function moduleMetadata(v,E,R,$){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof sections === "object" && typeof sections.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof functionNames === "object" && typeof functionNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if(R!==null&&R!==undefined){if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof localNames === "object" && typeof localNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if($!==null&&$!==undefined){if(!(_typeof($)==="object"&&typeof $.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var j={type:"ModuleMetadata",sections:v};if(typeof E!=="undefined"&&E.length>0){j.functionNames=E}if(typeof R!=="undefined"&&R.length>0){j.localNames=R}if(typeof $!=="undefined"&&$.length>0){j.producers=$}return j}function moduleNameMetadata(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"ModuleNameMetadata",value:v};return E}function functionNameMetadata(v,E){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="number")){throw new Error('typeof index === "number"'+" error: "+("Argument index must be of type number, given: "+_typeof(E)||0))}var R={type:"FunctionNameMetadata",value:v,index:E};return R}function localNameMetadata(v,E,R){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="number")){throw new Error('typeof localIndex === "number"'+" error: "+("Argument localIndex must be of type number, given: "+_typeof(E)||0))}if(!(typeof R==="number")){throw new Error('typeof functionIndex === "number"'+" error: "+("Argument functionIndex must be of type number, given: "+_typeof(R)||0))}var $={type:"LocalNameMetadata",value:v,localIndex:E,functionIndex:R};return $}function binaryModule(v,E){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof blob === "object" && typeof blob.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"BinaryModule",id:v,blob:E};return R}function quoteModule(v,E){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof string === "object" && typeof string.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"QuoteModule",id:v,string:E};return R}function sectionMetadata(v,E,R,$){if(!(typeof E==="number")){throw new Error('typeof startOffset === "number"'+" error: "+("Argument startOffset must be of type number, given: "+_typeof(E)||0))}var j={type:"SectionMetadata",section:v,startOffset:E,size:R,vectorOfSize:$};return j}function producersSectionMetadata(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"ProducersSectionMetadata",producers:v};return E}function producerMetadata(v,E,R){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof language === "object" && typeof language.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof processedBy === "object" && typeof processedBy.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof sdk === "object" && typeof sdk.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"ProducerMetadata",language:v,processedBy:E,sdk:R};return $}function producerMetadataVersionedName(v,E){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof version === "string"'+" error: "+("Argument version must be of type string, given: "+_typeof(E)||0))}var R={type:"ProducerMetadataVersionedName",name:v,version:E};return R}function loopInstruction(v,E,R){if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"LoopInstruction",id:"loop",label:v,resulttype:E,instr:R};return $}function instr(v,E,R,$){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof args === "object" && typeof args.length !== "undefined"'+" error: "+(undefined||"unknown"))}var j={type:"Instr",id:v,args:R};if(typeof E!=="undefined"){j.object=E}if(typeof $!=="undefined"&&Object.keys($).length!==0){j.namedArgs=$}return j}function ifInstruction(v,E,R,$,j){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof test === "object" && typeof test.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof($)==="object"&&typeof $.length!=="undefined")){throw new Error('typeof consequent === "object" && typeof consequent.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(j)==="object"&&typeof j.length!=="undefined")){throw new Error('typeof alternate === "object" && typeof alternate.length !== "undefined"'+" error: "+(undefined||"unknown"))}var N={type:"IfInstruction",id:"if",testLabel:v,test:E,result:R,consequent:$,alternate:j};return N}function stringLiteral(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"StringLiteral",value:v};return E}function numberLiteral(v,E){if(!(typeof v==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}var R={type:"NumberLiteral",value:v,raw:E};return R}function longNumberLiteral(v,E){if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}var R={type:"LongNumberLiteral",value:v,raw:E};return R}function floatLiteral(v,E,R,$){if(!(typeof v==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="boolean")){throw new Error('typeof nan === "boolean"'+" error: "+("Argument nan must be of type boolean, given: "+_typeof(E)||0))}}if(R!==null&&R!==undefined){if(!(typeof R==="boolean")){throw new Error('typeof inf === "boolean"'+" error: "+("Argument inf must be of type boolean, given: "+_typeof(R)||0))}}if(!(typeof $==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof($)||0))}var j={type:"FloatLiteral",value:v,raw:$};if(E===true){j.nan=true}if(R===true){j.inf=true}return j}function elem(v,E,R){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof offset === "object" && typeof offset.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof funcs === "object" && typeof funcs.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"Elem",table:v,offset:E,funcs:R};return $}function indexInFuncSection(v){var E={type:"IndexInFuncSection",index:v};return E}function valtypeLiteral(v){var E={type:"ValtypeLiteral",name:v};return E}function typeInstruction(v,E){var R={type:"TypeInstruction",id:v,functype:E};return R}function start(v){var E={type:"Start",index:v};return E}function globalType(v,E){var R={type:"GlobalType",valtype:v,mutability:E};return R}function leadingComment(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"LeadingComment",value:v};return E}function blockComment(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"BlockComment",value:v};return E}function data(v,E,R){var $={type:"Data",memoryIndex:v,offset:E,init:R};return $}function global(v,E,R){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof init === "object" && typeof init.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"Global",globalType:v,init:E,name:R};return $}function table(v,E,R,$){if(!(E.type==="Limit")){throw new Error('limits.type === "Limit"'+" error: "+("Argument limits must be of type Limit, given: "+E.type||0))}if($!==null&&$!==undefined){if(!(_typeof($)==="object"&&typeof $.length!=="undefined")){throw new Error('typeof elements === "object" && typeof elements.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var j={type:"Table",elementType:v,limits:E,name:R};if(typeof $!=="undefined"&&$.length>0){j.elements=$}return j}function memory(v,E){var R={type:"Memory",limits:v,id:E};return R}function funcImportDescr(v,E){var R={type:"FuncImportDescr",id:v,signature:E};return R}function moduleImport(v,E,R){if(!(typeof v==="string")){throw new Error('typeof module === "string"'+" error: "+("Argument module must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(E)||0))}var $={type:"ModuleImport",module:v,name:E,descr:R};return $}function moduleExportDescr(v,E){var R={type:"ModuleExportDescr",exportType:v,id:E};return R}function moduleExport(v,E){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(v)||0))}var R={type:"ModuleExport",name:v,descr:E};return R}function limit(v,E,R){if(!(typeof v==="number")){throw new Error('typeof min === "number"'+" error: "+("Argument min must be of type number, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="number")){throw new Error('typeof max === "number"'+" error: "+("Argument max must be of type number, given: "+_typeof(E)||0))}}if(R!==null&&R!==undefined){if(!(typeof R==="boolean")){throw new Error('typeof shared === "boolean"'+" error: "+("Argument shared must be of type boolean, given: "+_typeof(R)||0))}}var $={type:"Limit",min:v};if(typeof E!=="undefined"){$.max=E}if(R===true){$.shared=true}return $}function signature(v,E){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof params === "object" && typeof params.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof results === "object" && typeof results.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"Signature",params:v,results:E};return R}function program(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"Program",body:v};return E}function identifier(v,E){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}}var R={type:"Identifier",value:v};if(typeof E!=="undefined"){R.raw=E}return R}function blockInstruction(v,E,R){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"BlockInstruction",id:"block",label:v,instr:E,result:R};return $}function callInstruction(v,E,R){if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof instrArgs === "object" && typeof instrArgs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var $={type:"CallInstruction",id:"call",index:v};if(typeof E!=="undefined"&&E.length>0){$.instrArgs=E}if(typeof R!=="undefined"){$.numeric=R}return $}function callIndirectInstruction(v,E){if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof intrs === "object" && typeof intrs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var R={type:"CallIndirectInstruction",id:"call_indirect",signature:v};if(typeof E!=="undefined"&&E.length>0){R.intrs=E}return R}function byteArray(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof values === "object" && typeof values.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"ByteArray",values:v};return E}function func(v,E,R,$,j){if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}if($!==null&&$!==undefined){if(!(typeof $==="boolean")){throw new Error('typeof isExternal === "boolean"'+" error: "+("Argument isExternal must be of type boolean, given: "+_typeof($)||0))}}var N={type:"Func",name:v,signature:E,body:R};if($===true){N.isExternal=true}if(typeof j!=="undefined"){N.metadata=j}return N}function internalBrUnless(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalBrUnless",target:v};return E}function internalGoto(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalGoto",target:v};return E}function internalCallExtern(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalCallExtern",target:v};return E}function internalEndAndReturn(){var v={type:"InternalEndAndReturn"};return v}var R=isTypeOf("Module");E.isModule=R;var $=isTypeOf("ModuleMetadata");E.isModuleMetadata=$;var j=isTypeOf("ModuleNameMetadata");E.isModuleNameMetadata=j;var N=isTypeOf("FunctionNameMetadata");E.isFunctionNameMetadata=N;var q=isTypeOf("LocalNameMetadata");E.isLocalNameMetadata=q;var G=isTypeOf("BinaryModule");E.isBinaryModule=G;var ie=isTypeOf("QuoteModule");E.isQuoteModule=ie;var ae=isTypeOf("SectionMetadata");E.isSectionMetadata=ae;var ce=isTypeOf("ProducersSectionMetadata");E.isProducersSectionMetadata=ce;var le=isTypeOf("ProducerMetadata");E.isProducerMetadata=le;var me=isTypeOf("ProducerMetadataVersionedName");E.isProducerMetadataVersionedName=me;var _e=isTypeOf("LoopInstruction");E.isLoopInstruction=_e;var Ie=isTypeOf("Instr");E.isInstr=Ie;var Me=isTypeOf("IfInstruction");E.isIfInstruction=Me;var Oe=isTypeOf("StringLiteral");E.isStringLiteral=Oe;var Te=isTypeOf("NumberLiteral");E.isNumberLiteral=Te;var Ne=isTypeOf("LongNumberLiteral");E.isLongNumberLiteral=Ne;var Be=isTypeOf("FloatLiteral");E.isFloatLiteral=Be;var Le=isTypeOf("Elem");E.isElem=Le;var qe=isTypeOf("IndexInFuncSection");E.isIndexInFuncSection=qe;var Ue=isTypeOf("ValtypeLiteral");E.isValtypeLiteral=Ue;var Ge=isTypeOf("TypeInstruction");E.isTypeInstruction=Ge;var He=isTypeOf("Start");E.isStart=He;var We=isTypeOf("GlobalType");E.isGlobalType=We;var Qe=isTypeOf("LeadingComment");E.isLeadingComment=Qe;var Je=isTypeOf("BlockComment");E.isBlockComment=Je;var Ve=isTypeOf("Data");E.isData=Ve;var Ke=isTypeOf("Global");E.isGlobal=Ke;var Xe=isTypeOf("Table");E.isTable=Xe;var Ye=isTypeOf("Memory");E.isMemory=Ye;var Ze=isTypeOf("FuncImportDescr");E.isFuncImportDescr=Ze;var et=isTypeOf("ModuleImport");E.isModuleImport=et;var tt=isTypeOf("ModuleExportDescr");E.isModuleExportDescr=tt;var nt=isTypeOf("ModuleExport");E.isModuleExport=nt;var st=isTypeOf("Limit");E.isLimit=st;var rt=isTypeOf("Signature");E.isSignature=rt;var ot=isTypeOf("Program");E.isProgram=ot;var it=isTypeOf("Identifier");E.isIdentifier=it;var at=isTypeOf("BlockInstruction");E.isBlockInstruction=at;var ct=isTypeOf("CallInstruction");E.isCallInstruction=ct;var lt=isTypeOf("CallIndirectInstruction");E.isCallIndirectInstruction=lt;var ut=isTypeOf("ByteArray");E.isByteArray=ut;var pt=isTypeOf("Func");E.isFunc=pt;var dt=isTypeOf("InternalBrUnless");E.isInternalBrUnless=dt;var ft=isTypeOf("InternalGoto");E.isInternalGoto=ft;var ht=isTypeOf("InternalCallExtern");E.isInternalCallExtern=ht;var mt=isTypeOf("InternalEndAndReturn");E.isInternalEndAndReturn=mt;var gt=function isNode(v){return R(v)||$(v)||j(v)||N(v)||q(v)||G(v)||ie(v)||ae(v)||ce(v)||le(v)||me(v)||_e(v)||Ie(v)||Me(v)||Oe(v)||Te(v)||Ne(v)||Be(v)||Le(v)||qe(v)||Ue(v)||Ge(v)||He(v)||We(v)||Qe(v)||Je(v)||Ve(v)||Ke(v)||Xe(v)||Ye(v)||Ze(v)||et(v)||tt(v)||nt(v)||st(v)||rt(v)||ot(v)||it(v)||at(v)||ct(v)||lt(v)||ut(v)||pt(v)||dt(v)||ft(v)||ht(v)||mt(v)};E.isNode=gt;var yt=function isBlock(v){return _e(v)||at(v)||pt(v)};E.isBlock=yt;var bt=function isInstruction(v){return _e(v)||Ie(v)||Me(v)||Ge(v)||at(v)||ct(v)||lt(v)};E.isInstruction=bt;var xt=function isExpression(v){return Ie(v)||Oe(v)||Te(v)||Ne(v)||Be(v)||Ue(v)||it(v)};E.isExpression=xt;var kt=function isNumericLiteral(v){return Te(v)||Ne(v)||Be(v)};E.isNumericLiteral=kt;var vt=function isImportDescr(v){return We(v)||Xe(v)||Ye(v)||Ze(v)};E.isImportDescr=vt;var wt=function isIntrinsic(v){return dt(v)||ft(v)||ht(v)||mt(v)};E.isIntrinsic=wt;var Ct=assertTypeOf("Module");E.assertModule=Ct;var At=assertTypeOf("ModuleMetadata");E.assertModuleMetadata=At;var Et=assertTypeOf("ModuleNameMetadata");E.assertModuleNameMetadata=Et;var _t=assertTypeOf("FunctionNameMetadata");E.assertFunctionNameMetadata=_t;var St=assertTypeOf("LocalNameMetadata");E.assertLocalNameMetadata=St;var It=assertTypeOf("BinaryModule");E.assertBinaryModule=It;var Mt=assertTypeOf("QuoteModule");E.assertQuoteModule=Mt;var Pt=assertTypeOf("SectionMetadata");E.assertSectionMetadata=Pt;var Dt=assertTypeOf("ProducersSectionMetadata");E.assertProducersSectionMetadata=Dt;var Ot=assertTypeOf("ProducerMetadata");E.assertProducerMetadata=Ot;var Rt=assertTypeOf("ProducerMetadataVersionedName");E.assertProducerMetadataVersionedName=Rt;var $t=assertTypeOf("LoopInstruction");E.assertLoopInstruction=$t;var Tt=assertTypeOf("Instr");E.assertInstr=Tt;var Ft=assertTypeOf("IfInstruction");E.assertIfInstruction=Ft;var jt=assertTypeOf("StringLiteral");E.assertStringLiteral=jt;var Nt=assertTypeOf("NumberLiteral");E.assertNumberLiteral=Nt;var Bt=assertTypeOf("LongNumberLiteral");E.assertLongNumberLiteral=Bt;var Lt=assertTypeOf("FloatLiteral");E.assertFloatLiteral=Lt;var qt=assertTypeOf("Elem");E.assertElem=qt;var zt=assertTypeOf("IndexInFuncSection");E.assertIndexInFuncSection=zt;var Ut=assertTypeOf("ValtypeLiteral");E.assertValtypeLiteral=Ut;var Gt=assertTypeOf("TypeInstruction");E.assertTypeInstruction=Gt;var Ht=assertTypeOf("Start");E.assertStart=Ht;var Wt=assertTypeOf("GlobalType");E.assertGlobalType=Wt;var Qt=assertTypeOf("LeadingComment");E.assertLeadingComment=Qt;var Jt=assertTypeOf("BlockComment");E.assertBlockComment=Jt;var Vt=assertTypeOf("Data");E.assertData=Vt;var Kt=assertTypeOf("Global");E.assertGlobal=Kt;var Xt=assertTypeOf("Table");E.assertTable=Xt;var Yt=assertTypeOf("Memory");E.assertMemory=Yt;var Zt=assertTypeOf("FuncImportDescr");E.assertFuncImportDescr=Zt;var en=assertTypeOf("ModuleImport");E.assertModuleImport=en;var tn=assertTypeOf("ModuleExportDescr");E.assertModuleExportDescr=tn;var nn=assertTypeOf("ModuleExport");E.assertModuleExport=nn;var sn=assertTypeOf("Limit");E.assertLimit=sn;var rn=assertTypeOf("Signature");E.assertSignature=rn;var on=assertTypeOf("Program");E.assertProgram=on;var an=assertTypeOf("Identifier");E.assertIdentifier=an;var cn=assertTypeOf("BlockInstruction");E.assertBlockInstruction=cn;var ln=assertTypeOf("CallInstruction");E.assertCallInstruction=ln;var un=assertTypeOf("CallIndirectInstruction");E.assertCallIndirectInstruction=un;var pn=assertTypeOf("ByteArray");E.assertByteArray=pn;var dn=assertTypeOf("Func");E.assertFunc=dn;var hn=assertTypeOf("InternalBrUnless");E.assertInternalBrUnless=hn;var mn=assertTypeOf("InternalGoto");E.assertInternalGoto=mn;var gn=assertTypeOf("InternalCallExtern");E.assertInternalCallExtern=gn;var yn=assertTypeOf("InternalEndAndReturn");E.assertInternalEndAndReturn=yn;var bn={Module:["Node"],ModuleMetadata:["Node"],ModuleNameMetadata:["Node"],FunctionNameMetadata:["Node"],LocalNameMetadata:["Node"],BinaryModule:["Node"],QuoteModule:["Node"],SectionMetadata:["Node"],ProducersSectionMetadata:["Node"],ProducerMetadata:["Node"],ProducerMetadataVersionedName:["Node"],LoopInstruction:["Node","Block","Instruction"],Instr:["Node","Expression","Instruction"],IfInstruction:["Node","Instruction"],StringLiteral:["Node","Expression"],NumberLiteral:["Node","NumericLiteral","Expression"],LongNumberLiteral:["Node","NumericLiteral","Expression"],FloatLiteral:["Node","NumericLiteral","Expression"],Elem:["Node"],IndexInFuncSection:["Node"],ValtypeLiteral:["Node","Expression"],TypeInstruction:["Node","Instruction"],Start:["Node"],GlobalType:["Node","ImportDescr"],LeadingComment:["Node"],BlockComment:["Node"],Data:["Node"],Global:["Node"],Table:["Node","ImportDescr"],Memory:["Node","ImportDescr"],FuncImportDescr:["Node","ImportDescr"],ModuleImport:["Node"],ModuleExportDescr:["Node"],ModuleExport:["Node"],Limit:["Node"],Signature:["Node"],Program:["Node"],Identifier:["Node","Expression"],BlockInstruction:["Node","Block","Instruction"],CallInstruction:["Node","Instruction"],CallIndirectInstruction:["Node","Instruction"],ByteArray:["Node"],Func:["Node","Block"],InternalBrUnless:["Node","Intrinsic"],InternalGoto:["Node","Intrinsic"],InternalCallExtern:["Node","Intrinsic"],InternalEndAndReturn:["Node","Intrinsic"]};E.unionTypesMap=bn;var xn=["Module","ModuleMetadata","ModuleNameMetadata","FunctionNameMetadata","LocalNameMetadata","BinaryModule","QuoteModule","SectionMetadata","ProducersSectionMetadata","ProducerMetadata","ProducerMetadataVersionedName","LoopInstruction","Instr","IfInstruction","StringLiteral","NumberLiteral","LongNumberLiteral","FloatLiteral","Elem","IndexInFuncSection","ValtypeLiteral","TypeInstruction","Start","GlobalType","LeadingComment","BlockComment","Data","Global","Table","Memory","FuncImportDescr","ModuleImport","ModuleExportDescr","ModuleExport","Limit","Signature","Program","Identifier","BlockInstruction","CallInstruction","CallIndirectInstruction","ByteArray","Func","InternalBrUnless","InternalGoto","InternalCallExtern","InternalEndAndReturn","Node","Block","Instruction","Expression","NumericLiteral","ImportDescr","Intrinsic"];E.nodeAndUnionTypes=xn},63427:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.signatures=void 0;function sign(v,E){return[v,E]}var R="u32";var $="i32";var j="i64";var N="f32";var q="f64";var G=function vector(v){var E=[v];E.vector=true;return E};var ie={unreachable:sign([],[]),nop:sign([],[]),br:sign([R],[]),br_if:sign([R],[]),br_table:sign(G(R),[]),return:sign([],[]),call:sign([R],[]),call_indirect:sign([R],[])};var ae={drop:sign([],[]),select:sign([],[])};var ce={get_local:sign([R],[]),set_local:sign([R],[]),tee_local:sign([R],[]),get_global:sign([R],[]),set_global:sign([R],[])};var le={"i32.load":sign([R,R],[$]),"i64.load":sign([R,R],[]),"f32.load":sign([R,R],[]),"f64.load":sign([R,R],[]),"i32.load8_s":sign([R,R],[$]),"i32.load8_u":sign([R,R],[$]),"i32.load16_s":sign([R,R],[$]),"i32.load16_u":sign([R,R],[$]),"i64.load8_s":sign([R,R],[j]),"i64.load8_u":sign([R,R],[j]),"i64.load16_s":sign([R,R],[j]),"i64.load16_u":sign([R,R],[j]),"i64.load32_s":sign([R,R],[j]),"i64.load32_u":sign([R,R],[j]),"i32.store":sign([R,R],[]),"i64.store":sign([R,R],[]),"f32.store":sign([R,R],[]),"f64.store":sign([R,R],[]),"i32.store8":sign([R,R],[]),"i32.store16":sign([R,R],[]),"i64.store8":sign([R,R],[]),"i64.store16":sign([R,R],[]),"i64.store32":sign([R,R],[]),current_memory:sign([],[]),grow_memory:sign([],[])};var me={"i32.const":sign([$],[$]),"i64.const":sign([j],[j]),"f32.const":sign([N],[N]),"f64.const":sign([q],[q]),"i32.eqz":sign([$],[$]),"i32.eq":sign([$,$],[$]),"i32.ne":sign([$,$],[$]),"i32.lt_s":sign([$,$],[$]),"i32.lt_u":sign([$,$],[$]),"i32.gt_s":sign([$,$],[$]),"i32.gt_u":sign([$,$],[$]),"i32.le_s":sign([$,$],[$]),"i32.le_u":sign([$,$],[$]),"i32.ge_s":sign([$,$],[$]),"i32.ge_u":sign([$,$],[$]),"i64.eqz":sign([j],[j]),"i64.eq":sign([j,j],[$]),"i64.ne":sign([j,j],[$]),"i64.lt_s":sign([j,j],[$]),"i64.lt_u":sign([j,j],[$]),"i64.gt_s":sign([j,j],[$]),"i64.gt_u":sign([j,j],[$]),"i64.le_s":sign([j,j],[$]),"i64.le_u":sign([j,j],[$]),"i64.ge_s":sign([j,j],[$]),"i64.ge_u":sign([j,j],[$]),"f32.eq":sign([N,N],[$]),"f32.ne":sign([N,N],[$]),"f32.lt":sign([N,N],[$]),"f32.gt":sign([N,N],[$]),"f32.le":sign([N,N],[$]),"f32.ge":sign([N,N],[$]),"f64.eq":sign([q,q],[$]),"f64.ne":sign([q,q],[$]),"f64.lt":sign([q,q],[$]),"f64.gt":sign([q,q],[$]),"f64.le":sign([q,q],[$]),"f64.ge":sign([q,q],[$]),"i32.clz":sign([$],[$]),"i32.ctz":sign([$],[$]),"i32.popcnt":sign([$],[$]),"i32.add":sign([$,$],[$]),"i32.sub":sign([$,$],[$]),"i32.mul":sign([$,$],[$]),"i32.div_s":sign([$,$],[$]),"i32.div_u":sign([$,$],[$]),"i32.rem_s":sign([$,$],[$]),"i32.rem_u":sign([$,$],[$]),"i32.and":sign([$,$],[$]),"i32.or":sign([$,$],[$]),"i32.xor":sign([$,$],[$]),"i32.shl":sign([$,$],[$]),"i32.shr_s":sign([$,$],[$]),"i32.shr_u":sign([$,$],[$]),"i32.rotl":sign([$,$],[$]),"i32.rotr":sign([$,$],[$]),"i64.clz":sign([j],[j]),"i64.ctz":sign([j],[j]),"i64.popcnt":sign([j],[j]),"i64.add":sign([j,j],[j]),"i64.sub":sign([j,j],[j]),"i64.mul":sign([j,j],[j]),"i64.div_s":sign([j,j],[j]),"i64.div_u":sign([j,j],[j]),"i64.rem_s":sign([j,j],[j]),"i64.rem_u":sign([j,j],[j]),"i64.and":sign([j,j],[j]),"i64.or":sign([j,j],[j]),"i64.xor":sign([j,j],[j]),"i64.shl":sign([j,j],[j]),"i64.shr_s":sign([j,j],[j]),"i64.shr_u":sign([j,j],[j]),"i64.rotl":sign([j,j],[j]),"i64.rotr":sign([j,j],[j]),"f32.abs":sign([N],[N]),"f32.neg":sign([N],[N]),"f32.ceil":sign([N],[N]),"f32.floor":sign([N],[N]),"f32.trunc":sign([N],[N]),"f32.nearest":sign([N],[N]),"f32.sqrt":sign([N],[N]),"f32.add":sign([N,N],[N]),"f32.sub":sign([N,N],[N]),"f32.mul":sign([N,N],[N]),"f32.div":sign([N,N],[N]),"f32.min":sign([N,N],[N]),"f32.max":sign([N,N],[N]),"f32.copysign":sign([N,N],[N]),"f64.abs":sign([q],[q]),"f64.neg":sign([q],[q]),"f64.ceil":sign([q],[q]),"f64.floor":sign([q],[q]),"f64.trunc":sign([q],[q]),"f64.nearest":sign([q],[q]),"f64.sqrt":sign([q],[q]),"f64.add":sign([q,q],[q]),"f64.sub":sign([q,q],[q]),"f64.mul":sign([q,q],[q]),"f64.div":sign([q,q],[q]),"f64.min":sign([q,q],[q]),"f64.max":sign([q,q],[q]),"f64.copysign":sign([q,q],[q]),"i32.wrap/i64":sign([j],[$]),"i32.trunc_s/f32":sign([N],[$]),"i32.trunc_u/f32":sign([N],[$]),"i32.trunc_s/f64":sign([N],[$]),"i32.trunc_u/f64":sign([q],[$]),"i64.extend_s/i32":sign([$],[j]),"i64.extend_u/i32":sign([$],[j]),"i64.trunc_s/f32":sign([N],[j]),"i64.trunc_u/f32":sign([N],[j]),"i64.trunc_s/f64":sign([q],[j]),"i64.trunc_u/f64":sign([q],[j]),"f32.convert_s/i32":sign([$],[N]),"f32.convert_u/i32":sign([$],[N]),"f32.convert_s/i64":sign([j],[N]),"f32.convert_u/i64":sign([j],[N]),"f32.demote/f64":sign([q],[N]),"f64.convert_s/i32":sign([$],[q]),"f64.convert_u/i32":sign([$],[q]),"f64.convert_s/i64":sign([j],[q]),"f64.convert_u/i64":sign([j],[q]),"f64.promote/f32":sign([N],[q]),"i32.reinterpret/f32":sign([N],[$]),"i64.reinterpret/f64":sign([q],[j]),"f32.reinterpret/i32":sign([$],[N]),"f64.reinterpret/i64":sign([j],[q])};var _e=Object.assign({},ie,ae,ce,le,me);E.signatures=_e},19741:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.moduleContextFromModuleAST=moduleContextFromModuleAST;E.ModuleContext=void 0;var $=R(23033);function _classCallCheck(v,E){if(!(v instanceof E)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(v,E){for(var R=0;Rv&&v>=0}},{key:"getLabel",value:function getLabel(v){return this.labels[v]}},{key:"popLabel",value:function popLabel(){this.labels.shift()}},{key:"hasLocal",value:function hasLocal(v){return typeof this.getLocal(v)!=="undefined"}},{key:"getLocal",value:function getLocal(v){return this.locals[v]}},{key:"addLocal",value:function addLocal(v){this.locals.push(v)}},{key:"addType",value:function addType(v){if(!(v.functype.type==="Signature")){throw new Error('type.functype.type === "Signature"'+" error: "+(undefined||"unknown"))}this.types.push(v.functype)}},{key:"hasType",value:function hasType(v){return this.types[v]!==undefined}},{key:"getType",value:function getType(v){return this.types[v]}},{key:"hasGlobal",value:function hasGlobal(v){return this.globals.length>v&&v>=0}},{key:"getGlobal",value:function getGlobal(v){return this.globals[v].type}},{key:"getGlobalOffsetByIdentifier",value:function getGlobalOffsetByIdentifier(v){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+(undefined||"unknown"))}return this.globalsOffsetByIdentifier[v]}},{key:"defineGlobal",value:function defineGlobal(v){var E=v.globalType.valtype;var R=v.globalType.mutability;this.globals.push({type:E,mutability:R});if(typeof v.name!=="undefined"){this.globalsOffsetByIdentifier[v.name.value]=this.globals.length-1}}},{key:"importGlobal",value:function importGlobal(v,E){this.globals.push({type:v,mutability:E})}},{key:"isMutableGlobal",value:function isMutableGlobal(v){return this.globals[v].mutability==="var"}},{key:"isImmutableGlobal",value:function isImmutableGlobal(v){return this.globals[v].mutability==="const"}},{key:"hasMemory",value:function hasMemory(v){return this.mems.length>v&&v>=0}},{key:"addMemory",value:function addMemory(v,E){this.mems.push({min:v,max:E})}},{key:"getMemory",value:function getMemory(v){return this.mems[v]}}]);return ModuleContext}();E.ModuleContext=j},31109:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.traverse=traverse;var $=R(33301);var j=R(23033);function walk(v,E){var R=false;function innerWalk(v,E){if(R){return}var j=v.node;if(j===undefined){console.warn("traversing with an empty context");return}if(j._deleted===true){return}var N=(0,$.createPath)(v);E(j.type,N);if(N.shouldStop){R=true;return}Object.keys(j).forEach((function(v){var R=j[v];if(R===null||R===undefined){return}var $=Array.isArray(R)?R:[R];$.forEach((function($){if(typeof $.type==="string"){var j={node:$,parentKey:v,parentPath:N,shouldStop:false,inList:Array.isArray(R)};innerWalk(j,E)}}))}))}innerWalk(v,E)}var N=function noop(){};function traverse(v,E){var R=arguments.length>2&&arguments[2]!==undefined?arguments[2]:N;var $=arguments.length>3&&arguments[3]!==undefined?arguments[3]:N;Object.keys(E).forEach((function(v){if(!j.nodeAndUnionTypes.includes(v)){throw new Error("Unexpected visitor ".concat(v))}}));var q={node:v,inList:false,shouldStop:false,parentPath:null,parentKey:null};walk(q,(function(v,N){if(typeof E[v]==="function"){R(v,N);E[v](N);$(v,N)}var q=j.unionTypesMap[v];if(!q){throw new Error("Unexpected node type ".concat(v))}q.forEach((function(v){if(typeof E[v]==="function"){R(v,N);E[v](N);$(v,N)}}))}))}},32727:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.isAnonymous=isAnonymous;E.getSectionMetadata=getSectionMetadata;E.getSectionMetadatas=getSectionMetadatas;E.sortSectionMetadata=sortSectionMetadata;E.orderedInsertNode=orderedInsertNode;E.assertHasLoc=assertHasLoc;E.getEndOfSection=getEndOfSection;E.shiftLoc=shiftLoc;E.shiftSection=shiftSection;E.signatureForOpcode=signatureForOpcode;E.getUniqueNameGenerator=getUniqueNameGenerator;E.getStartByteOffset=getStartByteOffset;E.getEndByteOffset=getEndByteOffset;E.getFunctionBeginingByteOffset=getFunctionBeginingByteOffset;E.getEndBlockByteOffset=getEndBlockByteOffset;E.getStartBlockByteOffset=getStartBlockByteOffset;var $=R(63427);var j=R(31109);var N=_interopRequireWildcard(R(67658));function _interopRequireWildcard(v){if(v&&v.__esModule){return v}else{var E={};if(v!=null){for(var R in v){if(Object.prototype.hasOwnProperty.call(v,R)){var $=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,R):{};if($.get||$.set){Object.defineProperty(E,R,$)}else{E[R]=v[R]}}}}E.default=v;return E}}function _sliceIterator(v,E){var R=[];var $=true;var j=false;var N=undefined;try{for(var q=v[Symbol.iterator](),G;!($=(G=q.next()).done);$=true){R.push(G.value);if(E&&R.length===E)break}}catch(v){j=true;N=v}finally{try{if(!$&&q["return"]!=null)q["return"]()}finally{if(j)throw N}}return R}function _slicedToArray(v,E){if(Array.isArray(v)){return v}else if(Symbol.iterator in Object(v)){return _sliceIterator(v,E)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}function _typeof(v){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function isAnonymous(v){return v.raw===""}function getSectionMetadata(v,E){var R;(0,j.traverse)(v,{SectionMetadata:function(v){function SectionMetadata(E){return v.apply(this,arguments)}SectionMetadata.toString=function(){return v.toString()};return SectionMetadata}((function(v){var $=v.node;if($.section===E){R=$}}))});return R}function getSectionMetadatas(v,E){var R=[];(0,j.traverse)(v,{SectionMetadata:function(v){function SectionMetadata(E){return v.apply(this,arguments)}SectionMetadata.toString=function(){return v.toString()};return SectionMetadata}((function(v){var $=v.node;if($.section===E){R.push($)}}))});return R}function sortSectionMetadata(v){if(v.metadata==null){console.warn("sortSectionMetadata: no metadata to sort");return}v.metadata.sections.sort((function(v,E){var R=N.default.sections[v.section];var $=N.default.sections[E.section];if(typeof R!=="number"||typeof $!=="number"){throw new Error("Section id not found")}return R-$}))}function orderedInsertNode(v,E){assertHasLoc(E);var R=false;if(E.type==="ModuleExport"){v.fields.push(E);return}v.fields=v.fields.reduce((function(v,$){var j=Infinity;if($.loc!=null){j=$.loc.end.column}if(R===false&&E.loc.start.column0&&arguments[0]!==undefined?arguments[0]:"temp";if(!(E in v)){v[E]=0}else{v[E]=v[E]+1}return E+"_"+v[E]}}function getStartByteOffset(v){if(typeof v.loc==="undefined"||typeof v.loc.start==="undefined"){throw new Error("Can not get byte offset without loc informations, node: "+String(v.id))}return v.loc.start.column}function getEndByteOffset(v){if(typeof v.loc==="undefined"||typeof v.loc.end==="undefined"){throw new Error("Can not get byte offset without loc informations, node: "+v.type)}return v.loc.end.column}function getFunctionBeginingByteOffset(v){if(!(v.body.length>0)){throw new Error("n.body.length > 0"+" error: "+(undefined||"unknown"))}var E=_slicedToArray(v.body,1),R=E[0];return getStartByteOffset(R)}function getEndBlockByteOffset(v){if(!(v.instr.length>0||v.body.length>0)){throw new Error("n.instr.length > 0 || n.body.length > 0"+" error: "+(undefined||"unknown"))}var E;if(v.instr){E=v.instr[v.instr.length-1]}if(v.body){E=v.body[v.body.length-1]}if(!(_typeof(E)==="object")){throw new Error('typeof lastInstruction === "object"'+" error: "+(undefined||"unknown"))}return getStartByteOffset(E)}function getStartBlockByteOffset(v){if(!(v.instr.length>0||v.body.length>0)){throw new Error("n.instr.length > 0 || n.body.length > 0"+" error: "+(undefined||"unknown"))}var E;if(v.instr){var R=_slicedToArray(v.instr,1);E=R[0]}if(v.body){var $=_slicedToArray(v.body,1);E=$[0]}if(!(_typeof(E)==="object")){throw new Error('typeof fistInstruction === "object"'+" error: "+(undefined||"unknown"))}return getStartByteOffset(E)}},92495:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E["default"]=parse;function parse(v){v=v.toUpperCase();var E=v.indexOf("P");var R,$;if(E!==-1){R=v.substring(0,E);$=parseInt(v.substring(E+1))}else{R=v;$=0}var j=R.indexOf(".");if(j!==-1){var N=parseInt(R.substring(0,j),16);var q=Math.sign(N);N=q*N;var G=R.length-j-1;var ie=parseInt(R.substring(j+1),16);var ae=G>0?ie/Math.pow(16,G):0;if(q===0){if(ae===0){R=q}else{if(Object.is(q,-0)){R=-ae}else{R=ae}}}else{R=q*(N+ae)}}else{R=parseInt(R,16)}return R*(E!==-1?Math.pow(2,$):1)}},73261:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.LinkError=E.CompileError=E.RuntimeError=void 0;function _typeof(v){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function _classCallCheck(v,E){if(!(v instanceof E)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(v,E){if(E&&(_typeof(E)==="object"||typeof E==="function")){return E}if(!v){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return v}function _inherits(v,E){if(typeof E!=="function"&&E!==null){throw new TypeError("Super expression must either be null or a function")}v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,enumerable:false,writable:true,configurable:true}});if(E)Object.setPrototypeOf?Object.setPrototypeOf(v,E):v.__proto__=E}var R=function(v){_inherits(RuntimeError,v);function RuntimeError(){_classCallCheck(this,RuntimeError);return _possibleConstructorReturn(this,(RuntimeError.__proto__||Object.getPrototypeOf(RuntimeError)).apply(this,arguments))}return RuntimeError}(Error);E.RuntimeError=R;var $=function(v){_inherits(CompileError,v);function CompileError(){_classCallCheck(this,CompileError);return _possibleConstructorReturn(this,(CompileError.__proto__||Object.getPrototypeOf(CompileError)).apply(this,arguments))}return CompileError}(Error);E.CompileError=$;var j=function(v){_inherits(LinkError,v);function LinkError(){_classCallCheck(this,LinkError);return _possibleConstructorReturn(this,(LinkError.__proto__||Object.getPrototypeOf(LinkError)).apply(this,arguments))}return LinkError}(Error);E.LinkError=j},623:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.overrideBytesInBuffer=overrideBytesInBuffer;E.makeBuffer=makeBuffer;E.fromHexdump=fromHexdump;function _toConsumableArray(v){if(Array.isArray(v)){for(var E=0,R=new Array(v.length);E1&&arguments[1]!==undefined?arguments[1]:function(v){return v};var R={};var $=Object.keys(v);for(var j=0,N=$.length;j2&&arguments[2]!==undefined?arguments[2]:0;return{name:v,object:E,numberOfArgs:R}}function createSymbol(v){var E=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;return{name:v,numberOfArgs:E}}var G={func:96,result:64};var ie={0:"Func",1:"Table",2:"Mem",3:"Global"};var ae=invertMap(ie);var ce={127:"i32",126:"i64",125:"f32",124:"f64",123:"v128"};var le=invertMap(ce);var me={112:"anyfunc"};var _e=Object.assign({},ce,{64:null,127:"i32",126:"i64",125:"f32",124:"f64"});var Ie={0:"const",1:"var"};var Me=invertMap(Ie);var Oe={0:"func",1:"table",2:"mem",3:"global"};var Te={custom:0,type:1,import:2,func:3,table:4,memory:5,global:6,export:7,start:8,element:9,code:10,data:11};var Ne={0:createSymbol("unreachable"),1:createSymbol("nop"),2:createSymbol("block"),3:createSymbol("loop"),4:createSymbol("if"),5:createSymbol("else"),6:j,7:j,8:j,9:j,10:j,11:createSymbol("end"),12:createSymbol("br",1),13:createSymbol("br_if",1),14:createSymbol("br_table"),15:createSymbol("return"),16:createSymbol("call",1),17:createSymbol("call_indirect",2),18:j,19:j,20:j,21:j,22:j,23:j,24:j,25:j,26:createSymbol("drop"),27:createSymbol("select"),28:j,29:j,30:j,31:j,32:createSymbol("get_local",1),33:createSymbol("set_local",1),34:createSymbol("tee_local",1),35:createSymbol("get_global",1),36:createSymbol("set_global",1),37:j,38:j,39:j,40:createSymbolObject("load","u32",1),41:createSymbolObject("load","u64",1),42:createSymbolObject("load","f32",1),43:createSymbolObject("load","f64",1),44:createSymbolObject("load8_s","u32",1),45:createSymbolObject("load8_u","u32",1),46:createSymbolObject("load16_s","u32",1),47:createSymbolObject("load16_u","u32",1),48:createSymbolObject("load8_s","u64",1),49:createSymbolObject("load8_u","u64",1),50:createSymbolObject("load16_s","u64",1),51:createSymbolObject("load16_u","u64",1),52:createSymbolObject("load32_s","u64",1),53:createSymbolObject("load32_u","u64",1),54:createSymbolObject("store","u32",1),55:createSymbolObject("store","u64",1),56:createSymbolObject("store","f32",1),57:createSymbolObject("store","f64",1),58:createSymbolObject("store8","u32",1),59:createSymbolObject("store16","u32",1),60:createSymbolObject("store8","u64",1),61:createSymbolObject("store16","u64",1),62:createSymbolObject("store32","u64",1),63:createSymbolObject("current_memory"),64:createSymbolObject("grow_memory"),65:createSymbolObject("const","i32",1),66:createSymbolObject("const","i64",1),67:createSymbolObject("const","f32",1),68:createSymbolObject("const","f64",1),69:createSymbolObject("eqz","i32"),70:createSymbolObject("eq","i32"),71:createSymbolObject("ne","i32"),72:createSymbolObject("lt_s","i32"),73:createSymbolObject("lt_u","i32"),74:createSymbolObject("gt_s","i32"),75:createSymbolObject("gt_u","i32"),76:createSymbolObject("le_s","i32"),77:createSymbolObject("le_u","i32"),78:createSymbolObject("ge_s","i32"),79:createSymbolObject("ge_u","i32"),80:createSymbolObject("eqz","i64"),81:createSymbolObject("eq","i64"),82:createSymbolObject("ne","i64"),83:createSymbolObject("lt_s","i64"),84:createSymbolObject("lt_u","i64"),85:createSymbolObject("gt_s","i64"),86:createSymbolObject("gt_u","i64"),87:createSymbolObject("le_s","i64"),88:createSymbolObject("le_u","i64"),89:createSymbolObject("ge_s","i64"),90:createSymbolObject("ge_u","i64"),91:createSymbolObject("eq","f32"),92:createSymbolObject("ne","f32"),93:createSymbolObject("lt","f32"),94:createSymbolObject("gt","f32"),95:createSymbolObject("le","f32"),96:createSymbolObject("ge","f32"),97:createSymbolObject("eq","f64"),98:createSymbolObject("ne","f64"),99:createSymbolObject("lt","f64"),100:createSymbolObject("gt","f64"),101:createSymbolObject("le","f64"),102:createSymbolObject("ge","f64"),103:createSymbolObject("clz","i32"),104:createSymbolObject("ctz","i32"),105:createSymbolObject("popcnt","i32"),106:createSymbolObject("add","i32"),107:createSymbolObject("sub","i32"),108:createSymbolObject("mul","i32"),109:createSymbolObject("div_s","i32"),110:createSymbolObject("div_u","i32"),111:createSymbolObject("rem_s","i32"),112:createSymbolObject("rem_u","i32"),113:createSymbolObject("and","i32"),114:createSymbolObject("or","i32"),115:createSymbolObject("xor","i32"),116:createSymbolObject("shl","i32"),117:createSymbolObject("shr_s","i32"),118:createSymbolObject("shr_u","i32"),119:createSymbolObject("rotl","i32"),120:createSymbolObject("rotr","i32"),121:createSymbolObject("clz","i64"),122:createSymbolObject("ctz","i64"),123:createSymbolObject("popcnt","i64"),124:createSymbolObject("add","i64"),125:createSymbolObject("sub","i64"),126:createSymbolObject("mul","i64"),127:createSymbolObject("div_s","i64"),128:createSymbolObject("div_u","i64"),129:createSymbolObject("rem_s","i64"),130:createSymbolObject("rem_u","i64"),131:createSymbolObject("and","i64"),132:createSymbolObject("or","i64"),133:createSymbolObject("xor","i64"),134:createSymbolObject("shl","i64"),135:createSymbolObject("shr_s","i64"),136:createSymbolObject("shr_u","i64"),137:createSymbolObject("rotl","i64"),138:createSymbolObject("rotr","i64"),139:createSymbolObject("abs","f32"),140:createSymbolObject("neg","f32"),141:createSymbolObject("ceil","f32"),142:createSymbolObject("floor","f32"),143:createSymbolObject("trunc","f32"),144:createSymbolObject("nearest","f32"),145:createSymbolObject("sqrt","f32"),146:createSymbolObject("add","f32"),147:createSymbolObject("sub","f32"),148:createSymbolObject("mul","f32"),149:createSymbolObject("div","f32"),150:createSymbolObject("min","f32"),151:createSymbolObject("max","f32"),152:createSymbolObject("copysign","f32"),153:createSymbolObject("abs","f64"),154:createSymbolObject("neg","f64"),155:createSymbolObject("ceil","f64"),156:createSymbolObject("floor","f64"),157:createSymbolObject("trunc","f64"),158:createSymbolObject("nearest","f64"),159:createSymbolObject("sqrt","f64"),160:createSymbolObject("add","f64"),161:createSymbolObject("sub","f64"),162:createSymbolObject("mul","f64"),163:createSymbolObject("div","f64"),164:createSymbolObject("min","f64"),165:createSymbolObject("max","f64"),166:createSymbolObject("copysign","f64"),167:createSymbolObject("wrap/i64","i32"),168:createSymbolObject("trunc_s/f32","i32"),169:createSymbolObject("trunc_u/f32","i32"),170:createSymbolObject("trunc_s/f64","i32"),171:createSymbolObject("trunc_u/f64","i32"),172:createSymbolObject("extend_s/i32","i64"),173:createSymbolObject("extend_u/i32","i64"),174:createSymbolObject("trunc_s/f32","i64"),175:createSymbolObject("trunc_u/f32","i64"),176:createSymbolObject("trunc_s/f64","i64"),177:createSymbolObject("trunc_u/f64","i64"),178:createSymbolObject("convert_s/i32","f32"),179:createSymbolObject("convert_u/i32","f32"),180:createSymbolObject("convert_s/i64","f32"),181:createSymbolObject("convert_u/i64","f32"),182:createSymbolObject("demote/f64","f32"),183:createSymbolObject("convert_s/i32","f64"),184:createSymbolObject("convert_u/i32","f64"),185:createSymbolObject("convert_s/i64","f64"),186:createSymbolObject("convert_u/i64","f64"),187:createSymbolObject("promote/f32","f64"),188:createSymbolObject("reinterpret/f32","i32"),189:createSymbolObject("reinterpret/f64","i64"),190:createSymbolObject("reinterpret/i32","f32"),191:createSymbolObject("reinterpret/i64","f64"),65024:createSymbol("memory.atomic.notify",1),65025:createSymbol("memory.atomic.wait32",1),65026:createSymbol("memory.atomic.wait64",1),65040:createSymbolObject("atomic.load","i32",1),65041:createSymbolObject("atomic.load","i64",1),65042:createSymbolObject("atomic.load8_u","i32",1),65043:createSymbolObject("atomic.load16_u","i32",1),65044:createSymbolObject("atomic.load8_u","i64",1),65045:createSymbolObject("atomic.load16_u","i64",1),65046:createSymbolObject("atomic.load32_u","i64",1),65047:createSymbolObject("atomic.store","i32",1),65048:createSymbolObject("atomic.store","i64",1),65049:createSymbolObject("atomic.store8_u","i32",1),65050:createSymbolObject("atomic.store16_u","i32",1),65051:createSymbolObject("atomic.store8_u","i64",1),65052:createSymbolObject("atomic.store16_u","i64",1),65053:createSymbolObject("atomic.store32_u","i64",1),65054:createSymbolObject("atomic.rmw.add","i32",1),65055:createSymbolObject("atomic.rmw.add","i64",1),65056:createSymbolObject("atomic.rmw8_u.add_u","i32",1),65057:createSymbolObject("atomic.rmw16_u.add_u","i32",1),65058:createSymbolObject("atomic.rmw8_u.add_u","i64",1),65059:createSymbolObject("atomic.rmw16_u.add_u","i64",1),65060:createSymbolObject("atomic.rmw32_u.add_u","i64",1),65061:createSymbolObject("atomic.rmw.sub","i32",1),65062:createSymbolObject("atomic.rmw.sub","i64",1),65063:createSymbolObject("atomic.rmw8_u.sub_u","i32",1),65064:createSymbolObject("atomic.rmw16_u.sub_u","i32",1),65065:createSymbolObject("atomic.rmw8_u.sub_u","i64",1),65066:createSymbolObject("atomic.rmw16_u.sub_u","i64",1),65067:createSymbolObject("atomic.rmw32_u.sub_u","i64",1),65068:createSymbolObject("atomic.rmw.and","i32",1),65069:createSymbolObject("atomic.rmw.and","i64",1),65070:createSymbolObject("atomic.rmw8_u.and_u","i32",1),65071:createSymbolObject("atomic.rmw16_u.and_u","i32",1),65072:createSymbolObject("atomic.rmw8_u.and_u","i64",1),65073:createSymbolObject("atomic.rmw16_u.and_u","i64",1),65074:createSymbolObject("atomic.rmw32_u.and_u","i64",1),65075:createSymbolObject("atomic.rmw.or","i32",1),65076:createSymbolObject("atomic.rmw.or","i64",1),65077:createSymbolObject("atomic.rmw8_u.or_u","i32",1),65078:createSymbolObject("atomic.rmw16_u.or_u","i32",1),65079:createSymbolObject("atomic.rmw8_u.or_u","i64",1),65080:createSymbolObject("atomic.rmw16_u.or_u","i64",1),65081:createSymbolObject("atomic.rmw32_u.or_u","i64",1),65082:createSymbolObject("atomic.rmw.xor","i32",1),65083:createSymbolObject("atomic.rmw.xor","i64",1),65084:createSymbolObject("atomic.rmw8_u.xor_u","i32",1),65085:createSymbolObject("atomic.rmw16_u.xor_u","i32",1),65086:createSymbolObject("atomic.rmw8_u.xor_u","i64",1),65087:createSymbolObject("atomic.rmw16_u.xor_u","i64",1),65088:createSymbolObject("atomic.rmw32_u.xor_u","i64",1),65089:createSymbolObject("atomic.rmw.xchg","i32",1),65090:createSymbolObject("atomic.rmw.xchg","i64",1),65091:createSymbolObject("atomic.rmw8_u.xchg_u","i32",1),65092:createSymbolObject("atomic.rmw16_u.xchg_u","i32",1),65093:createSymbolObject("atomic.rmw8_u.xchg_u","i64",1),65094:createSymbolObject("atomic.rmw16_u.xchg_u","i64",1),65095:createSymbolObject("atomic.rmw32_u.xchg_u","i64",1),65096:createSymbolObject("atomic.rmw.cmpxchg","i32",1),65097:createSymbolObject("atomic.rmw.cmpxchg","i64",1),65098:createSymbolObject("atomic.rmw8_u.cmpxchg_u","i32",1),65099:createSymbolObject("atomic.rmw16_u.cmpxchg_u","i32",1),65100:createSymbolObject("atomic.rmw8_u.cmpxchg_u","i64",1),65101:createSymbolObject("atomic.rmw16_u.cmpxchg_u","i64",1),65102:createSymbolObject("atomic.rmw32_u.cmpxchg_u","i64",1)};var Be=invertMap(Ne,(function(v){if(typeof v.object==="string"){return"".concat(v.object,".").concat(v.name)}return v.name}));var Le={symbolsByByte:Ne,sections:Te,magicModuleHeader:N,moduleVersion:q,types:G,valtypes:ce,exportTypes:ie,blockTypes:_e,tableTypes:me,globalTypes:Ie,importTypes:Oe,valtypesByString:le,globalTypesByString:Me,exportTypesByName:ae,symbolsByName:Be};E["default"]=Le},19280:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.getSectionForNode=getSectionForNode;function getSectionForNode(v){switch(v.type){case"ModuleImport":return"import";case"CallInstruction":case"CallIndirectInstruction":case"Func":case"Instr":return"code";case"ModuleExport":return"export";case"Start":return"start";case"TypeInstruction":return"type";case"IndexInFuncSection":return"func";case"Global":return"global";default:return}}},31016:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.createEmptySection=createEmptySection;var $=R(50908);var j=R(623);var N=_interopRequireDefault(R(67658));var q=_interopRequireWildcard(R(44977));function _interopRequireWildcard(v){if(v&&v.__esModule){return v}else{var E={};if(v!=null){for(var R in v){if(Object.prototype.hasOwnProperty.call(v,R)){var $=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,R):{};if($.get||$.set){Object.defineProperty(E,R,$)}else{E[R]=v[R]}}}}E.default=v;return E}}function _interopRequireDefault(v){return v&&v.__esModule?v:{default:v}}function _typeof(v){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function findLastSection(v,E){var R=N.default.sections[E];var $=v.body[0].metadata.sections;var j;var q=0;for(var G=0,ie=$.length;Gq&&R32){throw new Error("Bad value for bitLength.")}if($===undefined){$=0}else if($!==0&&$!==1){throw new Error("Bad value for defaultBit.")}var j=$*255;var N=0;var q=E+R;var G=Math.floor(E/8);var ie=E%8;var ae=Math.floor(q/8);var ce=q%8;if(ce!==0){N=get(ae)&(1<G){ae--;N=N<<8|get(ae)}N>>>=ie;return N;function get(E){var R=v[E];return R===undefined?j:R}}function inject(v,E,R,$){if(R<0||R>32){throw new Error("Bad value for bitLength.")}var j=Math.floor((E+R-1)/8);if(E<0||j>=v.length){throw new Error("Index out of range.")}var N=Math.floor(E/8);var q=E%8;while(R>0){if($&1){v[N]|=1<>=1;R--;q=(q+1)%8;if(q===0){N++}}}function getSign(v){return v[v.length-1]>>>7}function highOrder(v,E){var R=E.length;var $=(v^1)*255;while(R>0&&E[R-1]===$){R--}if(R===0){return-1}var j=E[R-1];var N=R*8-1;for(var q=7;q>0;q--){if((j>>q&1)===v){break}N--}return N}},50853:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.alloc=alloc;E.free=free;E.resize=resize;E.readInt=readInt;E.readUInt=readUInt;E.writeInt64=writeInt64;E.writeUInt64=writeUInt64;var R=[];var $=20;var j=-0x8000000000000000;var N=0x7ffffffffffffc00;var q=0xfffffffffffff800;var G=4294967296;var ie=0x10000000000000000;function lowestBit(v){return v&-v}function isLossyToAdd(v,E){if(E===0){return false}var R=lowestBit(E);var $=v+R;if($===v){return true}if($-R!==v){return true}return false}function alloc(v){var E=R[v];if(E){R[v]=undefined}else{E=new Buffer(v)}E.fill(0);return E}function free(v){var E=v.length;if(E<$){R[E]=v}}function resize(v,E){if(E===v.length){return v}var R=alloc(E);v.copy(R);free(v);return R}function readInt(v){var E=v.length;var R=v[E-1]<128;var $=R?0:-1;var j=false;if(E<7){for(var N=E-1;N>=0;N--){$=$*256+v[N]}}else{for(var q=E-1;q>=0;q--){var G=v[q];$*=256;if(isLossyToAdd($,G)){j=true}$+=G}}return{value:$,lossy:j}}function readUInt(v){var E=v.length;var R=0;var $=false;if(E<7){for(var j=E-1;j>=0;j--){R=R*256+v[j]}}else{for(var N=E-1;N>=0;N--){var q=v[N];R*=256;if(isLossyToAdd(R,q)){$=true}R+=q}}return{value:R,lossy:$}}function writeInt64(v,E){if(vN){throw new Error("Value out of range.")}if(v<0){v+=ie}writeUInt64(v,E)}function writeUInt64(v,E){if(v<0||v>q){throw new Error("Value out of range.")}var R=v%G;var $=Math.floor(v/G);E.writeUInt32LE(R,0);E.writeUInt32LE($,4)}},21294:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.decodeInt64=decodeInt64;E.decodeUInt64=decodeUInt64;E.decodeInt32=decodeInt32;E.decodeUInt32=decodeUInt32;E.encodeU32=encodeU32;E.encodeI32=encodeI32;E.encodeI64=encodeI64;E.MAX_NUMBER_OF_BYTE_U64=E.MAX_NUMBER_OF_BYTE_U32=void 0;var $=_interopRequireDefault(R(71529));function _interopRequireDefault(v){return v&&v.__esModule?v:{default:v}}var j=5;E.MAX_NUMBER_OF_BYTE_U32=j;var N=10;E.MAX_NUMBER_OF_BYTE_U64=N;function decodeInt64(v,E){return $.default.decodeInt64(v,E)}function decodeUInt64(v,E){return $.default.decodeUInt64(v,E)}function decodeInt32(v,E){return $.default.decodeInt32(v,E)}function decodeUInt32(v,E){return $.default.decodeUInt32(v,E)}function encodeU32(v){return $.default.encodeUInt32(v)}function encodeI32(v){return $.default.encodeInt32(v)}function encodeI64(v){return $.default.encodeInt64(v)}},71529:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E["default"]=void 0;var $=_interopRequireDefault(R(68396));var j=_interopRequireWildcard(R(87294));var N=_interopRequireWildcard(R(50853));function _interopRequireWildcard(v){if(v&&v.__esModule){return v}else{var E={};if(v!=null){for(var R in v){if(Object.prototype.hasOwnProperty.call(v,R)){var $=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,R):{};if($.get||$.set){Object.defineProperty(E,R,$)}else{E[R]=v[R]}}}}E.default=v;return E}}function _interopRequireDefault(v){return v&&v.__esModule?v:{default:v}}var q=-2147483648;var G=2147483647;var ie=4294967295;function signedBitCount(v){return j.highOrder(j.getSign(v)^1,v)+2}function unsignedBitCount(v){var E=j.highOrder(1,v)+1;return E?E:1}function encodeBufferCommon(v,E){var R;var $;if(E){R=j.getSign(v);$=signedBitCount(v)}else{R=0;$=unsignedBitCount(v)}var q=Math.ceil($/7);var G=N.alloc(q);for(var ie=0;ie=128){R++}R++;if(E+R>v.length){}return R}function decodeBufferCommon(v,E,R){E=E===undefined?0:E;var $=encodedLength(v,E);var q=$*7;var G=Math.ceil(q/8);var ie=N.alloc(G);var ae=0;while($>0){j.inject(ie,ae,7,v[E]);ae+=7;E++;$--}var ce;var le;if(R){var me=ie[G-1];var _e=ae%8;if(_e!==0){var Ie=32-_e;me=ie[G-1]=me<>Ie&255}ce=me>>7;le=ce*255}else{ce=0;le=0}while(G>1&&ie[G-1]===le&&(!R||ie[G-2]>>7===ce)){G--}ie=N.resize(ie,G);return{value:ie,nextIndex:E}}function encodeIntBuffer(v){return encodeBufferCommon(v,true)}function decodeIntBuffer(v,E){return decodeBufferCommon(v,E,true)}function encodeInt32(v){var E=N.alloc(4);E.writeInt32LE(v,0);var R=encodeIntBuffer(E);N.free(E);return R}function decodeInt32(v,E){var R=decodeIntBuffer(v,E);var $=N.readInt(R.value);var j=$.value;N.free(R.value);if(jG){throw new Error("integer too large")}return{value:j,nextIndex:R.nextIndex}}function encodeInt64(v){var E=N.alloc(8);N.writeInt64(v,E);var R=encodeIntBuffer(E);N.free(E);return R}function decodeInt64(v,E){var R=decodeIntBuffer(v,E);var j=$.default.fromBytesLE(R.value,false);N.free(R.value);return{value:j,nextIndex:R.nextIndex,lossy:false}}function encodeUIntBuffer(v){return encodeBufferCommon(v,false)}function decodeUIntBuffer(v,E){return decodeBufferCommon(v,E,false)}function encodeUInt32(v){var E=N.alloc(4);E.writeUInt32LE(v,0);var R=encodeUIntBuffer(E);N.free(E);return R}function decodeUInt32(v,E){var R=decodeUIntBuffer(v,E);var $=N.readUInt(R.value);var j=$.value;N.free(R.value);if(j>ie){throw new Error("integer too large")}return{value:j,nextIndex:R.nextIndex}}function encodeUInt64(v){var E=N.alloc(8);N.writeUInt64(v,E);var R=encodeUIntBuffer(E);N.free(E);return R}function decodeUInt64(v,E){var R=decodeUIntBuffer(v,E);var j=$.default.fromBytesLE(R.value,true);N.free(R.value);return{value:j,nextIndex:R.nextIndex,lossy:false}}var ae={decodeInt32:decodeInt32,decodeInt64:decodeInt64,decodeIntBuffer:decodeIntBuffer,decodeUInt32:decodeUInt32,decodeUInt64:decodeUInt64,decodeUIntBuffer:decodeUIntBuffer,encodeInt32:encodeInt32,encodeInt64:encodeInt64,encodeIntBuffer:encodeIntBuffer,encodeUInt32:encodeUInt32,encodeUInt64:encodeUInt64,encodeUIntBuffer:encodeUIntBuffer};E["default"]=ae},17353:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.decode=decode;function _toConsumableArray(v){if(Array.isArray(v)){for(var E=0,R=new Array(v.length);E=65536){throw new Error("invalid UTF-8 encoding")}else{return E}}function decode(v){return _decode(v).map((function(v){return String.fromCharCode(v)})).join("")}function _decode(v){if(v.length===0){return[]}{var E=_toArray(v),R=E[0],$=E.slice(1);if(R<128){return[code(0,R)].concat(_toConsumableArray(_decode($)))}if(R<192){throw new Error("invalid UTF-8 encoding")}}{var j=_toArray(v),N=j[0],q=j[1],G=j.slice(2);if(N<224){return[code(128,((N&31)<<6)+con(q))].concat(_toConsumableArray(_decode(G)))}}{var ie=_toArray(v),ae=ie[0],ce=ie[1],le=ie[2],me=ie.slice(3);if(ae<240){return[code(2048,((ae&15)<<12)+(con(ce)<<6)+con(le))].concat(_toConsumableArray(_decode(me)))}}{var _e=_toArray(v),Ie=_e[0],Me=_e[1],Oe=_e[2],Te=_e[3],Ne=_e.slice(4);if(Ie<248){return[code(65536,(((Ie&7)<<18)+con(Me)<<12)+(con(Oe)<<6)+con(Te))].concat(_toConsumableArray(_decode(Ne)))}}throw new Error("invalid UTF-8 encoding")}},32383:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.encode=encode;function _toConsumableArray(v){if(Array.isArray(v)){for(var E=0,R=new Array(v.length);E>>6,con(R)].concat(_toConsumableArray(_encode($)))}if(R<65536){return[224|R>>>12,con(R>>>6),con(R)].concat(_toConsumableArray(_encode($)))}if(R<1114112){return[240|R>>>18,con(R>>>12),con(R>>>6),con(R)].concat(_toConsumableArray(_encode($)))}throw new Error("utf8")}},59881:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});Object.defineProperty(E,"decode",{enumerable:true,get:function get(){return $.decode}});Object.defineProperty(E,"encode",{enumerable:true,get:function get(){return j.encode}});var $=R(17353);var j=R(32383)},92330:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.applyOperations=applyOperations;var $=R(50908);var j=R(29100);var N=R(44977);var q=R(16111);var G=R(623);var ie=R(67658);function _sliceIterator(v,E){var R=[];var $=true;var j=false;var N=undefined;try{for(var q=v[Symbol.iterator](),G;!($=(G=q.next()).done);$=true){R.push(G.value);if(E&&R.length===E)break}}catch(v){j=true;N=v}finally{try{if(!$&&q["return"]!=null)q["return"]()}finally{if(j)throw N}}return R}function _slicedToArray(v,E){if(Array.isArray(v)){return v}else if(Symbol.iterator in Object(v)){return _sliceIterator(v,E)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}function shiftLocNodeByDelta(v,E){(0,N.assertHasLoc)(v);v.loc.start.column+=E;v.loc.end.column+=E}function applyUpdate(v,E,R){var q=_slicedToArray(R,2),ae=q[0],ce=q[1];var le=0;(0,N.assertHasLoc)(ae);var me=(0,ie.getSectionForNode)(ce);var _e=(0,$.encodeNode)(ce);E=(0,G.overrideBytesInBuffer)(E,ae.loc.start.column,ae.loc.end.column,_e);if(me==="code"){(0,N.traverse)(v,{Func:function Func(v){var R=v.node;var q=R.body.find((function(v){return v===ce}))!==undefined;if(q===true){(0,N.assertHasLoc)(R);var ie=(0,$.encodeNode)(ae).length;var le=_e.length-ie;if(le!==0){var me=R.metadata.bodySize+le;var Ie=(0,j.encodeU32)(me);var Me=R.loc.start.column;var Oe=Me+1;E=(0,G.overrideBytesInBuffer)(E,Me,Oe,Ie)}}}})}var Ie=_e.length-(ae.loc.end.column-ae.loc.start.column);ce.loc={start:{line:-1,column:-1},end:{line:-1,column:-1}};ce.loc.start.column=ae.loc.start.column;ce.loc.end.column=ae.loc.start.column+_e.length;return{uint8Buffer:E,deltaBytes:Ie,deltaElements:le}}function applyDelete(v,E,R){var $=-1;(0,N.assertHasLoc)(R);var j=(0,ie.getSectionForNode)(R);if(j==="start"){var ae=(0,N.getSectionMetadata)(v,"start");E=(0,q.removeSections)(v,E,"start");var ce=-(ae.size.value+1);return{uint8Buffer:E,deltaBytes:ce,deltaElements:$}}var le=[];E=(0,G.overrideBytesInBuffer)(E,R.loc.start.column,R.loc.end.column,le);var me=-(R.loc.end.column-R.loc.start.column);return{uint8Buffer:E,deltaBytes:me,deltaElements:$}}function applyAdd(v,E,R){var j=+1;var ae=(0,ie.getSectionForNode)(R);var ce=(0,N.getSectionMetadata)(v,ae);if(typeof ce==="undefined"){var le=(0,q.createEmptySection)(v,E,ae);E=le.uint8Buffer;ce=le.sectionMetadata}if((0,N.isFunc)(R)){var me=R.body;if(me.length===0||me[me.length-1].id!=="end"){throw new Error("expressions must be ended")}}if((0,N.isGlobal)(R)){var me=R.init;if(me.length===0||me[me.length-1].id!=="end"){throw new Error("expressions must be ended")}}var _e=(0,$.encodeNode)(R);var Ie=(0,N.getEndOfSection)(ce);var Me=Ie;var Oe=_e.length;E=(0,G.overrideBytesInBuffer)(E,Ie,Me,_e);R.loc={start:{line:-1,column:Ie},end:{line:-1,column:Ie+Oe}};if(R.type==="Func"){var Te=_e[0];R.metadata={bodySize:Te}}if(R.type!=="IndexInFuncSection"){(0,N.orderedInsertNode)(v.body[0],R)}return{uint8Buffer:E,deltaBytes:Oe,deltaElements:j}}function applyOperations(v,E,R){R.forEach((function($){var j;var N;switch($.kind){case"update":j=applyUpdate(v,E,[$.oldNode,$.node]);N=(0,ie.getSectionForNode)($.node);break;case"delete":j=applyDelete(v,E,$.node);N=(0,ie.getSectionForNode)($.node);break;case"add":j=applyAdd(v,E,$.node);N=(0,ie.getSectionForNode)($.node);break;default:throw new Error("Unknown operation")}if(j.deltaElements!==0&&N!=="start"){var G=j.uint8Buffer.length;j.uint8Buffer=(0,q.resizeSectionVecSize)(v,j.uint8Buffer,N,j.deltaElements);j.deltaBytes+=j.uint8Buffer.length-G}if(j.deltaBytes!==0&&N!=="start"){var ae=j.uint8Buffer.length;j.uint8Buffer=(0,q.resizeSectionByteSize)(v,j.uint8Buffer,N,j.deltaBytes);j.deltaBytes+=j.uint8Buffer.length-ae}if(j.deltaBytes!==0){R.forEach((function(v){switch(v.kind){case"update":shiftLocNodeByDelta(v.oldNode,j.deltaBytes);break;case"delete":shiftLocNodeByDelta(v.node,j.deltaBytes);break}}))}E=j.uint8Buffer}));return E}},17696:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.edit=edit;E.editWithAST=editWithAST;E.add=add;E.addWithAST=addWithAST;var $=R(41786);var j=R(44977);var N=R(96381);var q=R(845);var G=_interopRequireWildcard(R(67658));var ie=R(92330);function _interopRequireWildcard(v){if(v&&v.__esModule){return v}else{var E={};if(v!=null){for(var R in v){if(Object.prototype.hasOwnProperty.call(v,R)){var $=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,R):{};if($.get||$.set){Object.defineProperty(E,R,$)}else{E[R]=v[R]}}}}E.default=v;return E}}function hashNode(v){return JSON.stringify(v)}function preprocess(v){var E=(0,q.shrinkPaddedLEB128)(new Uint8Array(v));return E.buffer}function sortBySectionOrder(v){var E=new Map;var R=true;var $=false;var j=undefined;try{for(var N=v[Symbol.iterator](),q;!(R=(q=N.next()).done);R=true){var ie=q.value;E.set(ie,E.size)}}catch(v){$=true;j=v}finally{try{if(!R&&N.return!=null){N.return()}}finally{if($){throw j}}}v.sort((function(v,R){var $=(0,G.getSectionForNode)(v);var j=(0,G.getSectionForNode)(R);var N=G.default.sections[$];var q=G.default.sections[j];if(typeof N!=="number"||typeof q!=="number"){throw new Error("Section id not found")}if(N===q){return E.get(v)-E.get(R)}return N-q}))}function edit(v,E){v=preprocess(v);var R=(0,$.decode)(v);return editWithAST(R,v,E)}function editWithAST(v,E,R){var $=[];var q=new Uint8Array(E);var G;function before(v,E){G=(0,N.cloneNode)(E.node)}function after(v,E){if(E.node._deleted===true){$.push({kind:"delete",node:E.node})}else if(hashNode(G)!==hashNode(E.node)){$.push({kind:"update",oldNode:G,node:E.node})}}(0,j.traverse)(v,R,before,after);q=(0,ie.applyOperations)(v,q,$);return q.buffer}function add(v,E){v=preprocess(v);var R=(0,$.decode)(v);return addWithAST(R,v,E)}function addWithAST(v,E,R){sortBySectionOrder(R);var $=new Uint8Array(E);var j=R.map((function(v){return{kind:"add",node:v}}));$=(0,ie.applyOperations)(v,$,j);return $.buffer}},29100:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.encodeVersion=encodeVersion;E.encodeHeader=encodeHeader;E.encodeU32=encodeU32;E.encodeI32=encodeI32;E.encodeI64=encodeI64;E.encodeVec=encodeVec;E.encodeValtype=encodeValtype;E.encodeMutability=encodeMutability;E.encodeUTF8Vec=encodeUTF8Vec;E.encodeLimits=encodeLimits;E.encodeModuleImport=encodeModuleImport;E.encodeSectionMetadata=encodeSectionMetadata;E.encodeCallInstruction=encodeCallInstruction;E.encodeCallIndirectInstruction=encodeCallIndirectInstruction;E.encodeModuleExport=encodeModuleExport;E.encodeTypeInstruction=encodeTypeInstruction;E.encodeInstr=encodeInstr;E.encodeStringLiteral=encodeStringLiteral;E.encodeGlobal=encodeGlobal;E.encodeFuncBody=encodeFuncBody;E.encodeIndexInFuncSection=encodeIndexInFuncSection;E.encodeElem=encodeElem;var $=_interopRequireWildcard(R(21294));var j=_interopRequireWildcard(R(31395));var N=_interopRequireWildcard(R(59881));var q=_interopRequireDefault(R(67658));var G=R(50908);function _interopRequireDefault(v){return v&&v.__esModule?v:{default:v}}function _interopRequireWildcard(v){if(v&&v.__esModule){return v}else{var E={};if(v!=null){for(var R in v){if(Object.prototype.hasOwnProperty.call(v,R)){var $=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,R):{};if($.get||$.set){Object.defineProperty(E,R,$)}else{E[R]=v[R]}}}}E.default=v;return E}}function _toConsumableArray(v){if(Array.isArray(v)){for(var E=0,R=new Array(v.length);E=R.length}function eatBytes(v){ce=ce+v}function readBytesAtOffset(v,E){var $=[];for(var j=0;j>7?-1:1;var $=0;for(var N=0;N>7?-1:1;var $=0;for(var N=0;NR.length){throw new Error("unexpected end")}var v=readBytes(4);if(byteArrayEq(ie.default.magicModuleHeader,v)===false){throw new $.CompileError("magic header not detected")}dump(v,"wasm magic header");eatBytes(4)}function parseVersion(){if(isEOF()===true||ce+4>R.length){throw new Error("unexpected end")}var v=readBytes(4);if(byteArrayEq(ie.default.moduleVersion,v)===false){throw new $.CompileError("unknown binary version")}dump(v,"wasm version");eatBytes(4)}function parseVec(v){var E=readU32();var R=E.value;eatBytes(E.nextIndex);dump([R],"number");if(R===0){return[]}var j=[];for(var N=0;N=40&&j<=64){if(N.name==="grow_memory"||N.name==="current_memory"){var yt=readU32();var bt=yt.value;eatBytes(yt.nextIndex);if(bt!==0){throw new Error("zero flag expected")}dump([bt],"index")}else{var xt=readU32();var kt=xt.value;eatBytes(xt.nextIndex);dump([kt],"align");var vt=readU32();var wt=vt.value;eatBytes(vt.nextIndex);dump([wt],"offset")}}else if(j>=65&&j<=68){if(N.object==="i32"){var Ct=read32();var At=Ct.value;eatBytes(Ct.nextIndex);dump([At],"i32 value");ce.push(q.numberLiteralFromRaw(At))}if(N.object==="u32"){var Et=readU32();var _t=Et.value;eatBytes(Et.nextIndex);dump([_t],"u32 value");ce.push(q.numberLiteralFromRaw(_t))}if(N.object==="i64"){var St=read64();var It=St.value;eatBytes(St.nextIndex);dump([Number(It.toString())],"i64 value");var Mt=It.high,Pt=It.low;var Dt={type:"LongNumberLiteral",value:{high:Mt,low:Pt}};ce.push(Dt)}if(N.object==="u64"){var Ot=readU64();var Rt=Ot.value;eatBytes(Ot.nextIndex);dump([Number(Rt.toString())],"u64 value");var $t=Rt.high,Tt=Rt.low;var Ft={type:"LongNumberLiteral",value:{high:$t,low:Tt}};ce.push(Ft)}if(N.object==="f32"){var jt=readF32();var Nt=jt.value;eatBytes(jt.nextIndex);dump([Nt],"f32 value");ce.push(q.floatLiteral(Nt,jt.nan,jt.inf,String(Nt)))}if(N.object==="f64"){var Bt=readF64();var Lt=Bt.value;eatBytes(Bt.nextIndex);dump([Lt],"f64 value");ce.push(q.floatLiteral(Lt,Bt.nan,Bt.inf,String(Lt)))}}else if(j>=65024&&j<=65279){var qt=readU32();var zt=qt.value;eatBytes(qt.nextIndex);dump([zt],"align");var Ut=readU32();var Gt=Ut.value;eatBytes(Ut.nextIndex);dump([Gt],"offset")}else{for(var Ht=0;Ht=v||v===ie.default.sections.custom){v=R+1}else{if(R!==ie.default.sections.custom)throw new $.CompileError("Unexpected section: "+toHex(R))}var j=v;var N=ce;var G=getPosition();var ae=readU32();var le=ae.value;eatBytes(ae.nextIndex);var me=function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(le),v,G)}();switch(R){case ie.default.sections.type:{dumpSep("section Type");dump([R],"section code");dump([le],"section size");var _e=getPosition();var Ie=readU32();var Me=Ie.value;eatBytes(Ie.nextIndex);var Oe=q.sectionMetadata("type",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(Me),v,_e)}());var Te=parseTypeSection(Me);return{nodes:Te,metadata:Oe,nextSectionIndex:j}}case ie.default.sections.table:{dumpSep("section Table");dump([R],"section code");dump([le],"section size");var Ne=getPosition();var Be=readU32();var Le=Be.value;eatBytes(Be.nextIndex);dump([Le],"num tables");var qe=q.sectionMetadata("table",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(Le),v,Ne)}());var Ue=parseTableSection(Le);return{nodes:Ue,metadata:qe,nextSectionIndex:j}}case ie.default.sections.import:{dumpSep("section Import");dump([R],"section code");dump([le],"section size");var Ge=getPosition();var He=readU32();var We=He.value;eatBytes(He.nextIndex);dump([We],"number of imports");var Qe=q.sectionMetadata("import",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(We),v,Ge)}());var Je=parseImportSection(We);return{nodes:Je,metadata:Qe,nextSectionIndex:j}}case ie.default.sections.func:{dumpSep("section Function");dump([R],"section code");dump([le],"section size");var Ve=getPosition();var Ke=readU32();var Xe=Ke.value;eatBytes(Ke.nextIndex);var Ye=q.sectionMetadata("func",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(Xe),v,Ve)}());parseFuncSection(Xe);var Ze=[];return{nodes:Ze,metadata:Ye,nextSectionIndex:j}}case ie.default.sections.export:{dumpSep("section Export");dump([R],"section code");dump([le],"section size");var et=getPosition();var tt=readU32();var nt=tt.value;eatBytes(tt.nextIndex);var st=q.sectionMetadata("export",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(nt),v,et)}());parseExportSection(nt);var rt=[];return{nodes:rt,metadata:st,nextSectionIndex:j}}case ie.default.sections.code:{dumpSep("section Code");dump([R],"section code");dump([le],"section size");var ot=getPosition();var it=readU32();var at=it.value;eatBytes(it.nextIndex);var ct=q.sectionMetadata("code",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(at),v,ot)}());if(E.ignoreCodeSection===true){var lt=le-it.nextIndex;eatBytes(lt)}else{parseCodeSection(at)}var ut=[];return{nodes:ut,metadata:ct,nextSectionIndex:j}}case ie.default.sections.start:{dumpSep("section Start");dump([R],"section code");dump([le],"section size");var pt=q.sectionMetadata("start",N,me);var dt=[parseStartSection()];return{nodes:dt,metadata:pt,nextSectionIndex:j}}case ie.default.sections.element:{dumpSep("section Element");dump([R],"section code");dump([le],"section size");var ft=getPosition();var ht=readU32();var mt=ht.value;eatBytes(ht.nextIndex);var gt=q.sectionMetadata("element",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(mt),v,ft)}());var yt=parseElemSection(mt);return{nodes:yt,metadata:gt,nextSectionIndex:j}}case ie.default.sections.global:{dumpSep("section Global");dump([R],"section code");dump([le],"section size");var bt=getPosition();var xt=readU32();var kt=xt.value;eatBytes(xt.nextIndex);var vt=q.sectionMetadata("global",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(kt),v,bt)}());var wt=parseGlobalSection(kt);return{nodes:wt,metadata:vt,nextSectionIndex:j}}case ie.default.sections.memory:{dumpSep("section Memory");dump([R],"section code");dump([le],"section size");var Ct=getPosition();var At=readU32();var Et=At.value;eatBytes(At.nextIndex);var _t=q.sectionMetadata("memory",N,me,function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(Et),v,Ct)}());var St=parseMemorySection(Et);return{nodes:St,metadata:_t,nextSectionIndex:j}}case ie.default.sections.data:{dumpSep("section Data");dump([R],"section code");dump([le],"section size");var It=q.sectionMetadata("data",N,me);var Mt=getPosition();var Pt=readU32();var Dt=Pt.value;eatBytes(Pt.nextIndex);It.vectorOfSize=function(){var v=getPosition();return q.withLoc(q.numberLiteralFromRaw(Dt),v,Mt)}();if(E.ignoreDataSection===true){var Ot=le-Pt.nextIndex;eatBytes(Ot);dumpSep("ignore data ("+le+" bytes)");return{nodes:[],metadata:It,nextSectionIndex:j}}else{var Rt=parseDataSection(Dt);return{nodes:Rt,metadata:It,nextSectionIndex:j}}}case ie.default.sections.custom:{dumpSep("section Custom");dump([R],"section code");dump([le],"section size");var $t=[q.sectionMetadata("custom",N,me)];var Tt=readUTF8String();eatBytes(Tt.nextIndex);dump([],"section name (".concat(Tt.value,")"));var Ft=le-Tt.nextIndex;if(Tt.value==="name"){var jt=ce;try{$t.push.apply($t,_toConsumableArray(parseNameSection(Ft)))}catch(v){console.warn('Failed to decode custom "name" section @'.concat(ce,"; ignoring (").concat(v.message,")."));eatBytes(ce-(jt+Ft))}}else if(Tt.value==="producers"){var Nt=ce;try{$t.push(parseProducersSection())}catch(v){console.warn('Failed to decode custom "producers" section @'.concat(ce,"; ignoring (").concat(v.message,")."));eatBytes(ce-(Nt+Ft))}}else{eatBytes(Ft);dumpSep("ignore custom "+JSON.stringify(Tt.value)+" section ("+Ft+" bytes)")}return{nodes:[],metadata:$t,nextSectionIndex:j}}}throw new $.CompileError("Unexpected section: "+toHex(R))}parseModuleHeader();parseVersion();var me=[];var _e=0;var Ie={sections:[],functionNames:[],localNames:[],producers:[]};while(ce>1;var ce=-7;var le=R?j-1:0;var me=R?-1:1;var _e=v[E+le];le+=me;N=_e&(1<<-ce)-1;_e>>=-ce;ce+=G;for(;ce>0;N=N*256+v[E+le],le+=me,ce-=8){}q=N&(1<<-ce)-1;N>>=-ce;ce+=$;for(;ce>0;q=q*256+v[E+le],le+=me,ce-=8){}if(N===0){N=1-ae}else if(N===ie){return q?NaN:(_e?-1:1)*Infinity}else{q=q+Math.pow(2,$);N=N-ae}return(_e?-1:1)*q*Math.pow(2,N-$)}function write(v,E,R,$,j,N){var q,G,ie;var ae=N*8-j-1;var ce=(1<>1;var me=j===23?Math.pow(2,-24)-Math.pow(2,-77):0;var _e=$?0:N-1;var Ie=$?1:-1;var Me=E<0||E===0&&1/E<0?1:0;E=Math.abs(E);if(isNaN(E)||E===Infinity){G=isNaN(E)?1:0;q=ce}else{q=Math.floor(Math.log(E)/Math.LN2);if(E*(ie=Math.pow(2,-q))<1){q--;ie*=2}if(q+le>=1){E+=me/ie}else{E+=me*Math.pow(2,1-le)}if(E*ie>=2){q++;ie/=2}if(q+le>=ce){G=0;q=ce}else if(q+le>=1){G=(E*ie-1)*Math.pow(2,j);q=q+le}else{G=E*Math.pow(2,le-1)*Math.pow(2,j);q=0}}for(;j>=8;v[R+_e]=G&255,_e+=Ie,G/=256,j-=8){}q=q<0;v[R+_e]=q&255,_e+=Ie,q/=256,ae-=8){}v[R+_e-Ie]|=Me*128}},68396:function(v){v.exports=Long;var E=null;try{E=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(v){}function Long(v,E,R){this.low=v|0;this.high=E|0;this.unsigned=!!R}Long.prototype.__isLong__;Object.defineProperty(Long.prototype,"__isLong__",{value:true});function isLong(v){return(v&&v["__isLong__"])===true}Long.isLong=isLong;var R={};var $={};function fromInt(v,E){var j,N,q;if(E){v>>>=0;if(q=0<=v&&v<256){N=$[v];if(N)return N}j=fromBits(v,(v|0)<0?-1:0,true);if(q)$[v]=j;return j}else{v|=0;if(q=-128<=v&&v<128){N=R[v];if(N)return N}j=fromBits(v,v<0?-1:0,false);if(q)R[v]=j;return j}}Long.fromInt=fromInt;function fromNumber(v,E){if(isNaN(v))return E?me:le;if(E){if(v<0)return me;if(v>=ie)return Te}else{if(v<=-ae)return Ne;if(v+1>=ae)return Oe}if(v<0)return fromNumber(-v,E).neg();return fromBits(v%G|0,v/G|0,E)}Long.fromNumber=fromNumber;function fromBits(v,E,R){return new Long(v,E,R)}Long.fromBits=fromBits;var j=Math.pow;function fromString(v,E,R){if(v.length===0)throw Error("empty string");if(v==="NaN"||v==="Infinity"||v==="+Infinity"||v==="-Infinity")return le;if(typeof E==="number"){R=E,E=false}else{E=!!E}R=R||10;if(R<2||360)throw Error("interior hyphen");else if($===0){return fromString(v.substring(1),E,R).neg()}var N=fromNumber(j(R,8));var q=le;for(var G=0;G>>0:this.low};Be.toNumber=function toNumber(){if(this.unsigned)return(this.high>>>0)*G+(this.low>>>0);return this.high*G+(this.low>>>0)};Be.toString=function toString(v){v=v||10;if(v<2||36>>0,ce=ae.toString(v);q=ie;if(q.isZero())return ce+G;else{while(ce.length<6)ce="0"+ce;G=""+ce+G}}};Be.getHighBits=function getHighBits(){return this.high};Be.getHighBitsUnsigned=function getHighBitsUnsigned(){return this.high>>>0};Be.getLowBits=function getLowBits(){return this.low};Be.getLowBitsUnsigned=function getLowBitsUnsigned(){return this.low>>>0};Be.getNumBitsAbs=function getNumBitsAbs(){if(this.isNegative())return this.eq(Ne)?64:this.neg().getNumBitsAbs();var v=this.high!=0?this.high:this.low;for(var E=31;E>0;E--)if((v&1<=0};Be.isOdd=function isOdd(){return(this.low&1)===1};Be.isEven=function isEven(){return(this.low&1)===0};Be.equals=function equals(v){if(!isLong(v))v=fromValue(v);if(this.unsigned!==v.unsigned&&this.high>>>31===1&&v.high>>>31===1)return false;return this.high===v.high&&this.low===v.low};Be.eq=Be.equals;Be.notEquals=function notEquals(v){return!this.eq(v)};Be.neq=Be.notEquals;Be.ne=Be.notEquals;Be.lessThan=function lessThan(v){return this.comp(v)<0};Be.lt=Be.lessThan;Be.lessThanOrEqual=function lessThanOrEqual(v){return this.comp(v)<=0};Be.lte=Be.lessThanOrEqual;Be.le=Be.lessThanOrEqual;Be.greaterThan=function greaterThan(v){return this.comp(v)>0};Be.gt=Be.greaterThan;Be.greaterThanOrEqual=function greaterThanOrEqual(v){return this.comp(v)>=0};Be.gte=Be.greaterThanOrEqual;Be.ge=Be.greaterThanOrEqual;Be.compare=function compare(v){if(!isLong(v))v=fromValue(v);if(this.eq(v))return 0;var E=this.isNegative(),R=v.isNegative();if(E&&!R)return-1;if(!E&&R)return 1;if(!this.unsigned)return this.sub(v).isNegative()?-1:1;return v.high>>>0>this.high>>>0||v.high===this.high&&v.low>>>0>this.low>>>0?-1:1};Be.comp=Be.compare;Be.negate=function negate(){if(!this.unsigned&&this.eq(Ne))return Ne;return this.not().add(_e)};Be.neg=Be.negate;Be.add=function add(v){if(!isLong(v))v=fromValue(v);var E=this.high>>>16;var R=this.high&65535;var $=this.low>>>16;var j=this.low&65535;var N=v.high>>>16;var q=v.high&65535;var G=v.low>>>16;var ie=v.low&65535;var ae=0,ce=0,le=0,me=0;me+=j+ie;le+=me>>>16;me&=65535;le+=$+G;ce+=le>>>16;le&=65535;ce+=R+q;ae+=ce>>>16;ce&=65535;ae+=E+N;ae&=65535;return fromBits(le<<16|me,ae<<16|ce,this.unsigned)};Be.subtract=function subtract(v){if(!isLong(v))v=fromValue(v);return this.add(v.neg())};Be.sub=Be.subtract;Be.multiply=function multiply(v){if(this.isZero())return le;if(!isLong(v))v=fromValue(v);if(E){var R=E["mul"](this.low,this.high,v.low,v.high);return fromBits(R,E["get_high"](),this.unsigned)}if(v.isZero())return le;if(this.eq(Ne))return v.isOdd()?Ne:le;if(v.eq(Ne))return this.isOdd()?Ne:le;if(this.isNegative()){if(v.isNegative())return this.neg().mul(v.neg());else return this.neg().mul(v).neg()}else if(v.isNegative())return this.mul(v.neg()).neg();if(this.lt(ce)&&v.lt(ce))return fromNumber(this.toNumber()*v.toNumber(),this.unsigned);var $=this.high>>>16;var j=this.high&65535;var N=this.low>>>16;var q=this.low&65535;var G=v.high>>>16;var ie=v.high&65535;var ae=v.low>>>16;var me=v.low&65535;var _e=0,Ie=0,Me=0,Oe=0;Oe+=q*me;Me+=Oe>>>16;Oe&=65535;Me+=N*me;Ie+=Me>>>16;Me&=65535;Me+=q*ae;Ie+=Me>>>16;Me&=65535;Ie+=j*me;_e+=Ie>>>16;Ie&=65535;Ie+=N*ae;_e+=Ie>>>16;Ie&=65535;Ie+=q*ie;_e+=Ie>>>16;Ie&=65535;_e+=$*me+j*ae+N*ie+q*G;_e&=65535;return fromBits(Me<<16|Oe,_e<<16|Ie,this.unsigned)};Be.mul=Be.multiply;Be.divide=function divide(v){if(!isLong(v))v=fromValue(v);if(v.isZero())throw Error("division by zero");if(E){if(!this.unsigned&&this.high===-2147483648&&v.low===-1&&v.high===-1){return this}var R=(this.unsigned?E["div_u"]:E["div_s"])(this.low,this.high,v.low,v.high);return fromBits(R,E["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?me:le;var $,N,q;if(!this.unsigned){if(this.eq(Ne)){if(v.eq(_e)||v.eq(Me))return Ne;else if(v.eq(Ne))return _e;else{var G=this.shr(1);$=G.div(v).shl(1);if($.eq(le)){return v.isNegative()?_e:Me}else{N=this.sub(v.mul($));q=$.add(N.div(v));return q}}}else if(v.eq(Ne))return this.unsigned?me:le;if(this.isNegative()){if(v.isNegative())return this.neg().div(v.neg());return this.neg().div(v).neg()}else if(v.isNegative())return this.div(v.neg()).neg();q=le}else{if(!v.unsigned)v=v.toUnsigned();if(v.gt(this))return me;if(v.gt(this.shru(1)))return Ie;q=me}N=this;while(N.gte(v)){$=Math.max(1,Math.floor(N.toNumber()/v.toNumber()));var ie=Math.ceil(Math.log($)/Math.LN2),ae=ie<=48?1:j(2,ie-48),ce=fromNumber($),Oe=ce.mul(v);while(Oe.isNegative()||Oe.gt(N)){$-=ae;ce=fromNumber($,this.unsigned);Oe=ce.mul(v)}if(ce.isZero())ce=_e;q=q.add(ce);N=N.sub(Oe)}return q};Be.div=Be.divide;Be.modulo=function modulo(v){if(!isLong(v))v=fromValue(v);if(E){var R=(this.unsigned?E["rem_u"]:E["rem_s"])(this.low,this.high,v.low,v.high);return fromBits(R,E["get_high"](),this.unsigned)}return this.sub(this.div(v).mul(v))};Be.mod=Be.modulo;Be.rem=Be.modulo;Be.not=function not(){return fromBits(~this.low,~this.high,this.unsigned)};Be.and=function and(v){if(!isLong(v))v=fromValue(v);return fromBits(this.low&v.low,this.high&v.high,this.unsigned)};Be.or=function or(v){if(!isLong(v))v=fromValue(v);return fromBits(this.low|v.low,this.high|v.high,this.unsigned)};Be.xor=function xor(v){if(!isLong(v))v=fromValue(v);return fromBits(this.low^v.low,this.high^v.high,this.unsigned)};Be.shiftLeft=function shiftLeft(v){if(isLong(v))v=v.toInt();if((v&=63)===0)return this;else if(v<32)return fromBits(this.low<>>32-v,this.unsigned);else return fromBits(0,this.low<>>v|this.high<<32-v,this.high>>v,this.unsigned);else return fromBits(this.high>>v-32,this.high>=0?0:-1,this.unsigned)};Be.shr=Be.shiftRight;Be.shiftRightUnsigned=function shiftRightUnsigned(v){if(isLong(v))v=v.toInt();if((v&=63)===0)return this;if(v<32)return fromBits(this.low>>>v|this.high<<32-v,this.high>>>v,this.unsigned);if(v===32)return fromBits(this.high,0,this.unsigned);return fromBits(this.high>>>v-32,0,this.unsigned)};Be.shru=Be.shiftRightUnsigned;Be.shr_u=Be.shiftRightUnsigned;Be.rotateLeft=function rotateLeft(v){var E;if(isLong(v))v=v.toInt();if((v&=63)===0)return this;if(v===32)return fromBits(this.high,this.low,this.unsigned);if(v<32){E=32-v;return fromBits(this.low<>>E,this.high<>>E,this.unsigned)}v-=32;E=32-v;return fromBits(this.high<>>E,this.low<>>E,this.unsigned)};Be.rotl=Be.rotateLeft;Be.rotateRight=function rotateRight(v){var E;if(isLong(v))v=v.toInt();if((v&=63)===0)return this;if(v===32)return fromBits(this.high,this.low,this.unsigned);if(v<32){E=32-v;return fromBits(this.high<>>v,this.low<>>v,this.unsigned)}v-=32;E=32-v;return fromBits(this.low<>>v,this.high<>>v,this.unsigned)};Be.rotr=Be.rotateRight;Be.toSigned=function toSigned(){if(!this.unsigned)return this;return fromBits(this.low,this.high,false)};Be.toUnsigned=function toUnsigned(){if(this.unsigned)return this;return fromBits(this.low,this.high,true)};Be.toBytes=function toBytes(v){return v?this.toBytesLE():this.toBytesBE()};Be.toBytesLE=function toBytesLE(){var v=this.high,E=this.low;return[E&255,E>>>8&255,E>>>16&255,E>>>24,v&255,v>>>8&255,v>>>16&255,v>>>24]};Be.toBytesBE=function toBytesBE(){var v=this.high,E=this.low;return[v>>>24,v>>>16&255,v>>>8&255,v&255,E>>>24,E>>>16&255,E>>>8&255,E&255]};Long.fromBytes=function fromBytes(v,E,R){return R?Long.fromBytesLE(v,E):Long.fromBytesBE(v,E)};Long.fromBytesLE=function fromBytesLE(v,E){return new Long(v[0]|v[1]<<8|v[2]<<16|v[3]<<24,v[4]|v[5]<<8|v[6]<<16|v[7]<<24,E)};Long.fromBytesBE=function fromBytesBE(v,E){return new Long(v[4]<<24|v[5]<<16|v[6]<<8|v[7],v[0]<<24|v[1]<<16|v[2]<<8|v[3],E)}},81579:function(v,E,R){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.importAssertions=importAssertions;var $=_interopRequireWildcard(R(31988));function _getRequireWildcardCache(v){if(typeof WeakMap!=="function")return null;var E=new WeakMap;var R=new WeakMap;return(_getRequireWildcardCache=function(v){return v?R:E})(v)}function _interopRequireWildcard(v,E){if(!E&&v&&v.__esModule){return v}if(v===null||typeof v!=="object"&&typeof v!=="function"){return{default:v}}var R=_getRequireWildcardCache(E);if(R&&R.has(v)){return R.get(v)}var $={};var j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in v){if(N!=="default"&&Object.prototype.hasOwnProperty.call(v,N)){var q=j?Object.getOwnPropertyDescriptor(v,N):null;if(q&&(q.get||q.set)){Object.defineProperty($,N,q)}else{$[N]=v[N]}}}$.default=v;if(R){R.set(v,$)}return $}const j="{".charCodeAt(0);const N=" ".charCodeAt(0);const q="assert";const G=1,ie=2,ae=4;function importAssertions(v){const E=v.acorn||$;const{tokTypes:R,TokenType:ie}=E;return class extends v{constructor(...v){super(...v);this.assertToken=new ie(q)}_codeAt(v){return this.input.charCodeAt(v)}_eat(v){if(this.type!==v){this.unexpected()}this.next()}readToken(v){let E=0;for(;E=11){if(this.eatContextual("as")){v.exported=this.parseIdent(true);this.checkExport(E,v.exported.name,this.lastTokStart)}else{v.exported=null}}this.expectContextual("from");if(this.type!==R.string){this.unexpected()}v.source=this.parseExprAtom();if(this.type===this.assertToken){this.next();const E=this.parseImportAssertions();if(E){v.assertions=E}}this.semicolon();return this.finishNode(v,"ExportAllDeclaration")}if(this.eat(R._default)){this.checkExport(E,"default",this.lastTokStart);var $;if(this.type===R._function||($=this.isAsyncFunction())){var j=this.startNode();this.next();if($){this.next()}v.declaration=this.parseFunction(j,G|ae,false,$)}else if(this.type===R._class){var N=this.startNode();v.declaration=this.parseClass(N,"nullableID")}else{v.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(v,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){v.declaration=this.parseStatement(null);if(v.declaration.type==="VariableDeclaration"){this.checkVariableExport(E,v.declaration.declarations)}else{this.checkExport(E,v.declaration.id.name,v.declaration.id.start)}v.specifiers=[];v.source=null}else{v.declaration=null;v.specifiers=this.parseExportSpecifiers(E);if(this.eatContextual("from")){if(this.type!==R.string){this.unexpected()}v.source=this.parseExprAtom();if(this.type===this.assertToken){this.next();const E=this.parseImportAssertions();if(E){v.assertions=E}}}else{for(var q=0,ie=v.specifiers;q{if(!R.descriptionFileData)return q();const G=j(v,R);if(!G)return q();const ie=$.getField(R.descriptionFileData,this.field);if(ie===null||typeof ie!=="object"){if(N.log)N.log("Field '"+this.field+"' doesn't contain a valid alias configuration");return q()}const ae=Object.prototype.hasOwnProperty.call(ie,G)?ie[G]:G.startsWith("./")?ie[G.slice(2)]:undefined;if(ae===G)return q();if(ae===undefined)return q();if(ae===false){const v={...R,path:false};if(typeof N.yield==="function"){N.yield(v);return q(null,null)}return q(null,v)}const ce={...R,path:R.descriptionFileRoot,request:ae,fullySpecified:false};v.doResolve(E,ce,"aliased from description file "+R.descriptionFilePath+" with mapping '"+G+"' to '"+ae+"'",N,((v,E)=>{if(v)return q(v);if(E===undefined)return q(null,null);q(null,E)}))}))}}},52896:function(v,E,R){"use strict";const $=R(94968);const{PathType:j,getType:N}=R(448);v.exports=class AliasPlugin{constructor(v,E,R){this.source=v;this.options=Array.isArray(E)?E:[E];this.target=R}apply(v){const E=v.ensureHook(this.target);const getAbsolutePathWithSlashEnding=E=>{const R=N(E);if(R===j.AbsolutePosix||R===j.AbsoluteWin){return v.join(E,"_").slice(0,-1)}return null};const isSubPath=(v,E)=>{const R=getAbsolutePathWithSlashEnding(E);if(!R)return false;return v.startsWith(R)};v.getHook(this.source).tapAsync("AliasPlugin",((R,j,N)=>{const q=R.request||R.path;if(!q)return N();$(this.options,((N,G)=>{let ie=false;if(q===N.name||!N.onlyModule&&(R.request?q.startsWith(`${N.name}/`):isSubPath(q,N.name))){const ae=q.substr(N.name.length);const resolveWithAlias=($,G)=>{if($===false){const v={...R,path:false};if(typeof j.yield==="function"){j.yield(v);return G(null,null)}return G(null,v)}if(q!==$&&!q.startsWith($+"/")){ie=true;const q=$+ae;const ce={...R,request:q,fullySpecified:false};return v.doResolve(E,ce,"aliased with mapping '"+N.name+"': '"+$+"' to '"+q+"'",j,((v,E)=>{if(v)return G(v);if(E)return G(null,E);return G()}))}return G()};const stoppingCallback=(v,E)=>{if(v)return G(v);if(E)return G(null,E);if(ie)return G(null,null);return G()};if(Array.isArray(N.alias)){return $(N.alias,resolveWithAlias,stoppingCallback)}else{return resolveWithAlias(N.alias,stoppingCallback)}}return G()}),N)}))}}},35565:function(v){"use strict";v.exports=class AppendPlugin{constructor(v,E,R){this.source=v;this.appending=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("AppendPlugin",((R,$,j)=>{const N={...R,path:R.path+this.appending,relativePath:R.relativePath&&R.relativePath+this.appending};v.doResolve(E,N,this.appending,$,j)}))}}},28754:function(v,E,R){"use strict";const $=R(77282).nextTick;const dirname=v=>{let E=v.length-1;while(E>=0){const R=v.charCodeAt(E);if(R===47||R===92)break;E--}if(E<0)return"";return v.slice(0,E)};const runCallbacks=(v,E,R)=>{if(v.length===1){v[0](E,R);v.length=0;return}let $;for(const j of v){try{j(E,R)}catch(v){if(!$)$=v}}v.length=0;if($)throw $};class OperationMergerBackend{constructor(v,E,R){this._provider=v;this._syncProvider=E;this._providerContext=R;this._activeAsyncOperations=new Map;this.provide=this._provider?(E,R,$)=>{if(typeof R==="function"){$=R;R=undefined}if(R){return this._provider.call(this._providerContext,E,R,$)}if(typeof E!=="string"){$(new TypeError("path must be a string"));return}let j=this._activeAsyncOperations.get(E);if(j){j.push($);return}this._activeAsyncOperations.set(E,j=[$]);v(E,((v,R)=>{this._activeAsyncOperations.delete(E);runCallbacks(j,v,R)}))}:null;this.provideSync=this._syncProvider?(v,E)=>this._syncProvider.call(this._providerContext,v,E):null}purge(){}purgeParent(){}}const j=0;const N=1;const q=2;class CacheBackend{constructor(v,E,R,$){this._duration=v;this._provider=E;this._syncProvider=R;this._providerContext=$;this._activeAsyncOperations=new Map;this._data=new Map;this._levels=[];for(let v=0;v<10;v++)this._levels.push(new Set);for(let E=5e3;E{this._activeAsyncOperations.delete(v);this._storeResult(v,E,R);this._enterAsyncMode();runCallbacks(q,E,R)}))}provideSync(v,E){if(typeof v!=="string"){throw new TypeError("path must be a string")}if(E){return this._syncProvider.call(this._providerContext,v,E)}if(this._mode===N){this._runDecays()}let R=this._data.get(v);if(R!==undefined){if(R.err)throw R.err;return R.result}const $=this._activeAsyncOperations.get(v);this._activeAsyncOperations.delete(v);let j;try{j=this._syncProvider.call(this._providerContext,v)}catch(E){this._storeResult(v,E,undefined);this._enterSyncModeWhenIdle();if($)runCallbacks($,E,undefined);throw E}this._storeResult(v,undefined,j);this._enterSyncModeWhenIdle();if($)runCallbacks($,undefined,j);return j}purge(v){if(!v){if(this._mode!==j){this._data.clear();for(const v of this._levels){v.clear()}this._enterIdleMode()}}else if(typeof v==="string"){for(let[E,R]of this._data){if(E.startsWith(v)){this._data.delete(E);R.level.delete(E)}}if(this._data.size===0){this._enterIdleMode()}}else{for(let[E,R]of this._data){for(const $ of v){if(E.startsWith($)){this._data.delete(E);R.level.delete(E);break}}}if(this._data.size===0){this._enterIdleMode()}}}purgeParent(v){if(!v){this.purge()}else if(typeof v==="string"){this.purge(dirname(v))}else{const E=new Set;for(const R of v){E.add(dirname(R))}this.purge(E)}}_storeResult(v,E,R){if(this._data.has(v))return;const $=this._levels[this._currentLevel];this._data.set(v,{err:E,result:R,level:$});$.add(v)}_decayLevel(){const v=(this._currentLevel+1)%this._levels.length;const E=this._levels[v];this._currentLevel=v;for(let v of E){this._data.delete(v)}E.clear();if(this._data.size===0){this._enterIdleMode()}else{this._nextDecay+=this._tickInterval}}_runDecays(){while(this._nextDecay<=Date.now()&&this._mode!==j){this._decayLevel()}}_enterAsyncMode(){let v=0;switch(this._mode){case q:return;case j:this._nextDecay=Date.now()+this._tickInterval;v=this._tickInterval;break;case N:this._runDecays();if(this._mode===j)return;v=Math.max(0,this._nextDecay-Date.now());break}this._mode=q;const E=setTimeout((()=>{this._mode=N;this._runDecays()}),v);if(E.unref)E.unref();this._timeout=E}_enterSyncModeWhenIdle(){if(this._mode===j){this._mode=N;this._nextDecay=Date.now()+this._tickInterval}}_enterIdleMode(){this._mode=j;this._nextDecay=undefined;if(this._timeout)clearTimeout(this._timeout)}}const createBackend=(v,E,R,$)=>{if(v>0){return new CacheBackend(v,E,R,$)}return new OperationMergerBackend(E,R,$)};v.exports=class CachedInputFileSystem{constructor(v,E){this.fileSystem=v;this._lstatBackend=createBackend(E,this.fileSystem.lstat,this.fileSystem.lstatSync,this.fileSystem);const R=this._lstatBackend.provide;this.lstat=R;const $=this._lstatBackend.provideSync;this.lstatSync=$;this._statBackend=createBackend(E,this.fileSystem.stat,this.fileSystem.statSync,this.fileSystem);const j=this._statBackend.provide;this.stat=j;const N=this._statBackend.provideSync;this.statSync=N;this._readdirBackend=createBackend(E,this.fileSystem.readdir,this.fileSystem.readdirSync,this.fileSystem);const q=this._readdirBackend.provide;this.readdir=q;const G=this._readdirBackend.provideSync;this.readdirSync=G;this._readFileBackend=createBackend(E,this.fileSystem.readFile,this.fileSystem.readFileSync,this.fileSystem);const ie=this._readFileBackend.provide;this.readFile=ie;const ae=this._readFileBackend.provideSync;this.readFileSync=ae;this._readJsonBackend=createBackend(E,this.fileSystem.readJson||this.readFile&&((v,E)=>{this.readFile(v,((v,R)=>{if(v)return E(v);if(!R||R.length===0)return E(new Error("No file content"));let $;try{$=JSON.parse(R.toString("utf-8"))}catch(v){return E(v)}E(null,$)}))}),this.fileSystem.readJsonSync||this.readFileSync&&(v=>{const E=this.readFileSync(v);const R=JSON.parse(E.toString("utf-8"));return R}),this.fileSystem);const ce=this._readJsonBackend.provide;this.readJson=ce;const le=this._readJsonBackend.provideSync;this.readJsonSync=le;this._readlinkBackend=createBackend(E,this.fileSystem.readlink,this.fileSystem.readlinkSync,this.fileSystem);const me=this._readlinkBackend.provide;this.readlink=me;const _e=this._readlinkBackend.provideSync;this.readlinkSync=_e}purge(v){this._statBackend.purge(v);this._lstatBackend.purge(v);this._readdirBackend.purgeParent(v);this._readFileBackend.purge(v);this._readlinkBackend.purge(v);this._readJsonBackend.purge(v)}}},71975:function(v,E,R){"use strict";const $=R(74689).basename;v.exports=class CloneBasenamePlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("CloneBasenamePlugin",((R,j,N)=>{const q=$(R.path);const G=v.join(R.path,q);const ie={...R,path:G,relativePath:R.relativePath&&v.join(R.relativePath,q)};v.doResolve(E,ie,"using path: "+G,j,N)}))}}},49465:function(v){"use strict";v.exports=class ConditionalPlugin{constructor(v,E,R,$,j){this.source=v;this.test=E;this.message=R;this.allowAlternatives=$;this.target=j}apply(v){const E=v.ensureHook(this.target);const{test:R,message:$,allowAlternatives:j}=this;const N=Object.keys(R);v.getHook(this.source).tapAsync("ConditionalPlugin",((q,G,ie)=>{for(const v of N){if(q[v]!==R[v])return ie()}v.doResolve(E,q,$,G,j?ie:(v,E)=>{if(v)return ie(v);if(E===undefined)return ie(null,null);ie(null,E)})}))}}},1938:function(v,E,R){"use strict";const $=R(65746);v.exports=class DescriptionFilePlugin{constructor(v,E,R,$){this.source=v;this.filenames=E;this.pathIsFile=R;this.target=$}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("DescriptionFilePlugin",((R,j,N)=>{const q=R.path;if(!q)return N();const G=this.pathIsFile?$.cdUp(q):q;if(!G)return N();$.loadDescriptionFile(v,G,this.filenames,R.descriptionFilePath?{path:R.descriptionFilePath,content:R.descriptionFileData,directory:R.descriptionFileRoot}:undefined,j,(($,ie)=>{if($)return N($);if(!ie){if(j.log)j.log(`No description file found in ${G} or above`);return N()}const ae="."+q.substr(ie.directory.length).replace(/\\/g,"/");const ce={...R,descriptionFilePath:ie.path,descriptionFileData:ie.content,descriptionFileRoot:ie.directory,relativePath:ae};v.doResolve(E,ce,"using description file: "+ie.path+" (relative path: "+ae+")",j,((v,E)=>{if(v)return N(v);if(E===undefined)return N(null,null);N(null,E)}))}))}))}}},65746:function(v,E,R){"use strict";const $=R(94968);function loadDescriptionFile(v,E,R,j,N,q){(function findDescriptionFile(){if(j&&j.directory===E){return q(null,j)}$(R,((R,$)=>{const j=v.join(E,R);if(v.fileSystem.readJson){v.fileSystem.readJson(j,((v,E)=>{if(v){if(typeof v.code!=="undefined"){if(N.missingDependencies){N.missingDependencies.add(j)}return $()}if(N.fileDependencies){N.fileDependencies.add(j)}return onJson(v)}if(N.fileDependencies){N.fileDependencies.add(j)}onJson(null,E)}))}else{v.fileSystem.readFile(j,((v,E)=>{if(v){if(N.missingDependencies){N.missingDependencies.add(j)}return $()}if(N.fileDependencies){N.fileDependencies.add(j)}let R;if(E){try{R=JSON.parse(E.toString())}catch(v){return onJson(v)}}else{return onJson(new Error("No content in file"))}onJson(null,R)}))}function onJson(v,R){if(v){if(N.log)N.log(j+" (directory description file): "+v);else v.message=j+" (directory description file): "+v;return $(v)}$(null,{content:R,directory:E,path:j})}}),((v,R)=>{if(v)return q(v);if(R){return q(null,R)}else{const v=cdUp(E);if(!v){return q()}else{E=v;return findDescriptionFile()}}}))})()}function getField(v,E){if(!v)return undefined;if(Array.isArray(E)){let R=v;for(let v=0;v{const N=v.fileSystem;const q=R.path;if(!q)return j();N.stat(q,((N,G)=>{if(N||!G){if($.missingDependencies)$.missingDependencies.add(q);if($.log)$.log(q+" doesn't exist");return j()}if(!G.isDirectory()){if($.missingDependencies)$.missingDependencies.add(q);if($.log)$.log(q+" is not a directory");return j()}if($.fileDependencies)$.fileDependencies.add(q);v.doResolve(E,R,`existing directory ${q}`,$,j)}))}))}}},54882:function(v,E,R){"use strict";const $=R(71017);const j=R(65746);const N=R(94968);const{processExportsField:q}=R(60367);const{parseIdentifier:G}=R(33805);const{checkImportsExportsFieldTarget:ie}=R(448);v.exports=class ExportsFieldPlugin{constructor(v,E,R,$){this.source=v;this.target=$;this.conditionNames=E;this.fieldName=R;this.fieldProcessorCache=new WeakMap}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("ExportsFieldPlugin",((R,ae,ce)=>{if(!R.descriptionFilePath)return ce();if(R.relativePath!=="."||R.request===undefined)return ce();const le=R.query||R.fragment?(R.request==="."?"./":R.request)+R.query+R.fragment:R.request;const me=j.getField(R.descriptionFileData,this.fieldName);if(!me)return ce();if(R.directory){return ce(new Error(`Resolving to directories is not possible with the exports field (request was ${le}/)`))}let _e;try{let v=this.fieldProcessorCache.get(R.descriptionFileData);if(v===undefined){v=q(me);this.fieldProcessorCache.set(R.descriptionFileData,v)}_e=v(le,this.conditionNames)}catch(v){if(ae.log){ae.log(`Exports field in ${R.descriptionFilePath} can't be processed: ${v}`)}return ce(v)}if(_e.length===0){return ce(new Error(`Package path ${le} is not exported from package ${R.descriptionFileRoot} (see exports field in ${R.descriptionFilePath})`))}N(_e,((j,N)=>{const q=G(j);if(!q)return N();const[ce,le,me]=q;const _e=ie(ce);if(_e){return N(_e)}const Ie={...R,request:undefined,path:$.join(R.descriptionFileRoot,ce),relativePath:ce,query:le,fragment:me};v.doResolve(E,Ie,"using exports field: "+j,ae,N)}),((v,E)=>ce(v,E||null)))}))}}},41232:function(v,E,R){"use strict";const $=R(94968);v.exports=class ExtensionAliasPlugin{constructor(v,E,R){this.source=v;this.options=E;this.target=R}apply(v){const E=v.ensureHook(this.target);const{extension:R,alias:j}=this.options;v.getHook(this.source).tapAsync("ExtensionAliasPlugin",((N,q,G)=>{const ie=N.request;if(!ie||!ie.endsWith(R))return G();const resolve=($,j)=>{v.doResolve(E,{...N,request:`${ie.slice(0,-R.length)}${$}`,fullySpecified:true},`aliased from extension alias with mapping '${R}' to '${$}'`,q,j)};const stoppingCallback=(v,E)=>{if(v)return G(v);if(E)return G(null,E);return G(null,null)};if(typeof j==="string"){resolve(j,stoppingCallback)}else if(j.length>1){$(j,resolve,stoppingCallback)}else{resolve(j[0],stoppingCallback)}}))}}},69141:function(v){"use strict";v.exports=class FileExistsPlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const E=v.ensureHook(this.target);const R=v.fileSystem;v.getHook(this.source).tapAsync("FileExistsPlugin",(($,j,N)=>{const q=$.path;if(!q)return N();R.stat(q,((R,G)=>{if(R||!G){if(j.missingDependencies)j.missingDependencies.add(q);if(j.log)j.log(q+" doesn't exist");return N()}if(!G.isFile()){if(j.missingDependencies)j.missingDependencies.add(q);if(j.log)j.log(q+" is not a file");return N()}if(j.fileDependencies)j.fileDependencies.add(q);v.doResolve(E,$,"existing file: "+q,j,N)}))}))}}},22363:function(v,E,R){"use strict";const $=R(71017);const j=R(65746);const N=R(94968);const{processImportsField:q}=R(60367);const{parseIdentifier:G}=R(33805);const{checkImportsExportsFieldTarget:ie}=R(448);const ae=".".charCodeAt(0);v.exports=class ImportsFieldPlugin{constructor(v,E,R,$,j){this.source=v;this.targetFile=$;this.targetPackage=j;this.conditionNames=E;this.fieldName=R;this.fieldProcessorCache=new WeakMap}apply(v){const E=v.ensureHook(this.targetFile);const R=v.ensureHook(this.targetPackage);v.getHook(this.source).tapAsync("ImportsFieldPlugin",((ce,le,me)=>{if(!ce.descriptionFilePath||ce.request===undefined){return me()}const _e=ce.request+ce.query+ce.fragment;const Ie=j.getField(ce.descriptionFileData,this.fieldName);if(!Ie)return me();if(ce.directory){return me(new Error(`Resolving to directories is not possible with the imports field (request was ${_e}/)`))}let Me;try{let v=this.fieldProcessorCache.get(ce.descriptionFileData);if(v===undefined){v=q(Ie);this.fieldProcessorCache.set(ce.descriptionFileData,v)}Me=v(_e,this.conditionNames)}catch(v){if(le.log){le.log(`Imports field in ${ce.descriptionFilePath} can't be processed: ${v}`)}return me(v)}if(Me.length===0){return me(new Error(`Package import ${_e} is not imported from package ${ce.descriptionFileRoot} (see imports field in ${ce.descriptionFilePath})`))}N(Me,((j,N)=>{const q=G(j);if(!q)return N();const[me,_e,Ie]=q;const Me=ie(me);if(Me){return N(Me)}switch(me.charCodeAt(0)){case ae:{const R={...ce,request:undefined,path:$.join(ce.descriptionFileRoot,me),relativePath:me,query:_e,fragment:Ie};v.doResolve(E,R,"using imports field: "+j,le,N);break}default:{const E={...ce,request:me,relativePath:me,fullySpecified:true,query:_e,fragment:Ie};v.doResolve(R,E,"using imports field: "+j,le,N)}}}),((v,E)=>me(v,E||null)))}))}}},78232:function(v){"use strict";const E="@".charCodeAt(0);v.exports=class JoinRequestPartPlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const R=v.ensureHook(this.target);v.getHook(this.source).tapAsync("JoinRequestPartPlugin",(($,j,N)=>{const q=$.request||"";let G=q.indexOf("/",3);if(G>=0&&q.charCodeAt(2)===E){G=q.indexOf("/",G+1)}let ie,ae,ce;if(G<0){ie=q;ae=".";ce=false}else{ie=q.slice(0,G);ae="."+q.slice(G);ce=$.fullySpecified}const le={...$,path:v.join($.path,ie),relativePath:$.relativePath&&v.join($.relativePath,ie),request:ae,fullySpecified:ce};v.doResolve(R,le,null,j,N)}))}}},84858:function(v){"use strict";v.exports=class JoinRequestPlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("JoinRequestPlugin",((R,$,j)=>{const N={...R,path:v.join(R.path,R.request),relativePath:R.relativePath&&v.join(R.relativePath,R.request),request:undefined};v.doResolve(E,N,null,$,j)}))}}},51492:function(v){"use strict";v.exports=class LogInfoPlugin{constructor(v){this.source=v}apply(v){const E=this.source;v.getHook(this.source).tapAsync("LogInfoPlugin",((v,R,$)=>{if(!R.log)return $();const j=R.log;const N="["+E+"] ";if(v.path)j(N+"Resolving in directory: "+v.path);if(v.request)j(N+"Resolving request: "+v.request);if(v.module)j(N+"Request is an module request.");if(v.directory)j(N+"Request is a directory request.");if(v.query)j(N+"Resolving request query: "+v.query);if(v.fragment)j(N+"Resolving request fragment: "+v.fragment);if(v.descriptionFilePath)j(N+"Has description data from "+v.descriptionFilePath);if(v.relativePath)j(N+"Relative path from description file is: "+v.relativePath);$()}))}}},23365:function(v,E,R){"use strict";const $=R(71017);const j=R(65746);const N=Symbol("alreadyTriedMainField");v.exports=class MainFieldPlugin{constructor(v,E,R){this.source=v;this.options=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("MainFieldPlugin",((R,q,G)=>{if(R.path!==R.descriptionFileRoot||R[N]===R.descriptionFilePath||!R.descriptionFilePath)return G();const ie=$.basename(R.descriptionFilePath);let ae=j.getField(R.descriptionFileData,this.options.name);if(!ae||typeof ae!=="string"||ae==="."||ae==="./"){return G()}if(this.options.forceRelative&&!/^\.\.?\//.test(ae))ae="./"+ae;const ce={...R,request:ae,module:false,directory:ae.endsWith("/"),[N]:R.descriptionFilePath};return v.doResolve(E,ce,"use "+ae+" from "+this.options.name+" in "+ie,q,G)}))}}},42482:function(v,E,R){"use strict";const $=R(94968);const j=R(74689);v.exports=class ModulesInHierarchicalDirectoriesPlugin{constructor(v,E,R){this.source=v;this.directories=[].concat(E);this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("ModulesInHierarchicalDirectoriesPlugin",((R,N,q)=>{const G=v.fileSystem;const ie=j(R.path).paths.map((E=>this.directories.map((R=>v.join(E,R))))).reduce(((v,E)=>{v.push.apply(v,E);return v}),[]);$(ie,(($,j)=>{G.stat($,((q,G)=>{if(!q&&G&&G.isDirectory()){const q={...R,path:$,request:"./"+R.request,module:false};const G="looking for modules in "+$;return v.doResolve(E,q,G,N,j)}if(N.log)N.log($+" doesn't exist or is not a directory");if(N.missingDependencies)N.missingDependencies.add($);return j()}))}),q)}))}}},24714:function(v){"use strict";v.exports=class ModulesInRootPlugin{constructor(v,E,R){this.source=v;this.path=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("ModulesInRootPlugin",((R,$,j)=>{const N={...R,path:this.path,request:"./"+R.request,module:false};v.doResolve(E,N,"looking for modules in "+this.path,$,j)}))}}},48689:function(v){"use strict";v.exports=class NextPlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("NextPlugin",((R,$,j)=>{v.doResolve(E,R,null,$,j)}))}}},29346:function(v){"use strict";v.exports=class ParsePlugin{constructor(v,E,R){this.source=v;this.requestOptions=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("ParsePlugin",((R,$,j)=>{const N=v.parse(R.request);const q={...R,...N,...this.requestOptions};if(R.query&&!N.query){q.query=R.query}if(R.fragment&&!N.fragment){q.fragment=R.fragment}if(N&&$.log){if(N.module)$.log("Parsed request is a module");if(N.directory)$.log("Parsed request is a directory")}if(q.request&&!q.query&&q.fragment){const R=q.fragment.endsWith("/");const N={...q,directory:R,request:q.request+(q.directory?"/":"")+(R?q.fragment.slice(0,-1):q.fragment),fragment:""};v.doResolve(E,N,null,$,((R,N)=>{if(R)return j(R);if(N)return j(null,N);v.doResolve(E,q,null,$,j)}));return}v.doResolve(E,q,null,$,j)}))}}},24370:function(v){"use strict";v.exports=class PnpPlugin{constructor(v,E,R){this.source=v;this.pnpApi=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("PnpPlugin",((R,$,j)=>{const N=R.request;if(!N)return j();const q=`${R.path}/`;const G=/^(@[^/]+\/)?[^/]+/.exec(N);if(!G)return j();const ie=G[0];const ae=`.${N.slice(ie.length)}`;let ce;let le;try{ce=this.pnpApi.resolveToUnqualified(ie,q,{considerBuiltins:false});if($.fileDependencies){le=this.pnpApi.resolveToUnqualified("pnpapi",q,{considerBuiltins:false})}}catch(v){if(v.code==="MODULE_NOT_FOUND"&&v.pnpCode==="UNDECLARED_DEPENDENCY"){if($.log){$.log(`request is not managed by the pnpapi`);for(const E of v.message.split("\n").filter(Boolean))$.log(` ${E}`)}return j()}return j(v)}if(ce===ie)return j();if(le&&$.fileDependencies){$.fileDependencies.add(le)}const me={...R,path:ce,request:ae,ignoreSymlinks:true,fullySpecified:R.fullySpecified&&ae!=="."};v.doResolve(E,me,`resolved by pnp to ${ce}`,$,((v,E)=>{if(v)return j(v);if(E)return j(null,E);return j(null,null)}))}))}}},22789:function(v,E,R){"use strict";const{AsyncSeriesBailHook:$,AsyncSeriesHook:j,SyncHook:N}=R(44217);const q=R(1655);const{parseIdentifier:G}=R(33805);const{normalize:ie,cachedJoin:ae,getType:ce,PathType:le}=R(448);function toCamelCase(v){return v.replace(/-([a-z])/g,(v=>v.substr(1).toUpperCase()))}class Resolver{static createStackEntry(v,E){return v.name+": ("+E.path+") "+(E.request||"")+(E.query||"")+(E.fragment||"")+(E.directory?" directory":"")+(E.module?" module":"")}constructor(v,E){this.fileSystem=v;this.options=E;this.hooks={resolveStep:new N(["hook","request"],"resolveStep"),noResolve:new N(["request","error"],"noResolve"),resolve:new $(["request","resolveContext"],"resolve"),result:new j(["result","resolveContext"],"result")}}ensureHook(v){if(typeof v!=="string"){return v}v=toCamelCase(v);if(/^before/.test(v)){return this.ensureHook(v[6].toLowerCase()+v.substr(7)).withOptions({stage:-10})}if(/^after/.test(v)){return this.ensureHook(v[5].toLowerCase()+v.substr(6)).withOptions({stage:10})}const E=this.hooks[v];if(!E){return this.hooks[v]=new $(["request","resolveContext"],v)}return E}getHook(v){if(typeof v!=="string"){return v}v=toCamelCase(v);if(/^before/.test(v)){return this.getHook(v[6].toLowerCase()+v.substr(7)).withOptions({stage:-10})}if(/^after/.test(v)){return this.getHook(v[5].toLowerCase()+v.substr(6)).withOptions({stage:10})}const E=this.hooks[v];if(!E){throw new Error(`Hook ${v} doesn't exist`)}return E}resolveSync(v,E,R){let $=undefined;let j=undefined;let N=false;this.resolve(v,E,R,{},((v,E)=>{$=v;j=E;N=true}));if(!N){throw new Error("Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!")}if($)throw $;if(j===undefined)throw new Error("No result");return j}resolve(v,E,R,$,j){if(!v||typeof v!=="object")return j(new Error("context argument is not an object"));if(typeof E!=="string")return j(new Error("path argument is not a string"));if(typeof R!=="string")return j(new Error("request argument is not a string"));if(!$)return j(new Error("resolveContext argument is not set"));const N={context:v,path:E,request:R};let q;let G=false;let ie;if(typeof $.yield==="function"){const v=$.yield;q=E=>{v(E);G=true};ie=v=>{if(v)q(v);j(null)}}const ae=`resolve '${R}' in '${E}'`;const finishResolved=v=>j(null,v.path===false?false:`${v.path.replace(/#/g,"\0#")}${v.query?v.query.replace(/#/g,"\0#"):""}${v.fragment||""}`,v);const finishWithoutResolve=v=>{const E=new Error("Can't "+ae);E.details=v.join("\n");this.hooks.noResolve.call(N,E);return j(E)};if($.log){const v=$.log;const E=[];return this.doResolve(this.hooks.resolve,N,ae,{log:R=>{v(R);E.push(R)},yield:q,fileDependencies:$.fileDependencies,contextDependencies:$.contextDependencies,missingDependencies:$.missingDependencies,stack:$.stack},((v,R)=>{if(v)return j(v);if(G||R&&q)return ie(R);if(R)return finishResolved(R);return finishWithoutResolve(E)}))}else{return this.doResolve(this.hooks.resolve,N,ae,{log:undefined,yield:q,fileDependencies:$.fileDependencies,contextDependencies:$.contextDependencies,missingDependencies:$.missingDependencies,stack:$.stack},((v,E)=>{if(v)return j(v);if(G||E&&q)return ie(E);if(E)return finishResolved(E);const R=[];return this.doResolve(this.hooks.resolve,N,ae,{log:v=>R.push(v),yield:q,stack:$.stack},((v,E)=>{if(v)return j(v);if(G||E&&q)return ie(E);return finishWithoutResolve(R)}))}))}}doResolve(v,E,R,$,j){const N=Resolver.createStackEntry(v,E);let G;if($.stack){G=new Set($.stack);if($.stack.has(N)){const v=new Error("Recursion in resolving\nStack:\n "+Array.from(G).join("\n "));v.recursion=true;if($.log)$.log("abort resolving because of recursion");return j(v)}G.add(N)}else{G=new Set([N])}this.hooks.resolveStep.call(v,E);if(v.isUsed()){const N=q({log:$.log,yield:$.yield,fileDependencies:$.fileDependencies,contextDependencies:$.contextDependencies,missingDependencies:$.missingDependencies,stack:G},R);return v.callAsync(E,N,((v,E)=>{if(v)return j(v);if(E)return j(null,E);j()}))}else{j()}}parse(v){const E={request:"",query:"",fragment:"",module:false,directory:false,file:false,internal:false};const R=G(v);if(!R)return E;[E.request,E.query,E.fragment]=R;if(E.request.length>0){E.internal=this.isPrivate(v);E.module=this.isModule(E.request);E.directory=this.isDirectory(E.request);if(E.directory){E.request=E.request.substr(0,E.request.length-1)}}return E}isModule(v){return ce(v)===le.Normal}isPrivate(v){return ce(v)===le.Internal}isDirectory(v){return v.endsWith("/")}join(v,E){return ae(v,E)}normalize(v){return ie(v)}}v.exports=Resolver},34387:function(v,E,R){"use strict";const $=R(77282).versions;const j=R(22789);const{getType:N,PathType:q}=R(448);const G=R(62529);const ie=R(78032);const ae=R(52896);const ce=R(35565);const le=R(49465);const me=R(1938);const _e=R(19599);const Ie=R(54882);const Me=R(41232);const Oe=R(69141);const Te=R(22363);const Ne=R(78232);const Be=R(84858);const Le=R(23365);const qe=R(42482);const Ue=R(24714);const Ge=R(48689);const He=R(29346);const We=R(24370);const Qe=R(8065);const Je=R(79942);const Ve=R(39329);const Ke=R(16402);const Xe=R(2568);const Ye=R(36146);const Ze=R(90828);const et=R(85487);function processPnpApiOption(v){if(v===undefined&&$.pnp){return R(35125)}return v||null}function normalizeAlias(v){return typeof v==="object"&&!Array.isArray(v)&&v!==null?Object.keys(v).map((E=>{const R={name:E,onlyModule:false,alias:v[E]};if(/\$$/.test(E)){R.onlyModule=true;R.name=E.substr(0,E.length-1)}return R})):v||[]}function createOptions(v){const E=new Set(v.mainFields||["main"]);const R=[];for(const v of E){if(typeof v==="string"){R.push({name:[v],forceRelative:true})}else if(Array.isArray(v)){R.push({name:v,forceRelative:true})}else{R.push({name:Array.isArray(v.name)?v.name:[v.name],forceRelative:v.forceRelative})}}return{alias:normalizeAlias(v.alias),fallback:normalizeAlias(v.fallback),aliasFields:new Set(v.aliasFields),cachePredicate:v.cachePredicate||function(){return true},cacheWithContext:typeof v.cacheWithContext!=="undefined"?v.cacheWithContext:true,exportsFields:new Set(v.exportsFields||["exports"]),importsFields:new Set(v.importsFields||["imports"]),conditionNames:new Set(v.conditionNames),descriptionFiles:Array.from(new Set(v.descriptionFiles||["package.json"])),enforceExtension:v.enforceExtension===undefined?v.extensions&&v.extensions.includes("")?true:false:v.enforceExtension,extensions:new Set(v.extensions||[".js",".json",".node"]),extensionAlias:v.extensionAlias?Object.keys(v.extensionAlias).map((E=>({extension:E,alias:v.extensionAlias[E]}))):[],fileSystem:v.useSyncFileSystemCalls?new G(v.fileSystem):v.fileSystem,unsafeCache:v.unsafeCache&&typeof v.unsafeCache!=="object"?{}:v.unsafeCache||false,symlinks:typeof v.symlinks!=="undefined"?v.symlinks:true,resolver:v.resolver,modules:mergeFilteredToArray(Array.isArray(v.modules)?v.modules:v.modules?[v.modules]:["node_modules"],(v=>{const E=N(v);return E===q.Normal||E===q.Relative})),mainFields:R,mainFiles:new Set(v.mainFiles||["index"]),plugins:v.plugins||[],pnpApi:processPnpApiOption(v.pnpApi),roots:new Set(v.roots||undefined),fullySpecified:v.fullySpecified||false,resolveToContext:v.resolveToContext||false,preferRelative:v.preferRelative||false,preferAbsolute:v.preferAbsolute||false,restrictions:new Set(v.restrictions)}}E.createResolver=function(v){const E=createOptions(v);const{alias:R,fallback:$,aliasFields:N,cachePredicate:q,cacheWithContext:G,conditionNames:tt,descriptionFiles:nt,enforceExtension:st,exportsFields:rt,extensionAlias:ot,importsFields:it,extensions:at,fileSystem:ct,fullySpecified:lt,mainFields:ut,mainFiles:pt,modules:dt,plugins:ft,pnpApi:ht,resolveToContext:mt,preferRelative:gt,preferAbsolute:yt,symlinks:bt,unsafeCache:xt,resolver:kt,restrictions:vt,roots:wt}=E;const Ct=ft.slice();const At=kt?kt:new j(ct,E);At.ensureHook("resolve");At.ensureHook("internalResolve");At.ensureHook("newInternalResolve");At.ensureHook("parsedResolve");At.ensureHook("describedResolve");At.ensureHook("rawResolve");At.ensureHook("normalResolve");At.ensureHook("internal");At.ensureHook("rawModule");At.ensureHook("module");At.ensureHook("resolveAsModule");At.ensureHook("undescribedResolveInPackage");At.ensureHook("resolveInPackage");At.ensureHook("resolveInExistingDirectory");At.ensureHook("relative");At.ensureHook("describedRelative");At.ensureHook("directory");At.ensureHook("undescribedExistingDirectory");At.ensureHook("existingDirectory");At.ensureHook("undescribedRawFile");At.ensureHook("rawFile");At.ensureHook("file");At.ensureHook("finalFile");At.ensureHook("existingFile");At.ensureHook("resolved");At.hooks.newInteralResolve=At.hooks.newInternalResolve;for(const{source:v,resolveOptions:E}of[{source:"resolve",resolveOptions:{fullySpecified:lt}},{source:"internal-resolve",resolveOptions:{fullySpecified:false}}]){if(xt){Ct.push(new Ze(v,q,xt,G,`new-${v}`));Ct.push(new He(`new-${v}`,E,"parsed-resolve"))}else{Ct.push(new He(v,E,"parsed-resolve"))}}Ct.push(new me("parsed-resolve",nt,false,"described-resolve"));Ct.push(new Ge("after-parsed-resolve","described-resolve"));Ct.push(new Ge("described-resolve","raw-resolve"));if($.length>0){Ct.push(new ae("described-resolve",$,"internal-resolve"))}if(R.length>0){Ct.push(new ae("raw-resolve",R,"internal-resolve"))}N.forEach((v=>{Ct.push(new ie("raw-resolve",v,"internal-resolve"))}));ot.forEach((v=>Ct.push(new Me("raw-resolve",v,"normal-resolve"))));Ct.push(new Ge("raw-resolve","normal-resolve"));if(gt){Ct.push(new Be("after-normal-resolve","relative"))}Ct.push(new le("after-normal-resolve",{module:true},"resolve as module",false,"raw-module"));Ct.push(new le("after-normal-resolve",{internal:true},"resolve as internal import",false,"internal"));if(yt){Ct.push(new Be("after-normal-resolve","relative"))}if(wt.size>0){Ct.push(new Ve("after-normal-resolve",wt,"relative"))}if(!gt&&!yt){Ct.push(new Be("after-normal-resolve","relative"))}it.forEach((v=>{Ct.push(new Te("internal",tt,v,"relative","internal-resolve"))}));rt.forEach((v=>{Ct.push(new Ke("raw-module",v,"resolve-as-module"))}));dt.forEach((v=>{if(Array.isArray(v)){if(v.includes("node_modules")&&ht){Ct.push(new qe("raw-module",v.filter((v=>v!=="node_modules")),"module"));Ct.push(new We("raw-module",ht,"undescribed-resolve-in-package"))}else{Ct.push(new qe("raw-module",v,"module"))}}else{Ct.push(new Ue("raw-module",v,"module"))}}));Ct.push(new Ne("module","resolve-as-module"));if(!mt){Ct.push(new le("resolve-as-module",{directory:false,request:"."},"single file module",true,"undescribed-raw-file"))}Ct.push(new _e("resolve-as-module","undescribed-resolve-in-package"));Ct.push(new me("undescribed-resolve-in-package",nt,false,"resolve-in-package"));Ct.push(new Ge("after-undescribed-resolve-in-package","resolve-in-package"));rt.forEach((v=>{Ct.push(new Ie("resolve-in-package",tt,v,"relative"))}));Ct.push(new Ge("resolve-in-package","resolve-in-existing-directory"));Ct.push(new Be("resolve-in-existing-directory","relative"));Ct.push(new me("relative",nt,true,"described-relative"));Ct.push(new Ge("after-relative","described-relative"));if(mt){Ct.push(new Ge("described-relative","directory"))}else{Ct.push(new le("described-relative",{directory:false},null,true,"raw-file"));Ct.push(new le("described-relative",{fullySpecified:false},"as directory",true,"directory"))}Ct.push(new _e("directory","undescribed-existing-directory"));if(mt){Ct.push(new Ge("undescribed-existing-directory","resolved"))}else{Ct.push(new me("undescribed-existing-directory",nt,false,"existing-directory"));pt.forEach((v=>{Ct.push(new et("undescribed-existing-directory",v,"undescribed-raw-file"))}));ut.forEach((v=>{Ct.push(new Le("existing-directory",v,"resolve-in-existing-directory"))}));pt.forEach((v=>{Ct.push(new et("existing-directory",v,"undescribed-raw-file"))}));Ct.push(new me("undescribed-raw-file",nt,true,"raw-file"));Ct.push(new Ge("after-undescribed-raw-file","raw-file"));Ct.push(new le("raw-file",{fullySpecified:true},null,false,"file"));if(!st){Ct.push(new Ye("raw-file","no extension","file"))}at.forEach((v=>{Ct.push(new ce("raw-file",v,"file"))}));if(R.length>0)Ct.push(new ae("file",R,"internal-resolve"));N.forEach((v=>{Ct.push(new ie("file",v,"internal-resolve"))}));Ct.push(new Ge("file","final-file"));Ct.push(new Oe("final-file","existing-file"));if(bt)Ct.push(new Xe("existing-file","existing-file"));Ct.push(new Ge("existing-file","resolved"))}if(vt.size>0){Ct.push(new Qe(At.hooks.resolved,vt))}Ct.push(new Je(At.hooks.resolved));for(const v of Ct){if(typeof v==="function"){v.call(At,At)}else{v.apply(At)}}return At};function mergeFilteredToArray(v,E){const R=[];const $=new Set(v);for(const v of $){if(E(v)){const E=R.length>0?R[R.length-1]:undefined;if(Array.isArray(E)){E.push(v)}else{R.push([v])}}else{R.push(v)}}return R}},8065:function(v){"use strict";const E="/".charCodeAt(0);const R="\\".charCodeAt(0);const isInside=(v,$)=>{if(!v.startsWith($))return false;if(v.length===$.length)return true;const j=v.charCodeAt($.length);return j===E||j===R};v.exports=class RestrictionsPlugin{constructor(v,E){this.source=v;this.restrictions=E}apply(v){v.getHook(this.source).tapAsync("RestrictionsPlugin",((v,E,R)=>{if(typeof v.path==="string"){const $=v.path;for(const v of this.restrictions){if(typeof v==="string"){if(!isInside($,v)){if(E.log){E.log(`${$} is not inside of the restriction ${v}`)}return R(null,null)}}else if(!v.test($)){if(E.log){E.log(`${$} doesn't match the restriction ${v}`)}return R(null,null)}}}R()}))}}},79942:function(v){"use strict";v.exports=class ResultPlugin{constructor(v){this.source=v}apply(v){this.source.tapAsync("ResultPlugin",((E,R,$)=>{const j={...E};if(R.log)R.log("reporting result "+j.path);v.hooks.result.callAsync(j,R,(v=>{if(v)return $(v);if(typeof R.yield==="function"){R.yield(j);$(null,null)}else{$(null,j)}}))}))}}},39329:function(v,E,R){"use strict";const $=R(94968);class RootsPlugin{constructor(v,E,R){this.roots=Array.from(E);this.source=v;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("RootsPlugin",((R,j,N)=>{const q=R.request;if(!q)return N();if(!q.startsWith("/"))return N();$(this.roots,(($,N)=>{const G=v.join($,q.slice(1));const ie={...R,path:G,relativePath:R.relativePath&&G};v.doResolve(E,ie,`root path ${$}`,j,N)}),N)}))}}v.exports=RootsPlugin},16402:function(v,E,R){"use strict";const $=R(65746);const j="/".charCodeAt(0);v.exports=class SelfReferencePlugin{constructor(v,E,R){this.source=v;this.target=R;this.fieldName=E}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("SelfReferencePlugin",((R,N,q)=>{if(!R.descriptionFilePath)return q();const G=R.request;if(!G)return q();const ie=$.getField(R.descriptionFileData,this.fieldName);if(!ie)return q();const ae=$.getField(R.descriptionFileData,"name");if(typeof ae!=="string")return q();if(G.startsWith(ae)&&(G.length===ae.length||G.charCodeAt(ae.length)===j)){const $=`.${G.slice(ae.length)}`;const j={...R,request:$,path:R.descriptionFileRoot,relativePath:"."};v.doResolve(E,j,"self reference",N,q)}else{return q()}}))}}},2568:function(v,E,R){"use strict";const $=R(94968);const j=R(74689);const{getType:N,PathType:q}=R(448);v.exports=class SymlinkPlugin{constructor(v,E){this.source=v;this.target=E}apply(v){const E=v.ensureHook(this.target);const R=v.fileSystem;v.getHook(this.source).tapAsync("SymlinkPlugin",((G,ie,ae)=>{if(G.ignoreSymlinks)return ae();const ce=j(G.path);const le=ce.segments;const me=ce.paths;let _e=false;let Ie=-1;$(me,((v,E)=>{Ie++;if(ie.fileDependencies)ie.fileDependencies.add(v);R.readlink(v,((v,R)=>{if(!v&&R){le[Ie]=R;_e=true;const v=N(R.toString());if(v===q.AbsoluteWin||v===q.AbsolutePosix){return E(null,Ie)}}E()}))}),((R,$)=>{if(!_e)return ae();const j=typeof $==="number"?le.slice(0,$+1):le.slice();const N=j.reduceRight(((E,R)=>v.join(E,R)));const q={...G,path:N};v.doResolve(E,q,"resolved symlink to "+N,ie,ae)}))}))}}},62529:function(v){"use strict";function SyncAsyncFileSystemDecorator(v){this.fs=v;this.lstat=undefined;this.lstatSync=undefined;const E=v.lstatSync;if(E){this.lstat=(R,$,j)=>{let N;try{N=E.call(v,R)}catch(v){return(j||$)(v)}(j||$)(null,N)};this.lstatSync=(R,$)=>E.call(v,R,$)}this.stat=(E,R,$)=>{let j;try{j=$?v.statSync(E,R):v.statSync(E)}catch(v){return($||R)(v)}($||R)(null,j)};this.statSync=(E,R)=>v.statSync(E,R);this.readdir=(E,R,$)=>{let j;try{j=v.readdirSync(E)}catch(v){return($||R)(v)}($||R)(null,j)};this.readdirSync=(E,R)=>v.readdirSync(E,R);this.readFile=(E,R,$)=>{let j;try{j=v.readFileSync(E)}catch(v){return($||R)(v)}($||R)(null,j)};this.readFileSync=(E,R)=>v.readFileSync(E,R);this.readlink=(E,R,$)=>{let j;try{j=v.readlinkSync(E)}catch(v){return($||R)(v)}($||R)(null,j)};this.readlinkSync=(E,R)=>v.readlinkSync(E,R);this.readJson=undefined;this.readJsonSync=undefined;const R=v.readJsonSync;if(R){this.readJson=(E,$,j)=>{let N;try{N=R.call(v,E)}catch(v){return(j||$)(v)}(j||$)(null,N)};this.readJsonSync=(E,$)=>R.call(v,E,$)}}v.exports=SyncAsyncFileSystemDecorator},36146:function(v){"use strict";v.exports=class TryNextPlugin{constructor(v,E,R){this.source=v;this.message=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("TryNextPlugin",((R,$,j)=>{v.doResolve(E,R,this.message,$,j)}))}}},90828:function(v){"use strict";function getCacheId(v,E,R){return JSON.stringify({type:v,context:R?E.context:"",path:E.path,query:E.query,fragment:E.fragment,request:E.request})}v.exports=class UnsafeCachePlugin{constructor(v,E,R,$,j){this.source=v;this.filterPredicate=E;this.withContext=$;this.cache=R;this.target=j}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("UnsafeCachePlugin",((R,$,j)=>{if(!this.filterPredicate(R))return j();const N=typeof $.yield==="function";const q=getCacheId(N?"yield":"default",R,this.withContext);const G=this.cache[q];if(G){if(N){const v=$.yield;if(Array.isArray(G)){for(const E of G)v(E)}else{v(G)}return j(null,null)}return j(null,G)}let ie;let ae;const ce=[];if(N){ie=$.yield;ae=v=>{ce.push(v)}}v.doResolve(E,R,null,ae?{...$,yield:ae}:$,((v,E)=>{if(v)return j(v);if(N){if(E)ce.push(E);for(const v of ce)ie(v);this.cache[q]=ce;return j(null,null)}if(E)return j(null,this.cache[q]=E);j()}))}))}}},85487:function(v){"use strict";v.exports=class UseFilePlugin{constructor(v,E,R){this.source=v;this.filename=E;this.target=R}apply(v){const E=v.ensureHook(this.target);v.getHook(this.source).tapAsync("UseFilePlugin",((R,$,j)=>{const N=v.join(R.path,this.filename);const q={...R,path:N,relativePath:R.relativePath&&v.join(R.relativePath,this.filename)};v.doResolve(E,q,"using path: "+N,$,j)}))}}},1655:function(v){"use strict";v.exports=function createInnerContext(v,E,R){let $=false;let j=undefined;if(v.log){if(E){j=R=>{if(!$){v.log(E);$=true}v.log(" "+R)}}else{j=v.log}}const N={log:j,yield:v.yield,fileDependencies:v.fileDependencies,contextDependencies:v.contextDependencies,missingDependencies:v.missingDependencies,stack:v.stack};return N}},94968:function(v){"use strict";v.exports=function forEachBail(v,E,R){if(v.length===0)return R();let $=0;const next=()=>{let j=undefined;E(v[$++],((E,N)=>{if(E||N!==undefined||$>=v.length){return R(E,N)}if(j===false)while(next());j=true}));if(!j)j=false;return j};while(next());}},30613:function(v){"use strict";v.exports=function getInnerRequest(v,E){if(typeof E.__innerRequest==="string"&&E.__innerRequest_request===E.request&&E.__innerRequest_relativePath===E.relativePath)return E.__innerRequest;let R;if(E.request){R=E.request;if(/^\.\.?(?:\/|$)/.test(R)&&E.relativePath){R=v.join(E.relativePath,R)}}else{R=E.relativePath}E.__innerRequest_request=E.request;E.__innerRequest_relativePath=E.relativePath;return E.__innerRequest=R}},74689:function(v){"use strict";v.exports=function getPaths(v){if(v==="/")return{paths:["/"],segments:[""]};const E=v.split(/(.*?[\\/]+)/);const R=[v];const $=[E[E.length-1]];let j=E[E.length-1];v=v.substr(0,v.length-j.length-1);for(let N=E.length-2;N>2;N-=2){R.push(v);j=E[N];v=v.substr(0,v.length-j.length)||"/";$.push(j.substr(0,j.length-1))}j=E[1];$.push(j);R.push(j);return{paths:R,segments:$}};v.exports.basename=function basename(v){const E=v.lastIndexOf("/"),R=v.lastIndexOf("\\");const $=E<0?R:R<0?E:E{const R=Object.getOwnPropertyDescriptors(E);Object.defineProperties(v,R);return Object.freeze(v)};v.exports=mergeExports(resolve,{get sync(){return resolveSync},create:mergeExports(create,{get sync(){return createSync}}),ResolverFactory:N,CachedInputFileSystem:j,get CloneBasenamePlugin(){return R(71975)},get LogInfoPlugin(){return R(51492)},get forEachBail(){return R(94968)}})},60367:function(v){"use strict";const E="/".charCodeAt(0);const R=".".charCodeAt(0);const $="#".charCodeAt(0);v.exports.processExportsField=function processExportsField(v){return createFieldProcessor(buildExportsFieldPathTree(v),assertExportsFieldRequest,assertExportTarget)};v.exports.processImportsField=function processImportsField(v){return createFieldProcessor(buildImportsFieldPathTree(v),assertImportsFieldRequest,assertImportTarget)};function createFieldProcessor(v,E,R){return function fieldProcessor($,j){$=E($);const N=findMatch($,v);if(N===null)return[];const[q,G]=N;let ie=null;if(isConditionalMapping(q)){ie=conditionalMapping(q,j);if(ie===null)return[]}else{ie=q}const ae=G===$.length+1?undefined:G<0?$.slice(-G-1):$.slice(G);return directMapping(ae,G<0,ie,j,R)}}function assertExportsFieldRequest(v){if(v.charCodeAt(0)!==R){throw new Error('Request should be relative path and start with "."')}if(v.length===1)return"";if(v.charCodeAt(1)!==E){throw new Error('Request should be relative path and start with "./"')}if(v.charCodeAt(v.length-1)===E){throw new Error("Only requesting file allowed")}return v.slice(2)}function assertImportsFieldRequest(v){if(v.charCodeAt(0)!==$){throw new Error('Request should start with "#"')}if(v.length===1){throw new Error("Request should have at least 2 characters")}if(v.charCodeAt(1)===E){throw new Error('Request should not start with "#/"')}if(v.charCodeAt(v.length-1)===E){throw new Error("Only requesting file allowed")}return v.slice(1)}function assertExportTarget(v,$){if(v.charCodeAt(0)===E||v.charCodeAt(0)===R&&v.charCodeAt(1)!==E){throw new Error(`Export should be relative path and start with "./", got ${JSON.stringify(v)}.`)}const j=v.charCodeAt(v.length-1)===E;if(j!==$){throw new Error($?`Expecting folder to folder mapping. ${JSON.stringify(v)} should end with "/"`:`Expecting file to file mapping. ${JSON.stringify(v)} should not end with "/"`)}}function assertImportTarget(v,R){const $=v.charCodeAt(v.length-1)===E;if($!==R){throw new Error(R?`Expecting folder to folder mapping. ${JSON.stringify(v)} should end with "/"`:`Expecting file to file mapping. ${JSON.stringify(v)} should not end with "/"`)}}function findMatch(v,E){if(v.length===0){const v=E.files.get("");return v?[v,1]:null}if(E.children===null&&E.folder===null&&E.wildcards===null){const R=E.files.get(v);return R?[R,v.length+1]:null}let R=E;let $=0;let j=v.indexOf("/",0);let N=null;const applyFolderMapping=()=>{const v=R.folder;if(v){if(N){N[0]=v;N[1]=-$-1}else{N=[v,-$-1]}}};const applyWildcardMappings=(v,E)=>{if(v){for(const[R,j]of v){if(E.startsWith(R)){if(!N){N=[j,$+R.length]}else if(N[1]<$+R.length){N[0]=j;N[1]=$+R.length}}}}};while(j!==-1){applyFolderMapping();const E=R.wildcards;if(!E&&R.children===null)return N;const q=v.slice($,j);applyWildcardMappings(E,q);if(R.children===null)return N;const G=R.children.get(q);if(!G){return N}R=G;$=j+1;j=v.indexOf("/",$)}const q=$>0?v.slice($):v;const G=R.files.get(q);if(G){return[G,v.length+1]}applyFolderMapping();applyWildcardMappings(R.wildcards,q);return N}function isConditionalMapping(v){return v!==null&&typeof v==="object"&&!Array.isArray(v)}function directMapping(v,E,R,$,j){if(R===null)return[];if(typeof R==="string"){return[targetMapping(v,E,R,j)]}const N=[];for(const q of R){if(typeof q==="string"){N.push(targetMapping(v,E,q,j));continue}const R=conditionalMapping(q,$);if(!R)continue;const G=directMapping(v,E,R,$,j);for(const v of G){N.push(v)}}return N}function targetMapping(v,E,R,$){if(v===undefined){$(R,false);return R}if(E){$(R,true);return R+v}$(R,false);return R.replace(/\*/g,v.replace(/\$/g,"$$"))}function conditionalMapping(v,E){let R=[[v,Object.keys(v),0]];e:while(R.length>0){const[v,$,j]=R[R.length-1];const N=$.length-1;for(let q=j;q<$.length;q++){const j=$[q];if(q!==N){if(j==="default"){throw new Error("Default condition should be last one")}}else if(j==="default"){const E=v[j];if(isConditionalMapping(E)){const v=E;R[R.length-1][2]=q+1;R.push([v,Object.keys(v),0]);continue e}return E}if(E.has(j)){const E=v[j];if(isConditionalMapping(E)){const v=E;R[R.length-1][2]=q+1;R.push([v,Object.keys(v),0]);continue e}return E}}R.pop()}return null}function createNode(){return{children:null,folder:null,wildcards:null,files:new Map}}function walkPath(v,E,R){if(E.length===0){v.folder=R;return}let $=v;let j=0;let N=E.indexOf("/",0);while(N!==-1){const v=E.slice(j,N);let R;if($.children===null){R=createNode();$.children=new Map;$.children.set(v,R)}else{R=$.children.get(v);if(!R){R=createNode();$.children.set(v,R)}}$=R;j=N+1;N=E.indexOf("/",j)}if(j>=E.length){$.folder=R}else{const v=j>0?E.slice(j):E;if(v.endsWith("*")){if($.wildcards===null)$.wildcards=new Map;$.wildcards.set(v.slice(0,-1),R)}else{$.files.set(v,R)}}}function buildExportsFieldPathTree(v){const $=createNode();if(typeof v==="string"){$.files.set("",v);return $}else if(Array.isArray(v)){$.files.set("",v.slice());return $}const j=Object.keys(v);for(let N=0;N{switch(v.length){case 0:return Me.Empty;case 1:{const E=v.charCodeAt(0);switch(E){case le:return Me.Relative;case N:return Me.AbsolutePosix;case j:return Me.Internal}return Me.Normal}case 2:{const E=v.charCodeAt(0);switch(E){case le:{const E=v.charCodeAt(1);switch(E){case le:case N:return Me.Relative}return Me.Normal}case N:return Me.AbsolutePosix;case j:return Me.Internal}const R=v.charCodeAt(1);if(R===me){if(E>=G&&E<=ie||E>=ae&&E<=ce){return Me.AbsoluteWin}}return Me.Normal}}const E=v.charCodeAt(0);switch(E){case le:{const E=v.charCodeAt(1);switch(E){case N:return Me.Relative;case le:{const E=v.charCodeAt(2);if(E===N)return Me.Relative;return Me.Normal}}return Me.Normal}case N:return Me.AbsolutePosix;case j:return Me.Internal}const R=v.charCodeAt(1);if(R===me){const R=v.charCodeAt(2);if((R===q||R===N)&&(E>=G&&E<=ie||E>=ae&&E<=ce)){return Me.AbsoluteWin}}return Me.Normal};E.getType=getType;const normalize=v=>{switch(getType(v)){case Me.Empty:return v;case Me.AbsoluteWin:return Ie(v);case Me.Relative:{const E=_e(v);return getType(E)===Me.Relative?E:`./${E}`}}return _e(v)};E.normalize=normalize;const join=(v,E)=>{if(!E)return normalize(v);const R=getType(E);switch(R){case Me.AbsolutePosix:return _e(E);case Me.AbsoluteWin:return Ie(E)}switch(getType(v)){case Me.Normal:case Me.Relative:case Me.AbsolutePosix:return _e(`${v}/${E}`);case Me.AbsoluteWin:return Ie(`${v}\\${E}`)}switch(R){case Me.Empty:return v;case Me.Relative:{const E=_e(v);return getType(E)===Me.Relative?E:`./${E}`}}return _e(v)};E.join=join;const Oe=new Map;const cachedJoin=(v,E)=>{let R;let $=Oe.get(v);if($===undefined){Oe.set(v,$=new Map)}else{R=$.get(E);if(R!==undefined)return R}R=join(v,E);$.set(E,R);return R};E.cachedJoin=cachedJoin;const checkImportsExportsFieldTarget=v=>{let E=0;let R=v.indexOf("/",1);let $=0;while(R!==-1){const j=v.slice(E,R);switch(j){case"..":{$--;if($<0)return new Error(`Trying to access out of package scope. Requesting ${v}`);break}case".":break;default:$++;break}E=R+1;R=v.indexOf("/",E)}};E.checkImportsExportsFieldTarget=checkImportsExportsFieldTarget},32411:function(v,E,R){"use strict";const $=R(721);class Definition{constructor(v,E,R,$,j,N){this.type=v;this.name=E;this.node=R;this.parent=$;this.index=j;this.kind=N}}class ParameterDefinition extends Definition{constructor(v,E,R,j){super($.Parameter,v,E,null,R,null);this.rest=j}}v.exports={ParameterDefinition:ParameterDefinition,Definition:Definition}},77736:function(v,E,R){"use strict";const $=R(39491);const j=R(56138);const N=R(41759);const q=R(32858);const G=R(721);const ie=R(29105).Scope;const ae=R(13348).i8;function defaultOptions(){return{optimistic:false,directive:false,nodejsScope:false,impliedStrict:false,sourceType:"script",ecmaVersion:5,childVisitorKeys:null,fallback:"iteration"}}function updateDeeply(v,E){function isHashObject(v){return typeof v==="object"&&v instanceof Object&&!(v instanceof Array)&&!(v instanceof RegExp)}for(const R in E){if(Object.prototype.hasOwnProperty.call(E,R)){const $=E[R];if(isHashObject($)){if(isHashObject(v[R])){updateDeeply(v[R],$)}else{v[R]=updateDeeply({},$)}}else{v[R]=$}}}return v}function analyze(v,E){const R=updateDeeply(defaultOptions(),E);const q=new j(R);const G=new N(R,q);G.visit(v);$(q.__currentScope===null,"currentScope should be null.");return q}v.exports={version:ae,Reference:q,Variable:G,Scope:ie,ScopeManager:j,analyze:analyze}},26274:function(v,E,R){"use strict";const $=R(66057).Syntax;const j=R(41350);function getLast(v){return v[v.length-1]||null}class PatternVisitor extends j.Visitor{static isPattern(v){const E=v.type;return E===$.Identifier||E===$.ObjectPattern||E===$.ArrayPattern||E===$.SpreadElement||E===$.RestElement||E===$.AssignmentPattern}constructor(v,E,R){super(null,v);this.rootPattern=E;this.callback=R;this.assignments=[];this.rightHandNodes=[];this.restElements=[]}Identifier(v){const E=getLast(this.restElements);this.callback(v,{topLevel:v===this.rootPattern,rest:E!==null&&E!==undefined&&E.argument===v,assignments:this.assignments})}Property(v){if(v.computed){this.rightHandNodes.push(v.key)}this.visit(v.value)}ArrayPattern(v){for(let E=0,R=v.elements.length;E{this.rightHandNodes.push(v)}));this.visit(v.callee)}}v.exports=PatternVisitor},32858:function(v){"use strict";const E=1;const R=2;const $=E|R;class Reference{constructor(v,E,R,$,j,N,q){this.identifier=v;this.from=E;this.tainted=false;this.resolved=null;this.flag=R;if(this.isWrite()){this.writeExpr=$;this.partial=N;this.init=q}this.__maybeImplicitGlobal=j}isStatic(){return!this.tainted&&this.resolved&&this.resolved.scope.isStatic()}isWrite(){return!!(this.flag&Reference.WRITE)}isRead(){return!!(this.flag&Reference.READ)}isReadOnly(){return this.flag===Reference.READ}isWriteOnly(){return this.flag===Reference.WRITE}isReadWrite(){return this.flag===Reference.RW}}Reference.READ=E;Reference.WRITE=R;Reference.RW=$;v.exports=Reference},41759:function(v,E,R){"use strict";const $=R(66057).Syntax;const j=R(41350);const N=R(32858);const q=R(721);const G=R(26274);const ie=R(32411);const ae=R(39491);const ce=ie.ParameterDefinition;const le=ie.Definition;function traverseIdentifierInPattern(v,E,R,$){const j=new G(v,E,$);j.visit(E);if(R!==null&&R!==undefined){j.rightHandNodes.forEach(R.visit,R)}}class Importer extends j.Visitor{constructor(v,E){super(null,E.options);this.declaration=v;this.referencer=E}visitImport(v,E){this.referencer.visitPattern(v,(v=>{this.referencer.currentScope().__define(v,new le(q.ImportBinding,v,E,this.declaration,null,null))}))}ImportNamespaceSpecifier(v){const E=v.local||v.id;if(E){this.visitImport(E,v)}}ImportDefaultSpecifier(v){const E=v.local||v.id;this.visitImport(E,v)}ImportSpecifier(v){const E=v.local||v.id;if(v.name){this.visitImport(v.name,v)}else{this.visitImport(E,v)}}}class Referencer extends j.Visitor{constructor(v,E){super(null,v);this.options=v;this.scopeManager=E;this.parent=null;this.isInnerMethodDefinition=false}currentScope(){return this.scopeManager.__currentScope}close(v){while(this.currentScope()&&v===this.currentScope().block){this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}}pushInnerMethodDefinition(v){const E=this.isInnerMethodDefinition;this.isInnerMethodDefinition=v;return E}popInnerMethodDefinition(v){this.isInnerMethodDefinition=v}referencingDefaultValue(v,E,R,$){const j=this.currentScope();E.forEach((E=>{j.__referencing(v,N.WRITE,E.right,R,v!==E.left,$)}))}visitPattern(v,E,R){let $=E;let j=R;if(typeof E==="function"){j=E;$={processRightHandNodes:false}}traverseIdentifierInPattern(this.options,v,$.processRightHandNodes?this:null,j)}visitFunction(v){let E,R;if(v.type===$.FunctionDeclaration){this.currentScope().__define(v.id,new le(q.FunctionName,v.id,v,null,null,null))}if(v.type===$.FunctionExpression&&v.id){this.scopeManager.__nestFunctionExpressionNameScope(v)}this.scopeManager.__nestFunctionScope(v,this.isInnerMethodDefinition);const j=this;function visitPatternCallback(R,$){j.currentScope().__define(R,new ce(R,v,E,$.rest));j.referencingDefaultValue(R,$.assignments,null,true)}for(E=0,R=v.params.length;E{this.currentScope().__define(E,new ce(E,v,v.params.length,true))}))}if(v.body){if(v.body.type===$.BlockStatement){this.visitChildren(v.body)}else{this.visit(v.body)}}this.close(v)}visitClass(v){if(v.type===$.ClassDeclaration){this.currentScope().__define(v.id,new le(q.ClassName,v.id,v,null,null,null))}this.visit(v.superClass);this.scopeManager.__nestClassScope(v);if(v.id){this.currentScope().__define(v.id,new le(q.ClassName,v.id,v))}this.visit(v.body);this.close(v)}visitProperty(v){let E;if(v.computed){this.visit(v.key)}const R=v.type===$.MethodDefinition;if(R){E=this.pushInnerMethodDefinition(true)}this.visit(v.value);if(R){this.popInnerMethodDefinition(E)}}visitForIn(v){if(v.left.type===$.VariableDeclaration&&v.left.kind!=="var"){this.scopeManager.__nestForScope(v)}if(v.left.type===$.VariableDeclaration){this.visit(v.left);this.visitPattern(v.left.declarations[0].id,(E=>{this.currentScope().__referencing(E,N.WRITE,v.right,null,true,true)}))}else{this.visitPattern(v.left,{processRightHandNodes:true},((E,R)=>{let $=null;if(!this.currentScope().isStrict){$={pattern:E,node:v}}this.referencingDefaultValue(E,R.assignments,$,false);this.currentScope().__referencing(E,N.WRITE,v.right,$,true,false)}))}this.visit(v.right);this.visit(v.body);this.close(v)}visitVariableDeclaration(v,E,R,$){const j=R.declarations[$];const q=j.init;this.visitPattern(j.id,{processRightHandNodes:true},((G,ie)=>{v.__define(G,new le(E,G,j,R,$,R.kind));this.referencingDefaultValue(G,ie.assignments,null,true);if(q){this.currentScope().__referencing(G,N.WRITE,q,null,!ie.topLevel,true)}}))}AssignmentExpression(v){if(G.isPattern(v.left)){if(v.operator==="="){this.visitPattern(v.left,{processRightHandNodes:true},((E,R)=>{let $=null;if(!this.currentScope().isStrict){$={pattern:E,node:v}}this.referencingDefaultValue(E,R.assignments,$,false);this.currentScope().__referencing(E,N.WRITE,v.right,$,!R.topLevel,false)}))}else{this.currentScope().__referencing(v.left,N.RW,v.right)}}else{this.visit(v.left)}this.visit(v.right)}CatchClause(v){this.scopeManager.__nestCatchScope(v);this.visitPattern(v.param,{processRightHandNodes:true},((E,R)=>{this.currentScope().__define(E,new le(q.CatchClause,v.param,v,null,null,null));this.referencingDefaultValue(E,R.assignments,null,true)}));this.visit(v.body);this.close(v)}Program(v){this.scopeManager.__nestGlobalScope(v);if(this.scopeManager.__isNodejsScope()){this.currentScope().isStrict=false;this.scopeManager.__nestFunctionScope(v,false)}if(this.scopeManager.__isES6()&&this.scopeManager.isModule()){this.scopeManager.__nestModuleScope(v)}if(this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()){this.currentScope().isStrict=true}this.visitChildren(v);this.close(v)}Identifier(v){this.currentScope().__referencing(v)}UpdateExpression(v){if(G.isPattern(v.argument)){this.currentScope().__referencing(v.argument,N.RW,null)}else{this.visitChildren(v)}}MemberExpression(v){this.visit(v.object);if(v.computed){this.visit(v.property)}}Property(v){this.visitProperty(v)}MethodDefinition(v){this.visitProperty(v)}BreakStatement(){}ContinueStatement(){}LabeledStatement(v){this.visit(v.body)}ForStatement(v){if(v.init&&v.init.type===$.VariableDeclaration&&v.init.kind!=="var"){this.scopeManager.__nestForScope(v)}this.visitChildren(v);this.close(v)}ClassExpression(v){this.visitClass(v)}ClassDeclaration(v){this.visitClass(v)}CallExpression(v){if(!this.scopeManager.__ignoreEval()&&v.callee.type===$.Identifier&&v.callee.name==="eval"){this.currentScope().variableScope.__detectEval()}this.visitChildren(v)}BlockStatement(v){if(this.scopeManager.__isES6()){this.scopeManager.__nestBlockScope(v)}this.visitChildren(v);this.close(v)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(v){this.visit(v.object);this.scopeManager.__nestWithScope(v);this.visit(v.body);this.close(v)}VariableDeclaration(v){const E=v.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let R=0,$=v.declarations.length;R<$;++R){const $=v.declarations[R];this.visitVariableDeclaration(E,q.Variable,v,R);if($.init){this.visit($.init)}}}SwitchStatement(v){this.visit(v.discriminant);if(this.scopeManager.__isES6()){this.scopeManager.__nestSwitchScope(v)}for(let E=0,R=v.cases.length;E=5}__get(v){return this.__nodeToScope.get(v)}getDeclaredVariables(v){return this.__declaredVariables.get(v)||[]}acquire(v,E){function predicate(v){if(v.type==="function"&&v.functionExpressionScope){return false}return true}const R=this.__get(v);if(!R||R.length===0){return null}if(R.length===1){return R[0]}if(E){for(let v=R.length-1;v>=0;--v){const E=R[v];if(predicate(E)){return E}}}else{for(let v=0,E=R.length;v=6}}v.exports=ScopeManager},29105:function(v,E,R){"use strict";const $=R(66057).Syntax;const j=R(32858);const N=R(721);const q=R(32411).Definition;const G=R(39491);function isStrictScope(v,E,R,j){let N;if(v.upper&&v.upper.isStrict){return true}if(R){return true}if(v.type==="class"||v.type==="module"){return true}if(v.type==="block"||v.type==="switch"){return false}if(v.type==="function"){if(E.type===$.ArrowFunctionExpression&&E.body.type!==$.BlockStatement){return false}if(E.type===$.Program){N=E}else{N=E.body}if(!N){return false}}else if(v.type==="global"){N=E}else{return false}if(j){for(let v=0,E=N.body.length;v0&&$.every(shouldBeStatically)}__staticCloseRef(v){if(!this.__resolve(v)){this.__delegateToUpperScope(v)}}__dynamicCloseRef(v){let E=this;do{E.through.push(v);E=E.upper}while(E)}__globalCloseRef(v){if(this.__shouldStaticallyCloseForGlobal(v)){this.__staticCloseRef(v)}else{this.__dynamicCloseRef(v)}}__close(v){let E;if(this.__shouldStaticallyClose(v)){E=this.__staticCloseRef}else if(this.type!=="global"){E=this.__dynamicCloseRef}else{E=this.__globalCloseRef}for(let v=0,R=this.__left.length;vv.name.range[0]>=R)))}}class ForScope extends Scope{constructor(v,E,R){super(v,"for",E,R,false)}}class ClassScope extends Scope{constructor(v,E,R){super(v,"class",E,R,false)}}v.exports={Scope:Scope,GlobalScope:GlobalScope,ModuleScope:ModuleScope,FunctionExpressionNameScope:FunctionExpressionNameScope,CatchScope:CatchScope,WithScope:WithScope,BlockScope:BlockScope,SwitchScope:SwitchScope,FunctionScope:FunctionScope,ForScope:ForScope,ClassScope:ClassScope}},721:function(v){"use strict";class Variable{constructor(v,E){this.name=v;this.identifiers=[];this.references=[];this.defs=[];this.tainted=false;this.stack=true;this.scope=E}}Variable.CatchClause="CatchClause";Variable.Parameter="Parameter";Variable.FunctionName="FunctionName";Variable.ClassName="ClassName";Variable.Variable="Variable";Variable.ImportBinding="ImportBinding";Variable.ImplicitGlobalVariable="ImplicitGlobalVariable";v.exports=Variable},41350:function(v,E,R){(function(){"use strict";var v=R(40274);function isNode(v){if(v==null){return false}return typeof v==="object"&&typeof v.type==="string"}function isProperty(E,R){return(E===v.Syntax.ObjectExpression||E===v.Syntax.ObjectPattern)&&R==="properties"}function Visitor(E,R){R=R||{};this.__visitor=E||this;this.__childVisitorKeys=R.childVisitorKeys?Object.assign({},v.VisitorKeys,R.childVisitorKeys):v.VisitorKeys;if(R.fallback==="iteration"){this.__fallback=Object.keys}else if(typeof R.fallback==="function"){this.__fallback=R.fallback}}Visitor.prototype.visitChildren=function(E){var R,$,j,N,q,G,ie;if(E==null){return}R=E.type||v.Syntax.Property;$=this.__childVisitorKeys[R];if(!$){if(this.__fallback){$=this.__fallback(E)}else{throw new Error("Unknown node type "+R+".")}}for(j=0,N=$.length;j>>1;N=j+R;if(E(v[N])){$=R}else{j=N+1;$-=R+1}}return j}E={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};j={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};N={};q={};G={};$={Break:N,Skip:q,Remove:G};function Reference(v,E){this.parent=v;this.key=E}Reference.prototype.replace=function replace(v){this.parent[this.key]=v};Reference.prototype.remove=function remove(){if(Array.isArray(this.parent)){this.parent.splice(this.key,1);return true}else{this.replace(null);return false}};function Element(v,E,R,$){this.node=v;this.path=E;this.wrap=R;this.ref=$}function Controller(){}Controller.prototype.path=function path(){var v,E,R,$,j,N;function addToPath(v,E){if(Array.isArray(E)){for(R=0,$=E.length;R<$;++R){v.push(E[R])}}else{v.push(E)}}if(!this.__current.path){return null}j=[];for(v=2,E=this.__leavelist.length;v=0){ce=_e[le];Ie=G[ce];if(!Ie){continue}if(Array.isArray(Ie)){me=Ie.length;while((me-=1)>=0){if(!Ie[me]){continue}if(isProperty(ie,_e[le])){j=new Element(Ie[me],[ce,me],"Property",null)}else if(isNode(Ie[me])){j=new Element(Ie[me],[ce,me],null,null)}else{continue}R.push(j)}}else if(isNode(Ie)){R.push(new Element(Ie,ce,null,null))}}}}};Controller.prototype.replace=function replace(v,E){var R,$,j,ie,ae,ce,le,me,_e,Ie,Me,Oe,Te;function removeElem(v){var E,$,j,N;if(v.ref.remove()){$=v.ref.key;N=v.ref.parent;E=R.length;while(E--){j=R[E];if(j.ref&&j.ref.parent===N){if(j.ref.key<$){break}--j.ref.key}}}}this.__initialize(v,E);Me={};R=this.__worklist;$=this.__leavelist;Oe={root:v};ce=new Element(v,null,null,new Reference(Oe,"root"));R.push(ce);$.push(ce);while(R.length){ce=R.pop();if(ce===Me){ce=$.pop();ae=this.__execute(E.leave,ce);if(ae!==undefined&&ae!==N&&ae!==q&&ae!==G){ce.ref.replace(ae)}if(this.__state===G||ae===G){removeElem(ce)}if(this.__state===N||ae===N){return Oe.root}continue}ae=this.__execute(E.enter,ce);if(ae!==undefined&&ae!==N&&ae!==q&&ae!==G){ce.ref.replace(ae);ce.node=ae}if(this.__state===G||ae===G){removeElem(ce);ce.node=null}if(this.__state===N||ae===N){return Oe.root}j=ce.node;if(!j){continue}R.push(Me);$.push(ce);if(this.__state===q||ae===q){continue}ie=j.type||ce.wrap;_e=this.__keys[ie];if(!_e){if(this.__fallback){_e=this.__fallback(j)}else{throw new Error("Unknown node type "+ie+".")}}le=_e.length;while((le-=1)>=0){Te=_e[le];Ie=j[Te];if(!Ie){continue}if(Array.isArray(Ie)){me=Ie.length;while((me-=1)>=0){if(!Ie[me]){continue}if(isProperty(ie,_e[le])){ce=new Element(Ie[me],[Te,me],"Property",new Reference(Ie,me))}else if(isNode(Ie[me])){ce=new Element(Ie[me],[Te,me],null,new Reference(Ie,me))}else{continue}R.push(ce)}}else if(isNode(Ie)){R.push(new Element(Ie,Te,null,new Reference(j,Te)))}}}return Oe.root};function traverse(v,E){var R=new Controller;return R.traverse(v,E)}function replace(v,E){var R=new Controller;return R.replace(v,E)}function extendCommentRange(v,E){var R;R=upperBound(E,(function search(E){return E.range[0]>v.range[0]}));v.extendedRange=[v.range[0],v.range[1]];if(R!==E.length){v.extendedRange[1]=E[R].range[0]}R-=1;if(R>=0){v.extendedRange[0]=E[R].range[1]}return v}function attachComments(v,E,R){var j=[],N,q,G,ie;if(!v.range){throw new Error("attachComments needs range information")}if(!R.length){if(E.length){for(G=0,q=E.length;Gv.range[0]){break}if(E.extendedRange[1]===v.range[0]){if(!v.leadingComments){v.leadingComments=[]}v.leadingComments.push(E);j.splice(ie,1)}else{ie+=1}}if(ie===j.length){return $.Break}if(j[ie].extendedRange[0]>v.range[1]){return $.Skip}}});ie=0;traverse(v,{leave:function(v){var E;while(iev.range[1]){return $.Skip}}});return v}v.version=R(61752).i8;v.Syntax=E;v.traverse=traverse;v.replace=replace;v.attachComments=attachComments;v.VisitorKeys=j;v.VisitorOption=$;v.Controller=Controller;v.cloneEnvironment=function(){return clone({})};return v})(E)},40274:function(v,E){(function clone(v){"use strict";var E,R,$,j,N,q;function deepCopy(v){var E={},R,$;for(R in v){if(v.hasOwnProperty(R)){$=v[R];if(typeof $==="object"&&$!==null){E[R]=deepCopy($)}else{E[R]=$}}}return E}function upperBound(v,E){var R,$,j,N;$=v.length;j=0;while($){R=$>>>1;N=j+R;if(E(v[N])){$=R}else{j=N+1;$-=R+1}}return j}E={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};$={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};j={};N={};q={};R={Break:j,Skip:N,Remove:q};function Reference(v,E){this.parent=v;this.key=E}Reference.prototype.replace=function replace(v){this.parent[this.key]=v};Reference.prototype.remove=function remove(){if(Array.isArray(this.parent)){this.parent.splice(this.key,1);return true}else{this.replace(null);return false}};function Element(v,E,R,$){this.node=v;this.path=E;this.wrap=R;this.ref=$}function Controller(){}Controller.prototype.path=function path(){var v,E,R,$,j,N;function addToPath(v,E){if(Array.isArray(E)){for(R=0,$=E.length;R<$;++R){v.push(E[R])}}else{v.push(E)}}if(!this.__current.path){return null}j=[];for(v=2,E=this.__leavelist.length;v=0;--R){if(v[R].node===E){return true}}return false}Controller.prototype.traverse=function traverse(v,E){var R,$,q,G,ie,ae,ce,le,me,_e,Ie,Me;this.__initialize(v,E);Me={};R=this.__worklist;$=this.__leavelist;R.push(new Element(v,null,null,null));$.push(new Element(null,null,null,null));while(R.length){q=R.pop();if(q===Me){q=$.pop();ae=this.__execute(E.leave,q);if(this.__state===j||ae===j){return}continue}if(q.node){ae=this.__execute(E.enter,q);if(this.__state===j||ae===j){return}R.push(Me);$.push(q);if(this.__state===N||ae===N){continue}G=q.node;ie=G.type||q.wrap;_e=this.__keys[ie];if(!_e){if(this.__fallback){_e=this.__fallback(G)}else{throw new Error("Unknown node type "+ie+".")}}le=_e.length;while((le-=1)>=0){ce=_e[le];Ie=G[ce];if(!Ie){continue}if(Array.isArray(Ie)){me=Ie.length;while((me-=1)>=0){if(!Ie[me]){continue}if(candidateExistsInLeaveList($,Ie[me])){continue}if(isProperty(ie,_e[le])){q=new Element(Ie[me],[ce,me],"Property",null)}else if(isNode(Ie[me])){q=new Element(Ie[me],[ce,me],null,null)}else{continue}R.push(q)}}else if(isNode(Ie)){if(candidateExistsInLeaveList($,Ie)){continue}R.push(new Element(Ie,ce,null,null))}}}}};Controller.prototype.replace=function replace(v,E){var R,$,G,ie,ae,ce,le,me,_e,Ie,Me,Oe,Te;function removeElem(v){var E,$,j,N;if(v.ref.remove()){$=v.ref.key;N=v.ref.parent;E=R.length;while(E--){j=R[E];if(j.ref&&j.ref.parent===N){if(j.ref.key<$){break}--j.ref.key}}}}this.__initialize(v,E);Me={};R=this.__worklist;$=this.__leavelist;Oe={root:v};ce=new Element(v,null,null,new Reference(Oe,"root"));R.push(ce);$.push(ce);while(R.length){ce=R.pop();if(ce===Me){ce=$.pop();ae=this.__execute(E.leave,ce);if(ae!==undefined&&ae!==j&&ae!==N&&ae!==q){ce.ref.replace(ae)}if(this.__state===q||ae===q){removeElem(ce)}if(this.__state===j||ae===j){return Oe.root}continue}ae=this.__execute(E.enter,ce);if(ae!==undefined&&ae!==j&&ae!==N&&ae!==q){ce.ref.replace(ae);ce.node=ae}if(this.__state===q||ae===q){removeElem(ce);ce.node=null}if(this.__state===j||ae===j){return Oe.root}G=ce.node;if(!G){continue}R.push(Me);$.push(ce);if(this.__state===N||ae===N){continue}ie=G.type||ce.wrap;_e=this.__keys[ie];if(!_e){if(this.__fallback){_e=this.__fallback(G)}else{throw new Error("Unknown node type "+ie+".")}}le=_e.length;while((le-=1)>=0){Te=_e[le];Ie=G[Te];if(!Ie){continue}if(Array.isArray(Ie)){me=Ie.length;while((me-=1)>=0){if(!Ie[me]){continue}if(isProperty(ie,_e[le])){ce=new Element(Ie[me],[Te,me],"Property",new Reference(Ie,me))}else if(isNode(Ie[me])){ce=new Element(Ie[me],[Te,me],null,new Reference(Ie,me))}else{continue}R.push(ce)}}else if(isNode(Ie)){R.push(new Element(Ie,Te,null,new Reference(G,Te)))}}}return Oe.root};function traverse(v,E){var R=new Controller;return R.traverse(v,E)}function replace(v,E){var R=new Controller;return R.replace(v,E)}function extendCommentRange(v,E){var R;R=upperBound(E,(function search(E){return E.range[0]>v.range[0]}));v.extendedRange=[v.range[0],v.range[1]];if(R!==E.length){v.extendedRange[1]=E[R].range[0]}R-=1;if(R>=0){v.extendedRange[0]=E[R].range[1]}return v}function attachComments(v,E,$){var j=[],N,q,G,ie;if(!v.range){throw new Error("attachComments needs range information")}if(!$.length){if(E.length){for(G=0,q=E.length;Gv.range[0]){break}if(E.extendedRange[1]===v.range[0]){if(!v.leadingComments){v.leadingComments=[]}v.leadingComments.push(E);j.splice(ie,1)}else{ie+=1}}if(ie===j.length){return R.Break}if(j[ie].extendedRange[0]>v.range[1]){return R.Skip}}});ie=0;traverse(v,{leave:function(v){var E;while(iev.range[1]){return R.Skip}}});return v}v.Syntax=E;v.traverse=traverse;v.replace=replace;v.attachComments=attachComments;v.VisitorKeys=$;v.VisitorOption=R;v.Controller=Controller;v.cloneEnvironment=function(){return clone({})};return v})(E)},72544:function(v){v.exports=function(v,E){if(typeof v!=="string"){throw new TypeError("Expected a string")}var R=String(v);var $="";var j=E?!!E.extended:false;var N=E?!!E.globstar:false;var q=false;var G=E&&typeof E.flags==="string"?E.flags:"";var ie;for(var ae=0,ce=R.length;ae1&&(le==="/"||le===undefined)&&(_e==="/"||_e===undefined);if(Ie){$+="((?:[^/]*(?:/|$))*)";ae++}else{$+="([^/]*)"}}break;default:$+=ie}}if(!G||!~G.indexOf("g")){$="^"+$+"$"}return new RegExp($,G)}},96045:function(v){"use strict";v.exports=clone;var E=Object.getPrototypeOf||function(v){return v.__proto__};function clone(v){if(v===null||typeof v!=="object")return v;if(v instanceof Object)var R={__proto__:E(v)};else var R=Object.create(null);Object.getOwnPropertyNames(v).forEach((function(E){Object.defineProperty(R,E,Object.getOwnPropertyDescriptor(v,E))}));return R}},41653:function(v,E,R){var $=R(57147);var j=R(50008);var N=R(17448);var q=R(96045);var G=R(73837);var ie;var ae;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){ie=Symbol.for("graceful-fs.queue");ae=Symbol.for("graceful-fs.previous")}else{ie="___graceful-fs.queue";ae="___graceful-fs.previous"}function noop(){}function publishQueue(v,E){Object.defineProperty(v,ie,{get:function(){return E}})}var ce=noop;if(G.debuglog)ce=G.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))ce=function(){var v=G.format.apply(G,arguments);v="GFS4: "+v.split(/\n/).join("\nGFS4: ");console.error(v)};if(!$[ie]){var le=global[ie]||[];publishQueue($,le);$.close=function(v){function close(E,R){return v.call($,E,(function(v){if(!v){resetQueue()}if(typeof R==="function")R.apply(this,arguments)}))}Object.defineProperty(close,ae,{value:v});return close}($.close);$.closeSync=function(v){function closeSync(E){v.apply($,arguments);resetQueue()}Object.defineProperty(closeSync,ae,{value:v});return closeSync}($.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){ce($[ie]);R(39491).equal($[ie].length,0)}))}}if(!global[ie]){publishQueue(global,$[ie])}v.exports=patch(q($));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!$.__patched){v.exports=patch($);$.__patched=true}function patch(v){j(v);v.gracefulify=patch;v.createReadStream=createReadStream;v.createWriteStream=createWriteStream;var E=v.readFile;v.readFile=readFile;function readFile(v,R,$){if(typeof R==="function")$=R,R=null;return go$readFile(v,R,$);function go$readFile(v,R,$,j){return E(v,R,(function(E){if(E&&(E.code==="EMFILE"||E.code==="ENFILE"))enqueue([go$readFile,[v,R,$],E,j||Date.now(),Date.now()]);else{if(typeof $==="function")$.apply(this,arguments)}}))}}var R=v.writeFile;v.writeFile=writeFile;function writeFile(v,E,$,j){if(typeof $==="function")j=$,$=null;return go$writeFile(v,E,$,j);function go$writeFile(v,E,$,j,N){return R(v,E,$,(function(R){if(R&&(R.code==="EMFILE"||R.code==="ENFILE"))enqueue([go$writeFile,[v,E,$,j],R,N||Date.now(),Date.now()]);else{if(typeof j==="function")j.apply(this,arguments)}}))}}var $=v.appendFile;if($)v.appendFile=appendFile;function appendFile(v,E,R,j){if(typeof R==="function")j=R,R=null;return go$appendFile(v,E,R,j);function go$appendFile(v,E,R,j,N){return $(v,E,R,(function($){if($&&($.code==="EMFILE"||$.code==="ENFILE"))enqueue([go$appendFile,[v,E,R,j],$,N||Date.now(),Date.now()]);else{if(typeof j==="function")j.apply(this,arguments)}}))}}var q=v.copyFile;if(q)v.copyFile=copyFile;function copyFile(v,E,R,$){if(typeof R==="function"){$=R;R=0}return go$copyFile(v,E,R,$);function go$copyFile(v,E,R,$,j){return q(v,E,R,(function(N){if(N&&(N.code==="EMFILE"||N.code==="ENFILE"))enqueue([go$copyFile,[v,E,R,$],N,j||Date.now(),Date.now()]);else{if(typeof $==="function")$.apply(this,arguments)}}))}}var G=v.readdir;v.readdir=readdir;function readdir(v,E,R){if(typeof E==="function")R=E,E=null;return go$readdir(v,E,R);function go$readdir(v,E,R,$){return G(v,E,(function(j,N){if(j&&(j.code==="EMFILE"||j.code==="ENFILE"))enqueue([go$readdir,[v,E,R],j,$||Date.now(),Date.now()]);else{if(N&&N.sort)N.sort();if(typeof R==="function")R.call(this,j,N)}}))}}if(process.version.substr(0,4)==="v0.8"){var ie=N(v);ReadStream=ie.ReadStream;WriteStream=ie.WriteStream}var ae=v.ReadStream;if(ae){ReadStream.prototype=Object.create(ae.prototype);ReadStream.prototype.open=ReadStream$open}var ce=v.WriteStream;if(ce){WriteStream.prototype=Object.create(ce.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(v,"ReadStream",{get:function(){return ReadStream},set:function(v){ReadStream=v},enumerable:true,configurable:true});Object.defineProperty(v,"WriteStream",{get:function(){return WriteStream},set:function(v){WriteStream=v},enumerable:true,configurable:true});var le=ReadStream;Object.defineProperty(v,"FileReadStream",{get:function(){return le},set:function(v){le=v},enumerable:true,configurable:true});var me=WriteStream;Object.defineProperty(v,"FileWriteStream",{get:function(){return me},set:function(v){me=v},enumerable:true,configurable:true});function ReadStream(v,E){if(this instanceof ReadStream)return ae.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var v=this;open(v.path,v.flags,v.mode,(function(E,R){if(E){if(v.autoClose)v.destroy();v.emit("error",E)}else{v.fd=R;v.emit("open",R);v.read()}}))}function WriteStream(v,E){if(this instanceof WriteStream)return ce.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var v=this;open(v.path,v.flags,v.mode,(function(E,R){if(E){v.destroy();v.emit("error",E)}else{v.fd=R;v.emit("open",R)}}))}function createReadStream(E,R){return new v.ReadStream(E,R)}function createWriteStream(E,R){return new v.WriteStream(E,R)}var _e=v.open;v.open=open;function open(v,E,R,$){if(typeof R==="function")$=R,R=null;return go$open(v,E,R,$);function go$open(v,E,R,$,j){return _e(v,E,R,(function(N,q){if(N&&(N.code==="EMFILE"||N.code==="ENFILE"))enqueue([go$open,[v,E,R,$],N,j||Date.now(),Date.now()]);else{if(typeof $==="function")$.apply(this,arguments)}}))}}return v}function enqueue(v){ce("ENQUEUE",v[0].name,v[1]);$[ie].push(v);retry()}var me;function resetQueue(){var v=Date.now();for(var E=0;E<$[ie].length;++E){if($[ie][E].length>2){$[ie][E][3]=v;$[ie][E][4]=v}}retry()}function retry(){clearTimeout(me);me=undefined;if($[ie].length===0)return;var v=$[ie].shift();var E=v[0];var R=v[1];var j=v[2];var N=v[3];var q=v[4];if(N===undefined){ce("RETRY",E.name,R);E.apply(null,R)}else if(Date.now()-N>=6e4){ce("TIMEOUT",E.name,R);var G=R.pop();if(typeof G==="function")G.call(null,j)}else{var ae=Date.now()-q;var le=Math.max(q-N,1);var _e=Math.min(le*1.2,100);if(ae>=_e){ce("RETRY",E.name,R);E.apply(null,R.concat([N]))}else{$[ie].push(v)}}if(me===undefined){me=setTimeout(retry,0)}}},17448:function(v,E,R){var $=R(12781).Stream;v.exports=legacy;function legacy(v){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(E,R){if(!(this instanceof ReadStream))return new ReadStream(E,R);$.call(this);var j=this;this.path=E;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;R=R||{};var N=Object.keys(R);for(var q=0,G=N.length;qthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){j._read()}));return}v.open(this.path,this.flags,this.mode,(function(v,E){if(v){j.emit("error",v);j.readable=false;return}j.fd=E;j.emit("open",E);j._read()}))}function WriteStream(E,R){if(!(this instanceof WriteStream))return new WriteStream(E,R);$.call(this);this.path=E;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;R=R||{};var j=Object.keys(R);for(var N=0,q=j.length;N= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=v.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},50008:function(v,E,R){var $=R(22057);var j=process.cwd;var N=null;var q=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!N)N=j.call(process);return N};try{process.cwd()}catch(v){}if(typeof process.chdir==="function"){var G=process.chdir;process.chdir=function(v){N=null;G.call(process,v)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,G)}v.exports=patch;function patch(v){if($.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(v)}if(!v.lutimes){patchLutimes(v)}v.chown=chownFix(v.chown);v.fchown=chownFix(v.fchown);v.lchown=chownFix(v.lchown);v.chmod=chmodFix(v.chmod);v.fchmod=chmodFix(v.fchmod);v.lchmod=chmodFix(v.lchmod);v.chownSync=chownFixSync(v.chownSync);v.fchownSync=chownFixSync(v.fchownSync);v.lchownSync=chownFixSync(v.lchownSync);v.chmodSync=chmodFixSync(v.chmodSync);v.fchmodSync=chmodFixSync(v.fchmodSync);v.lchmodSync=chmodFixSync(v.lchmodSync);v.stat=statFix(v.stat);v.fstat=statFix(v.fstat);v.lstat=statFix(v.lstat);v.statSync=statFixSync(v.statSync);v.fstatSync=statFixSync(v.fstatSync);v.lstatSync=statFixSync(v.lstatSync);if(!v.lchmod){v.lchmod=function(v,E,R){if(R)process.nextTick(R)};v.lchmodSync=function(){}}if(!v.lchown){v.lchown=function(v,E,R,$){if($)process.nextTick($)};v.lchownSync=function(){}}if(q==="win32"){v.rename=function(E){return function(R,$,j){var N=Date.now();var q=0;E(R,$,(function CB(G){if(G&&(G.code==="EACCES"||G.code==="EPERM")&&Date.now()-N<6e4){setTimeout((function(){v.stat($,(function(v,N){if(v&&v.code==="ENOENT")E(R,$,CB);else j(G)}))}),q);if(q<100)q+=10;return}if(j)j(G)}))}}(v.rename)}v.read=function(E){function read(R,$,j,N,q,G){var ie;if(G&&typeof G==="function"){var ae=0;ie=function(ce,le,me){if(ce&&ce.code==="EAGAIN"&&ae<10){ae++;return E.call(v,R,$,j,N,q,ie)}G.apply(this,arguments)}}return E.call(v,R,$,j,N,q,ie)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,E);return read}(v.read);v.readSync=function(E){return function(R,$,j,N,q){var G=0;while(true){try{return E.call(v,R,$,j,N,q)}catch(v){if(v.code==="EAGAIN"&&G<10){G++;continue}throw v}}}}(v.readSync);function patchLchmod(v){v.lchmod=function(E,R,j){v.open(E,$.O_WRONLY|$.O_SYMLINK,R,(function(E,$){if(E){if(j)j(E);return}v.fchmod($,R,(function(E){v.close($,(function(v){if(j)j(E||v)}))}))}))};v.lchmodSync=function(E,R){var j=v.openSync(E,$.O_WRONLY|$.O_SYMLINK,R);var N=true;var q;try{q=v.fchmodSync(j,R);N=false}finally{if(N){try{v.closeSync(j)}catch(v){}}else{v.closeSync(j)}}return q}}function patchLutimes(v){if($.hasOwnProperty("O_SYMLINK")){v.lutimes=function(E,R,j,N){v.open(E,$.O_SYMLINK,(function(E,$){if(E){if(N)N(E);return}v.futimes($,R,j,(function(E){v.close($,(function(v){if(N)N(E||v)}))}))}))};v.lutimesSync=function(E,R,j){var N=v.openSync(E,$.O_SYMLINK);var q;var G=true;try{q=v.futimesSync(N,R,j);G=false}finally{if(G){try{v.closeSync(N)}catch(v){}}else{v.closeSync(N)}}return q}}else{v.lutimes=function(v,E,R,$){if($)process.nextTick($)};v.lutimesSync=function(){}}}function chmodFix(E){if(!E)return E;return function(R,$,j){return E.call(v,R,$,(function(v){if(chownErOk(v))v=null;if(j)j.apply(this,arguments)}))}}function chmodFixSync(E){if(!E)return E;return function(R,$){try{return E.call(v,R,$)}catch(v){if(!chownErOk(v))throw v}}}function chownFix(E){if(!E)return E;return function(R,$,j,N){return E.call(v,R,$,j,(function(v){if(chownErOk(v))v=null;if(N)N.apply(this,arguments)}))}}function chownFixSync(E){if(!E)return E;return function(R,$,j){try{return E.call(v,R,$,j)}catch(v){if(!chownErOk(v))throw v}}}function statFix(E){if(!E)return E;return function(R,$,j){if(typeof $==="function"){j=$;$=null}function callback(v,E){if(E){if(E.uid<0)E.uid+=4294967296;if(E.gid<0)E.gid+=4294967296}if(j)j.apply(this,arguments)}return $?E.call(v,R,$,callback):E.call(v,R,callback)}}function statFixSync(E){if(!E)return E;return function(R,$){var j=$?E.call(v,R,$):E.call(v,R);if(j){if(j.uid<0)j.uid+=4294967296;if(j.gid<0)j.gid+=4294967296}return j}}function chownErOk(v){if(!v)return true;if(v.code==="ENOSYS")return true;var E=!process.getuid||process.getuid()!==0;if(E){if(v.code==="EINVAL"||v.code==="EPERM")return true}return false}}},85685:function(v){"use strict";const hexify=v=>{const E=v.charCodeAt(0).toString(16).toUpperCase();return"0x"+(E.length%2?"0":"")+E};const parseError=(v,E,R)=>{if(!E){return{message:v.message+" while parsing empty string",position:0}}const $=v.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);const j=$?+$[2]:v.message.match(/^Unexpected end of JSON.*/i)?E.length-1:null;const N=$?v.message.replace(/^Unexpected token ./,`Unexpected token ${JSON.stringify($[1])} (${hexify($[1])})`):v.message;if(j!==null&&j!==undefined){const v=j<=R?0:j-R;const $=j+R>=E.length?E.length:j+R;const q=(v===0?"":"...")+E.slice(v,$)+($===E.length?"":"...");const G=E===q?"":"near ";return{message:N+` while parsing ${G}${JSON.stringify(q)}`,position:j}}else{return{message:N+` while parsing '${E.slice(0,R*2)}'`,position:0}}};class JSONParseError extends SyntaxError{constructor(v,E,R,$){R=R||20;const j=parseError(v,E,R);super(j.message);Object.assign(this,j);this.code="EJSONPARSE";this.systemError=v;Error.captureStackTrace(this,$||this.constructor)}get name(){return this.constructor.name}set name(v){}get[Symbol.toStringTag](){return this.constructor.name}}const E=Symbol.for("indent");const R=Symbol.for("newline");const $=/^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;const j=/^(?:\{\}|\[\])((?:\r?\n)+)?$/;const parseJson=(v,N,q)=>{const G=stripBOM(v);q=q||20;try{const[,v="\n",q=" "]=G.match(j)||G.match($)||[,"",""];const ie=JSON.parse(G,N);if(ie&&typeof ie==="object"){ie[R]=v;ie[E]=q}return ie}catch(E){if(typeof v!=="string"&&!Buffer.isBuffer(v)){const R=Array.isArray(v)&&v.length===0;throw Object.assign(new TypeError(`Cannot parse ${R?"an empty array":String(v)}`),{code:"EJSONPARSE",systemError:E})}throw new JSONParseError(E,G,q,parseJson)}};const stripBOM=v=>String(v).replace(/^\uFEFF/,"");v.exports=parseJson;parseJson.JSONParseError=JSONParseError;parseJson.noExceptions=(v,E)=>{try{return JSON.parse(stripBOM(v),E)}catch(v){}}},46843:function(v){"use strict";class LoadingLoaderError extends Error{constructor(v){super(v);this.name="LoaderRunnerError";Error.captureStackTrace(this,this.constructor)}}v.exports=LoadingLoaderError},91256:function(v,E,R){var $=R(57147);var j=$.readFile.bind($);var N=R(66470);function utf8BufferToString(v){var E=v.toString("utf-8");if(E.charCodeAt(0)===65279){return E.substr(1)}else{return E}}const q=/^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;function parsePathQueryFragment(v){var E=q.exec(v);return{path:E[1].replace(/\0(.)/g,"$1"),query:E[2]?E[2].replace(/\0(.)/g,"$1"):"",fragment:E[3]||""}}function dirname(v){if(v==="/")return"/";var E=v.lastIndexOf("/");var R=v.lastIndexOf("\\");var $=v.indexOf("/");var j=v.indexOf("\\");var N=E>R?E:R;var q=E>R?$:j;if(N<0)return v;if(N===q)return v.substr(0,N+1);return v.substr(0,N)}function createLoaderObject(v){var E={path:null,query:null,fragment:null,options:null,ident:null,normal:null,pitch:null,raw:null,data:null,pitchExecuted:false,normalExecuted:false};Object.defineProperty(E,"request",{enumerable:true,get:function(){return E.path.replace(/#/g,"\0#")+E.query.replace(/#/g,"\0#")+E.fragment},set:function(v){if(typeof v==="string"){var R=parsePathQueryFragment(v);E.path=R.path;E.query=R.query;E.fragment=R.fragment;E.options=undefined;E.ident=undefined}else{if(!v.loader)throw new Error("request should be a string or object with loader and options ("+JSON.stringify(v)+")");E.path=v.loader;E.fragment=v.fragment||"";E.type=v.type;E.options=v.options;E.ident=v.ident;if(E.options===null)E.query="";else if(E.options===undefined)E.query="";else if(typeof E.options==="string")E.query="?"+E.options;else if(E.ident)E.query="??"+E.ident;else if(typeof E.options==="object"&&E.options.ident)E.query="??"+E.options.ident;else E.query="?"+JSON.stringify(E.options)}}});E.request=v;if(Object.preventExtensions){Object.preventExtensions(E)}return E}function runSyncOrAsync(v,E,R,$){var j=true;var N=false;var q=false;var G=false;E.async=function async(){if(N){if(G)return;throw new Error("async(): The callback was already called.")}j=false;return ie};var ie=E.callback=function(){if(N){if(G)return;throw new Error("callback(): The callback was already called.")}N=true;j=false;try{$.apply(null,arguments)}catch(v){q=true;throw v}};try{var ae=function LOADER_EXECUTION(){return v.apply(E,R)}();if(j){N=true;if(ae===undefined)return $();if(ae&&typeof ae==="object"&&typeof ae.then==="function"){return ae.then((function(v){$(null,v)}),$)}return $(null,ae)}}catch(v){if(q)throw v;if(N){if(typeof v==="object"&&v.stack)console.error(v.stack);else console.error(v);return}N=true;G=true;$(v)}}function convertArgs(v,E){if(!E&&Buffer.isBuffer(v[0]))v[0]=utf8BufferToString(v[0]);else if(E&&typeof v[0]==="string")v[0]=Buffer.from(v[0],"utf-8")}function iteratePitchingLoaders(v,E,R){if(E.loaderIndex>=E.loaders.length)return processResource(v,E,R);var $=E.loaders[E.loaderIndex];if($.pitchExecuted){E.loaderIndex++;return iteratePitchingLoaders(v,E,R)}N($,(function(j){if(j){E.cacheable(false);return R(j)}var N=$.pitch;$.pitchExecuted=true;if(!N)return iteratePitchingLoaders(v,E,R);runSyncOrAsync(N,E,[E.remainingRequest,E.previousRequest,$.data={}],(function($){if($)return R($);var j=Array.prototype.slice.call(arguments,1);var N=j.some((function(v){return v!==undefined}));if(N){E.loaderIndex--;iterateNormalLoaders(v,E,j,R)}else{iteratePitchingLoaders(v,E,R)}}))}))}function processResource(v,E,R){E.loaderIndex=E.loaders.length-1;var $=E.resourcePath;if($){v.processResource(E,$,(function($,j){if($)return R($);v.resourceBuffer=j;iterateNormalLoaders(v,E,[j],R)}))}else{iterateNormalLoaders(v,E,[null],R)}}function iterateNormalLoaders(v,E,R,$){if(E.loaderIndex<0)return $(null,R);var j=E.loaders[E.loaderIndex];if(j.normalExecuted){E.loaderIndex--;return iterateNormalLoaders(v,E,R,$)}var N=j.normal;j.normalExecuted=true;if(!N){return iterateNormalLoaders(v,E,R,$)}convertArgs(R,j.raw);runSyncOrAsync(N,E,R,(function(R){if(R)return $(R);var j=Array.prototype.slice.call(arguments,1);iterateNormalLoaders(v,E,j,$)}))}E.getContext=function getContext(v){var E=parsePathQueryFragment(v).path;return dirname(E)};E.runLoaders=function runLoaders(v,E){var R=v.resource||"";var $=v.loaders||[];var N=v.context||{};var q=v.processResource||((v,E,R,$)=>{E.addDependency(R);v(R,$)}).bind(null,v.readResource||j);var G=R&&parsePathQueryFragment(R);var ie=G?G.path:undefined;var ae=G?G.query:undefined;var ce=G?G.fragment:undefined;var le=ie?dirname(ie):null;var me=true;var _e=[];var Ie=[];var Me=[];$=$.map(createLoaderObject);N.context=le;N.loaderIndex=0;N.loaders=$;N.resourcePath=ie;N.resourceQuery=ae;N.resourceFragment=ce;N.async=null;N.callback=null;N.cacheable=function cacheable(v){if(v===false){me=false}};N.dependency=N.addDependency=function addDependency(v){_e.push(v)};N.addContextDependency=function addContextDependency(v){Ie.push(v)};N.addMissingDependency=function addMissingDependency(v){Me.push(v)};N.getDependencies=function getDependencies(){return _e.slice()};N.getContextDependencies=function getContextDependencies(){return Ie.slice()};N.getMissingDependencies=function getMissingDependencies(){return Me.slice()};N.clearDependencies=function clearDependencies(){_e.length=0;Ie.length=0;Me.length=0;me=true};Object.defineProperty(N,"resource",{enumerable:true,get:function(){if(N.resourcePath===undefined)return undefined;return N.resourcePath.replace(/#/g,"\0#")+N.resourceQuery.replace(/#/g,"\0#")+N.resourceFragment},set:function(v){var E=v&&parsePathQueryFragment(v);N.resourcePath=E?E.path:undefined;N.resourceQuery=E?E.query:undefined;N.resourceFragment=E?E.fragment:undefined}});Object.defineProperty(N,"request",{enumerable:true,get:function(){return N.loaders.map((function(v){return v.request})).concat(N.resource||"").join("!")}});Object.defineProperty(N,"remainingRequest",{enumerable:true,get:function(){if(N.loaderIndex>=N.loaders.length-1&&!N.resource)return"";return N.loaders.slice(N.loaderIndex+1).map((function(v){return v.request})).concat(N.resource||"").join("!")}});Object.defineProperty(N,"currentRequest",{enumerable:true,get:function(){return N.loaders.slice(N.loaderIndex).map((function(v){return v.request})).concat(N.resource||"").join("!")}});Object.defineProperty(N,"previousRequest",{enumerable:true,get:function(){return N.loaders.slice(0,N.loaderIndex).map((function(v){return v.request})).join("!")}});Object.defineProperty(N,"query",{enumerable:true,get:function(){var v=N.loaders[N.loaderIndex];return v.options&&typeof v.options==="object"?v.options:v.query}});Object.defineProperty(N,"data",{enumerable:true,get:function(){return N.loaders[N.loaderIndex].data}});if(Object.preventExtensions){Object.preventExtensions(N)}var Oe={resourceBuffer:null,processResource:q};iteratePitchingLoaders(Oe,N,(function(v,R){if(v){return E(v,{cacheable:me,fileDependencies:_e,contextDependencies:Ie,missingDependencies:Me})}E(null,{result:R,resourceBuffer:Oe.resourceBuffer,cacheable:me,fileDependencies:_e,contextDependencies:Ie,missingDependencies:Me})}))}},66470:function(module,__unused_webpack_exports,__webpack_require__){var LoaderLoadingError=__webpack_require__(46843);var url;module.exports=function loadLoader(loader,callback){if(loader.type==="module"){try{if(url===undefined)url=__webpack_require__(57310);var loaderUrl=url.pathToFileURL(loader.path);var modulePromise=eval("import("+JSON.stringify(loaderUrl.toString())+")");modulePromise.then((function(v){handleResult(loader,v,callback)}),callback);return}catch(v){callback(v)}}else{try{var module=require(loader.path)}catch(v){if(v instanceof Error&&v.code==="EMFILE"){var retry=loadLoader.bind(null,loader,callback);if(typeof setImmediate==="function"){return setImmediate(retry)}else{return process.nextTick(retry)}}return callback(v)}return handleResult(loader,module,callback)}};function handleResult(v,E,R){if(typeof E!=="function"&&typeof E!=="object"){return R(new LoaderLoadingError("Module '"+v.path+"' is not a loader (export function or es6 module)"))}v.normal=typeof E==="function"?E:E.default;v.pitch=E.pitch;v.raw=E.raw;if(typeof v.normal!=="function"&&typeof v.pitch!=="function"){return R(new LoaderLoadingError("Module '"+v.path+"' is not a loader (must have normal or pitch function)"))}R()}},58469:function(v,E,R){ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed */ -function r(t,{instancePath:e="",parentData:s,parentDataProperty:n,rootData:a=t}={}){let o=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;for(const e in t){let s=t[e];const n=l,a=l;let f=!1;const u=l;if(l==l)if(s&&"object"==typeof s&&!Array.isArray(s)){const r=l;for(const r in s)if("eager"!==r&&"shareKey"!==r&&"shareScope"!==r&&"version"!==r){const t={params:{additionalProperty:r}};null===o?o=[t]:o.push(t),l++;break}if(r===l){if(void 0!==s.eager){const r=l;if("boolean"!=typeof s.eager){const r={params:{type:"boolean"}};null===o?o=[r]:o.push(r),l++}var i=r===l}else i=!0;if(i){if(void 0!==s.shareKey){let r=s.shareKey;const t=l;if(l===t)if("string"==typeof r){if(r.length<1){const r={params:{}};null===o?o=[r]:o.push(r),l++}}else{const r={params:{type:"string"}};null===o?o=[r]:o.push(r),l++}i=t===l}else i=!0;if(i){if(void 0!==s.shareScope){let r=s.shareScope;const t=l;if(l===t)if("string"==typeof r){if(r.length<1){const r={params:{}};null===o?o=[r]:o.push(r),l++}}else{const r={params:{type:"string"}};null===o?o=[r]:o.push(r),l++}i=t===l}else i=!0;if(i)if(void 0!==s.version){let r=s.version;const t=l,e=l;let n=!1;const a=l;if(!1!==r){const r={params:{}};null===o?o=[r]:o.push(r),l++}var p=a===l;if(n=n||p,!n){const t=l;if("string"!=typeof r){const r={params:{type:"string"}};null===o?o=[r]:o.push(r),l++}p=t===l,n=n||p}if(n)l=e,null!==o&&(e?o.length=e:o=null);else{const r={params:{}};null===o?o=[r]:o.push(r),l++}i=t===l}else i=!0}}}}else{const r={params:{type:"object"}};null===o?o=[r]:o.push(r),l++}var c=u===l;if(f=f||c,!f){const r=l;if(l==l)if("string"==typeof s){if(s.length<1){const r={params:{}};null===o?o=[r]:o.push(r),l++}}else{const r={params:{type:"string"}};null===o?o=[r]:o.push(r),l++}c=r===l,f=f||c}if(!f){const t={params:{}};return null===o?o=[t]:o.push(t),l++,r.errors=o,!1}if(l=a,null!==o&&(a?o.length=a:o=null),n!==l)break}}return r.errors=o,0===l}function t(e,{instancePath:s="",parentData:n,parentDataProperty:a,rootData:o=e}={}){let l=null,i=0;const p=i;let c=!1;const f=i;if(i===f)if(Array.isArray(e)){const t=e.length;for(let n=0;nparse(E));const I=E.length+1,w=(B.__heap_base.value||B.__heap_base)+4*I-B.memory.buffer.byteLength;w>0&&B.memory.grow(Math.ceil(w/65536));const D=B.sa(I-1);if((A?C:Q)(E,new Uint16Array(B.memory.buffer,D,I)),!B.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,B.e()).split("\n").length}:${B.e()-E.lastIndexOf("\n",B.e()-1)}`),{idx:B.e()});const k=[],L=[];for(;B.ri();){const A=B.is(),Q=B.ie(),C=B.ai(),g=B.id(),I=B.ss(),w=B.se();let D;B.ip()&&(D=o(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),k.push({n:D,s:A,e:Q,ss:I,se:w,d:g,a:C})}for(;B.re();)L.push(E.slice(B.es(),B.ee()));function o(A){try{return(0,eval)(A)}catch(A){}}return[k,L,!!B.f()]}function Q(A,Q){const B=A.length;let C=0;for(;C>>8}}function C(A,Q){const B=A.length;let C=0;for(;CA.charCodeAt(0)))).then(WebAssembly.instantiate).then(({exports:A})=>{B=A});var E;exports.init=init; - -/***/ }), - -/***/ 13348: -/***/ (function(module) { - -"use strict"; -module.exports = {"i8":"5.1.1"}; - -/***/ }), - -/***/ 14730: -/***/ (function(module) { - -"use strict"; -module.exports = {"version":"4.3.0"}; - -/***/ }), - -/***/ 61752: -/***/ (function(module) { - -"use strict"; -module.exports = {"i8":"4.3.0"}; - -/***/ }), - -/***/ 66282: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}'); - -/***/ }), - -/***/ 27012: -/***/ (function(module) { - -"use strict"; -module.exports = {"i8":"5.74.0"}; - -/***/ }), - -/***/ 13954: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"Amd":{"description":"Set the value of `require.amd` and `define.amd`. Or disable AMD support.","anyOf":[{"description":"You can pass `false` to disable AMD support.","enum":[false]},{"description":"You can pass an object to set the value of `require.amd` and `define.amd`.","type":"object"}]},"AssetFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((name: string, asset: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsAsset) => boolean)"}]},"AssetFilterTypes":{"description":"Filtering modules.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/AssetFilterItemTypes"}]}},{"$ref":"#/definitions/AssetFilterItemTypes"}]},"AssetGeneratorDataUrl":{"description":"The options for data url generator.","anyOf":[{"$ref":"#/definitions/AssetGeneratorDataUrlOptions"},{"$ref":"#/definitions/AssetGeneratorDataUrlFunction"}]},"AssetGeneratorDataUrlFunction":{"description":"Function that executes for module and should return an DataUrl string. It can have a string as \'ident\' property which contributes to the module hash.","instanceof":"Function","tsType":"((source: string | Buffer, context: { filename: string, module: import(\'../lib/Module\') }) => string)"},"AssetGeneratorDataUrlOptions":{"description":"Options object for data url generation.","type":"object","additionalProperties":false,"properties":{"encoding":{"description":"Asset encoding (defaults to base64).","enum":[false,"base64"]},"mimetype":{"description":"Asset mimetype (getting from file extension by default).","type":"string"}}},"AssetGeneratorOptions":{"description":"Generator options for asset modules.","type":"object","implements":["#/definitions/AssetInlineGeneratorOptions","#/definitions/AssetResourceGeneratorOptions"],"additionalProperties":false,"properties":{"dataUrl":{"$ref":"#/definitions/AssetGeneratorDataUrl"},"emit":{"description":"Emit an output asset from this asset module. This can be set to \'false\' to omit emitting e. g. for SSR.","type":"boolean"},"filename":{"$ref":"#/definitions/FilenameTemplate"},"outputPath":{"$ref":"#/definitions/AssetModuleOutputPath"},"publicPath":{"$ref":"#/definitions/RawPublicPath"}}},"AssetInlineGeneratorOptions":{"description":"Generator options for asset/inline modules.","type":"object","additionalProperties":false,"properties":{"dataUrl":{"$ref":"#/definitions/AssetGeneratorDataUrl"}}},"AssetModuleFilename":{"description":"The filename of asset modules as relative path inside the \'output.path\' directory.","anyOf":[{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"AssetModuleOutputPath":{"description":"Emit the asset in the specified folder relative to \'output.path\'. This should only be needed when custom \'publicPath\' is specified to match the folder structure there.","anyOf":[{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"AssetParserDataUrlFunction":{"description":"Function that executes for module and should return whenever asset should be inlined as DataUrl.","instanceof":"Function","tsType":"((source: string | Buffer, context: { filename: string, module: import(\'../lib/Module\') }) => boolean)"},"AssetParserDataUrlOptions":{"description":"Options object for DataUrl condition.","type":"object","additionalProperties":false,"properties":{"maxSize":{"description":"Maximum size of asset that should be inline as modules. Default: 8kb.","type":"number"}}},"AssetParserOptions":{"description":"Parser options for asset modules.","type":"object","additionalProperties":false,"properties":{"dataUrlCondition":{"description":"The condition for inlining the asset as DataUrl.","anyOf":[{"$ref":"#/definitions/AssetParserDataUrlOptions"},{"$ref":"#/definitions/AssetParserDataUrlFunction"}]}}},"AssetResourceGeneratorOptions":{"description":"Generator options for asset/resource modules.","type":"object","additionalProperties":false,"properties":{"emit":{"description":"Emit an output asset from this asset module. This can be set to \'false\' to omit emitting e. g. for SSR.","type":"boolean"},"filename":{"$ref":"#/definitions/FilenameTemplate"},"outputPath":{"$ref":"#/definitions/AssetModuleOutputPath"},"publicPath":{"$ref":"#/definitions/RawPublicPath"}}},"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"Bail":{"description":"Report the first error as a hard error instead of tolerating it.","type":"boolean"},"CacheOptions":{"description":"Cache generated modules and chunks to improve performance for multiple incremental builds.","anyOf":[{"description":"Enable in memory caching.","enum":[true]},{"$ref":"#/definitions/CacheOptionsNormalized"}]},"CacheOptionsNormalized":{"description":"Cache generated modules and chunks to improve performance for multiple incremental builds.","anyOf":[{"description":"Disable caching.","enum":[false]},{"$ref":"#/definitions/MemoryCacheOptions"},{"$ref":"#/definitions/FileCacheOptions"}]},"Charset":{"description":"Add charset attribute for script tag.","type":"boolean"},"ChunkFilename":{"description":"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"ChunkFormat":{"description":"The format of chunks (formats included by default are \'array-push\' (web/WebWorker), \'commonjs\' (node.js), \'module\' (ESM), but others might be added by plugins).","anyOf":[{"enum":["array-push","commonjs","module",false]},{"type":"string"}]},"ChunkLoadTimeout":{"description":"Number of milliseconds before chunk request expires.","type":"number"},"ChunkLoading":{"description":"The method of loading chunks (methods included by default are \'jsonp\' (web), \'import\' (ESM), \'importScripts\' (WebWorker), \'require\' (sync node.js), \'async-node\' (async node.js), but others might be added by plugins).","anyOf":[{"enum":[false]},{"$ref":"#/definitions/ChunkLoadingType"}]},"ChunkLoadingGlobal":{"description":"The global variable used by webpack for loading of chunks.","type":"string"},"ChunkLoadingType":{"description":"The method of loading chunks (methods included by default are \'jsonp\' (web), \'import\' (ESM), \'importScripts\' (WebWorker), \'require\' (sync node.js), \'async-node\' (async node.js), but others might be added by plugins).","anyOf":[{"enum":["jsonp","import-scripts","require","async-node","import"]},{"type":"string"}]},"Clean":{"description":"Clean the output directory before emit.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/CleanOptions"}]},"CleanOptions":{"description":"Advanced options for cleaning assets.","type":"object","additionalProperties":false,"properties":{"dry":{"description":"Log the assets that should be removed instead of deleting them.","type":"boolean"},"keep":{"description":"Keep these assets.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((filename: string) => boolean)"}]}}},"CompareBeforeEmit":{"description":"Check if to be emitted file already exists and have the same content before writing to output filesystem.","type":"boolean"},"Context":{"description":"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.","type":"string","absolutePath":true},"CrossOriginLoading":{"description":"This option enables cross-origin loading of chunks.","enum":[false,"anonymous","use-credentials"]},"CssChunkFilename":{"description":"Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"CssExperimentOptions":{"description":"Options for css handling.","type":"object","additionalProperties":false,"properties":{"exportsOnly":{"description":"Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.","type":"boolean"}}},"CssFilename":{"description":"Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"CssGeneratorOptions":{"description":"Generator options for css modules.","type":"object","additionalProperties":false,"properties":{}},"CssParserOptions":{"description":"Parser options for css modules.","type":"object","additionalProperties":false,"properties":{}},"Dependencies":{"description":"References to other configurations to depend on.","type":"array","items":{"description":"References to another configuration to depend on.","type":"string"}},"DevServer":{"description":"Options for the webpack-dev-server.","type":"object"},"DevTool":{"description":"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).","anyOf":[{"enum":[false,"eval"]},{"type":"string","pattern":"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$"}]},"DevtoolFallbackModuleFilenameTemplate":{"description":"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"DevtoolModuleFilenameTemplate":{"description":"Filename template string of function for the sources array in a generated SourceMap.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"DevtoolNamespace":{"description":"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It\'s useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.","type":"string"},"EmptyGeneratorOptions":{"description":"No generator options are supported for this module type.","type":"object","additionalProperties":false},"EmptyParserOptions":{"description":"No parser options are supported for this module type.","type":"object","additionalProperties":false},"EnabledChunkLoadingTypes":{"description":"List of chunk loading types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/ChunkLoadingType"}},"EnabledLibraryTypes":{"description":"List of library types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/LibraryType"}},"EnabledWasmLoadingTypes":{"description":"List of wasm loading types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/WasmLoadingType"}},"Entry":{"description":"The entry point(s) of the compilation.","anyOf":[{"$ref":"#/definitions/EntryDynamic"},{"$ref":"#/definitions/EntryStatic"}]},"EntryDescription":{"description":"An object with entry point description.","type":"object","additionalProperties":false,"properties":{"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"baseUri":{"description":"Base uri for this entry.","type":"string"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"dependOn":{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","anyOf":[{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","type":"array","items":{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1}]},"filename":{"$ref":"#/definitions/EntryFilename"},"import":{"$ref":"#/definitions/EntryItem"},"layer":{"$ref":"#/definitions/Layer"},"library":{"$ref":"#/definitions/LibraryOptions"},"publicPath":{"$ref":"#/definitions/PublicPath"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"}},"required":["import"]},"EntryDescriptionNormalized":{"description":"An object with entry point description.","type":"object","additionalProperties":false,"properties":{"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"baseUri":{"description":"Base uri for this entry.","type":"string"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"dependOn":{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","type":"array","items":{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},"filename":{"$ref":"#/definitions/Filename"},"import":{"description":"Module(s) that are loaded upon startup. The last one is exported.","type":"array","items":{"description":"Module that is loaded upon startup. Only the last one is exported.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},"layer":{"$ref":"#/definitions/Layer"},"library":{"$ref":"#/definitions/LibraryOptions"},"publicPath":{"$ref":"#/definitions/PublicPath"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"EntryDynamic":{"description":"A Function returning an entry object, an entry string, an entry array or a promise to these things.","instanceof":"Function","tsType":"(() => EntryStatic | Promise)"},"EntryDynamicNormalized":{"description":"A Function returning a Promise resolving to a normalized entry.","instanceof":"Function","tsType":"(() => Promise)"},"EntryFilename":{"description":"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"EntryItem":{"description":"Module(s) that are loaded upon startup.","anyOf":[{"description":"All modules are loaded upon startup. The last one is exported.","type":"array","items":{"description":"A module that is loaded upon startup. Only the last one is exported.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},{"description":"The string is resolved to a module which is loaded upon startup.","type":"string","minLength":1}]},"EntryNormalized":{"description":"The entry point(s) of the compilation.","anyOf":[{"$ref":"#/definitions/EntryDynamicNormalized"},{"$ref":"#/definitions/EntryStaticNormalized"}]},"EntryObject":{"description":"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.","type":"object","additionalProperties":{"description":"An entry point with name.","anyOf":[{"$ref":"#/definitions/EntryItem"},{"$ref":"#/definitions/EntryDescription"}]}},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"EntryStatic":{"description":"A static entry description.","anyOf":[{"$ref":"#/definitions/EntryObject"},{"$ref":"#/definitions/EntryUnnamed"}]},"EntryStaticNormalized":{"description":"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.","type":"object","additionalProperties":{"description":"An object with entry point description.","oneOf":[{"$ref":"#/definitions/EntryDescriptionNormalized"}]}},"EntryUnnamed":{"description":"An entry point without name.","oneOf":[{"$ref":"#/definitions/EntryItem"}]},"Environment":{"description":"The abilities of the environment where the webpack generated code should run.","type":"object","additionalProperties":false,"properties":{"arrowFunction":{"description":"The environment supports arrow functions (\'() => { ... }\').","type":"boolean"},"bigIntLiteral":{"description":"The environment supports BigInt as literal (123n).","type":"boolean"},"const":{"description":"The environment supports const and let for variable declarations.","type":"boolean"},"destructuring":{"description":"The environment supports destructuring (\'{ a, b } = obj\').","type":"boolean"},"dynamicImport":{"description":"The environment supports an async import() function to import EcmaScript modules.","type":"boolean"},"forOf":{"description":"The environment supports \'for of\' iteration (\'for (const x of array) { ... }\').","type":"boolean"},"module":{"description":"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from \'...\').","type":"boolean"},"optionalChaining":{"description":"The environment supports optional chaining (\'obj?.a\' or \'obj?.()\').","type":"boolean"},"templateLiteral":{"description":"The environment supports template literals.","type":"boolean"}}},"Experiments":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","implements":["#/definitions/ExperimentsCommon"],"additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"buildHttp":{"description":"Build http(s): urls using a lockfile and resource content cache.","anyOf":[{"$ref":"#/definitions/HttpUriAllowedUris"},{"$ref":"#/definitions/HttpUriOptions"}]},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"css":{"description":"Enable css support.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/CssExperimentOptions"}]},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"lazyCompilation":{"description":"Compile entrypoints and import()s only when they are accessed.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/LazyCompilationOptions"}]},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExperimentsCommon":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExperimentsNormalized":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","implements":["#/definitions/ExperimentsCommon"],"additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"buildHttp":{"description":"Build http(s): urls using a lockfile and resource content cache.","oneOf":[{"$ref":"#/definitions/HttpUriOptions"}]},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"css":{"description":"Enable css support.","oneOf":[{"$ref":"#/definitions/CssExperimentOptions"}]},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"lazyCompilation":{"description":"Compile entrypoints and import()s only when they are accessed.","oneOf":[{"$ref":"#/definitions/LazyCompilationOptions"}]},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExternalItem":{"description":"Specify dependency that shouldn\'t be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.","anyOf":[{"description":"Every matched dependency becomes external.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An exact matched dependency becomes external. The same string is used as external dependency.","type":"string"},{"description":"If an dependency matches exactly a property of the object, the property value is used as dependency.","type":"object","additionalProperties":{"$ref":"#/definitions/ExternalItemValue"},"properties":{"byLayer":{"description":"Specify externals depending on the layer.","anyOf":[{"type":"object","additionalProperties":{"$ref":"#/definitions/ExternalItem"}},{"instanceof":"Function","tsType":"((layer: string | null) => ExternalItem)"}]}}},{"description":"The function is called on each dependency (`function(context, request, callback(err, result))`).","instanceof":"Function","tsType":"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))"}]},"ExternalItemFunctionData":{"description":"Data object passed as argument when a function is set for \'externals\'.","type":"object","additionalProperties":false,"properties":{"context":{"description":"The directory in which the request is placed.","type":"string"},"contextInfo":{"description":"Contextual information.","type":"object","tsType":"import(\'../lib/ModuleFactory\').ModuleFactoryCreateDataContextInfo"},"dependencyType":{"description":"The category of the referencing dependencies.","type":"string"},"getResolve":{"description":"Get a resolve function with the current resolver options.","instanceof":"Function","tsType":"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))"},"request":{"description":"The request as written by the user in the require/import expression/statement.","type":"string"}}},"ExternalItemValue":{"description":"The dependency used for the external.","anyOf":[{"type":"array","items":{"description":"A part of the target of the external.","type":"string","minLength":1}},{"description":"`true`: The dependency name is used as target of the external.","type":"boolean"},{"description":"The target of the external.","type":"string"},{"type":"object"}]},"Externals":{"description":"Specify dependencies that shouldn\'t be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.","anyOf":[{"type":"array","items":{"$ref":"#/definitions/ExternalItem"}},{"$ref":"#/definitions/ExternalItem"}]},"ExternalsPresets":{"description":"Enable presets of externals for specific targets.","type":"object","additionalProperties":false,"properties":{"electron":{"description":"Treat common electron built-in modules in main and preload context like \'electron\', \'ipc\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronMain":{"description":"Treat electron built-in modules in the main context like \'app\', \'ipc-main\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronPreload":{"description":"Treat electron built-in modules in the preload context like \'web-frame\', \'ipc-renderer\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronRenderer":{"description":"Treat electron built-in modules in the renderer context like \'web-frame\', \'ipc-renderer\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"node":{"description":"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.","type":"boolean"},"nwjs":{"description":"Treat NW.js legacy nw.gui module as external and load it via require() when used.","type":"boolean"},"web":{"description":"Treat references to \'http(s)://...\' and \'std:...\' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).","type":"boolean"},"webAsync":{"description":"Treat references to \'http(s)://...\' and \'std:...\' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).","type":"boolean"}}},"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"FileCacheOptions":{"description":"Options object for persistent file-based caching.","type":"object","additionalProperties":false,"properties":{"allowCollectingMemory":{"description":"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.","type":"boolean"},"buildDependencies":{"description":"Dependencies the build depends on (in multiple categories, default categories: \'defaultWebpack\').","type":"object","additionalProperties":{"description":"List of dependencies the build depends on.","type":"array","items":{"description":"Request to a dependency (resolved as directory relative to the context directory).","type":"string","minLength":1}}},"cacheDirectory":{"description":"Base directory for the cache (defaults to node_modules/.cache/webpack).","type":"string","absolutePath":true},"cacheLocation":{"description":"Locations for the cache (defaults to cacheDirectory / name).","type":"string","absolutePath":true},"compression":{"description":"Compression type used for the cache files.","enum":[false,"gzip","brotli"]},"hashAlgorithm":{"description":"Algorithm used for generation the hash (see node.js crypto package).","type":"string"},"idleTimeout":{"description":"Time in ms after which idle period the cache storing should happen.","type":"number","minimum":0},"idleTimeoutAfterLargeChanges":{"description":"Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).","type":"number","minimum":0},"idleTimeoutForInitialStore":{"description":"Time in ms after which idle period the initial cache storing should happen.","type":"number","minimum":0},"immutablePaths":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","type":"array","items":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","anyOf":[{"description":"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to an immutable directory (usually a package manager cache directory).","type":"string","absolutePath":true,"minLength":1}]}},"managedPaths":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","type":"array","items":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","anyOf":[{"description":"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to a managed directory (usually a node_modules directory).","type":"string","absolutePath":true,"minLength":1}]}},"maxAge":{"description":"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).","type":"number","minimum":0},"maxMemoryGenerations":{"description":"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.","type":"number","minimum":0},"memoryCacheUnaffected":{"description":"Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.","type":"boolean"},"name":{"description":"Name for the cache. Different names will lead to different coexisting caches.","type":"string"},"profile":{"description":"Track and log detailed timing information for individual cache items.","type":"boolean"},"store":{"description":"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).","enum":["pack"]},"type":{"description":"Filesystem caching.","enum":["filesystem"]},"version":{"description":"Version of the cache data. Different versions won\'t allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn\'t allow to reuse cache. This will invalidate the cache.","type":"string"}},"required":["type"]},"Filename":{"description":"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"FilenameTemplate":{"description":"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"FilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((value: string) => boolean)"}]},"FilterTypes":{"description":"Filtering values.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/FilterItemTypes"}]}},{"$ref":"#/definitions/FilterItemTypes"}]},"GeneratorOptionsByModuleType":{"description":"Specify options for each generator.","type":"object","additionalProperties":{"description":"Options for generating.","type":"object","additionalProperties":true},"properties":{"asset":{"$ref":"#/definitions/AssetGeneratorOptions"},"asset/inline":{"$ref":"#/definitions/AssetInlineGeneratorOptions"},"asset/resource":{"$ref":"#/definitions/AssetResourceGeneratorOptions"},"javascript":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/auto":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/dynamic":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/esm":{"$ref":"#/definitions/EmptyGeneratorOptions"}}},"GlobalObject":{"description":"An expression which is used to address the global object/scope in runtime code.","type":"string","minLength":1},"HashDigest":{"description":"Digest type used for the hash.","type":"string"},"HashDigestLength":{"description":"Number of chars which are used for the hash.","type":"number","minimum":1},"HashFunction":{"description":"Algorithm used for generation the hash (see node.js crypto package).","anyOf":[{"type":"string","minLength":1},{"instanceof":"Function","tsType":"typeof import(\'../lib/util/Hash\')"}]},"HashSalt":{"description":"Any string which is added to the hash to salt it.","type":"string","minLength":1},"HotUpdateChunkFilename":{"description":"The filename of the Hot Update Chunks. They are inside the output.path directory.","type":"string","absolutePath":false},"HotUpdateGlobal":{"description":"The global variable used by webpack for loading of hot update chunks.","type":"string"},"HotUpdateMainFilename":{"description":"The filename of the Hot Update Main File. It is inside the \'output.path\' directory.","type":"string","absolutePath":false},"HttpUriAllowedUris":{"description":"List of allowed URIs for building http resources.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/HttpUriOptionsAllowedUris"}]},"HttpUriOptions":{"description":"Options for building http resources.","type":"object","additionalProperties":false,"properties":{"allowedUris":{"$ref":"#/definitions/HttpUriOptionsAllowedUris"},"cacheLocation":{"description":"Location where resource content is stored for lockfile entries. It\'s also possible to disable storing by passing false.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"frozen":{"description":"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.","type":"boolean"},"lockfileLocation":{"description":"Location of the lockfile.","type":"string","absolutePath":true},"proxy":{"description":"Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.","type":"string"},"upgrade":{"description":"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.","type":"boolean"}},"required":["allowedUris"]},"HttpUriOptionsAllowedUris":{"description":"List of allowed URIs (resp. the beginning of them).","type":"array","items":{"description":"List of allowed URIs (resp. the beginning of them).","anyOf":[{"description":"Allowed URI pattern.","instanceof":"RegExp","tsType":"RegExp"},{"description":"Allowed URI (resp. the beginning of it).","type":"string","pattern":"^https?://"},{"description":"Allowed URI filter function.","instanceof":"Function","tsType":"((uri: string) => boolean)"}]}},"IgnoreWarnings":{"description":"Ignore specific warnings.","type":"array","items":{"description":"Ignore specific warnings.","anyOf":[{"description":"A RegExp to select the warning message.","instanceof":"RegExp","tsType":"RegExp"},{"type":"object","additionalProperties":false,"properties":{"file":{"description":"A RegExp to select the origin file for the warning.","instanceof":"RegExp","tsType":"RegExp"},"message":{"description":"A RegExp to select the warning message.","instanceof":"RegExp","tsType":"RegExp"},"module":{"description":"A RegExp to select the origin module for the warning.","instanceof":"RegExp","tsType":"RegExp"}}},{"description":"A custom function to select warnings based on the raw warning instance.","instanceof":"Function","tsType":"((warning: import(\'../lib/WebpackError\'), compilation: import(\'../lib/Compilation\')) => boolean)"}]}},"IgnoreWarningsNormalized":{"description":"Ignore specific warnings.","type":"array","items":{"description":"A function to select warnings based on the raw warning instance.","instanceof":"Function","tsType":"((warning: import(\'../lib/WebpackError\'), compilation: import(\'../lib/Compilation\')) => boolean)"}},"Iife":{"description":"Wrap javascript code into IIFE\'s to avoid leaking into global scope.","type":"boolean"},"ImportFunctionName":{"description":"The name of the native import() function (can be exchanged for a polyfill).","type":"string"},"ImportMetaName":{"description":"The name of the native import.meta object (can be exchanged for a polyfill).","type":"string"},"InfrastructureLogging":{"description":"Options for infrastructure level logging.","type":"object","additionalProperties":false,"properties":{"appendOnly":{"description":"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.","type":"boolean"},"colors":{"description":"Enables/Disables colorful output. This option is only used when no custom console is provided.","type":"boolean"},"console":{"description":"Custom console used for logging.","tsType":"Console"},"debug":{"description":"Enable debug logging for specific loggers.","anyOf":[{"description":"Enable/Disable debug logging for all loggers.","type":"boolean"},{"$ref":"#/definitions/FilterTypes"}]},"level":{"description":"Log level.","enum":["none","error","warn","info","log","verbose"]},"stream":{"description":"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.","tsType":"NodeJS.WritableStream"}}},"JavascriptParserOptions":{"description":"Parser options for javascript modules.","type":"object","additionalProperties":true,"properties":{"amd":{"$ref":"#/definitions/Amd"},"browserify":{"description":"Enable/disable special handling for browserify bundles.","type":"boolean"},"commonjs":{"description":"Enable/disable parsing of CommonJs syntax.","type":"boolean"},"commonjsMagicComments":{"description":"Enable/disable parsing of magic comments in CommonJs syntax.","type":"boolean"},"createRequire":{"description":"Enable/disable parsing \\"import { createRequire } from \\"module\\"\\" and evaluating createRequire().","anyOf":[{"type":"boolean"},{"type":"string"}]},"dynamicImportMode":{"description":"Specifies global mode for dynamic import.","enum":["eager","weak","lazy","lazy-once"]},"dynamicImportPrefetch":{"description":"Specifies global prefetch for dynamic import.","anyOf":[{"type":"number"},{"type":"boolean"}]},"dynamicImportPreload":{"description":"Specifies global preload for dynamic import.","anyOf":[{"type":"number"},{"type":"boolean"}]},"exportsPresence":{"description":"Specifies the behavior of invalid export names in \\"import ... from ...\\" and \\"export ... from ...\\".","enum":["error","warn","auto",false]},"exprContextCritical":{"description":"Enable warnings for full dynamic dependencies.","type":"boolean"},"exprContextRecursive":{"description":"Enable recursive directory lookup for full dynamic dependencies.","type":"boolean"},"exprContextRegExp":{"description":"Sets the default regular expression for full dynamic dependencies.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"exprContextRequest":{"description":"Set the default request for full dynamic dependencies.","type":"string"},"harmony":{"description":"Enable/disable parsing of EcmaScript Modules syntax.","type":"boolean"},"import":{"description":"Enable/disable parsing of import() syntax.","type":"boolean"},"importExportsPresence":{"description":"Specifies the behavior of invalid export names in \\"import ... from ...\\".","enum":["error","warn","auto",false]},"importMeta":{"description":"Enable/disable evaluating import.meta.","type":"boolean"},"importMetaContext":{"description":"Enable/disable evaluating import.meta.webpackContext.","type":"boolean"},"node":{"$ref":"#/definitions/Node"},"reexportExportsPresence":{"description":"Specifies the behavior of invalid export names in \\"export ... from ...\\". This might be useful to disable during the migration from \\"export ... from ...\\" to \\"export type ... from ...\\" when reexporting types in TypeScript.","enum":["error","warn","auto",false]},"requireContext":{"description":"Enable/disable parsing of require.context syntax.","type":"boolean"},"requireEnsure":{"description":"Enable/disable parsing of require.ensure syntax.","type":"boolean"},"requireInclude":{"description":"Enable/disable parsing of require.include syntax.","type":"boolean"},"requireJs":{"description":"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.","type":"boolean"},"strictExportPresence":{"description":"Deprecated in favor of \\"exportsPresence\\". Emit errors instead of warnings when imported names don\'t exist in imported module.","type":"boolean"},"strictThisContextOnImports":{"description":"Handle the this context correctly according to the spec for namespace objects.","type":"boolean"},"system":{"description":"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.","type":"boolean"},"unknownContextCritical":{"description":"Enable warnings when using the require function in a not statically analyse-able way.","type":"boolean"},"unknownContextRecursive":{"description":"Enable recursive directory lookup when using the require function in a not statically analyse-able way.","type":"boolean"},"unknownContextRegExp":{"description":"Sets the regular expression when using the require function in a not statically analyse-able way.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"unknownContextRequest":{"description":"Sets the request when using the require function in a not statically analyse-able way.","type":"string"},"url":{"description":"Enable/disable parsing of new URL() syntax.","anyOf":[{"enum":["relative"]},{"type":"boolean"}]},"worker":{"description":"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().","anyOf":[{"type":"array","items":{"description":"Specify a syntax that should be parsed as WebWorker reference. \'Abc\' handles \'new Abc()\', \'Abc from xyz\' handles \'import { Abc } from \\"xyz\\"; new Abc()\', \'abc()\' handles \'abc()\', and combinations are also possible.","type":"string","minLength":1}},{"type":"boolean"}]},"wrappedContextCritical":{"description":"Enable warnings for partial dynamic dependencies.","type":"boolean"},"wrappedContextRecursive":{"description":"Enable recursive directory lookup for partial dynamic dependencies.","type":"boolean"},"wrappedContextRegExp":{"description":"Set the inner regular expression for partial dynamic dependencies.","instanceof":"RegExp","tsType":"RegExp"}}},"Layer":{"description":"Specifies the layer in which modules of this entrypoint are placed.","anyOf":[{"enum":[null]},{"type":"string","minLength":1}]},"LazyCompilationDefaultBackendOptions":{"description":"Options for the default backend.","type":"object","additionalProperties":false,"properties":{"client":{"description":"A custom client.","type":"string"},"listen":{"description":"Specifies where to listen to from the server.","anyOf":[{"description":"A port.","type":"number"},{"description":"Listen options.","type":"object","additionalProperties":true,"properties":{"host":{"description":"A host.","type":"string"},"port":{"description":"A port.","type":"number"}},"tsType":"import(\\"net\\").ListenOptions"},{"description":"A custom listen function.","instanceof":"Function","tsType":"((server: import(\\"net\\").Server) => void)"}]},"protocol":{"description":"Specifies the protocol the client should use to connect to the server.","enum":["http","https"]},"server":{"description":"Specifies how to create the server handling the EventSource requests.","anyOf":[{"description":"ServerOptions for the http or https createServer call.","type":"object","additionalProperties":true,"properties":{},"tsType":"(import(\\"https\\").ServerOptions | import(\\"http\\").ServerOptions)"},{"description":"A custom create server function.","instanceof":"Function","tsType":"(() => import(\\"net\\").Server)"}]}}},"LazyCompilationOptions":{"description":"Options for compiling entrypoints and import()s only when they are accessed.","type":"object","additionalProperties":false,"properties":{"backend":{"description":"Specifies the backend that should be used for handling client keep alive.","anyOf":[{"description":"A custom backend.","instanceof":"Function","tsType":"(((compiler: import(\'../lib/Compiler\'), callback: (err?: Error, api?: import(\\"../lib/hmr/LazyCompilationPlugin\\").BackendApi) => void) => void) | ((compiler: import(\'../lib/Compiler\')) => Promise))"},{"$ref":"#/definitions/LazyCompilationDefaultBackendOptions"}]},"entries":{"description":"Enable/disable lazy compilation for entries.","type":"boolean"},"imports":{"description":"Enable/disable lazy compilation for import() modules.","type":"boolean"},"test":{"description":"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"((module: import(\'../lib/Module\')) => boolean)"}]}}},"Library":{"description":"Make the output files a library, exporting the exports of the entry point.","anyOf":[{"$ref":"#/definitions/LibraryName"},{"$ref":"#/definitions/LibraryOptions"}]},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"Loader":{"description":"Custom values available in the loader context.","type":"object"},"MemoryCacheOptions":{"description":"Options object for in-memory caching.","type":"object","additionalProperties":false,"properties":{"cacheUnaffected":{"description":"Additionally cache computation of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"maxGenerations":{"description":"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).","type":"number","minimum":1},"type":{"description":"In memory caching.","enum":["memory"]}},"required":["type"]},"Mode":{"description":"Enable production optimizations or development hints.","enum":["development","production","none"]},"ModuleFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((name: string, module: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsModule, type: \'module\' | \'chunk\' | \'root-of-chunk\' | \'nested\') => boolean)"}]},"ModuleFilterTypes":{"description":"Filtering modules.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/ModuleFilterItemTypes"}]}},{"$ref":"#/definitions/ModuleFilterItemTypes"}]},"ModuleOptions":{"description":"Options affecting the normal modules (`NormalModuleFactory`).","type":"object","additionalProperties":false,"properties":{"defaultRules":{"description":"An array of rules applied by default for modules.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"exprContextCritical":{"description":"Enable warnings for full dynamic dependencies.","type":"boolean"},"exprContextRecursive":{"description":"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRecursive\'.","type":"boolean"},"exprContextRegExp":{"description":"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRegExp\'.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"exprContextRequest":{"description":"Set the default request for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRequest\'.","type":"string"},"generator":{"$ref":"#/definitions/GeneratorOptionsByModuleType"},"noParse":{"$ref":"#/definitions/NoParse"},"parser":{"$ref":"#/definitions/ParserOptionsByModuleType"},"rules":{"description":"An array of rules applied for modules.","oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"strictExportPresence":{"description":"Emit errors instead of warnings when imported names don\'t exist in imported module. Deprecated: This option has moved to \'module.parser.javascript.strictExportPresence\'.","type":"boolean"},"strictThisContextOnImports":{"description":"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to \'module.parser.javascript.strictThisContextOnImports\'.","type":"boolean"},"unknownContextCritical":{"description":"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextCritical\'.","type":"boolean"},"unknownContextRecursive":{"description":"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRecursive\'.","type":"boolean"},"unknownContextRegExp":{"description":"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRegExp\'.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"unknownContextRequest":{"description":"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRequest\'.","type":"string"},"unsafeCache":{"description":"Cache the resolving of module requests.","anyOf":[{"type":"boolean"},{"instanceof":"Function","tsType":"Function"}]},"wrappedContextCritical":{"description":"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextCritical\'.","type":"boolean"},"wrappedContextRecursive":{"description":"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextRecursive\'.","type":"boolean"},"wrappedContextRegExp":{"description":"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextRegExp\'.","instanceof":"RegExp","tsType":"RegExp"}}},"ModuleOptionsNormalized":{"description":"Options affecting the normal modules (`NormalModuleFactory`).","type":"object","additionalProperties":false,"properties":{"defaultRules":{"description":"An array of rules applied by default for modules.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"generator":{"$ref":"#/definitions/GeneratorOptionsByModuleType"},"noParse":{"$ref":"#/definitions/NoParse"},"parser":{"$ref":"#/definitions/ParserOptionsByModuleType"},"rules":{"description":"An array of rules applied for modules.","oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"unsafeCache":{"description":"Cache the resolving of module requests.","anyOf":[{"type":"boolean"},{"instanceof":"Function","tsType":"Function"}]}},"required":["defaultRules","generator","parser","rules"]},"Name":{"description":"Name of the configuration. Used when loading multiple configurations.","type":"string"},"NoParse":{"description":"Don\'t parse files matching. It\'s matched against the full resolved request.","anyOf":[{"type":"array","items":{"description":"Don\'t parse files matching. It\'s matched against the full resolved request.","anyOf":[{"description":"A regular expression, when matched the module is not parsed.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An absolute path, when the module starts with this path it is not parsed.","type":"string","absolutePath":true},{"instanceof":"Function","tsType":"Function"}]},"minItems":1},{"description":"A regular expression, when matched the module is not parsed.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An absolute path, when the module starts with this path it is not parsed.","type":"string","absolutePath":true},{"instanceof":"Function","tsType":"Function"}]},"Node":{"description":"Include polyfills or mocks for various node stuff.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/NodeOptions"}]},"NodeOptions":{"description":"Options object for node compatibility features.","type":"object","additionalProperties":false,"properties":{"__dirname":{"description":"Include a polyfill for the \'__dirname\' variable.","enum":[false,true,"warn-mock","mock","eval-only"]},"__filename":{"description":"Include a polyfill for the \'__filename\' variable.","enum":[false,true,"warn-mock","mock","eval-only"]},"global":{"description":"Include a polyfill for the \'global\' variable.","enum":[false,true,"warn"]}}},"Optimization":{"description":"Enables/Disables integrated optimizations.","type":"object","additionalProperties":false,"properties":{"checkWasmTypes":{"description":"Check for incompatible wasm types when importing/exporting from/to ESM.","type":"boolean"},"chunkIds":{"description":"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).","enum":["natural","named","deterministic","size","total-size",false]},"concatenateModules":{"description":"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.","type":"boolean"},"emitOnErrors":{"description":"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.","type":"boolean"},"flagIncludedChunks":{"description":"Also flag chunks as loaded which contain a subset of the modules.","type":"boolean"},"innerGraph":{"description":"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.","type":"boolean"},"mangleExports":{"description":"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names).","anyOf":[{"enum":["size","deterministic"]},{"type":"boolean"}]},"mangleWasmImports":{"description":"Reduce size of WASM by changing imports to shorter strings.","type":"boolean"},"mergeDuplicateChunks":{"description":"Merge chunks which contain the same modules.","type":"boolean"},"minimize":{"description":"Enable minimizing the output. Uses optimization.minimizer.","type":"boolean"},"minimizer":{"description":"Minimizer(s) to use for minimizing the output.","type":"array","cli":{"exclude":true},"items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"enum":["..."]},{"$ref":"#/definitions/WebpackPluginInstance"},{"$ref":"#/definitions/WebpackPluginFunction"}]}},"moduleIds":{"description":"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).","enum":["natural","named","hashed","deterministic","size",false]},"noEmitOnErrors":{"description":"Avoid emitting assets when errors occur (deprecated: use \'emitOnErrors\' instead).","type":"boolean","cli":{"exclude":true}},"nodeEnv":{"description":"Set process.env.NODE_ENV to a specific value.","anyOf":[{"enum":[false]},{"type":"string"}]},"portableRecords":{"description":"Generate records with relative paths to be able to move the context folder.","type":"boolean"},"providedExports":{"description":"Figure out which exports are provided by modules to generate more efficient code.","type":"boolean"},"realContentHash":{"description":"Use real [contenthash] based on final content of the assets.","type":"boolean"},"removeAvailableModules":{"description":"Removes modules from chunks when these modules are already included in all parents.","type":"boolean"},"removeEmptyChunks":{"description":"Remove chunks which are empty.","type":"boolean"},"runtimeChunk":{"$ref":"#/definitions/OptimizationRuntimeChunk"},"sideEffects":{"description":"Skip over modules which contain no side effects when exports are not used (false: disabled, \'flag\': only use manually placed side effects flag, true: also analyse source code for side effects).","anyOf":[{"enum":["flag"]},{"type":"boolean"}]},"splitChunks":{"description":"Optimize duplication and caching by splitting chunks by shared modules and cache group.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/OptimizationSplitChunksOptions"}]},"usedExports":{"description":"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined).","anyOf":[{"enum":["global"]},{"type":"boolean"}]}}},"OptimizationRuntimeChunk":{"description":"Create an additional chunk which contains only the webpack runtime and chunk hash maps.","anyOf":[{"enum":["single","multiple"]},{"type":"boolean"},{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name or name factory for the runtime chunks.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]}}}]},"OptimizationRuntimeChunkNormalized":{"description":"Create an additional chunk which contains only the webpack runtime and chunk hash maps.","anyOf":[{"enum":[false]},{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name factory for the runtime chunks.","instanceof":"Function","tsType":"Function"}}}]},"OptimizationSplitChunksCacheGroup":{"description":"Options object for describing behavior of a cache group selecting modules that should be cached together.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"chunks":{"description":"Select chunks for determining cache group content (defaults to \\"initial\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"enforce":{"description":"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.","type":"boolean"},"enforceSizeThreshold":{"description":"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"filename":{"description":"Sets the template for the filename for created chunks.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"idHint":{"description":"Sets the hint for chunk id.","type":"string"},"layer":{"description":"Assign modules to a cache group by module layer.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"maxAsyncRequests":{"description":"Maximum number of requests which are accepted for on-demand loading.","type":"number","minimum":1},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialRequests":{"description":"Maximum number of initial chunks which are accepted for an entry point.","type":"number","minimum":1},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minChunks":{"description":"Minimum number of times a module has to be duplicated until it\'s considered for splitting.","type":"number","minimum":1},"minRemainingSize":{"description":"Minimal size for the chunks the stay after moving the modules to a new chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"name":{"description":"Give chunks for this cache group a name (chunks with equal name are merged).","anyOf":[{"enum":[false]},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"priority":{"description":"Priority of this cache group.","type":"number"},"reuseExistingChunk":{"description":"Try to reuse existing chunk (with name) when it has matching modules.","type":"boolean"},"test":{"description":"Assign modules to a cache group by module name.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"type":{"description":"Assign modules to a cache group by module type.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"usedExports":{"description":"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.","type":"boolean"}}},"OptimizationSplitChunksGetCacheGroups":{"description":"A function returning cache groups.","instanceof":"Function","tsType":"((module: import(\'../lib/Module\')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)"},"OptimizationSplitChunksOptions":{"description":"Options object for splitting chunks into smaller chunks.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"cacheGroups":{"description":"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: \'default\', \'defaultVendors\').","type":"object","additionalProperties":{"description":"Configuration for a cache group.","anyOf":[{"enum":[false]},{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"},{"$ref":"#/definitions/OptimizationSplitChunksCacheGroup"}]},"not":{"description":"Using the cacheGroup shorthand syntax with a cache group named \'test\' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.","type":"object","additionalProperties":true,"properties":{"test":{"description":"The test property is a cache group name, but using the test option of the cache group could be intended instead.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]}},"required":["test"]}},"chunks":{"description":"Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"defaultSizeTypes":{"description":"Sets the size types which are used when a number is used for sizes.","type":"array","items":{"description":"Size type, like \'javascript\', \'webassembly\'.","type":"string"},"minItems":1},"enforceSizeThreshold":{"description":"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"fallbackCacheGroup":{"description":"Options for modules not selected by any other cache group.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"chunks":{"description":"Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]}}},"filename":{"description":"Sets the template for the filename for created chunks.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"hidePathInfo":{"description":"Prevents exposing path info when creating names for parts splitted by maxSize.","type":"boolean"},"maxAsyncRequests":{"description":"Maximum number of requests which are accepted for on-demand loading.","type":"number","minimum":1},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialRequests":{"description":"Maximum number of initial chunks which are accepted for an entry point.","type":"number","minimum":1},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minChunks":{"description":"Minimum number of times a module has to be duplicated until it\'s considered for splitting.","type":"number","minimum":1},"minRemainingSize":{"description":"Minimal size for the chunks the stay after moving the modules to a new chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"name":{"description":"Give chunks created a name (chunks with equal name are merged).","anyOf":[{"enum":[false]},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"usedExports":{"description":"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.","type":"boolean"}}},"OptimizationSplitChunksSizes":{"description":"Size description for limits.","anyOf":[{"description":"Size of the javascript part of the chunk.","type":"number","minimum":0},{"description":"Specify size limits per size type.","type":"object","additionalProperties":{"description":"Size of the part of the chunk with the type of the key.","type":"number"}}]},"Output":{"description":"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.","type":"object","additionalProperties":false,"properties":{"assetModuleFilename":{"$ref":"#/definitions/AssetModuleFilename"},"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"auxiliaryComment":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/AuxiliaryComment"}]},"charset":{"$ref":"#/definitions/Charset"},"chunkFilename":{"$ref":"#/definitions/ChunkFilename"},"chunkFormat":{"$ref":"#/definitions/ChunkFormat"},"chunkLoadTimeout":{"$ref":"#/definitions/ChunkLoadTimeout"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"chunkLoadingGlobal":{"$ref":"#/definitions/ChunkLoadingGlobal"},"clean":{"$ref":"#/definitions/Clean"},"compareBeforeEmit":{"$ref":"#/definitions/CompareBeforeEmit"},"crossOriginLoading":{"$ref":"#/definitions/CrossOriginLoading"},"cssChunkFilename":{"$ref":"#/definitions/CssChunkFilename"},"cssFilename":{"$ref":"#/definitions/CssFilename"},"devtoolFallbackModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolFallbackModuleFilenameTemplate"},"devtoolModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolModuleFilenameTemplate"},"devtoolNamespace":{"$ref":"#/definitions/DevtoolNamespace"},"enabledChunkLoadingTypes":{"$ref":"#/definitions/EnabledChunkLoadingTypes"},"enabledLibraryTypes":{"$ref":"#/definitions/EnabledLibraryTypes"},"enabledWasmLoadingTypes":{"$ref":"#/definitions/EnabledWasmLoadingTypes"},"environment":{"$ref":"#/definitions/Environment"},"filename":{"$ref":"#/definitions/Filename"},"globalObject":{"$ref":"#/definitions/GlobalObject"},"hashDigest":{"$ref":"#/definitions/HashDigest"},"hashDigestLength":{"$ref":"#/definitions/HashDigestLength"},"hashFunction":{"$ref":"#/definitions/HashFunction"},"hashSalt":{"$ref":"#/definitions/HashSalt"},"hotUpdateChunkFilename":{"$ref":"#/definitions/HotUpdateChunkFilename"},"hotUpdateGlobal":{"$ref":"#/definitions/HotUpdateGlobal"},"hotUpdateMainFilename":{"$ref":"#/definitions/HotUpdateMainFilename"},"iife":{"$ref":"#/definitions/Iife"},"importFunctionName":{"$ref":"#/definitions/ImportFunctionName"},"importMetaName":{"$ref":"#/definitions/ImportMetaName"},"library":{"$ref":"#/definitions/Library"},"libraryExport":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/LibraryExport"}]},"libraryTarget":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/LibraryType"}]},"module":{"$ref":"#/definitions/OutputModule"},"path":{"$ref":"#/definitions/Path"},"pathinfo":{"$ref":"#/definitions/Pathinfo"},"publicPath":{"$ref":"#/definitions/PublicPath"},"scriptType":{"$ref":"#/definitions/ScriptType"},"sourceMapFilename":{"$ref":"#/definitions/SourceMapFilename"},"sourcePrefix":{"$ref":"#/definitions/SourcePrefix"},"strictModuleErrorHandling":{"$ref":"#/definitions/StrictModuleErrorHandling"},"strictModuleExceptionHandling":{"$ref":"#/definitions/StrictModuleExceptionHandling"},"trustedTypes":{"description":"Use a Trusted Types policy to create urls for chunks. \'output.uniqueName\' is used a default policy name. Passing a string sets a custom policy name.","anyOf":[{"enum":[true]},{"description":"The name of the Trusted Types policy created by webpack to serve bundle chunks.","type":"string","minLength":1},{"$ref":"#/definitions/TrustedTypes"}]},"umdNamedDefine":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/UmdNamedDefine"}]},"uniqueName":{"$ref":"#/definitions/UniqueName"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"},"webassemblyModuleFilename":{"$ref":"#/definitions/WebassemblyModuleFilename"},"workerChunkLoading":{"$ref":"#/definitions/ChunkLoading"},"workerWasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"OutputModule":{"description":"Output javascript files as module source type.","type":"boolean"},"OutputNormalized":{"description":"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.","type":"object","additionalProperties":false,"properties":{"assetModuleFilename":{"$ref":"#/definitions/AssetModuleFilename"},"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"charset":{"$ref":"#/definitions/Charset"},"chunkFilename":{"$ref":"#/definitions/ChunkFilename"},"chunkFormat":{"$ref":"#/definitions/ChunkFormat"},"chunkLoadTimeout":{"$ref":"#/definitions/ChunkLoadTimeout"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"chunkLoadingGlobal":{"$ref":"#/definitions/ChunkLoadingGlobal"},"clean":{"$ref":"#/definitions/Clean"},"compareBeforeEmit":{"$ref":"#/definitions/CompareBeforeEmit"},"crossOriginLoading":{"$ref":"#/definitions/CrossOriginLoading"},"cssChunkFilename":{"$ref":"#/definitions/CssChunkFilename"},"cssFilename":{"$ref":"#/definitions/CssFilename"},"devtoolFallbackModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolFallbackModuleFilenameTemplate"},"devtoolModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolModuleFilenameTemplate"},"devtoolNamespace":{"$ref":"#/definitions/DevtoolNamespace"},"enabledChunkLoadingTypes":{"$ref":"#/definitions/EnabledChunkLoadingTypes"},"enabledLibraryTypes":{"$ref":"#/definitions/EnabledLibraryTypes"},"enabledWasmLoadingTypes":{"$ref":"#/definitions/EnabledWasmLoadingTypes"},"environment":{"$ref":"#/definitions/Environment"},"filename":{"$ref":"#/definitions/Filename"},"globalObject":{"$ref":"#/definitions/GlobalObject"},"hashDigest":{"$ref":"#/definitions/HashDigest"},"hashDigestLength":{"$ref":"#/definitions/HashDigestLength"},"hashFunction":{"$ref":"#/definitions/HashFunction"},"hashSalt":{"$ref":"#/definitions/HashSalt"},"hotUpdateChunkFilename":{"$ref":"#/definitions/HotUpdateChunkFilename"},"hotUpdateGlobal":{"$ref":"#/definitions/HotUpdateGlobal"},"hotUpdateMainFilename":{"$ref":"#/definitions/HotUpdateMainFilename"},"iife":{"$ref":"#/definitions/Iife"},"importFunctionName":{"$ref":"#/definitions/ImportFunctionName"},"importMetaName":{"$ref":"#/definitions/ImportMetaName"},"library":{"$ref":"#/definitions/LibraryOptions"},"module":{"$ref":"#/definitions/OutputModule"},"path":{"$ref":"#/definitions/Path"},"pathinfo":{"$ref":"#/definitions/Pathinfo"},"publicPath":{"$ref":"#/definitions/PublicPath"},"scriptType":{"$ref":"#/definitions/ScriptType"},"sourceMapFilename":{"$ref":"#/definitions/SourceMapFilename"},"sourcePrefix":{"$ref":"#/definitions/SourcePrefix"},"strictModuleErrorHandling":{"$ref":"#/definitions/StrictModuleErrorHandling"},"strictModuleExceptionHandling":{"$ref":"#/definitions/StrictModuleExceptionHandling"},"trustedTypes":{"$ref":"#/definitions/TrustedTypes"},"uniqueName":{"$ref":"#/definitions/UniqueName"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"},"webassemblyModuleFilename":{"$ref":"#/definitions/WebassemblyModuleFilename"},"workerChunkLoading":{"$ref":"#/definitions/ChunkLoading"},"workerWasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"Parallelism":{"description":"The number of parallel processed modules in the compilation.","type":"number","minimum":1},"ParserOptionsByModuleType":{"description":"Specify options for each parser.","type":"object","additionalProperties":{"description":"Options for parsing.","type":"object","additionalProperties":true},"properties":{"asset":{"$ref":"#/definitions/AssetParserOptions"},"asset/inline":{"$ref":"#/definitions/EmptyParserOptions"},"asset/resource":{"$ref":"#/definitions/EmptyParserOptions"},"asset/source":{"$ref":"#/definitions/EmptyParserOptions"},"javascript":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/auto":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/dynamic":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/esm":{"$ref":"#/definitions/JavascriptParserOptions"}}},"Path":{"description":"The output directory as **absolute path** (required).","type":"string","absolutePath":true},"Pathinfo":{"description":"Include comments with information about the modules.","anyOf":[{"enum":["verbose"]},{"type":"boolean"}]},"Performance":{"description":"Configuration for web performance recommendations.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/PerformanceOptions"}]},"PerformanceOptions":{"description":"Configuration object for web performance recommendations.","type":"object","additionalProperties":false,"properties":{"assetFilter":{"description":"Filter function to select assets that are checked.","instanceof":"Function","tsType":"Function"},"hints":{"description":"Sets the format of the hints: warnings, errors or nothing at all.","enum":[false,"warning","error"]},"maxAssetSize":{"description":"File size limit (in bytes) when exceeded, that webpack will provide performance hints.","type":"number"},"maxEntrypointSize":{"description":"Total size of an entry point (in bytes).","type":"number"}}},"Plugins":{"description":"Add additional plugins to the compiler.","type":"array","items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"$ref":"#/definitions/WebpackPluginInstance"},{"$ref":"#/definitions/WebpackPluginFunction"}]}},"Profile":{"description":"Capture timing information for each module.","type":"boolean"},"PublicPath":{"description":"The \'publicPath\' specifies the public URL address of the output files when referenced in a browser.","anyOf":[{"enum":["auto"]},{"$ref":"#/definitions/RawPublicPath"}]},"RawPublicPath":{"description":"The \'publicPath\' specifies the public URL address of the output files when referenced in a browser.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"RecordsInputPath":{"description":"Store compiler state to a json file.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"RecordsOutputPath":{"description":"Load compiler state from a json file.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"RecordsPath":{"description":"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"Resolve":{"description":"Options for the resolver.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"ResolveAlias":{"description":"Redirect module requests.","anyOf":[{"type":"array","items":{"description":"Alias configuration.","type":"object","additionalProperties":false,"properties":{"alias":{"description":"New request.","anyOf":[{"description":"Multiple alternative requests.","type":"array","items":{"description":"One choice of request.","type":"string","minLength":1}},{"description":"Ignore request (replace with empty module).","enum":[false]},{"description":"New request.","type":"string","minLength":1}]},"name":{"description":"Request to be redirected.","type":"string"},"onlyModule":{"description":"Redirect only exact matching request.","type":"boolean"}},"required":["alias","name"]}},{"type":"object","additionalProperties":{"description":"New request.","anyOf":[{"description":"Multiple alternative requests.","type":"array","items":{"description":"One choice of request.","type":"string","minLength":1}},{"description":"Ignore request (replace with empty module).","enum":[false]},{"description":"New request.","type":"string","minLength":1}]}}]},"ResolveLoader":{"description":"Options for the resolver when resolving loaders.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"ResolveOptions":{"description":"Options object for resolving requests.","type":"object","additionalProperties":false,"properties":{"alias":{"$ref":"#/definitions/ResolveAlias"},"aliasFields":{"description":"Fields in the description file (usually package.json) which are used to redirect requests inside the module.","type":"array","items":{"description":"Field in the description file (usually package.json) which are used to redirect requests inside the module.","anyOf":[{"type":"array","items":{"description":"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.","type":"string","minLength":1}},{"type":"string","minLength":1}]}},"byDependency":{"description":"Extra resolve options per dependency category. Typical categories are \\"commonjs\\", \\"amd\\", \\"esm\\".","type":"object","additionalProperties":{"description":"Options object for resolving requests.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]}},"cache":{"description":"Enable caching of successfully resolved requests (cache entries are revalidated).","type":"boolean"},"cachePredicate":{"description":"Predicate function to decide which requests should be cached.","instanceof":"Function","tsType":"((request: import(\'enhanced-resolve\').ResolveRequest) => boolean)"},"cacheWithContext":{"description":"Include the context information in the cache identifier when caching.","type":"boolean"},"conditionNames":{"description":"Condition names for exports field entry point.","type":"array","items":{"description":"Condition names for exports field entry point.","type":"string"}},"descriptionFiles":{"description":"Filenames used to find a description file (like a package.json).","type":"array","items":{"description":"Filename used to find a description file (like a package.json).","type":"string","minLength":1}},"enforceExtension":{"description":"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).","type":"boolean"},"exportsFields":{"description":"Field names from the description file (usually package.json) which are used to provide entry points of a package.","type":"array","items":{"description":"Field name from the description file (usually package.json) which is used to provide entry points of a package.","type":"string"}},"extensionAlias":{"description":"An object which maps extension to extension aliases.","type":"object","additionalProperties":{"description":"Extension alias.","anyOf":[{"description":"Multiple extensions.","type":"array","items":{"description":"Aliased extension.","type":"string","minLength":1}},{"description":"Aliased extension.","type":"string","minLength":1}]}},"extensions":{"description":"Extensions added to the request when trying to find the file.","type":"array","items":{"description":"Extension added to the request when trying to find the file.","type":"string"}},"fallback":{"description":"Redirect module requests when normal resolving fails.","oneOf":[{"$ref":"#/definitions/ResolveAlias"}]},"fileSystem":{"description":"Filesystem for the resolver.","tsType":"(import(\'../lib/util/fs\').InputFileSystem)"},"fullySpecified":{"description":"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn\'t affect requests from mainFields, aliasFields or aliases).","type":"boolean"},"importsFields":{"description":"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).","type":"array","items":{"description":"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).","type":"string"}},"mainFields":{"description":"Field names from the description file (package.json) which are used to find the default entry point.","type":"array","items":{"description":"Field name from the description file (package.json) which are used to find the default entry point.","anyOf":[{"type":"array","items":{"description":"Part of the field path from the description file (package.json) which are used to find the default entry point.","type":"string","minLength":1}},{"type":"string","minLength":1}]}},"mainFiles":{"description":"Filenames used to find the default entry point if there is no description file or main field.","type":"array","items":{"description":"Filename used to find the default entry point if there is no description file or main field.","type":"string","minLength":1}},"modules":{"description":"Folder names or directory paths where to find modules.","type":"array","items":{"description":"Folder name or directory path where to find modules.","type":"string","minLength":1}},"plugins":{"description":"Plugins for the resolver.","type":"array","cli":{"exclude":true},"items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"enum":["..."]},{"$ref":"#/definitions/ResolvePluginInstance"}]}},"preferAbsolute":{"description":"Prefer to resolve server-relative URLs (starting with \'/\') as absolute paths before falling back to resolve in \'resolve.roots\'.","type":"boolean"},"preferRelative":{"description":"Prefer to resolve module requests as relative request and fallback to resolving as module.","type":"boolean"},"resolver":{"description":"Custom resolver.","tsType":"(import(\'enhanced-resolve\').Resolver)"},"restrictions":{"description":"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.","type":"array","items":{"description":"Resolve restriction. Resolve result must fulfill this restriction.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":true,"minLength":1}]}},"roots":{"description":"A list of directories in which requests that are server-relative URLs (starting with \'/\') are resolved.","type":"array","items":{"description":"Directory in which requests that are server-relative URLs (starting with \'/\') are resolved.","type":"string"}},"symlinks":{"description":"Enable resolving symlinks to the original location.","type":"boolean"},"unsafeCache":{"description":"Enable caching of successfully resolved requests (cache entries are not revalidated).","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":true}]},"useSyncFileSystemCalls":{"description":"Use synchronous filesystem calls for the resolver.","type":"boolean"}}},"ResolvePluginInstance":{"description":"Plugin instance.","type":"object","additionalProperties":true,"properties":{"apply":{"description":"The run point of the plugin, required method.","instanceof":"Function","tsType":"(resolver: import(\'enhanced-resolve\').Resolver) => void"}},"required":["apply"]},"RuleSetCondition":{"description":"A condition matcher.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"((value: string) => boolean)"},{"$ref":"#/definitions/RuleSetLogicalConditions"},{"$ref":"#/definitions/RuleSetConditions"}]},"RuleSetConditionAbsolute":{"description":"A condition matcher matching an absolute path.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":true},{"instanceof":"Function","tsType":"((value: string) => boolean)"},{"$ref":"#/definitions/RuleSetLogicalConditionsAbsolute"},{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"RuleSetConditionOrConditions":{"description":"One or multiple rule conditions.","cli":{"helper":true},"anyOf":[{"$ref":"#/definitions/RuleSetCondition"},{"$ref":"#/definitions/RuleSetConditions"}]},"RuleSetConditionOrConditionsAbsolute":{"description":"One or multiple rule conditions matching an absolute path.","cli":{"helper":true},"anyOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"},{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"RuleSetConditions":{"description":"A list of rule conditions.","type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/RuleSetCondition"}]}},"RuleSetConditionsAbsolute":{"description":"A list of rule conditions matching an absolute path.","type":"array","items":{"description":"A rule condition matching an absolute path.","oneOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"}]}},"RuleSetLoader":{"description":"A loader request.","type":"string","minLength":1},"RuleSetLoaderOptions":{"description":"Options passed to a loader.","anyOf":[{"type":"string"},{"type":"object"}]},"RuleSetLogicalConditions":{"description":"Logic operators used in a condition matcher.","type":"object","additionalProperties":false,"properties":{"and":{"description":"Logical AND.","oneOf":[{"$ref":"#/definitions/RuleSetConditions"}]},"not":{"description":"Logical NOT.","oneOf":[{"$ref":"#/definitions/RuleSetCondition"}]},"or":{"description":"Logical OR.","oneOf":[{"$ref":"#/definitions/RuleSetConditions"}]}}},"RuleSetLogicalConditionsAbsolute":{"description":"Logic operators used in a condition matcher.","type":"object","additionalProperties":false,"properties":{"and":{"description":"Logical AND.","oneOf":[{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"not":{"description":"Logical NOT.","oneOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"}]},"or":{"description":"Logical OR.","oneOf":[{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]}}},"RuleSetRule":{"description":"A rule description with conditions and effects for modules.","type":"object","additionalProperties":false,"properties":{"assert":{"description":"Match on import assertions of the dependency.","type":"object","additionalProperties":{"$ref":"#/definitions/RuleSetConditionOrConditions"}},"compiler":{"description":"Match the child compiler name.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"dependency":{"description":"Match dependency type.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"descriptionData":{"description":"Match values of properties in the description file (usually package.json).","type":"object","additionalProperties":{"$ref":"#/definitions/RuleSetConditionOrConditions"}},"enforce":{"description":"Enforce this rule as pre or post step.","enum":["pre","post"]},"exclude":{"description":"Shortcut for resource.exclude.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"generator":{"description":"The options for the module generator.","type":"object"},"include":{"description":"Shortcut for resource.include.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"issuer":{"description":"Match the issuer of the module (The module pointing to this module).","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"issuerLayer":{"description":"Match layer of the issuer of this module (The module pointing to this module).","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"layer":{"description":"Specifies the layer in which the module should be placed in.","type":"string"},"loader":{"description":"Shortcut for use.loader.","oneOf":[{"$ref":"#/definitions/RuleSetLoader"}]},"mimetype":{"description":"Match module mimetype when load from Data URI.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"oneOf":{"description":"Only execute the first matching rule in this array.","type":"array","items":{"description":"A rule.","oneOf":[{"$ref":"#/definitions/RuleSetRule"}]}},"options":{"description":"Shortcut for use.options.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetLoaderOptions"}]},"parser":{"description":"Options for parsing.","type":"object","additionalProperties":true},"realResource":{"description":"Match the real resource path of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"resolve":{"description":"Options for the resolver.","type":"object","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"resource":{"description":"Match the resource path of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"resourceFragment":{"description":"Match the resource fragment of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"resourceQuery":{"description":"Match the resource query of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"rules":{"description":"Match and execute these rules when this rule is matched.","type":"array","items":{"description":"A rule.","oneOf":[{"$ref":"#/definitions/RuleSetRule"}]}},"scheme":{"description":"Match module scheme.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"sideEffects":{"description":"Flags a module as with or without side effects.","type":"boolean"},"test":{"description":"Shortcut for resource.test.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"type":{"description":"Module type to use for the module.","type":"string"},"use":{"description":"Modifiers applied to the module when rule is matched.","oneOf":[{"$ref":"#/definitions/RuleSetUse"}]}}},"RuleSetRules":{"description":"A list of rules.","type":"array","items":{"description":"A rule.","anyOf":[{"cli":{"exclude":true},"enum":["..."]},{"$ref":"#/definitions/RuleSetRule"}]}},"RuleSetUse":{"description":"A list of descriptions of loaders applied.","anyOf":[{"type":"array","items":{"description":"An use item.","oneOf":[{"$ref":"#/definitions/RuleSetUseItem"}]}},{"instanceof":"Function","tsType":"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])"},{"$ref":"#/definitions/RuleSetUseItem"}]},"RuleSetUseItem":{"description":"A description of an applied loader.","anyOf":[{"type":"object","additionalProperties":false,"properties":{"ident":{"description":"Unique loader options identifier.","type":"string"},"loader":{"description":"Loader name.","oneOf":[{"$ref":"#/definitions/RuleSetLoader"}]},"options":{"description":"Loader options.","oneOf":[{"$ref":"#/definitions/RuleSetLoaderOptions"}]}}},{"instanceof":"Function","tsType":"((data: object) => RuleSetUseItem|RuleSetUseItem[])"},{"$ref":"#/definitions/RuleSetLoader"}]},"ScriptType":{"description":"This option enables loading async chunks via a custom script type, such as script type=\\"module\\".","enum":[false,"text/javascript","module"]},"SnapshotOptions":{"description":"Options affecting how file system snapshots are created and validated.","type":"object","additionalProperties":false,"properties":{"buildDependencies":{"description":"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"immutablePaths":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","type":"array","items":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","anyOf":[{"description":"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to an immutable directory (usually a package manager cache directory).","type":"string","absolutePath":true,"minLength":1}]}},"managedPaths":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","type":"array","items":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","anyOf":[{"description":"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to a managed directory (usually a node_modules directory).","type":"string","absolutePath":true,"minLength":1}]}},"module":{"description":"Options for snapshotting dependencies of modules to determine if they need to be built again.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"resolve":{"description":"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"resolveBuildDependencies":{"description":"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}}}},"SourceMapFilename":{"description":"The filename of the SourceMaps for the JavaScript files. They are inside the \'output.path\' directory.","type":"string","absolutePath":false},"SourcePrefix":{"description":"Prefixes every line of the source in the bundle with this string.","type":"string"},"StatsOptions":{"description":"Stats options object.","type":"object","additionalProperties":false,"properties":{"all":{"description":"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).","type":"boolean"},"assets":{"description":"Add assets information.","type":"boolean"},"assetsSort":{"description":"Sort the assets by that field.","type":"string"},"assetsSpace":{"description":"Space to display assets (groups will be collapsed to fit this space).","type":"number"},"builtAt":{"description":"Add built at time information.","type":"boolean"},"cached":{"description":"Add information about cached (not built) modules (deprecated: use \'cachedModules\' instead).","type":"boolean"},"cachedAssets":{"description":"Show cached assets (setting this to `false` only shows emitted files).","type":"boolean"},"cachedModules":{"description":"Add information about cached (not built) modules.","type":"boolean"},"children":{"description":"Add children information.","type":"boolean"},"chunkGroupAuxiliary":{"description":"Display auxiliary assets in chunk groups.","type":"boolean"},"chunkGroupChildren":{"description":"Display children of chunk groups.","type":"boolean"},"chunkGroupMaxAssets":{"description":"Limit of assets displayed in chunk groups.","type":"number"},"chunkGroups":{"description":"Display all chunk groups with the corresponding bundles.","type":"boolean"},"chunkModules":{"description":"Add built modules information to chunk information.","type":"boolean"},"chunkModulesSpace":{"description":"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).","type":"number"},"chunkOrigins":{"description":"Add the origins of chunks and chunk merging info.","type":"boolean"},"chunkRelations":{"description":"Add information about parent, children and sibling chunks to chunk information.","type":"boolean"},"chunks":{"description":"Add chunk information.","type":"boolean"},"chunksSort":{"description":"Sort the chunks by that field.","type":"string"},"colors":{"description":"Enables/Disables colorful output.","anyOf":[{"description":"Enables/Disables colorful output.","type":"boolean"},{"type":"object","additionalProperties":false,"properties":{"bold":{"description":"Custom color for bold text.","type":"string"},"cyan":{"description":"Custom color for cyan text.","type":"string"},"green":{"description":"Custom color for green text.","type":"string"},"magenta":{"description":"Custom color for magenta text.","type":"string"},"red":{"description":"Custom color for red text.","type":"string"},"yellow":{"description":"Custom color for yellow text.","type":"string"}}}]},"context":{"description":"Context directory for request shortening.","type":"string","absolutePath":true},"dependentModules":{"description":"Show chunk modules that are dependencies of other modules of the chunk.","type":"boolean"},"depth":{"description":"Add module depth in module graph.","type":"boolean"},"entrypoints":{"description":"Display the entry points with the corresponding bundles.","anyOf":[{"enum":["auto"]},{"type":"boolean"}]},"env":{"description":"Add --env information.","type":"boolean"},"errorDetails":{"description":"Add details to errors (like resolving log).","anyOf":[{"enum":["auto"]},{"type":"boolean"}]},"errorStack":{"description":"Add internal stack trace to errors.","type":"boolean"},"errors":{"description":"Add errors.","type":"boolean"},"errorsCount":{"description":"Add errors count.","type":"boolean"},"exclude":{"description":"Please use excludeModules instead.","cli":{"exclude":true},"anyOf":[{"type":"boolean"},{"$ref":"#/definitions/ModuleFilterTypes"}]},"excludeAssets":{"description":"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.","oneOf":[{"$ref":"#/definitions/AssetFilterTypes"}]},"excludeModules":{"description":"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/ModuleFilterTypes"}]},"groupAssetsByChunk":{"description":"Group assets by how their are related to chunks.","type":"boolean"},"groupAssetsByEmitStatus":{"description":"Group assets by their status (emitted, compared for emit or cached).","type":"boolean"},"groupAssetsByExtension":{"description":"Group assets by their extension.","type":"boolean"},"groupAssetsByInfo":{"description":"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).","type":"boolean"},"groupAssetsByPath":{"description":"Group assets by their path.","type":"boolean"},"groupModulesByAttributes":{"description":"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).","type":"boolean"},"groupModulesByCacheStatus":{"description":"Group modules by their status (cached or built and cacheable).","type":"boolean"},"groupModulesByExtension":{"description":"Group modules by their extension.","type":"boolean"},"groupModulesByLayer":{"description":"Group modules by their layer.","type":"boolean"},"groupModulesByPath":{"description":"Group modules by their path.","type":"boolean"},"groupModulesByType":{"description":"Group modules by their type.","type":"boolean"},"groupReasonsByOrigin":{"description":"Group reasons by their origin module.","type":"boolean"},"hash":{"description":"Add the hash of the compilation.","type":"boolean"},"ids":{"description":"Add ids.","type":"boolean"},"logging":{"description":"Add logging output.","anyOf":[{"description":"Specify log level of logging output.","enum":["none","error","warn","info","log","verbose"]},{"description":"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).","type":"boolean"}]},"loggingDebug":{"description":"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.","anyOf":[{"description":"Enable/Disable debug logging for all loggers.","type":"boolean"},{"$ref":"#/definitions/FilterTypes"}]},"loggingTrace":{"description":"Add stack traces to logging output.","type":"boolean"},"moduleAssets":{"description":"Add information about assets inside modules.","type":"boolean"},"moduleTrace":{"description":"Add dependencies and origin of warnings/errors.","type":"boolean"},"modules":{"description":"Add built modules information.","type":"boolean"},"modulesSort":{"description":"Sort the modules by that field.","type":"string"},"modulesSpace":{"description":"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).","type":"number"},"nestedModules":{"description":"Add information about modules nested in other modules (like with module concatenation).","type":"boolean"},"nestedModulesSpace":{"description":"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).","type":"number"},"optimizationBailout":{"description":"Show reasons why optimization bailed out for modules.","type":"boolean"},"orphanModules":{"description":"Add information about orphan modules.","type":"boolean"},"outputPath":{"description":"Add output path information.","type":"boolean"},"performance":{"description":"Add performance hint flags.","type":"boolean"},"preset":{"description":"Preset for the default values.","anyOf":[{"type":"boolean"},{"type":"string"}]},"providedExports":{"description":"Show exports provided by modules.","type":"boolean"},"publicPath":{"description":"Add public path information.","type":"boolean"},"reasons":{"description":"Add information about the reasons why modules are included.","type":"boolean"},"reasonsSpace":{"description":"Space to display reasons (groups will be collapsed to fit this space).","type":"number"},"relatedAssets":{"description":"Add information about assets that are related to other assets (like SourceMaps for assets).","type":"boolean"},"runtime":{"description":"Add information about runtime modules (deprecated: use \'runtimeModules\' instead).","type":"boolean"},"runtimeModules":{"description":"Add information about runtime modules.","type":"boolean"},"source":{"description":"Add the source code of modules.","type":"boolean"},"timings":{"description":"Add timing information.","type":"boolean"},"usedExports":{"description":"Show exports used by modules.","type":"boolean"},"version":{"description":"Add webpack version information.","type":"boolean"},"warnings":{"description":"Add warnings.","type":"boolean"},"warningsCount":{"description":"Add warnings count.","type":"boolean"},"warningsFilter":{"description":"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.","oneOf":[{"$ref":"#/definitions/WarningFilterTypes"}]}}},"StatsValue":{"description":"Stats options object or preset name.","anyOf":[{"enum":["none","summary","errors-only","errors-warnings","minimal","normal","detailed","verbose"]},{"type":"boolean"},{"$ref":"#/definitions/StatsOptions"}]},"StrictModuleErrorHandling":{"description":"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.","type":"boolean"},"StrictModuleExceptionHandling":{"description":"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.","type":"boolean"},"Target":{"description":"Environment to build for. An array of environments to build for all of them when possible.","anyOf":[{"type":"array","items":{"description":"Environment to build for.","type":"string","minLength":1},"minItems":1},{"enum":[false]},{"type":"string","minLength":1}]},"TrustedTypes":{"description":"Use a Trusted Types policy to create urls for chunks.","type":"object","additionalProperties":false,"properties":{"policyName":{"description":"The name of the Trusted Types policy created by webpack to serve bundle chunks.","type":"string","minLength":1}}},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"},"UniqueName":{"description":"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.","type":"string","minLength":1},"WarningFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((warning: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsError, value: string) => boolean)"}]},"WarningFilterTypes":{"description":"Filtering warnings.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/WarningFilterItemTypes"}]}},{"$ref":"#/definitions/WarningFilterItemTypes"}]},"WasmLoading":{"description":"The method of loading WebAssembly Modules (methods included by default are \'fetch\' (web/WebWorker), \'async-node\' (node.js), but others might be added by plugins).","anyOf":[{"enum":[false]},{"$ref":"#/definitions/WasmLoadingType"}]},"WasmLoadingType":{"description":"The method of loading WebAssembly Modules (methods included by default are \'fetch\' (web/WebWorker), \'async-node\' (node.js), but others might be added by plugins).","anyOf":[{"enum":["fetch-streaming","fetch","async-node"]},{"type":"string"}]},"Watch":{"description":"Enter watch mode, which rebuilds on file change.","type":"boolean"},"WatchOptions":{"description":"Options for the watcher.","type":"object","additionalProperties":false,"properties":{"aggregateTimeout":{"description":"Delay the rebuilt after the first change. Value is a time in ms.","type":"number"},"followSymlinks":{"description":"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks (\'resolve.symlinks\').","type":"boolean"},"ignored":{"description":"Ignore some files from watching (glob pattern or regexp).","anyOf":[{"type":"array","items":{"description":"A glob pattern for files that should be ignored from watching.","type":"string","minLength":1}},{"instanceof":"RegExp","tsType":"RegExp"},{"description":"A single glob pattern for files that should be ignored from watching.","type":"string","minLength":1}]},"poll":{"description":"Enable polling mode for watching.","anyOf":[{"description":"`number`: use polling with specified interval.","type":"number"},{"description":"`true`: use polling.","type":"boolean"}]},"stdin":{"description":"Stop watching when stdin stream has ended.","type":"boolean"}}},"WebassemblyModuleFilename":{"description":"The filename of WebAssembly modules as relative path inside the \'output.path\' directory.","type":"string","absolutePath":false},"WebpackOptionsNormalized":{"description":"Normalized webpack options object.","type":"object","additionalProperties":false,"properties":{"amd":{"$ref":"#/definitions/Amd"},"bail":{"$ref":"#/definitions/Bail"},"cache":{"$ref":"#/definitions/CacheOptionsNormalized"},"context":{"$ref":"#/definitions/Context"},"dependencies":{"$ref":"#/definitions/Dependencies"},"devServer":{"$ref":"#/definitions/DevServer"},"devtool":{"$ref":"#/definitions/DevTool"},"entry":{"$ref":"#/definitions/EntryNormalized"},"experiments":{"$ref":"#/definitions/ExperimentsNormalized"},"externals":{"$ref":"#/definitions/Externals"},"externalsPresets":{"$ref":"#/definitions/ExternalsPresets"},"externalsType":{"$ref":"#/definitions/ExternalsType"},"ignoreWarnings":{"$ref":"#/definitions/IgnoreWarningsNormalized"},"infrastructureLogging":{"$ref":"#/definitions/InfrastructureLogging"},"loader":{"$ref":"#/definitions/Loader"},"mode":{"$ref":"#/definitions/Mode"},"module":{"$ref":"#/definitions/ModuleOptionsNormalized"},"name":{"$ref":"#/definitions/Name"},"node":{"$ref":"#/definitions/Node"},"optimization":{"$ref":"#/definitions/Optimization"},"output":{"$ref":"#/definitions/OutputNormalized"},"parallelism":{"$ref":"#/definitions/Parallelism"},"performance":{"$ref":"#/definitions/Performance"},"plugins":{"$ref":"#/definitions/Plugins"},"profile":{"$ref":"#/definitions/Profile"},"recordsInputPath":{"$ref":"#/definitions/RecordsInputPath"},"recordsOutputPath":{"$ref":"#/definitions/RecordsOutputPath"},"resolve":{"$ref":"#/definitions/Resolve"},"resolveLoader":{"$ref":"#/definitions/ResolveLoader"},"snapshot":{"$ref":"#/definitions/SnapshotOptions"},"stats":{"$ref":"#/definitions/StatsValue"},"target":{"$ref":"#/definitions/Target"},"watch":{"$ref":"#/definitions/Watch"},"watchOptions":{"$ref":"#/definitions/WatchOptions"}},"required":["cache","snapshot","entry","experiments","externals","externalsPresets","infrastructureLogging","module","node","optimization","output","plugins","resolve","resolveLoader","stats","watchOptions"]},"WebpackPluginFunction":{"description":"Function acting as plugin.","instanceof":"Function","tsType":"(this: import(\'../lib/Compiler\'), compiler: import(\'../lib/Compiler\')) => void"},"WebpackPluginInstance":{"description":"Plugin instance.","type":"object","additionalProperties":true,"properties":{"apply":{"description":"The run point of the plugin, required method.","instanceof":"Function","tsType":"(compiler: import(\'../lib/Compiler\')) => void"}},"required":["apply"]}},"title":"WebpackOptions","description":"Options object as provided by the user.","type":"object","additionalProperties":false,"properties":{"amd":{"$ref":"#/definitions/Amd"},"bail":{"$ref":"#/definitions/Bail"},"cache":{"$ref":"#/definitions/CacheOptions"},"context":{"$ref":"#/definitions/Context"},"dependencies":{"$ref":"#/definitions/Dependencies"},"devServer":{"$ref":"#/definitions/DevServer"},"devtool":{"$ref":"#/definitions/DevTool"},"entry":{"$ref":"#/definitions/Entry"},"experiments":{"$ref":"#/definitions/Experiments"},"externals":{"$ref":"#/definitions/Externals"},"externalsPresets":{"$ref":"#/definitions/ExternalsPresets"},"externalsType":{"$ref":"#/definitions/ExternalsType"},"ignoreWarnings":{"$ref":"#/definitions/IgnoreWarnings"},"infrastructureLogging":{"$ref":"#/definitions/InfrastructureLogging"},"loader":{"$ref":"#/definitions/Loader"},"mode":{"$ref":"#/definitions/Mode"},"module":{"$ref":"#/definitions/ModuleOptions"},"name":{"$ref":"#/definitions/Name"},"node":{"$ref":"#/definitions/Node"},"optimization":{"$ref":"#/definitions/Optimization"},"output":{"$ref":"#/definitions/Output"},"parallelism":{"$ref":"#/definitions/Parallelism"},"performance":{"$ref":"#/definitions/Performance"},"plugins":{"$ref":"#/definitions/Plugins"},"profile":{"$ref":"#/definitions/Profile"},"recordsInputPath":{"$ref":"#/definitions/RecordsInputPath"},"recordsOutputPath":{"$ref":"#/definitions/RecordsOutputPath"},"recordsPath":{"$ref":"#/definitions/RecordsPath"},"resolve":{"$ref":"#/definitions/Resolve"},"resolveLoader":{"$ref":"#/definitions/ResolveLoader"},"snapshot":{"$ref":"#/definitions/SnapshotOptions"},"stats":{"$ref":"#/definitions/StatsValue"},"target":{"$ref":"#/definitions/Target"},"watch":{"$ref":"#/definitions/Watch"},"watchOptions":{"$ref":"#/definitions/WatchOptions"}}}'); - -/***/ }), - -/***/ 72245: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"BannerFunction":{"description":"The banner as function, it will be wrapped in a comment.","instanceof":"Function","tsType":"(data: { hash: string, chunk: import(\'../../lib/Chunk\'), filename: string }) => string"},"Rule":{"description":"Filtering rule as regex or string.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","minLength":1}]},"Rules":{"description":"Filtering rules.","anyOf":[{"type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/Rule"}]}},{"$ref":"#/definitions/Rule"}]}},"title":"BannerPluginArgument","anyOf":[{"description":"The banner as string, it will be wrapped in a comment.","type":"string","minLength":1},{"title":"BannerPluginOptions","type":"object","additionalProperties":false,"properties":{"banner":{"description":"Specifies the banner.","anyOf":[{"type":"string"},{"$ref":"#/definitions/BannerFunction"}]},"entryOnly":{"description":"If true, the banner will only be added to the entry chunks.","type":"boolean"},"exclude":{"description":"Exclude all modules matching any of these conditions.","oneOf":[{"$ref":"#/definitions/Rules"}]},"footer":{"description":"If true, banner will be placed at the end of the output.","type":"boolean"},"include":{"description":"Include all modules matching any of these conditions.","oneOf":[{"$ref":"#/definitions/Rules"}]},"raw":{"description":"If true, banner will not be wrapped in a comment.","type":"boolean"},"test":{"description":"Include all modules that pass test assertion.","oneOf":[{"$ref":"#/definitions/Rules"}]}},"required":["banner"]},{"$ref":"#/definitions/BannerFunction"}]}'); - -/***/ }), - -/***/ 81419: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"DllPluginOptions","type":"object","additionalProperties":false,"properties":{"context":{"description":"Context of requests in the manifest file (defaults to the webpack context).","type":"string","minLength":1},"entryOnly":{"description":"If true, only entry points will be exposed (default: true).","type":"boolean"},"format":{"description":"If true, manifest json file (output) will be formatted.","type":"boolean"},"name":{"description":"Name of the exposed dll function (external name, use value of \'output.library\').","type":"string","minLength":1},"path":{"description":"Absolute path to the manifest json file (output).","type":"string","minLength":1},"type":{"description":"Type of the dll bundle (external type, use value of \'output.libraryTarget\').","type":"string","minLength":1}},"required":["path"]}'); - -/***/ }), - -/***/ 53858: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"DllReferencePluginOptionsContent":{"description":"The mappings from request to module info.","type":"object","additionalProperties":{"description":"Module info.","type":"object","additionalProperties":false,"properties":{"buildMeta":{"description":"Meta information about the module.","type":"object"},"exports":{"description":"Information about the provided exports of the module.","anyOf":[{"description":"List of provided exports of the module.","type":"array","items":{"description":"Name of the export.","type":"string","minLength":1}},{"description":"Exports unknown/dynamic.","enum":[true]}]},"id":{"description":"Module ID.","anyOf":[{"type":"number"},{"type":"string","minLength":1}]}},"required":["id"]},"minProperties":1},"DllReferencePluginOptionsManifest":{"description":"An object containing content, name and type.","type":"object","additionalProperties":false,"properties":{"content":{"description":"The mappings from request to module info.","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsContent"}]},"name":{"description":"The name where the dll is exposed (external name).","type":"string","minLength":1},"type":{"description":"The type how the dll is exposed (external type).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]}},"required":["content"]},"DllReferencePluginOptionsSourceType":{"description":"The type how the dll is exposed (external type).","enum":["var","assign","this","window","global","commonjs","commonjs2","commonjs-module","amd","amd-require","umd","umd2","jsonp","system"]}},"title":"DllReferencePluginOptions","anyOf":[{"type":"object","additionalProperties":false,"properties":{"context":{"description":"Context of requests in the manifest (or content property) as absolute path.","type":"string","absolutePath":true},"extensions":{"description":"Extensions used to resolve modules in the dll bundle (only used when using \'scope\').","type":"array","items":{"description":"An extension.","type":"string"}},"manifest":{"description":"An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation.","anyOf":[{"type":"string","absolutePath":true},{"$ref":"#/definitions/DllReferencePluginOptionsManifest"}]},"name":{"description":"The name where the dll is exposed (external name, defaults to manifest.name).","type":"string","minLength":1},"scope":{"description":"Prefix which is used for accessing the content of the dll.","type":"string","minLength":1},"sourceType":{"description":"How the dll is exposed (libraryTarget, defaults to manifest.type).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]},"type":{"description":"The way how the export of the dll bundle is used.","enum":["require","object"]}},"required":["manifest"]},{"type":"object","additionalProperties":false,"properties":{"content":{"description":"The mappings from request to module info.","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsContent"}]},"context":{"description":"Context of requests in the manifest (or content property) as absolute path.","type":"string","absolutePath":true},"extensions":{"description":"Extensions used to resolve modules in the dll bundle (only used when using \'scope\').","type":"array","items":{"description":"An extension.","type":"string"}},"name":{"description":"The name where the dll is exposed (external name).","type":"string","minLength":1},"scope":{"description":"Prefix which is used for accessing the content of the dll.","type":"string","minLength":1},"sourceType":{"description":"How the dll is exposed (libraryTarget).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]},"type":{"description":"The way how the export of the dll bundle is used.","enum":["require","object"]}},"required":["content","name"]}]}'); - -/***/ }), - -/***/ 99422: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"HashFunction":{"description":"Algorithm used for generation the hash (see node.js crypto package).","anyOf":[{"type":"string","minLength":1},{"instanceof":"Function","tsType":"typeof import(\'../../lib/util/Hash\')"}]}},"title":"HashedModuleIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"context":{"description":"The context directory for creating names.","type":"string","absolutePath":true},"hashDigest":{"description":"The encoding to use when generating the hash, defaults to \'base64\'. All encodings from Node.JS\' hash.digest are supported.","enum":["hex","latin1","base64"]},"hashDigestLength":{"description":"The prefix length of the hash digest to use, defaults to 4.","type":"number","minimum":1},"hashFunction":{"description":"The hashing algorithm to use, defaults to \'md4\'. All functions from Node.JS\' crypto.createHash are supported.","oneOf":[{"$ref":"#/definitions/HashFunction"}]}}}'); - -/***/ }), - -/***/ 70229: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"IgnorePluginOptions","anyOf":[{"type":"object","additionalProperties":false,"properties":{"contextRegExp":{"description":"A RegExp to test the context (directory) against.","instanceof":"RegExp","tsType":"RegExp"},"resourceRegExp":{"description":"A RegExp to test the request against.","instanceof":"RegExp","tsType":"RegExp"}},"required":["resourceRegExp"]},{"type":"object","additionalProperties":false,"properties":{"checkResource":{"description":"A filter function for resource and context.","instanceof":"Function","tsType":"((resource: string, context: string) => boolean)"}},"required":["checkResource"]}]}'); - -/***/ }), - -/***/ 54206: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"JsonModulesPluginParserOptions","type":"object","additionalProperties":false,"properties":{"parse":{"description":"Function that executes for a module source string and should return json-compatible data.","instanceof":"Function","tsType":"((input: string) => any)"}}}'); - -/***/ }), - -/***/ 46425: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"LoaderOptionsPluginOptions","type":"object","additionalProperties":true,"properties":{"debug":{"description":"Whether loaders should be in debug mode or not. debug will be removed as of webpack 3.","type":"boolean"},"minimize":{"description":"Where loaders can be switched to minimize mode.","type":"boolean"},"options":{"description":"A configuration object that can be used to configure older loaders.","type":"object","additionalProperties":true,"properties":{"context":{"description":"The context that can be used to configure older loaders.","type":"string","absolutePath":true}}}}}'); - -/***/ }), - -/***/ 18273: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"HandlerFunction":{"description":"Function that executes for every progress step.","instanceof":"Function","tsType":"((percentage: number, msg: string, ...args: string[]) => void)"},"ProgressPluginOptions":{"description":"Options object for the ProgressPlugin.","type":"object","additionalProperties":false,"properties":{"activeModules":{"description":"Show active modules count and one active module in progress message.","type":"boolean"},"dependencies":{"description":"Show dependencies count in progress message.","type":"boolean"},"dependenciesCount":{"description":"Minimum dependencies count to start with. For better progress calculation. Default: 10000.","type":"number"},"entries":{"description":"Show entries count in progress message.","type":"boolean"},"handler":{"description":"Function that executes for every progress step.","oneOf":[{"$ref":"#/definitions/HandlerFunction"}]},"modules":{"description":"Show modules count in progress message.","type":"boolean"},"modulesCount":{"description":"Minimum modules count to start with. For better progress calculation. Default: 5000.","type":"number"},"percentBy":{"description":"Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.","enum":["entries","modules","dependencies",null]},"profile":{"description":"Collect profile data for progress steps. Default: false.","enum":[true,false,null]}}}},"title":"ProgressPluginArgument","anyOf":[{"$ref":"#/definitions/ProgressPluginOptions"},{"$ref":"#/definitions/HandlerFunction"}]}'); - -/***/ }), - -/***/ 52816: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"rule":{"description":"Include source maps for modules based on their extension (defaults to .js and .css).","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","minLength":1}]},"rules":{"description":"Include source maps for modules based on their extension (defaults to .js and .css).","anyOf":[{"type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/rule"}]}},{"$ref":"#/definitions/rule"}]}},"title":"SourceMapDevToolPluginOptions","type":"object","additionalProperties":false,"properties":{"append":{"description":"Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.","anyOf":[{"description":"Append no SourceMap comment to the bundle, but still generate SourceMaps.","enum":[false,null]},{"type":"string","minLength":1}]},"columns":{"description":"Indicates whether column mappings should be used (defaults to true).","type":"boolean"},"exclude":{"description":"Exclude modules that match the given value from source map generation.","oneOf":[{"$ref":"#/definitions/rules"}]},"fallbackModuleFilenameTemplate":{"description":"Generator string or function to create identifiers of modules for the \'sources\' array in the SourceMap used only if \'moduleFilenameTemplate\' would result in a conflict.","anyOf":[{"type":"string","minLength":1},{"description":"Custom function generating the identifier.","instanceof":"Function","tsType":"Function"}]},"fileContext":{"description":"Path prefix to which the [file] placeholder is relative to.","type":"string"},"filename":{"description":"Defines the output filename of the SourceMap (will be inlined if no value is provided).","anyOf":[{"description":"Disable separate SourceMap file and inline SourceMap as DataUrl.","enum":[false,null]},{"type":"string","absolutePath":false,"minLength":1}]},"include":{"description":"Include source maps for module paths that match the given value.","oneOf":[{"$ref":"#/definitions/rules"}]},"module":{"description":"Indicates whether SourceMaps from loaders should be used (defaults to true).","type":"boolean"},"moduleFilenameTemplate":{"description":"Generator string or function to create identifiers of modules for the \'sources\' array in the SourceMap.","anyOf":[{"type":"string","minLength":1},{"description":"Custom function generating the identifier.","instanceof":"Function","tsType":"Function"}]},"namespace":{"description":"Namespace prefix to allow multiple webpack roots in the devtools.","type":"string"},"noSources":{"description":"Omit the \'sourceContents\' array from the SourceMap.","type":"boolean"},"publicPath":{"description":"Provide a custom public path for the SourceMapping comment.","type":"string"},"sourceRoot":{"description":"Provide a custom value for the \'sourceRoot\' property in the SourceMap.","type":"string"},"test":{"$ref":"#/definitions/rules"}}}'); - -/***/ }), - -/***/ 14814: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"WatchIgnorePluginOptions","type":"object","additionalProperties":false,"properties":{"paths":{"description":"A list of RegExps or absolute paths to directories or files that should be ignored.","type":"array","items":{"description":"RegExp or absolute path to directories or files that should be ignored.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"}]},"minItems":1}},"required":["paths"]}'); - -/***/ }), - -/***/ 57030: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"Exposes":{"description":"Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.","anyOf":[{"type":"array","items":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesObject"}]}},{"$ref":"#/definitions/ExposesObject"}]},"ExposesConfig":{"description":"Advanced configuration for modules that should be exposed by this container.","type":"object","additionalProperties":false,"properties":{"import":{"description":"Request to a module that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]},"name":{"description":"Custom chunk name for the exposed module.","type":"string"}},"required":["import"]},"ExposesItem":{"description":"Module that should be exposed by this container.","type":"string","minLength":1},"ExposesItems":{"description":"Modules that should be exposed by this container.","type":"array","items":{"$ref":"#/definitions/ExposesItem"}},"ExposesObject":{"description":"Modules that should be exposed by this container. Property names are used as public paths.","type":"object","additionalProperties":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesConfig"},{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]}},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"}},"title":"ContainerPluginOptions","type":"object","additionalProperties":false,"properties":{"exposes":{"$ref":"#/definitions/Exposes"},"filename":{"description":"The filename for this container relative path inside the `output.path` directory.","type":"string","absolutePath":false,"minLength":1},"library":{"$ref":"#/definitions/LibraryOptions"},"name":{"description":"The name for this container.","type":"string","minLength":1},"runtime":{"$ref":"#/definitions/EntryRuntime"},"shareScope":{"description":"The name of the share scope which is shared with the host (defaults to \'default\').","type":"string","minLength":1}},"required":["name","exposes"]}'); - -/***/ }), - -/***/ 34290: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"Remotes":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.","anyOf":[{"type":"array","items":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesObject"}]}},{"$ref":"#/definitions/RemotesObject"}]},"RemotesConfig":{"description":"Advanced configuration for container locations from which modules should be resolved and loaded at runtime.","type":"object","additionalProperties":false,"properties":{"external":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]},"shareScope":{"description":"The name of the share scope shared with this remote.","type":"string","minLength":1}},"required":["external"]},"RemotesItem":{"description":"Container location from which modules should be resolved and loaded at runtime.","type":"string","minLength":1},"RemotesItems":{"description":"Container locations from which modules should be resolved and loaded at runtime.","type":"array","items":{"$ref":"#/definitions/RemotesItem"}},"RemotesObject":{"description":"Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.","type":"object","additionalProperties":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesConfig"},{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]}}},"title":"ContainerReferencePluginOptions","type":"object","additionalProperties":false,"properties":{"remoteType":{"description":"The external type of the remote containers.","oneOf":[{"$ref":"#/definitions/ExternalsType"}]},"remotes":{"$ref":"#/definitions/Remotes"},"shareScope":{"description":"The name of the share scope shared with all remotes (defaults to \'default\').","type":"string","minLength":1}},"required":["remoteType","remotes"]}'); - -/***/ }), - -/***/ 46413: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"Exposes":{"description":"Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.","anyOf":[{"type":"array","items":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesObject"}]}},{"$ref":"#/definitions/ExposesObject"}]},"ExposesConfig":{"description":"Advanced configuration for modules that should be exposed by this container.","type":"object","additionalProperties":false,"properties":{"import":{"description":"Request to a module that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]},"name":{"description":"Custom chunk name for the exposed module.","type":"string"}},"required":["import"]},"ExposesItem":{"description":"Module that should be exposed by this container.","type":"string","minLength":1},"ExposesItems":{"description":"Modules that should be exposed by this container.","type":"array","items":{"$ref":"#/definitions/ExposesItem"}},"ExposesObject":{"description":"Modules that should be exposed by this container. Property names are used as public paths.","type":"object","additionalProperties":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesConfig"},{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]}},"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"Remotes":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.","anyOf":[{"type":"array","items":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesObject"}]}},{"$ref":"#/definitions/RemotesObject"}]},"RemotesConfig":{"description":"Advanced configuration for container locations from which modules should be resolved and loaded at runtime.","type":"object","additionalProperties":false,"properties":{"external":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]},"shareScope":{"description":"The name of the share scope shared with this remote.","type":"string","minLength":1}},"required":["external"]},"RemotesItem":{"description":"Container location from which modules should be resolved and loaded at runtime.","type":"string","minLength":1},"RemotesItems":{"description":"Container locations from which modules should be resolved and loaded at runtime.","type":"array","items":{"$ref":"#/definitions/RemotesItem"}},"RemotesObject":{"description":"Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.","type":"object","additionalProperties":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesConfig"},{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]}},"Shared":{"description":"Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.","anyOf":[{"type":"array","items":{"description":"Modules that should be shared in the share scope.","anyOf":[{"$ref":"#/definitions/SharedItem"},{"$ref":"#/definitions/SharedObject"}]}},{"$ref":"#/definitions/SharedObject"}]},"SharedConfig":{"description":"Advanced configuration for modules that should be shared in the share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"import":{"description":"Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn\'t valid. Defaults to the property name.","anyOf":[{"description":"No provided or fallback module.","enum":[false]},{"$ref":"#/definitions/SharedItem"}]},"packageName":{"description":"Package name to determine required version from description file. This is only needed when package name can\'t be automatically determined from request.","type":"string","minLength":1},"requiredVersion":{"description":"Version requirement from module in share scope.","anyOf":[{"description":"No version requirement check.","enum":[false]},{"description":"Version as string. Can be prefixed with \'^\' or \'~\' for minimum matches. Each part of the version should be separated by a dot \'.\'.","type":"string"}]},"shareKey":{"description":"Module is looked up under this key from the share scope.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"singleton":{"description":"Allow only a single version of the shared module in share scope (disabled by default).","type":"boolean"},"strictVersion":{"description":"Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).","type":"boolean"},"version":{"description":"Version of the provided module. Will replace lower matching versions, but not higher.","anyOf":[{"description":"Don\'t provide a version.","enum":[false]},{"description":"Version as string. Each part of the version should be separated by a dot \'.\'.","type":"string"}]}}},"SharedItem":{"description":"A module that should be shared in the share scope.","type":"string","minLength":1},"SharedObject":{"description":"Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.","type":"object","additionalProperties":{"description":"Modules that should be shared in the share scope.","anyOf":[{"$ref":"#/definitions/SharedConfig"},{"$ref":"#/definitions/SharedItem"}]}},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"}},"title":"ModuleFederationPluginOptions","type":"object","additionalProperties":false,"properties":{"exposes":{"$ref":"#/definitions/Exposes"},"filename":{"description":"The filename of the container as relative path inside the `output.path` directory.","type":"string","absolutePath":false},"library":{"$ref":"#/definitions/LibraryOptions"},"name":{"description":"The name of the container.","type":"string"},"remoteType":{"description":"The external type of the remote containers.","oneOf":[{"$ref":"#/definitions/ExternalsType"}]},"remotes":{"$ref":"#/definitions/Remotes"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"shareScope":{"description":"Share scope name used for all shared modules (defaults to \'default\').","type":"string","minLength":1},"shared":{"$ref":"#/definitions/Shared"}}}'); - -/***/ }), - -/***/ 95725: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"ProfilingPluginOptions","type":"object","additionalProperties":false,"properties":{"outputPath":{"description":"Path to the output file e.g. `path.resolve(__dirname, \'profiling/events.json\')`. Defaults to `events.json`.","type":"string","absolutePath":true}}}'); - -/***/ }), - -/***/ 92738: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"OccurrenceChunkIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"prioritiseInitial":{"description":"Prioritise initial size over total size.","type":"boolean"}}}'); - -/***/ }), - -/***/ 2710: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"OccurrenceModuleIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"prioritiseInitial":{"description":"Prioritise initial size over total size.","type":"boolean"}}}'); - -/***/ }), - -/***/ 71013: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"AggressiveSplittingPluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Extra cost for each chunk (Default: 9.8kiB).","type":"number"},"entryChunkMultiplicator":{"description":"Extra cost multiplicator for entry chunks (Default: 10).","type":"number"},"maxSize":{"description":"Byte, max size of per file (Default: 50kiB).","type":"number"},"minSize":{"description":"Byte, split point. (Default: 30kiB).","type":"number"}}}'); - -/***/ }), - -/***/ 35041: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"LimitChunkCountPluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Constant overhead for a chunk.","type":"number"},"entryChunkMultiplicator":{"description":"Multiplicator for initial chunks.","type":"number"},"maxChunks":{"description":"Limit the maximum number of chunks using a value greater greater than or equal to 1.","type":"number","minimum":1}},"required":["maxChunks"]}'); - -/***/ }), - -/***/ 72649: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"title":"MinChunkSizePluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Constant overhead for a chunk.","type":"number"},"entryChunkMultiplicator":{"description":"Multiplicator for initial chunks.","type":"number"},"minChunkSize":{"description":"Minimum number of characters.","type":"number"}},"required":["minChunkSize"]}'); - -/***/ }), - -/***/ 92693: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"HttpUriOptions":{"description":"Options for building http resources.","type":"object","additionalProperties":false,"properties":{"allowedUris":{"$ref":"#/definitions/HttpUriOptionsAllowedUris"},"cacheLocation":{"description":"Location where resource content is stored for lockfile entries. It\'s also possible to disable storing by passing false.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"frozen":{"description":"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.","type":"boolean"},"lockfileLocation":{"description":"Location of the lockfile.","type":"string","absolutePath":true},"proxy":{"description":"Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.","type":"string"},"upgrade":{"description":"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.","type":"boolean"}},"required":["allowedUris"]},"HttpUriOptionsAllowedUris":{"description":"List of allowed URIs (resp. the beginning of them).","type":"array","items":{"description":"List of allowed URIs (resp. the beginning of them).","anyOf":[{"description":"Allowed URI pattern.","instanceof":"RegExp","tsType":"RegExp"},{"description":"Allowed URI (resp. the beginning of it).","type":"string","pattern":"^https?://"},{"description":"Allowed URI filter function.","instanceof":"Function","tsType":"((uri: string) => boolean)"}]}}},"title":"HttpUriPluginOptions","oneOf":[{"$ref":"#/definitions/HttpUriOptions"}]}'); - -/***/ }), - -/***/ 33231: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"Consumes":{"description":"Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.","anyOf":[{"type":"array","items":{"description":"Modules that should be consumed from share scope.","anyOf":[{"$ref":"#/definitions/ConsumesItem"},{"$ref":"#/definitions/ConsumesObject"}]}},{"$ref":"#/definitions/ConsumesObject"}]},"ConsumesConfig":{"description":"Advanced configuration for modules that should be consumed from share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"import":{"description":"Fallback module if no shared module is found in share scope. Defaults to the property name.","anyOf":[{"description":"No fallback module.","enum":[false]},{"$ref":"#/definitions/ConsumesItem"}]},"packageName":{"description":"Package name to determine required version from description file. This is only needed when package name can\'t be automatically determined from request.","type":"string","minLength":1},"requiredVersion":{"description":"Version requirement from module in share scope.","anyOf":[{"description":"No version requirement check.","enum":[false]},{"description":"Version as string. Can be prefixed with \'^\' or \'~\' for minimum matches. Each part of the version should be separated by a dot \'.\'.","type":"string"}]},"shareKey":{"description":"Module is looked up under this key from the share scope.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"singleton":{"description":"Allow only a single version of the shared module in share scope (disabled by default).","type":"boolean"},"strictVersion":{"description":"Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).","type":"boolean"}}},"ConsumesItem":{"description":"A module that should be consumed from share scope.","type":"string","minLength":1},"ConsumesObject":{"description":"Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.","type":"object","additionalProperties":{"description":"Modules that should be consumed from share scope.","anyOf":[{"$ref":"#/definitions/ConsumesConfig"},{"$ref":"#/definitions/ConsumesItem"}]}}},"title":"ConsumeSharedPluginOptions","description":"Options for consuming shared modules.","type":"object","additionalProperties":false,"properties":{"consumes":{"$ref":"#/definitions/Consumes"},"shareScope":{"description":"Share scope name used for all consumed modules (defaults to \'default\').","type":"string","minLength":1}},"required":["consumes"]}'); - -/***/ }), - -/***/ 11720: -/***/ (function(module) { - -"use strict"; -module.exports = JSON.parse('{"definitions":{"Provides":{"description":"Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.","anyOf":[{"type":"array","items":{"description":"Modules that should be provided as shared modules to the share scope.","anyOf":[{"$ref":"#/definitions/ProvidesItem"},{"$ref":"#/definitions/ProvidesObject"}]}},{"$ref":"#/definitions/ProvidesObject"}]},"ProvidesConfig":{"description":"Advanced configuration for modules that should be provided as shared modules to the share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"shareKey":{"description":"Key in the share scope under which the shared modules should be stored.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"version":{"description":"Version of the provided module. Will replace lower matching versions, but not higher.","anyOf":[{"description":"Don\'t provide a version.","enum":[false]},{"description":"Version as string. Each part of the version should be separated by a dot \'.\'.","type":"string"}]}}},"ProvidesItem":{"description":"Request to a module that should be provided as shared module to the share scope (will be resolved when relative).","type":"string","minLength":1},"ProvidesObject":{"description":"Modules that should be provided as shared modules to the share scope. Property names are used as share keys.","type":"object","additionalProperties":{"description":"Modules that should be provided as shared modules to the share scope.","anyOf":[{"$ref":"#/definitions/ProvidesConfig"},{"$ref":"#/definitions/ProvidesItem"}]}}},"title":"ProvideSharedPluginOptions","type":"object","additionalProperties":false,"properties":{"provides":{"$ref":"#/definitions/Provides"},"shareScope":{"description":"Share scope name used for all provided modules (defaults to \'default\').","type":"string","minLength":1}},"required":["provides"]}'); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + "/"; -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __webpack_require__(40721); -/******/ module.exports = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file +v.exports=R(66282)},92414:function(v,E,R){"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */var $=R(58469);var j=R(71017).extname;var N=/^\s*([^;\s]*)(?:;|\s|$)/;var q=/^text\//i;E.charset=charset;E.charsets={lookup:charset};E.contentType=contentType;E.extension=extension;E.extensions=Object.create(null);E.lookup=lookup;E.types=Object.create(null);populateMaps(E.extensions,E.types);function charset(v){if(!v||typeof v!=="string"){return false}var E=N.exec(v);var R=E&&$[E[1].toLowerCase()];if(R&&R.charset){return R.charset}if(E&&q.test(E[1])){return"UTF-8"}return false}function contentType(v){if(!v||typeof v!=="string"){return false}var R=v.indexOf("/")===-1?E.lookup(v):v;if(!R){return false}if(R.indexOf("charset")===-1){var $=E.charset(R);if($)R+="; charset="+$.toLowerCase()}return R}function extension(v){if(!v||typeof v!=="string"){return false}var R=N.exec(v);var $=R&&E.extensions[R[1].toLowerCase()];if(!$||!$.length){return false}return $[0]}function lookup(v){if(!v||typeof v!=="string"){return false}var R=j("x."+v).toLowerCase().substr(1);if(!R){return false}return E.types[R]||false}function populateMaps(v,E){var R=["nginx","apache",undefined,"iana"];Object.keys($).forEach((function forEachMimeType(j){var N=$[j];var q=N.extensions;if(!q||!q.length){return}v[j]=q;for(var G=0;Gce||ae===ce&&E[ie].substr(0,12)==="application/")){continue}}E[ie]=j}}))}},62825:function(v,E,R){"use strict";var $;$={value:true};E.Z=void 0;const{stringHints:j,numberHints:N}=R(86601);const q={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function filterMax(v,E){const R=v.reduce(((v,R)=>Math.max(v,E(R))),0);return v.filter((v=>E(v)===R))}function filterChildren(v){let E=v;E=filterMax(E,(v=>v.dataPath?v.dataPath.length:0));E=filterMax(E,(v=>q[v.keyword]||2));return E}function findAllChildren(v,E){let R=v.length-1;const predicate=E=>v[R].schemaPath.indexOf(E)!==0;while(R>-1&&!E.every(predicate)){if(v[R].keyword==="anyOf"||v[R].keyword==="oneOf"){const E=extractRefs(v[R]);const $=findAllChildren(v.slice(0,R),E.concat(v[R].schemaPath));R=$-1}else{R-=1}}return R+1}function extractRefs(v){const{schema:E}=v;if(!Array.isArray(E)){return[]}return E.map((({$ref:v})=>v)).filter((v=>v))}function groupChildrenByFirstChild(v){const E=[];let R=v.length-1;while(R>0){const $=v[R];if($.keyword==="anyOf"||$.keyword==="oneOf"){const j=extractRefs($);const N=findAllChildren(v.slice(0,R),j.concat($.schemaPath));if(N!==R){E.push(Object.assign({},$,{children:v.slice(N,R)}));R=N}else{E.push($)}}else{E.push($)}R-=1}if(R===0){E.push(v[R])}return E.reverse()}function indent(v,E){return v.replace(/\n(?!$)/g,`\n${E}`)}function hasNotInSchema(v){return!!v.not}function findFirstTypedSchema(v){if(hasNotInSchema(v)){return findFirstTypedSchema(v.not)}return v}function canApplyNot(v){const E=findFirstTypedSchema(v);return likeNumber(E)||likeInteger(E)||likeString(E)||likeNull(E)||likeBoolean(E)}function isObject(v){return typeof v==="object"&&v!==null}function likeNumber(v){return v.type==="number"||typeof v.minimum!=="undefined"||typeof v.exclusiveMinimum!=="undefined"||typeof v.maximum!=="undefined"||typeof v.exclusiveMaximum!=="undefined"||typeof v.multipleOf!=="undefined"}function likeInteger(v){return v.type==="integer"||typeof v.minimum!=="undefined"||typeof v.exclusiveMinimum!=="undefined"||typeof v.maximum!=="undefined"||typeof v.exclusiveMaximum!=="undefined"||typeof v.multipleOf!=="undefined"}function likeString(v){return v.type==="string"||typeof v.minLength!=="undefined"||typeof v.maxLength!=="undefined"||typeof v.pattern!=="undefined"||typeof v.format!=="undefined"||typeof v.formatMinimum!=="undefined"||typeof v.formatMaximum!=="undefined"}function likeBoolean(v){return v.type==="boolean"}function likeArray(v){return v.type==="array"||typeof v.minItems==="number"||typeof v.maxItems==="number"||typeof v.uniqueItems!=="undefined"||typeof v.items!=="undefined"||typeof v.additionalItems!=="undefined"||typeof v.contains!=="undefined"}function likeObject(v){return v.type==="object"||typeof v.minProperties!=="undefined"||typeof v.maxProperties!=="undefined"||typeof v.required!=="undefined"||typeof v.properties!=="undefined"||typeof v.patternProperties!=="undefined"||typeof v.additionalProperties!=="undefined"||typeof v.dependencies!=="undefined"||typeof v.propertyNames!=="undefined"||typeof v.patternRequired!=="undefined"}function likeNull(v){return v.type==="null"}function getArticle(v){if(/^[aeiou]/i.test(v)){return"an"}return"a"}function getSchemaNonTypes(v){if(!v){return""}if(!v.type){if(likeNumber(v)||likeInteger(v)){return" | should be any non-number"}if(likeString(v)){return" | should be any non-string"}if(likeArray(v)){return" | should be any non-array"}if(likeObject(v)){return" | should be any non-object"}}return""}function formatHints(v){return v.length>0?`(${v.join(", ")})`:""}function getHints(v,E){if(likeNumber(v)||likeInteger(v)){return N(v,E)}else if(likeString(v)){return j(v,E)}return[]}class ValidationError extends Error{constructor(v,E,R={}){super();this.name="ValidationError";this.errors=v;this.schema=E;let $;let j;if(E.title&&(!R.name||!R.baseDataPath)){const v=E.title.match(/^(.+) (.+)$/);if(v){if(!R.name){[,$]=v}if(!R.baseDataPath){[,,j]=v}}}this.headerName=R.name||$||"Object";this.baseDataPath=R.baseDataPath||j||"configuration";this.postFormatter=R.postFormatter||null;const N=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${N}${this.formatValidationErrors(v)}`;Error.captureStackTrace(this,this.constructor)}getSchemaPart(v){const E=v.split("/");let R=this.schema;for(let v=1;v{if(!j){return this.formatSchema(E,$,R)}if(R.includes(E)){return"(recursive)"}return this.formatSchema(E,$,R.concat(v))};if(hasNotInSchema(v)&&!likeObject(v)){if(canApplyNot(v.not)){$=!E;return formatInnerSchema(v.not)}const R=!v.not.not;const j=E?"":"non ";$=!E;return R?j+formatInnerSchema(v.not):formatInnerSchema(v.not)}if(v.instanceof){const{instanceof:E}=v;const R=!Array.isArray(E)?[E]:E;return R.map((v=>v==="Function"?"function":v)).join(" | ")}if(v.enum){return v.enum.map((v=>JSON.stringify(v))).join(" | ")}if(typeof v.const!=="undefined"){return JSON.stringify(v.const)}if(v.oneOf){return v.oneOf.map((v=>formatInnerSchema(v,true))).join(" | ")}if(v.anyOf){return v.anyOf.map((v=>formatInnerSchema(v,true))).join(" | ")}if(v.allOf){return v.allOf.map((v=>formatInnerSchema(v,true))).join(" & ")}if(v.if){const{if:E,then:R,else:$}=v;return`${E?`if ${formatInnerSchema(E)}`:""}${R?` then ${formatInnerSchema(R)}`:""}${$?` else ${formatInnerSchema($)}`:""}`}if(v.$ref){return formatInnerSchema(this.getSchemaPart(v.$ref),true)}if(likeNumber(v)||likeInteger(v)){const[R,...$]=getHints(v,E);const j=`${R}${$.length>0?` ${formatHints($)}`:""}`;return E?j:$.length>0?`non-${R} | ${j}`:`non-${R}`}if(likeString(v)){const[R,...$]=getHints(v,E);const j=`${R}${$.length>0?` ${formatHints($)}`:""}`;return E?j:j==="string"?"non-string":`non-string | ${j}`}if(likeBoolean(v)){return`${E?"":"non-"}boolean`}if(likeArray(v)){$=true;const E=[];if(typeof v.minItems==="number"){E.push(`should not have fewer than ${v.minItems} item${v.minItems>1?"s":""}`)}if(typeof v.maxItems==="number"){E.push(`should not have more than ${v.maxItems} item${v.maxItems>1?"s":""}`)}if(v.uniqueItems){E.push("should not have duplicate items")}const R=typeof v.additionalItems==="undefined"||Boolean(v.additionalItems);let j="";if(v.items){if(Array.isArray(v.items)&&v.items.length>0){j=`${v.items.map((v=>formatInnerSchema(v))).join(", ")}`;if(R){if(v.additionalItems&&isObject(v.additionalItems)&&Object.keys(v.additionalItems).length>0){E.push(`additional items should be ${formatInnerSchema(v.additionalItems)}`)}}}else if(v.items&&Object.keys(v.items).length>0){j=`${formatInnerSchema(v.items)}`}else{j="any"}}else{j="any"}if(v.contains&&Object.keys(v.contains).length>0){E.push(`should contains at least one ${this.formatSchema(v.contains)} item`)}return`[${j}${R?", ...":""}]${E.length>0?` (${E.join(", ")})`:""}`}if(likeObject(v)){$=true;const E=[];if(typeof v.minProperties==="number"){E.push(`should not have fewer than ${v.minProperties} ${v.minProperties>1?"properties":"property"}`)}if(typeof v.maxProperties==="number"){E.push(`should not have more than ${v.maxProperties} ${v.minProperties&&v.minProperties>1?"properties":"property"}`)}if(v.patternProperties&&Object.keys(v.patternProperties).length>0){const R=Object.keys(v.patternProperties);E.push(`additional property names should match pattern${R.length>1?"s":""} ${R.map((v=>JSON.stringify(v))).join(" | ")}`)}const R=v.properties?Object.keys(v.properties):[];const j=v.required?v.required:[];const N=[...new Set([].concat(j).concat(R))];const q=N.map((v=>{const E=j.includes(v);return`${v}${E?"":"?"}`})).concat(typeof v.additionalProperties==="undefined"||Boolean(v.additionalProperties)?v.additionalProperties&&isObject(v.additionalProperties)?[`: ${formatInnerSchema(v.additionalProperties)}`]:["…"]:[]).join(", ");const{dependencies:G,propertyNames:ie,patternRequired:ae}=v;if(G){Object.keys(G).forEach((v=>{const R=G[v];if(Array.isArray(R)){E.push(`should have ${R.length>1?"properties":"property"} ${R.map((v=>`'${v}'`)).join(", ")} when property '${v}' is present`)}else{E.push(`should be valid according to the schema ${formatInnerSchema(R)} when property '${v}' is present`)}}))}if(ie&&Object.keys(ie).length>0){E.push(`each property name should match format ${JSON.stringify(v.propertyNames.format)}`)}if(ae&&ae.length>0){E.push(`should have property matching pattern ${ae.map((v=>JSON.stringify(v)))}`)}return`object {${q?` ${q} `:""}}${E.length>0?` (${E.join(", ")})`:""}`}if(likeNull(v)){return`${E?"":"non-"}null`}if(Array.isArray(v.type)){return`${v.type.join(" | ")}`}return JSON.stringify(v,null,2)}getSchemaPartText(v,E,R=false,$=true){if(!v){return""}if(Array.isArray(E)){for(let R=0;R ${v.description}`}if(v.link){j+=`\n-> Read more at ${v.link}`}return j}getSchemaPartDescription(v){if(!v){return""}while(v.$ref){v=this.getSchemaPart(v.$ref)}let E="";if(v.description){E+=`\n-> ${v.description}`}if(v.link){E+=`\n-> Read more at ${v.link}`}return E}formatValidationError(v){const{keyword:E,dataPath:R}=v;const $=`${this.baseDataPath}${R}`;switch(E){case"type":{const{parentSchema:E,params:R}=v;switch(R.type){case"number":return`${$} should be a ${this.getSchemaPartText(E,false,true)}`;case"integer":return`${$} should be an ${this.getSchemaPartText(E,false,true)}`;case"string":return`${$} should be a ${this.getSchemaPartText(E,false,true)}`;case"boolean":return`${$} should be a ${this.getSchemaPartText(E,false,true)}`;case"array":return`${$} should be an array:\n${this.getSchemaPartText(E)}`;case"object":return`${$} should be an object:\n${this.getSchemaPartText(E)}`;case"null":return`${$} should be a ${this.getSchemaPartText(E,false,true)}`;default:return`${$} should be:\n${this.getSchemaPartText(E)}`}}case"instanceof":{const{parentSchema:E}=v;return`${$} should be an instance of ${this.getSchemaPartText(E,false,true)}`}case"pattern":{const{params:E,parentSchema:R}=v;const{pattern:j}=E;return`${$} should match pattern ${JSON.stringify(j)}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"format":{const{params:E,parentSchema:R}=v;const{format:j}=E;return`${$} should match format ${JSON.stringify(j)}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"formatMinimum":case"formatMaximum":{const{params:E,parentSchema:R}=v;const{comparison:j,limit:N}=E;return`${$} should be ${j} ${JSON.stringify(N)}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:E,params:R}=v;const{comparison:j,limit:N}=R;const[,...q]=getHints(E,true);if(q.length===0){q.push(`should be ${j} ${N}`)}return`${$} ${q.join(" ")}${getSchemaNonTypes(E)}.${this.getSchemaPartDescription(E)}`}case"multipleOf":{const{params:E,parentSchema:R}=v;const{multipleOf:j}=E;return`${$} should be multiple of ${j}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"patternRequired":{const{params:E,parentSchema:R}=v;const{missingPattern:j}=E;return`${$} should have property matching pattern ${JSON.stringify(j)}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"minLength":{const{params:E,parentSchema:R}=v;const{limit:j}=E;if(j===1){return`${$} should be a non-empty string${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}const N=j-1;return`${$} should be longer than ${N} character${N>1?"s":""}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"minItems":{const{params:E,parentSchema:R}=v;const{limit:j}=E;if(j===1){return`${$} should be a non-empty array${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}return`${$} should not have fewer than ${j} items${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"minProperties":{const{params:E,parentSchema:R}=v;const{limit:j}=E;if(j===1){return`${$} should be a non-empty object${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}return`${$} should not have fewer than ${j} properties${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"maxLength":{const{params:E,parentSchema:R}=v;const{limit:j}=E;const N=j+1;return`${$} should be shorter than ${N} character${N>1?"s":""}${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"maxItems":{const{params:E,parentSchema:R}=v;const{limit:j}=E;return`${$} should not have more than ${j} items${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"maxProperties":{const{params:E,parentSchema:R}=v;const{limit:j}=E;return`${$} should not have more than ${j} properties${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"uniqueItems":{const{params:E,parentSchema:R}=v;const{i:j}=E;return`${$} should not contain the item '${v.data[j]}' twice${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"additionalItems":{const{params:E,parentSchema:R}=v;const{limit:j}=E;return`${$} should not have more than ${j} items${getSchemaNonTypes(R)}. These items are valid:\n${this.getSchemaPartText(R)}`}case"contains":{const{parentSchema:E}=v;return`${$} should contains at least one ${this.getSchemaPartText(E,["contains"])} item${getSchemaNonTypes(E)}.`}case"required":{const{parentSchema:E,params:R}=v;const j=R.missingProperty.replace(/^\./,"");const N=E&&Boolean(E.properties&&E.properties[j]);return`${$} misses the property '${j}'${getSchemaNonTypes(E)}.${N?` Should be:\n${this.getSchemaPartText(E,["properties",j])}`:this.getSchemaPartDescription(E)}`}case"additionalProperties":{const{params:E,parentSchema:R}=v;const{additionalProperty:j}=E;return`${$} has an unknown property '${j}'${getSchemaNonTypes(R)}. These properties are valid:\n${this.getSchemaPartText(R)}`}case"dependencies":{const{params:E,parentSchema:R}=v;const{property:j,deps:N}=E;const q=N.split(",").map((v=>`'${v.trim()}'`)).join(", ");return`${$} should have properties ${q} when property '${j}' is present${getSchemaNonTypes(R)}.${this.getSchemaPartDescription(R)}`}case"propertyNames":{const{params:E,parentSchema:R,schema:j}=v;const{propertyName:N}=E;return`${$} property name '${N}' is invalid${getSchemaNonTypes(R)}. Property names should be match format ${JSON.stringify(j.format)}.${this.getSchemaPartDescription(R)}`}case"enum":{const{parentSchema:E}=v;if(E&&E.enum&&E.enum.length===1){return`${$} should be ${this.getSchemaPartText(E,false,true)}`}return`${$} should be one of these:\n${this.getSchemaPartText(E)}`}case"const":{const{parentSchema:E}=v;return`${$} should be equal to constant ${this.getSchemaPartText(E,false,true)}`}case"not":{const E=likeObject(v.parentSchema)?`\n${this.getSchemaPartText(v.parentSchema)}`:"";const R=this.getSchemaPartText(v.schema,false,false,false);if(canApplyNot(v.schema)){return`${$} should be any ${R}${E}.`}const{schema:j,parentSchema:N}=v;return`${$} should not be ${this.getSchemaPartText(j,false,true)}${N&&likeObject(N)?`\n${this.getSchemaPartText(N)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:E,children:R}=v;if(R&&R.length>0){if(v.schema.length===1){const v=R[R.length-1];const $=R.slice(0,R.length-1);return this.formatValidationError(Object.assign({},v,{children:$,parentSchema:Object.assign({},E,v.parentSchema)}))}let j=filterChildren(R);if(j.length===1){return this.formatValidationError(j[0])}j=groupChildrenByFirstChild(j);return`${$} should be one of these:\n${this.getSchemaPartText(E)}\nDetails:\n${j.map((v=>` * ${indent(this.formatValidationError(v)," ")}`)).join("\n")}`}return`${$} should be one of these:\n${this.getSchemaPartText(E)}`}case"if":{const{params:E,parentSchema:R}=v;const{failingKeyword:j}=E;return`${$} should match "${j}" schema:\n${this.getSchemaPartText(R,[j])}`}case"absolutePath":{const{message:E,parentSchema:R}=v;return`${$}: ${E}${this.getSchemaPartDescription(R)}`}default:{const{message:E,parentSchema:R}=v;const j=JSON.stringify(v,null,2);return`${$} ${E} (${j}).\n${this.getSchemaPartText(R,false)}`}}}formatValidationErrors(v){return v.map((v=>{let E=this.formatValidationError(v);if(this.postFormatter){E=this.postFormatter(E,v)}return` - ${indent(E," ")}`})).join("\n")}}var G=ValidationError;E.Z=G},82480:function(v){"use strict";class Range{static getOperator(v,E){if(v==="left"){return E?">":">="}return E?"<":"<="}static formatRight(v,E,R){if(E===false){return Range.formatLeft(v,!E,!R)}return`should be ${Range.getOperator("right",R)} ${v}`}static formatLeft(v,E,R){if(E===false){return Range.formatRight(v,!E,!R)}return`should be ${Range.getOperator("left",R)} ${v}`}static formatRange(v,E,R,$,j){let N="should be";N+=` ${Range.getOperator(j?"left":"right",j?R:!R)} ${v} `;N+=j?"and":"or";N+=` ${Range.getOperator(j?"right":"left",j?$:!$)} ${E}`;return N}static getRangeValue(v,E){let R=E?Infinity:-Infinity;let $=-1;const j=E?([v])=>v<=R:([v])=>v>=R;for(let E=0;E-1){return v[$]}return[Infinity,true]}constructor(){this._left=[];this._right=[]}left(v,E=false){this._left.push([v,E])}right(v,E=false){this._right.push([v,E])}format(v=true){const[E,R]=Range.getRangeValue(this._left,v);const[$,j]=Range.getRangeValue(this._right,!v);if(!Number.isFinite(E)&&!Number.isFinite($)){return""}const N=R?E+1:E;const q=j?$-1:$;if(N===q){return`should be ${v?"":"!"}= ${N}`}if(Number.isFinite(E)&&!Number.isFinite($)){return Range.formatLeft(E,v,R)}if(!Number.isFinite(E)&&Number.isFinite($)){return Range.formatRight($,v,j)}return Range.formatRange(E,$,R,j,v)}}v.exports=Range},86601:function(v,E,R){"use strict";const $=R(82480);v.exports.stringHints=function stringHints(v,E){const R=[];let $="string";const j={...v};if(!E){const v=j.minLength;const E=j.formatMinimum;const R=j.formatExclusiveMaximum;j.minLength=j.maxLength;j.maxLength=v;j.formatMinimum=j.formatMaximum;j.formatMaximum=E;j.formatExclusiveMaximum=!j.formatExclusiveMinimum;j.formatExclusiveMinimum=!R}if(typeof j.minLength==="number"){if(j.minLength===1){$="non-empty string"}else{const v=Math.max(j.minLength-1,0);R.push(`should be longer than ${v} character${v>1?"s":""}`)}}if(typeof j.maxLength==="number"){if(j.maxLength===0){$="empty string"}else{const v=j.maxLength+1;R.push(`should be shorter than ${v} character${v>1?"s":""}`)}}if(j.pattern){R.push(`should${E?"":" not"} match pattern ${JSON.stringify(j.pattern)}`)}if(j.format){R.push(`should${E?"":" not"} match format ${JSON.stringify(j.format)}`)}if(j.formatMinimum){R.push(`should be ${j.formatExclusiveMinimum?">":">="} ${JSON.stringify(j.formatMinimum)}`)}if(j.formatMaximum){R.push(`should be ${j.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(j.formatMaximum)}`)}return[$].concat(R)};v.exports.numberHints=function numberHints(v,E){const R=[v.type==="integer"?"integer":"number"];const j=new $;if(typeof v.minimum==="number"){j.left(v.minimum)}if(typeof v.exclusiveMinimum==="number"){j.left(v.exclusiveMinimum,true)}if(typeof v.maximum==="number"){j.right(v.maximum)}if(typeof v.exclusiveMaximum==="number"){j.right(v.exclusiveMaximum,true)}const N=j.format(E);if(N){R.push(N)}if(typeof v.multipleOf==="number"){R.push(`should${E?"":" not"} be multiple of ${v.multipleOf}`)}return R}},78718:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncParallelBailHookCodeFactory extends j{content({onError:v,onResult:E,onDone:R}){let $="";$+=`var _results = new Array(${this.options.taps.length});\n`;$+="var _checkDone = function() {\n";$+="for(var i = 0; i < _results.length; i++) {\n";$+="var item = _results[i];\n";$+="if(item === undefined) return false;\n";$+="if(item.result !== undefined) {\n";$+=E("item.result");$+="return true;\n";$+="}\n";$+="if(item.error) {\n";$+=v("item.error");$+="return true;\n";$+="}\n";$+="}\n";$+="return false;\n";$+="}\n";$+=this.callTapsParallel({onError:(v,E,R,$)=>{let j="";j+=`if(${v} < _results.length && ((_results.length = ${v+1}), (_results[${v}] = { error: ${E} }), _checkDone())) {\n`;j+=$(true);j+="} else {\n";j+=R();j+="}\n";return j},onResult:(v,E,R,$)=>{let j="";j+=`if(${v} < _results.length && (${E} !== undefined && (_results.length = ${v+1}), (_results[${v}] = { result: ${E} }), _checkDone())) {\n`;j+=$(true);j+="} else {\n";j+=R();j+="}\n";return j},onTap:(v,E,R,$)=>{let j="";if(v>0){j+=`if(${v} >= _results.length) {\n`;j+=R();j+="} else {\n"}j+=E();if(v>0)j+="}\n";return j},onDone:R});return $}}const N=new AsyncParallelBailHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncParallelBailHook(v=[],E=undefined){const R=new $(v,E);R.constructor=AsyncParallelBailHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncParallelBailHook.prototype=null;v.exports=AsyncParallelBailHook},13854:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncParallelHookCodeFactory extends j{content({onError:v,onDone:E}){return this.callTapsParallel({onError:(E,R,$,j)=>v(R)+j(true),onDone:E})}}const N=new AsyncParallelHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncParallelHook(v=[],E=undefined){const R=new $(v,E);R.constructor=AsyncParallelHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncParallelHook.prototype=null;v.exports=AsyncParallelHook},50936:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncSeriesBailHookCodeFactory extends j{content({onError:v,onResult:E,resultReturns:R,onDone:$}){return this.callTapsSeries({onError:(E,R,$,j)=>v(R)+j(true),onResult:(v,R,$)=>`if(${R} !== undefined) {\n${E(R)}\n} else {\n${$()}}\n`,resultReturns:R,onDone:$})}}const N=new AsyncSeriesBailHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncSeriesBailHook(v=[],E=undefined){const R=new $(v,E);R.constructor=AsyncSeriesBailHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncSeriesBailHook.prototype=null;v.exports=AsyncSeriesBailHook},99580:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncSeriesHookCodeFactory extends j{content({onError:v,onDone:E}){return this.callTapsSeries({onError:(E,R,$,j)=>v(R)+j(true),onDone:E})}}const N=new AsyncSeriesHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncSeriesHook(v=[],E=undefined){const R=new $(v,E);R.constructor=AsyncSeriesHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncSeriesHook.prototype=null;v.exports=AsyncSeriesHook},36813:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncSeriesLoopHookCodeFactory extends j{content({onError:v,onDone:E}){return this.callTapsLooping({onError:(E,R,$,j)=>v(R)+j(true),onDone:E})}}const N=new AsyncSeriesLoopHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncSeriesLoopHook(v=[],E=undefined){const R=new $(v,E);R.constructor=AsyncSeriesLoopHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncSeriesLoopHook.prototype=null;v.exports=AsyncSeriesLoopHook},51931:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class AsyncSeriesWaterfallHookCodeFactory extends j{content({onError:v,onResult:E,onDone:R}){return this.callTapsSeries({onError:(E,R,$,j)=>v(R)+j(true),onResult:(v,E,R)=>{let $="";$+=`if(${E} !== undefined) {\n`;$+=`${this._args[0]} = ${E};\n`;$+=`}\n`;$+=R();return $},onDone:()=>E(this._args[0])})}}const N=new AsyncSeriesWaterfallHookCodeFactory;const COMPILE=function(v){N.setup(this,v);return N.create(v)};function AsyncSeriesWaterfallHook(v=[],E=undefined){if(v.length<1)throw new Error("Waterfall hooks must have at least one argument");const R=new $(v,E);R.constructor=AsyncSeriesWaterfallHook;R.compile=COMPILE;R._call=undefined;R.call=undefined;return R}AsyncSeriesWaterfallHook.prototype=null;v.exports=AsyncSeriesWaterfallHook},4214:function(v,E,R){"use strict";const $=R(73837);const j=$.deprecate((()=>{}),"Hook.context is deprecated and will be removed");const CALL_DELEGATE=function(...v){this.call=this._createCall("sync");return this.call(...v)};const CALL_ASYNC_DELEGATE=function(...v){this.callAsync=this._createCall("async");return this.callAsync(...v)};const PROMISE_DELEGATE=function(...v){this.promise=this._createCall("promise");return this.promise(...v)};class Hook{constructor(v=[],E=undefined){this._args=v;this.name=E;this.taps=[];this.interceptors=[];this._call=CALL_DELEGATE;this.call=CALL_DELEGATE;this._callAsync=CALL_ASYNC_DELEGATE;this.callAsync=CALL_ASYNC_DELEGATE;this._promise=PROMISE_DELEGATE;this.promise=PROMISE_DELEGATE;this._x=undefined;this.compile=this.compile;this.tap=this.tap;this.tapAsync=this.tapAsync;this.tapPromise=this.tapPromise}compile(v){throw new Error("Abstract: should be overridden")}_createCall(v){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:v})}_tap(v,E,R){if(typeof E==="string"){E={name:E.trim()}}else if(typeof E!=="object"||E===null){throw new Error("Invalid tap options")}if(typeof E.name!=="string"||E.name===""){throw new Error("Missing name for tap")}if(typeof E.context!=="undefined"){j()}E=Object.assign({type:v,fn:R},E);E=this._runRegisterInterceptors(E);this._insert(E)}tap(v,E){this._tap("sync",v,E)}tapAsync(v,E){this._tap("async",v,E)}tapPromise(v,E){this._tap("promise",v,E)}_runRegisterInterceptors(v){for(const E of this.interceptors){if(E.register){const R=E.register(v);if(R!==undefined){v=R}}}return v}withOptions(v){const mergeOptions=E=>Object.assign({},v,typeof E==="string"?{name:E}:E);return{name:this.name,tap:(v,E)=>this.tap(mergeOptions(v),E),tapAsync:(v,E)=>this.tapAsync(mergeOptions(v),E),tapPromise:(v,E)=>this.tapPromise(mergeOptions(v),E),intercept:v=>this.intercept(v),isUsed:()=>this.isUsed(),withOptions:v=>this.withOptions(mergeOptions(v))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(v){this._resetCompilation();this.interceptors.push(Object.assign({},v));if(v.register){for(let E=0;E0){$--;const v=this.taps[$];this.taps[$+1]=v;const j=v.stage||0;if(E){if(E.has(v.name)){E.delete(v.name);continue}if(E.size>0){continue}}if(j>R){continue}$++;break}this.taps[$]=v}}Object.setPrototypeOf(Hook.prototype,null);v.exports=Hook},67308:function(v){"use strict";class HookCodeFactory{constructor(v){this.config=v;this.options=undefined;this._args=undefined}create(v){this.init(v);let E;switch(this.options.type){case"sync":E=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:v=>`throw ${v};\n`,onResult:v=>`return ${v};\n`,resultReturns:true,onDone:()=>"",rethrowIfPossible:true}));break;case"async":E=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:v=>`_callback(${v});\n`,onResult:v=>`_callback(null, ${v});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let v=false;const R=this.contentWithInterceptors({onError:E=>{v=true;return`_error(${E});\n`},onResult:v=>`_resolve(${v});\n`,onDone:()=>"_resolve();\n"});let $="";$+='"use strict";\n';$+=this.header();$+="return new Promise((function(_resolve, _reject) {\n";if(v){$+="var _sync = true;\n";$+="function _error(_err) {\n";$+="if(_sync)\n";$+="_resolve(Promise.resolve().then((function() { throw _err; })));\n";$+="else\n";$+="_reject(_err);\n";$+="};\n"}$+=R;if(v){$+="_sync = false;\n"}$+="}));\n";E=new Function(this.args(),$);break}this.deinit();return E}setup(v,E){v._x=E.taps.map((v=>v.fn))}init(v){this.options=v;this._args=v.args.slice()}deinit(){this.options=undefined;this._args=undefined}contentWithInterceptors(v){if(this.options.interceptors.length>0){const E=v.onError;const R=v.onResult;const $=v.onDone;let j="";for(let v=0;v{let R="";for(let E=0;E{let E="";for(let R=0;R{let v="";for(let E=0;E0){v+="var _taps = this.taps;\n";v+="var _interceptors = this.interceptors;\n"}return v}needContext(){for(const v of this.options.taps)if(v.context)return true;return false}callTap(v,{onError:E,onResult:R,onDone:$,rethrowIfPossible:j}){let N="";let q=false;for(let E=0;Ev.type!=="sync"));const G=R||j;let ie="";let ae=$;let ce=0;for(let R=this.options.taps.length-1;R>=0;R--){const j=R;const le=ae!==$&&(this.options.taps[j].type!=="sync"||ce++>20);if(le){ce=0;ie+=`function _next${j}() {\n`;ie+=ae();ie+=`}\n`;ae=()=>`${G?"return ":""}_next${j}();\n`}const me=ae;const doneBreak=v=>{if(v)return"";return $()};const _e=this.callTap(j,{onError:E=>v(j,E,me,doneBreak),onResult:E&&(v=>E(j,v,me,doneBreak)),onDone:!E&&me,rethrowIfPossible:N&&(q<0||j_e}ie+=ae();return ie}callTapsLooping({onError:v,onDone:E,rethrowIfPossible:R}){if(this.options.taps.length===0)return E();const $=this.options.taps.every((v=>v.type==="sync"));let j="";if(!$){j+="var _looper = (function() {\n";j+="var _loopAsync = false;\n"}j+="var _loop;\n";j+="do {\n";j+="_loop = false;\n";for(let v=0;v{let N="";N+=`if(${E} !== undefined) {\n`;N+="_loop = true;\n";if(!$)N+="if(_loopAsync) _looper();\n";N+=j(true);N+=`} else {\n`;N+=R();N+=`}\n`;return N},onDone:E&&(()=>{let v="";v+="if(!_loop) {\n";v+=E();v+="}\n";return v}),rethrowIfPossible:R&&$});j+="} while(_loop);\n";if(!$){j+="_loopAsync = true;\n";j+="});\n";j+="_looper();\n"}return j}callTapsParallel({onError:v,onResult:E,onDone:R,rethrowIfPossible:$,onTap:j=((v,E)=>E())}){if(this.options.taps.length<=1){return this.callTapsSeries({onError:v,onResult:E,onDone:R,rethrowIfPossible:$})}let N="";N+="do {\n";N+=`var _counter = ${this.options.taps.length};\n`;if(R){N+="var _done = (function() {\n";N+=R();N+="});\n"}for(let q=0;q{if(R)return"if(--_counter === 0) _done();\n";else return"--_counter;"};const doneBreak=v=>{if(v||!R)return"_counter = 0;\n";else return"_counter = 0;\n_done();\n"};N+="if(_counter <= 0) break;\n";N+=j(q,(()=>this.callTap(q,{onError:E=>{let R="";R+="if(_counter > 0) {\n";R+=v(q,E,done,doneBreak);R+="}\n";return R},onResult:E&&(v=>{let R="";R+="if(_counter > 0) {\n";R+=E(q,v,done,doneBreak);R+="}\n";return R}),onDone:!E&&(()=>done()),rethrowIfPossible:$})),done,doneBreak)}N+="} while(false);\n";return N}args({before:v,after:E}={}){let R=this._args;if(v)R=[v].concat(R);if(E)R=R.concat(E);if(R.length===0){return""}else{return R.join(", ")}}getTapFn(v){return`_x[${v}]`}getTap(v){return`_taps[${v}]`}getInterceptor(v){return`_interceptors[${v}]`}}v.exports=HookCodeFactory},16407:function(v,E,R){"use strict";const $=R(73837);const defaultFactory=(v,E)=>E;class HookMap{constructor(v,E=undefined){this._map=new Map;this.name=E;this._factory=v;this._interceptors=[]}get(v){return this._map.get(v)}for(v){const E=this.get(v);if(E!==undefined){return E}let R=this._factory(v);const $=this._interceptors;for(let E=0;E<$.length;E++){R=$[E].factory(v,R)}this._map.set(v,R);return R}intercept(v){this._interceptors.push(Object.assign({factory:defaultFactory},v))}}HookMap.prototype.tap=$.deprecate((function(v,E,R){return this.for(v).tap(E,R)}),"HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead.");HookMap.prototype.tapAsync=$.deprecate((function(v,E,R){return this.for(v).tapAsync(E,R)}),"HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead.");HookMap.prototype.tapPromise=$.deprecate((function(v,E,R){return this.for(v).tapPromise(E,R)}),"HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead.");v.exports=HookMap},4934:function(v,E,R){"use strict";const $=R(4214);class MultiHook{constructor(v,E=undefined){this.hooks=v;this.name=E}tap(v,E){for(const R of this.hooks){R.tap(v,E)}}tapAsync(v,E){for(const R of this.hooks){R.tapAsync(v,E)}}tapPromise(v,E){for(const R of this.hooks){R.tapPromise(v,E)}}isUsed(){for(const v of this.hooks){if(v.isUsed())return true}return false}intercept(v){for(const E of this.hooks){E.intercept(v)}}withOptions(v){return new MultiHook(this.hooks.map((E=>E.withOptions(v))),this.name)}}v.exports=MultiHook},61826:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class SyncBailHookCodeFactory extends j{content({onError:v,onResult:E,resultReturns:R,onDone:$,rethrowIfPossible:j}){return this.callTapsSeries({onError:(E,R)=>v(R),onResult:(v,R,$)=>`if(${R} !== undefined) {\n${E(R)};\n} else {\n${$()}}\n`,resultReturns:R,onDone:$,rethrowIfPossible:j})}}const N=new SyncBailHookCodeFactory;const TAP_ASYNC=()=>{throw new Error("tapAsync is not supported on a SyncBailHook")};const TAP_PROMISE=()=>{throw new Error("tapPromise is not supported on a SyncBailHook")};const COMPILE=function(v){N.setup(this,v);return N.create(v)};function SyncBailHook(v=[],E=undefined){const R=new $(v,E);R.constructor=SyncBailHook;R.tapAsync=TAP_ASYNC;R.tapPromise=TAP_PROMISE;R.compile=COMPILE;return R}SyncBailHook.prototype=null;v.exports=SyncBailHook},72169:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class SyncHookCodeFactory extends j{content({onError:v,onDone:E,rethrowIfPossible:R}){return this.callTapsSeries({onError:(E,R)=>v(R),onDone:E,rethrowIfPossible:R})}}const N=new SyncHookCodeFactory;const TAP_ASYNC=()=>{throw new Error("tapAsync is not supported on a SyncHook")};const TAP_PROMISE=()=>{throw new Error("tapPromise is not supported on a SyncHook")};const COMPILE=function(v){N.setup(this,v);return N.create(v)};function SyncHook(v=[],E=undefined){const R=new $(v,E);R.constructor=SyncHook;R.tapAsync=TAP_ASYNC;R.tapPromise=TAP_PROMISE;R.compile=COMPILE;return R}SyncHook.prototype=null;v.exports=SyncHook},70818:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class SyncLoopHookCodeFactory extends j{content({onError:v,onDone:E,rethrowIfPossible:R}){return this.callTapsLooping({onError:(E,R)=>v(R),onDone:E,rethrowIfPossible:R})}}const N=new SyncLoopHookCodeFactory;const TAP_ASYNC=()=>{throw new Error("tapAsync is not supported on a SyncLoopHook")};const TAP_PROMISE=()=>{throw new Error("tapPromise is not supported on a SyncLoopHook")};const COMPILE=function(v){N.setup(this,v);return N.create(v)};function SyncLoopHook(v=[],E=undefined){const R=new $(v,E);R.constructor=SyncLoopHook;R.tapAsync=TAP_ASYNC;R.tapPromise=TAP_PROMISE;R.compile=COMPILE;return R}SyncLoopHook.prototype=null;v.exports=SyncLoopHook},73545:function(v,E,R){"use strict";const $=R(4214);const j=R(67308);class SyncWaterfallHookCodeFactory extends j{content({onError:v,onResult:E,resultReturns:R,rethrowIfPossible:$}){return this.callTapsSeries({onError:(E,R)=>v(R),onResult:(v,E,R)=>{let $="";$+=`if(${E} !== undefined) {\n`;$+=`${this._args[0]} = ${E};\n`;$+=`}\n`;$+=R();return $},onDone:()=>E(this._args[0]),doneReturns:R,rethrowIfPossible:$})}}const N=new SyncWaterfallHookCodeFactory;const TAP_ASYNC=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")};const TAP_PROMISE=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")};const COMPILE=function(v){N.setup(this,v);return N.create(v)};function SyncWaterfallHook(v=[],E=undefined){if(v.length<1)throw new Error("Waterfall hooks must have at least one argument");const R=new $(v,E);R.constructor=SyncWaterfallHook;R.tapAsync=TAP_ASYNC;R.tapPromise=TAP_PROMISE;R.compile=COMPILE;return R}SyncWaterfallHook.prototype=null;v.exports=SyncWaterfallHook},44217:function(v,E,R){"use strict";E.__esModule=true;E.SyncHook=R(72169);E.SyncBailHook=R(61826);E.SyncWaterfallHook=R(73545);E.SyncLoopHook=R(70818);E.AsyncParallelHook=R(13854);E.AsyncParallelBailHook=R(78718);E.AsyncSeriesHook=R(99580);E.AsyncSeriesBailHook=R(50936);E.AsyncSeriesLoopHook=R(36813);E.AsyncSeriesWaterfallHook=R(51931);E.HookMap=R(16407);E.MultiHook=R(4934)},27285:function(v){ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +var E;var R;var $;var j;var N;var q;var G;var ie;var ae;var ce;var le;var me;var _e;var Ie;var Me;var Oe;var Te;var Ne;var Be;var Le;var qe;var Ue;(function(E){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],(function(v){E(createExporter(R,createExporter(v)))}))}else if(true&&typeof v.exports==="object"){E(createExporter(R,createExporter(v.exports)))}else{E(createExporter(R))}function createExporter(v,E){if(v!==R){if(typeof Object.create==="function"){Object.defineProperty(v,"__esModule",{value:true})}else{v.__esModule=true}}return function(R,$){return v[R]=E?E(R,$):$}}})((function(v){var Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,E){v.__proto__=E}||function(v,E){for(var R in E)if(E.hasOwnProperty(R))v[R]=E[R]};E=function(v,E){Ge(v,E);function __(){this.constructor=v}v.prototype=E===null?Object.create(E):(__.prototype=E.prototype,new __)};R=Object.assign||function(v){for(var E,R=1,$=arguments.length;R<$;R++){E=arguments[R];for(var j in E)if(Object.prototype.hasOwnProperty.call(E,j))v[j]=E[j]}return v};$=function(v,E){var R={};for(var $ in v)if(Object.prototype.hasOwnProperty.call(v,$)&&E.indexOf($)<0)R[$]=v[$];if(v!=null&&typeof Object.getOwnPropertySymbols==="function")for(var j=0,$=Object.getOwnPropertySymbols(v);j<$.length;j++){if(E.indexOf($[j])<0&&Object.prototype.propertyIsEnumerable.call(v,$[j]))R[$[j]]=v[$[j]]}return R};j=function(v,E,R,$){var j=arguments.length,N=j<3?E:$===null?$=Object.getOwnPropertyDescriptor(E,R):$,q;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")N=Reflect.decorate(v,E,R,$);else for(var G=v.length-1;G>=0;G--)if(q=v[G])N=(j<3?q(N):j>3?q(E,R,N):q(E,R))||N;return j>3&&N&&Object.defineProperty(E,R,N),N};N=function(v,E){return function(R,$){E(R,$,v)}};q=function(v,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(v,E)};G=function(v,E,R,$){function adopt(v){return v instanceof R?v:new R((function(E){E(v)}))}return new(R||(R=Promise))((function(R,j){function fulfilled(v){try{step($.next(v))}catch(v){j(v)}}function rejected(v){try{step($["throw"](v))}catch(v){j(v)}}function step(v){v.done?R(v.value):adopt(v.value).then(fulfilled,rejected)}step(($=$.apply(v,E||[])).next())}))};ie=function(v,E){var R={label:0,sent:function(){if(N[0]&1)throw N[1];return N[1]},trys:[],ops:[]},$,j,N,q;return q={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(q[Symbol.iterator]=function(){return this}),q;function verb(v){return function(E){return step([v,E])}}function step(q){if($)throw new TypeError("Generator is already executing.");while(R)try{if($=1,j&&(N=q[0]&2?j["return"]:q[0]?j["throw"]||((N=j["return"])&&N.call(j),0):j.next)&&!(N=N.call(j,q[1])).done)return N;if(j=0,N)q=[q[0]&2,N.value];switch(q[0]){case 0:case 1:N=q;break;case 4:R.label++;return{value:q[1],done:false};case 5:R.label++;j=q[1];q=[0];continue;case 7:q=R.ops.pop();R.trys.pop();continue;default:if(!(N=R.trys,N=N.length>0&&N[N.length-1])&&(q[0]===6||q[0]===2)){R=0;continue}if(q[0]===3&&(!N||q[1]>N[0]&&q[1]=v.length)v=void 0;return{value:v&&v[$++],done:!v}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")};le=function(v,E){var R=typeof Symbol==="function"&&v[Symbol.iterator];if(!R)return v;var $=R.call(v),j,N=[],q;try{while((E===void 0||E-- >0)&&!(j=$.next()).done)N.push(j.value)}catch(v){q={error:v}}finally{try{if(j&&!j.done&&(R=$["return"]))R.call($)}finally{if(q)throw q.error}}return N};me=function(){for(var v=[],E=0;E1||resume(v,E)}))}}function resume(v,E){try{step($[v](E))}catch(v){settle(N[0][3],v)}}function step(v){v.value instanceof Ie?Promise.resolve(v.value.v).then(fulfill,reject):settle(N[0][2],v)}function fulfill(v){resume("next",v)}function reject(v){resume("throw",v)}function settle(v,E){if(v(E),N.shift(),N.length)resume(N[0][0],N[0][1])}};Oe=function(v){var E,R;return E={},verb("next"),verb("throw",(function(v){throw v})),verb("return"),E[Symbol.iterator]=function(){return this},E;function verb($,j){E[$]=v[$]?function(E){return(R=!R)?{value:Ie(v[$](E)),done:$==="return"}:j?j(E):E}:j}};Te=function(v){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=v[Symbol.asyncIterator],R;return E?E.call(v):(v=typeof ce==="function"?ce(v):v[Symbol.iterator](),R={},verb("next"),verb("throw"),verb("return"),R[Symbol.asyncIterator]=function(){return this},R);function verb(E){R[E]=v[E]&&function(R){return new Promise((function($,j){R=v[E](R),settle($,j,R.done,R.value)}))}}function settle(v,E,R,$){Promise.resolve($).then((function(E){v({value:E,done:R})}),E)}};Ne=function(v,E){if(Object.defineProperty){Object.defineProperty(v,"raw",{value:E})}else{v.raw=E}return v};Be=function(v){if(v&&v.__esModule)return v;var E={};if(v!=null)for(var R in v)if(Object.hasOwnProperty.call(v,R))E[R]=v[R];E["default"]=v;return E};Le=function(v){return v&&v.__esModule?v:{default:v}};qe=function(v,E){if(!E.has(v)){throw new TypeError("attempted to get private field on non-instance")}return E.get(v)};Ue=function(v,E,R){if(!E.has(v)){throw new TypeError("attempted to set private field on non-instance")}E.set(v,R);return R};v("__extends",E);v("__assign",R);v("__rest",$);v("__decorate",j);v("__param",N);v("__metadata",q);v("__awaiter",G);v("__generator",ie);v("__exportStar",ae);v("__values",ce);v("__read",le);v("__spread",me);v("__spreadArrays",_e);v("__await",Ie);v("__asyncGenerator",Me);v("__asyncDelegator",Oe);v("__asyncValues",Te);v("__makeTemplateObject",Ne);v("__importStar",Be);v("__importDefault",Le);v("__classPrivateFieldGet",qe);v("__classPrivateFieldSet",Ue)}))},77661:function(v,E,R){"use strict";const $=R(39201);const j=R(27154);const N=R(14367);const q=R(94844);const{toConstantDependency:G,evaluateToString:ie}=R(97574);const ae=R(83162);const ce=R(61126);const le={__webpack_require__:{expr:$.require,req:[$.require],type:"function",assign:false},__webpack_public_path__:{expr:$.publicPath,req:[$.publicPath],type:"string",assign:true},__webpack_base_uri__:{expr:$.baseURI,req:[$.baseURI],type:"string",assign:true},__webpack_modules__:{expr:$.moduleFactories,req:[$.moduleFactories],type:"object",assign:false},__webpack_chunk_load__:{expr:$.ensureChunk,req:[$.ensureChunk],type:"function",assign:true},__non_webpack_require__:{expr:"require",req:null,type:undefined,assign:true},__webpack_nonce__:{expr:$.scriptNonce,req:[$.scriptNonce],type:"string",assign:true},__webpack_hash__:{expr:`${$.getFullHash}()`,req:[$.getFullHash],type:"string",assign:false},__webpack_chunkname__:{expr:$.chunkName,req:[$.chunkName],type:"string",assign:false},__webpack_get_script_filename__:{expr:$.getChunkScriptFilename,req:[$.getChunkScriptFilename],type:"function",assign:true},__webpack_runtime_id__:{expr:$.runtimeId,req:[$.runtimeId],assign:false},"require.onError":{expr:$.uncaughtErrorHandler,req:[$.uncaughtErrorHandler],type:undefined,assign:true},__system_context__:{expr:$.systemContext,req:[$.systemContext],type:"object",assign:false},__webpack_share_scopes__:{expr:$.shareScopeMap,req:[$.shareScopeMap],type:"object",assign:false},__webpack_init_sharing__:{expr:$.initializeSharing,req:[$.initializeSharing],type:"function",assign:true}};class APIPlugin{apply(v){v.hooks.compilation.tap("APIPlugin",((v,{normalModuleFactory:E})=>{v.dependencyTemplates.set(N,new N.Template);v.hooks.runtimeRequirementInTree.for($.chunkName).tap("APIPlugin",(E=>{v.addRuntimeModule(E,new ae(E.name));return true}));v.hooks.runtimeRequirementInTree.for($.getFullHash).tap("APIPlugin",((E,R)=>{v.addRuntimeModule(E,new ce);return true}));const handler=v=>{Object.keys(le).forEach((E=>{const R=le[E];v.hooks.expression.for(E).tap("APIPlugin",G(v,R.expr,R.req));if(R.assign===false){v.hooks.assign.for(E).tap("APIPlugin",(v=>{const R=new j(`${E} must not be assigned`);R.loc=v.loc;throw R}))}if(R.type){v.hooks.evaluateTypeof.for(E).tap("APIPlugin",ie(R.type))}}));v.hooks.expression.for("__webpack_layer__").tap("APIPlugin",(E=>{const R=new N(JSON.stringify(v.state.module.layer),E.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.evaluateIdentifier.for("__webpack_layer__").tap("APIPlugin",(E=>(v.state.module.layer===null?(new q).setNull():(new q).setString(v.state.module.layer)).setRange(E.range)));v.hooks.evaluateTypeof.for("__webpack_layer__").tap("APIPlugin",(E=>(new q).setString(v.state.module.layer===null?"object":"string").setRange(E.range)));v.hooks.expression.for("__webpack_module__.id").tap("APIPlugin",(E=>{v.state.module.buildInfo.moduleConcatenationBailout="__webpack_module__.id";const R=new N(v.state.module.moduleArgument+".id",E.range,[$.moduleId]);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.expression.for("__webpack_module__").tap("APIPlugin",(E=>{v.state.module.buildInfo.moduleConcatenationBailout="__webpack_module__";const R=new N(v.state.module.moduleArgument,E.range,[$.module]);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.evaluateTypeof.for("__webpack_module__").tap("APIPlugin",ie("object"))};E.hooks.parser.for("javascript/auto").tap("APIPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("APIPlugin",handler);E.hooks.parser.for("javascript/esm").tap("APIPlugin",handler)}))}}v.exports=APIPlugin},73846:function(v,E,R){"use strict";const $=R(27154);const j=/at ([a-zA-Z0-9_.]*)/;function createMessage(v){return`Abstract method${v?" "+v:""}. Must be overridden.`}function Message(){this.stack=undefined;Error.captureStackTrace(this);const v=this.stack.split("\n")[3].match(j);this.message=v&&v[1]?createMessage(v[1]):createMessage()}class AbstractMethodError extends ${constructor(){super((new Message).message);this.name="AbstractMethodError"}}v.exports=AbstractMethodError},42290:function(v,E,R){"use strict";const $=R(82618);const j=R(65764);class AsyncDependenciesBlock extends ${constructor(v,E,R){super();if(typeof v==="string"){v={name:v}}else if(!v){v={name:undefined}}this.groupOptions=v;this.loc=E;this.request=R;this._stringifiedGroupOptions=undefined}get chunkName(){return this.groupOptions.name}set chunkName(v){if(this.groupOptions.name!==v){this.groupOptions.name=v;this._stringifiedGroupOptions=undefined}}updateHash(v,E){const{chunkGraph:R}=E;if(this._stringifiedGroupOptions===undefined){this._stringifiedGroupOptions=JSON.stringify(this.groupOptions)}const $=R.getBlockChunkGroup(this);v.update(`${this._stringifiedGroupOptions}${$?$.id:""}`);super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this.groupOptions);E(this.loc);E(this.request);super.serialize(v)}deserialize(v){const{read:E}=v;this.groupOptions=E();this.loc=E();this.request=E();super.deserialize(v)}}j(AsyncDependenciesBlock,"webpack/lib/AsyncDependenciesBlock");Object.defineProperty(AsyncDependenciesBlock.prototype,"module",{get(){throw new Error("module property was removed from AsyncDependenciesBlock (it's not needed)")},set(){throw new Error("module property was removed from AsyncDependenciesBlock (it's not needed)")}});v.exports=AsyncDependenciesBlock},51558:function(v,E,R){"use strict";const $=R(27154);class AsyncDependencyToInitialChunkError extends ${constructor(v,E,R){super(`It's not allowed to load an initial chunk on demand. The chunk name "${v}" is already used by an entrypoint.`);this.name="AsyncDependencyToInitialChunkError";this.module=E;this.loc=R}}v.exports=AsyncDependencyToInitialChunkError},59851:function(v,E,R){"use strict";const $=R(78175);const j=R(89417);const N=R(45851);class AutomaticPrefetchPlugin{apply(v){v.hooks.compilation.tap("AutomaticPrefetchPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(N,E)}));let E=null;v.hooks.afterCompile.tap("AutomaticPrefetchPlugin",(v=>{E=[];for(const R of v.modules){if(R instanceof j){E.push({context:R.context,request:R.request})}}}));v.hooks.make.tapAsync("AutomaticPrefetchPlugin",((R,j)=>{if(!E)return j();$.forEach(E,((E,$)=>{R.addModuleChain(E.context||v.context,new N(`!!${E.request}`),$)}),(v=>{E=null;j(v)}))}))}}v.exports=AutomaticPrefetchPlugin},65502:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(73002);const N=R(99523);const q=R(43841);const G=R(89699);const ie=G(R(71611),(()=>R(72245)),{name:"Banner Plugin",baseDataPath:"options"});const wrapComment=v=>{if(!v.includes("\n")){return q.toComment(v)}return`/*!\n * ${v.replace(/\*\//g,"* /").split("\n").join("\n * ").replace(/\s+\n/g,"\n").trimRight()}\n */`};class BannerPlugin{constructor(v){if(typeof v==="string"||typeof v==="function"){v={banner:v}}ie(v);this.options=v;const E=v.banner;if(typeof E==="function"){const v=E;this.banner=this.options.raw?v:E=>wrapComment(v(E))}else{const v=this.options.raw?E:wrapComment(E);this.banner=()=>v}}apply(v){const E=this.options;const R=this.banner;const q=N.matchObject.bind(undefined,E);const G=new WeakMap;v.hooks.compilation.tap("BannerPlugin",(v=>{v.hooks.processAssets.tap({name:"BannerPlugin",stage:j.PROCESS_ASSETS_STAGE_ADDITIONS},(()=>{for(const j of v.chunks){if(E.entryOnly&&!j.canBeInitial()){continue}for(const N of j.files){if(!q(N)){continue}const ie={chunk:j,filename:N};const ae=v.getPath(R,ie);v.updateAsset(N,(v=>{let R=G.get(v);if(!R||R.comment!==ae){const R=E.footer?new $(v,"\n",ae):new $(ae,"\n",v);G.set(v,{source:R,comment:ae});return R}return R.source}))}}}))}))}}v.exports=BannerPlugin},25363:function(v,E,R){"use strict";const{AsyncParallelHook:$,AsyncSeriesBailHook:j,SyncHook:N}=R(44217);const{makeWebpackError:q,makeWebpackErrorCallback:G}=R(35230);const needCalls=(v,E)=>R=>{if(--v===0){return E(R)}if(R&&v>0){v=0;return E(R)}};class Cache{constructor(){this.hooks={get:new j(["identifier","etag","gotHandlers"]),store:new $(["identifier","etag","data"]),storeBuildDependencies:new $(["dependencies"]),beginIdle:new N([]),endIdle:new $([]),shutdown:new $([])}}get(v,E,R){const $=[];this.hooks.get.callAsync(v,E,$,((v,E)=>{if(v){R(q(v,"Cache.hooks.get"));return}if(E===null){E=undefined}if($.length>1){const v=needCalls($.length,(()=>R(null,E)));for(const R of $){R(E,v)}}else if($.length===1){$[0](E,(()=>R(null,E)))}else{R(null,E)}}))}store(v,E,R,$){this.hooks.store.callAsync(v,E,R,G($,"Cache.hooks.store"))}storeBuildDependencies(v,E){this.hooks.storeBuildDependencies.callAsync(v,G(E,"Cache.hooks.storeBuildDependencies"))}beginIdle(){this.hooks.beginIdle.call()}endIdle(v){this.hooks.endIdle.callAsync(G(v,"Cache.hooks.endIdle"))}shutdown(v){this.hooks.shutdown.callAsync(G(v,"Cache.hooks.shutdown"))}}Cache.STAGE_MEMORY=-10;Cache.STAGE_DEFAULT=0;Cache.STAGE_DISK=10;Cache.STAGE_NETWORK=20;v.exports=Cache},36035:function(v,E,R){"use strict";const{forEachBail:$}=R(958);const j=R(78175);const N=R(84059);const q=R(81053);class MultiItemCache{constructor(v){this._items=v;if(v.length===1)return v[0]}get(v){$(this._items,((v,E)=>v.get(E)),v)}getPromise(){const next=v=>this._items[v].getPromise().then((E=>{if(E!==undefined)return E;if(++vE.store(v,R)),E)}storePromise(v){return Promise.all(this._items.map((E=>E.storePromise(v)))).then((()=>{}))}}class ItemCacheFacade{constructor(v,E,R){this._cache=v;this._name=E;this._etag=R}get(v){this._cache.get(this._name,this._etag,v)}getPromise(){return new Promise(((v,E)=>{this._cache.get(this._name,this._etag,((R,$)=>{if(R){E(R)}else{v($)}}))}))}store(v,E){this._cache.store(this._name,this._etag,v,E)}storePromise(v){return new Promise(((E,R)=>{this._cache.store(this._name,this._etag,v,(v=>{if(v){R(v)}else{E()}}))}))}provide(v,E){this.get(((R,$)=>{if(R)return E(R);if($!==undefined)return $;v(((v,R)=>{if(v)return E(v);this.store(R,(v=>{if(v)return E(v);E(null,R)}))}))}))}async providePromise(v){const E=await this.getPromise();if(E!==undefined)return E;const R=await v();await this.storePromise(R);return R}}class CacheFacade{constructor(v,E,R){this._cache=v;this._name=E;this._hashFunction=R}getChildCache(v){return new CacheFacade(this._cache,`${this._name}|${v}`,this._hashFunction)}getItemCache(v,E){return new ItemCacheFacade(this._cache,`${this._name}|${v}`,E)}getLazyHashedEtag(v){return N(v,this._hashFunction)}mergeEtags(v,E){return q(v,E)}get(v,E,R){this._cache.get(`${this._name}|${v}`,E,R)}getPromise(v,E){return new Promise(((R,$)=>{this._cache.get(`${this._name}|${v}`,E,((v,E)=>{if(v){$(v)}else{R(E)}}))}))}store(v,E,R,$){this._cache.store(`${this._name}|${v}`,E,R,$)}storePromise(v,E,R){return new Promise((($,j)=>{this._cache.store(`${this._name}|${v}`,E,R,(v=>{if(v){j(v)}else{$()}}))}))}provide(v,E,R,$){this.get(v,E,((j,N)=>{if(j)return $(j);if(N!==undefined)return N;R(((R,j)=>{if(R)return $(R);this.store(v,E,j,(v=>{if(v)return $(v);$(null,j)}))}))}))}async providePromise(v,E,R){const $=await this.getPromise(v,E);if($!==undefined)return $;const j=await R();await this.storePromise(v,E,j);return j}}v.exports=CacheFacade;v.exports.ItemCacheFacade=ItemCacheFacade;v.exports.MultiItemCache=MultiItemCache},36715:function(v,E,R){"use strict";const $=R(27154);const sortModules=v=>v.sort(((v,E)=>{const R=v.identifier();const $=E.identifier();if(R<$)return-1;if(R>$)return 1;return 0}));const createModulesListMessage=(v,E)=>v.map((v=>{let R=`* ${v.identifier()}`;const $=Array.from(E.getIncomingConnectionsByOriginModule(v).keys()).filter((v=>v));if($.length>0){R+=`\n Used by ${$.length} module(s), i. e.`;R+=`\n ${$[0].identifier()}`}return R})).join("\n");class CaseSensitiveModulesWarning extends ${constructor(v,E){const R=sortModules(Array.from(v));const $=createModulesListMessage(R,E);super(`There are multiple modules with names that only differ in casing.\nThis can lead to unexpected behavior when compiling on a filesystem with other case-semantic.\nUse equal casing. Compare these module identifiers:\n${$}`);this.name="CaseSensitiveModulesWarning";this.module=R[0]}}v.exports=CaseSensitiveModulesWarning},84891:function(v,E,R){"use strict";const $=R(75449);const j=R(33546);const{intersect:N}=R(73268);const q=R(87122);const G=R(8382);const{compareModulesByIdentifier:ie,compareChunkGroupsByIndex:ae,compareModulesById:ce}=R(58792);const{createArrayToSetDeprecationSet:le}=R(99321);const{mergeRuntime:me}=R(47462);const _e=le("chunk.files");let Ie=1e3;class Chunk{constructor(v,E=true){this.id=null;this.ids=null;this.debugId=Ie++;this.name=v;this.idNameHints=new q;this.preventIntegration=false;this.filenameTemplate=undefined;this.cssFilenameTemplate=undefined;this._groups=new q(undefined,ae);this.runtime=undefined;this.files=E?new _e:new Set;this.auxiliaryFiles=new Set;this.rendered=false;this.hash=undefined;this.contentHash=Object.create(null);this.renderedHash=undefined;this.chunkReason=undefined;this.extraAsync=false}get entryModule(){const v=Array.from($.getChunkGraphForChunk(this,"Chunk.entryModule","DEP_WEBPACK_CHUNK_ENTRY_MODULE").getChunkEntryModulesIterable(this));if(v.length===0){return undefined}else if(v.length===1){return v[0]}else{throw new Error("Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)")}}hasEntryModule(){return $.getChunkGraphForChunk(this,"Chunk.hasEntryModule","DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE").getNumberOfEntryModules(this)>0}addModule(v){const E=$.getChunkGraphForChunk(this,"Chunk.addModule","DEP_WEBPACK_CHUNK_ADD_MODULE");if(E.isModuleInChunk(v,this))return false;E.connectChunkAndModule(this,v);return true}removeModule(v){$.getChunkGraphForChunk(this,"Chunk.removeModule","DEP_WEBPACK_CHUNK_REMOVE_MODULE").disconnectChunkAndModule(this,v)}getNumberOfModules(){return $.getChunkGraphForChunk(this,"Chunk.getNumberOfModules","DEP_WEBPACK_CHUNK_GET_NUMBER_OF_MODULES").getNumberOfChunkModules(this)}get modulesIterable(){const v=$.getChunkGraphForChunk(this,"Chunk.modulesIterable","DEP_WEBPACK_CHUNK_MODULES_ITERABLE");return v.getOrderedChunkModulesIterable(this,ie)}compareTo(v){const E=$.getChunkGraphForChunk(this,"Chunk.compareTo","DEP_WEBPACK_CHUNK_COMPARE_TO");return E.compareChunks(this,v)}containsModule(v){return $.getChunkGraphForChunk(this,"Chunk.containsModule","DEP_WEBPACK_CHUNK_CONTAINS_MODULE").isModuleInChunk(v,this)}getModules(){return $.getChunkGraphForChunk(this,"Chunk.getModules","DEP_WEBPACK_CHUNK_GET_MODULES").getChunkModules(this)}remove(){const v=$.getChunkGraphForChunk(this,"Chunk.remove","DEP_WEBPACK_CHUNK_REMOVE");v.disconnectChunk(this);this.disconnectFromGroups()}moveModule(v,E){const R=$.getChunkGraphForChunk(this,"Chunk.moveModule","DEP_WEBPACK_CHUNK_MOVE_MODULE");R.disconnectChunkAndModule(this,v);R.connectChunkAndModule(E,v)}integrate(v){const E=$.getChunkGraphForChunk(this,"Chunk.integrate","DEP_WEBPACK_CHUNK_INTEGRATE");if(E.canChunksBeIntegrated(this,v)){E.integrateChunks(this,v);return true}else{return false}}canBeIntegrated(v){const E=$.getChunkGraphForChunk(this,"Chunk.canBeIntegrated","DEP_WEBPACK_CHUNK_CAN_BE_INTEGRATED");return E.canChunksBeIntegrated(this,v)}isEmpty(){const v=$.getChunkGraphForChunk(this,"Chunk.isEmpty","DEP_WEBPACK_CHUNK_IS_EMPTY");return v.getNumberOfChunkModules(this)===0}modulesSize(){const v=$.getChunkGraphForChunk(this,"Chunk.modulesSize","DEP_WEBPACK_CHUNK_MODULES_SIZE");return v.getChunkModulesSize(this)}size(v={}){const E=$.getChunkGraphForChunk(this,"Chunk.size","DEP_WEBPACK_CHUNK_SIZE");return E.getChunkSize(this,v)}integratedSize(v,E){const R=$.getChunkGraphForChunk(this,"Chunk.integratedSize","DEP_WEBPACK_CHUNK_INTEGRATED_SIZE");return R.getIntegratedChunksSize(this,v,E)}getChunkModuleMaps(v){const E=$.getChunkGraphForChunk(this,"Chunk.getChunkModuleMaps","DEP_WEBPACK_CHUNK_GET_CHUNK_MODULE_MAPS");const R=Object.create(null);const j=Object.create(null);for(const $ of this.getAllAsyncChunks()){let N;for(const q of E.getOrderedChunkModulesIterable($,ce(E))){if(v(q)){if(N===undefined){N=[];R[$.id]=N}const v=E.getModuleId(q);N.push(v);j[v]=E.getRenderedModuleHash(q,undefined)}}}return{id:R,hash:j}}hasModuleInGraph(v,E){const R=$.getChunkGraphForChunk(this,"Chunk.hasModuleInGraph","DEP_WEBPACK_CHUNK_HAS_MODULE_IN_GRAPH");return R.hasModuleInGraph(this,v,E)}getChunkMaps(v){const E=Object.create(null);const R=Object.create(null);const $=Object.create(null);for(const j of this.getAllAsyncChunks()){E[j.id]=v?j.hash:j.renderedHash;for(const v of Object.keys(j.contentHash)){if(!R[v]){R[v]=Object.create(null)}R[v][j.id]=j.contentHash[v]}if(j.name){$[j.id]=j.name}}return{hash:E,contentHash:R,name:$}}hasRuntime(){for(const v of this._groups){if(v instanceof j&&v.getRuntimeChunk()===this){return true}}return false}canBeInitial(){for(const v of this._groups){if(v.isInitial())return true}return false}isOnlyInitial(){if(this._groups.size<=0)return false;for(const v of this._groups){if(!v.isInitial())return false}return true}getEntryOptions(){for(const v of this._groups){if(v instanceof j){return v.options}}return undefined}addGroup(v){this._groups.add(v)}removeGroup(v){this._groups.delete(v)}isInGroup(v){return this._groups.has(v)}getNumberOfGroups(){return this._groups.size}get groupsIterable(){this._groups.sort();return this._groups}disconnectFromGroups(){for(const v of this._groups){v.removeChunk(this)}}split(v){for(const E of this._groups){E.insertChunk(v,this);v.addGroup(E)}for(const E of this.idNameHints){v.idNameHints.add(E)}v.runtime=me(v.runtime,this.runtime)}updateHash(v,E){v.update(`${this.id} ${this.ids?this.ids.join():""} ${this.name||""} `);const R=new G;for(const v of E.getChunkModulesIterable(this)){R.add(E.getModuleHash(v,this.runtime))}R.updateHash(v);const $=E.getChunkEntryModulesWithChunkGroupIterable(this);for(const[R,j]of $){v.update(`entry${E.getModuleId(R)}${j.id}`)}}getAllAsyncChunks(){const v=new Set;const E=new Set;const R=N(Array.from(this.groupsIterable,(v=>new Set(v.chunks))));const $=new Set(this.groupsIterable);for(const E of $){for(const R of E.childrenIterable){if(R instanceof j){$.add(R)}else{v.add(R)}}}for(const $ of v){for(const v of $.chunks){if(!R.has(v)){E.add(v)}}for(const E of $.childrenIterable){v.add(E)}}return E}getAllInitialChunks(){const v=new Set;const E=new Set(this.groupsIterable);for(const R of E){if(R.isInitial()){for(const E of R.chunks)v.add(E);for(const v of R.childrenIterable)E.add(v)}}return v}getAllReferencedChunks(){const v=new Set(this.groupsIterable);const E=new Set;for(const R of v){for(const v of R.chunks){E.add(v)}for(const E of R.childrenIterable){v.add(E)}}return E}getAllReferencedAsyncEntrypoints(){const v=new Set(this.groupsIterable);const E=new Set;for(const R of v){for(const v of R.asyncEntrypointsIterable){E.add(v)}for(const E of R.childrenIterable){v.add(E)}}return E}hasAsyncChunks(){const v=new Set;const E=N(Array.from(this.groupsIterable,(v=>new Set(v.chunks))));for(const E of this.groupsIterable){for(const R of E.childrenIterable){v.add(R)}}for(const R of v){for(const v of R.chunks){if(!E.has(v)){return true}}for(const E of R.childrenIterable){v.add(E)}}return false}getChildIdsByOrders(v,E){const R=new Map;for(const v of this.groupsIterable){if(v.chunks[v.chunks.length-1]===this){for(const E of v.childrenIterable){for(const v of Object.keys(E.options)){if(v.endsWith("Order")){const $=v.slice(0,v.length-"Order".length);let j=R.get($);if(j===undefined){j=[];R.set($,j)}j.push({order:E.options[v],group:E})}}}}}const $=Object.create(null);for(const[j,N]of R){N.sort(((E,R)=>{const $=R.order-E.order;if($!==0)return $;return E.group.compareTo(v,R.group)}));const R=new Set;for(const $ of N){for(const j of $.group.chunks){if(E&&!E(j,v))continue;R.add(j.id)}}if(R.size>0){$[j]=Array.from(R)}}return $}getChildrenOfTypeInOrder(v,E){const R=[];for(const v of this.groupsIterable){for(const $ of v.childrenIterable){const j=$.options[E];if(j===undefined)continue;R.push({order:j,group:v,childGroup:$})}}if(R.length===0)return undefined;R.sort(((E,R)=>{const $=R.order-E.order;if($!==0)return $;return E.group.compareTo(v,R.group)}));const $=[];let j;for(const{group:v,childGroup:E}of R){if(j&&j.onChunks===v.chunks){for(const v of E.chunks){j.chunks.add(v)}}else{$.push(j={onChunks:v.chunks,chunks:new Set(E.chunks)})}}return $}getChildIdsByOrdersMap(v,E,R){const $=Object.create(null);const addChildIdsByOrdersToMap=E=>{const j=E.getChildIdsByOrders(v,R);for(const v of Object.keys(j)){let R=$[v];if(R===undefined){$[v]=R=Object.create(null)}R[E.id]=j[v]}};if(E){const v=new Set;for(const E of this.groupsIterable){for(const R of E.chunks){v.add(R)}}for(const E of v){addChildIdsByOrdersToMap(E)}}for(const v of this.getAllAsyncChunks()){addChildIdsByOrdersToMap(v)}return $}}v.exports=Chunk},75449:function(v,E,R){"use strict";const $=R(73837);const j=R(33546);const N=R(82921);const{first:q}=R(73268);const G=R(87122);const{compareModulesById:ie,compareIterables:ae,compareModulesByIdentifier:ce,concatComparators:le,compareSelect:me,compareIds:_e}=R(58792);const Ie=R(85205);const Me=R(30584);const{RuntimeSpecMap:Oe,RuntimeSpecSet:Te,runtimeToString:Ne,mergeRuntime:Be,forEachRuntime:Le}=R(47462);const qe=new Set;const Ue=BigInt(0);const Ge=ae(ce);class ModuleHashInfo{constructor(v,E){this.hash=v;this.renderedHash=E}}const getArray=v=>Array.from(v);const getModuleRuntimes=v=>{const E=new Te;for(const R of v){E.add(R.runtime)}return E};const modulesBySourceType=v=>E=>{const R=new Map;for(const $ of E){const E=v&&v.get($)||$.getSourceTypes();for(const v of E){let E=R.get(v);if(E===undefined){E=new G;R.set(v,E)}E.add($)}}for(const[v,$]of R){if($.size===E.size){R.set(v,E)}}return R};const He=modulesBySourceType(undefined);const We=new WeakMap;const createOrderedArrayFunction=v=>{let E=We.get(v);if(E!==undefined)return E;E=E=>{E.sortWith(v);return Array.from(E)};We.set(v,E);return E};const getModulesSize=v=>{let E=0;for(const R of v){for(const v of R.getSourceTypes()){E+=R.size(v)}}return E};const getModulesSizes=v=>{let E=Object.create(null);for(const R of v){for(const v of R.getSourceTypes()){E[v]=(E[v]||0)+R.size(v)}}return E};const isAvailableChunk=(v,E)=>{const R=new Set(E.groupsIterable);for(const E of R){if(v.isInGroup(E))continue;if(E.isInitial())return false;for(const v of E.parentsIterable){R.add(v)}}return true};class ChunkGraphModule{constructor(){this.chunks=new G;this.entryInChunks=undefined;this.runtimeInChunks=undefined;this.hashes=undefined;this.id=null;this.runtimeRequirements=undefined;this.graphHashes=undefined;this.graphHashesWithConnections=undefined}}class ChunkGraphChunk{constructor(){this.modules=new G;this.sourceTypesByModule=undefined;this.entryModules=new Map;this.runtimeModules=new G;this.fullHashModules=undefined;this.dependentHashModules=undefined;this.runtimeRequirements=undefined;this.runtimeRequirementsInTree=new Set;this._modulesBySourceType=He}}class ChunkGraph{constructor(v,E="md4"){this._modules=new WeakMap;this._chunks=new WeakMap;this._blockChunkGroups=new WeakMap;this._runtimeIds=new Map;this.moduleGraph=v;this._hashFunction=E;this._getGraphRoots=this._getGraphRoots.bind(this)}_getChunkGraphModule(v){let E=this._modules.get(v);if(E===undefined){E=new ChunkGraphModule;this._modules.set(v,E)}return E}_getChunkGraphChunk(v){let E=this._chunks.get(v);if(E===undefined){E=new ChunkGraphChunk;this._chunks.set(v,E)}return E}_getGraphRoots(v){const{moduleGraph:E}=this;return Array.from(Me(v,(v=>{const R=new Set;const addDependencies=v=>{for(const $ of E.getOutgoingConnections(v)){if(!$.module)continue;const v=$.getActiveState(undefined);if(v===false)continue;if(v===N.TRANSITIVE_ONLY){addDependencies($.module);continue}R.add($.module)}};addDependencies(v);return R}))).sort(ce)}connectChunkAndModule(v,E){const R=this._getChunkGraphModule(E);const $=this._getChunkGraphChunk(v);R.chunks.add(v);$.modules.add(E)}disconnectChunkAndModule(v,E){const R=this._getChunkGraphModule(E);const $=this._getChunkGraphChunk(v);$.modules.delete(E);if($.sourceTypesByModule)$.sourceTypesByModule.delete(E);R.chunks.delete(v)}disconnectChunk(v){const E=this._getChunkGraphChunk(v);for(const R of E.modules){const E=this._getChunkGraphModule(R);E.chunks.delete(v)}E.modules.clear();v.disconnectFromGroups();ChunkGraph.clearChunkGraphForChunk(v)}attachModules(v,E){const R=this._getChunkGraphChunk(v);for(const v of E){R.modules.add(v)}}attachRuntimeModules(v,E){const R=this._getChunkGraphChunk(v);for(const v of E){R.runtimeModules.add(v)}}attachFullHashModules(v,E){const R=this._getChunkGraphChunk(v);if(R.fullHashModules===undefined)R.fullHashModules=new Set;for(const v of E){R.fullHashModules.add(v)}}attachDependentHashModules(v,E){const R=this._getChunkGraphChunk(v);if(R.dependentHashModules===undefined)R.dependentHashModules=new Set;for(const v of E){R.dependentHashModules.add(v)}}replaceModule(v,E){const R=this._getChunkGraphModule(v);const $=this._getChunkGraphModule(E);for(const j of R.chunks){const R=this._getChunkGraphChunk(j);R.modules.delete(v);R.modules.add(E);$.chunks.add(j)}R.chunks.clear();if(R.entryInChunks!==undefined){if($.entryInChunks===undefined){$.entryInChunks=new Set}for(const j of R.entryInChunks){const R=this._getChunkGraphChunk(j);const N=R.entryModules.get(v);const q=new Map;for(const[$,j]of R.entryModules){if($===v){q.set(E,N)}else{q.set($,j)}}R.entryModules=q;$.entryInChunks.add(j)}R.entryInChunks=undefined}if(R.runtimeInChunks!==undefined){if($.runtimeInChunks===undefined){$.runtimeInChunks=new Set}for(const j of R.runtimeInChunks){const R=this._getChunkGraphChunk(j);R.runtimeModules.delete(v);R.runtimeModules.add(E);$.runtimeInChunks.add(j);if(R.fullHashModules!==undefined&&R.fullHashModules.has(v)){R.fullHashModules.delete(v);R.fullHashModules.add(E)}if(R.dependentHashModules!==undefined&&R.dependentHashModules.has(v)){R.dependentHashModules.delete(v);R.dependentHashModules.add(E)}}R.runtimeInChunks=undefined}}isModuleInChunk(v,E){const R=this._getChunkGraphChunk(E);return R.modules.has(v)}isModuleInChunkGroup(v,E){for(const R of E.chunks){if(this.isModuleInChunk(v,R))return true}return false}isEntryModule(v){const E=this._getChunkGraphModule(v);return E.entryInChunks!==undefined}getModuleChunksIterable(v){const E=this._getChunkGraphModule(v);return E.chunks}getOrderedModuleChunksIterable(v,E){const R=this._getChunkGraphModule(v);R.chunks.sortWith(E);return R.chunks}getModuleChunks(v){const E=this._getChunkGraphModule(v);return E.chunks.getFromCache(getArray)}getNumberOfModuleChunks(v){const E=this._getChunkGraphModule(v);return E.chunks.size}getModuleRuntimes(v){const E=this._getChunkGraphModule(v);return E.chunks.getFromUnorderedCache(getModuleRuntimes)}getNumberOfChunkModules(v){const E=this._getChunkGraphChunk(v);return E.modules.size}getNumberOfChunkFullHashModules(v){const E=this._getChunkGraphChunk(v);return E.fullHashModules===undefined?0:E.fullHashModules.size}getChunkModulesIterable(v){const E=this._getChunkGraphChunk(v);return E.modules}getChunkModulesIterableBySourceType(v,E){const R=this._getChunkGraphChunk(v);const $=R.modules.getFromUnorderedCache(R._modulesBySourceType).get(E);return $}setChunkModuleSourceTypes(v,E,R){const $=this._getChunkGraphChunk(v);if($.sourceTypesByModule===undefined){$.sourceTypesByModule=new WeakMap}$.sourceTypesByModule.set(E,R);$._modulesBySourceType=modulesBySourceType($.sourceTypesByModule)}getChunkModuleSourceTypes(v,E){const R=this._getChunkGraphChunk(v);if(R.sourceTypesByModule===undefined){return E.getSourceTypes()}return R.sourceTypesByModule.get(E)||E.getSourceTypes()}getModuleSourceTypes(v){return this._getOverwrittenModuleSourceTypes(v)||v.getSourceTypes()}_getOverwrittenModuleSourceTypes(v){let E=false;let R;for(const $ of this.getModuleChunksIterable(v)){const j=this._getChunkGraphChunk($);if(j.sourceTypesByModule===undefined)return;const N=j.sourceTypesByModule.get(v);if(N===undefined)return;if(!R){R=N;continue}else if(!E){for(const v of N){if(!E){if(!R.has(v)){E=true;R=new Set(R);R.add(v)}}else{R.add(v)}}}else{for(const v of N)R.add(v)}}return R}getOrderedChunkModulesIterable(v,E){const R=this._getChunkGraphChunk(v);R.modules.sortWith(E);return R.modules}getOrderedChunkModulesIterableBySourceType(v,E,R){const $=this._getChunkGraphChunk(v);const j=$.modules.getFromUnorderedCache($._modulesBySourceType).get(E);if(j===undefined)return undefined;j.sortWith(R);return j}getChunkModules(v){const E=this._getChunkGraphChunk(v);return E.modules.getFromUnorderedCache(getArray)}getOrderedChunkModules(v,E){const R=this._getChunkGraphChunk(v);const $=createOrderedArrayFunction(E);return R.modules.getFromUnorderedCache($)}getChunkModuleIdMap(v,E,R=false){const $=Object.create(null);for(const j of R?v.getAllReferencedChunks():v.getAllAsyncChunks()){let v;for(const R of this.getOrderedChunkModulesIterable(j,ie(this))){if(E(R)){if(v===undefined){v=[];$[j.id]=v}const E=this.getModuleId(R);v.push(E)}}}return $}getChunkModuleRenderedHashMap(v,E,R=0,$=false){const j=Object.create(null);for(const N of $?v.getAllReferencedChunks():v.getAllAsyncChunks()){let v;for(const $ of this.getOrderedChunkModulesIterable(N,ie(this))){if(E($)){if(v===undefined){v=Object.create(null);j[N.id]=v}const E=this.getModuleId($);const q=this.getRenderedModuleHash($,N.runtime);v[E]=R?q.slice(0,R):q}}}return j}getChunkConditionMap(v,E){const R=Object.create(null);for(const $ of v.getAllReferencedChunks()){R[$.id]=E($,this)}return R}hasModuleInGraph(v,E,R){const $=new Set(v.groupsIterable);const j=new Set;for(const v of $){for(const $ of v.chunks){if(!j.has($)){j.add($);if(!R||R($,this)){for(const v of this.getChunkModulesIterable($)){if(E(v)){return true}}}}}for(const E of v.childrenIterable){$.add(E)}}return false}compareChunks(v,E){const R=this._getChunkGraphChunk(v);const $=this._getChunkGraphChunk(E);if(R.modules.size>$.modules.size)return-1;if(R.modules.size<$.modules.size)return 1;R.modules.sortWith(ce);$.modules.sortWith(ce);return Ge(R.modules,$.modules)}getChunkModulesSize(v){const E=this._getChunkGraphChunk(v);return E.modules.getFromUnorderedCache(getModulesSize)}getChunkModulesSizes(v){const E=this._getChunkGraphChunk(v);return E.modules.getFromUnorderedCache(getModulesSizes)}getChunkRootModules(v){const E=this._getChunkGraphChunk(v);return E.modules.getFromUnorderedCache(this._getGraphRoots)}getChunkSize(v,E={}){const R=this._getChunkGraphChunk(v);const $=R.modules.getFromUnorderedCache(getModulesSize);const j=typeof E.chunkOverhead==="number"?E.chunkOverhead:1e4;const N=typeof E.entryChunkMultiplicator==="number"?E.entryChunkMultiplicator:10;return j+$*(v.canBeInitial()?N:1)}getIntegratedChunksSize(v,E,R={}){const $=this._getChunkGraphChunk(v);const j=this._getChunkGraphChunk(E);const N=new Set($.modules);for(const v of j.modules)N.add(v);let q=getModulesSize(N);const G=typeof R.chunkOverhead==="number"?R.chunkOverhead:1e4;const ie=typeof R.entryChunkMultiplicator==="number"?R.entryChunkMultiplicator:10;return G+q*(v.canBeInitial()||E.canBeInitial()?ie:1)}canChunksBeIntegrated(v,E){if(v.preventIntegration||E.preventIntegration){return false}const R=v.hasRuntime();const $=E.hasRuntime();if(R!==$){if(R){return isAvailableChunk(v,E)}else if($){return isAvailableChunk(E,v)}else{return false}}if(this.getNumberOfEntryModules(v)>0||this.getNumberOfEntryModules(E)>0){return false}return true}integrateChunks(v,E){if(v.name&&E.name){if(this.getNumberOfEntryModules(v)>0===this.getNumberOfEntryModules(E)>0){if(v.name.length!==E.name.length){v.name=v.name.length0){v.name=E.name}}else if(E.name){v.name=E.name}for(const R of E.idNameHints){v.idNameHints.add(R)}v.runtime=Be(v.runtime,E.runtime);for(const R of this.getChunkModules(E)){this.disconnectChunkAndModule(E,R);this.connectChunkAndModule(v,R)}for(const[R,$]of Array.from(this.getChunkEntryModulesWithChunkGroupIterable(E))){this.disconnectChunkAndEntryModule(E,R);this.connectChunkAndEntryModule(v,R,$)}for(const R of E.groupsIterable){R.replaceChunk(E,v);v.addGroup(R);E.removeGroup(R)}ChunkGraph.clearChunkGraphForChunk(E)}upgradeDependentToFullHashModules(v){const E=this._getChunkGraphChunk(v);if(E.dependentHashModules===undefined)return;if(E.fullHashModules===undefined){E.fullHashModules=E.dependentHashModules}else{for(const v of E.dependentHashModules){E.fullHashModules.add(v)}E.dependentHashModules=undefined}}isEntryModuleInChunk(v,E){const R=this._getChunkGraphChunk(E);return R.entryModules.has(v)}connectChunkAndEntryModule(v,E,R){const $=this._getChunkGraphModule(E);const j=this._getChunkGraphChunk(v);if($.entryInChunks===undefined){$.entryInChunks=new Set}$.entryInChunks.add(v);j.entryModules.set(E,R)}connectChunkAndRuntimeModule(v,E){const R=this._getChunkGraphModule(E);const $=this._getChunkGraphChunk(v);if(R.runtimeInChunks===undefined){R.runtimeInChunks=new Set}R.runtimeInChunks.add(v);$.runtimeModules.add(E)}addFullHashModuleToChunk(v,E){const R=this._getChunkGraphChunk(v);if(R.fullHashModules===undefined)R.fullHashModules=new Set;R.fullHashModules.add(E)}addDependentHashModuleToChunk(v,E){const R=this._getChunkGraphChunk(v);if(R.dependentHashModules===undefined)R.dependentHashModules=new Set;R.dependentHashModules.add(E)}disconnectChunkAndEntryModule(v,E){const R=this._getChunkGraphModule(E);const $=this._getChunkGraphChunk(v);R.entryInChunks.delete(v);if(R.entryInChunks.size===0){R.entryInChunks=undefined}$.entryModules.delete(E)}disconnectChunkAndRuntimeModule(v,E){const R=this._getChunkGraphModule(E);const $=this._getChunkGraphChunk(v);R.runtimeInChunks.delete(v);if(R.runtimeInChunks.size===0){R.runtimeInChunks=undefined}$.runtimeModules.delete(E)}disconnectEntryModule(v){const E=this._getChunkGraphModule(v);for(const R of E.entryInChunks){const E=this._getChunkGraphChunk(R);E.entryModules.delete(v)}E.entryInChunks=undefined}disconnectEntries(v){const E=this._getChunkGraphChunk(v);for(const R of E.entryModules.keys()){const E=this._getChunkGraphModule(R);E.entryInChunks.delete(v);if(E.entryInChunks.size===0){E.entryInChunks=undefined}}E.entryModules.clear()}getNumberOfEntryModules(v){const E=this._getChunkGraphChunk(v);return E.entryModules.size}getNumberOfRuntimeModules(v){const E=this._getChunkGraphChunk(v);return E.runtimeModules.size}getChunkEntryModulesIterable(v){const E=this._getChunkGraphChunk(v);return E.entryModules.keys()}getChunkEntryDependentChunksIterable(v){const E=new Set;for(const R of v.groupsIterable){if(R instanceof j){const $=R.getEntrypointChunk();const j=this._getChunkGraphChunk($);for(const R of j.entryModules.values()){for(const j of R.chunks){if(j!==v&&j!==$&&!j.hasRuntime()){E.add(j)}}}}}return E}hasChunkEntryDependentChunks(v){const E=this._getChunkGraphChunk(v);for(const R of E.entryModules.values()){for(const E of R.chunks){if(E!==v){return true}}}return false}getChunkRuntimeModulesIterable(v){const E=this._getChunkGraphChunk(v);return E.runtimeModules}getChunkRuntimeModulesInOrder(v){const E=this._getChunkGraphChunk(v);const R=Array.from(E.runtimeModules);R.sort(le(me((v=>v.stage),_e),ce));return R}getChunkFullHashModulesIterable(v){const E=this._getChunkGraphChunk(v);return E.fullHashModules}getChunkFullHashModulesSet(v){const E=this._getChunkGraphChunk(v);return E.fullHashModules}getChunkDependentHashModulesIterable(v){const E=this._getChunkGraphChunk(v);return E.dependentHashModules}getChunkEntryModulesWithChunkGroupIterable(v){const E=this._getChunkGraphChunk(v);return E.entryModules}getBlockChunkGroup(v){return this._blockChunkGroups.get(v)}connectBlockAndChunkGroup(v,E){this._blockChunkGroups.set(v,E);E.addBlock(v)}disconnectChunkGroup(v){for(const E of v.blocksIterable){this._blockChunkGroups.delete(E)}v._blocks.clear()}getModuleId(v){const E=this._getChunkGraphModule(v);return E.id}setModuleId(v,E){const R=this._getChunkGraphModule(v);R.id=E}getRuntimeId(v){return this._runtimeIds.get(v)}setRuntimeId(v,E){this._runtimeIds.set(v,E)}_getModuleHashInfo(v,E,R){if(!E){throw new Error(`Module ${v.identifier()} has no hash info for runtime ${Ne(R)} (hashes not set at all)`)}else if(R===undefined){const R=new Set(E.values());if(R.size!==1){throw new Error(`No unique hash info entry for unspecified runtime for ${v.identifier()} (existing runtimes: ${Array.from(E.keys(),(v=>Ne(v))).join(", ")}).\nCaller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").`)}return q(R)}else{const $=E.get(R);if(!$){throw new Error(`Module ${v.identifier()} has no hash info for runtime ${Ne(R)} (available runtimes ${Array.from(E.keys(),Ne).join(", ")})`)}return $}}hasModuleHashes(v,E){const R=this._getChunkGraphModule(v);const $=R.hashes;return $&&$.has(E)}getModuleHash(v,E){const R=this._getChunkGraphModule(v);const $=R.hashes;return this._getModuleHashInfo(v,$,E).hash}getRenderedModuleHash(v,E){const R=this._getChunkGraphModule(v);const $=R.hashes;return this._getModuleHashInfo(v,$,E).renderedHash}setModuleHashes(v,E,R,$){const j=this._getChunkGraphModule(v);if(j.hashes===undefined){j.hashes=new Oe}j.hashes.set(E,new ModuleHashInfo(R,$))}addModuleRuntimeRequirements(v,E,R,$=true){const j=this._getChunkGraphModule(v);const N=j.runtimeRequirements;if(N===undefined){const v=new Oe;v.set(E,$?R:new Set(R));j.runtimeRequirements=v;return}N.update(E,(v=>{if(v===undefined){return $?R:new Set(R)}else if(!$||v.size>=R.size){for(const E of R)v.add(E);return v}else{for(const E of v)R.add(E);return R}}))}addChunkRuntimeRequirements(v,E){const R=this._getChunkGraphChunk(v);const $=R.runtimeRequirements;if($===undefined){R.runtimeRequirements=E}else if($.size>=E.size){for(const v of E)$.add(v)}else{for(const v of $)E.add(v);R.runtimeRequirements=E}}addTreeRuntimeRequirements(v,E){const R=this._getChunkGraphChunk(v);const $=R.runtimeRequirementsInTree;for(const v of E)$.add(v)}getModuleRuntimeRequirements(v,E){const R=this._getChunkGraphModule(v);const $=R.runtimeRequirements&&R.runtimeRequirements.get(E);return $===undefined?qe:$}getChunkRuntimeRequirements(v){const E=this._getChunkGraphChunk(v);const R=E.runtimeRequirements;return R===undefined?qe:R}getModuleGraphHash(v,E,R=true){const $=this._getChunkGraphModule(v);return R?this._getModuleGraphHashWithConnections($,v,E):this._getModuleGraphHashBigInt($,v,E).toString(16)}getModuleGraphHashBigInt(v,E,R=true){const $=this._getChunkGraphModule(v);return R?BigInt(`0x${this._getModuleGraphHashWithConnections($,v,E)}`):this._getModuleGraphHashBigInt($,v,E)}_getModuleGraphHashBigInt(v,E,R){if(v.graphHashes===undefined){v.graphHashes=new Oe}const $=v.graphHashes.provide(R,(()=>{const $=Ie(this._hashFunction);$.update(`${v.id}${this.moduleGraph.isAsync(E)}`);const j=this._getOverwrittenModuleSourceTypes(E);if(j!==undefined){for(const v of j)$.update(v)}this.moduleGraph.getExportsInfo(E).updateHash($,R);return BigInt(`0x${$.digest("hex")}`)}));return $}_getModuleGraphHashWithConnections(v,E,R){if(v.graphHashesWithConnections===undefined){v.graphHashesWithConnections=new Oe}const activeStateToString=v=>{if(v===false)return"F";if(v===true)return"T";if(v===N.TRANSITIVE_ONLY)return"O";throw new Error("Not implemented active state")};const $=E.buildMeta&&E.buildMeta.strictHarmonyModule;return v.graphHashesWithConnections.provide(R,(()=>{const j=this._getModuleGraphHashBigInt(v,E,R).toString(16);const N=this.moduleGraph.getOutgoingConnections(E);const G=new Set;const ie=new Map;const processConnection=(v,E)=>{const R=v.module;E+=R.getExportsType(this.moduleGraph,$);if(E==="Tnamespace")G.add(R);else{const v=ie.get(E);if(v===undefined){ie.set(E,R)}else if(v instanceof Set){v.add(R)}else if(v!==R){ie.set(E,new Set([v,R]))}}};if(R===undefined||typeof R==="string"){for(const v of N){const E=v.getActiveState(R);if(E===false)continue;processConnection(v,E===true?"T":"O")}}else{for(const v of N){const E=new Set;let $="";Le(R,(R=>{const j=v.getActiveState(R);E.add(j);$+=activeStateToString(j)+R}),true);if(E.size===1){const v=q(E);if(v===false)continue;$=activeStateToString(v)}processConnection(v,$)}}if(G.size===0&&ie.size===0)return j;const ae=ie.size>1?Array.from(ie).sort((([v],[E])=>v{ce.update(this._getModuleGraphHashBigInt(this._getChunkGraphModule(v),v,R).toString(16))};const addModulesToHash=v=>{let E=Ue;for(const $ of v){E=E^this._getModuleGraphHashBigInt(this._getChunkGraphModule($),$,R)}ce.update(E.toString(16))};if(G.size===1)addModuleToHash(G.values().next().value);else if(G.size>1)addModulesToHash(G);for(const[v,E]of ae){ce.update(v);if(E instanceof Set){addModulesToHash(E)}else{addModuleToHash(E)}}ce.update(j);return ce.digest("hex")}))}getTreeRuntimeRequirements(v){const E=this._getChunkGraphChunk(v);return E.runtimeRequirementsInTree}static getChunkGraphForModule(v,E,R){const j=Ve.get(E);if(j)return j(v);const N=$.deprecate((v=>{const R=Qe.get(v);if(!R)throw new Error(E+": There was no ChunkGraph assigned to the Module for backward-compat (Use the new API)");return R}),E+": Use new ChunkGraph API",R);Ve.set(E,N);return N(v)}static setChunkGraphForModule(v,E){Qe.set(v,E)}static clearChunkGraphForModule(v){Qe.delete(v)}static getChunkGraphForChunk(v,E,R){const j=Ke.get(E);if(j)return j(v);const N=$.deprecate((v=>{const R=Je.get(v);if(!R)throw new Error(E+"There was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)");return R}),E+": Use new ChunkGraph API",R);Ke.set(E,N);return N(v)}static setChunkGraphForChunk(v,E){Je.set(v,E)}static clearChunkGraphForChunk(v){Je.delete(v)}}const Qe=new WeakMap;const Je=new WeakMap;const Ve=new Map;const Ke=new Map;v.exports=ChunkGraph},12487:function(v,E,R){"use strict";const $=R(73837);const j=R(87122);const{compareLocations:N,compareChunks:q,compareIterables:G}=R(58792);let ie=5e3;const getArray=v=>Array.from(v);const sortById=(v,E)=>{if(v.id{const R=v.module?v.module.identifier():"";const $=E.module?E.module.identifier():"";if(R<$)return-1;if(R>$)return 1;return N(v.loc,E.loc)};class ChunkGroup{constructor(v){if(typeof v==="string"){v={name:v}}else if(!v){v={name:undefined}}this.groupDebugId=ie++;this.options=v;this._children=new j(undefined,sortById);this._parents=new j(undefined,sortById);this._asyncEntrypoints=new j(undefined,sortById);this._blocks=new j;this.chunks=[];this.origins=[];this._modulePreOrderIndices=new Map;this._modulePostOrderIndices=new Map;this.index=undefined}addOptions(v){for(const E of Object.keys(v)){if(this.options[E]===undefined){this.options[E]=v[E]}else if(this.options[E]!==v[E]){if(E.endsWith("Order")){this.options[E]=Math.max(this.options[E],v[E])}else{throw new Error(`ChunkGroup.addOptions: No option merge strategy for ${E}`)}}}}get name(){return this.options.name}set name(v){this.options.name=v}get debugId(){return Array.from(this.chunks,(v=>v.debugId)).join("+")}get id(){return Array.from(this.chunks,(v=>v.id)).join("+")}unshiftChunk(v){const E=this.chunks.indexOf(v);if(E>0){this.chunks.splice(E,1);this.chunks.unshift(v)}else if(E<0){this.chunks.unshift(v);return true}return false}insertChunk(v,E){const R=this.chunks.indexOf(v);const $=this.chunks.indexOf(E);if($<0){throw new Error("before chunk not found")}if(R>=0&&R>$){this.chunks.splice(R,1);this.chunks.splice($,0,v)}else if(R<0){this.chunks.splice($,0,v);return true}return false}pushChunk(v){const E=this.chunks.indexOf(v);if(E>=0){return false}this.chunks.push(v);return true}replaceChunk(v,E){const R=this.chunks.indexOf(v);if(R<0)return false;const $=this.chunks.indexOf(E);if($<0){this.chunks[R]=E;return true}if($=0){this.chunks.splice(E,1);return true}return false}isInitial(){return false}addChild(v){const E=this._children.size;this._children.add(v);return E!==this._children.size}getChildren(){return this._children.getFromCache(getArray)}getNumberOfChildren(){return this._children.size}get childrenIterable(){return this._children}removeChild(v){if(!this._children.has(v)){return false}this._children.delete(v);v.removeParent(this);return true}addParent(v){if(!this._parents.has(v)){this._parents.add(v);return true}return false}getParents(){return this._parents.getFromCache(getArray)}getNumberOfParents(){return this._parents.size}hasParent(v){return this._parents.has(v)}get parentsIterable(){return this._parents}removeParent(v){if(this._parents.delete(v)){v.removeChild(this);return true}return false}addAsyncEntrypoint(v){const E=this._asyncEntrypoints.size;this._asyncEntrypoints.add(v);return E!==this._asyncEntrypoints.size}get asyncEntrypointsIterable(){return this._asyncEntrypoints}getBlocks(){return this._blocks.getFromCache(getArray)}getNumberOfBlocks(){return this._blocks.size}hasBlock(v){return this._blocks.has(v)}get blocksIterable(){return this._blocks}addBlock(v){if(!this._blocks.has(v)){this._blocks.add(v);return true}return false}addOrigin(v,E,R){this.origins.push({module:v,loc:E,request:R})}getFiles(){const v=new Set;for(const E of this.chunks){for(const R of E.files){v.add(R)}}return Array.from(v)}remove(){for(const v of this._parents){v._children.delete(this);for(const E of this._children){E.addParent(v);v.addChild(E)}}for(const v of this._children){v._parents.delete(this)}for(const v of this.chunks){v.removeGroup(this)}}sortItems(){this.origins.sort(sortOrigin)}compareTo(v,E){if(this.chunks.length>E.chunks.length)return-1;if(this.chunks.length{const $=R.order-v.order;if($!==0)return $;return v.group.compareTo(E,R.group)}));$[v]=j.map((v=>v.group))}return $}setModulePreOrderIndex(v,E){this._modulePreOrderIndices.set(v,E)}getModulePreOrderIndex(v){return this._modulePreOrderIndices.get(v)}setModulePostOrderIndex(v,E){this._modulePostOrderIndices.set(v,E)}getModulePostOrderIndex(v){return this._modulePostOrderIndices.get(v)}checkConstraints(){const v=this;for(const E of v._children){if(!E._parents.has(v)){throw new Error(`checkConstraints: child missing parent ${v.debugId} -> ${E.debugId}`)}}for(const E of v._parents){if(!E._children.has(v)){throw new Error(`checkConstraints: parent missing child ${E.debugId} <- ${v.debugId}`)}}}}ChunkGroup.prototype.getModuleIndex=$.deprecate(ChunkGroup.prototype.getModulePreOrderIndex,"ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex","DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX");ChunkGroup.prototype.getModuleIndex2=$.deprecate(ChunkGroup.prototype.getModulePostOrderIndex,"ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex","DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2");v.exports=ChunkGroup},54089:function(v,E,R){"use strict";const $=R(27154);class ChunkRenderError extends ${constructor(v,E,R){super();this.name="ChunkRenderError";this.error=R;this.message=R.message;this.details=R.stack;this.file=E;this.chunk=v}}v.exports=ChunkRenderError},61221:function(v,E,R){"use strict";const $=R(73837);const j=R(61374);const N=j((()=>R(36109)));class ChunkTemplate{constructor(v,E){this._outputOptions=v||{};this.hooks=Object.freeze({renderManifest:{tap:$.deprecate(((v,R)=>{E.hooks.renderManifest.tap(v,((v,E)=>{if(E.chunk.hasRuntime())return v;return R(v,E)}))}),"ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)","DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST")},modules:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderChunk.tap(v,((v,$)=>R(v,E.moduleTemplates.javascript,$)))}),"ChunkTemplate.hooks.modules is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)","DEP_WEBPACK_CHUNK_TEMPLATE_MODULES")},render:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderChunk.tap(v,((v,$)=>R(v,E.moduleTemplates.javascript,$)))}),"ChunkTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)","DEP_WEBPACK_CHUNK_TEMPLATE_RENDER")},renderWithEntry:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).render.tap(v,((v,E)=>{if(E.chunkGraph.getNumberOfEntryModules(E.chunk)===0||E.chunk.hasRuntime()){return v}return R(v,E.chunk)}))}),"ChunkTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)","DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_WITH_ENTRY")},hash:{tap:$.deprecate(((v,R)=>{E.hooks.fullHash.tap(v,R)}),"ChunkTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)","DEP_WEBPACK_CHUNK_TEMPLATE_HASH")},hashForChunk:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).chunkHash.tap(v,((v,E,$)=>{if(v.hasRuntime())return;R(E,v,$)}))}),"ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)","DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK")}})}}Object.defineProperty(ChunkTemplate.prototype,"outputOptions",{get:$.deprecate((function(){return this._outputOptions}),"ChunkTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)","DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS")});v.exports=ChunkTemplate},40135:function(v,E,R){"use strict";const $=R(78175);const{SyncBailHook:j}=R(44217);const N=R(73002);const q=R(89699);const{join:G}=R(47077);const ie=R(64102);const ae=q(undefined,(()=>{const{definitions:v}=R(13954);return{definitions:v,oneOf:[{$ref:"#/definitions/CleanOptions"}]}}),{name:"Clean Plugin",baseDataPath:"options"});const ce=10*1e3;const mergeAssets=(v,E)=>{for(const[R,$]of E){const E=v.get(R);if(!E||$>E)v.set(R,$)}};const getDiffToFs=(v,E,R,j)=>{const N=new Set;for(const[v]of R){N.add(v.replace(/(^|\/)[^/]*$/,""))}for(const v of N){N.add(v.replace(/(^|\/)[^/]*$/,""))}const q=new Set;$.forEachLimit(N,10,(($,j)=>{v.readdir(G(v,E,$),((v,E)=>{if(v){if(v.code==="ENOENT")return j();if(v.code==="ENOTDIR"){q.add($);return j()}return j(v)}for(const v of E){const E=v;const j=$?`${$}/${E}`:E;if(!N.has(j)&&!R.has(j)){q.add(j)}}j()}))}),(v=>{if(v)return j(v);j(null,q)}))};const getDiffToOldAssets=(v,E)=>{const R=new Set;const $=Date.now();for(const[j,N]of E){if(N>=$)continue;if(!v.has(j))R.add(j)}return R};const doStat=(v,E,R)=>{if("lstat"in v){v.lstat(E,R)}else{v.stat(E,R)}};const applyDiff=(v,E,R,$,j,N,q)=>{const log=v=>{if(R){$.info(v)}else{$.log(v)}};const ae=Array.from(j.keys(),(v=>({type:"check",filename:v,parent:undefined})));const ce=new Map;ie(ae,10,(({type:j,filename:q,parent:ie},ae,le)=>{const handleError=v=>{if(v.code==="ENOENT"){log(`${q} was removed during cleaning by something else`);handleParent();return le()}return le(v)};const handleParent=()=>{if(ie&&--ie.remaining===0)ae(ie.job)};const me=G(v,E,q);switch(j){case"check":if(N(q)){ce.set(q,0);log(`${q} will be kept`);return process.nextTick(le)}doStat(v,me,((E,R)=>{if(E)return handleError(E);if(!R.isDirectory()){ae({type:"unlink",filename:q,parent:ie});return le()}v.readdir(me,((v,E)=>{if(v)return handleError(v);const R={type:"rmdir",filename:q,parent:ie};if(E.length===0){ae(R)}else{const v={remaining:E.length,job:R};for(const R of E){const E=R;if(E.startsWith(".")){log(`${q} will be kept (dot-files will never be removed)`);continue}ae({type:"check",filename:`${q}/${E}`,parent:v})}}return le()}))}));break;case"rmdir":log(`${q} will be removed`);if(R){handleParent();return process.nextTick(le)}if(!v.rmdir){$.warn(`${q} can't be removed because output file system doesn't support removing directories (rmdir)`);return process.nextTick(le)}v.rmdir(me,(v=>{if(v)return handleError(v);handleParent();le()}));break;case"unlink":log(`${q} will be removed`);if(R){handleParent();return process.nextTick(le)}if(!v.unlink){$.warn(`${q} can't be removed because output file system doesn't support removing files (rmdir)`);return process.nextTick(le)}v.unlink(me,(v=>{if(v)return handleError(v);handleParent();le()}));break}}),(v=>{if(v)return q(v);q(undefined,ce)}))};const le=new WeakMap;class CleanPlugin{static getCompilationHooks(v){if(!(v instanceof N)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=le.get(v);if(E===undefined){E={keep:new j(["ignore"])};le.set(v,E)}return E}constructor(v={}){ae(v);this.options={dry:false,...v}}apply(v){const{dry:E,keep:R}=this.options;const $=typeof R==="function"?R:typeof R==="string"?v=>v.startsWith(R):typeof R==="object"&&R.test?v=>R.test(v):()=>false;let j;v.hooks.emit.tapAsync({name:"CleanPlugin",stage:100},((R,N)=>{const q=CleanPlugin.getCompilationHooks(R);const G=R.getLogger("webpack.CleanPlugin");const ie=v.outputFileSystem;if(!ie.readdir){return N(new Error("CleanPlugin: Output filesystem doesn't support listing directories (readdir)"))}const ae=new Map;const le=Date.now();for(const v of Object.keys(R.assets)){if(/^[A-Za-z]:\\|^\/|^\\\\/.test(v))continue;let E;let $=v.replace(/\\/g,"/");do{E=$;$=E.replace(/(^|\/)(?!\.\.)[^/]+\/\.\.\//g,"$1")}while($!==E);if(E.startsWith("../"))continue;const j=R.assetsInfo.get(v);if(j&&j.hotModuleReplacement){ae.set(E,le+ce)}else{ae.set(E,0)}}const me=R.getPath(v.outputPath,{});const isKept=v=>{const E=q.keep.call(v);if(E!==undefined)return E;return $(v)};const diffCallback=(v,R)=>{if(v){j=undefined;N(v);return}applyDiff(ie,me,E,G,R,isKept,((v,E)=>{if(v){j=undefined}else{if(j)mergeAssets(ae,j);j=ae;if(E)mergeAssets(j,E)}N(v)}))};if(j){diffCallback(null,getDiffToOldAssets(ae,j))}else{getDiffToFs(ie,me,ae,diffCallback)}}))}}v.exports=CleanPlugin},52743:function(v,E,R){"use strict";const $=R(27154);class CodeGenerationError extends ${constructor(v,E){super();this.name="CodeGenerationError";this.error=E;this.message=E.message;this.details=E.stack;this.module=v}}v.exports=CodeGenerationError},18894:function(v,E,R){"use strict";const{provide:$}=R(94970);const{first:j}=R(73268);const N=R(85205);const{runtimeToString:q,RuntimeSpecMap:G}=R(47462);class CodeGenerationResults{constructor(v="md4"){this.map=new Map;this._hashFunction=v}get(v,E){const R=this.map.get(v);if(R===undefined){throw new Error(`No code generation entry for ${v.identifier()} (existing entries: ${Array.from(this.map.keys(),(v=>v.identifier())).join(", ")})`)}if(E===undefined){if(R.size>1){const E=new Set(R.values());if(E.size!==1){throw new Error(`No unique code generation entry for unspecified runtime for ${v.identifier()} (existing runtimes: ${Array.from(R.keys(),(v=>q(v))).join(", ")}).\nCaller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").`)}return j(E)}return R.values().next().value}const $=R.get(E);if($===undefined){throw new Error(`No code generation entry for runtime ${q(E)} for ${v.identifier()} (existing runtimes: ${Array.from(R.keys(),(v=>q(v))).join(", ")})`)}return $}has(v,E){const R=this.map.get(v);if(R===undefined){return false}if(E!==undefined){return R.has(E)}else if(R.size>1){const v=new Set(R.values());return v.size===1}else{return R.size===1}}getSource(v,E,R){return this.get(v,E).sources.get(R)}getRuntimeRequirements(v,E){return this.get(v,E).runtimeRequirements}getData(v,E,R){const $=this.get(v,E).data;return $===undefined?undefined:$.get(R)}getHash(v,E){const R=this.get(v,E);if(R.hash!==undefined)return R.hash;const $=N(this._hashFunction);for(const[v,E]of R.sources){$.update(v);E.updateHash($)}if(R.runtimeRequirements){for(const v of R.runtimeRequirements)$.update(v)}return R.hash=$.digest("hex")}add(v,E,R){const j=$(this.map,v,(()=>new G));j.set(E,R)}}v.exports=CodeGenerationResults},54437:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class CommentCompilationWarning extends ${constructor(v,E){super(v);this.name="CommentCompilationWarning";this.loc=E}}j(CommentCompilationWarning,"webpack/lib/CommentCompilationWarning");v.exports=CommentCompilationWarning},39220:function(v,E,R){"use strict";const $=R(14367);const j=Symbol("nested __webpack_require__");class CompatibilityPlugin{apply(v){v.hooks.compilation.tap("CompatibilityPlugin",((v,{normalModuleFactory:E})=>{v.dependencyTemplates.set($,new $.Template);E.hooks.parser.for("javascript/auto").tap("CompatibilityPlugin",((v,E)=>{if(E.browserify!==undefined&&!E.browserify)return;v.hooks.call.for("require").tap("CompatibilityPlugin",(E=>{if(E.arguments.length!==2)return;const R=v.evaluateExpression(E.arguments[1]);if(!R.isBoolean())return;if(R.asBool()!==true)return;const j=new $("require",E.callee.range);j.loc=E.loc;if(v.state.current.dependencies.length>0){const E=v.state.current.dependencies[v.state.current.dependencies.length-1];if(E.critical&&E.options&&E.options.request==="."&&E.userRequest==="."&&E.options.recursive)v.state.current.dependencies.pop()}v.state.module.addPresentationalDependency(j);return true}))}));const handler=v=>{v.hooks.preStatement.tap("CompatibilityPlugin",(E=>{if(E.type==="FunctionDeclaration"&&E.id&&E.id.name==="__webpack_require__"){const R=`__nested_webpack_require_${E.range[0]}__`;v.tagVariable(E.id.name,j,{name:R,declaration:{updated:false,loc:E.id.loc,range:E.id.range}});return true}}));v.hooks.pattern.for("__webpack_require__").tap("CompatibilityPlugin",(E=>{const R=`__nested_webpack_require_${E.range[0]}__`;v.tagVariable(E.name,j,{name:R,declaration:{updated:false,loc:E.loc,range:E.range}});return true}));v.hooks.expression.for(j).tap("CompatibilityPlugin",(E=>{const{name:R,declaration:j}=v.currentTagData;if(!j.updated){const E=new $(R,j.range);E.loc=j.loc;v.state.module.addPresentationalDependency(E);j.updated=true}const N=new $(R,E.range);N.loc=E.loc;v.state.module.addPresentationalDependency(N);return true}));v.hooks.program.tap("CompatibilityPlugin",((E,R)=>{if(R.length===0)return;const j=R[0];if(j.type==="Line"&&j.range[0]===0){if(v.state.source.slice(0,2).toString()!=="#!")return;const E=new $("//",0);E.loc=j.loc;v.state.module.addPresentationalDependency(E)}}))};E.hooks.parser.for("javascript/auto").tap("CompatibilityPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("CompatibilityPlugin",handler);E.hooks.parser.for("javascript/esm").tap("CompatibilityPlugin",handler)}))}}v.exports=CompatibilityPlugin},73002:function(v,E,R){"use strict";const $=R(78175);const{HookMap:j,SyncHook:N,SyncBailHook:q,SyncWaterfallHook:G,AsyncSeriesHook:ie,AsyncSeriesBailHook:ae,AsyncParallelHook:ce}=R(44217);const le=R(73837);const{CachedSource:me}=R(51255);const{MultiItemCache:_e}=R(36035);const Ie=R(84891);const Me=R(75449);const Oe=R(12487);const Te=R(54089);const Ne=R(61221);const Be=R(52743);const Le=R(18894);const qe=R(87056);const Ue=R(97723);const Ge=R(33546);const He=R(8821);const We=R(67469);const{connectChunkGroupAndChunk:Qe,connectChunkGroupParentAndChild:Je}=R(37855);const{makeWebpackError:Ve,tryRunOrWebpackError:Ke}=R(35230);const Xe=R(87797);const Ye=R(53840);const Ze=R(17799);const et=R(76218);const tt=R(13487);const nt=R(16939);const st=R(16554);const rt=R(4833);const ot=R(14273);const it=R(73731);const at=R(88367);const ct=R(39201);const lt=R(30514);const ut=R(47158);const pt=R(27154);const dt=R(21078);const ft=R(55774);const{Logger:ht,LogType:mt}=R(33594);const gt=R(70900);const yt=R(67793);const{equals:bt}=R(28087);const xt=R(51491);const kt=R(96522);const{provide:vt}=R(94970);const wt=R(20427);const{cachedCleverMerge:Ct}=R(22093);const{compareLocations:At,concatComparators:Et,compareSelect:_t,compareIds:St,compareStringsNumeric:It,compareModulesByIdentifier:Mt}=R(58792);const Pt=R(85205);const{arrayToSetDeprecation:Dt,soonFrozenObjectDeprecation:Ot,createFakeHook:Rt}=R(99321);const $t=R(64102);const{getRuntimeKey:Tt}=R(47462);const{isSourceEqual:Ft}=R(22307);const jt=Object.freeze({});const Nt="esm";const Bt=le.deprecate((v=>R(89417).getCompilationHooks(v).loader),"Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader","DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK");const defineRemovedModuleTemplates=v=>{Object.defineProperties(v,{asset:{enumerable:false,configurable:false,get:()=>{throw new pt("Compilation.moduleTemplates.asset has been removed")}},webassembly:{enumerable:false,configurable:false,get:()=>{throw new pt("Compilation.moduleTemplates.webassembly has been removed")}}});v=undefined};const Lt=_t((v=>v.id),St);const qt=Et(_t((v=>v.name),St),_t((v=>v.fullHash),St));const zt=_t((v=>`${v.message}`),It);const Ut=_t((v=>v.module&&v.module.identifier()||""),It);const Gt=_t((v=>v.loc),At);const Ht=Et(Ut,Gt,zt);const Wt=new WeakMap;const Qt=new WeakMap;class Compilation{constructor(v,E){this._backCompat=v._backCompat;const getNormalModuleLoader=()=>Bt(this);const R=new ie(["assets"]);let $=new Set;const popNewAssets=v=>{let E=undefined;for(const R of Object.keys(v)){if($.has(R))continue;if(E===undefined){E=Object.create(null)}E[R]=v[R];$.add(R)}return E};R.intercept({name:"Compilation",call:()=>{$=new Set(Object.keys(this.assets))},register:v=>{const{type:E,name:R}=v;const{fn:$,additionalAssets:j,...N}=v;const q=j===true?$:j;const G=q?new WeakSet:undefined;switch(E){case"sync":if(q){this.hooks.processAdditionalAssets.tap(R,(v=>{if(G.has(this.assets))q(v)}))}return{...N,type:"async",fn:(v,E)=>{try{$(v)}catch(v){return E(v)}if(G!==undefined)G.add(this.assets);const R=popNewAssets(v);if(R!==undefined){this.hooks.processAdditionalAssets.callAsync(R,E);return}E()}};case"async":if(q){this.hooks.processAdditionalAssets.tapAsync(R,((v,E)=>{if(G.has(this.assets))return q(v,E);E()}))}return{...N,fn:(v,E)=>{$(v,(R=>{if(R)return E(R);if(G!==undefined)G.add(this.assets);const $=popNewAssets(v);if($!==undefined){this.hooks.processAdditionalAssets.callAsync($,E);return}E()}))}};case"promise":if(q){this.hooks.processAdditionalAssets.tapPromise(R,(v=>{if(G.has(this.assets))return q(v);return Promise.resolve()}))}return{...N,fn:v=>{const E=$(v);if(!E||!E.then)return E;return E.then((()=>{if(G!==undefined)G.add(this.assets);const E=popNewAssets(v);if(E!==undefined){return this.hooks.processAdditionalAssets.promise(E)}}))}}}}});const me=new N(["assets"]);const createProcessAssetsHook=(v,E,$,j)=>{if(!this._backCompat&&j)return undefined;const errorMessage=E=>`Can't automatically convert plugin using Compilation.hooks.${v} to Compilation.hooks.processAssets because ${E}.\nBREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`;const getOptions=v=>{if(typeof v==="string")v={name:v};if(v.stage){throw new Error(errorMessage("it's using the 'stage' option"))}return{...v,stage:E}};return Rt({name:v,intercept(v){throw new Error(errorMessage("it's using 'intercept'"))},tap:(v,E)=>{R.tap(getOptions(v),(()=>E(...$())))},tapAsync:(v,E)=>{R.tapAsync(getOptions(v),((v,R)=>E(...$(),R)))},tapPromise:(v,E)=>{R.tapPromise(getOptions(v),(()=>E(...$())))}},`${v} is deprecated (use Compilation.hooks.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)`,j)};this.hooks=Object.freeze({buildModule:new N(["module"]),rebuildModule:new N(["module"]),failedModule:new N(["module","error"]),succeedModule:new N(["module"]),stillValidModule:new N(["module"]),addEntry:new N(["entry","options"]),failedEntry:new N(["entry","options","error"]),succeedEntry:new N(["entry","options","module"]),dependencyReferencedExports:new G(["referencedExports","dependency","runtime"]),executeModule:new N(["options","context"]),prepareModuleExecution:new ce(["options","context"]),finishModules:new ie(["modules"]),finishRebuildingModule:new ie(["module"]),unseal:new N([]),seal:new N([]),beforeChunks:new N([]),afterChunks:new N(["chunks"]),optimizeDependencies:new q(["modules"]),afterOptimizeDependencies:new N(["modules"]),optimize:new N([]),optimizeModules:new q(["modules"]),afterOptimizeModules:new N(["modules"]),optimizeChunks:new q(["chunks","chunkGroups"]),afterOptimizeChunks:new N(["chunks","chunkGroups"]),optimizeTree:new ie(["chunks","modules"]),afterOptimizeTree:new N(["chunks","modules"]),optimizeChunkModules:new ae(["chunks","modules"]),afterOptimizeChunkModules:new N(["chunks","modules"]),shouldRecord:new q([]),additionalChunkRuntimeRequirements:new N(["chunk","runtimeRequirements","context"]),runtimeRequirementInChunk:new j((()=>new q(["chunk","runtimeRequirements","context"]))),additionalModuleRuntimeRequirements:new N(["module","runtimeRequirements","context"]),runtimeRequirementInModule:new j((()=>new q(["module","runtimeRequirements","context"]))),additionalTreeRuntimeRequirements:new N(["chunk","runtimeRequirements","context"]),runtimeRequirementInTree:new j((()=>new q(["chunk","runtimeRequirements","context"]))),runtimeModule:new N(["module","chunk"]),reviveModules:new N(["modules","records"]),beforeModuleIds:new N(["modules"]),moduleIds:new N(["modules"]),optimizeModuleIds:new N(["modules"]),afterOptimizeModuleIds:new N(["modules"]),reviveChunks:new N(["chunks","records"]),beforeChunkIds:new N(["chunks"]),chunkIds:new N(["chunks"]),optimizeChunkIds:new N(["chunks"]),afterOptimizeChunkIds:new N(["chunks"]),recordModules:new N(["modules","records"]),recordChunks:new N(["chunks","records"]),optimizeCodeGeneration:new N(["modules"]),beforeModuleHash:new N([]),afterModuleHash:new N([]),beforeCodeGeneration:new N([]),afterCodeGeneration:new N([]),beforeRuntimeRequirements:new N([]),afterRuntimeRequirements:new N([]),beforeHash:new N([]),contentHash:new N(["chunk"]),afterHash:new N([]),recordHash:new N(["records"]),record:new N(["compilation","records"]),beforeModuleAssets:new N([]),shouldGenerateChunkAssets:new q([]),beforeChunkAssets:new N([]),additionalChunkAssets:createProcessAssetsHook("additionalChunkAssets",Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,(()=>[this.chunks]),"DEP_WEBPACK_COMPILATION_ADDITIONAL_CHUNK_ASSETS"),additionalAssets:createProcessAssetsHook("additionalAssets",Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,(()=>[])),optimizeChunkAssets:createProcessAssetsHook("optimizeChunkAssets",Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE,(()=>[this.chunks]),"DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS"),afterOptimizeChunkAssets:createProcessAssetsHook("afterOptimizeChunkAssets",Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE+1,(()=>[this.chunks]),"DEP_WEBPACK_COMPILATION_AFTER_OPTIMIZE_CHUNK_ASSETS"),optimizeAssets:R,afterOptimizeAssets:me,processAssets:R,afterProcessAssets:me,processAdditionalAssets:new ie(["assets"]),needAdditionalSeal:new q([]),afterSeal:new ie([]),renderManifest:new G(["result","options"]),fullHash:new N(["hash"]),chunkHash:new N(["chunk","chunkHash","ChunkHashContext"]),moduleAsset:new N(["module","filename"]),chunkAsset:new N(["chunk","filename"]),assetPath:new G(["path","options","assetInfo"]),needAdditionalPass:new q([]),childCompiler:new N(["childCompiler","compilerName","compilerIndex"]),log:new q(["origin","logEntry"]),processWarnings:new G(["warnings"]),processErrors:new G(["errors"]),statsPreset:new j((()=>new N(["options","context"]))),statsNormalize:new N(["options","context"]),statsFactory:new N(["statsFactory","options"]),statsPrinter:new N(["statsPrinter","options"]),get normalModuleLoader(){return getNormalModuleLoader()}});this.name=undefined;this.startTime=undefined;this.endTime=undefined;this.compiler=v;this.resolverFactory=v.resolverFactory;this.inputFileSystem=v.inputFileSystem;this.fileSystemInfo=new We(this.inputFileSystem,{managedPaths:v.managedPaths,immutablePaths:v.immutablePaths,logger:this.getLogger("webpack.FileSystemInfo"),hashFunction:v.options.output.hashFunction});if(v.fileTimestamps){this.fileSystemInfo.addFileTimestamps(v.fileTimestamps,true)}if(v.contextTimestamps){this.fileSystemInfo.addContextTimestamps(v.contextTimestamps,true)}this.valueCacheVersions=new Map;this.requestShortener=v.requestShortener;this.compilerPath=v.compilerPath;this.logger=this.getLogger("webpack.Compilation");const _e=v.options;this.options=_e;this.outputOptions=_e&&_e.output;this.bail=_e&&_e.bail||false;this.profile=_e&&_e.profile||false;this.params=E;this.mainTemplate=new Xe(this.outputOptions,this);this.chunkTemplate=new Ne(this.outputOptions,this);this.runtimeTemplate=new lt(this,this.outputOptions,this.requestShortener);this.moduleTemplates={javascript:new at(this.runtimeTemplate,this)};defineRemovedModuleTemplates(this.moduleTemplates);this.moduleMemCaches=undefined;this.moduleMemCaches2=undefined;this.moduleGraph=new tt;this.chunkGraph=undefined;this.codeGenerationResults=undefined;this.processDependenciesQueue=new xt({name:"processDependencies",parallelism:_e.parallelism||100,processor:this._processModuleDependencies.bind(this)});this.addModuleQueue=new xt({name:"addModule",parent:this.processDependenciesQueue,getKey:v=>v.identifier(),processor:this._addModule.bind(this)});this.factorizeQueue=new xt({name:"factorize",parent:this.addModuleQueue,processor:this._factorizeModule.bind(this)});this.buildQueue=new xt({name:"build",parent:this.factorizeQueue,processor:this._buildModule.bind(this)});this.rebuildQueue=new xt({name:"rebuild",parallelism:_e.parallelism||100,processor:this._rebuildModule.bind(this)});this.creatingModuleDuringBuild=new WeakMap;this.entries=new Map;this.globalEntry={dependencies:[],includeDependencies:[],options:{name:undefined}};this.entrypoints=new Map;this.asyncEntrypoints=[];this.chunks=new Set;this.chunkGroups=[];this.namedChunkGroups=new Map;this.namedChunks=new Map;this.modules=new Set;if(this._backCompat){Dt(this.chunks,"Compilation.chunks");Dt(this.modules,"Compilation.modules")}this._modules=new Map;this.records=null;this.additionalChunkAssets=[];this.assets={};this.assetsInfo=new Map;this._assetsRelatedIn=new Map;this.errors=[];this.warnings=[];this.children=[];this.logging=new Map;this.dependencyFactories=new Map;this.dependencyTemplates=new Ue(this.outputOptions.hashFunction);this.childrenCounters={};this.usedChunkIds=null;this.usedModuleIds=null;this.needAdditionalPass=false;this._restoredUnsafeCacheModuleEntries=new Set;this._restoredUnsafeCacheEntries=new Map;this.builtModules=new WeakSet;this.codeGeneratedModules=new WeakSet;this.buildTimeExecutedModules=new WeakSet;this._rebuildingModules=new Map;this.emittedAssets=new Set;this.comparedForEmitAssets=new Set;this.fileDependencies=new kt;this.contextDependencies=new kt;this.missingDependencies=new kt;this.buildDependencies=new kt;this.compilationDependencies={add:le.deprecate((v=>this.fileDependencies.add(v)),"Compilation.compilationDependencies is deprecated (used Compilation.fileDependencies instead)","DEP_WEBPACK_COMPILATION_COMPILATION_DEPENDENCIES")};this._modulesCache=this.getCache("Compilation/modules");this._assetsCache=this.getCache("Compilation/assets");this._codeGenerationCache=this.getCache("Compilation/codeGeneration");const Ie=_e.module.unsafeCache;this._unsafeCache=!!Ie;this._unsafeCachePredicate=typeof Ie==="function"?Ie:()=>true}getStats(){return new ut(this)}createStatsOptions(v,E={}){if(typeof v==="boolean"||typeof v==="string"){v={preset:v}}if(typeof v==="object"&&v!==null){const R={};for(const E in v){R[E]=v[E]}if(R.preset!==undefined){this.hooks.statsPreset.for(R.preset).call(R,E)}this.hooks.statsNormalize.call(R,E);return R}else{const v={};this.hooks.statsNormalize.call(v,E);return v}}createStatsFactory(v){const E=new gt;this.hooks.statsFactory.call(E,v);return E}createStatsPrinter(v){const E=new yt;this.hooks.statsPrinter.call(E,v);return E}getCache(v){return this.compiler.getCache(v)}getLogger(v){if(!v){throw new TypeError("Compilation.getLogger(name) called without a name")}let E;return new ht(((R,$)=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compilation.getLogger(name) called with a function not returning a name")}}let j;switch(R){case mt.warn:case mt.error:case mt.trace:j=He.cutOffLoaderExecution(new Error("Trace").stack).split("\n").slice(3);break}const N={time:Date.now(),type:R,args:$,trace:j};if(this.hooks.log.call(v,N)===undefined){if(N.type===mt.profileEnd){if(typeof console.profileEnd==="function"){console.profileEnd(`[${v}] ${N.args[0]}`)}}if(E===undefined){E=this.logging.get(v);if(E===undefined){E=[];this.logging.set(v,E)}}E.push(N);if(N.type===mt.profile){if(typeof console.profile==="function"){console.profile(`[${v}] ${N.args[0]}`)}}}}),(E=>{if(typeof v==="function"){if(typeof E==="function"){return this.getLogger((()=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compilation.getLogger(name) called with a function not returning a name")}}if(typeof E==="function"){E=E();if(!E){throw new TypeError("Logger.getChildLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}else{return this.getLogger((()=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compilation.getLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}}else{if(typeof E==="function"){return this.getLogger((()=>{if(typeof E==="function"){E=E();if(!E){throw new TypeError("Logger.getChildLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}else{return this.getLogger(`${v}/${E}`)}}}))}addModule(v,E){this.addModuleQueue.add(v,E)}_addModule(v,E){const R=v.identifier();const $=this._modules.get(R);if($){return E(null,$)}const j=this.profile?this.moduleGraph.getProfile(v):undefined;if(j!==undefined){j.markRestoringStart()}this._modulesCache.get(R,null,(($,N)=>{if($)return E(new ot(v,$));if(j!==undefined){j.markRestoringEnd();j.markIntegrationStart()}if(N){N.updateCacheModule(v);v=N}this._modules.set(R,v);this.modules.add(v);if(this._backCompat)tt.setModuleGraphForModule(v,this.moduleGraph);if(j!==undefined){j.markIntegrationEnd()}E(null,v)}))}getModule(v){const E=v.identifier();return this._modules.get(E)}findModule(v){return this._modules.get(v)}buildModule(v,E){this.buildQueue.add(v,E)}_buildModule(v,E){const R=this.profile?this.moduleGraph.getProfile(v):undefined;if(R!==undefined){R.markBuildingStart()}v.needBuild({compilation:this,fileSystemInfo:this.fileSystemInfo,valueCacheVersions:this.valueCacheVersions},(($,j)=>{if($)return E($);if(!j){if(R!==undefined){R.markBuildingEnd()}this.hooks.stillValidModule.call(v);return E()}this.hooks.buildModule.call(v);this.builtModules.add(v);v.build(this.options,this,this.resolverFactory.get("normal",v.resolveOptions),this.inputFileSystem,($=>{if(R!==undefined){R.markBuildingEnd()}if($){this.hooks.failedModule.call(v,$);return E($)}if(R!==undefined){R.markStoringStart()}this._modulesCache.store(v.identifier(),null,v,($=>{if(R!==undefined){R.markStoringEnd()}if($){this.hooks.failedModule.call(v,$);return E(new it(v,$))}this.hooks.succeedModule.call(v);return E()}))}))}))}processModuleDependencies(v,E){this.processDependenciesQueue.add(v,E)}processModuleDependenciesNonRecursive(v){const processDependenciesBlock=E=>{if(E.dependencies){let R=0;for(const $ of E.dependencies){this.moduleGraph.setParents($,E,v,R++)}}if(E.blocks){for(const v of E.blocks)processDependenciesBlock(v)}};processDependenciesBlock(v)}_processModuleDependencies(v,E){const R=[];let $;let j;let N;let q;let G;let ie;let ae;let ce;let le=1;let me=1;const onDependenciesSorted=v=>{if(v)return E(v);if(R.length===0&&me===1){return E()}this.processDependenciesQueue.increaseParallelism();for(const v of R){me++;this.handleModuleCreation(v,(v=>{if(v&&this.bail){if(me<=0)return;me=-1;v.stack=v.stack;onTransitiveTasksFinished(v);return}if(--me===0)onTransitiveTasksFinished()}))}if(--me===0)onTransitiveTasksFinished()};const onTransitiveTasksFinished=v=>{if(v)return E(v);this.processDependenciesQueue.decreaseParallelism();return E()};const processDependency=(E,R)=>{this.moduleGraph.setParents(E,$,v,R);if(this._unsafeCache){try{const R=Wt.get(E);if(R===null)return;if(R!==undefined){if(this._restoredUnsafeCacheModuleEntries.has(R)){this._handleExistingModuleFromUnsafeCache(v,E,R);return}const $=R.identifier();const j=this._restoredUnsafeCacheEntries.get($);if(j!==undefined){Wt.set(E,j);this._handleExistingModuleFromUnsafeCache(v,E,j);return}le++;this._modulesCache.get($,null,((j,N)=>{if(j){if(le<=0)return;le=-1;onDependenciesSorted(j);return}try{if(!this._restoredUnsafeCacheEntries.has($)){const j=Qt.get(N);if(j===undefined){processDependencyForResolving(E);if(--le===0)onDependenciesSorted();return}if(N!==R){Wt.set(E,N)}N.restoreFromUnsafeCache(j,this.params.normalModuleFactory,this.params);this._restoredUnsafeCacheEntries.set($,N);this._restoredUnsafeCacheModuleEntries.add(N);if(!this.modules.has(N)){me++;this._handleNewModuleFromUnsafeCache(v,E,N,(v=>{if(v){if(me<=0)return;me=-1;onTransitiveTasksFinished(v)}if(--me===0)return onTransitiveTasksFinished()}));if(--le===0)onDependenciesSorted();return}}if(R!==N){Wt.set(E,N)}this._handleExistingModuleFromUnsafeCache(v,E,N)}catch(j){if(le<=0)return;le=-1;onDependenciesSorted(j);return}if(--le===0)onDependenciesSorted()}));return}}catch(v){console.error(v)}}processDependencyForResolving(E)};const processDependencyForResolving=E=>{const $=E.getResourceIdentifier();if($!==undefined&&$!==null){const le=E.category;const me=E.constructor;if(N===me){if(ie===le&&ae===$){ce.push(E);return}}else{const v=this.dependencyFactories.get(me);if(v===undefined){throw new Error(`No module factory available for dependency type: ${me.name}`)}if(q===v){N=me;if(ie===le&&ae===$){ce.push(E);return}}else{if(q!==undefined){if(j===undefined)j=new Map;j.set(q,G);G=j.get(v);if(G===undefined){G=new Map}}else{G=new Map}N=me;q=v}}const _e=le===Nt?$:`${le}${$}`;let Ie=G.get(_e);if(Ie===undefined){G.set(_e,Ie=[]);R.push({factory:q,dependencies:Ie,context:E.getContext(),originModule:v})}Ie.push(E);ie=le;ae=$;ce=Ie}};try{const E=[v];do{const v=E.pop();if(v.dependencies){$=v;let E=0;for(const R of v.dependencies)processDependency(R,E++)}if(v.blocks){for(const R of v.blocks)E.push(R)}}while(E.length!==0)}catch(v){return E(v)}if(--le===0)onDependenciesSorted()}_handleNewModuleFromUnsafeCache(v,E,R,$){const j=this.moduleGraph;j.setResolvedModule(v,E,R);j.setIssuerIfUnset(R,v!==undefined?v:null);this._modules.set(R.identifier(),R);this.modules.add(R);if(this._backCompat)tt.setModuleGraphForModule(R,this.moduleGraph);this._handleModuleBuildAndDependencies(v,R,true,$)}_handleExistingModuleFromUnsafeCache(v,E,R){const $=this.moduleGraph;$.setResolvedModule(v,E,R)}handleModuleCreation({factory:v,dependencies:E,originModule:R,contextInfo:$,context:j,recursive:N=true,connectOrigin:q=N},G){const ie=this.moduleGraph;const ae=this.profile?new rt:undefined;this.factorizeModule({currentProfile:ae,factory:v,dependencies:E,factoryResult:true,originModule:R,contextInfo:$,context:j},((v,$)=>{const applyFactoryResultDependencies=()=>{const{fileDependencies:v,contextDependencies:E,missingDependencies:R}=$;if(v){this.fileDependencies.addAll(v)}if(E){this.contextDependencies.addAll(E)}if(R){this.missingDependencies.addAll(R)}};if(v){if($)applyFactoryResultDependencies();if(E.every((v=>v.optional))){this.warnings.push(v);return G()}else{this.errors.push(v);return G(v)}}const j=$.module;if(!j){applyFactoryResultDependencies();return G()}if(ae!==undefined){ie.setProfile(j,ae)}this.addModule(j,((v,ce)=>{if(v){applyFactoryResultDependencies();if(!v.module){v.module=ce}this.errors.push(v);return G(v)}if(this._unsafeCache&&$.cacheable!==false&&ce.restoreFromUnsafeCache&&this._unsafeCachePredicate(ce)){const v=ce;for(let $=0;${if(j!==undefined){j.delete(E)}if(v){if(!v.module){v.module=E}this.errors.push(v);return $(v)}if(!R){this.processModuleDependenciesNonRecursive(E);$(null,E);return}if(this.processDependenciesQueue.isProcessing(E)){return $()}this.processModuleDependencies(E,(v=>{if(v){return $(v)}$(null,E)}))}))}_factorizeModule({currentProfile:v,factory:E,dependencies:R,originModule:$,factoryResult:j,contextInfo:N,context:q},G){if(v!==undefined){v.markFactoryStart()}E.create({contextInfo:{issuer:$?$.nameForCondition():"",issuerLayer:$?$.layer:null,compiler:this.compiler.name,...N},resolveOptions:$?$.resolveOptions:undefined,context:q?q:$?$.context:this.compiler.context,dependencies:R},((E,N)=>{if(N){if(N.module===undefined&&N instanceof Ye){N={module:N}}if(!j){const{fileDependencies:v,contextDependencies:E,missingDependencies:R}=N;if(v){this.fileDependencies.addAll(v)}if(E){this.contextDependencies.addAll(E)}if(R){this.missingDependencies.addAll(R)}}}if(E){const v=new st($,E,R.map((v=>v.loc)).filter(Boolean)[0]);return G(v,j?N:undefined)}if(!N){return G()}if(v!==undefined){v.markFactoryEnd()}G(null,j?N:N.module)}))}addModuleChain(v,E,R){return this.addModuleTree({context:v,dependency:E},R)}addModuleTree({context:v,dependency:E,contextInfo:R},$){if(typeof E!=="object"||E===null||!E.constructor){return $(new pt("Parameter 'dependency' must be a Dependency"))}const j=E.constructor;const N=this.dependencyFactories.get(j);if(!N){return $(new pt(`No dependency factory available for this dependency type: ${E.constructor.name}`))}this.handleModuleCreation({factory:N,dependencies:[E],originModule:null,contextInfo:R,context:v},((v,E)=>{if(v&&this.bail){$(v);this.buildQueue.stop();this.rebuildQueue.stop();this.processDependenciesQueue.stop();this.factorizeQueue.stop()}else if(!v&&E){$(null,E)}else{$()}}))}addEntry(v,E,R,$){const j=typeof R==="object"?R:{name:R};this._addEntryItem(v,E,"dependencies",j,$)}addInclude(v,E,R,$){this._addEntryItem(v,E,"includeDependencies",R,$)}_addEntryItem(v,E,R,$,j){const{name:N}=$;let q=N!==undefined?this.entries.get(N):this.globalEntry;if(q===undefined){q={dependencies:[],includeDependencies:[],options:{name:undefined,...$}};q[R].push(E);this.entries.set(N,q)}else{q[R].push(E);for(const v of Object.keys($)){if($[v]===undefined)continue;if(q.options[v]===$[v])continue;if(Array.isArray(q.options[v])&&Array.isArray($[v])&&bt(q.options[v],$[v])){continue}if(q.options[v]===undefined){q.options[v]=$[v]}else{return j(new pt(`Conflicting entry option ${v} = ${q.options[v]} vs ${$[v]}`))}}}this.hooks.addEntry.call(E,$);this.addModuleTree({context:v,dependency:E,contextInfo:q.options.layer?{issuerLayer:q.options.layer}:undefined},((v,R)=>{if(v){this.hooks.failedEntry.call(E,$,v);return j(v)}this.hooks.succeedEntry.call(E,$,R);return j(null,R)}))}rebuildModule(v,E){this.rebuildQueue.add(v,E)}_rebuildModule(v,E){this.hooks.rebuildModule.call(v);const R=v.dependencies.slice();const $=v.blocks.slice();v.invalidateBuild();this.buildQueue.invalidate(v);this.buildModule(v,(j=>{if(j){return this.hooks.finishRebuildingModule.callAsync(v,(v=>{if(v){E(Ve(v,"Compilation.hooks.finishRebuildingModule"));return}E(j)}))}this.processDependenciesQueue.invalidate(v);this.moduleGraph.unfreeze();this.processModuleDependencies(v,(j=>{if(j)return E(j);this.removeReasonsOfDependencyBlock(v,{dependencies:R,blocks:$});this.hooks.finishRebuildingModule.callAsync(v,(R=>{if(R){E(Ve(R,"Compilation.hooks.finishRebuildingModule"));return}E(null,v)}))}))}))}_computeAffectedModules(v){const E=this.compiler.moduleMemCaches;if(!E)return;if(!this.moduleMemCaches){this.moduleMemCaches=new Map;this.moduleGraph.setModuleMemCaches(this.moduleMemCaches)}const{moduleGraph:R,moduleMemCaches:$}=this;const j=new Set;const N=new Set;let q=0;let G=0;let ie=0;let ae=0;let ce=0;const computeReferences=v=>{let E=undefined;for(const $ of R.getOutgoingConnections(v)){const v=$.dependency;const R=$.module;if(!v||!R||Wt.has(v))continue;if(E===undefined)E=new WeakMap;E.set(v,R)}return E};const compareReferences=(v,E)=>{if(E===undefined)return true;for(const $ of R.getOutgoingConnections(v)){const v=$.dependency;if(!v)continue;const R=E.get(v);if(R===undefined)continue;if(R!==$.module)return false}return true};const le=new Set(v);for(const[v,R]of E){if(le.has(v)){const q=v.buildInfo;if(q){if(R.buildInfo!==q){const E=new wt;$.set(v,E);j.add(v);R.buildInfo=q;R.references=computeReferences(v);R.memCache=E;G++}else if(!compareReferences(v,R.references)){const E=new wt;$.set(v,E);j.add(v);R.references=computeReferences(v);R.memCache=E;ae++}else{$.set(v,R.memCache);ie++}}else{N.add(v);E.delete(v);ce++}le.delete(v)}else{E.delete(v)}}for(const v of le){const R=v.buildInfo;if(R){const N=new wt;E.set(v,{buildInfo:R,references:computeReferences(v),memCache:N});$.set(v,N);j.add(v);q++}else{N.add(v);ce++}}const reduceAffectType=v=>{let E=false;for(const{dependency:R}of v){if(!R)continue;const v=R.couldAffectReferencingModule();if(v===qe.TRANSITIVE)return qe.TRANSITIVE;if(v===false)continue;E=true}return E};const me=new Set;for(const v of N){for(const[E,$]of R.getIncomingConnectionsByOriginModule(v)){if(!E)continue;if(N.has(E))continue;const v=reduceAffectType($);if(!v)continue;if(v===true){me.add(E)}else{N.add(E)}}}for(const v of me)N.add(v);const _e=new Set;for(const v of j){for(const[q,G]of R.getIncomingConnectionsByOriginModule(v)){if(!q)continue;if(N.has(q))continue;if(j.has(q))continue;const v=reduceAffectType(G);if(!v)continue;if(v===true){_e.add(q)}else{j.add(q)}const R=new wt;const ie=E.get(q);ie.memCache=R;$.set(q,R)}}for(const v of _e)j.add(v);this.logger.log(`${Math.round(100*(j.size+N.size)/this.modules.size)}% (${j.size} affected + ${N.size} infected of ${this.modules.size}) modules flagged as affected (${q} new modules, ${G} changed, ${ae} references changed, ${ie} unchanged, ${ce} were not built)`)}_computeAffectedModulesWithChunkGraph(){const{moduleMemCaches:v}=this;if(!v)return;const E=this.moduleMemCaches2=new Map;const{moduleGraph:R,chunkGraph:$}=this;const j="memCache2";let N=0;let q=0;let G=0;const computeReferences=v=>{const E=$.getModuleId(v);let j=undefined;let N=undefined;const q=R.getOutgoingConnectionsByModule(v);if(q!==undefined){for(const v of q.keys()){if(!v)continue;if(j===undefined)j=new Map;j.set(v,$.getModuleId(v))}}if(v.blocks.length>0){N=[];const E=Array.from(v.blocks);for(const v of E){const R=$.getBlockChunkGroup(v);if(R){for(const v of R.chunks){N.push(v.id)}}else{N.push(null)}E.push.apply(E,v.blocks)}}return{id:E,modules:j,blocks:N}};const compareReferences=(v,{id:E,modules:R,blocks:j})=>{if(E!==$.getModuleId(v))return false;if(R!==undefined){for(const[v,E]of R){if($.getModuleId(v)!==E)return false}}if(j!==undefined){const E=Array.from(v.blocks);let R=0;for(const v of E){const N=$.getBlockChunkGroup(v);if(N){for(const v of N.chunks){if(R>=j.length||j[R++]!==v.id)return false}}else{if(R>=j.length||j[R++]!==null)return false}E.push.apply(E,v.blocks)}if(R!==j.length)return false}return true};for(const[R,$]of v){const v=$.get(j);if(v===undefined){const v=new wt;$.set(j,{references:computeReferences(R),memCache:v});E.set(R,v);G++}else if(!compareReferences(R,v.references)){const $=new wt;v.references=computeReferences(R);v.memCache=$;E.set(R,$);q++}else{E.set(R,v.memCache);N++}}this.logger.log(`${Math.round(100*q/(G+q+N))}% modules flagged as affected by chunk graph (${G} new modules, ${q} changed, ${N} unchanged)`)}finish(v){this.factorizeQueue.clear();if(this.profile){this.logger.time("finish module profiles");const v=R(15924);const E=new v;const $=this.moduleGraph;const j=new Map;for(const v of this.modules){const R=$.getProfile(v);if(!R)continue;j.set(v,R);E.range(R.buildingStartTime,R.buildingEndTime,(v=>R.buildingParallelismFactor=v));E.range(R.factoryStartTime,R.factoryEndTime,(v=>R.factoryParallelismFactor=v));E.range(R.integrationStartTime,R.integrationEndTime,(v=>R.integrationParallelismFactor=v));E.range(R.storingStartTime,R.storingEndTime,(v=>R.storingParallelismFactor=v));E.range(R.restoringStartTime,R.restoringEndTime,(v=>R.restoringParallelismFactor=v));if(R.additionalFactoryTimes){for(const{start:v,end:$}of R.additionalFactoryTimes){const j=($-v)/R.additionalFactories;E.range(v,$,(v=>R.additionalFactoriesParallelismFactor+=v*j))}}}E.calculate();const N=this.getLogger("webpack.Compilation.ModuleProfile");const logByValue=(v,E)=>{if(v>1e3){N.error(E)}else if(v>500){N.warn(E)}else if(v>200){N.info(E)}else if(v>30){N.log(E)}else{N.debug(E)}};const logNormalSummary=(v,E,R)=>{let $=0;let N=0;for(const[q,G]of j){const j=R(G);const ie=E(G);if(ie===0||j===0)continue;const ae=ie/j;$+=ae;if(ae<=10)continue;logByValue(ae,` | ${Math.round(ae)} ms${j>=1.1?` (parallelism ${Math.round(j*10)/10})`:""} ${v} > ${q.readableIdentifier(this.requestShortener)}`);N=Math.max(N,ae)}if($<=10)return;logByValue(Math.max($/10,N),`${Math.round($)} ms ${v}`)};const logByLoadersSummary=(v,E,R)=>{const $=new Map;for(const[v,E]of j){const R=vt($,v.type+"!"+v.identifier().replace(/(!|^)[^!]*$/,""),(()=>[]));R.push({module:v,profile:E})}let N=0;let q=0;for(const[j,G]of $){let $=0;let ie=0;for(const{module:j,profile:N}of G){const q=R(N);const G=E(N);if(G===0||q===0)continue;const ae=G/q;$+=ae;if(ae<=10)continue;logByValue(ae,` | | ${Math.round(ae)} ms${q>=1.1?` (parallelism ${Math.round(q*10)/10})`:""} ${v} > ${j.readableIdentifier(this.requestShortener)}`);ie=Math.max(ie,ae)}N+=$;if($<=10)continue;const ae=j.indexOf("!");const ce=j.slice(ae+1);const le=j.slice(0,ae);const me=Math.max($/10,ie);logByValue(me,` | ${Math.round($)} ms ${v} > ${ce?`${G.length} x ${le} with ${this.requestShortener.shorten(ce)}`:`${G.length} x ${le}`}`);q=Math.max(q,me)}if(N<=10)return;logByValue(Math.max(N/10,q),`${Math.round(N)} ms ${v}`)};logNormalSummary("resolve to new modules",(v=>v.factory),(v=>v.factoryParallelismFactor));logNormalSummary("resolve to existing modules",(v=>v.additionalFactories),(v=>v.additionalFactoriesParallelismFactor));logNormalSummary("integrate modules",(v=>v.restoring),(v=>v.restoringParallelismFactor));logByLoadersSummary("build modules",(v=>v.building),(v=>v.buildingParallelismFactor));logNormalSummary("store modules",(v=>v.storing),(v=>v.storingParallelismFactor));logNormalSummary("restore modules",(v=>v.restoring),(v=>v.restoringParallelismFactor));this.logger.timeEnd("finish module profiles")}this.logger.time("compute affected modules");this._computeAffectedModules(this.modules);this.logger.timeEnd("compute affected modules");this.logger.time("finish modules");const{modules:E,moduleMemCaches:$}=this;this.hooks.finishModules.callAsync(E,(R=>{this.logger.timeEnd("finish modules");if(R)return v(R);this.moduleGraph.freeze("dependency errors");this.logger.time("report dependency errors and warnings");for(const v of E){const E=$&&$.get(v);if(E&&E.get("noWarningsOrErrors"))continue;let R=this.reportDependencyErrorsAndWarnings(v,[v]);const j=v.getErrors();if(j!==undefined){for(const E of j){if(!E.module){E.module=v}this.errors.push(E);R=true}}const N=v.getWarnings();if(N!==undefined){for(const E of N){if(!E.module){E.module=v}this.warnings.push(E);R=true}}if(!R&&E)E.set("noWarningsOrErrors",true)}this.moduleGraph.unfreeze();this.logger.timeEnd("report dependency errors and warnings");v()}))}unseal(){this.hooks.unseal.call();this.chunks.clear();this.chunkGroups.length=0;this.namedChunks.clear();this.namedChunkGroups.clear();this.entrypoints.clear();this.additionalChunkAssets.length=0;this.assets={};this.assetsInfo.clear();this.moduleGraph.removeAllModuleAttributes();this.moduleGraph.unfreeze();this.moduleMemCaches2=undefined}seal(v){const finalCallback=E=>{this.factorizeQueue.clear();this.buildQueue.clear();this.rebuildQueue.clear();this.processDependenciesQueue.clear();this.addModuleQueue.clear();return v(E)};const E=new Me(this.moduleGraph,this.outputOptions.hashFunction);this.chunkGraph=E;if(this._backCompat){for(const v of this.modules){Me.setChunkGraphForModule(v,E)}}this.hooks.seal.call();this.logger.time("optimize dependencies");while(this.hooks.optimizeDependencies.call(this.modules)){}this.hooks.afterOptimizeDependencies.call(this.modules);this.logger.timeEnd("optimize dependencies");this.logger.time("create chunks");this.hooks.beforeChunks.call();this.moduleGraph.freeze("seal");const R=new Map;for(const[v,{dependencies:$,includeDependencies:j,options:N}]of this.entries){const q=this.addChunk(v);if(N.filename){q.filenameTemplate=N.filename}const G=new Ge(N);if(!N.dependOn&&!N.runtime){G.setRuntimeChunk(q)}G.setEntrypointChunk(q);this.namedChunkGroups.set(v,G);this.entrypoints.set(v,G);this.chunkGroups.push(G);Qe(G,q);const ie=new Set;for(const j of[...this.globalEntry.dependencies,...$]){G.addOrigin(null,{name:v},j.request);const $=this.moduleGraph.getModule(j);if($){E.connectChunkAndEntryModule(q,$,G);ie.add($);const v=R.get(G);if(v===undefined){R.set(G,[$])}else{v.push($)}}}this.assignDepths(ie);const mapAndSort=v=>v.map((v=>this.moduleGraph.getModule(v))).filter(Boolean).sort(Mt);const ae=[...mapAndSort(this.globalEntry.includeDependencies),...mapAndSort(j)];let ce=R.get(G);if(ce===undefined){R.set(G,ce=[])}for(const v of ae){this.assignDepth(v);ce.push(v)}}const $=new Set;e:for(const[v,{options:{dependOn:E,runtime:R}}]of this.entries){if(E&&R){const E=new pt(`Entrypoint '${v}' has 'dependOn' and 'runtime' specified. This is not valid.\nEntrypoints that depend on other entrypoints do not have their own runtime.\nThey will use the runtime(s) from referenced entrypoints instead.\nRemove the 'runtime' option from the entrypoint.`);const R=this.entrypoints.get(v);E.chunk=R.getEntrypointChunk();this.errors.push(E)}if(E){const R=this.entrypoints.get(v);const $=R.getEntrypointChunk().getAllReferencedChunks();const j=[];for(const N of E){const E=this.entrypoints.get(N);if(!E){throw new Error(`Entry ${v} depends on ${N}, but this entry was not found`)}if($.has(E.getEntrypointChunk())){const E=new pt(`Entrypoints '${v}' and '${N}' use 'dependOn' to depend on each other in a circular way.`);const $=R.getEntrypointChunk();E.chunk=$;this.errors.push(E);R.setRuntimeChunk($);continue e}j.push(E)}for(const v of j){Je(v,R)}}else if(R){const E=this.entrypoints.get(v);let j=this.namedChunks.get(R);if(j){if(!$.has(j)){const $=new pt(`Entrypoint '${v}' has a 'runtime' option which points to another entrypoint named '${R}'.\nIt's not valid to use other entrypoints as runtime chunk.\nDid you mean to use 'dependOn: ${JSON.stringify(R)}' instead to allow using entrypoint '${v}' within the runtime of entrypoint '${R}'? For this '${R}' must always be loaded when '${v}' is used.\nOr do you want to use the entrypoints '${v}' and '${R}' independently on the same page with a shared runtime? In this case give them both the same value for the 'runtime' option. It must be a name not already used by an entrypoint.`);const j=E.getEntrypointChunk();$.chunk=j;this.errors.push($);E.setRuntimeChunk(j);continue}}else{j=this.addChunk(R);j.preventIntegration=true;$.add(j)}E.unshiftChunk(j);j.addGroup(E);E.setRuntimeChunk(j)}}dt(this,R);this.hooks.afterChunks.call(this.chunks);this.logger.timeEnd("create chunks");this.logger.time("optimize");this.hooks.optimize.call();while(this.hooks.optimizeModules.call(this.modules)){}this.hooks.afterOptimizeModules.call(this.modules);while(this.hooks.optimizeChunks.call(this.chunks,this.chunkGroups)){}this.hooks.afterOptimizeChunks.call(this.chunks,this.chunkGroups);this.hooks.optimizeTree.callAsync(this.chunks,this.modules,(E=>{if(E){return finalCallback(Ve(E,"Compilation.hooks.optimizeTree"))}this.hooks.afterOptimizeTree.call(this.chunks,this.modules);this.hooks.optimizeChunkModules.callAsync(this.chunks,this.modules,(E=>{if(E){return finalCallback(Ve(E,"Compilation.hooks.optimizeChunkModules"))}this.hooks.afterOptimizeChunkModules.call(this.chunks,this.modules);const R=this.hooks.shouldRecord.call()!==false;this.hooks.reviveModules.call(this.modules,this.records);this.hooks.beforeModuleIds.call(this.modules);this.hooks.moduleIds.call(this.modules);this.hooks.optimizeModuleIds.call(this.modules);this.hooks.afterOptimizeModuleIds.call(this.modules);this.hooks.reviveChunks.call(this.chunks,this.records);this.hooks.beforeChunkIds.call(this.chunks);this.hooks.chunkIds.call(this.chunks);this.hooks.optimizeChunkIds.call(this.chunks);this.hooks.afterOptimizeChunkIds.call(this.chunks);this.assignRuntimeIds();this.logger.time("compute affected modules with chunk graph");this._computeAffectedModulesWithChunkGraph();this.logger.timeEnd("compute affected modules with chunk graph");this.sortItemsWithChunkIds();if(R){this.hooks.recordModules.call(this.modules,this.records);this.hooks.recordChunks.call(this.chunks,this.records)}this.hooks.optimizeCodeGeneration.call(this.modules);this.logger.timeEnd("optimize");this.logger.time("module hashing");this.hooks.beforeModuleHash.call();this.createModuleHashes();this.hooks.afterModuleHash.call();this.logger.timeEnd("module hashing");this.logger.time("code generation");this.hooks.beforeCodeGeneration.call();this.codeGeneration((E=>{if(E){return finalCallback(E)}this.hooks.afterCodeGeneration.call();this.logger.timeEnd("code generation");this.logger.time("runtime requirements");this.hooks.beforeRuntimeRequirements.call();this.processRuntimeRequirements();this.hooks.afterRuntimeRequirements.call();this.logger.timeEnd("runtime requirements");this.logger.time("hashing");this.hooks.beforeHash.call();const $=this.createHash();this.hooks.afterHash.call();this.logger.timeEnd("hashing");this._runCodeGenerationJobs($,(E=>{if(E){return finalCallback(E)}if(R){this.logger.time("record hash");this.hooks.recordHash.call(this.records);this.logger.timeEnd("record hash")}this.logger.time("module assets");this.clearAssets();this.hooks.beforeModuleAssets.call();this.createModuleAssets();this.logger.timeEnd("module assets");const cont=()=>{this.logger.time("process assets");this.hooks.processAssets.callAsync(this.assets,(E=>{if(E){return finalCallback(Ve(E,"Compilation.hooks.processAssets"))}this.hooks.afterProcessAssets.call(this.assets);this.logger.timeEnd("process assets");this.assets=this._backCompat?Ot(this.assets,"Compilation.assets","DEP_WEBPACK_COMPILATION_ASSETS",`BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.\n\tDo changes to assets earlier, e. g. in Compilation.hooks.processAssets.\n\tMake sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.`):Object.freeze(this.assets);this.summarizeDependencies();if(R){this.hooks.record.call(this,this.records)}if(this.hooks.needAdditionalSeal.call()){this.unseal();return this.seal(v)}return this.hooks.afterSeal.callAsync((v=>{if(v){return finalCallback(Ve(v,"Compilation.hooks.afterSeal"))}this.fileSystemInfo.logStatistics();finalCallback()}))}))};this.logger.time("create chunk assets");if(this.hooks.shouldGenerateChunkAssets.call()!==false){this.hooks.beforeChunkAssets.call();this.createChunkAssets((v=>{this.logger.timeEnd("create chunk assets");if(v){return finalCallback(v)}cont()}))}else{this.logger.timeEnd("create chunk assets");cont()}}))}))}))}))}reportDependencyErrorsAndWarnings(v,E){let R=false;for(let $=0;$1){const j=new Map;for(const N of $){const $=E.getModuleHash(v,N);const q=j.get($);if(q===undefined){const E={module:v,hash:$,runtime:N,runtimes:[N]};R.push(E);j.set($,E)}else{q.runtimes.push(N)}}}}this._runCodeGenerationJobs(R,v)}_runCodeGenerationJobs(v,E){let R=0;let j=0;const{chunkGraph:N,moduleGraph:q,dependencyTemplates:G,runtimeTemplate:ie}=this;const ae=this.codeGenerationResults;const ce=[];let le=undefined;const runIteration=()=>{let me=[];let _e=new Set;$.eachLimit(v,this.options.parallelism,((v,E)=>{const{module:$}=v;const{codeGenerationDependencies:Ie}=$;if(Ie!==undefined){if(le===undefined||Ie.some((v=>{const E=q.getModule(v);return le.has(E)}))){me.push(v);_e.add($);return E()}}const{hash:Me,runtime:Oe,runtimes:Te}=v;this._codeGenerationModule($,Oe,Te,Me,G,N,q,ie,ce,ae,((v,$)=>{if($)j++;else R++;E(v)}))}),($=>{if($)return E($);if(me.length>0){if(me.length===v.length){return E(new Error(`Unable to make progress during code generation because of circular code generation dependency: ${Array.from(_e,(v=>v.identifier())).join(", ")}`))}v=me;me=[];le=_e;_e=new Set;return runIteration()}if(ce.length>0){ce.sort(_t((v=>v.module),Mt));for(const v of ce){this.errors.push(v)}}this.logger.log(`${Math.round(100*j/(j+R))}% code generated (${j} generated, ${R} from cache)`);E()}))};runIteration()}_codeGenerationModule(v,E,R,$,j,N,q,G,ie,ae,ce){let le=false;const me=new _e(R.map((E=>this._codeGenerationCache.getItemCache(`${v.identifier()}|${Tt(E)}`,`${$}|${j.getHash()}`))));me.get((($,_e)=>{if($)return ce($);let Ie;if(!_e){try{le=true;this.codeGeneratedModules.add(v);Ie=v.codeGeneration({chunkGraph:N,moduleGraph:q,dependencyTemplates:j,runtimeTemplate:G,runtime:E,codeGenerationResults:ae,compilation:this})}catch($){ie.push(new Be(v,$));Ie=_e={sources:new Map,runtimeRequirements:null}}}else{Ie=_e}for(const E of R){ae.add(v,E,Ie)}if(!_e){me.store(Ie,(v=>ce(v,le)))}else{ce(null,le)}}))}_getChunkGraphEntries(){const v=new Set;for(const E of this.entrypoints.values()){const R=E.getRuntimeChunk();if(R)v.add(R)}for(const E of this.asyncEntrypoints){const R=E.getRuntimeChunk();if(R)v.add(R)}return v}processRuntimeRequirements({chunkGraph:v=this.chunkGraph,modules:E=this.modules,chunks:R=this.chunks,codeGenerationResults:$=this.codeGenerationResults,chunkGraphEntries:j=this._getChunkGraphEntries()}={}){const N={chunkGraph:v,codeGenerationResults:$};const{moduleMemCaches2:q}=this;this.logger.time("runtime requirements.modules");const G=this.hooks.additionalModuleRuntimeRequirements;const ie=this.hooks.runtimeRequirementInModule;for(const R of E){if(v.getNumberOfModuleChunks(R)>0){const E=q&&q.get(R);for(const j of v.getModuleRuntimes(R)){if(E){const $=E.get(`moduleRuntimeRequirements-${Tt(j)}`);if($!==undefined){if($!==null){v.addModuleRuntimeRequirements(R,j,$,false)}continue}}let q;const ae=$.getRuntimeRequirements(R,j);if(ae&&ae.size>0){q=new Set(ae)}else if(G.isUsed()){q=new Set}else{if(E){E.set(`moduleRuntimeRequirements-${Tt(j)}`,null)}continue}G.call(R,q,N);for(const v of q){const E=ie.get(v);if(E!==undefined)E.call(R,q,N)}if(q.size===0){if(E){E.set(`moduleRuntimeRequirements-${Tt(j)}`,null)}}else{if(E){E.set(`moduleRuntimeRequirements-${Tt(j)}`,q);v.addModuleRuntimeRequirements(R,j,q,false)}else{v.addModuleRuntimeRequirements(R,j,q)}}}}}this.logger.timeEnd("runtime requirements.modules");this.logger.time("runtime requirements.chunks");for(const E of R){const R=new Set;for(const $ of v.getChunkModulesIterable(E)){const j=v.getModuleRuntimeRequirements($,E.runtime);for(const v of j)R.add(v)}this.hooks.additionalChunkRuntimeRequirements.call(E,R,N);for(const v of R){this.hooks.runtimeRequirementInChunk.for(v).call(E,R,N)}v.addChunkRuntimeRequirements(E,R)}this.logger.timeEnd("runtime requirements.chunks");this.logger.time("runtime requirements.entries");for(const E of j){const R=new Set;for(const $ of E.getAllReferencedChunks()){const E=v.getChunkRuntimeRequirements($);for(const v of E)R.add(v)}this.hooks.additionalTreeRuntimeRequirements.call(E,R,N);for(const v of R){this.hooks.runtimeRequirementInTree.for(v).call(E,R,N)}v.addTreeRuntimeRequirements(E,R)}this.logger.timeEnd("runtime requirements.entries")}addRuntimeModule(v,E,R=this.chunkGraph){if(this._backCompat)tt.setModuleGraphForModule(E,this.moduleGraph);this.modules.add(E);this._modules.set(E.identifier(),E);R.connectChunkAndModule(v,E);R.connectChunkAndRuntimeModule(v,E);if(E.fullHash){R.addFullHashModuleToChunk(v,E)}else if(E.dependentHash){R.addDependentHashModuleToChunk(v,E)}E.attach(this,v,R);const $=this.moduleGraph.getExportsInfo(E);$.setHasProvideInfo();if(typeof v.runtime==="string"){$.setUsedForSideEffectsOnly(v.runtime)}else if(v.runtime===undefined){$.setUsedForSideEffectsOnly(undefined)}else{for(const E of v.runtime){$.setUsedForSideEffectsOnly(E)}}R.addModuleRuntimeRequirements(E,v.runtime,new Set([ct.requireScope]));R.setModuleId(E,"");this.hooks.runtimeModule.call(E,v)}addChunkInGroup(v,E,R,$){if(typeof v==="string"){v={name:v}}const j=v.name;if(j){const N=this.namedChunkGroups.get(j);if(N!==undefined){N.addOptions(v);if(E){N.addOrigin(E,R,$)}return N}}const N=new Oe(v);if(E)N.addOrigin(E,R,$);const q=this.addChunk(j);Qe(N,q);this.chunkGroups.push(N);if(j){this.namedChunkGroups.set(j,N)}return N}addAsyncEntrypoint(v,E,R,$){const j=v.name;if(j){const v=this.namedChunkGroups.get(j);if(v instanceof Ge){if(v!==undefined){if(E){v.addOrigin(E,R,$)}return v}}else if(v){throw new Error(`Cannot add an async entrypoint with the name '${j}', because there is already an chunk group with this name`)}}const N=this.addChunk(j);if(v.filename){N.filenameTemplate=v.filename}const q=new Ge(v,false);q.setRuntimeChunk(N);q.setEntrypointChunk(N);if(j){this.namedChunkGroups.set(j,q)}this.chunkGroups.push(q);this.asyncEntrypoints.push(q);Qe(q,N);if(E){q.addOrigin(E,R,$)}return q}addChunk(v){if(v){const E=this.namedChunks.get(v);if(E!==undefined){return E}}const E=new Ie(v,this._backCompat);this.chunks.add(E);if(this._backCompat)Me.setChunkGraphForChunk(E,this.chunkGraph);if(v){this.namedChunks.set(v,E)}return E}assignDepth(v){const E=this.moduleGraph;const R=new Set([v]);let $;E.setDepth(v,0);const processModule=v=>{if(!E.setDepthIfLower(v,$))return;R.add(v)};for(v of R){R.delete(v);$=E.getDepth(v)+1;for(const R of E.getOutgoingConnections(v)){const v=R.module;if(v){processModule(v)}}}}assignDepths(v){const E=this.moduleGraph;const R=new Set(v);R.add(1);let $=0;let j=0;for(const v of R){j++;if(typeof v==="number"){$=v;if(R.size===j)return;R.add($+1)}else{E.setDepth(v,$);for(const{module:$}of E.getOutgoingConnections(v)){if($){R.add($)}}}}}getDependencyReferencedExports(v,E){const R=v.getReferencedExports(this.moduleGraph,E);return this.hooks.dependencyReferencedExports.call(R,v,E)}removeReasonsOfDependencyBlock(v,E){if(E.blocks){for(const R of E.blocks){this.removeReasonsOfDependencyBlock(v,R)}}if(E.dependencies){for(const v of E.dependencies){const E=this.moduleGraph.getModule(v);if(E){this.moduleGraph.removeConnection(v);if(this.chunkGraph){for(const v of this.chunkGraph.getModuleChunks(E)){this.patchChunksAfterReasonRemoval(E,v)}}}}}}patchChunksAfterReasonRemoval(v,E){if(!v.hasReasons(this.moduleGraph,E.runtime)){this.removeReasonsOfDependencyBlock(v,v)}if(!v.hasReasonForChunk(E,this.moduleGraph,this.chunkGraph)){if(this.chunkGraph.isModuleInChunk(v,E)){this.chunkGraph.disconnectChunkAndModule(E,v);this.removeChunkFromDependencies(v,E)}}}removeChunkFromDependencies(v,E){const iteratorDependency=v=>{const R=this.moduleGraph.getModule(v);if(!R){return}this.patchChunksAfterReasonRemoval(R,E)};const R=v.blocks;for(let E=0;E{const R=E.options.runtime||E.name;const $=E.getRuntimeChunk();v.setRuntimeId(R,$.id)};for(const v of this.entrypoints.values()){processEntrypoint(v)}for(const v of this.asyncEntrypoints){processEntrypoint(v)}}sortItemsWithChunkIds(){for(const v of this.chunkGroups){v.sortItems()}this.errors.sort(Ht);this.warnings.sort(Ht);this.children.sort(qt)}summarizeDependencies(){for(let v=0;v0){ie.sort(_t((v=>v.module),Mt));for(const v of ie){this.errors.push(v)}}this.logger.log(`${v} modules hashed, ${E} from cache (${Math.round(100*(v+E)/this.modules.size)/100} variants per module in average)`)}_createModuleHash(v,E,R,$,j,N,q,G){let ie;try{const q=Pt($);v.updateHash(q,{chunkGraph:E,runtime:R,runtimeTemplate:j});ie=q.digest(N)}catch(E){G.push(new nt(v,E));ie="XXXXXX"}E.setModuleHashes(v,R,ie,ie.slice(0,q));return ie}createHash(){this.logger.time("hashing: initialize hash");const v=this.chunkGraph;const E=this.runtimeTemplate;const R=this.outputOptions;const $=R.hashFunction;const j=R.hashDigest;const N=R.hashDigestLength;const q=Pt($);if(R.hashSalt){q.update(R.hashSalt)}this.logger.timeEnd("hashing: initialize hash");if(this.children.length>0){this.logger.time("hashing: hash child compilations");for(const v of this.children){q.update(v.hash)}this.logger.timeEnd("hashing: hash child compilations")}if(this.warnings.length>0){this.logger.time("hashing: hash warnings");for(const v of this.warnings){q.update(`${v.message}`)}this.logger.timeEnd("hashing: hash warnings")}if(this.errors.length>0){this.logger.time("hashing: hash errors");for(const v of this.errors){q.update(`${v.message}`)}this.logger.timeEnd("hashing: hash errors")}this.logger.time("hashing: sort chunks");const G=[];const ie=[];for(const v of this.chunks){if(v.hasRuntime()){G.push(v)}else{ie.push(v)}}G.sort(Lt);ie.sort(Lt);const ae=new Map;for(const v of G){ae.set(v,{chunk:v,referencedBy:[],remaining:0})}let ce=0;for(const v of ae.values()){for(const E of new Set(Array.from(v.chunk.getAllReferencedAsyncEntrypoints()).map((v=>v.chunks[v.chunks.length-1])))){const R=ae.get(E);R.referencedBy.push(v);v.remaining++;ce++}}const le=[];for(const v of ae.values()){if(v.remaining===0){le.push(v.chunk)}}if(ce>0){const E=[];for(const R of le){const $=v.getNumberOfChunkFullHashModules(R)!==0;const j=ae.get(R);for(const R of j.referencedBy){if($){v.upgradeDependentToFullHashModules(R.chunk)}ce--;if(--R.remaining===0){E.push(R.chunk)}}if(E.length>0){E.sort(Lt);for(const v of E)le.push(v);E.length=0}}}if(ce>0){let v=[];for(const E of ae.values()){if(E.remaining!==0){v.push(E)}}v.sort(_t((v=>v.chunk),Lt));const E=new pt(`Circular dependency between chunks with runtime (${Array.from(v,(v=>v.chunk.name||v.chunk.id)).join(", ")})\nThis prevents using hashes of each other and should be avoided.`);E.chunk=v[0].chunk;this.warnings.push(E);for(const E of v)le.push(E.chunk)}this.logger.timeEnd("hashing: sort chunks");const me=new Set;const _e=[];const Ie=new Map;const Me=[];const processChunk=G=>{this.logger.time("hashing: hash runtime modules");const ie=G.runtime;for(const R of v.getChunkModulesIterable(G)){if(!v.hasModuleHashes(R,ie)){const q=this._createModuleHash(R,v,ie,$,E,j,N,Me);let G=Ie.get(q);if(G){const v=G.get(R);if(v){v.runtimes.push(ie);continue}}else{G=new Map;Ie.set(q,G)}const ae={module:R,hash:q,runtime:ie,runtimes:[ie]};G.set(R,ae);_e.push(ae)}}this.logger.timeAggregate("hashing: hash runtime modules");try{this.logger.time("hashing: hash chunks");const E=Pt($);if(R.hashSalt){E.update(R.hashSalt)}G.updateHash(E,v);this.hooks.chunkHash.call(G,E,{chunkGraph:v,codeGenerationResults:this.codeGenerationResults,moduleGraph:this.moduleGraph,runtimeTemplate:this.runtimeTemplate});const ie=E.digest(j);q.update(ie);G.hash=ie;G.renderedHash=G.hash.slice(0,N);const ae=v.getChunkFullHashModulesIterable(G);if(ae){me.add(G)}else{this.hooks.contentHash.call(G)}}catch(v){this.errors.push(new Te(G,"",v))}this.logger.timeAggregate("hashing: hash chunks")};ie.forEach(processChunk);for(const v of le)processChunk(v);if(Me.length>0){Me.sort(_t((v=>v.module),Mt));for(const v of Me){this.errors.push(v)}}this.logger.timeAggregateEnd("hashing: hash runtime modules");this.logger.timeAggregateEnd("hashing: hash chunks");this.logger.time("hashing: hash digest");this.hooks.fullHash.call(q);this.fullHash=q.digest(j);this.hash=this.fullHash.slice(0,N);this.logger.timeEnd("hashing: hash digest");this.logger.time("hashing: process full hash modules");for(const R of me){for(const q of v.getChunkFullHashModulesIterable(R)){const G=Pt($);q.updateHash(G,{chunkGraph:v,runtime:R.runtime,runtimeTemplate:E});const ie=G.digest(j);const ae=v.getModuleHash(q,R.runtime);v.setModuleHashes(q,R.runtime,ie,ie.slice(0,N));Ie.get(ae).get(q).hash=ie}const q=Pt($);q.update(R.hash);q.update(this.hash);const G=q.digest(j);R.hash=G;R.renderedHash=R.hash.slice(0,N);this.hooks.contentHash.call(R)}this.logger.timeEnd("hashing: process full hash modules");return _e}emitAsset(v,E,R={}){if(this.assets[v]){if(!Ft(this.assets[v],E)){this.errors.push(new pt(`Conflict: Multiple assets emit different content to the same filename ${v}${R.sourceFilename?`. Original source ${R.sourceFilename}`:""}`));this.assets[v]=E;this._setAssetInfo(v,R);return}const $=this.assetsInfo.get(v);const j=Object.assign({},$,R);this._setAssetInfo(v,j,$);return}this.assets[v]=E;this._setAssetInfo(v,R,undefined)}_setAssetInfo(v,E,R=this.assetsInfo.get(v)){if(E===undefined){this.assetsInfo.delete(v)}else{this.assetsInfo.set(v,E)}const $=R&&R.related;const j=E&&E.related;if($){for(const E of Object.keys($)){const remove=R=>{const $=this._assetsRelatedIn.get(R);if($===undefined)return;const j=$.get(E);if(j===undefined)return;j.delete(v);if(j.size!==0)return;$.delete(E);if($.size===0)this._assetsRelatedIn.delete(R)};const R=$[E];if(Array.isArray(R)){R.forEach(remove)}else if(R){remove(R)}}}if(j){for(const E of Object.keys(j)){const add=R=>{let $=this._assetsRelatedIn.get(R);if($===undefined){this._assetsRelatedIn.set(R,$=new Map)}let j=$.get(E);if(j===undefined){$.set(E,j=new Set)}j.add(v)};const R=j[E];if(Array.isArray(R)){R.forEach(add)}else if(R){add(R)}}}}updateAsset(v,E,R=undefined){if(!this.assets[v]){throw new Error(`Called Compilation.updateAsset for not existing filename ${v}`)}if(typeof E==="function"){this.assets[v]=E(this.assets[v])}else{this.assets[v]=E}if(R!==undefined){const E=this.assetsInfo.get(v)||jt;if(typeof R==="function"){this._setAssetInfo(v,R(E),E)}else{this._setAssetInfo(v,Ct(E,R),E)}}}renameAsset(v,E){const R=this.assets[v];if(!R){throw new Error(`Called Compilation.renameAsset for not existing filename ${v}`)}if(this.assets[E]){if(!Ft(this.assets[v],R)){this.errors.push(new pt(`Conflict: Called Compilation.renameAsset for already existing filename ${E} with different content`))}}const $=this.assetsInfo.get(v);const j=this._assetsRelatedIn.get(v);if(j){for(const[R,$]of j){for(const j of $){const $=this.assetsInfo.get(j);if(!$)continue;const N=$.related;if(!N)continue;const q=N[R];let G;if(Array.isArray(q)){G=q.map((R=>R===v?E:R))}else if(q===v){G=E}else continue;this.assetsInfo.set(j,{...$,related:{...N,[R]:G}})}}}this._setAssetInfo(v,undefined,$);this._setAssetInfo(E,$);delete this.assets[v];this.assets[E]=R;for(const R of this.chunks){{const $=R.files.size;R.files.delete(v);if($!==R.files.size){R.files.add(E)}}{const $=R.auxiliaryFiles.size;R.auxiliaryFiles.delete(v);if($!==R.auxiliaryFiles.size){R.auxiliaryFiles.add(E)}}}}deleteAsset(v){if(!this.assets[v]){return}delete this.assets[v];const E=this.assetsInfo.get(v);this._setAssetInfo(v,undefined,E);const R=E&&E.related;if(R){for(const v of Object.keys(R)){const checkUsedAndDelete=v=>{if(!this._assetsRelatedIn.has(v)){this.deleteAsset(v)}};const E=R[v];if(Array.isArray(E)){E.forEach(checkUsedAndDelete)}else if(E){checkUsedAndDelete(E)}}}for(const E of this.chunks){E.files.delete(v);E.auxiliaryFiles.delete(v)}}getAssets(){const v=[];for(const E of Object.keys(this.assets)){if(Object.prototype.hasOwnProperty.call(this.assets,E)){v.push({name:E,source:this.assets[E],info:this.assetsInfo.get(E)||jt})}}return v}getAsset(v){if(!Object.prototype.hasOwnProperty.call(this.assets,v))return undefined;return{name:v,source:this.assets[v],info:this.assetsInfo.get(v)||jt}}clearAssets(){for(const v of this.chunks){v.files.clear();v.auxiliaryFiles.clear()}}createModuleAssets(){const{chunkGraph:v}=this;for(const E of this.modules){if(E.buildInfo.assets){const R=E.buildInfo.assetsInfo;for(const $ of Object.keys(E.buildInfo.assets)){const j=this.getPath($,{chunkGraph:this.chunkGraph,module:E});for(const R of v.getModuleChunksIterable(E)){R.auxiliaryFiles.add(j)}this.emitAsset(j,E.buildInfo.assets[$],R?R.get($):undefined);this.hooks.moduleAsset.call(E,j)}}}}getRenderManifest(v){return this.hooks.renderManifest.call([],v)}createChunkAssets(v){const E=this.outputOptions;const R=new WeakMap;const j=new Map;$.forEachLimit(this.chunks,15,((v,N)=>{let q;try{q=this.getRenderManifest({chunk:v,hash:this.hash,fullHash:this.fullHash,outputOptions:E,codeGenerationResults:this.codeGenerationResults,moduleTemplates:this.moduleTemplates,dependencyTemplates:this.dependencyTemplates,chunkGraph:this.chunkGraph,moduleGraph:this.moduleGraph,runtimeTemplate:this.runtimeTemplate})}catch(E){this.errors.push(new Te(v,"",E));return N()}$.forEach(q,((E,$)=>{const N=E.identifier;const q=E.hash;const G=this._assetsCache.getItemCache(N,q);G.get(((N,ie)=>{let ae;let ce;let le;let _e=true;const errorAndCallback=E=>{const R=ce||(typeof ce==="string"?ce:typeof ae==="string"?ae:"");this.errors.push(new Te(v,R,E));_e=false;return $()};try{if("filename"in E){ce=E.filename;le=E.info}else{ae=E.filenameTemplate;const v=this.getPathWithInfo(ae,E.pathOptions);ce=v.path;le=E.info?{...v.info,...E.info}:v.info}if(N){return errorAndCallback(N)}let Ie=ie;const Me=j.get(ce);if(Me!==undefined){if(Me.hash!==q){_e=false;return $(new pt(`Conflict: Multiple chunks emit assets to the same filename ${ce}`+` (chunks ${Me.chunk.id} and ${v.id})`))}else{Ie=Me.source}}else if(!Ie){Ie=E.render();if(!(Ie instanceof me)){const v=R.get(Ie);if(v){Ie=v}else{const v=new me(Ie);R.set(Ie,v);Ie=v}}}this.emitAsset(ce,Ie,le);if(E.auxiliary){v.auxiliaryFiles.add(ce)}else{v.files.add(ce)}this.hooks.chunkAsset.call(v,ce);j.set(ce,{hash:q,source:Ie,chunk:v});if(Ie!==ie){G.store(Ie,(v=>{if(v)return errorAndCallback(v);_e=false;return $()}))}else{_e=false;$()}}catch(N){if(!_e)throw N;errorAndCallback(N)}}))}),N)}),v)}getPath(v,E={}){if(!E.hash){E={hash:this.hash,...E}}return this.getAssetPath(v,E)}getPathWithInfo(v,E={}){if(!E.hash){E={hash:this.hash,...E}}return this.getAssetPathWithInfo(v,E)}getAssetPath(v,E){return this.hooks.assetPath.call(typeof v==="function"?v(E):v,E,undefined)}getAssetPathWithInfo(v,E){const R={};const $=this.hooks.assetPath.call(typeof v==="function"?v(E,R):v,E,R);return{path:$,info:R}}getWarnings(){return this.hooks.processWarnings.call(this.warnings)}getErrors(){return this.hooks.processErrors.call(this.errors)}createChildCompiler(v,E,R){const $=this.childrenCounters[v]||0;this.childrenCounters[v]=$+1;return this.compiler.createChildCompiler(this,v,$,E,R)}executeModule(v,E,R){const j=new Set([v]);$t(j,10,((v,E,R)=>{this.buildQueue.waitFor(v,($=>{if($)return R($);this.processDependenciesQueue.waitFor(v,($=>{if($)return R($);for(const{module:R}of this.moduleGraph.getOutgoingConnections(v)){const v=j.size;j.add(R);if(j.size!==v)E(R)}R()}))}))}),(N=>{if(N)return R(N);const q=new Me(this.moduleGraph,this.outputOptions.hashFunction);const G="build time";const{hashFunction:ie,hashDigest:ae,hashDigestLength:ce}=this.outputOptions;const le=this.runtimeTemplate;const me=new Ie("build time chunk",this._backCompat);me.id=me.name;me.ids=[me.id];me.runtime=G;const _e=new Ge({runtime:G,chunkLoading:false,...E.entryOptions});q.connectChunkAndEntryModule(me,v,_e);Qe(_e,me);_e.setRuntimeChunk(me);_e.setEntrypointChunk(me);const Oe=new Set([me]);for(const v of j){const E=v.identifier();q.setModuleId(v,E);q.connectChunkAndModule(me,v)}const Te=[];for(const v of j){this._createModuleHash(v,q,G,ie,le,ae,ce,Te)}const Ne=new Le(this.outputOptions.hashFunction);const codeGen=(v,E)=>{this._codeGenerationModule(v,G,[G],q.getModuleHash(v,G),this.dependencyTemplates,q,this.moduleGraph,le,Te,Ne,((v,R)=>{E(v)}))};const reportErrors=()=>{if(Te.length>0){Te.sort(_t((v=>v.module),Mt));for(const v of Te){this.errors.push(v)}Te.length=0}};$.eachLimit(j,10,codeGen,(E=>{if(E)return R(E);reportErrors();const N=this.chunkGraph;this.chunkGraph=q;this.processRuntimeRequirements({chunkGraph:q,modules:j,chunks:Oe,codeGenerationResults:Ne,chunkGraphEntries:Oe});this.chunkGraph=N;const _e=q.getChunkRuntimeModulesIterable(me);for(const v of _e){j.add(v);this._createModuleHash(v,q,G,ie,le,ae,ce)}$.eachLimit(_e,10,codeGen,(E=>{if(E)return R(E);reportErrors();const N=new Map;const ie=new Map;const ae=new kt;const ce=new kt;const le=new kt;const _e=new kt;const Ie=new Map;let Me=true;const Oe={assets:Ie,__webpack_require__:undefined,chunk:me,chunkGraph:q};$.eachLimit(j,10,((v,E)=>{const R=Ne.get(v,G);const $={module:v,codeGenerationResult:R,preparedInfo:undefined,moduleObject:undefined};N.set(v,$);ie.set(v.identifier(),$);v.addCacheDependencies(ae,ce,le,_e);if(v.buildInfo.cacheable===false){Me=false}if(v.buildInfo&&v.buildInfo.assets){const{assets:E,assetsInfo:R}=v.buildInfo;for(const v of Object.keys(E)){Ie.set(v,{source:E[v],info:R?R.get(v):undefined})}}this.hooks.prepareModuleExecution.callAsync($,Oe,E)}),(E=>{if(E)return R(E);let $;try{const{strictModuleErrorHandling:E,strictModuleExceptionHandling:R}=this.outputOptions;const __nested_webpack_require_153265__=v=>{const E=G[v];if(E!==undefined){if(E.error)throw E.error;return E.exports}const R=ie.get(v);return __webpack_require_module__(R,v)};const j=__nested_webpack_require_153265__[ct.interceptModuleExecution.replace("__webpack_require__.","")]=[];const G=__nested_webpack_require_153265__[ct.moduleCache.replace("__webpack_require__.","")]={};Oe.__webpack_require__=__nested_webpack_require_153265__;const __webpack_require_module__=(v,$)=>{var N={id:$,module:{id:$,exports:{},loaded:false,error:undefined},require:__nested_webpack_require_153265__};j.forEach((v=>v(N)));const q=v.module;this.buildTimeExecutedModules.add(q);const ie=N.module;v.moduleObject=ie;try{if($)G[$]=ie;Ke((()=>this.hooks.executeModule.call(v,Oe)),"Compilation.hooks.executeModule");ie.loaded=true;return ie.exports}catch(v){if(R){if($)delete G[$]}else if(E){ie.error=v}if(!v.module)v.module=q;throw v}};for(const v of q.getChunkRuntimeModulesInOrder(me)){__webpack_require_module__(N.get(v))}$=__nested_webpack_require_153265__(v.identifier())}catch(E){const $=new pt(`Execution of module code from module graph (${v.readableIdentifier(this.requestShortener)}) failed: ${E.message}`);$.stack=E.stack;$.module=E.module;return R($)}R(null,{exports:$,assets:Ie,cacheable:Me,fileDependencies:ae,contextDependencies:ce,missingDependencies:le,buildDependencies:_e})}))}))}))}))}checkConstraints(){const v=this.chunkGraph;const E=new Set;for(const R of this.modules){if(R.type==="runtime")continue;const $=v.getModuleId(R);if($===null)continue;if(E.has($)){throw new Error(`checkConstraints: duplicate module id ${$}`)}E.add($)}for(const E of this.chunks){for(const R of v.getChunkModulesIterable(E)){if(!this.modules.has(R)){throw new Error("checkConstraints: module in chunk but not in compilation "+` ${E.debugId} ${R.debugId}`)}}for(const R of v.getChunkEntryModulesIterable(E)){if(!this.modules.has(R)){throw new Error("checkConstraints: entry module in chunk but not in compilation "+` ${E.debugId} ${R.debugId}`)}}}for(const v of this.chunkGroups){v.checkConstraints()}}}Compilation.prototype.factorizeModule=function(v,E){this.factorizeQueue.add(v,E)};const Jt=Compilation.prototype;Object.defineProperty(Jt,"modifyHash",{writable:false,enumerable:false,configurable:false,value:()=>{throw new Error("Compilation.modifyHash was removed in favor of Compilation.hooks.fullHash")}});Object.defineProperty(Jt,"cache",{enumerable:false,configurable:false,get:le.deprecate((function(){return this.compiler.cache}),"Compilation.cache was removed in favor of Compilation.getCache()","DEP_WEBPACK_COMPILATION_CACHE"),set:le.deprecate((v=>{}),"Compilation.cache was removed in favor of Compilation.getCache()","DEP_WEBPACK_COMPILATION_CACHE")});Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL=-2e3;Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS=-1e3;Compilation.PROCESS_ASSETS_STAGE_DERIVED=-200;Compilation.PROCESS_ASSETS_STAGE_ADDITIONS=-100;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE=100;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT=200;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY=300;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE=400;Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING=500;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE=700;Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE=1e3;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH=2500;Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER=3e3;Compilation.PROCESS_ASSETS_STAGE_ANALYSE=4e3;Compilation.PROCESS_ASSETS_STAGE_REPORT=5e3;v.exports=Compilation},37912:function(v,E,R){"use strict";const $=R(85685);const j=R(78175);const{SyncHook:N,SyncBailHook:q,AsyncParallelHook:G,AsyncSeriesHook:ie}=R(44217);const{SizeOnlySource:ae}=R(51255);const ce=R(13733);const le=R(25363);const me=R(36035);const _e=R(75449);const Ie=R(73002);const Me=R(56275);const Oe=R(5444);const Te=R(13487);const Ne=R(26156);const Be=R(41483);const Le=R(34001);const qe=R(47158);const Ue=R(50313);const Ge=R(27154);const{Logger:He}=R(33594);const{join:We,dirname:Qe,mkdirp:Je}=R(47077);const{makePathsRelative:Ve}=R(20162);const{isSourceEqual:Ke}=R(22307);const isSorted=v=>{for(let E=1;Ev[E])return false}return true};const sortObject=(v,E)=>{const R={};for(const $ of E.sort()){R[$]=v[$]}return R};const includesHash=(v,E)=>{if(!E)return false;if(Array.isArray(E)){return E.some((E=>v.includes(E)))}else{return v.includes(E)}};class Compiler{constructor(v,E={}){this.hooks=Object.freeze({initialize:new N([]),shouldEmit:new q(["compilation"]),done:new ie(["stats"]),afterDone:new N(["stats"]),additionalPass:new ie([]),beforeRun:new ie(["compiler"]),run:new ie(["compiler"]),emit:new ie(["compilation"]),assetEmitted:new ie(["file","info"]),afterEmit:new ie(["compilation"]),thisCompilation:new N(["compilation","params"]),compilation:new N(["compilation","params"]),normalModuleFactory:new N(["normalModuleFactory"]),contextModuleFactory:new N(["contextModuleFactory"]),beforeCompile:new ie(["params"]),compile:new N(["params"]),make:new G(["compilation"]),finishMake:new ie(["compilation"]),afterCompile:new ie(["compilation"]),readRecords:new ie([]),emitRecords:new ie([]),watchRun:new ie(["compiler"]),failed:new N(["error"]),invalid:new N(["filename","changeTime"]),watchClose:new N([]),shutdown:new ie([]),infrastructureLog:new q(["origin","type","args"]),environment:new N([]),afterEnvironment:new N([]),afterPlugins:new N(["compiler"]),afterResolvers:new N(["compiler"]),entryOption:new q(["context","entry"])});this.webpack=ce;this.name=undefined;this.parentCompilation=undefined;this.root=this;this.outputPath="";this.watching=undefined;this.outputFileSystem=null;this.intermediateFileSystem=null;this.inputFileSystem=null;this.watchFileSystem=null;this.recordsInputPath=null;this.recordsOutputPath=null;this.records={};this.managedPaths=new Set;this.immutablePaths=new Set;this.modifiedFiles=undefined;this.removedFiles=undefined;this.fileTimestamps=undefined;this.contextTimestamps=undefined;this.fsStartTime=undefined;this.resolverFactory=new Le;this.infrastructureLogger=undefined;this.options=E;this.context=v;this.requestShortener=new Be(v,this.root);this.cache=new le;this.moduleMemCaches=undefined;this.compilerPath="";this.running=false;this.idle=false;this.watchMode=false;this._backCompat=this.options.experiments.backCompat!==false;this._lastCompilation=undefined;this._lastNormalModuleFactory=undefined;this._assetEmittingSourceCache=new WeakMap;this._assetEmittingWrittenFiles=new Map;this._assetEmittingPreviousFiles=new Set}getCache(v){return new me(this.cache,`${this.compilerPath}${v}`,this.options.output.hashFunction)}getInfrastructureLogger(v){if(!v){throw new TypeError("Compiler.getInfrastructureLogger(name) called without a name")}return new He(((E,R)=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compiler.getInfrastructureLogger(name) called with a function not returning a name")}}if(this.hooks.infrastructureLog.call(v,E,R)===undefined){if(this.infrastructureLogger!==undefined){this.infrastructureLogger(v,E,R)}}}),(E=>{if(typeof v==="function"){if(typeof E==="function"){return this.getInfrastructureLogger((()=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compiler.getInfrastructureLogger(name) called with a function not returning a name")}}if(typeof E==="function"){E=E();if(!E){throw new TypeError("Logger.getChildLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}else{return this.getInfrastructureLogger((()=>{if(typeof v==="function"){v=v();if(!v){throw new TypeError("Compiler.getInfrastructureLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}}else{if(typeof E==="function"){return this.getInfrastructureLogger((()=>{if(typeof E==="function"){E=E();if(!E){throw new TypeError("Logger.getChildLogger(name) called with a function not returning a name")}}return`${v}/${E}`}))}else{return this.getInfrastructureLogger(`${v}/${E}`)}}}))}_cleanupLastCompilation(){if(this._lastCompilation!==undefined){for(const v of this._lastCompilation.modules){_e.clearChunkGraphForModule(v);Te.clearModuleGraphForModule(v);v.cleanupForCache()}for(const v of this._lastCompilation.chunks){_e.clearChunkGraphForChunk(v)}this._lastCompilation=undefined}}_cleanupLastNormalModuleFactory(){if(this._lastNormalModuleFactory!==undefined){this._lastNormalModuleFactory.cleanupForCache();this._lastNormalModuleFactory=undefined}}watch(v,E){if(this.running){return E(new Me)}this.running=true;this.watchMode=true;this.watching=new Ue(this,v,E);return this.watching}run(v){if(this.running){return v(new Me)}let E;const finalCallback=(R,$)=>{if(E)E.time("beginIdle");this.idle=true;this.cache.beginIdle();this.idle=true;if(E)E.timeEnd("beginIdle");this.running=false;if(R){this.hooks.failed.call(R)}if(v!==undefined)v(R,$);this.hooks.afterDone.call($)};const R=Date.now();this.running=true;const onCompiled=(v,$)=>{if(v)return finalCallback(v);if(this.hooks.shouldEmit.call($)===false){$.startTime=R;$.endTime=Date.now();const v=new qe($);this.hooks.done.callAsync(v,(E=>{if(E)return finalCallback(E);return finalCallback(null,v)}));return}process.nextTick((()=>{E=$.getLogger("webpack.Compiler");E.time("emitAssets");this.emitAssets($,(v=>{E.timeEnd("emitAssets");if(v)return finalCallback(v);if($.hooks.needAdditionalPass.call()){$.needAdditionalPass=true;$.startTime=R;$.endTime=Date.now();E.time("done hook");const v=new qe($);this.hooks.done.callAsync(v,(v=>{E.timeEnd("done hook");if(v)return finalCallback(v);this.hooks.additionalPass.callAsync((v=>{if(v)return finalCallback(v);this.compile(onCompiled)}))}));return}E.time("emitRecords");this.emitRecords((v=>{E.timeEnd("emitRecords");if(v)return finalCallback(v);$.startTime=R;$.endTime=Date.now();E.time("done hook");const j=new qe($);this.hooks.done.callAsync(j,(v=>{E.timeEnd("done hook");if(v)return finalCallback(v);this.cache.storeBuildDependencies($.buildDependencies,(v=>{if(v)return finalCallback(v);return finalCallback(null,j)}))}))}))}))}))};const run=()=>{this.hooks.beforeRun.callAsync(this,(v=>{if(v)return finalCallback(v);this.hooks.run.callAsync(this,(v=>{if(v)return finalCallback(v);this.readRecords((v=>{if(v)return finalCallback(v);this.compile(onCompiled)}))}))}))};if(this.idle){this.cache.endIdle((v=>{if(v)return finalCallback(v);this.idle=false;run()}))}else{run()}}runAsChild(v){const E=Date.now();const finalCallback=(E,R,$)=>{try{v(E,R,$)}catch(v){const E=new Ge(`compiler.runAsChild callback error: ${v}`);E.details=v.stack;this.parentCompilation.errors.push(E)}};this.compile(((v,R)=>{if(v)return finalCallback(v);this.parentCompilation.children.push(R);for(const{name:v,source:E,info:$}of R.getAssets()){this.parentCompilation.emitAsset(v,E,$)}const $=[];for(const v of R.entrypoints.values()){$.push(...v.chunks)}R.startTime=E;R.endTime=Date.now();return finalCallback(null,$,R)}))}purgeInputFileSystem(){if(this.inputFileSystem&&this.inputFileSystem.purge){this.inputFileSystem.purge()}}emitAssets(v,E){let R;const emitFiles=$=>{if($)return E($);const N=v.getAssets();v.assets={...v.assets};const q=new Map;const G=new Set;j.forEachLimit(N,15,(({name:E,source:$,info:j},N)=>{let ie=E;let ce=j.immutable;const le=ie.indexOf("?");if(le>=0){ie=ie.slice(0,le);ce=ce&&(includesHash(ie,j.contenthash)||includesHash(ie,j.chunkhash)||includesHash(ie,j.modulehash)||includesHash(ie,j.fullhash))}const writeOut=j=>{if(j)return N(j);const le=We(this.outputFileSystem,R,ie);G.add(le);const me=this._assetEmittingWrittenFiles.get(le);let _e=this._assetEmittingSourceCache.get($);if(_e===undefined){_e={sizeOnlySource:undefined,writtenTo:new Map};this._assetEmittingSourceCache.set($,_e)}let Ie;const checkSimilarFile=()=>{const v=le.toLowerCase();Ie=q.get(v);if(Ie!==undefined){const{path:v,source:R}=Ie;if(Ke(R,$)){if(Ie.size!==undefined){updateWithReplacementSource(Ie.size)}else{if(!Ie.waiting)Ie.waiting=[];Ie.waiting.push({file:E,cacheEntry:_e})}alreadyWritten()}else{const R=new Ge(`Prevent writing to file that only differs in casing or query string from already written file.\nThis will lead to a race-condition and corrupted files on case-insensitive file systems.\n${le}\n${v}`);R.file=E;N(R)}return true}else{q.set(v,Ie={path:le,source:$,size:undefined,waiting:undefined});return false}};const getContent=()=>{if(typeof $.buffer==="function"){return $.buffer()}else{const v=$.source();if(Buffer.isBuffer(v)){return v}else{return Buffer.from(v,"utf8")}}};const alreadyWritten=()=>{if(me===undefined){const v=1;this._assetEmittingWrittenFiles.set(le,v);_e.writtenTo.set(le,v)}else{_e.writtenTo.set(le,me)}N()};const doWrite=j=>{this.outputFileSystem.writeFile(le,j,(q=>{if(q)return N(q);v.emittedAssets.add(E);const G=me===undefined?1:me+1;_e.writtenTo.set(le,G);this._assetEmittingWrittenFiles.set(le,G);this.hooks.assetEmitted.callAsync(E,{content:j,source:$,outputPath:R,compilation:v,targetPath:le},N)}))};const updateWithReplacementSource=v=>{updateFileWithReplacementSource(E,_e,v);Ie.size=v;if(Ie.waiting!==undefined){for(const{file:E,cacheEntry:R}of Ie.waiting){updateFileWithReplacementSource(E,R,v)}}};const updateFileWithReplacementSource=(E,R,$)=>{if(!R.sizeOnlySource){R.sizeOnlySource=new ae($)}v.updateAsset(E,R.sizeOnlySource,{size:$})};const processExistingFile=R=>{if(ce){updateWithReplacementSource(R.size);return alreadyWritten()}const $=getContent();updateWithReplacementSource($.length);if($.length===R.size){v.comparedForEmitAssets.add(E);return this.outputFileSystem.readFile(le,((v,E)=>{if(v||!$.equals(E)){return doWrite($)}else{return alreadyWritten()}}))}return doWrite($)};const processMissingFile=()=>{const v=getContent();updateWithReplacementSource(v.length);return doWrite(v)};if(me!==undefined){const R=_e.writtenTo.get(le);if(R===me){if(this._assetEmittingPreviousFiles.has(le)){v.updateAsset(E,_e.sizeOnlySource,{size:_e.sizeOnlySource.size()});return N()}else{ce=true}}else if(!ce){if(checkSimilarFile())return;return processMissingFile()}}if(checkSimilarFile())return;if(this.options.output.compareBeforeEmit){this.outputFileSystem.stat(le,((v,E)=>{const R=!v&&E.isFile();if(R){processExistingFile(E)}else{processMissingFile()}}))}else{processMissingFile()}};if(ie.match(/\/|\\/)){const v=this.outputFileSystem;const E=Qe(v,We(v,R,ie));Je(v,E,writeOut)}else{writeOut()}}),(R=>{q.clear();if(R){this._assetEmittingPreviousFiles.clear();return E(R)}this._assetEmittingPreviousFiles=G;this.hooks.afterEmit.callAsync(v,(v=>{if(v)return E(v);return E()}))}))};this.hooks.emit.callAsync(v,($=>{if($)return E($);R=v.getPath(this.outputPath,{});Je(this.outputFileSystem,R,emitFiles)}))}emitRecords(v){if(this.hooks.emitRecords.isUsed()){if(this.recordsOutputPath){j.parallel([v=>this.hooks.emitRecords.callAsync(v),this._emitRecords.bind(this)],(E=>v(E)))}else{this.hooks.emitRecords.callAsync(v)}}else{if(this.recordsOutputPath){this._emitRecords(v)}else{v()}}}_emitRecords(v){const writeFile=()=>{this.outputFileSystem.writeFile(this.recordsOutputPath,JSON.stringify(this.records,((v,E)=>{if(typeof E==="object"&&E!==null&&!Array.isArray(E)){const v=Object.keys(E);if(!isSorted(v)){return sortObject(E,v)}}return E}),2),v)};const E=Qe(this.outputFileSystem,this.recordsOutputPath);if(!E){return writeFile()}Je(this.outputFileSystem,E,(E=>{if(E)return v(E);writeFile()}))}readRecords(v){if(this.hooks.readRecords.isUsed()){if(this.recordsInputPath){j.parallel([v=>this.hooks.readRecords.callAsync(v),this._readRecords.bind(this)])}else{this.records={};this.hooks.readRecords.callAsync(v)}}else{if(this.recordsInputPath){this._readRecords(v)}else{this.records={};v()}}}_readRecords(v){if(!this.recordsInputPath){this.records={};return v()}this.inputFileSystem.stat(this.recordsInputPath,(E=>{if(E)return v();this.inputFileSystem.readFile(this.recordsInputPath,((E,R)=>{if(E)return v(E);try{this.records=$(R.toString("utf-8"))}catch(E){E.message="Cannot parse records: "+E.message;return v(E)}return v()}))}))}createChildCompiler(v,E,R,$,j){const N=new Compiler(this.context,{...this.options,output:{...this.options.output,...$}});N.name=E;N.outputPath=this.outputPath;N.inputFileSystem=this.inputFileSystem;N.outputFileSystem=null;N.resolverFactory=this.resolverFactory;N.modifiedFiles=this.modifiedFiles;N.removedFiles=this.removedFiles;N.fileTimestamps=this.fileTimestamps;N.contextTimestamps=this.contextTimestamps;N.fsStartTime=this.fsStartTime;N.cache=this.cache;N.compilerPath=`${this.compilerPath}${E}|${R}|`;N._backCompat=this._backCompat;const q=Ve(this.context,E,this.root);if(!this.records[q]){this.records[q]=[]}if(this.records[q][R]){N.records=this.records[q][R]}else{this.records[q].push(N.records={})}N.parentCompilation=v;N.root=this.root;if(Array.isArray(j)){for(const v of j){v.apply(N)}}for(const v in this.hooks){if(!["make","compile","emit","afterEmit","invalid","done","thisCompilation"].includes(v)){if(N.hooks[v]){N.hooks[v].taps=this.hooks[v].taps.slice()}}}v.hooks.childCompiler.call(N,E,R);return N}isChild(){return!!this.parentCompilation}createCompilation(v){this._cleanupLastCompilation();return this._lastCompilation=new Ie(this,v)}newCompilation(v){const E=this.createCompilation(v);E.name=this.name;E.records=this.records;this.hooks.thisCompilation.call(E,v);this.hooks.compilation.call(E,v);return E}createNormalModuleFactory(){this._cleanupLastNormalModuleFactory();const v=new Ne({context:this.options.context,fs:this.inputFileSystem,resolverFactory:this.resolverFactory,options:this.options.module,associatedObjectForCache:this.root,layers:this.options.experiments.layers});this._lastNormalModuleFactory=v;this.hooks.normalModuleFactory.call(v);return v}createContextModuleFactory(){const v=new Oe(this.resolverFactory);this.hooks.contextModuleFactory.call(v);return v}newCompilationParams(){const v={normalModuleFactory:this.createNormalModuleFactory(),contextModuleFactory:this.createContextModuleFactory()};return v}compile(v){const E=this.newCompilationParams();this.hooks.beforeCompile.callAsync(E,(R=>{if(R)return v(R);this.hooks.compile.call(E);const $=this.newCompilation(E);const j=$.getLogger("webpack.Compiler");j.time("make hook");this.hooks.make.callAsync($,(E=>{j.timeEnd("make hook");if(E)return v(E);j.time("finish make hook");this.hooks.finishMake.callAsync($,(E=>{j.timeEnd("finish make hook");if(E)return v(E);process.nextTick((()=>{j.time("finish compilation");$.finish((E=>{j.timeEnd("finish compilation");if(E)return v(E);j.time("seal compilation");$.seal((E=>{j.timeEnd("seal compilation");if(E)return v(E);j.time("afterCompile hook");this.hooks.afterCompile.callAsync($,(E=>{j.timeEnd("afterCompile hook");if(E)return v(E);return v(null,$)}))}))}))}))}))}))}))}close(v){if(this.watching){this.watching.close((E=>{this.close(v)}));return}this.hooks.shutdown.callAsync((E=>{if(E)return v(E);this._lastCompilation=undefined;this._lastNormalModuleFactory=undefined;this.cache.shutdown(v)}))}}v.exports=Compiler},81701:function(v){"use strict";const E=/^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_directImport)?(?:_asiSafe(\d))?__$/;const R="__WEBPACK_DEFAULT_EXPORT__";const $="__WEBPACK_NAMESPACE_OBJECT__";class ConcatenationScope{constructor(v,E){this._currentModule=E;if(Array.isArray(v)){const E=new Map;for(const R of v){E.set(R.module,R)}v=E}this._modulesMap=v}isModuleInScope(v){return this._modulesMap.has(v)}registerExport(v,E){if(!this._currentModule.exportMap){this._currentModule.exportMap=new Map}if(!this._currentModule.exportMap.has(v)){this._currentModule.exportMap.set(v,E)}}registerRawExport(v,E){if(!this._currentModule.rawExportMap){this._currentModule.rawExportMap=new Map}if(!this._currentModule.rawExportMap.has(v)){this._currentModule.rawExportMap.set(v,E)}}registerNamespaceExport(v){this._currentModule.namespaceExportSymbol=v}createModuleReference(v,{ids:E=undefined,call:R=false,directImport:$=false,asiSafe:j=false}){const N=this._modulesMap.get(v);const q=R?"_call":"";const G=$?"_directImport":"";const ie=j?"_asiSafe1":j===false?"_asiSafe0":"";const ae=E?Buffer.from(JSON.stringify(E),"utf-8").toString("hex"):"ns";return`__WEBPACK_MODULE_REFERENCE__${N.index}_${ae}${q}${G}${ie}__._`}static isModuleReference(v){return E.test(v)}static matchModuleReference(v){const R=E.exec(v);if(!R)return null;const $=+R[1];const j=R[5];return{index:$,ids:R[2]==="ns"?[]:JSON.parse(Buffer.from(R[2],"hex").toString("utf-8")),call:!!R[3],directImport:!!R[4],asiSafe:j?j==="1":undefined}}}ConcatenationScope.DEFAULT_EXPORT=R;ConcatenationScope.NAMESPACE_OBJECT_EXPORT=$;v.exports=ConcatenationScope},56275:function(v,E,R){"use strict";const $=R(27154);v.exports=class ConcurrentCompilationError extends ${constructor(){super();this.name="ConcurrentCompilationError";this.message="You ran Webpack twice. Each instance only supports a single concurrent compilation at a time."}}},47146:function(v,E,R){"use strict";const{ConcatSource:$,PrefixSource:j}=R(51255);const N=R(64768);const q=R(43841);const{mergeRuntime:G}=R(47462);const wrapInCondition=(v,E)=>{if(typeof E==="string"){return q.asString([`if (${v}) {`,q.indent(E),"}",""])}else{return new $(`if (${v}) {\n`,new j("\t",E),"}\n")}};class ConditionalInitFragment extends N{constructor(v,E,R,$,j=true,N){super(v,E,R,$,N);this.runtimeCondition=j}getContent(v){if(this.runtimeCondition===false||!this.content)return"";if(this.runtimeCondition===true)return this.content;const E=v.runtimeTemplate.runtimeConditionExpression({chunkGraph:v.chunkGraph,runtimeRequirements:v.runtimeRequirements,runtime:v.runtime,runtimeCondition:this.runtimeCondition});if(E==="true")return this.content;return wrapInCondition(E,this.content)}getEndContent(v){if(this.runtimeCondition===false||!this.endContent)return"";if(this.runtimeCondition===true)return this.endContent;const E=v.runtimeTemplate.runtimeConditionExpression({chunkGraph:v.chunkGraph,runtimeRequirements:v.runtimeRequirements,runtime:v.runtime,runtimeCondition:this.runtimeCondition});if(E==="true")return this.endContent;return wrapInCondition(E,this.endContent)}merge(v){if(this.runtimeCondition===true)return this;if(v.runtimeCondition===true)return v;if(this.runtimeCondition===false)return v;if(v.runtimeCondition===false)return this;const E=G(this.runtimeCondition,v.runtimeCondition);return new ConditionalInitFragment(this.content,this.stage,this.position,this.key,E,this.endContent)}}v.exports=ConditionalInitFragment},37163:function(v,E,R){"use strict";const $=R(83106);const j=R(14367);const{evaluateToString:N}=R(97574);const{parseResource:q}=R(20162);const collectDeclaration=(v,E)=>{const R=[E];while(R.length>0){const E=R.pop();switch(E.type){case"Identifier":v.add(E.name);break;case"ArrayPattern":for(const v of E.elements){if(v){R.push(v)}}break;case"AssignmentPattern":R.push(E.left);break;case"ObjectPattern":for(const v of E.properties){R.push(v.value)}break;case"RestElement":R.push(E.argument);break}}};const getHoistedDeclarations=(v,E)=>{const R=new Set;const $=[v];while($.length>0){const v=$.pop();if(!v)continue;switch(v.type){case"BlockStatement":for(const E of v.body){$.push(E)}break;case"IfStatement":$.push(v.consequent);$.push(v.alternate);break;case"ForStatement":$.push(v.init);$.push(v.body);break;case"ForInStatement":case"ForOfStatement":$.push(v.left);$.push(v.body);break;case"DoWhileStatement":case"WhileStatement":case"LabeledStatement":$.push(v.body);break;case"SwitchStatement":for(const E of v.cases){for(const v of E.consequent){$.push(v)}}break;case"TryStatement":$.push(v.block);if(v.handler){$.push(v.handler.body)}$.push(v.finalizer);break;case"FunctionDeclaration":if(E){collectDeclaration(R,v.id)}break;case"VariableDeclaration":if(v.kind==="var"){for(const E of v.declarations){collectDeclaration(R,E.id)}}break}}return Array.from(R)};class ConstPlugin{apply(v){const E=q.bindCache(v.root);v.hooks.compilation.tap("ConstPlugin",((v,{normalModuleFactory:R})=>{v.dependencyTemplates.set(j,new j.Template);v.dependencyTemplates.set($,new $.Template);const handler=v=>{v.hooks.statementIf.tap("ConstPlugin",(E=>{if(v.scope.isAsmJs)return;const R=v.evaluateExpression(E.test);const $=R.asBool();if(typeof $==="boolean"){if(!R.couldHaveSideEffects()){const N=new j(`${$}`,R.range);N.loc=E.loc;v.state.module.addPresentationalDependency(N)}else{v.walkExpression(E.test)}const N=$?E.alternate:E.consequent;if(N){let E;if(v.scope.isStrict){E=getHoistedDeclarations(N,false)}else{E=getHoistedDeclarations(N,true)}let R;if(E.length>0){R=`{ var ${E.join(", ")}; }`}else{R="{}"}const $=new j(R,N.range);$.loc=N.loc;v.state.module.addPresentationalDependency($)}return $}}));v.hooks.expressionConditionalOperator.tap("ConstPlugin",(E=>{if(v.scope.isAsmJs)return;const R=v.evaluateExpression(E.test);const $=R.asBool();if(typeof $==="boolean"){if(!R.couldHaveSideEffects()){const N=new j(` ${$}`,R.range);N.loc=E.loc;v.state.module.addPresentationalDependency(N)}else{v.walkExpression(E.test)}const N=$?E.alternate:E.consequent;const q=new j("0",N.range);q.loc=N.loc;v.state.module.addPresentationalDependency(q);return $}}));v.hooks.expressionLogicalOperator.tap("ConstPlugin",(E=>{if(v.scope.isAsmJs)return;if(E.operator==="&&"||E.operator==="||"){const R=v.evaluateExpression(E.left);const $=R.asBool();if(typeof $==="boolean"){const N=E.operator==="&&"&&$||E.operator==="||"&&!$;if(!R.couldHaveSideEffects()&&(R.isBoolean()||N)){const N=new j(` ${$}`,R.range);N.loc=E.loc;v.state.module.addPresentationalDependency(N)}else{v.walkExpression(E.left)}if(!N){const R=new j("0",E.right.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R)}return N}}else if(E.operator==="??"){const R=v.evaluateExpression(E.left);const $=R.asNullish();if(typeof $==="boolean"){if(!R.couldHaveSideEffects()&&$){const $=new j(" null",R.range);$.loc=E.loc;v.state.module.addPresentationalDependency($)}else{const R=new j("0",E.right.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);v.walkExpression(E.left)}return $}}}));v.hooks.optionalChaining.tap("ConstPlugin",(E=>{const R=[];let $=E.expression;while($.type==="MemberExpression"||$.type==="CallExpression"){if($.type==="MemberExpression"){if($.optional){R.push($.object)}$=$.object}else{if($.optional){R.push($.callee)}$=$.callee}}while(R.length){const $=R.pop();const N=v.evaluateExpression($);if(N.asNullish()){const R=new j(" undefined",E.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}}}));v.hooks.evaluateIdentifier.for("__resourceQuery").tap("ConstPlugin",(R=>{if(v.scope.isAsmJs)return;if(!v.state.module)return;return N(E(v.state.module.resource).query)(R)}));v.hooks.expression.for("__resourceQuery").tap("ConstPlugin",(R=>{if(v.scope.isAsmJs)return;if(!v.state.module)return;const j=new $(JSON.stringify(E(v.state.module.resource).query),R.range,"__resourceQuery");j.loc=R.loc;v.state.module.addPresentationalDependency(j);return true}));v.hooks.evaluateIdentifier.for("__resourceFragment").tap("ConstPlugin",(R=>{if(v.scope.isAsmJs)return;if(!v.state.module)return;return N(E(v.state.module.resource).fragment)(R)}));v.hooks.expression.for("__resourceFragment").tap("ConstPlugin",(R=>{if(v.scope.isAsmJs)return;if(!v.state.module)return;const j=new $(JSON.stringify(E(v.state.module.resource).fragment),R.range,"__resourceFragment");j.loc=R.loc;v.state.module.addPresentationalDependency(j);return true}))};R.hooks.parser.for("javascript/auto").tap("ConstPlugin",handler);R.hooks.parser.for("javascript/dynamic").tap("ConstPlugin",handler);R.hooks.parser.for("javascript/esm").tap("ConstPlugin",handler)}))}}v.exports=ConstPlugin},98633:function(v){"use strict";class ContextExclusionPlugin{constructor(v){this.negativeMatcher=v}apply(v){v.hooks.contextModuleFactory.tap("ContextExclusionPlugin",(v=>{v.hooks.contextModuleFiles.tap("ContextExclusionPlugin",(v=>v.filter((v=>!this.negativeMatcher.test(v)))))}))}}v.exports=ContextExclusionPlugin},49994:function(v,E,R){"use strict";const{OriginalSource:$,RawSource:j}=R(51255);const N=R(42290);const{makeWebpackError:q}=R(35230);const G=R(53840);const ie=R(39201);const ae=R(43841);const ce=R(27154);const{compareLocations:le,concatComparators:me,compareSelect:_e,keepOriginalOrder:Ie,compareModulesById:Me}=R(58792);const{contextify:Oe,parseResource:Te,makePathsRelative:Ne}=R(20162);const Be=R(65764);const Le={timestamp:true};const qe=new Set(["javascript"]);class ContextModule extends G{constructor(v,E){if(!E||typeof E.resource==="string"){const v=Te(E?E.resource:"");const R=v.path;const $=E&&E.resourceQuery||v.query;const j=E&&E.resourceFragment||v.fragment;super("javascript/dynamic",R);this.options={...E,resource:R,resourceQuery:$,resourceFragment:j}}else{super("javascript/dynamic");this.options={...E,resource:E.resource,resourceQuery:E.resourceQuery||"",resourceFragment:E.resourceFragment||""}}this.resolveDependencies=v;if(E&&E.resolveOptions!==undefined){this.resolveOptions=E.resolveOptions}if(E&&typeof E.mode!=="string"){throw new Error("options.mode is a required option")}this._identifier=this._createIdentifier();this._forceBuild=true}getSourceTypes(){return qe}updateCacheModule(v){const E=v;this.resolveDependencies=E.resolveDependencies;this.options=E.options}cleanupForCache(){super.cleanupForCache();this.resolveDependencies=undefined}_prettyRegExp(v,E=true){const R=(v+"").replace(/!/g,"%21").replace(/\|/g,"%7C");return E?R.substring(1,R.length-1):R}_createIdentifier(){let v=this.context||(typeof this.options.resource==="string"||this.options.resource===false?`${this.options.resource}`:this.options.resource.join("|"));if(this.options.resourceQuery){v+=`|${this.options.resourceQuery}`}if(this.options.resourceFragment){v+=`|${this.options.resourceFragment}`}if(this.options.mode){v+=`|${this.options.mode}`}if(!this.options.recursive){v+="|nonrecursive"}if(this.options.addon){v+=`|${this.options.addon}`}if(this.options.regExp){v+=`|${this._prettyRegExp(this.options.regExp,false)}`}if(this.options.include){v+=`|include: ${this._prettyRegExp(this.options.include,false)}`}if(this.options.exclude){v+=`|exclude: ${this._prettyRegExp(this.options.exclude,false)}`}if(this.options.referencedExports){v+=`|referencedExports: ${JSON.stringify(this.options.referencedExports)}`}if(this.options.chunkName){v+=`|chunkName: ${this.options.chunkName}`}if(this.options.groupOptions){v+=`|groupOptions: ${JSON.stringify(this.options.groupOptions)}`}if(this.options.namespaceObject==="strict"){v+="|strict namespace object"}else if(this.options.namespaceObject){v+="|namespace object"}return v}identifier(){return this._identifier}readableIdentifier(v){let E;if(this.context){E=v.shorten(this.context)+"/"}else if(typeof this.options.resource==="string"||this.options.resource===false){E=v.shorten(`${this.options.resource}`)+"/"}else{E=this.options.resource.map((E=>v.shorten(E)+"/")).join(" ")}if(this.options.resourceQuery){E+=` ${this.options.resourceQuery}`}if(this.options.mode){E+=` ${this.options.mode}`}if(!this.options.recursive){E+=" nonrecursive"}if(this.options.addon){E+=` ${v.shorten(this.options.addon)}`}if(this.options.regExp){E+=` ${this._prettyRegExp(this.options.regExp)}`}if(this.options.include){E+=` include: ${this._prettyRegExp(this.options.include)}`}if(this.options.exclude){E+=` exclude: ${this._prettyRegExp(this.options.exclude)}`}if(this.options.referencedExports){E+=` referencedExports: ${this.options.referencedExports.map((v=>v.join("."))).join(", ")}`}if(this.options.chunkName){E+=` chunkName: ${this.options.chunkName}`}if(this.options.groupOptions){const v=this.options.groupOptions;for(const R of Object.keys(v)){E+=` ${R}: ${v[R]}`}}if(this.options.namespaceObject==="strict"){E+=" strict namespace object"}else if(this.options.namespaceObject){E+=" namespace object"}return E}libIdent(v){let E;if(this.context){E=Oe(v.context,this.context,v.associatedObjectForCache)}else if(typeof this.options.resource==="string"){E=Oe(v.context,this.options.resource,v.associatedObjectForCache)}else if(this.options.resource===false){E="false"}else{E=this.options.resource.map((E=>Oe(v.context,E,v.associatedObjectForCache))).join(" ")}if(this.layer)E=`(${this.layer})/${E}`;if(this.options.mode){E+=` ${this.options.mode}`}if(this.options.recursive){E+=" recursive"}if(this.options.addon){E+=` ${Oe(v.context,this.options.addon,v.associatedObjectForCache)}`}if(this.options.regExp){E+=` ${this._prettyRegExp(this.options.regExp)}`}if(this.options.include){E+=` include: ${this._prettyRegExp(this.options.include)}`}if(this.options.exclude){E+=` exclude: ${this._prettyRegExp(this.options.exclude)}`}if(this.options.referencedExports){E+=` referencedExports: ${this.options.referencedExports.map((v=>v.join("."))).join(", ")}`}return E}invalidateBuild(){this._forceBuild=true}needBuild({fileSystemInfo:v},E){if(this._forceBuild)return E(null,true);if(!this.buildInfo.snapshot)return E(null,Boolean(this.context||this.options.resource));v.checkSnapshotValid(this.buildInfo.snapshot,((v,R)=>{E(v,!R)}))}build(v,E,R,$,j){this._forceBuild=false;this.buildMeta={exportsType:"default",defaultObject:"redirect-warn"};this.buildInfo={snapshot:undefined};this.dependencies.length=0;this.blocks.length=0;const G=Date.now();this.resolveDependencies($,this.options,((v,R)=>{if(v){return j(q(v,"ContextModule.resolveDependencies"))}if(!R){j();return}for(const v of R){v.loc={name:v.userRequest};v.request=this.options.addon+v.request}R.sort(me(_e((v=>v.loc),le),Ie(this.dependencies)));if(this.options.mode==="sync"||this.options.mode==="eager"){this.dependencies=R}else if(this.options.mode==="lazy-once"){if(R.length>0){const v=new N({...this.options.groupOptions,name:this.options.chunkName});for(const E of R){v.addDependency(E)}this.addBlock(v)}}else if(this.options.mode==="weak"||this.options.mode==="async-weak"){for(const v of R){v.weak=true}this.dependencies=R}else if(this.options.mode==="lazy"){let v=0;for(const E of R){let R=this.options.chunkName;if(R){if(!/\[(index|request)\]/.test(R)){R+="[index]"}R=R.replace(/\[index\]/g,`${v++}`);R=R.replace(/\[request\]/g,ae.toPath(E.userRequest))}const $=new N({...this.options.groupOptions,name:R},E.loc,E.userRequest);$.addDependency(E);this.addBlock($)}}else{j(new ce(`Unsupported mode "${this.options.mode}" in context`));return}if(!this.context&&!this.options.resource)return j();E.fileSystemInfo.createSnapshot(G,null,this.context?[this.context]:typeof this.options.resource==="string"?[this.options.resource]:this.options.resource,null,Le,((v,E)=>{if(v)return j(v);this.buildInfo.snapshot=E;j()}))}))}addCacheDependencies(v,E,R,$){if(this.context){E.add(this.context)}else if(typeof this.options.resource==="string"){E.add(this.options.resource)}else if(this.options.resource===false){return}else{for(const v of this.options.resource)E.add(v)}}getUserRequestMap(v,E){const R=E.moduleGraph;const $=v.filter((v=>R.getModule(v))).sort(((v,E)=>{if(v.userRequest===E.userRequest){return 0}return v.userRequestR.getModule(v))).filter(Boolean).sort(j);const q=Object.create(null);for(const v of N){const j=v.getExportsType(R,this.options.namespaceObject==="strict");const N=E.getModuleId(v);switch(j){case"namespace":q[N]=9;$|=1;break;case"dynamic":q[N]=7;$|=2;break;case"default-only":q[N]=1;$|=4;break;case"default-with-named":q[N]=3;$|=8;break;default:throw new Error(`Unexpected exports type ${j}`)}}if($===1){return 9}if($===2){return 7}if($===4){return 1}if($===8){return 3}if($===0){return 9}return q}getFakeMapInitStatement(v){return typeof v==="object"?`var fakeMap = ${JSON.stringify(v,null,"\t")};`:""}getReturn(v,E){if(v===9){return"__webpack_require__(id)"}return`${ie.createFakeNamespaceObject}(id, ${v}${E?" | 16":""})`}getReturnModuleObjectSource(v,E,R="fakeMap[id]"){if(typeof v==="number"){return`return ${this.getReturn(v,E)};`}return`return ${ie.createFakeNamespaceObject}(id, ${R}${E?" | 16":""})`}getSyncSource(v,E,R){const $=this.getUserRequestMap(v,R);const j=this.getFakeMap(v,R);const N=this.getReturnModuleObjectSource(j);return`var map = ${JSON.stringify($,null,"\t")};\n${this.getFakeMapInitStatement(j)}\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\t${N}\n}\nfunction webpackContextResolve(req) {\n\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = ${JSON.stringify(E)};`}getWeakSyncSource(v,E,R){const $=this.getUserRequestMap(v,R);const j=this.getFakeMap(v,R);const N=this.getReturnModuleObjectSource(j);return`var map = ${JSON.stringify($,null,"\t")};\n${this.getFakeMapInitStatement(j)}\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tif(!${ie.moduleFactories}[id]) {\n\t\tvar e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t${N}\n}\nfunction webpackContextResolve(req) {\n\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nwebpackContext.id = ${JSON.stringify(E)};\nmodule.exports = webpackContext;`}getAsyncWeakSource(v,E,{chunkGraph:R,runtimeTemplate:$}){const j=$.supportsArrowFunction();const N=this.getUserRequestMap(v,R);const q=this.getFakeMap(v,R);const G=this.getReturnModuleObjectSource(q,true);return`var map = ${JSON.stringify(N,null,"\t")};\n${this.getFakeMapInitStatement(q)}\n\nfunction webpackAsyncContext(req) {\n\treturn webpackAsyncContextResolve(req).then(${j?"id =>":"function(id)"} {\n\t\tif(!${ie.moduleFactories}[id]) {\n\t\t\tvar e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\t\t${G}\n\t});\n}\nfunction webpackAsyncContextResolve(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(${j?"() =>":"function()"} {\n\t\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\t\treturn map[req];\n\t});\n}\nwebpackAsyncContext.keys = ${$.returningFunction("Object.keys(map)")};\nwebpackAsyncContext.resolve = webpackAsyncContextResolve;\nwebpackAsyncContext.id = ${JSON.stringify(E)};\nmodule.exports = webpackAsyncContext;`}getEagerSource(v,E,{chunkGraph:R,runtimeTemplate:$}){const j=$.supportsArrowFunction();const N=this.getUserRequestMap(v,R);const q=this.getFakeMap(v,R);const G=q!==9?`${j?"id =>":"function(id)"} {\n\t\t${this.getReturnModuleObjectSource(q)}\n\t}`:"__webpack_require__";return`var map = ${JSON.stringify(N,null,"\t")};\n${this.getFakeMapInitStatement(q)}\n\nfunction webpackAsyncContext(req) {\n\treturn webpackAsyncContextResolve(req).then(${G});\n}\nfunction webpackAsyncContextResolve(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(${j?"() =>":"function()"} {\n\t\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\t\treturn map[req];\n\t});\n}\nwebpackAsyncContext.keys = ${$.returningFunction("Object.keys(map)")};\nwebpackAsyncContext.resolve = webpackAsyncContextResolve;\nwebpackAsyncContext.id = ${JSON.stringify(E)};\nmodule.exports = webpackAsyncContext;`}getLazyOnceSource(v,E,R,{runtimeTemplate:$,chunkGraph:j}){const N=$.blockPromise({chunkGraph:j,block:v,message:"lazy-once context",runtimeRequirements:new Set});const q=$.supportsArrowFunction();const G=this.getUserRequestMap(E,j);const ae=this.getFakeMap(E,j);const ce=ae!==9?`${q?"id =>":"function(id)"} {\n\t\t${this.getReturnModuleObjectSource(ae,true)};\n\t}`:"__webpack_require__";return`var map = ${JSON.stringify(G,null,"\t")};\n${this.getFakeMapInitStatement(ae)}\n\nfunction webpackAsyncContext(req) {\n\treturn webpackAsyncContextResolve(req).then(${ce});\n}\nfunction webpackAsyncContextResolve(req) {\n\treturn ${N}.then(${q?"() =>":"function()"} {\n\t\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\t\treturn map[req];\n\t});\n}\nwebpackAsyncContext.keys = ${$.returningFunction("Object.keys(map)")};\nwebpackAsyncContext.resolve = webpackAsyncContextResolve;\nwebpackAsyncContext.id = ${JSON.stringify(R)};\nmodule.exports = webpackAsyncContext;`}getLazySource(v,E,{chunkGraph:R,runtimeTemplate:$}){const j=R.moduleGraph;const N=$.supportsArrowFunction();let q=false;let G=true;const ae=this.getFakeMap(v.map((v=>v.dependencies[0])),R);const ce=typeof ae==="object";const le=v.map((v=>{const E=v.dependencies[0];return{dependency:E,module:j.getModule(E),block:v,userRequest:E.userRequest,chunks:undefined}})).filter((v=>v.module));for(const v of le){const E=R.getBlockChunkGroup(v.block);const $=E&&E.chunks||[];v.chunks=$;if($.length>0){G=false}if($.length!==1){q=true}}const me=G&&!ce;const _e=le.sort(((v,E)=>{if(v.userRequest===E.userRequest)return 0;return v.userRequestv.id)))}}const Me=ce?2:1;const Oe=G?"Promise.resolve()":q?`Promise.all(ids.slice(${Me}).map(${ie.ensureChunk}))`:`${ie.ensureChunk}(ids[${Me}])`;const Te=this.getReturnModuleObjectSource(ae,true,me?"invalid":"ids[1]");const Ne=Oe==="Promise.resolve()"?`\nfunction webpackAsyncContext(req) {\n\treturn Promise.resolve().then(${N?"() =>":"function()"} {\n\t\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\n\t\t${me?"var id = map[req];":"var ids = map[req], id = ids[0];"}\n\t\t${Te}\n\t});\n}`:`function webpackAsyncContext(req) {\n\tif(!${ie.hasOwnProperty}(map, req)) {\n\t\treturn Promise.resolve().then(${N?"() =>":"function()"} {\n\t\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn ${Oe}.then(${N?"() =>":"function()"} {\n\t\t${Te}\n\t});\n}`;return`var map = ${JSON.stringify(Ie,null,"\t")};\n${Ne}\nwebpackAsyncContext.keys = ${$.returningFunction("Object.keys(map)")};\nwebpackAsyncContext.id = ${JSON.stringify(E)};\nmodule.exports = webpackAsyncContext;`}getSourceForEmptyContext(v,E){return`function webpackEmptyContext(req) {\n\tvar e = new Error("Cannot find module '" + req + "'");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = ${E.returningFunction("[]")};\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = ${JSON.stringify(v)};\nmodule.exports = webpackEmptyContext;`}getSourceForEmptyAsyncContext(v,E){const R=E.supportsArrowFunction();return`function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(${R?"() =>":"function()"} {\n\t\tvar e = new Error("Cannot find module '" + req + "'");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = ${E.returningFunction("[]")};\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = ${JSON.stringify(v)};\nmodule.exports = webpackEmptyAsyncContext;`}getSourceString(v,{runtimeTemplate:E,chunkGraph:R}){const $=R.getModuleId(this);if(v==="lazy"){if(this.blocks&&this.blocks.length>0){return this.getLazySource(this.blocks,$,{runtimeTemplate:E,chunkGraph:R})}return this.getSourceForEmptyAsyncContext($,E)}if(v==="eager"){if(this.dependencies&&this.dependencies.length>0){return this.getEagerSource(this.dependencies,$,{chunkGraph:R,runtimeTemplate:E})}return this.getSourceForEmptyAsyncContext($,E)}if(v==="lazy-once"){const v=this.blocks[0];if(v){return this.getLazyOnceSource(v,v.dependencies,$,{runtimeTemplate:E,chunkGraph:R})}return this.getSourceForEmptyAsyncContext($,E)}if(v==="async-weak"){if(this.dependencies&&this.dependencies.length>0){return this.getAsyncWeakSource(this.dependencies,$,{chunkGraph:R,runtimeTemplate:E})}return this.getSourceForEmptyAsyncContext($,E)}if(v==="weak"){if(this.dependencies&&this.dependencies.length>0){return this.getWeakSyncSource(this.dependencies,$,R)}}if(this.dependencies&&this.dependencies.length>0){return this.getSyncSource(this.dependencies,$,R)}return this.getSourceForEmptyContext($,E)}getSource(v,E){if(this.useSourceMap||this.useSimpleSourceMap){return new $(v,`webpack://${Ne(E&&E.compiler.context||"",this.identifier(),E&&E.compiler.root)}`)}return new j(v)}codeGeneration(v){const{chunkGraph:E,compilation:R}=v;const $=new Map;$.set("javascript",this.getSource(this.getSourceString(this.options.mode,v),R));const j=new Set;const N=this.dependencies.length>0?this.dependencies.slice():[];for(const v of this.blocks)for(const E of v.dependencies)N.push(E);j.add(ie.module);j.add(ie.hasOwnProperty);if(N.length>0){const v=this.options.mode;j.add(ie.require);if(v==="weak"){j.add(ie.moduleFactories)}else if(v==="async-weak"){j.add(ie.moduleFactories);j.add(ie.ensureChunk)}else if(v==="lazy"||v==="lazy-once"){j.add(ie.ensureChunk)}if(this.getFakeMap(N,E)!==9){j.add(ie.createFakeNamespaceObject)}}return{sources:$,runtimeRequirements:j}}size(v){let E=160;for(const v of this.dependencies){const R=v;E+=5+R.userRequest.length}return E}serialize(v){const{write:E}=v;E(this._identifier);E(this._forceBuild);super.serialize(v)}deserialize(v){const{read:E}=v;this._identifier=E();this._forceBuild=E();super.deserialize(v)}}Be(ContextModule,"webpack/lib/ContextModule");v.exports=ContextModule},5444:function(v,E,R){"use strict";const $=R(78175);const{AsyncSeriesWaterfallHook:j,SyncWaterfallHook:N}=R(44217);const q=R(49994);const G=R(39744);const ie=R(34192);const ae=R(96522);const{cachedSetProperty:ce}=R(22093);const{createFakeHook:le}=R(99321);const{join:me}=R(47077);const _e={};v.exports=class ContextModuleFactory extends G{constructor(v){super();const E=new j(["modules","options"]);this.hooks=Object.freeze({beforeResolve:new j(["data"]),afterResolve:new j(["data"]),contextModuleFiles:new N(["files"]),alternatives:le({name:"alternatives",intercept:v=>{throw new Error("Intercepting fake hook ContextModuleFactory.hooks.alternatives is not possible, use ContextModuleFactory.hooks.alternativeRequests instead")},tap:(v,R)=>{E.tap(v,R)},tapAsync:(v,R)=>{E.tapAsync(v,((v,E,$)=>R(v,$)))},tapPromise:(v,R)=>{E.tapPromise(v,R)}},"ContextModuleFactory.hooks.alternatives has deprecated in favor of ContextModuleFactory.hooks.alternativeRequests with an additional options argument.","DEP_WEBPACK_CONTEXT_MODULE_FACTORY_ALTERNATIVES"),alternativeRequests:E});this.resolverFactory=v}create(v,E){const R=v.context;const j=v.dependencies;const N=v.resolveOptions;const G=j[0];const ie=new ae;const le=new ae;const me=new ae;this.hooks.beforeResolve.callAsync({context:R,dependencies:j,resolveOptions:N,fileDependencies:ie,missingDependencies:le,contextDependencies:me,...G.options},((v,R)=>{if(v){return E(v,{fileDependencies:ie,missingDependencies:le,contextDependencies:me})}if(!R){return E(null,{fileDependencies:ie,missingDependencies:le,contextDependencies:me})}const N=R.context;const G=R.request;const ae=R.resolveOptions;let Ie,Me,Oe="";const Te=G.lastIndexOf("!");if(Te>=0){let v=G.slice(0,Te+1);let E;for(E=0;E0?ce(ae||_e,"dependencyType",j[0].category):ae);const Be=this.resolverFactory.get("loader");$.parallel([v=>{const E=[];const yield_=v=>E.push(v);Ne.resolve({},N,Me,{fileDependencies:ie,missingDependencies:le,contextDependencies:me,yield:yield_},(R=>{if(R)return v(R);v(null,E)}))},v=>{$.map(Ie,((v,E)=>{Be.resolve({},N,v,{fileDependencies:ie,missingDependencies:le,contextDependencies:me},((v,R)=>{if(v)return E(v);E(null,R)}))}),v)}],((v,$)=>{if(v){return E(v,{fileDependencies:ie,missingDependencies:le,contextDependencies:me})}let[j,N]=$;if(j.length>1){const v=j[0];j=j.filter((v=>v.path));if(j.length===0)j.push(v)}this.hooks.afterResolve.callAsync({addon:Oe+N.join("!")+(N.length>0?"!":""),resource:j.length>1?j.map((v=>v.path)):j[0].path,resolveDependencies:this.resolveDependencies.bind(this),resourceQuery:j[0].query,resourceFragment:j[0].fragment,...R},((v,R)=>{if(v){return E(v,{fileDependencies:ie,missingDependencies:le,contextDependencies:me})}if(!R){return E(null,{fileDependencies:ie,missingDependencies:le,contextDependencies:me})}return E(null,{module:new q(R.resolveDependencies,R),fileDependencies:ie,missingDependencies:le,contextDependencies:me})}))}))}))}resolveDependencies(v,E,R){const j=this;const{resource:N,resourceQuery:q,resourceFragment:G,recursive:ae,regExp:ce,include:le,exclude:_e,referencedExports:Ie,category:Me,typePrefix:Oe}=E;if(!ce||!N)return R(null,[]);const addDirectoryChecked=(E,R,$,j)=>{v.realpath(R,((v,N)=>{if(v)return j(v);if($.has(N))return j(null,[]);let q;addDirectory(E,R,((v,R,j)=>{if(q===undefined){q=new Set($);q.add(N)}addDirectoryChecked(E,R,q,j)}),j)}))};const addDirectory=(R,N,Te,Ne)=>{v.readdir(N,((Be,Le)=>{if(Be)return Ne(Be);const qe=j.hooks.contextModuleFiles.call(Le.map((v=>v.normalize("NFC"))));if(!qe||qe.length===0)return Ne(null,[]);$.map(qe.filter((v=>v.indexOf(".")!==0)),(($,j)=>{const Ne=me(v,N,$);if(!_e||!Ne.match(_e)){v.stat(Ne,((v,$)=>{if(v){if(v.code==="ENOENT"){return j()}else{return j(v)}}if($.isDirectory()){if(!ae)return j();Te(R,Ne,j)}else if($.isFile()&&(!le||Ne.match(le))){const v={context:R,request:"."+Ne.slice(R.length).replace(/\\/g,"/")};this.hooks.alternativeRequests.callAsync([v],E,((v,E)=>{if(v)return j(v);E=E.filter((v=>ce.test(v.request))).map((v=>{const E=new ie(`${v.request}${q}${G}`,v.request,Oe,Me,Ie,v.context);E.optional=true;return E}));j(null,E)}))}else{j()}}))}else{j()}}),((v,E)=>{if(v)return Ne(v);if(!E)return Ne(null,[]);const R=[];for(const v of E){if(v)R.push(...v)}Ne(null,R)}))}))};const addSubDirectory=(v,E,R)=>addDirectory(v,E,addSubDirectory,R);const visitResource=(E,R)=>{if(typeof v.realpath==="function"){addDirectoryChecked(E,E,new Set,R)}else{addDirectory(E,E,addSubDirectory,R)}};if(typeof N==="string"){visitResource(N,R)}else{$.map(N,visitResource,((v,E)=>{if(v)return R(v);const $=new Set;const j=[];for(let v=0;v{E(null,R)}}else if(typeof E==="string"&&typeof R==="function"){this.newContentResource=E;this.newContentCreateContextMap=R}else{if(typeof E!=="string"){$=R;R=E;E=undefined}if(typeof R!=="boolean"){$=R;R=undefined}this.newContentResource=E;this.newContentRecursive=R;this.newContentRegExp=$}}apply(v){const E=this.resourceRegExp;const R=this.newContentCallback;const $=this.newContentResource;const N=this.newContentRecursive;const q=this.newContentRegExp;const G=this.newContentCreateContextMap;v.hooks.contextModuleFactory.tap("ContextReplacementPlugin",(ie=>{ie.hooks.beforeResolve.tap("ContextReplacementPlugin",(v=>{if(!v)return;if(E.test(v.request)){if($!==undefined){v.request=$}if(N!==undefined){v.recursive=N}if(q!==undefined){v.regExp=q}if(typeof R==="function"){R(v)}else{for(const E of v.dependencies){if(E.critical)E.critical=false}}}return v}));ie.hooks.afterResolve.tap("ContextReplacementPlugin",(ie=>{if(!ie)return;if(E.test(ie.resource)){if($!==undefined){if($.startsWith("/")||$.length>1&&$[1]===":"){ie.resource=$}else{ie.resource=j(v.inputFileSystem,ie.resource,$)}}if(N!==undefined){ie.recursive=N}if(q!==undefined){ie.regExp=q}if(typeof G==="function"){ie.resolveDependencies=createResolveDependenciesFromContextMap(G)}if(typeof R==="function"){const E=ie.resource;R(ie);if(ie.resource!==E&&!ie.resource.startsWith("/")&&(ie.resource.length<=1||ie.resource[1]!==":")){ie.resource=j(v.inputFileSystem,E,ie.resource)}}else{for(const v of ie.dependencies){if(v.critical)v.critical=false}}}return ie}))}))}}const createResolveDependenciesFromContextMap=v=>{const resolveDependenciesFromContextMap=(E,R,j)=>{v(E,((v,E)=>{if(v)return j(v);const N=Object.keys(E).map((v=>new $(E[v]+R.resourceQuery+R.resourceFragment,v,R.category,R.referencedExports)));j(null,N)}))};return resolveDependenciesFromContextMap};v.exports=ContextReplacementPlugin},5354:function(v,E,R){"use strict";const $=R(39201);const j=R(27154);const N=R(14367);const q=R(94844);const{evaluateToString:G,toConstantDependency:ie}=R(97574);const ae=R(85205);class RuntimeValue{constructor(v,E){this.fn=v;if(Array.isArray(E)){E={fileDependencies:E}}this.options=E||{}}get fileDependencies(){return this.options===true?true:this.options.fileDependencies}exec(v,E,R){const $=v.state.module.buildInfo;if(this.options===true){$.cacheable=false}else{if(this.options.fileDependencies){for(const v of this.options.fileDependencies){$.fileDependencies.add(v)}}if(this.options.contextDependencies){for(const v of this.options.contextDependencies){$.contextDependencies.add(v)}}if(this.options.missingDependencies){for(const v of this.options.missingDependencies){$.missingDependencies.add(v)}}if(this.options.buildDependencies){for(const v of this.options.buildDependencies){$.buildDependencies.add(v)}}}return this.fn({module:v.state.module,key:R,get version(){return E.get(ce+R)}})}getCacheVersion(){return this.options===true?undefined:(typeof this.options.version==="function"?this.options.version():this.options.version)||"unset"}}const stringifyObj=(v,E,R,$,j,N)=>{let q;let G=Array.isArray(v);if(G){q=`[${v.map((v=>toCode(v,E,R,$,j,null))).join(",")}]`}else{q=`{${Object.keys(v).map(($=>{const N=v[$];return JSON.stringify($)+":"+toCode(N,E,R,$,j,null)})).join(",")}}`}switch(N){case null:return q;case true:return G?q:`(${q})`;case false:return G?`;${q}`:`;(${q})`;default:return`/*#__PURE__*/Object(${q})`}};const toCode=(v,E,R,$,j,N)=>{if(v===null){return"null"}if(v===undefined){return"undefined"}if(Object.is(v,-0)){return"-0"}if(v instanceof RuntimeValue){return toCode(v.exec(E,R,$),E,R,$,j,N)}if(v instanceof RegExp&&v.toString){return v.toString()}if(typeof v==="function"&&v.toString){return"("+v.toString()+")"}if(typeof v==="object"){return stringifyObj(v,E,R,$,j,N)}if(typeof v==="bigint"){return j.supportsBigIntLiteral()?`${v}n`:`BigInt("${v}")`}return v+""};const toCacheVersion=v=>{if(v===null){return"null"}if(v===undefined){return"undefined"}if(Object.is(v,-0)){return"-0"}if(v instanceof RuntimeValue){return v.getCacheVersion()}if(v instanceof RegExp&&v.toString){return v.toString()}if(typeof v==="function"&&v.toString){return"("+v.toString()+")"}if(typeof v==="object"){const E=Object.keys(v).map((E=>({key:E,value:toCacheVersion(v[E])})));if(E.some((({value:v})=>v===undefined)))return undefined;return`{${E.map((({key:v,value:E})=>`${v}: ${E}`)).join(", ")}}`}if(typeof v==="bigint"){return`${v}n`}return v+""};const ce="webpack/DefinePlugin ";const le="webpack/DefinePlugin_hash";class DefinePlugin{constructor(v){this.definitions=v}static runtimeValue(v,E){return new RuntimeValue(v,E)}apply(v){const E=this.definitions;v.hooks.compilation.tap("DefinePlugin",((v,{normalModuleFactory:R})=>{v.dependencyTemplates.set(N,new N.Template);const{runtimeTemplate:me}=v;const _e=ae(v.outputOptions.hashFunction);_e.update(v.valueCacheVersions.get(le)||"");const handler=R=>{const j=v.valueCacheVersions.get(le);R.hooks.program.tap("DefinePlugin",(()=>{const{buildInfo:v}=R.state.module;if(!v.valueDependencies)v.valueDependencies=new Map;v.valueDependencies.set(le,j)}));const addValueDependency=E=>{const{buildInfo:$}=R.state.module;$.valueDependencies.set(ce+E,v.valueCacheVersions.get(ce+E))};const withValueDependency=(v,E)=>(...R)=>{addValueDependency(v);return E(...R)};const walkDefinitions=(v,E)=>{Object.keys(v).forEach((R=>{const $=v[R];if($&&typeof $==="object"&&!($ instanceof RuntimeValue)&&!($ instanceof RegExp)){walkDefinitions($,E+R+".");applyObjectDefine(E+R,$);return}applyDefineKey(E,R);applyDefine(E+R,$)}))};const applyDefineKey=(v,E)=>{const $=E.split(".");$.slice(1).forEach(((j,N)=>{const q=v+$.slice(0,N+1).join(".");R.hooks.canRename.for(q).tap("DefinePlugin",(()=>{addValueDependency(E);return true}))}))};const applyDefine=(E,j)=>{const N=E;const q=/^typeof\s+/.test(E);if(q)E=E.replace(/^typeof\s+/,"");let G=false;let ae=false;if(!q){R.hooks.canRename.for(E).tap("DefinePlugin",(()=>{addValueDependency(N);return true}));R.hooks.evaluateIdentifier.for(E).tap("DefinePlugin",($=>{if(G)return;addValueDependency(N);G=true;const q=R.evaluate(toCode(j,R,v.valueCacheVersions,E,me,null));G=false;q.setRange($.range);return q}));R.hooks.expression.for(E).tap("DefinePlugin",(E=>{addValueDependency(N);const q=toCode(j,R,v.valueCacheVersions,N,me,!R.isAsiPosition(E.range[0]));if(/__webpack_require__\s*(!?\.)/.test(q)){return ie(R,q,[$.require])(E)}else if(/__webpack_require__/.test(q)){return ie(R,q,[$.requireScope])(E)}else{return ie(R,q)(E)}}))}R.hooks.evaluateTypeof.for(E).tap("DefinePlugin",(E=>{if(ae)return;ae=true;addValueDependency(N);const $=toCode(j,R,v.valueCacheVersions,N,me,null);const G=q?$:"typeof ("+$+")";const ie=R.evaluate(G);ae=false;ie.setRange(E.range);return ie}));R.hooks.typeof.for(E).tap("DefinePlugin",(E=>{addValueDependency(N);const $=toCode(j,R,v.valueCacheVersions,N,me,null);const G=q?$:"typeof ("+$+")";const ae=R.evaluate(G);if(!ae.isString())return;return ie(R,JSON.stringify(ae.string)).bind(R)(E)}))};const applyObjectDefine=(E,j)=>{R.hooks.canRename.for(E).tap("DefinePlugin",(()=>{addValueDependency(E);return true}));R.hooks.evaluateIdentifier.for(E).tap("DefinePlugin",(v=>{addValueDependency(E);return(new q).setTruthy().setSideEffects(false).setRange(v.range)}));R.hooks.evaluateTypeof.for(E).tap("DefinePlugin",withValueDependency(E,G("object")));R.hooks.expression.for(E).tap("DefinePlugin",(N=>{addValueDependency(E);const q=stringifyObj(j,R,v.valueCacheVersions,E,me,!R.isAsiPosition(N.range[0]));if(/__webpack_require__\s*(!?\.)/.test(q)){return ie(R,q,[$.require])(N)}else if(/__webpack_require__/.test(q)){return ie(R,q,[$.requireScope])(N)}else{return ie(R,q)(N)}}));R.hooks.typeof.for(E).tap("DefinePlugin",withValueDependency(E,ie(R,JSON.stringify("object"))))};walkDefinitions(E,"")};R.hooks.parser.for("javascript/auto").tap("DefinePlugin",handler);R.hooks.parser.for("javascript/dynamic").tap("DefinePlugin",handler);R.hooks.parser.for("javascript/esm").tap("DefinePlugin",handler);const walkDefinitionsForValues=(E,R)=>{Object.keys(E).forEach(($=>{const N=E[$];const q=toCacheVersion(N);const G=ce+R+$;_e.update("|"+R+$);const ie=v.valueCacheVersions.get(G);if(ie===undefined){v.valueCacheVersions.set(G,q)}else if(ie!==q){const E=new j(`DefinePlugin\nConflicting values for '${R+$}'`);E.details=`'${ie}' !== '${q}'`;E.hideStack=true;v.warnings.push(E)}if(N&&typeof N==="object"&&!(N instanceof RuntimeValue)&&!(N instanceof RegExp)){walkDefinitionsForValues(N,R+$+".")}}))};walkDefinitionsForValues(E,"");v.valueCacheVersions.set(le,_e.digest("hex").slice(0,8))}))}}v.exports=DefinePlugin},18481:function(v,E,R){"use strict";const{OriginalSource:$,RawSource:j}=R(51255);const N=R(53840);const q=R(39201);const G=R(70688);const ie=R(19383);const ae=R(65764);const ce=new Set(["javascript"]);const le=new Set([q.module,q.require]);class DelegatedModule extends N{constructor(v,E,R,$,j){super("javascript/dynamic",null);this.sourceRequest=v;this.request=E.id;this.delegationType=R;this.userRequest=$;this.originalRequest=j;this.delegateData=E;this.delegatedSourceDependency=undefined}getSourceTypes(){return ce}libIdent(v){return typeof this.originalRequest==="string"?this.originalRequest:this.originalRequest.libIdent(v)}identifier(){return`delegated ${JSON.stringify(this.request)} from ${this.sourceRequest}`}readableIdentifier(v){return`delegated ${this.userRequest} from ${this.sourceRequest}`}needBuild(v,E){return E(null,!this.buildMeta)}build(v,E,R,$,j){this.buildMeta={...this.delegateData.buildMeta};this.buildInfo={};this.dependencies.length=0;this.delegatedSourceDependency=new G(this.sourceRequest);this.addDependency(this.delegatedSourceDependency);this.addDependency(new ie(this.delegateData.exports||true,false));j()}codeGeneration({runtimeTemplate:v,moduleGraph:E,chunkGraph:R}){const N=this.dependencies[0];const q=E.getModule(N);let G;if(!q){G=v.throwMissingModuleErrorBlock({request:this.sourceRequest})}else{G=`module.exports = (${v.moduleExports({module:q,chunkGraph:R,request:N.request,runtimeRequirements:new Set})})`;switch(this.delegationType){case"require":G+=`(${JSON.stringify(this.request)})`;break;case"object":G+=`[${JSON.stringify(this.request)}]`;break}G+=";"}const ie=new Map;if(this.useSourceMap||this.useSimpleSourceMap){ie.set("javascript",new $(G,this.identifier()))}else{ie.set("javascript",new j(G))}return{sources:ie,runtimeRequirements:le}}size(v){return 42}updateHash(v,E){v.update(this.delegationType);v.update(JSON.stringify(this.request));super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this.sourceRequest);E(this.delegateData);E(this.delegationType);E(this.userRequest);E(this.originalRequest);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new DelegatedModule(E(),E(),E(),E(),E());R.deserialize(v);return R}updateCacheModule(v){super.updateCacheModule(v);const E=v;this.delegationType=E.delegationType;this.userRequest=E.userRequest;this.originalRequest=E.originalRequest;this.delegateData=E.delegateData}cleanupForCache(){super.cleanupForCache();this.delegateData=undefined}}ae(DelegatedModule,"webpack/lib/DelegatedModule");v.exports=DelegatedModule},33897:function(v,E,R){"use strict";const $=R(18481);class DelegatedModuleFactoryPlugin{constructor(v){this.options=v;v.type=v.type||"require";v.extensions=v.extensions||["",".js",".json",".wasm"]}apply(v){const E=this.options.scope;if(E){v.hooks.factorize.tapAsync("DelegatedModuleFactoryPlugin",((v,R)=>{const[j]=v.dependencies;const{request:N}=j;if(N&&N.startsWith(`${E}/`)){const v="."+N.slice(E.length);let j;if(v in this.options.content){j=this.options.content[v];return R(null,new $(this.options.source,j,this.options.type,v,N))}for(let E=0;E{const E=v.libIdent(this.options);if(E){if(E in this.options.content){const R=this.options.content[E];return new $(this.options.source,R,this.options.type,E,v)}}return v}))}}}v.exports=DelegatedModuleFactoryPlugin},82059:function(v,E,R){"use strict";const $=R(33897);const j=R(70688);class DelegatedPlugin{constructor(v){this.options=v}apply(v){v.hooks.compilation.tap("DelegatedPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(j,E)}));v.hooks.compile.tap("DelegatedPlugin",(({normalModuleFactory:E})=>{new $({associatedObjectForCache:v.root,...this.options}).apply(E)}))}}v.exports=DelegatedPlugin},82618:function(v,E,R){"use strict";const $=R(65764);class DependenciesBlock{constructor(){this.dependencies=[];this.blocks=[];this.parent=undefined}getRootBlock(){let v=this;while(v.parent)v=v.parent;return v}addBlock(v){this.blocks.push(v);v.parent=this}addDependency(v){this.dependencies.push(v)}removeDependency(v){const E=this.dependencies.indexOf(v);if(E>=0){this.dependencies.splice(E,1)}}clearDependenciesAndBlocks(){this.dependencies.length=0;this.blocks.length=0}updateHash(v,E){for(const R of this.dependencies){R.updateHash(v,E)}for(const R of this.blocks){R.updateHash(v,E)}}serialize({write:v}){v(this.dependencies);v(this.blocks)}deserialize({read:v}){this.dependencies=v();this.blocks=v();for(const v of this.blocks){v.parent=this}}}$(DependenciesBlock,"webpack/lib/DependenciesBlock");v.exports=DependenciesBlock},87056:function(v,E,R){"use strict";const $=R(61374);const j=Symbol("transitive");const N=$((()=>{const v=R(71133);return new v("/* (ignored) */",`ignored`,`(ignored)`)}));class Dependency{constructor(){this._parentModule=undefined;this._parentDependenciesBlock=undefined;this._parentDependenciesBlockIndex=-1;this.weak=false;this.optional=false;this._locSL=0;this._locSC=0;this._locEL=0;this._locEC=0;this._locI=undefined;this._locN=undefined;this._loc=undefined}get type(){return"unknown"}get category(){return"unknown"}get loc(){if(this._loc!==undefined)return this._loc;const v={};if(this._locSL>0){v.start={line:this._locSL,column:this._locSC}}if(this._locEL>0){v.end={line:this._locEL,column:this._locEC}}if(this._locN!==undefined){v.name=this._locN}if(this._locI!==undefined){v.index=this._locI}return this._loc=v}set loc(v){if("start"in v&&typeof v.start==="object"){this._locSL=v.start.line||0;this._locSC=v.start.column||0}else{this._locSL=0;this._locSC=0}if("end"in v&&typeof v.end==="object"){this._locEL=v.end.line||0;this._locEC=v.end.column||0}else{this._locEL=0;this._locEC=0}if("index"in v){this._locI=v.index}else{this._locI=undefined}if("name"in v){this._locN=v.name}else{this._locN=undefined}this._loc=v}setLoc(v,E,R,$){this._locSL=v;this._locSC=E;this._locEL=R;this._locEC=$;this._locI=undefined;this._locN=undefined;this._loc=undefined}getContext(){return undefined}getResourceIdentifier(){return null}couldAffectReferencingModule(){return j}getReference(v){throw new Error("Dependency.getReference was removed in favor of Dependency.getReferencedExports, ModuleGraph.getModule and ModuleGraph.getConnection().active")}getReferencedExports(v,E){return Dependency.EXPORTS_OBJECT_REFERENCED}getCondition(v){return null}getExports(v){return undefined}getWarnings(v){return null}getErrors(v){return null}updateHash(v,E){}getNumberOfIdOccurrences(){return 1}getModuleEvaluationSideEffectsState(v){return true}createIgnoredModule(v){return N()}serialize({write:v}){v(this.weak);v(this.optional);v(this._locSL);v(this._locSC);v(this._locEL);v(this._locEC);v(this._locI);v(this._locN)}deserialize({read:v}){this.weak=v();this.optional=v();this._locSL=v();this._locSC=v();this._locEL=v();this._locEC=v();this._locI=v();this._locN=v()}}Dependency.NO_EXPORTS_REFERENCED=[];Dependency.EXPORTS_OBJECT_REFERENCED=[[]];Object.defineProperty(Dependency.prototype,"module",{get(){throw new Error("module property was removed from Dependency (use compilation.moduleGraph.getModule(dependency) instead)")},set(){throw new Error("module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)")}});Object.defineProperty(Dependency.prototype,"disconnect",{get(){throw new Error("disconnect was removed from Dependency (Dependency no longer carries graph specific information)")}});Dependency.TRANSITIVE=j;v.exports=Dependency},94086:function(v,E,R){"use strict";class DependencyTemplate{apply(v,E,$){const j=R(73846);throw new j}}v.exports=DependencyTemplate},97723:function(v,E,R){"use strict";const $=R(85205);class DependencyTemplates{constructor(v="md4"){this._map=new Map;this._hash="31d6cfe0d16ae931b73c59d7e0c089c0";this._hashFunction=v}get(v){return this._map.get(v)}set(v,E){this._map.set(v,E)}updateHash(v){const E=$(this._hashFunction);E.update(`${this._hash}${v}`);this._hash=E.digest("hex")}getHash(){return this._hash}clone(){const v=new DependencyTemplates(this._hashFunction);v._map=new Map(this._map);v._hash=this._hash;return v}}v.exports=DependencyTemplates},51404:function(v,E,R){"use strict";const $=R(61661);const j=R(21467);const N=R(17380);class DllEntryPlugin{constructor(v,E,R){this.context=v;this.entries=E;this.options=R}apply(v){v.hooks.compilation.tap("DllEntryPlugin",((v,{normalModuleFactory:E})=>{const R=new $;v.dependencyFactories.set(j,R);v.dependencyFactories.set(N,E)}));v.hooks.make.tapAsync("DllEntryPlugin",((v,E)=>{v.addEntry(this.context,new j(this.entries.map(((v,E)=>{const R=new N(v);R.loc={name:this.options.name,index:E};return R})),this.options.name),this.options,E)}))}}v.exports=DllEntryPlugin},28526:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(53840);const N=R(39201);const q=R(65764);const G=new Set(["javascript"]);const ie=new Set([N.require,N.module]);class DllModule extends j{constructor(v,E,R){super("javascript/dynamic",v);this.dependencies=E;this.name=R}getSourceTypes(){return G}identifier(){return`dll ${this.name}`}readableIdentifier(v){return`dll ${this.name}`}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={};return j()}codeGeneration(v){const E=new Map;E.set("javascript",new $("module.exports = __webpack_require__;"));return{sources:E,runtimeRequirements:ie}}needBuild(v,E){return E(null,!this.buildMeta)}size(v){return 12}updateHash(v,E){v.update(`dll module${this.name||""}`);super.updateHash(v,E)}serialize(v){v.write(this.name);super.serialize(v)}deserialize(v){this.name=v.read();super.deserialize(v)}updateCacheModule(v){super.updateCacheModule(v);this.dependencies=v.dependencies}cleanupForCache(){super.cleanupForCache();this.dependencies=undefined}}q(DllModule,"webpack/lib/DllModule");v.exports=DllModule},61661:function(v,E,R){"use strict";const $=R(28526);const j=R(39744);class DllModuleFactory extends j{constructor(){super();this.hooks=Object.freeze({})}create(v,E){const R=v.dependencies[0];E(null,{module:new $(v.context,R.dependencies,R.name)})}}v.exports=DllModuleFactory},89978:function(v,E,R){"use strict";const $=R(51404);const j=R(35922);const N=R(91052);const q=R(89699);const G=q(R(51856),(()=>R(81419)),{name:"Dll Plugin",baseDataPath:"options"});class DllPlugin{constructor(v){G(v);this.options={...v,entryOnly:v.entryOnly!==false}}apply(v){v.hooks.entryOption.tap("DllPlugin",((E,R)=>{if(typeof R!=="function"){for(const j of Object.keys(R)){const N={name:j,filename:R.filename};new $(E,R[j].import,N).apply(v)}}else{throw new Error("DllPlugin doesn't support dynamic entry (function) yet")}return true}));new N(this.options).apply(v);if(!this.options.entryOnly){new j("DllPlugin").apply(v)}}}v.exports=DllPlugin},1282:function(v,E,R){"use strict";const $=R(85685);const j=R(33897);const N=R(69452);const q=R(27154);const G=R(70688);const ie=R(89699);const ae=R(20162).makePathsRelative;const ce=ie(R(21903),(()=>R(53858)),{name:"Dll Reference Plugin",baseDataPath:"options"});class DllReferencePlugin{constructor(v){ce(v);this.options=v;this._compilationData=new WeakMap}apply(v){v.hooks.compilation.tap("DllReferencePlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(G,E)}));v.hooks.beforeCompile.tapAsync("DllReferencePlugin",((E,R)=>{if("manifest"in this.options){const j=this.options.manifest;if(typeof j==="string"){v.inputFileSystem.readFile(j,((N,q)=>{if(N)return R(N);const G={path:j,data:undefined,error:undefined};try{G.data=$(q.toString("utf-8"))}catch(E){const R=ae(v.options.context,j,v.root);G.error=new DllManifestError(R,E.message)}this._compilationData.set(E,G);return R()}));return}}return R()}));v.hooks.compile.tap("DllReferencePlugin",(E=>{let R=this.options.name;let $=this.options.sourceType;let q="content"in this.options?this.options.content:undefined;if("manifest"in this.options){let v=this.options.manifest;let j;if(typeof v==="string"){const v=this._compilationData.get(E);if(v.error){return}j=v.data}else{j=v}if(j){if(!R)R=j.name;if(!$)$=j.type;if(!q)q=j.content}}const G={};const ie="dll-reference "+R;G[ie]=R;const ae=E.normalModuleFactory;new N($||"var",G).apply(ae);new j({source:ie,type:this.options.type,scope:this.options.scope,context:this.options.context||v.options.context,content:q,extensions:this.options.extensions,associatedObjectForCache:v.root}).apply(ae)}));v.hooks.compilation.tap("DllReferencePlugin",((v,E)=>{if("manifest"in this.options){let R=this.options.manifest;if(typeof R==="string"){const $=this._compilationData.get(E);if($.error){v.errors.push($.error)}v.fileDependencies.add(R)}}}))}}class DllManifestError extends q{constructor(v,E){super();this.name="DllManifestError";this.message=`Dll manifest ${v}\n${E}`}}v.exports=DllReferencePlugin},41924:function(v,E,R){"use strict";const $=R(2699);const j=R(19360);const N=R(17380);class DynamicEntryPlugin{constructor(v,E){this.context=v;this.entry=E}apply(v){v.hooks.compilation.tap("DynamicEntryPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(N,E)}));v.hooks.make.tapPromise("DynamicEntryPlugin",((E,R)=>Promise.resolve(this.entry()).then((R=>{const N=[];for(const q of Object.keys(R)){const G=R[q];const ie=$.entryDescriptionToOptions(v,q,G);for(const v of G.import){N.push(new Promise(((R,$)=>{E.addEntry(this.context,j.createDependency(v,ie),ie,(v=>{if(v)return $(v);R()}))})))}}return Promise.all(N)})).then((v=>{}))))}}v.exports=DynamicEntryPlugin},2699:function(v,E,R){"use strict";class EntryOptionPlugin{apply(v){v.hooks.entryOption.tap("EntryOptionPlugin",((E,R)=>{EntryOptionPlugin.applyEntryOption(v,E,R);return true}))}static applyEntryOption(v,E,$){if(typeof $==="function"){const j=R(41924);new j(E,$).apply(v)}else{const j=R(19360);for(const R of Object.keys($)){const N=$[R];const q=EntryOptionPlugin.entryDescriptionToOptions(v,R,N);for(const R of N.import){new j(E,R,q).apply(v)}}}}static entryDescriptionToOptions(v,E,$){const j={name:E,filename:$.filename,runtime:$.runtime,layer:$.layer,dependOn:$.dependOn,baseUri:$.baseUri,publicPath:$.publicPath,chunkLoading:$.chunkLoading,asyncChunks:$.asyncChunks,wasmLoading:$.wasmLoading,library:$.library};if($.layer!==undefined&&!v.options.experiments.layers){throw new Error("'entryOptions.layer' is only allowed when 'experiments.layers' is enabled")}if($.chunkLoading){const E=R(49548);E.checkEnabled(v,$.chunkLoading)}if($.wasmLoading){const E=R(90115);E.checkEnabled(v,$.wasmLoading)}if($.library){const E=R(7616);E.checkEnabled(v,$.library.type)}return j}}v.exports=EntryOptionPlugin},19360:function(v,E,R){"use strict";const $=R(17380);class EntryPlugin{constructor(v,E,R){this.context=v;this.entry=E;this.options=R||""}apply(v){v.hooks.compilation.tap("EntryPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set($,E)}));const{entry:E,options:R,context:j}=this;const N=EntryPlugin.createDependency(E,R);v.hooks.make.tapAsync("EntryPlugin",((v,E)=>{v.addEntry(j,N,R,(v=>{E(v)}))}))}static createDependency(v,E){const R=new $(v);R.loc={name:typeof E==="object"?E.name:E};return R}}v.exports=EntryPlugin},33546:function(v,E,R){"use strict";const $=R(12487);class Entrypoint extends ${constructor(v,E=true){if(typeof v==="string"){v={name:v}}super({name:v.name});this.options=v;this._runtimeChunk=undefined;this._entrypointChunk=undefined;this._initial=E}isInitial(){return this._initial}setRuntimeChunk(v){this._runtimeChunk=v}getRuntimeChunk(){if(this._runtimeChunk)return this._runtimeChunk;for(const v of this.parentsIterable){if(v instanceof Entrypoint)return v.getRuntimeChunk()}return null}setEntrypointChunk(v){this._entrypointChunk=v}getEntrypointChunk(){return this._entrypointChunk}replaceChunk(v,E){if(this._runtimeChunk===v)this._runtimeChunk=E;if(this._entrypointChunk===v)this._entrypointChunk=E;return super.replaceChunk(v,E)}}v.exports=Entrypoint},48681:function(v,E,R){"use strict";const $=R(5354);const j=R(27154);class EnvironmentPlugin{constructor(...v){if(v.length===1&&Array.isArray(v[0])){this.keys=v[0];this.defaultValues={}}else if(v.length===1&&v[0]&&typeof v[0]==="object"){this.keys=Object.keys(v[0]);this.defaultValues=v[0]}else{this.keys=v;this.defaultValues={}}}apply(v){const E={};for(const R of this.keys){const $=process.env[R]!==undefined?process.env[R]:this.defaultValues[R];if($===undefined){v.hooks.thisCompilation.tap("EnvironmentPlugin",(v=>{const E=new j(`EnvironmentPlugin - ${R} environment variable is undefined.\n\n`+"You can pass an object with default values to suppress this warning.\n"+"See https://webpack.js.org/plugins/environment-plugin for example.");E.name="EnvVariableNotDefinedError";v.errors.push(E)}))}E[`process.env.${R}`]=$===undefined?"undefined":JSON.stringify($)}new $(E).apply(v)}}v.exports=EnvironmentPlugin},8821:function(v,E){"use strict";const R="LOADER_EXECUTION";const $="WEBPACK_OPTIONS";E.cutOffByFlag=(v,E)=>{v=v.split("\n");for(let R=0;RE.cutOffByFlag(v,R);E.cutOffWebpackOptions=v=>E.cutOffByFlag(v,$);E.cutOffMultilineMessage=(v,E)=>{v=v.split("\n");E=E.split("\n");const R=[];v.forEach(((v,$)=>{if(!v.includes(E[$]))R.push(v)}));return R.join("\n")};E.cutOffMessage=(v,E)=>{const R=v.indexOf("\n");if(R===-1){return v===E?"":v}else{const $=v.slice(0,R);return $===E?v.slice(R+1):v}};E.cleanUp=(v,R)=>{v=E.cutOffLoaderExecution(v);v=E.cutOffMessage(v,R);return v};E.cleanUpWebpackOptions=(v,R)=>{v=E.cutOffWebpackOptions(v);v=E.cutOffMultilineMessage(v,R);return v}},76289:function(v,E,R){"use strict";const{ConcatSource:$,RawSource:j}=R(51255);const N=R(73096);const q=R(99523);const G=R(39201);const ie=R(36109);const ae=new WeakMap;const ce=new j(`/*\n * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").\n * This devtool is neither made for production nor for readable output files.\n * It uses "eval()" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with "devtool: false".\n * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).\n */\n`);class EvalDevToolModulePlugin{constructor(v){this.namespace=v.namespace||"";this.sourceUrlComment=v.sourceUrlComment||"\n//# sourceURL=[url]";this.moduleFilenameTemplate=v.moduleFilenameTemplate||"webpack://[namespace]/[resourcePath]?[loaders]"}apply(v){v.hooks.compilation.tap("EvalDevToolModulePlugin",(v=>{const E=ie.getCompilationHooks(v);E.renderModuleContent.tap("EvalDevToolModulePlugin",((E,R,{runtimeTemplate:$,chunkGraph:ie})=>{const ce=ae.get(E);if(ce!==undefined)return ce;if(R instanceof N){ae.set(E,E);return E}const le=E.source();const me=q.createFilename(R,{moduleFilenameTemplate:this.moduleFilenameTemplate,namespace:this.namespace},{requestShortener:$.requestShortener,chunkGraph:ie,hashFunction:v.outputOptions.hashFunction});const _e="\n"+this.sourceUrlComment.replace(/\[url\]/g,encodeURI(me).replace(/%2F/g,"/").replace(/%20/g,"_").replace(/%5E/g,"^").replace(/%5C/g,"\\").replace(/^\//,""));const Ie=new j(`eval(${v.outputOptions.trustedTypes?`${G.createScript}(${JSON.stringify(le+_e)})`:JSON.stringify(le+_e)});`);ae.set(E,Ie);return Ie}));E.inlineInRuntimeBailout.tap("EvalDevToolModulePlugin",(()=>"the eval devtool is used."));E.render.tap("EvalDevToolModulePlugin",(v=>new $(ce,v)));E.chunkHash.tap("EvalDevToolModulePlugin",((v,E)=>{E.update("EvalDevToolModulePlugin");E.update("2")}));if(v.outputOptions.trustedTypes){v.hooks.additionalModuleRuntimeRequirements.tap("EvalDevToolModulePlugin",((v,E,R)=>{E.add(G.createScript)}))}}))}}v.exports=EvalDevToolModulePlugin},67470:function(v,E,R){"use strict";const{ConcatSource:$,RawSource:j}=R(51255);const N=R(99523);const q=R(89417);const G=R(39201);const ie=R(44717);const ae=R(36109);const ce=R(4272);const{makePathsAbsolute:le}=R(20162);const me=new WeakMap;const _e=new j(`/*\n * ATTENTION: An "eval-source-map" devtool has been used.\n * This devtool is neither made for production nor for readable output files.\n * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with "devtool: false".\n * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).\n */\n`);class EvalSourceMapDevToolPlugin{constructor(v){let E;if(typeof v==="string"){E={append:v}}else{E=v}this.sourceMapComment=E.append||"//# sourceURL=[module]\n//# sourceMappingURL=[url]";this.moduleFilenameTemplate=E.moduleFilenameTemplate||"webpack://[namespace]/[resource-path]?[hash]";this.namespace=E.namespace||"";this.options=E}apply(v){const E=this.options;v.hooks.compilation.tap("EvalSourceMapDevToolPlugin",(R=>{const Ie=ae.getCompilationHooks(R);new ie(E).apply(R);const Me=N.matchObject.bind(N,E);Ie.renderModuleContent.tap("EvalSourceMapDevToolPlugin",(($,ie,{runtimeTemplate:ae,chunkGraph:_e})=>{const Ie=me.get($);if(Ie!==undefined){return Ie}const result=v=>{me.set($,v);return v};if(ie instanceof q){const v=ie;if(!Me(v.resource)){return result($)}}else if(ie instanceof ce){const v=ie;if(v.rootModule instanceof q){const E=v.rootModule;if(!Me(E.resource)){return result($)}}else{return result($)}}else{return result($)}let Oe;let Te;if($.sourceAndMap){const v=$.sourceAndMap(E);Oe=v.map;Te=v.source}else{Oe=$.map(E);Te=$.source()}if(!Oe){return result($)}Oe={...Oe};const Ne=v.options.context;const Be=v.root;const Le=Oe.sources.map((v=>{if(!v.startsWith("webpack://"))return v;v=le(Ne,v.slice(10),Be);const E=R.findModule(v);return E||v}));let qe=Le.map((v=>N.createFilename(v,{moduleFilenameTemplate:this.moduleFilenameTemplate,namespace:this.namespace},{requestShortener:ae.requestShortener,chunkGraph:_e,hashFunction:R.outputOptions.hashFunction})));qe=N.replaceDuplicates(qe,((v,E,R)=>{for(let E=0;E"the eval-source-map devtool is used."));Ie.render.tap("EvalSourceMapDevToolPlugin",(v=>new $(_e,v)));Ie.chunkHash.tap("EvalSourceMapDevToolPlugin",((v,E)=>{E.update("EvalSourceMapDevToolPlugin");E.update("2")}));if(R.outputOptions.trustedTypes){R.hooks.additionalModuleRuntimeRequirements.tap("EvalSourceMapDevToolPlugin",((v,E,R)=>{E.add(G.createScript)}))}}))}}v.exports=EvalSourceMapDevToolPlugin},13168:function(v,E,R){"use strict";const{equals:$}=R(28087);const j=R(87122);const N=R(65764);const{forEachRuntime:q}=R(47462);const G=Object.freeze({Unused:0,OnlyPropertiesUsed:1,NoInfo:2,Unknown:3,Used:4});const RETURNS_TRUE=()=>true;const ie=Symbol("circular target");class RestoreProvidedData{constructor(v,E,R,$){this.exports=v;this.otherProvided=E;this.otherCanMangleProvide=R;this.otherTerminalBinding=$}serialize({write:v}){v(this.exports);v(this.otherProvided);v(this.otherCanMangleProvide);v(this.otherTerminalBinding)}static deserialize({read:v}){return new RestoreProvidedData(v(),v(),v(),v())}}N(RestoreProvidedData,"webpack/lib/ModuleGraph","RestoreProvidedData");class ExportsInfo{constructor(){this._exports=new Map;this._otherExportsInfo=new ExportInfo(null);this._sideEffectsOnlyInfo=new ExportInfo("*side effects only*");this._exportsAreOrdered=false;this._redirectTo=undefined}get ownedExports(){return this._exports.values()}get orderedOwnedExports(){if(!this._exportsAreOrdered){this._sortExports()}return this._exports.values()}get exports(){if(this._redirectTo!==undefined){const v=new Map(this._redirectTo._exports);for(const[E,R]of this._exports){v.set(E,R)}return v.values()}return this._exports.values()}get orderedExports(){if(!this._exportsAreOrdered){this._sortExports()}if(this._redirectTo!==undefined){const v=new Map(Array.from(this._redirectTo.orderedExports,(v=>[v.name,v])));for(const[E,R]of this._exports){v.set(E,R)}this._sortExportsMap(v);return v.values()}return this._exports.values()}get otherExportsInfo(){if(this._redirectTo!==undefined)return this._redirectTo.otherExportsInfo;return this._otherExportsInfo}_sortExportsMap(v){if(v.size>1){const E=[];for(const R of v.values()){E.push(R.name)}E.sort();let R=0;for(const $ of v.values()){const v=E[R];if($.name!==v)break;R++}for(;R0){const E=this.getReadOnlyExportInfo(v[0]);if(!E.exportsInfo)return undefined;return E.exportsInfo.getNestedExportsInfo(v.slice(1))}return this}setUnknownExportsProvided(v,E,R,$,j){let N=false;if(E){for(const v of E){this.getExportInfo(v)}}for(const j of this._exports.values()){if(!v&&j.canMangleProvide!==false){j.canMangleProvide=false;N=true}if(E&&E.has(j.name))continue;if(j.provided!==true&&j.provided!==null){j.provided=null;N=true}if(R){j.setTarget(R,$,[j.name],-1)}}if(this._redirectTo!==undefined){if(this._redirectTo.setUnknownExportsProvided(v,E,R,$,j)){N=true}}else{if(this._otherExportsInfo.provided!==true&&this._otherExportsInfo.provided!==null){this._otherExportsInfo.provided=null;N=true}if(!v&&this._otherExportsInfo.canMangleProvide!==false){this._otherExportsInfo.canMangleProvide=false;N=true}if(R){this._otherExportsInfo.setTarget(R,$,undefined,j)}}return N}setUsedInUnknownWay(v){let E=false;for(const R of this._exports.values()){if(R.setUsedInUnknownWay(v)){E=true}}if(this._redirectTo!==undefined){if(this._redirectTo.setUsedInUnknownWay(v)){E=true}}else{if(this._otherExportsInfo.setUsedConditionally((v=>vv===G.Unused),G.Used,v)}isUsed(v){if(this._redirectTo!==undefined){if(this._redirectTo.isUsed(v)){return true}}else{if(this._otherExportsInfo.getUsed(v)!==G.Unused){return true}}for(const E of this._exports.values()){if(E.getUsed(v)!==G.Unused){return true}}return false}isModuleUsed(v){if(this.isUsed(v))return true;if(this._sideEffectsOnlyInfo.getUsed(v)!==G.Unused)return true;return false}getUsedExports(v){if(!this._redirectTo!==undefined){switch(this._otherExportsInfo.getUsed(v)){case G.NoInfo:return null;case G.Unknown:case G.OnlyPropertiesUsed:case G.Used:return true}}const E=[];if(!this._exportsAreOrdered)this._sortExports();for(const R of this._exports.values()){switch(R.getUsed(v)){case G.NoInfo:return null;case G.Unknown:return true;case G.OnlyPropertiesUsed:case G.Used:E.push(R.name)}}if(this._redirectTo!==undefined){const R=this._redirectTo.getUsedExports(v);if(R===null)return null;if(R===true)return true;if(R!==false){for(const v of R){E.push(v)}}}if(E.length===0){switch(this._sideEffectsOnlyInfo.getUsed(v)){case G.NoInfo:return null;case G.Unused:return false}}return new j(E)}getProvidedExports(){if(!this._redirectTo!==undefined){switch(this._otherExportsInfo.provided){case undefined:return null;case null:return true;case true:return true}}const v=[];if(!this._exportsAreOrdered)this._sortExports();for(const E of this._exports.values()){switch(E.provided){case undefined:return null;case null:return true;case true:v.push(E.name)}}if(this._redirectTo!==undefined){const E=this._redirectTo.getProvidedExports();if(E===null)return null;if(E===true)return true;for(const R of E){if(!v.includes(R)){v.push(R)}}}return v}getRelevantExports(v){const E=[];for(const R of this._exports.values()){const $=R.getUsed(v);if($===G.Unused)continue;if(R.provided===false)continue;E.push(R)}if(this._redirectTo!==undefined){for(const R of this._redirectTo.getRelevantExports(v)){if(!this._exports.has(R.name))E.push(R)}}if(this._otherExportsInfo.provided!==false&&this._otherExportsInfo.getUsed(v)!==G.Unused){E.push(this._otherExportsInfo)}return E}isExportProvided(v){if(Array.isArray(v)){const E=this.getReadOnlyExportInfo(v[0]);if(E.exportsInfo&&v.length>1){return E.exportsInfo.isExportProvided(v.slice(1))}return E.provided?v.length===1||undefined:E.provided}const E=this.getReadOnlyExportInfo(v);return E.provided}getUsageKey(v){const E=[];if(this._redirectTo!==undefined){E.push(this._redirectTo.getUsageKey(v))}else{E.push(this._otherExportsInfo.getUsed(v))}E.push(this._sideEffectsOnlyInfo.getUsed(v));for(const R of this.orderedOwnedExports){E.push(R.getUsed(v))}return E.join("|")}isEquallyUsed(v,E){if(this._redirectTo!==undefined){if(!this._redirectTo.isEquallyUsed(v,E))return false}else{if(this._otherExportsInfo.getUsed(v)!==this._otherExportsInfo.getUsed(E)){return false}}if(this._sideEffectsOnlyInfo.getUsed(v)!==this._sideEffectsOnlyInfo.getUsed(E)){return false}for(const R of this.ownedExports){if(R.getUsed(v)!==R.getUsed(E))return false}return true}getUsed(v,E){if(Array.isArray(v)){if(v.length===0)return this.otherExportsInfo.getUsed(E);let R=this.getReadOnlyExportInfo(v[0]);if(R.exportsInfo&&v.length>1){return R.exportsInfo.getUsed(v.slice(1),E)}return R.getUsed(E)}let R=this.getReadOnlyExportInfo(v);return R.getUsed(E)}getUsedName(v,E){if(Array.isArray(v)){if(v.length===0){if(!this.isUsed(E))return false;return v}let R=this.getReadOnlyExportInfo(v[0]);const $=R.getUsedName(v[0],E);if($===false)return false;const j=$===v[0]&&v.length===1?v:[$];if(v.length===1){return j}if(R.exportsInfo&&R.getUsed(E)===G.OnlyPropertiesUsed){const $=R.exportsInfo.getUsedName(v.slice(1),E);if(!$)return false;return j.concat($)}else{return j.concat(v.slice(1))}}else{let R=this.getReadOnlyExportInfo(v);const $=R.getUsedName(v,E);return $}}updateHash(v,E){this._updateHash(v,E,new Set)}_updateHash(v,E,R){const $=new Set(R);$.add(this);for(const R of this.orderedExports){if(R.hasInfo(this._otherExportsInfo,E)){R._updateHash(v,E,$)}}this._sideEffectsOnlyInfo._updateHash(v,E,$);this._otherExportsInfo._updateHash(v,E,$);if(this._redirectTo!==undefined){this._redirectTo._updateHash(v,E,$)}}getRestoreProvidedData(){const v=this._otherExportsInfo.provided;const E=this._otherExportsInfo.canMangleProvide;const R=this._otherExportsInfo.terminalBinding;const $=[];for(const j of this.orderedExports){if(j.provided!==v||j.canMangleProvide!==E||j.terminalBinding!==R||j.exportsInfoOwned){$.push({name:j.name,provided:j.provided,canMangleProvide:j.canMangleProvide,terminalBinding:j.terminalBinding,exportsInfo:j.exportsInfoOwned?j.exportsInfo.getRestoreProvidedData():undefined})}}return new RestoreProvidedData($,v,E,R)}restoreProvided({otherProvided:v,otherCanMangleProvide:E,otherTerminalBinding:R,exports:$}){let j=true;for(const $ of this._exports.values()){j=false;$.provided=v;$.canMangleProvide=E;$.terminalBinding=R}this._otherExportsInfo.provided=v;this._otherExportsInfo.canMangleProvide=E;this._otherExportsInfo.terminalBinding=R;for(const v of $){const E=this.getExportInfo(v.name);E.provided=v.provided;E.canMangleProvide=v.canMangleProvide;E.terminalBinding=v.terminalBinding;if(v.exportsInfo){const R=E.createNestedExportsInfo();R.restoreProvided(v.exportsInfo)}}if(j)this._exportsAreOrdered=true}}class ExportInfo{constructor(v,E){this.name=v;this._usedName=E?E._usedName:null;this._globalUsed=E?E._globalUsed:undefined;this._usedInRuntime=E&&E._usedInRuntime?new Map(E._usedInRuntime):undefined;this._hasUseInRuntimeInfo=E?E._hasUseInRuntimeInfo:false;this.provided=E?E.provided:undefined;this.terminalBinding=E?E.terminalBinding:false;this.canMangleProvide=E?E.canMangleProvide:undefined;this.canMangleUse=E?E.canMangleUse:undefined;this.exportsInfoOwned=false;this.exportsInfo=undefined;this._target=undefined;if(E&&E._target){this._target=new Map;for(const[R,$]of E._target){this._target.set(R,{connection:$.connection,export:$.export||[v],priority:$.priority})}}this._maxTarget=undefined}get used(){throw new Error("REMOVED")}get usedName(){throw new Error("REMOVED")}set used(v){throw new Error("REMOVED")}set usedName(v){throw new Error("REMOVED")}get canMangle(){switch(this.canMangleProvide){case undefined:return this.canMangleUse===false?false:undefined;case false:return false;case true:switch(this.canMangleUse){case undefined:return undefined;case false:return false;case true:return true}}throw new Error(`Unexpected flags for canMangle ${this.canMangleProvide} ${this.canMangleUse}`)}setUsedInUnknownWay(v){let E=false;if(this.setUsedConditionally((v=>vthis._usedInRuntime.set(v,E)));return true}}else{let $=false;q(R,(R=>{let j=this._usedInRuntime.get(R);if(j===undefined)j=G.Unused;if(E!==j&&v(j)){if(E===G.Unused){this._usedInRuntime.delete(R)}else{this._usedInRuntime.set(R,E)}$=true}}));if($){if(this._usedInRuntime.size===0)this._usedInRuntime=undefined;return true}}return false}setUsed(v,E){if(E===undefined){if(this._globalUsed!==v){this._globalUsed=v;return true}}else if(this._usedInRuntime===undefined){if(v!==G.Unused){this._usedInRuntime=new Map;q(E,(E=>this._usedInRuntime.set(E,v)));return true}}else{let R=false;q(E,(E=>{let $=this._usedInRuntime.get(E);if($===undefined)$=G.Unused;if(v!==$){if(v===G.Unused){this._usedInRuntime.delete(E)}else{this._usedInRuntime.set(E,v)}R=true}}));if(R){if(this._usedInRuntime.size===0)this._usedInRuntime=undefined;return true}}return false}unsetTarget(v){if(!this._target)return false;if(this._target.delete(v)){this._maxTarget=undefined;return true}return false}setTarget(v,E,R,j=0){if(R)R=[...R];if(!this._target){this._target=new Map;this._target.set(v,{connection:E,export:R,priority:j});return true}const N=this._target.get(v);if(!N){if(N===null&&!E)return false;this._target.set(v,{connection:E,export:R,priority:j});this._maxTarget=undefined;return true}if(N.connection!==E||N.priority!==j||(R?!N.export||!$(N.export,R):N.export)){N.connection=E;N.export=R;N.priority=j;this._maxTarget=undefined;return true}return false}getUsed(v){if(!this._hasUseInRuntimeInfo)return G.NoInfo;if(this._globalUsed!==undefined)return this._globalUsed;if(this._usedInRuntime===undefined){return G.Unused}else if(typeof v==="string"){const E=this._usedInRuntime.get(v);return E===undefined?G.Unused:E}else if(v===undefined){let v=G.Unused;for(const E of this._usedInRuntime.values()){if(E===G.Used){return G.Used}if(v!this._usedInRuntime.has(v)))){return false}}}}if(this._usedName!==null)return this._usedName;return this.name||v}hasUsedName(){return this._usedName!==null}setUsedName(v){this._usedName=v}getTerminalBinding(v,E=RETURNS_TRUE){if(this.terminalBinding)return this;const R=this.getTarget(v,E);if(!R)return undefined;const $=v.getExportsInfo(R.module);if(!R.export)return $;return $.getReadOnlyExportInfoRecursive(R.export)}isReexport(){return!this.terminalBinding&&this._target&&this._target.size>0}_getMaxTarget(){if(this._maxTarget!==undefined)return this._maxTarget;if(this._target.size<=1)return this._maxTarget=this._target;let v=-Infinity;let E=Infinity;for(const{priority:R}of this._target.values()){if(vR)E=R}if(v===E)return this._maxTarget=this._target;const R=new Map;for(const[E,$]of this._target){if(v===$.priority){R.set(E,$)}}this._maxTarget=R;return R}findTarget(v,E){return this._findTarget(v,E,new Set)}_findTarget(v,E,R){if(!this._target||this._target.size===0)return undefined;let $=this._getMaxTarget().values().next().value;if(!$)return undefined;let j={module:$.connection.module,export:$.export};for(;;){if(E(j.module))return j;const $=v.getExportsInfo(j.module);const N=$.getExportInfo(j.export[0]);if(R.has(N))return null;const q=N._findTarget(v,E,R);if(!q)return false;if(j.export.length===1){j=q}else{j={module:q.module,export:q.export?q.export.concat(j.export.slice(1)):j.export.slice(1)}}}}getTarget(v,E=RETURNS_TRUE){const R=this._getTarget(v,E,undefined);if(R===ie)return undefined;return R}_getTarget(v,E,R){const resolveTarget=(R,$)=>{if(!R)return null;if(!R.export){return{module:R.connection.module,connection:R.connection,export:undefined}}let j={module:R.connection.module,connection:R.connection,export:R.export};if(!E(j))return j;let N=false;for(;;){const R=v.getExportsInfo(j.module);const q=R.getExportInfo(j.export[0]);if(!q)return j;if($.has(q))return ie;const G=q._getTarget(v,E,$);if(G===ie)return ie;if(!G)return j;if(j.export.length===1){j=G;if(!j.export)return j}else{j={module:G.module,connection:G.connection,export:G.export?G.export.concat(j.export.slice(1)):j.export.slice(1)}}if(!E(j))return j;if(!N){$=new Set($);N=true}$.add(q)}};if(!this._target||this._target.size===0)return undefined;if(R&&R.has(this))return ie;const j=new Set(R);j.add(this);const N=this._getMaxTarget().values();const q=resolveTarget(N.next().value,j);if(q===ie)return ie;if(q===null)return undefined;let G=N.next();while(!G.done){const v=resolveTarget(G.value,j);if(v===ie)return ie;if(v===null)return undefined;if(v.module!==q.module)return undefined;if(!v.export!==!q.export)return undefined;if(q.export&&!$(v.export,q.export))return undefined;G=N.next()}return q}moveTarget(v,E,R){const $=this._getTarget(v,E,undefined);if($===ie)return undefined;if(!$)return undefined;const j=this._getMaxTarget().values().next().value;if(j.connection===$.connection&&j.export===$.export){return undefined}this._target.clear();this._target.set(undefined,{connection:R?R($):$.connection,export:$.export,priority:0});return $}createNestedExportsInfo(){if(this.exportsInfoOwned)return this.exportsInfo;this.exportsInfoOwned=true;const v=this.exportsInfo;this.exportsInfo=new ExportsInfo;this.exportsInfo.setHasProvideInfo();if(v){this.exportsInfo.setRedirectNamedTo(v)}return this.exportsInfo}getNestedExportsInfo(){return this.exportsInfo}hasInfo(v,E){return this._usedName&&this._usedName!==this.name||this.provided||this.terminalBinding||this.getUsed(E)!==v.getUsed(E)}updateHash(v,E){this._updateHash(v,E,new Set)}_updateHash(v,E,R){v.update(`${this._usedName||this.name}${this.getUsed(E)}${this.provided}${this.terminalBinding}`);if(this.exportsInfo&&!R.has(this.exportsInfo)){this.exportsInfo._updateHash(v,E,R)}}getUsedInfo(){if(this._globalUsed!==undefined){switch(this._globalUsed){case G.Unused:return"unused";case G.NoInfo:return"no usage info";case G.Unknown:return"maybe used (runtime-defined)";case G.Used:return"used";case G.OnlyPropertiesUsed:return"only properties used"}}else if(this._usedInRuntime!==undefined){const v=new Map;for(const[E,R]of this._usedInRuntime){const $=v.get(R);if($!==undefined)$.push(E);else v.set(R,[E])}const E=Array.from(v,(([v,E])=>{switch(v){case G.NoInfo:return`no usage info in ${E.join(", ")}`;case G.Unknown:return`maybe used in ${E.join(", ")} (runtime-defined)`;case G.Used:return`used in ${E.join(", ")}`;case G.OnlyPropertiesUsed:return`only properties used in ${E.join(", ")}`}}));if(E.length>0){return E.join("; ")}}return this._hasUseInRuntimeInfo?"unused":"no usage info"}getProvidedInfo(){switch(this.provided){case undefined:return"no provided info";case null:return"maybe provided (runtime-defined)";case true:return"provided";case false:return"not provided"}}getRenameInfo(){if(this._usedName!==null&&this._usedName!==this.name){return`renamed to ${JSON.stringify(this._usedName).slice(1,-1)}`}switch(this.canMangleProvide){case undefined:switch(this.canMangleUse){case undefined:return"missing provision and use info prevents renaming";case false:return"usage prevents renaming (no provision info)";case true:return"missing provision info prevents renaming"}break;case true:switch(this.canMangleUse){case undefined:return"missing usage info prevents renaming";case false:return"usage prevents renaming";case true:return"could be renamed"}break;case false:switch(this.canMangleUse){case undefined:return"provision prevents renaming (no use info)";case false:return"usage and provision prevents renaming";case true:return"provision prevents renaming"}break}throw new Error(`Unexpected flags for getRenameInfo ${this.canMangleProvide} ${this.canMangleUse}`)}}v.exports=ExportsInfo;v.exports.ExportInfo=ExportInfo;v.exports.UsageState=G},38460:function(v,E,R){"use strict";const $=R(14367);const j=R(36853);class ExportsInfoApiPlugin{apply(v){v.hooks.compilation.tap("ExportsInfoApiPlugin",((v,{normalModuleFactory:E})=>{v.dependencyTemplates.set(j,new j.Template);const handler=v=>{v.hooks.expressionMemberChain.for("__webpack_exports_info__").tap("ExportsInfoApiPlugin",((E,R)=>{const $=R.length>=2?new j(E.range,R.slice(0,-1),R[R.length-1]):new j(E.range,null,R[0]);$.loc=E.loc;v.state.module.addDependency($);return true}));v.hooks.expression.for("__webpack_exports_info__").tap("ExportsInfoApiPlugin",(E=>{const R=new $("true",E.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}))};E.hooks.parser.for("javascript/auto").tap("ExportsInfoApiPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("ExportsInfoApiPlugin",handler);E.hooks.parser.for("javascript/esm").tap("ExportsInfoApiPlugin",handler)}))}}v.exports=ExportsInfoApiPlugin},73096:function(v,E,R){"use strict";const{OriginalSource:$,RawSource:j}=R(51255);const N=R(81701);const{UsageState:q}=R(13168);const G=R(64768);const ie=R(53840);const ae=R(39201);const ce=R(43841);const le=R(19383);const me=R(85205);const _e=R(45045);const Ie=R(65764);const Me=R(67603);const{register:Oe}=R(7591);const Te=new Set(["javascript"]);const Ne=new Set(["css-import"]);const Be=new Set([ae.module]);const Le=new Set([ae.loadScript]);const qe=new Set([ae.definePropertyGetters]);const Ue=new Set([]);const getSourceForGlobalVariableExternal=(v,E)=>{if(!Array.isArray(v)){v=[v]}const R=v.map((v=>`[${JSON.stringify(v)}]`)).join("");return{iife:E==="this",expression:`${E}${R}`}};const getSourceForCommonJsExternal=v=>{if(!Array.isArray(v)){return{expression:`require(${JSON.stringify(v)})`}}const E=v[0];return{expression:`require(${JSON.stringify(E)})${Me(v,1)}`}};const getSourceForCommonJsExternalInNodeModule=v=>{const E=[new G('import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";\n',G.STAGE_HARMONY_IMPORTS,0,"external module node-commonjs")];if(!Array.isArray(v)){return{expression:`__WEBPACK_EXTERNAL_createRequire(import.meta.url)(${JSON.stringify(v)})`,chunkInitFragments:E}}const R=v[0];return{expression:`__WEBPACK_EXTERNAL_createRequire(import.meta.url)(${JSON.stringify(R)})${Me(v,1)}`,chunkInitFragments:E}};const getSourceForImportExternal=(v,E)=>{const R=E.outputOptions.importFunctionName;if(!E.supportsDynamicImport()&&R==="import"){throw new Error("The target environment doesn't support 'import()' so it's not possible to use external type 'import'")}if(!Array.isArray(v)){return{expression:`${R}(${JSON.stringify(v)});`}}if(v.length===1){return{expression:`${R}(${JSON.stringify(v[0])});`}}const $=v[0];return{expression:`${R}(${JSON.stringify($)}).then(${E.returningFunction(`module${Me(v,1)}`,"module")});`}};class ModuleExternalInitFragment extends G{constructor(v,E,R="md4"){if(E===undefined){E=ce.toIdentifier(v);if(E!==v){E+=`_${me(R).update(v).digest("hex").slice(0,8)}`}}const $=`__WEBPACK_EXTERNAL_MODULE_${E}__`;super(`import * as ${$} from ${JSON.stringify(v)};\n`,G.STAGE_HARMONY_IMPORTS,0,`external module import ${E}`);this._ident=E;this._identifier=$;this._request=v}getNamespaceIdentifier(){return this._identifier}}Oe(ModuleExternalInitFragment,"webpack/lib/ExternalModule","ModuleExternalInitFragment",{serialize(v,{write:E}){E(v._request);E(v._ident)},deserialize({read:v}){return new ModuleExternalInitFragment(v(),v())}});const generateModuleRemapping=(v,E,R)=>{if(E.otherExportsInfo.getUsed(R)===q.Unused){const $=[];for(const j of E.orderedExports){const E=j.getUsedName(j.name,R);if(!E)continue;const N=j.getNestedExportsInfo();if(N){const R=generateModuleRemapping(`${v}${Me([j.name])}`,N);if(R){$.push(`[${JSON.stringify(E)}]: y(${R})`);continue}}$.push(`[${JSON.stringify(E)}]: () => ${v}${Me([j.name])}`)}return`x({ ${$.join(", ")} })`}};const getSourceForModuleExternal=(v,E,R,$)=>{if(!Array.isArray(v))v=[v];const j=new ModuleExternalInitFragment(v[0],undefined,$);const N=`${j.getNamespaceIdentifier()}${Me(v,1)}`;const q=generateModuleRemapping(N,E,R);let G=q||N;return{expression:G,init:`var x = y => { var x = {}; ${ae.definePropertyGetters}(x, y); return x; }\nvar y = x => () => x`,runtimeRequirements:q?qe:undefined,chunkInitFragments:[j]}};const getSourceForScriptExternal=(v,E)=>{if(typeof v==="string"){v=_e(v)}const R=v[0];const $=v[1];return{init:"var __webpack_error__ = new Error();",expression:`new Promise(${E.basicFunction("resolve, reject",[`if(typeof ${$} !== "undefined") return resolve();`,`${ae.loadScript}(${JSON.stringify(R)}, ${E.basicFunction("event",[`if(typeof ${$} !== "undefined") return resolve();`,"var errorType = event && (event.type === 'load' ? 'missing' : event.type);","var realSrc = event && event.target && event.target.src;","__webpack_error__.message = 'Loading script failed.\\n(' + errorType + ': ' + realSrc + ')';","__webpack_error__.name = 'ScriptExternalLoadError';","__webpack_error__.type = errorType;","__webpack_error__.request = realSrc;","reject(__webpack_error__);"])}, ${JSON.stringify($)});`])}).then(${E.returningFunction(`${$}${Me(v,2)}`)})`,runtimeRequirements:Le}};const checkExternalVariable=(v,E,R)=>`if(typeof ${v} === 'undefined') { ${R.throwMissingModuleErrorBlock({request:E})} }\n`;const getSourceForAmdOrUmdExternal=(v,E,R,$)=>{const j=`__WEBPACK_EXTERNAL_MODULE_${ce.toIdentifier(`${v}`)}__`;return{init:E?checkExternalVariable(j,Array.isArray(R)?R.join("."):R,$):undefined,expression:j}};const getSourceForDefaultCase=(v,E,R)=>{if(!Array.isArray(E)){E=[E]}const $=E[0];const j=Me(E,1);return{init:v?checkExternalVariable($,E.join("."),R):undefined,expression:`${$}${j}`}};class ExternalModule extends ie{constructor(v,E,R){super("javascript/dynamic",null);this.request=v;this.externalType=E;this.userRequest=R}getSourceTypes(){return this.externalType==="css-import"?Ne:Te}libIdent(v){return this.userRequest}chunkCondition(v,{chunkGraph:E}){return this.externalType==="css-import"?true:E.getNumberOfEntryModules(v)>0}identifier(){return`external ${this.externalType} ${JSON.stringify(this.request)}`}readableIdentifier(v){return"external "+JSON.stringify(this.request)}needBuild(v,E){return E(null,!this.buildMeta)}build(v,E,R,$,j){this.buildMeta={async:false,exportsType:undefined};this.buildInfo={strict:true,topLevelDeclarations:new Set,module:E.outputOptions.module};const{request:N,externalType:q}=this._getRequestAndExternalType();this.buildMeta.exportsType="dynamic";let G=false;this.clearDependenciesAndBlocks();switch(q){case"this":this.buildInfo.strict=false;break;case"system":if(!Array.isArray(N)||N.length===1){this.buildMeta.exportsType="namespace";G=true}break;case"module":if(this.buildInfo.module){if(!Array.isArray(N)||N.length===1){this.buildMeta.exportsType="namespace";G=true}}else{this.buildMeta.async=true;if(!Array.isArray(N)||N.length===1){this.buildMeta.exportsType="namespace";G=false}}break;case"script":case"promise":this.buildMeta.async=true;break;case"import":this.buildMeta.async=true;if(!Array.isArray(N)||N.length===1){this.buildMeta.exportsType="namespace";G=false}break}this.addDependency(new le(true,G));j()}restoreFromUnsafeCache(v,E){this._restoreFromUnsafeCache(v,E)}getConcatenationBailoutReason({moduleGraph:v}){switch(this.externalType){case"amd":case"amd-require":case"umd":case"umd2":case"system":case"jsonp":return`${this.externalType} externals can't be concatenated`}return undefined}_getRequestAndExternalType(){let{request:v,externalType:E}=this;if(typeof v==="object"&&!Array.isArray(v))v=v[E];return{request:v,externalType:E}}_getSourceData(v,E,R,$,j,N){switch(E){case"this":case"window":case"self":return getSourceForGlobalVariableExternal(v,this.externalType);case"global":return getSourceForGlobalVariableExternal(v,R.globalObject);case"commonjs":case"commonjs2":case"commonjs-module":case"commonjs-static":return getSourceForCommonJsExternal(v);case"node-commonjs":return this.buildInfo.module?getSourceForCommonJsExternalInNodeModule(v):getSourceForCommonJsExternal(v);case"amd":case"amd-require":case"umd":case"umd2":case"system":case"jsonp":{const E=j.getModuleId(this);return getSourceForAmdOrUmdExternal(E!==null?E:this.identifier(),this.isOptional($),v,R)}case"import":return getSourceForImportExternal(v,R);case"script":return getSourceForScriptExternal(v,R);case"module":{if(!this.buildInfo.module){if(!R.supportsDynamicImport()){throw new Error("The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script"+(R.supportsEcmaScriptModuleSyntax()?"\nDid you mean to build a EcmaScript Module ('output.module: true')?":""))}return getSourceForImportExternal(v,R)}if(!R.supportsEcmaScriptModuleSyntax()){throw new Error("The target environment doesn't support EcmaScriptModule syntax so it's not possible to use external type 'module'")}return getSourceForModuleExternal(v,$.getExportsInfo(this),N,R.outputOptions.hashFunction)}case"var":case"promise":case"const":case"let":case"assign":default:return getSourceForDefaultCase(this.isOptional($),v,R)}}codeGeneration({runtimeTemplate:v,moduleGraph:E,chunkGraph:R,runtime:q,concatenationScope:G}){const{request:ie,externalType:ce}=this._getRequestAndExternalType();switch(ce){case"asset":{const v=new Map;v.set("javascript",new j(`module.exports = ${JSON.stringify(ie)};`));const E=new Map;E.set("url",ie);return{sources:v,runtimeRequirements:Be,data:E}}case"css-import":{const v=new Map;v.set("css-import",new j(`@import url(${JSON.stringify(ie)});`));return{sources:v,runtimeRequirements:Ue}}default:{const le=this._getSourceData(ie,ce,v,E,R,q);let me=le.expression;if(le.iife)me=`(function() { return ${me}; }())`;if(G){me=`${v.supportsConst()?"const":"var"} ${N.NAMESPACE_OBJECT_EXPORT} = ${me};`;G.registerNamespaceExport(N.NAMESPACE_OBJECT_EXPORT)}else{me=`module.exports = ${me};`}if(le.init)me=`${le.init}\n${me}`;let _e=undefined;if(le.chunkInitFragments){_e=new Map;_e.set("chunkInitFragments",le.chunkInitFragments)}const Ie=new Map;if(this.useSourceMap||this.useSimpleSourceMap){Ie.set("javascript",new $(me,this.identifier()))}else{Ie.set("javascript",new j(me))}let Me=le.runtimeRequirements;if(!G){if(!Me){Me=Be}else{const v=new Set(Me);v.add(ae.module);Me=v}}return{sources:Ie,runtimeRequirements:Me||Ue,data:_e}}}}size(v){return 42}updateHash(v,E){const{chunkGraph:R}=E;v.update(`${this.externalType}${JSON.stringify(this.request)}${this.isOptional(R.moduleGraph)}`);super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this.request);E(this.externalType);E(this.userRequest);super.serialize(v)}deserialize(v){const{read:E}=v;this.request=E();this.externalType=E();this.userRequest=E();super.deserialize(v)}}Ie(ExternalModule,"webpack/lib/ExternalModule");v.exports=ExternalModule},69452:function(v,E,R){"use strict";const $=R(73837);const j=R(73096);const{resolveByProperty:N,cachedSetProperty:q}=R(22093);const G=/^[a-z0-9-]+ /;const ie={};const ae=$.deprecate(((v,E,R,$)=>{v.call(null,E,R,$)}),"The externals-function should be defined like ({context, request}, cb) => { ... }","DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS");const ce=new WeakMap;const resolveLayer=(v,E)=>{let R=ce.get(v);if(R===undefined){R=new Map;ce.set(v,R)}else{const v=R.get(E);if(v!==undefined)return v}const $=N(v,"byLayer",E);R.set(E,$);return $};class ExternalModuleFactoryPlugin{constructor(v,E){this.type=v;this.externals=E}apply(v){const E=this.type;v.hooks.factorize.tapAsync("ExternalModuleFactoryPlugin",((R,$)=>{const N=R.context;const ce=R.contextInfo;const le=R.dependencies[0];const me=R.dependencyType;const handleExternal=(v,R,$)=>{if(v===false){return $()}let N;if(v===true){N=le.request}else{N=v}if(R===undefined){if(typeof N==="string"&&G.test(N)){const v=N.indexOf(" ");R=N.slice(0,v);N=N.slice(v+1)}else if(Array.isArray(N)&&N.length>0&&G.test(N[0])){const v=N[0];const E=v.indexOf(" ");R=v.slice(0,E);N=[v.slice(E+1),...N.slice(1)]}}$(null,new j(N,R||E,le.request))};const handleExternals=(E,$)=>{if(typeof E==="string"){if(E===le.request){return handleExternal(le.request,undefined,$)}}else if(Array.isArray(E)){let v=0;const next=()=>{let R;const handleExternalsAndCallback=(v,E)=>{if(v)return $(v);if(!E){if(R){R=false;return}return next()}$(null,E)};do{R=true;if(v>=E.length)return $();handleExternals(E[v++],handleExternalsAndCallback)}while(!R);R=false};next();return}else if(E instanceof RegExp){if(E.test(le.request)){return handleExternal(le.request,undefined,$)}}else if(typeof E==="function"){const cb=(v,E,R)=>{if(v)return $(v);if(E!==undefined){handleExternal(E,R,$)}else{$()}};if(E.length===3){ae(E,N,le.request,cb)}else{const $=E({context:N,request:le.request,dependencyType:me,contextInfo:ce,getResolve:E=>($,j,N)=>{const G={fileDependencies:R.fileDependencies,missingDependencies:R.missingDependencies,contextDependencies:R.contextDependencies};let ae=v.getResolver("normal",me?q(R.resolveOptions||ie,"dependencyType",me):R.resolveOptions);if(E)ae=ae.withOptions(E);if(N){ae.resolve({},$,j,G,N)}else{return new Promise(((v,E)=>{ae.resolve({},$,j,G,((R,$)=>{if(R)E(R);else v($)}))}))}}},cb);if($&&$.then)$.then((v=>cb(null,v)),cb)}return}else if(typeof E==="object"){const v=resolveLayer(E,ce.issuerLayer);if(Object.prototype.hasOwnProperty.call(v,le.request)){return handleExternal(v[le.request],undefined,$)}}$()};handleExternals(this.externals,$)}))}}v.exports=ExternalModuleFactoryPlugin},51562:function(v,E,R){"use strict";const $=R(69452);class ExternalsPlugin{constructor(v,E){this.type=v;this.externals=E}apply(v){v.hooks.compile.tap("ExternalsPlugin",(({normalModuleFactory:v})=>{new $(this.type,this.externals).apply(v)}))}}v.exports=ExternalsPlugin},67469:function(v,E,R){"use strict";const{create:$}=R(958);const j=R(98188);const N=R(78175);const{isAbsolute:q}=R(71017);const G=R(51491);const ie=R(91047);const ae=R(85205);const{join:ce,dirname:le,relative:me,lstatReadlinkAbsolute:_e}=R(47077);const Ie=R(65764);const Me=R(64102);const Oe=+process.versions.modules>=83;const Te=new Set(j.builtinModules);let Ne=2e3;const Be=new Set;const Le=0;const qe=1;const Ue=2;const Ge=3;const He=4;const We=5;const Qe=6;const Je=7;const Ve=8;const Ke=9;const Xe=Symbol("invalid");const Ye=(new Set).keys().next();class SnapshotIterator{constructor(v){this.next=v}}class SnapshotIterable{constructor(v,E){this.snapshot=v;this.getMaps=E}[Symbol.iterator](){let v=0;let E;let R;let $;let j;let N;return new SnapshotIterator((()=>{for(;;){switch(v){case 0:j=this.snapshot;R=this.getMaps;$=R(j);v=1;case 1:if($.length>0){const R=$.pop();if(R!==undefined){E=R.keys();v=2}else{break}}else{v=3;break}case 2:{const R=E.next();if(!R.done)return R;v=1;break}case 3:{const E=j.children;if(E!==undefined){if(E.size===1){for(const v of E)j=v;$=R(j);v=1;break}if(N===undefined)N=[];for(const v of E){N.push(v)}}if(N!==undefined&&N.length>0){j=N.pop();$=R(j);v=1;break}else{v=4}}case 4:return Ye}}}))}}class Snapshot{constructor(){this._flags=0;this._cachedFileIterable=undefined;this._cachedContextIterable=undefined;this._cachedMissingIterable=undefined;this.startTime=undefined;this.fileTimestamps=undefined;this.fileHashes=undefined;this.fileTshs=undefined;this.contextTimestamps=undefined;this.contextHashes=undefined;this.contextTshs=undefined;this.missingExistence=undefined;this.managedItemInfo=undefined;this.managedFiles=undefined;this.managedContexts=undefined;this.managedMissing=undefined;this.children=undefined}hasStartTime(){return(this._flags&1)!==0}setStartTime(v){this._flags=this._flags|1;this.startTime=v}setMergedStartTime(v,E){if(v){if(E.hasStartTime()){this.setStartTime(Math.min(v,E.startTime))}else{this.setStartTime(v)}}else{if(E.hasStartTime())this.setStartTime(E.startTime)}}hasFileTimestamps(){return(this._flags&2)!==0}setFileTimestamps(v){this._flags=this._flags|2;this.fileTimestamps=v}hasFileHashes(){return(this._flags&4)!==0}setFileHashes(v){this._flags=this._flags|4;this.fileHashes=v}hasFileTshs(){return(this._flags&8)!==0}setFileTshs(v){this._flags=this._flags|8;this.fileTshs=v}hasContextTimestamps(){return(this._flags&16)!==0}setContextTimestamps(v){this._flags=this._flags|16;this.contextTimestamps=v}hasContextHashes(){return(this._flags&32)!==0}setContextHashes(v){this._flags=this._flags|32;this.contextHashes=v}hasContextTshs(){return(this._flags&64)!==0}setContextTshs(v){this._flags=this._flags|64;this.contextTshs=v}hasMissingExistence(){return(this._flags&128)!==0}setMissingExistence(v){this._flags=this._flags|128;this.missingExistence=v}hasManagedItemInfo(){return(this._flags&256)!==0}setManagedItemInfo(v){this._flags=this._flags|256;this.managedItemInfo=v}hasManagedFiles(){return(this._flags&512)!==0}setManagedFiles(v){this._flags=this._flags|512;this.managedFiles=v}hasManagedContexts(){return(this._flags&1024)!==0}setManagedContexts(v){this._flags=this._flags|1024;this.managedContexts=v}hasManagedMissing(){return(this._flags&2048)!==0}setManagedMissing(v){this._flags=this._flags|2048;this.managedMissing=v}hasChildren(){return(this._flags&4096)!==0}setChildren(v){this._flags=this._flags|4096;this.children=v}addChild(v){if(!this.hasChildren()){this.setChildren(new Set)}this.children.add(v)}serialize({write:v}){v(this._flags);if(this.hasStartTime())v(this.startTime);if(this.hasFileTimestamps())v(this.fileTimestamps);if(this.hasFileHashes())v(this.fileHashes);if(this.hasFileTshs())v(this.fileTshs);if(this.hasContextTimestamps())v(this.contextTimestamps);if(this.hasContextHashes())v(this.contextHashes);if(this.hasContextTshs())v(this.contextTshs);if(this.hasMissingExistence())v(this.missingExistence);if(this.hasManagedItemInfo())v(this.managedItemInfo);if(this.hasManagedFiles())v(this.managedFiles);if(this.hasManagedContexts())v(this.managedContexts);if(this.hasManagedMissing())v(this.managedMissing);if(this.hasChildren())v(this.children)}deserialize({read:v}){this._flags=v();if(this.hasStartTime())this.startTime=v();if(this.hasFileTimestamps())this.fileTimestamps=v();if(this.hasFileHashes())this.fileHashes=v();if(this.hasFileTshs())this.fileTshs=v();if(this.hasContextTimestamps())this.contextTimestamps=v();if(this.hasContextHashes())this.contextHashes=v();if(this.hasContextTshs())this.contextTshs=v();if(this.hasMissingExistence())this.missingExistence=v();if(this.hasManagedItemInfo())this.managedItemInfo=v();if(this.hasManagedFiles())this.managedFiles=v();if(this.hasManagedContexts())this.managedContexts=v();if(this.hasManagedMissing())this.managedMissing=v();if(this.hasChildren())this.children=v()}_createIterable(v){return new SnapshotIterable(this,v)}getFileIterable(){if(this._cachedFileIterable===undefined){this._cachedFileIterable=this._createIterable((v=>[v.fileTimestamps,v.fileHashes,v.fileTshs,v.managedFiles]))}return this._cachedFileIterable}getContextIterable(){if(this._cachedContextIterable===undefined){this._cachedContextIterable=this._createIterable((v=>[v.contextTimestamps,v.contextHashes,v.contextTshs,v.managedContexts]))}return this._cachedContextIterable}getMissingIterable(){if(this._cachedMissingIterable===undefined){this._cachedMissingIterable=this._createIterable((v=>[v.missingExistence,v.managedMissing]))}return this._cachedMissingIterable}}Ie(Snapshot,"webpack/lib/FileSystemInfo","Snapshot");const Ze=3;class SnapshotOptimization{constructor(v,E,R,$=true,j=false){this._has=v;this._get=E;this._set=R;this._useStartTime=$;this._isSet=j;this._map=new Map;this._statItemsShared=0;this._statItemsUnshared=0;this._statSharedSnapshots=0;this._statReusedSharedSnapshots=0}getStatisticMessage(){const v=this._statItemsShared+this._statItemsUnshared;if(v===0)return undefined;return`${this._statItemsShared&&Math.round(this._statItemsShared*100/v)}% (${this._statItemsShared}/${v}) entries shared via ${this._statSharedSnapshots} shared snapshots (${this._statReusedSharedSnapshots+this._statSharedSnapshots} times referenced)`}clear(){this._map.clear();this._statItemsShared=0;this._statItemsUnshared=0;this._statSharedSnapshots=0;this._statReusedSharedSnapshots=0}optimize(v,E){const increaseSharedAndStoreOptimizationEntry=v=>{if(v.children!==undefined){v.children.forEach(increaseSharedAndStoreOptimizationEntry)}v.shared++;storeOptimizationEntry(v)};const storeOptimizationEntry=v=>{for(const R of v.snapshotContent){const $=this._map.get(R);if($.shared0){if(this._useStartTime&&v.startTime&&(!$.startTime||$.startTime>v.startTime)){continue}const j=new Set;const N=R.snapshotContent;const q=this._get($);for(const v of N){if(!E.has(v)){if(!q.has(v)){continue e}j.add(v);continue}}if(j.size===0){v.addChild($);increaseSharedAndStoreOptimizationEntry(R);this._statReusedSharedSnapshots++}else{const E=N.size-j.size;if(E{if(v[0]==="'")v=`"${v.slice(1,-1).replace(/"/g,'\\"')}"`;return JSON.parse(v)};const applyMtime=v=>{if(Ne>1&&v%2!==0)Ne=1;else if(Ne>10&&v%20!==0)Ne=10;else if(Ne>100&&v%200!==0)Ne=100;else if(Ne>1e3&&v%2e3!==0)Ne=1e3};const mergeMaps=(v,E)=>{if(!E||E.size===0)return v;if(!v||v.size===0)return E;const R=new Map(v);for(const[v,$]of E){R.set(v,$)}return R};const mergeSets=(v,E)=>{if(!E||E.size===0)return v;if(!v||v.size===0)return E;const R=new Set(v);for(const v of E){R.add(v)}return R};const getManagedItem=(v,E)=>{let R=v.length;let $=1;let j=true;e:while(R=R+13&&E.charCodeAt(R+1)===110&&E.charCodeAt(R+2)===111&&E.charCodeAt(R+3)===100&&E.charCodeAt(R+4)===101&&E.charCodeAt(R+5)===95&&E.charCodeAt(R+6)===109&&E.charCodeAt(R+7)===111&&E.charCodeAt(R+8)===100&&E.charCodeAt(R+9)===117&&E.charCodeAt(R+10)===108&&E.charCodeAt(R+11)===101&&E.charCodeAt(R+12)===115){if(E.length===R+13){return E}const v=E.charCodeAt(R+13);if(v===47||v===92){return getManagedItem(E.slice(0,R+14),E)}}return E.slice(0,R)};const getResolvedTimestamp=v=>{if(v===null)return null;if(v.resolved!==undefined)return v.resolved;return v.symlinks===undefined?v:undefined};const getResolvedHash=v=>{if(v===null)return null;if(v.resolved!==undefined)return v.resolved;return v.symlinks===undefined?v.hash:undefined};const addAll=(v,E)=>{for(const R of v)E.add(R)};class FileSystemInfo{constructor(v,{managedPaths:E=[],immutablePaths:R=[],logger:$,hashFunction:j="md4"}={}){this.fs=v;this.logger=$;this._remainingLogs=$?40:0;this._loggedPaths=$?new Set:undefined;this._hashFunction=j;this._snapshotCache=new WeakMap;this._fileTimestampsOptimization=new SnapshotOptimization((v=>v.hasFileTimestamps()),(v=>v.fileTimestamps),((v,E)=>v.setFileTimestamps(E)));this._fileHashesOptimization=new SnapshotOptimization((v=>v.hasFileHashes()),(v=>v.fileHashes),((v,E)=>v.setFileHashes(E)),false);this._fileTshsOptimization=new SnapshotOptimization((v=>v.hasFileTshs()),(v=>v.fileTshs),((v,E)=>v.setFileTshs(E)));this._contextTimestampsOptimization=new SnapshotOptimization((v=>v.hasContextTimestamps()),(v=>v.contextTimestamps),((v,E)=>v.setContextTimestamps(E)));this._contextHashesOptimization=new SnapshotOptimization((v=>v.hasContextHashes()),(v=>v.contextHashes),((v,E)=>v.setContextHashes(E)),false);this._contextTshsOptimization=new SnapshotOptimization((v=>v.hasContextTshs()),(v=>v.contextTshs),((v,E)=>v.setContextTshs(E)));this._missingExistenceOptimization=new SnapshotOptimization((v=>v.hasMissingExistence()),(v=>v.missingExistence),((v,E)=>v.setMissingExistence(E)),false);this._managedItemInfoOptimization=new SnapshotOptimization((v=>v.hasManagedItemInfo()),(v=>v.managedItemInfo),((v,E)=>v.setManagedItemInfo(E)),false);this._managedFilesOptimization=new SnapshotOptimization((v=>v.hasManagedFiles()),(v=>v.managedFiles),((v,E)=>v.setManagedFiles(E)),false,true);this._managedContextsOptimization=new SnapshotOptimization((v=>v.hasManagedContexts()),(v=>v.managedContexts),((v,E)=>v.setManagedContexts(E)),false,true);this._managedMissingOptimization=new SnapshotOptimization((v=>v.hasManagedMissing()),(v=>v.managedMissing),((v,E)=>v.setManagedMissing(E)),false,true);this._fileTimestamps=new ie;this._fileHashes=new Map;this._fileTshs=new Map;this._contextTimestamps=new ie;this._contextHashes=new Map;this._contextTshs=new Map;this._managedItems=new Map;this.fileTimestampQueue=new G({name:"file timestamp",parallelism:30,processor:this._readFileTimestamp.bind(this)});this.fileHashQueue=new G({name:"file hash",parallelism:10,processor:this._readFileHash.bind(this)});this.contextTimestampQueue=new G({name:"context timestamp",parallelism:2,processor:this._readContextTimestamp.bind(this)});this.contextHashQueue=new G({name:"context hash",parallelism:2,processor:this._readContextHash.bind(this)});this.contextTshQueue=new G({name:"context hash and timestamp",parallelism:2,processor:this._readContextTimestampAndHash.bind(this)});this.managedItemQueue=new G({name:"managed item info",parallelism:10,processor:this._getManagedItemInfo.bind(this)});this.managedItemDirectoryQueue=new G({name:"managed item directory info",parallelism:10,processor:this._getManagedItemDirectoryInfo.bind(this)});this.managedPaths=Array.from(E);this.managedPathsWithSlash=this.managedPaths.filter((v=>typeof v==="string")).map((E=>ce(v,E,"_").slice(0,-1)));this.managedPathsRegExps=this.managedPaths.filter((v=>typeof v!=="string"));this.immutablePaths=Array.from(R);this.immutablePathsWithSlash=this.immutablePaths.filter((v=>typeof v==="string")).map((E=>ce(v,E,"_").slice(0,-1)));this.immutablePathsRegExps=this.immutablePaths.filter((v=>typeof v!=="string"));this._cachedDeprecatedFileTimestamps=undefined;this._cachedDeprecatedContextTimestamps=undefined;this._warnAboutExperimentalEsmTracking=false;this._statCreatedSnapshots=0;this._statTestedSnapshotsCached=0;this._statTestedSnapshotsNotCached=0;this._statTestedChildrenCached=0;this._statTestedChildrenNotCached=0;this._statTestedEntries=0}logStatistics(){const logWhenMessage=(v,E)=>{if(E){this.logger.log(`${v}: ${E}`)}};this.logger.log(`${this._statCreatedSnapshots} new snapshots created`);this.logger.log(`${this._statTestedSnapshotsNotCached&&Math.round(this._statTestedSnapshotsNotCached*100/(this._statTestedSnapshotsCached+this._statTestedSnapshotsNotCached))}% root snapshot uncached (${this._statTestedSnapshotsNotCached} / ${this._statTestedSnapshotsCached+this._statTestedSnapshotsNotCached})`);this.logger.log(`${this._statTestedChildrenNotCached&&Math.round(this._statTestedChildrenNotCached*100/(this._statTestedChildrenCached+this._statTestedChildrenNotCached))}% children snapshot uncached (${this._statTestedChildrenNotCached} / ${this._statTestedChildrenCached+this._statTestedChildrenNotCached})`);this.logger.log(`${this._statTestedEntries} entries tested`);this.logger.log(`File info in cache: ${this._fileTimestamps.size} timestamps ${this._fileHashes.size} hashes ${this._fileTshs.size} timestamp hash combinations`);logWhenMessage(`File timestamp snapshot optimization`,this._fileTimestampsOptimization.getStatisticMessage());logWhenMessage(`File hash snapshot optimization`,this._fileHashesOptimization.getStatisticMessage());logWhenMessage(`File timestamp hash combination snapshot optimization`,this._fileTshsOptimization.getStatisticMessage());this.logger.log(`Directory info in cache: ${this._contextTimestamps.size} timestamps ${this._contextHashes.size} hashes ${this._contextTshs.size} timestamp hash combinations`);logWhenMessage(`Directory timestamp snapshot optimization`,this._contextTimestampsOptimization.getStatisticMessage());logWhenMessage(`Directory hash snapshot optimization`,this._contextHashesOptimization.getStatisticMessage());logWhenMessage(`Directory timestamp hash combination snapshot optimization`,this._contextTshsOptimization.getStatisticMessage());logWhenMessage(`Missing items snapshot optimization`,this._missingExistenceOptimization.getStatisticMessage());this.logger.log(`Managed items info in cache: ${this._managedItems.size} items`);logWhenMessage(`Managed items snapshot optimization`,this._managedItemInfoOptimization.getStatisticMessage());logWhenMessage(`Managed files snapshot optimization`,this._managedFilesOptimization.getStatisticMessage());logWhenMessage(`Managed contexts snapshot optimization`,this._managedContextsOptimization.getStatisticMessage());logWhenMessage(`Managed missing snapshot optimization`,this._managedMissingOptimization.getStatisticMessage())}_log(v,E,...R){const $=v+E;if(this._loggedPaths.has($))return;this._loggedPaths.add($);this.logger.debug(`${v} invalidated because ${E}`,...R);if(--this._remainingLogs===0){this.logger.debug("Logging limit has been reached and no further logging will be emitted by FileSystemInfo")}}clear(){this._remainingLogs=this.logger?40:0;if(this._loggedPaths!==undefined)this._loggedPaths.clear();this._snapshotCache=new WeakMap;this._fileTimestampsOptimization.clear();this._fileHashesOptimization.clear();this._fileTshsOptimization.clear();this._contextTimestampsOptimization.clear();this._contextHashesOptimization.clear();this._contextTshsOptimization.clear();this._missingExistenceOptimization.clear();this._managedItemInfoOptimization.clear();this._managedFilesOptimization.clear();this._managedContextsOptimization.clear();this._managedMissingOptimization.clear();this._fileTimestamps.clear();this._fileHashes.clear();this._fileTshs.clear();this._contextTimestamps.clear();this._contextHashes.clear();this._contextTshs.clear();this._managedItems.clear();this._managedItems.clear();this._cachedDeprecatedFileTimestamps=undefined;this._cachedDeprecatedContextTimestamps=undefined;this._statCreatedSnapshots=0;this._statTestedSnapshotsCached=0;this._statTestedSnapshotsNotCached=0;this._statTestedChildrenCached=0;this._statTestedChildrenNotCached=0;this._statTestedEntries=0}addFileTimestamps(v,E){this._fileTimestamps.addAll(v,E);this._cachedDeprecatedFileTimestamps=undefined}addContextTimestamps(v,E){this._contextTimestamps.addAll(v,E);this._cachedDeprecatedContextTimestamps=undefined}getFileTimestamp(v,E){const R=this._fileTimestamps.get(v);if(R!==undefined)return E(null,R);this.fileTimestampQueue.add(v,E)}getContextTimestamp(v,E){const R=this._contextTimestamps.get(v);if(R!==undefined){if(R==="ignore")return E(null,"ignore");const v=getResolvedTimestamp(R);if(v!==undefined)return E(null,v);return this._resolveContextTimestamp(R,E)}this.contextTimestampQueue.add(v,((v,R)=>{if(v)return E(v);const $=getResolvedTimestamp(R);if($!==undefined)return E(null,$);this._resolveContextTimestamp(R,E)}))}_getUnresolvedContextTimestamp(v,E){const R=this._contextTimestamps.get(v);if(R!==undefined)return E(null,R);this.contextTimestampQueue.add(v,E)}getFileHash(v,E){const R=this._fileHashes.get(v);if(R!==undefined)return E(null,R);this.fileHashQueue.add(v,E)}getContextHash(v,E){const R=this._contextHashes.get(v);if(R!==undefined){const v=getResolvedHash(R);if(v!==undefined)return E(null,v);return this._resolveContextHash(R,E)}this.contextHashQueue.add(v,((v,R)=>{if(v)return E(v);const $=getResolvedHash(R);if($!==undefined)return E(null,$);this._resolveContextHash(R,E)}))}_getUnresolvedContextHash(v,E){const R=this._contextHashes.get(v);if(R!==undefined)return E(null,R);this.contextHashQueue.add(v,E)}getContextTsh(v,E){const R=this._contextTshs.get(v);if(R!==undefined){const v=getResolvedTimestamp(R);if(v!==undefined)return E(null,v);return this._resolveContextTsh(R,E)}this.contextTshQueue.add(v,((v,R)=>{if(v)return E(v);const $=getResolvedTimestamp(R);if($!==undefined)return E(null,$);this._resolveContextTsh(R,E)}))}_getUnresolvedContextTsh(v,E){const R=this._contextTshs.get(v);if(R!==undefined)return E(null,R);this.contextTshQueue.add(v,E)}_createBuildDependenciesResolvers(){const v=$({resolveToContext:true,exportsFields:[],fileSystem:this.fs});const E=$({extensions:[".js",".json",".node"],conditionNames:["require","node"],exportsFields:["exports"],fileSystem:this.fs});const R=$({extensions:[".js",".json",".node"],conditionNames:["require","node"],exportsFields:[],fileSystem:this.fs});const j=$({extensions:[".js",".json",".node"],fullySpecified:true,conditionNames:["import","node"],exportsFields:["exports"],fileSystem:this.fs});return{resolveContext:v,resolveEsm:j,resolveCjs:E,resolveCjsAsChild:R}}resolveBuildDependencies(v,E,$){const{resolveContext:j,resolveEsm:N,resolveCjs:G,resolveCjsAsChild:ie}=this._createBuildDependenciesResolvers();const ae=new Set;const _e=new Set;const Ie=new Set;const Ne=new Set;const Be=new Set;const Xe=new Set;const Ye=new Set;const Ze=new Set;const et=new Map;const tt=new Set;const nt={fileDependencies:Xe,contextDependencies:Ye,missingDependencies:Ze};const expectedToString=v=>v?` (expected ${v})`:"";const jobToString=v=>{switch(v.type){case Le:return`resolve commonjs ${v.path}${expectedToString(v.expected)}`;case qe:return`resolve esm ${v.path}${expectedToString(v.expected)}`;case Ue:return`resolve directory ${v.path}`;case Ge:return`resolve commonjs file ${v.path}${expectedToString(v.expected)}`;case We:return`resolve esm file ${v.path}${expectedToString(v.expected)}`;case Qe:return`directory ${v.path}`;case Je:return`file ${v.path}`;case Ve:return`directory dependencies ${v.path}`;case Ke:return`file dependencies ${v.path}`}return`unknown ${v.type} ${v.path}`};const pathToString=v=>{let E=` at ${jobToString(v)}`;v=v.issuer;while(v!==undefined){E+=`\n at ${jobToString(v)}`;v=v.issuer}return E};Me(Array.from(E,(E=>({type:Le,context:v,path:E,expected:undefined,issuer:undefined}))),20,((v,E,$)=>{const{type:Me,context:Be,path:Ye,expected:st}=v;const resolveDirectory=R=>{const N=`d\n${Be}\n${R}`;if(et.has(N)){return $()}et.set(N,undefined);j(Be,R,nt,((j,q,G)=>{if(j){if(st===false){et.set(N,false);return $()}tt.add(N);j.message+=`\nwhile resolving '${R}' in ${Be} to a directory`;return $(j)}const ie=G.path;et.set(N,ie);E({type:Qe,context:undefined,path:ie,expected:undefined,issuer:v});$()}))};const resolveFile=(R,j,N)=>{const q=`${j}\n${Be}\n${R}`;if(et.has(q)){return $()}et.set(q,undefined);N(Be,R,nt,((j,N,G)=>{if(typeof st==="string"){if(!j&&G&&G.path===st){et.set(q,G.path)}else{tt.add(q);this.logger.warn(`Resolving '${R}' in ${Be} for build dependencies doesn't lead to expected result '${st}', but to '${j||G&&G.path}' instead. Resolving dependencies are ignored for this path.\n${pathToString(v)}`)}}else{if(j){if(st===false){et.set(q,false);return $()}tt.add(q);j.message+=`\nwhile resolving '${R}' in ${Be} as file\n${pathToString(v)}`;return $(j)}const N=G.path;et.set(q,N);E({type:Je,context:undefined,path:N,expected:undefined,issuer:v})}$()}))};switch(Me){case Le:{const v=/[\\/]$/.test(Ye);if(v){resolveDirectory(Ye.slice(0,Ye.length-1))}else{resolveFile(Ye,"f",G)}break}case qe:{const v=/[\\/]$/.test(Ye);if(v){resolveDirectory(Ye.slice(0,Ye.length-1))}else{resolveFile(Ye)}break}case Ue:{resolveDirectory(Ye);break}case Ge:{resolveFile(Ye,"f",G);break}case He:{resolveFile(Ye,"c",ie);break}case We:{resolveFile(Ye,"e",N);break}case Je:{if(ae.has(Ye)){$();break}ae.add(Ye);this.fs.realpath(Ye,((R,j)=>{if(R)return $(R);const N=j;if(N!==Ye){_e.add(Ye);Xe.add(Ye);if(ae.has(N))return $();ae.add(N)}E({type:Ke,context:undefined,path:N,expected:undefined,issuer:v});$()}));break}case Qe:{if(Ie.has(Ye)){$();break}Ie.add(Ye);this.fs.realpath(Ye,((R,j)=>{if(R)return $(R);const N=j;if(N!==Ye){Ne.add(Ye);Xe.add(Ye);if(Ie.has(N))return $();Ie.add(N)}E({type:Ve,context:undefined,path:N,expected:undefined,issuer:v});$()}));break}case Ke:{if(/\.json5?$|\.yarn-integrity$|yarn\.lock$|\.ya?ml/.test(Ye)){process.nextTick($);break}const j=require.cache[Ye];if(j&&Array.isArray(j.children)){e:for(const R of j.children){let $=R.filename;if($){E({type:Je,context:undefined,path:$,expected:undefined,issuer:v});const N=le(this.fs,Ye);for(const q of j.paths){if($.startsWith(q)){let j=$.slice(q.length+1);const G=/^(@[^\\/]+[\\/])[^\\/]+/.exec(j);if(G){E({type:Je,context:undefined,path:q+$[q.length]+G[0]+$[q.length]+"package.json",expected:false,issuer:v})}let ie=j.replace(/\\/g,"/");if(ie.endsWith(".js"))ie=ie.slice(0,-3);E({type:He,context:N,path:ie,expected:R.filename,issuer:v});continue e}}let G=me(this.fs,N,$);if(G.endsWith(".js"))G=G.slice(0,-3);G=G.replace(/\\/g,"/");if(!G.startsWith("../")&&!q(G)){G=`./${G}`}E({type:Ge,context:N,path:G,expected:R.filename,issuer:v})}}}else if(Oe&&/\.m?js$/.test(Ye)){if(!this._warnAboutExperimentalEsmTracking){this.logger.log("Node.js doesn't offer a (nice) way to introspect the ESM dependency graph yet.\n"+"Until a full solution is available webpack uses an experimental ESM tracking based on parsing.\n"+"As best effort webpack parses the ESM files to guess dependencies. But this can lead to expensive and incorrect tracking.");this._warnAboutExperimentalEsmTracking=true}const j=R(4612);j.init.then((()=>{this.fs.readFile(Ye,((R,N)=>{if(R)return $(R);try{const R=le(this.fs,Ye);const $=N.toString();const[q]=j.parse($);for(const j of q){try{let N;if(j.d===-1){N=parseString($.substring(j.s-1,j.e+1))}else if(j.d>-1){let v=$.substring(j.s,j.e).trim();N=parseString(v)}else{continue}if(N.startsWith("node:"))continue;if(Te.has(N))continue;E({type:We,context:R,path:N,expected:undefined,issuer:v})}catch(E){this.logger.warn(`Parsing of ${Ye} for build dependencies failed at 'import(${$.substring(j.s,j.e)})'.\n`+"Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.");this.logger.debug(pathToString(v));this.logger.debug(E.stack)}}}catch(E){this.logger.warn(`Parsing of ${Ye} for build dependencies failed and all dependencies of this file are ignored, which might cause incorrect cache invalidation..`);this.logger.debug(pathToString(v));this.logger.debug(E.stack)}process.nextTick($)}))}),$);break}else{this.logger.log(`Assuming ${Ye} has no dependencies as we were unable to assign it to any module system.`);this.logger.debug(pathToString(v))}process.nextTick($);break}case Ve:{const R=/(^.+[\\/]node_modules[\\/](?:@[^\\/]+[\\/])?[^\\/]+)/.exec(Ye);const j=R?R[1]:Ye;const N=ce(this.fs,j,"package.json");this.fs.readFile(N,((R,q)=>{if(R){if(R.code==="ENOENT"){Ze.add(N);const R=le(this.fs,j);if(R!==j){E({type:Ve,context:undefined,path:R,expected:undefined,issuer:v})}$();return}return $(R)}Xe.add(N);let G;try{G=JSON.parse(q.toString("utf-8"))}catch(v){return $(v)}const ie=G.dependencies;const ae=G.optionalDependencies;const ce=new Set;const me=new Set;if(typeof ie==="object"&&ie){for(const v of Object.keys(ie)){ce.add(v)}}if(typeof ae==="object"&&ae){for(const v of Object.keys(ae)){ce.add(v);me.add(v)}}for(const R of ce){E({type:Ue,context:j,path:R,expected:!me.has(R),issuer:v})}$()}));break}}}),(v=>{if(v)return $(v);for(const v of _e)ae.delete(v);for(const v of Ne)Ie.delete(v);for(const v of tt)et.delete(v);$(null,{files:ae,directories:Ie,missing:Be,resolveResults:et,resolveDependencies:{files:Xe,directories:Ye,missing:Ze}})}))}checkResolveResultsValid(v,E){const{resolveCjs:R,resolveCjsAsChild:$,resolveEsm:j,resolveContext:q}=this._createBuildDependenciesResolvers();N.eachLimit(v,20,(([v,E],N)=>{const[G,ie,ae]=v.split("\n");switch(G){case"d":q(ie,ae,{},((v,R,$)=>{if(E===false)return N(v?undefined:Xe);if(v)return N(v);const j=$.path;if(j!==E)return N(Xe);N()}));break;case"f":R(ie,ae,{},((v,R,$)=>{if(E===false)return N(v?undefined:Xe);if(v)return N(v);const j=$.path;if(j!==E)return N(Xe);N()}));break;case"c":$(ie,ae,{},((v,R,$)=>{if(E===false)return N(v?undefined:Xe);if(v)return N(v);const j=$.path;if(j!==E)return N(Xe);N()}));break;case"e":j(ie,ae,{},((v,R,$)=>{if(E===false)return N(v?undefined:Xe);if(v)return N(v);const j=$.path;if(j!==E)return N(Xe);N()}));break;default:N(new Error("Unexpected type in resolve result key"));break}}),(v=>{if(v===Xe){return E(null,false)}if(v){return E(v)}return E(null,true)}))}createSnapshot(v,E,R,$,j,N){const q=new Map;const G=new Map;const ie=new Map;const ae=new Map;const le=new Map;const me=new Map;const _e=new Map;const Ie=new Map;const Me=new Set;const Oe=new Set;const Te=new Set;const Ne=new Set;const Be=new Snapshot;if(v)Be.setStartTime(v);const Le=new Set;const qe=j&&j.hash?j.timestamp?3:2:1;let Ue=1;const jobDone=()=>{if(--Ue===0){if(q.size!==0){Be.setFileTimestamps(q)}if(G.size!==0){Be.setFileHashes(G)}if(ie.size!==0){Be.setFileTshs(ie)}if(ae.size!==0){Be.setContextTimestamps(ae)}if(le.size!==0){Be.setContextHashes(le)}if(me.size!==0){Be.setContextTshs(me)}if(_e.size!==0){Be.setMissingExistence(_e)}if(Ie.size!==0){Be.setManagedItemInfo(Ie)}this._managedFilesOptimization.optimize(Be,Me);if(Me.size!==0){Be.setManagedFiles(Me)}this._managedContextsOptimization.optimize(Be,Oe);if(Oe.size!==0){Be.setManagedContexts(Oe)}this._managedMissingOptimization.optimize(Be,Te);if(Te.size!==0){Be.setManagedMissing(Te)}if(Ne.size!==0){Be.setChildren(Ne)}this._snapshotCache.set(Be,true);this._statCreatedSnapshots++;N(null,Be)}};const jobError=()=>{if(Ue>0){Ue=-1e8;N(null,null)}};const checkManaged=(v,E)=>{for(const R of this.immutablePathsRegExps){if(R.test(v)){E.add(v);return true}}for(const R of this.immutablePathsWithSlash){if(v.startsWith(R)){E.add(v);return true}}for(const R of this.managedPathsRegExps){const $=R.exec(v);if($){const R=getManagedItem($[1],v);if(R){Le.add(R);E.add(v);return true}}}for(const R of this.managedPathsWithSlash){if(v.startsWith(R)){const $=getManagedItem(R,v);if($){Le.add($);E.add(v);return true}}}return false};const captureNonManaged=(v,E)=>{const R=new Set;for(const $ of v){if(!checkManaged($,E))R.add($)}return R};const processCapturedFiles=v=>{switch(qe){case 3:this._fileTshsOptimization.optimize(Be,v);for(const E of v){const v=this._fileTshs.get(E);if(v!==undefined){ie.set(E,v)}else{Ue++;this._getFileTimestampAndHash(E,((v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting file timestamp hash combination of ${E}: ${v.stack}`)}jobError()}else{ie.set(E,R);jobDone()}}))}}break;case 2:this._fileHashesOptimization.optimize(Be,v);for(const E of v){const v=this._fileHashes.get(E);if(v!==undefined){G.set(E,v)}else{Ue++;this.fileHashQueue.add(E,((v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting file hash of ${E}: ${v.stack}`)}jobError()}else{G.set(E,R);jobDone()}}))}}break;case 1:this._fileTimestampsOptimization.optimize(Be,v);for(const E of v){const v=this._fileTimestamps.get(E);if(v!==undefined){if(v!=="ignore"){q.set(E,v)}}else{Ue++;this.fileTimestampQueue.add(E,((v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting file timestamp of ${E}: ${v.stack}`)}jobError()}else{q.set(E,R);jobDone()}}))}}break}};if(E){processCapturedFiles(captureNonManaged(E,Me))}const processCapturedDirectories=v=>{switch(qe){case 3:this._contextTshsOptimization.optimize(Be,v);for(const E of v){const v=this._contextTshs.get(E);let R;if(v!==undefined&&(R=getResolvedTimestamp(v))!==undefined){me.set(E,R)}else{Ue++;const callback=(v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting context timestamp hash combination of ${E}: ${v.stack}`)}jobError()}else{me.set(E,R);jobDone()}};if(v!==undefined){this._resolveContextTsh(v,callback)}else{this.getContextTsh(E,callback)}}}break;case 2:this._contextHashesOptimization.optimize(Be,v);for(const E of v){const v=this._contextHashes.get(E);let R;if(v!==undefined&&(R=getResolvedHash(v))!==undefined){le.set(E,R)}else{Ue++;const callback=(v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting context hash of ${E}: ${v.stack}`)}jobError()}else{le.set(E,R);jobDone()}};if(v!==undefined){this._resolveContextHash(v,callback)}else{this.getContextHash(E,callback)}}}break;case 1:this._contextTimestampsOptimization.optimize(Be,v);for(const E of v){const v=this._contextTimestamps.get(E);if(v==="ignore")continue;let R;if(v!==undefined&&(R=getResolvedTimestamp(v))!==undefined){ae.set(E,R)}else{Ue++;const callback=(v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting context timestamp of ${E}: ${v.stack}`)}jobError()}else{ae.set(E,R);jobDone()}};if(v!==undefined){this._resolveContextTimestamp(v,callback)}else{this.getContextTimestamp(E,callback)}}}break}};if(R){processCapturedDirectories(captureNonManaged(R,Oe))}const processCapturedMissing=v=>{this._missingExistenceOptimization.optimize(Be,v);for(const E of v){const v=this._fileTimestamps.get(E);if(v!==undefined){if(v!=="ignore"){_e.set(E,Boolean(v))}}else{Ue++;this.fileTimestampQueue.add(E,((v,R)=>{if(v){if(this.logger){this.logger.debug(`Error snapshotting missing timestamp of ${E}: ${v.stack}`)}jobError()}else{_e.set(E,Boolean(R));jobDone()}}))}}};if($){processCapturedMissing(captureNonManaged($,Te))}this._managedItemInfoOptimization.optimize(Be,Le);for(const v of Le){const E=this._managedItems.get(v);if(E!==undefined){if(!E.startsWith("*")){Me.add(ce(this.fs,v,"package.json"))}else if(E==="*nested"){Te.add(ce(this.fs,v,"package.json"))}Ie.set(v,E)}else{Ue++;this.managedItemQueue.add(v,((R,$)=>{if(R){if(this.logger){this.logger.debug(`Error snapshotting managed item ${v}: ${R.stack}`)}jobError()}else if($){if(!$.startsWith("*")){Me.add(ce(this.fs,v,"package.json"))}else if(E==="*nested"){Te.add(ce(this.fs,v,"package.json"))}Ie.set(v,$);jobDone()}else{const process=(E,R)=>{if(E.size===0)return;const $=new Set;for(const R of E){if(R.startsWith(v))$.add(R)}if($.size>0)R($)};process(Me,processCapturedFiles);process(Oe,processCapturedDirectories);process(Te,processCapturedMissing);jobDone()}}))}}jobDone()}mergeSnapshots(v,E){const R=new Snapshot;if(v.hasStartTime()&&E.hasStartTime())R.setStartTime(Math.min(v.startTime,E.startTime));else if(E.hasStartTime())R.startTime=E.startTime;else if(v.hasStartTime())R.startTime=v.startTime;if(v.hasFileTimestamps()||E.hasFileTimestamps()){R.setFileTimestamps(mergeMaps(v.fileTimestamps,E.fileTimestamps))}if(v.hasFileHashes()||E.hasFileHashes()){R.setFileHashes(mergeMaps(v.fileHashes,E.fileHashes))}if(v.hasFileTshs()||E.hasFileTshs()){R.setFileTshs(mergeMaps(v.fileTshs,E.fileTshs))}if(v.hasContextTimestamps()||E.hasContextTimestamps()){R.setContextTimestamps(mergeMaps(v.contextTimestamps,E.contextTimestamps))}if(v.hasContextHashes()||E.hasContextHashes()){R.setContextHashes(mergeMaps(v.contextHashes,E.contextHashes))}if(v.hasContextTshs()||E.hasContextTshs()){R.setContextTshs(mergeMaps(v.contextTshs,E.contextTshs))}if(v.hasMissingExistence()||E.hasMissingExistence()){R.setMissingExistence(mergeMaps(v.missingExistence,E.missingExistence))}if(v.hasManagedItemInfo()||E.hasManagedItemInfo()){R.setManagedItemInfo(mergeMaps(v.managedItemInfo,E.managedItemInfo))}if(v.hasManagedFiles()||E.hasManagedFiles()){R.setManagedFiles(mergeSets(v.managedFiles,E.managedFiles))}if(v.hasManagedContexts()||E.hasManagedContexts()){R.setManagedContexts(mergeSets(v.managedContexts,E.managedContexts))}if(v.hasManagedMissing()||E.hasManagedMissing()){R.setManagedMissing(mergeSets(v.managedMissing,E.managedMissing))}if(v.hasChildren()||E.hasChildren()){R.setChildren(mergeSets(v.children,E.children))}if(this._snapshotCache.get(v)===true&&this._snapshotCache.get(E)===true){this._snapshotCache.set(R,true)}return R}checkSnapshotValid(v,E){const R=this._snapshotCache.get(v);if(R!==undefined){this._statTestedSnapshotsCached++;if(typeof R==="boolean"){E(null,R)}else{R.push(E)}return}this._statTestedSnapshotsNotCached++;this._checkSnapshotValidNoCache(v,E)}_checkSnapshotValidNoCache(v,E){let R=undefined;if(v.hasStartTime()){R=v.startTime}let $=1;const jobDone=()=>{if(--$===0){this._snapshotCache.set(v,true);E(null,true)}};const invalid=()=>{if($>0){$=-1e8;this._snapshotCache.set(v,false);E(null,false)}};const invalidWithError=(v,E)=>{if(this._remainingLogs>0){this._log(v,`error occurred: %s`,E)}invalid()};const checkHash=(v,E,R)=>{if(E!==R){if(this._remainingLogs>0){this._log(v,`hashes differ (%s != %s)`,E,R)}return false}return true};const checkExistence=(v,E,R)=>{if(!E!==!R){if(this._remainingLogs>0){this._log(v,E?"it didn't exist before":"it does no longer exist")}return false}return true};const checkFile=(v,E,$,j=true)=>{if(E===$)return true;if(!checkExistence(v,Boolean(E),Boolean($)))return false;if(E){if(typeof R==="number"&&E.safeTime>R){if(j&&this._remainingLogs>0){this._log(v,`it may have changed (%d) after the start time of the snapshot (%d)`,E.safeTime,R)}return false}if($.timestamp!==undefined&&E.timestamp!==$.timestamp){if(j&&this._remainingLogs>0){this._log(v,`timestamps differ (%d != %d)`,E.timestamp,$.timestamp)}return false}}return true};const checkContext=(v,E,$,j=true)=>{if(E===$)return true;if(!checkExistence(v,Boolean(E),Boolean($)))return false;if(E){if(typeof R==="number"&&E.safeTime>R){if(j&&this._remainingLogs>0){this._log(v,`it may have changed (%d) after the start time of the snapshot (%d)`,E.safeTime,R)}return false}if($.timestampHash!==undefined&&E.timestampHash!==$.timestampHash){if(j&&this._remainingLogs>0){this._log(v,`timestamps hashes differ (%s != %s)`,E.timestampHash,$.timestampHash)}return false}}return true};if(v.hasChildren()){const childCallback=(v,E)=>{if(v||!E)return invalid();else jobDone()};for(const E of v.children){const v=this._snapshotCache.get(E);if(v!==undefined){this._statTestedChildrenCached++;if(typeof v==="boolean"){if(v===false){invalid();return}}else{$++;v.push(childCallback)}}else{this._statTestedChildrenNotCached++;$++;this._checkSnapshotValidNoCache(E,childCallback)}}}if(v.hasFileTimestamps()){const{fileTimestamps:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){const E=this._fileTimestamps.get(v);if(E!==undefined){if(E!=="ignore"&&!checkFile(v,E,R)){invalid();return}}else{$++;this.fileTimestampQueue.add(v,((E,$)=>{if(E)return invalidWithError(v,E);if(!checkFile(v,$,R)){invalid()}else{jobDone()}}))}}}const processFileHashSnapshot=(v,E)=>{const R=this._fileHashes.get(v);if(R!==undefined){if(R!=="ignore"&&!checkHash(v,R,E)){invalid();return}}else{$++;this.fileHashQueue.add(v,((R,$)=>{if(R)return invalidWithError(v,R);if(!checkHash(v,$,E)){invalid()}else{jobDone()}}))}};if(v.hasFileHashes()){const{fileHashes:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){processFileHashSnapshot(v,R)}}if(v.hasFileTshs()){const{fileTshs:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){if(typeof R==="string"){processFileHashSnapshot(v,R)}else{const E=this._fileTimestamps.get(v);if(E!==undefined){if(E==="ignore"||!checkFile(v,E,R,false)){processFileHashSnapshot(v,R&&R.hash)}}else{$++;this.fileTimestampQueue.add(v,((E,$)=>{if(E)return invalidWithError(v,E);if(!checkFile(v,$,R,false)){processFileHashSnapshot(v,R&&R.hash)}jobDone()}))}}}}if(v.hasContextTimestamps()){const{contextTimestamps:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){const E=this._contextTimestamps.get(v);if(E==="ignore")continue;let j;if(E!==undefined&&(j=getResolvedTimestamp(E))!==undefined){if(!checkContext(v,j,R)){invalid();return}}else{$++;const callback=(E,$)=>{if(E)return invalidWithError(v,E);if(!checkContext(v,$,R)){invalid()}else{jobDone()}};if(E!==undefined){this._resolveContextTimestamp(E,callback)}else{this.getContextTimestamp(v,callback)}}}}const processContextHashSnapshot=(v,E)=>{const R=this._contextHashes.get(v);let j;if(R!==undefined&&(j=getResolvedHash(R))!==undefined){if(!checkHash(v,j,E)){invalid();return}}else{$++;const callback=(R,$)=>{if(R)return invalidWithError(v,R);if(!checkHash(v,$,E)){invalid()}else{jobDone()}};if(R!==undefined){this._resolveContextHash(R,callback)}else{this.getContextHash(v,callback)}}};if(v.hasContextHashes()){const{contextHashes:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){processContextHashSnapshot(v,R)}}if(v.hasContextTshs()){const{contextTshs:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){if(typeof R==="string"){processContextHashSnapshot(v,R)}else{const E=this._contextTimestamps.get(v);if(E==="ignore")continue;let j;if(E!==undefined&&(j=getResolvedTimestamp(E))!==undefined){if(!checkContext(v,j,R,false)){processContextHashSnapshot(v,R&&R.hash)}}else{$++;const callback=(E,$)=>{if(E)return invalidWithError(v,E);if(!checkContext(v,$,R,false)){processContextHashSnapshot(v,R&&R.hash)}jobDone()};if(E!==undefined){this._resolveContextTimestamp(E,callback)}else{this.getContextTimestamp(v,callback)}}}}}if(v.hasMissingExistence()){const{missingExistence:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){const E=this._fileTimestamps.get(v);if(E!==undefined){if(E!=="ignore"&&!checkExistence(v,Boolean(E),Boolean(R))){invalid();return}}else{$++;this.fileTimestampQueue.add(v,((E,$)=>{if(E)return invalidWithError(v,E);if(!checkExistence(v,Boolean($),Boolean(R))){invalid()}else{jobDone()}}))}}}if(v.hasManagedItemInfo()){const{managedItemInfo:E}=v;this._statTestedEntries+=E.size;for(const[v,R]of E){const E=this._managedItems.get(v);if(E!==undefined){if(!checkHash(v,E,R)){invalid();return}}else{$++;this.managedItemQueue.add(v,((E,$)=>{if(E)return invalidWithError(v,E);if(!checkHash(v,$,R)){invalid()}else{jobDone()}}))}}}jobDone();if($>0){const R=[E];E=(v,E)=>{for(const $ of R)$(v,E)};this._snapshotCache.set(v,R)}}_readFileTimestamp(v,E){this.fs.stat(v,((R,$)=>{if(R){if(R.code==="ENOENT"){this._fileTimestamps.set(v,null);this._cachedDeprecatedFileTimestamps=undefined;return E(null,null)}return E(R)}let j;if($.isDirectory()){j={safeTime:0,timestamp:undefined}}else{const v=+$.mtime;if(v)applyMtime(v);j={safeTime:v?v+Ne:Infinity,timestamp:v}}this._fileTimestamps.set(v,j);this._cachedDeprecatedFileTimestamps=undefined;E(null,j)}))}_readFileHash(v,E){this.fs.readFile(v,((R,$)=>{if(R){if(R.code==="EISDIR"){this._fileHashes.set(v,"directory");return E(null,"directory")}if(R.code==="ENOENT"){this._fileHashes.set(v,null);return E(null,null)}if(R.code==="ERR_FS_FILE_TOO_LARGE"){this.logger.warn(`Ignoring ${v} for hashing as it's very large`);this._fileHashes.set(v,"too large");return E(null,"too large")}return E(R)}const j=ae(this._hashFunction);j.update($);const N=j.digest("hex");this._fileHashes.set(v,N);E(null,N)}))}_getFileTimestampAndHash(v,E){const continueWithHash=R=>{const $=this._fileTimestamps.get(v);if($!==undefined){if($!=="ignore"){const j={...$,hash:R};this._fileTshs.set(v,j);return E(null,j)}else{this._fileTshs.set(v,R);return E(null,R)}}else{this.fileTimestampQueue.add(v,(($,j)=>{if($){return E($)}const N={...j,hash:R};this._fileTshs.set(v,N);return E(null,N)}))}};const R=this._fileHashes.get(v);if(R!==undefined){continueWithHash(R)}else{this.fileHashQueue.add(v,((v,R)=>{if(v){return E(v)}continueWithHash(R)}))}}_readContext({path:v,fromImmutablePath:E,fromManagedItem:R,fromSymlink:$,fromFile:j,fromDirectory:q,reduce:G},ie){this.fs.readdir(v,((ae,le)=>{if(ae){if(ae.code==="ENOENT"){return ie(null,null)}return ie(ae)}const me=le.map((v=>v.normalize("NFC"))).filter((v=>!/^\./.test(v))).sort();N.map(me,((N,G)=>{const ie=ce(this.fs,v,N);for(const R of this.immutablePathsRegExps){if(R.test(v)){return G(null,E(v))}}for(const R of this.immutablePathsWithSlash){if(v.startsWith(R)){return G(null,E(v))}}for(const E of this.managedPathsRegExps){const $=E.exec(v);if($){const E=getManagedItem($[1],v);if(E){return this.managedItemQueue.add(E,((v,E)=>{if(v)return G(v);return G(null,R(E))}))}}}for(const E of this.managedPathsWithSlash){if(v.startsWith(E)){const v=getManagedItem(E,ie);if(v){return this.managedItemQueue.add(v,((v,E)=>{if(v)return G(v);return G(null,R(E))}))}}}_e(this.fs,ie,((v,E)=>{if(v)return G(v);if(typeof E==="string"){return $(ie,E,G)}if(E.isFile()){return j(ie,E,G)}if(E.isDirectory()){return q(ie,E,G)}G(null,null)}))}),((v,E)=>{if(v)return ie(v);const R=G(me,E);ie(null,R)}))}))}_readContextTimestamp(v,E){this._readContext({path:v,fromImmutablePath:()=>null,fromManagedItem:v=>({safeTime:0,timestampHash:v}),fromSymlink:(v,E,R)=>{R(null,{timestampHash:E,symlinks:new Set([E])})},fromFile:(v,E,R)=>{const $=this._fileTimestamps.get(v);if($!==undefined)return R(null,$==="ignore"?null:$);const j=+E.mtime;if(j)applyMtime(j);const N={safeTime:j?j+Ne:Infinity,timestamp:j};this._fileTimestamps.set(v,N);this._cachedDeprecatedFileTimestamps=undefined;R(null,N)},fromDirectory:(v,E,R)=>{this.contextTimestampQueue.increaseParallelism();this._getUnresolvedContextTimestamp(v,((v,E)=>{this.contextTimestampQueue.decreaseParallelism();R(v,E)}))},reduce:(v,E)=>{let R=undefined;const $=ae(this._hashFunction);for(const E of v)$.update(E);let j=0;for(const v of E){if(!v){$.update("n");continue}if(v.timestamp){$.update("f");$.update(`${v.timestamp}`)}else if(v.timestampHash){$.update("d");$.update(`${v.timestampHash}`)}if(v.symlinks!==undefined){if(R===undefined)R=new Set;addAll(v.symlinks,R)}if(v.safeTime){j=Math.max(j,v.safeTime)}}const N=$.digest("hex");const q={safeTime:j,timestampHash:N};if(R)q.symlinks=R;return q}},((R,$)=>{if(R)return E(R);this._contextTimestamps.set(v,$);this._cachedDeprecatedContextTimestamps=undefined;E(null,$)}))}_resolveContextTimestamp(v,E){const R=[];let $=0;Me(v.symlinks,10,((v,E,j)=>{this._getUnresolvedContextTimestamp(v,((v,N)=>{if(v)return j(v);if(N&&N!=="ignore"){R.push(N.timestampHash);if(N.safeTime){$=Math.max($,N.safeTime)}if(N.symlinks!==undefined){for(const v of N.symlinks)E(v)}}j()}))}),(j=>{if(j)return E(j);const N=ae(this._hashFunction);N.update(v.timestampHash);if(v.safeTime){$=Math.max($,v.safeTime)}R.sort();for(const v of R){N.update(v)}E(null,v.resolved={safeTime:$,timestampHash:N.digest("hex")})}))}_readContextHash(v,E){this._readContext({path:v,fromImmutablePath:()=>"",fromManagedItem:v=>v||"",fromSymlink:(v,E,R)=>{R(null,{hash:E,symlinks:new Set([E])})},fromFile:(v,E,R)=>this.getFileHash(v,((v,E)=>{R(v,E||"")})),fromDirectory:(v,E,R)=>{this.contextHashQueue.increaseParallelism();this._getUnresolvedContextHash(v,((v,E)=>{this.contextHashQueue.decreaseParallelism();R(v,E||"")}))},reduce:(v,E)=>{let R=undefined;const $=ae(this._hashFunction);for(const E of v)$.update(E);for(const v of E){if(typeof v==="string"){$.update(v)}else{$.update(v.hash);if(v.symlinks){if(R===undefined)R=new Set;addAll(v.symlinks,R)}}}const j={hash:$.digest("hex")};if(R)j.symlinks=R;return j}},((R,$)=>{if(R)return E(R);this._contextHashes.set(v,$);return E(null,$)}))}_resolveContextHash(v,E){const R=[];Me(v.symlinks,10,((v,E,$)=>{this._getUnresolvedContextHash(v,((v,j)=>{if(v)return $(v);if(j){R.push(j.hash);if(j.symlinks!==undefined){for(const v of j.symlinks)E(v)}}$()}))}),($=>{if($)return E($);const j=ae(this._hashFunction);j.update(v.hash);R.sort();for(const v of R){j.update(v)}E(null,v.resolved=j.digest("hex"))}))}_readContextTimestampAndHash(v,E){const finalize=(R,$)=>{const j=R==="ignore"?$:{...R,...$};this._contextTshs.set(v,j);E(null,j)};const R=this._contextHashes.get(v);const $=this._contextTimestamps.get(v);if(R!==undefined){if($!==undefined){finalize($,R)}else{this.contextTimestampQueue.add(v,((v,$)=>{if(v)return E(v);finalize($,R)}))}}else{if($!==undefined){this.contextHashQueue.add(v,((v,R)=>{if(v)return E(v);finalize($,R)}))}else{this._readContext({path:v,fromImmutablePath:()=>null,fromManagedItem:v=>({safeTime:0,timestampHash:v,hash:v||""}),fromSymlink:(v,E,R)=>{R(null,{timestampHash:E,hash:E,symlinks:new Set([E])})},fromFile:(v,E,R)=>{this._getFileTimestampAndHash(v,R)},fromDirectory:(v,E,R)=>{this.contextTshQueue.increaseParallelism();this.contextTshQueue.add(v,((v,E)=>{this.contextTshQueue.decreaseParallelism();R(v,E)}))},reduce:(v,E)=>{let R=undefined;const $=ae(this._hashFunction);const j=ae(this._hashFunction);for(const E of v){$.update(E);j.update(E)}let N=0;for(const v of E){if(!v){$.update("n");continue}if(typeof v==="string"){$.update("n");j.update(v);continue}if(v.timestamp){$.update("f");$.update(`${v.timestamp}`)}else if(v.timestampHash){$.update("d");$.update(`${v.timestampHash}`)}if(v.symlinks!==undefined){if(R===undefined)R=new Set;addAll(v.symlinks,R)}if(v.safeTime){N=Math.max(N,v.safeTime)}j.update(v.hash)}const q={safeTime:N,timestampHash:$.digest("hex"),hash:j.digest("hex")};if(R)q.symlinks=R;return q}},((R,$)=>{if(R)return E(R);this._contextTshs.set(v,$);return E(null,$)}))}}}_resolveContextTsh(v,E){const R=[];const $=[];let j=0;Me(v.symlinks,10,((v,E,N)=>{this._getUnresolvedContextTsh(v,((v,q)=>{if(v)return N(v);if(q){R.push(q.hash);if(q.timestampHash)$.push(q.timestampHash);if(q.safeTime){j=Math.max(j,q.safeTime)}if(q.symlinks!==undefined){for(const v of q.symlinks)E(v)}}N()}))}),(N=>{if(N)return E(N);const q=ae(this._hashFunction);const G=ae(this._hashFunction);q.update(v.hash);if(v.timestampHash)G.update(v.timestampHash);if(v.safeTime){j=Math.max(j,v.safeTime)}R.sort();for(const v of R){q.update(v)}$.sort();for(const v of $){G.update(v)}E(null,v.resolved={safeTime:j,timestampHash:G.digest("hex"),hash:q.digest("hex")})}))}_getManagedItemDirectoryInfo(v,E){this.fs.readdir(v,((R,$)=>{if(R){if(R.code==="ENOENT"||R.code==="ENOTDIR"){return E(null,Be)}return E(R)}const j=new Set($.map((E=>ce(this.fs,v,E))));E(null,j)}))}_getManagedItemInfo(v,E){const R=le(this.fs,v);this.managedItemDirectoryQueue.add(R,((R,$)=>{if(R){return E(R)}if(!$.has(v)){this._managedItems.set(v,"*missing");return E(null,"*missing")}if(v.endsWith("node_modules")&&(v.endsWith("/node_modules")||v.endsWith("\\node_modules"))){this._managedItems.set(v,"*node_modules");return E(null,"*node_modules")}const j=ce(this.fs,v,"package.json");this.fs.readFile(j,((R,$)=>{if(R){if(R.code==="ENOENT"||R.code==="ENOTDIR"){this.fs.readdir(v,((R,$)=>{if(!R&&$.length===1&&$[0]==="node_modules"){this._managedItems.set(v,"*nested");return E(null,"*nested")}this.logger.warn(`Managed item ${v} isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)`);return E()}));return}return E(R)}let N;try{N=JSON.parse($.toString("utf-8"))}catch(v){return E(v)}if(!N.name){this.logger.warn(`${j} doesn't contain a "name" property (see snapshot.managedPaths option)`);return E()}const q=`${N.name||""}@${N.version||""}`;this._managedItems.set(v,q);E(null,q)}))}))}getDeprecatedFileTimestamps(){if(this._cachedDeprecatedFileTimestamps!==undefined)return this._cachedDeprecatedFileTimestamps;const v=new Map;for(const[E,R]of this._fileTimestamps){if(R)v.set(E,typeof R==="object"?R.safeTime:null)}return this._cachedDeprecatedFileTimestamps=v}getDeprecatedContextTimestamps(){if(this._cachedDeprecatedContextTimestamps!==undefined)return this._cachedDeprecatedContextTimestamps;const v=new Map;for(const[E,R]of this._contextTimestamps){if(R)v.set(E,typeof R==="object"?R.safeTime:null)}return this._cachedDeprecatedContextTimestamps=v}}v.exports=FileSystemInfo;v.exports.Snapshot=Snapshot},35922:function(v,E,R){"use strict";const{getEntryRuntime:$,mergeRuntimeOwned:j}=R(47462);class FlagAllModulesAsUsedPlugin{constructor(v){this.explanation=v}apply(v){v.hooks.compilation.tap("FlagAllModulesAsUsedPlugin",(v=>{const E=v.moduleGraph;v.hooks.optimizeDependencies.tap("FlagAllModulesAsUsedPlugin",(R=>{let N=undefined;for(const[E,{options:R}]of v.entries){N=j(N,$(v,E,R))}for(const v of R){const R=E.getExportsInfo(v);R.setUsedInUnknownWay(N);E.addExtraReason(v,this.explanation);if(v.factoryMeta===undefined){v.factoryMeta={}}v.factoryMeta.sideEffectFree=false}}))}))}}v.exports=FlagAllModulesAsUsedPlugin},90124:function(v,E,R){"use strict";const $=R(78175);const j=R(83690);class FlagDependencyExportsPlugin{apply(v){v.hooks.compilation.tap("FlagDependencyExportsPlugin",(v=>{const E=v.moduleGraph;const R=v.getCache("FlagDependencyExportsPlugin");v.hooks.finishModules.tapAsync("FlagDependencyExportsPlugin",((N,q)=>{const G=v.getLogger("webpack.FlagDependencyExportsPlugin");let ie=0;let ae=0;let ce=0;let le=0;let me=0;let _e=0;const{moduleMemCaches:Ie}=v;const Me=new j;G.time("restore cached provided exports");$.each(N,((v,$)=>{const j=E.getExportsInfo(v);if(!v.buildMeta||!v.buildMeta.exportsType){if(j.otherExportsInfo.provided!==null){ce++;j.setHasProvideInfo();j.setUnknownExportsProvided();return $()}}if(typeof v.buildInfo.hash!=="string"){le++;Me.enqueue(v);j.setHasProvideInfo();return $()}const N=Ie&&Ie.get(v);const q=N&&N.get(this);if(q!==undefined){ie++;j.restoreProvided(q);return $()}R.get(v.identifier(),v.buildInfo.hash,((E,R)=>{if(E)return $(E);if(R!==undefined){ae++;j.restoreProvided(R)}else{me++;Me.enqueue(v);j.setHasProvideInfo()}$()}))}),(v=>{G.timeEnd("restore cached provided exports");if(v)return q(v);const j=new Set;const N=new Map;let Oe;let Te;const Ne=new Map;let Be=true;let Le=false;const processDependenciesBlock=v=>{for(const E of v.dependencies){processDependency(E)}for(const E of v.blocks){processDependenciesBlock(E)}};const processDependency=v=>{const R=v.getExports(E);if(!R)return;Ne.set(v,R)};const processExportsSpec=(v,R)=>{const $=R.exports;const j=R.canMangle;const q=R.from;const G=R.priority;const ie=R.terminalBinding||false;const ae=R.dependencies;if(R.hideExports){for(const E of R.hideExports){const R=Te.getExportInfo(E);R.unsetTarget(v)}}if($===true){if(Te.setUnknownExportsProvided(j,R.excludeExports,q&&v,q,G)){Le=true}}else if(Array.isArray($)){const mergeExports=(R,$)=>{for(const ae of $){let $;let ce=j;let le=ie;let me=undefined;let _e=q;let Ie=undefined;let Me=G;let Te=false;if(typeof ae==="string"){$=ae}else{$=ae.name;if(ae.canMangle!==undefined)ce=ae.canMangle;if(ae.export!==undefined)Ie=ae.export;if(ae.exports!==undefined)me=ae.exports;if(ae.from!==undefined)_e=ae.from;if(ae.priority!==undefined)Me=ae.priority;if(ae.terminalBinding!==undefined)le=ae.terminalBinding;if(ae.hidden!==undefined)Te=ae.hidden}const Ne=R.getExportInfo($);if(Ne.provided===false||Ne.provided===null){Ne.provided=true;Le=true}if(Ne.canMangleProvide!==false&&ce===false){Ne.canMangleProvide=false;Le=true}if(le&&!Ne.terminalBinding){Ne.terminalBinding=true;Le=true}if(me){const v=Ne.createNestedExportsInfo();mergeExports(v,me)}if(_e&&(Te?Ne.unsetTarget(v):Ne.setTarget(v,_e,Ie===undefined?[$]:Ie,Me))){Le=true}const Be=Ne.getTarget(E);let qe=undefined;if(Be){const v=E.getExportsInfo(Be.module);qe=v.getNestedExportsInfo(Be.export);const R=N.get(Be.module);if(R===undefined){N.set(Be.module,new Set([Oe]))}else{R.add(Oe)}}if(Ne.exportsInfoOwned){if(Ne.exportsInfo.setRedirectNamedTo(qe)){Le=true}}else if(Ne.exportsInfo!==qe){Ne.exportsInfo=qe;Le=true}}};mergeExports(Te,$)}if(ae){Be=false;for(const v of ae){const E=N.get(v);if(E===undefined){N.set(v,new Set([Oe]))}else{E.add(Oe)}}}};const notifyDependencies=()=>{const v=N.get(Oe);if(v!==undefined){for(const E of v){Me.enqueue(E)}}};G.time("figure out provided exports");while(Me.length>0){Oe=Me.dequeue();_e++;Te=E.getExportsInfo(Oe);Be=true;Le=false;Ne.clear();E.freeze();processDependenciesBlock(Oe);E.unfreeze();for(const[v,E]of Ne){processExportsSpec(v,E)}if(Be){j.add(Oe)}if(Le){notifyDependencies()}}G.timeEnd("figure out provided exports");G.log(`${Math.round(100*(le+me)/(ie+ae+me+le+ce))}% of exports of modules have been determined (${ce} no declared exports, ${me} not cached, ${le} flagged uncacheable, ${ae} from cache, ${ie} from mem cache, ${_e-me-le} additional calculations due to dependencies)`);G.time("store provided exports into cache");$.each(j,((v,$)=>{if(typeof v.buildInfo.hash!=="string"){return $()}const j=E.getExportsInfo(v).getRestoreProvidedData();const N=Ie&&Ie.get(v);if(N){N.set(this,j)}R.store(v.identifier(),v.buildInfo.hash,j,$)}),(v=>{G.timeEnd("store provided exports into cache");q(v)}))}))}));const N=new WeakMap;v.hooks.rebuildModule.tap("FlagDependencyExportsPlugin",(v=>{N.set(v,E.getExportsInfo(v).getRestoreProvidedData())}));v.hooks.finishRebuildingModule.tap("FlagDependencyExportsPlugin",(v=>{E.getExportsInfo(v).restoreProvided(N.get(v))}))}))}}v.exports=FlagDependencyExportsPlugin},71768:function(v,E,R){"use strict";const $=R(87056);const{UsageState:j}=R(13168);const N=R(82921);const{STAGE_DEFAULT:q}=R(6267);const G=R(52074);const ie=R(22796);const{getEntryRuntime:ae,mergeRuntimeOwned:ce}=R(47462);const{NO_EXPORTS_REFERENCED:le,EXPORTS_OBJECT_REFERENCED:me}=$;class FlagDependencyUsagePlugin{constructor(v){this.global=v}apply(v){v.hooks.compilation.tap("FlagDependencyUsagePlugin",(v=>{const E=v.moduleGraph;v.hooks.optimizeDependencies.tap({name:"FlagDependencyUsagePlugin",stage:q},(R=>{if(v.moduleMemCaches){throw new Error("optimization.usedExports can't be used with cacheUnaffected as export usage is a global effect")}const $=v.getLogger("webpack.FlagDependencyUsagePlugin");const q=new Map;const _e=new ie;const processReferencedModule=(v,R,$,N)=>{const G=E.getExportsInfo(v);if(R.length>0){if(!v.buildMeta||!v.buildMeta.exportsType){if(G.setUsedWithoutInfo($)){_e.enqueue(v,$)}return}for(const E of R){let R;let N=true;if(Array.isArray(E)){R=E}else{R=E.name;N=E.canMangle!==false}if(R.length===0){if(G.setUsedInUnknownWay($)){_e.enqueue(v,$)}}else{let E=G;for(let ie=0;iev===j.Unused),j.OnlyPropertiesUsed,$)){const R=E===G?v:q.get(E);if(R){_e.enqueue(R,$)}}E=R;continue}}if(ae.setUsedConditionally((v=>v!==j.Used),j.Used,$)){const R=E===G?v:q.get(E);if(R){_e.enqueue(R,$)}}break}}}}else{if(!N&&v.factoryMeta!==undefined&&v.factoryMeta.sideEffectFree){return}if(G.setUsedForSideEffectsOnly($)){_e.enqueue(v,$)}}};const processModule=(R,$,j)=>{const q=new Map;const ie=new G;ie.enqueue(R);for(;;){const R=ie.dequeue();if(R===undefined)break;for(const v of R.blocks){if(!this.global&&v.groupOptions&&v.groupOptions.entryOptions){processModule(v,v.groupOptions.entryOptions.runtime||undefined,true)}else{ie.enqueue(v)}}for(const j of R.dependencies){const R=E.getConnection(j);if(!R||!R.module){continue}const G=R.getActiveState($);if(G===false)continue;const{module:ie}=R;if(G===N.TRANSITIVE_ONLY){processModule(ie,$,false);continue}const ae=q.get(ie);if(ae===me){continue}const ce=v.getDependencyReferencedExports(j,$);if(ae===undefined||ae===le||ce===me){q.set(ie,ce)}else if(ae!==undefined&&ce===le){continue}else{let v;if(Array.isArray(ae)){v=new Map;for(const E of ae){if(Array.isArray(E)){v.set(E.join("\n"),E)}else{v.set(E.name.join("\n"),E)}}q.set(ie,v)}else{v=ae}for(const E of ce){if(Array.isArray(E)){const R=E.join("\n");const $=v.get(R);if($===undefined){v.set(R,E)}}else{const R=E.name.join("\n");const $=v.get(R);if($===undefined||Array.isArray($)){v.set(R,E)}else{v.set(R,{name:E.name,canMangle:E.canMangle&&$.canMangle})}}}}}}for(const[v,E]of q){if(Array.isArray(E)){processReferencedModule(v,E,$,j)}else{processReferencedModule(v,Array.from(E.values()),$,j)}}};$.time("initialize exports usage");for(const v of R){const R=E.getExportsInfo(v);q.set(R,v);R.setHasUseInfo()}$.timeEnd("initialize exports usage");$.time("trace exports usage in graph");const processEntryDependency=(v,R)=>{const $=E.getModule(v);if($){processReferencedModule($,le,R,true)}};let Ie=undefined;for(const[E,{dependencies:R,includeDependencies:$,options:j}]of v.entries){const N=this.global?undefined:ae(v,E,j);for(const v of R){processEntryDependency(v,N)}for(const v of $){processEntryDependency(v,N)}Ie=ce(Ie,N)}for(const E of v.globalEntry.dependencies){processEntryDependency(E,Ie)}for(const E of v.globalEntry.includeDependencies){processEntryDependency(E,Ie)}while(_e.length){const[v,E]=_e.dequeue();processModule(v,E,false)}$.timeEnd("trace exports usage in graph")}))}))}}v.exports=FlagDependencyUsagePlugin},97152:function(v,E,R){"use strict";class Generator{static byType(v){return new ByTypeGenerator(v)}getTypes(v){const E=R(73846);throw new E}getSize(v,E){const $=R(73846);throw new $}generate(v,{dependencyTemplates:E,runtimeTemplate:$,moduleGraph:j,type:N}){const q=R(73846);throw new q}getConcatenationBailoutReason(v,E){return`Module Concatenation is not implemented for ${this.constructor.name}`}updateHash(v,{module:E,runtime:R}){}}class ByTypeGenerator extends Generator{constructor(v){super();this.map=v;this._types=new Set(Object.keys(v))}getTypes(v){return this._types}getSize(v,E){const R=E||"javascript";const $=this.map[R];return $?$.getSize(v,R):0}generate(v,E){const R=E.type;const $=this.map[R];if(!$){throw new Error(`Generator.byType: no generator specified for ${R}`)}return $.generate(v,E)}}v.exports=Generator},37855:function(v,E){"use strict";const connectChunkGroupAndChunk=(v,E)=>{if(v.pushChunk(E)){E.addGroup(v)}};const connectChunkGroupParentAndChild=(v,E)=>{if(v.addChild(E)){E.addParent(v)}};E.connectChunkGroupAndChunk=connectChunkGroupAndChunk;E.connectChunkGroupParentAndChild=connectChunkGroupParentAndChild},14330:function(v,E,R){"use strict";const $=R(27154);v.exports=class HarmonyLinkingError extends ${constructor(v){super(v);this.name="HarmonyLinkingError";this.hideStack=true}}},35230:function(v,E,R){"use strict";const $=R(27154);class HookWebpackError extends ${constructor(v,E){super(v.message);this.name="HookWebpackError";this.hook=E;this.error=v;this.hideStack=true;this.details=`caused by plugins in ${E}\n${v.stack}`;this.stack+=`\n-- inner error --\n${v.stack}`}}v.exports=HookWebpackError;const makeWebpackError=(v,E)=>{if(v instanceof $)return v;return new HookWebpackError(v,E)};v.exports.makeWebpackError=makeWebpackError;const makeWebpackErrorCallback=(v,E)=>(R,j)=>{if(R){if(R instanceof $){v(R);return}v(new HookWebpackError(R,E));return}v(null,j)};v.exports.makeWebpackErrorCallback=makeWebpackErrorCallback;const tryRunOrWebpackError=(v,E)=>{let R;try{R=v()}catch(v){if(v instanceof $){throw v}throw new HookWebpackError(v,E)}return R};v.exports.tryRunOrWebpackError=tryRunOrWebpackError},23456:function(v,E,R){"use strict";const{SyncBailHook:$}=R(44217);const{RawSource:j}=R(51255);const N=R(75449);const q=R(73002);const G=R(23834);const ie=R(89417);const ae=R(39201);const ce=R(27154);const le=R(14367);const me=R(94717);const _e=R(15491);const Ie=R(72674);const Me=R(40213);const Oe=R(37658);const Te=R(33177);const{evaluateToIdentifier:Ne}=R(97574);const{find:Be,isSubset:Le}=R(73268);const qe=R(12178);const{compareModulesById:Ue}=R(58792);const{getRuntimeKey:Ge,keyToRuntime:He,forEachRuntime:We,mergeRuntimeOwned:Qe,subtractRuntime:Je,intersectRuntime:Ve}=R(47462);const Ke=new WeakMap;class HotModuleReplacementPlugin{static getParserHooks(v){if(!(v instanceof Te)){throw new TypeError("The 'parser' argument must be an instance of JavascriptParser")}let E=Ke.get(v);if(E===undefined){E={hotAcceptCallback:new $(["expression","requests"]),hotAcceptWithoutCallback:new $(["expression","requests"])};Ke.set(v,E)}return E}constructor(v){this.options=v||{}}apply(v){const{_backCompat:E}=v;if(v.options.output.strictModuleErrorHandling===undefined)v.options.output.strictModuleErrorHandling=true;const R=[ae.module];const createAcceptHandler=(v,E)=>{const{hotAcceptCallback:$,hotAcceptWithoutCallback:j}=HotModuleReplacementPlugin.getParserHooks(v);return N=>{const q=v.state.module;const G=new le(`${q.moduleArgument}.hot.accept`,N.callee.range,R);G.loc=N.loc;q.addPresentationalDependency(G);q.buildInfo.moduleConcatenationBailout="Hot Module Replacement";if(N.arguments.length>=1){const R=v.evaluateExpression(N.arguments[0]);let G=[];let ie=[];if(R.isString()){G=[R]}else if(R.isArray()){G=R.items.filter((v=>v.isString()))}if(G.length>0){G.forEach(((v,R)=>{const $=v.string;const j=new E($,v.range);j.optional=true;j.loc=Object.create(N.loc);j.loc.index=R;q.addDependency(j);ie.push($)}));if(N.arguments.length>1){$.call(N.arguments[1],ie);for(let E=1;E$=>{const j=v.state.module;const N=new le(`${j.moduleArgument}.hot.decline`,$.callee.range,R);N.loc=$.loc;j.addPresentationalDependency(N);j.buildInfo.moduleConcatenationBailout="Hot Module Replacement";if($.arguments.length===1){const R=v.evaluateExpression($.arguments[0]);let N=[];if(R.isString()){N=[R]}else if(R.isArray()){N=R.items.filter((v=>v.isString()))}N.forEach(((v,R)=>{const N=new E(v.string,v.range);N.optional=true;N.loc=Object.create($.loc);N.loc.index=R;j.addDependency(N)}))}return true};const createHMRExpressionHandler=v=>E=>{const $=v.state.module;const j=new le(`${$.moduleArgument}.hot`,E.range,R);j.loc=E.loc;$.addPresentationalDependency(j);$.buildInfo.moduleConcatenationBailout="Hot Module Replacement";return true};const applyModuleHot=v=>{v.hooks.evaluateIdentifier.for("module.hot").tap({name:"HotModuleReplacementPlugin",before:"NodeStuffPlugin"},(v=>Ne("module.hot","module",(()=>["hot"]),true)(v)));v.hooks.call.for("module.hot.accept").tap("HotModuleReplacementPlugin",createAcceptHandler(v,Ie));v.hooks.call.for("module.hot.decline").tap("HotModuleReplacementPlugin",createDeclineHandler(v,Me));v.hooks.expression.for("module.hot").tap("HotModuleReplacementPlugin",createHMRExpressionHandler(v))};const applyImportMetaHot=v=>{v.hooks.evaluateIdentifier.for("import.meta.webpackHot").tap("HotModuleReplacementPlugin",(v=>Ne("import.meta.webpackHot","import.meta",(()=>["webpackHot"]),true)(v)));v.hooks.call.for("import.meta.webpackHot.accept").tap("HotModuleReplacementPlugin",createAcceptHandler(v,me));v.hooks.call.for("import.meta.webpackHot.decline").tap("HotModuleReplacementPlugin",createDeclineHandler(v,_e));v.hooks.expression.for("import.meta.webpackHot").tap("HotModuleReplacementPlugin",createHMRExpressionHandler(v))};v.hooks.compilation.tap("HotModuleReplacementPlugin",((R,{normalModuleFactory:$})=>{if(R.compiler!==v)return;R.dependencyFactories.set(Ie,$);R.dependencyTemplates.set(Ie,new Ie.Template);R.dependencyFactories.set(Me,$);R.dependencyTemplates.set(Me,new Me.Template);R.dependencyFactories.set(me,$);R.dependencyTemplates.set(me,new me.Template);R.dependencyFactories.set(_e,$);R.dependencyTemplates.set(_e,new _e.Template);let le=0;const Te={};const Ne={};R.hooks.record.tap("HotModuleReplacementPlugin",((v,E)=>{if(E.hash===v.hash)return;const R=v.chunkGraph;E.hash=v.hash;E.hotIndex=le;E.fullHashChunkModuleHashes=Te;E.chunkModuleHashes=Ne;E.chunkHashes={};E.chunkRuntime={};for(const R of v.chunks){E.chunkHashes[R.id]=R.hash;E.chunkRuntime[R.id]=Ge(R.runtime)}E.chunkModuleIds={};for(const $ of v.chunks){E.chunkModuleIds[$.id]=Array.from(R.getOrderedChunkModulesIterable($,Ue(R)),(v=>R.getModuleId(v)))}}));const Ke=new qe;const Xe=new qe;const Ye=new qe;R.hooks.fullHash.tap("HotModuleReplacementPlugin",(v=>{const E=R.chunkGraph;const $=R.records;for(const v of R.chunks){const getModuleHash=$=>{if(R.codeGenerationResults.has($,v.runtime)){return R.codeGenerationResults.getHash($,v.runtime)}else{Ye.add($,v.runtime);return E.getModuleHash($,v.runtime)}};const j=E.getChunkFullHashModulesSet(v);if(j!==undefined){for(const E of j){Xe.add(E,v)}}const N=E.getChunkModulesIterable(v);if(N!==undefined){if($.chunkModuleHashes){if(j!==undefined){for(const E of N){const R=`${v.id}|${E.identifier()}`;const N=getModuleHash(E);if(j.has(E)){if($.fullHashChunkModuleHashes[R]!==N){Ke.add(E,v)}Te[R]=N}else{if($.chunkModuleHashes[R]!==N){Ke.add(E,v)}Ne[R]=N}}}else{for(const E of N){const R=`${v.id}|${E.identifier()}`;const j=getModuleHash(E);if($.chunkModuleHashes[R]!==j){Ke.add(E,v)}Ne[R]=j}}}else{if(j!==undefined){for(const E of N){const R=`${v.id}|${E.identifier()}`;const $=getModuleHash(E);if(j.has(E)){Te[R]=$}else{Ne[R]=$}}}else{for(const E of N){const R=`${v.id}|${E.identifier()}`;const $=getModuleHash(E);Ne[R]=$}}}}}le=$.hotIndex||0;if(Ke.size>0)le++;v.update(`${le}`)}));R.hooks.processAssets.tap({name:"HotModuleReplacementPlugin",stage:q.PROCESS_ASSETS_STAGE_ADDITIONAL},(()=>{const v=R.chunkGraph;const $=R.records;if($.hash===R.hash)return;if(!$.chunkModuleHashes||!$.chunkHashes||!$.chunkModuleIds){return}for(const[E,j]of Xe){const N=`${j.id}|${E.identifier()}`;const q=Ye.has(E,j.runtime)?v.getModuleHash(E,j.runtime):R.codeGenerationResults.getHash(E,j.runtime);if($.chunkModuleHashes[N]!==q){Ke.add(E,j)}Ne[N]=q}const q=new Map;let ie;for(const v of Object.keys($.chunkRuntime)){const E=He($.chunkRuntime[v]);ie=Qe(ie,E)}We(ie,(v=>{const{path:E,info:j}=R.getPathWithInfo(R.outputOptions.hotUpdateMainFilename,{hash:$.hash,runtime:v});q.set(v,{updatedChunkIds:new Set,removedChunkIds:new Set,removedModules:new Set,filename:E,assetInfo:j})}));if(q.size===0)return;const ae=new Map;for(const E of R.modules){const R=v.getModuleId(E);ae.set(R,E)}const le=new Set;for(const j of Object.keys($.chunkHashes)){const ce=He($.chunkRuntime[j]);const me=[];for(const v of $.chunkModuleIds[j]){const E=ae.get(v);if(E===undefined){le.add(v)}else{me.push(E)}}let _e;let Ie;let Me;let Oe;let Te;let Ne;let Le;const qe=Be(R.chunks,(v=>`${v.id}`===j));if(qe){_e=qe.id;Ne=Ve(qe.runtime,ie);if(Ne===undefined)continue;Ie=v.getChunkModules(qe).filter((v=>Ke.has(v,qe)));Me=Array.from(v.getChunkRuntimeModulesIterable(qe)).filter((v=>Ke.has(v,qe)));const E=v.getChunkFullHashModulesIterable(qe);Oe=E&&Array.from(E).filter((v=>Ke.has(v,qe)));const R=v.getChunkDependentHashModulesIterable(qe);Te=R&&Array.from(R).filter((v=>Ke.has(v,qe)));Le=Je(ce,Ne)}else{_e=`${+j}`===j?+j:j;Le=ce;Ne=ce}if(Le){We(Le,(v=>{q.get(v).removedChunkIds.add(_e)}));for(const E of me){const N=`${j}|${E.identifier()}`;const G=$.chunkModuleHashes[N];const ie=v.getModuleRuntimes(E);if(ce===Ne&&ie.has(Ne)){const $=Ye.has(E,Ne)?v.getModuleHash(E,Ne):R.codeGenerationResults.getHash(E,Ne);if($!==G){if(E.type==="runtime"){Me=Me||[];Me.push(E)}else{Ie=Ie||[];Ie.push(E)}}}else{We(Le,(v=>{for(const E of ie){if(typeof E==="string"){if(E===v)return}else if(E!==undefined){if(E.has(v))return}}q.get(v).removedModules.add(E)}))}}}if(Ie&&Ie.length>0||Me&&Me.length>0){const j=new G;if(E)N.setChunkGraphForChunk(j,v);j.id=_e;j.runtime=Ne;if(qe){for(const v of qe.groupsIterable)j.addGroup(v)}v.attachModules(j,Ie||[]);v.attachRuntimeModules(j,Me||[]);if(Oe){v.attachFullHashModules(j,Oe)}if(Te){v.attachDependentHashModules(j,Te)}const ie=R.getRenderManifest({chunk:j,hash:$.hash,fullHash:$.hash,outputOptions:R.outputOptions,moduleTemplates:R.moduleTemplates,dependencyTemplates:R.dependencyTemplates,codeGenerationResults:R.codeGenerationResults,runtimeTemplate:R.runtimeTemplate,moduleGraph:R.moduleGraph,chunkGraph:v});for(const v of ie){let E;let $;if("filename"in v){E=v.filename;$=v.info}else{({path:E,info:$}=R.getPathWithInfo(v.filenameTemplate,v.pathOptions))}const j=v.render();R.additionalChunkAssets.push(E);R.emitAsset(E,j,{hotModuleReplacement:true,...$});if(qe){qe.files.add(E);R.hooks.chunkAsset.call(qe,E)}}We(Ne,(v=>{q.get(v).updatedChunkIds.add(_e)}))}}const me=Array.from(le);const _e=new Map;for(const{removedChunkIds:v,removedModules:E,updatedChunkIds:$,filename:j,assetInfo:N}of q.values()){const q=_e.get(j);if(q&&(!Le(q.removedChunkIds,v)||!Le(q.removedModules,E)||!Le(q.updatedChunkIds,$))){R.warnings.push(new ce(`HotModuleReplacementPlugin\nThe configured output.hotUpdateMainFilename doesn't lead to unique filenames per runtime and HMR update differs between runtimes.\nThis might lead to incorrect runtime behavior of the applied update.\nTo fix this, make sure to include [runtime] in the output.hotUpdateMainFilename option, or use the default config.`));for(const E of v)q.removedChunkIds.add(E);for(const v of E)q.removedModules.add(v);for(const v of $)q.updatedChunkIds.add(v);continue}_e.set(j,{removedChunkIds:v,removedModules:E,updatedChunkIds:$,assetInfo:N})}for(const[E,{removedChunkIds:$,removedModules:N,updatedChunkIds:q,assetInfo:G}]of _e){const ie={c:Array.from(q),r:Array.from($),m:N.size===0?me:me.concat(Array.from(N,(E=>v.getModuleId(E))))};const ae=new j(JSON.stringify(ie));R.emitAsset(E,ae,{hotModuleReplacement:true,...G})}}));R.hooks.additionalTreeRuntimeRequirements.tap("HotModuleReplacementPlugin",((v,E)=>{E.add(ae.hmrDownloadManifest);E.add(ae.hmrDownloadUpdateHandlers);E.add(ae.interceptModuleExecution);E.add(ae.moduleCache);R.addRuntimeModule(v,new Oe)}));$.hooks.parser.for("javascript/auto").tap("HotModuleReplacementPlugin",(v=>{applyModuleHot(v);applyImportMetaHot(v)}));$.hooks.parser.for("javascript/dynamic").tap("HotModuleReplacementPlugin",(v=>{applyModuleHot(v)}));$.hooks.parser.for("javascript/esm").tap("HotModuleReplacementPlugin",(v=>{applyImportMetaHot(v)}));ie.getCompilationHooks(R).loader.tap("HotModuleReplacementPlugin",(v=>{v.hot=true}))}))}}v.exports=HotModuleReplacementPlugin},23834:function(v,E,R){"use strict";const $=R(84891);class HotUpdateChunk extends ${constructor(){super()}}v.exports=HotUpdateChunk},6720:function(v,E,R){"use strict";const $=R(39744);class IgnoreErrorModuleFactory extends ${constructor(v){super();this.normalModuleFactory=v}create(v,E){this.normalModuleFactory.create(v,((v,R)=>E(null,R)))}}v.exports=IgnoreErrorModuleFactory},46683:function(v,E,R){"use strict";const $=R(89699);const j=$(R(89849),(()=>R(70229)),{name:"Ignore Plugin",baseDataPath:"options"});class IgnorePlugin{constructor(v){j(v);this.options=v;this.checkIgnore=this.checkIgnore.bind(this)}checkIgnore(v){if("checkResource"in this.options&&this.options.checkResource&&this.options.checkResource(v.request,v.context)){return false}if("resourceRegExp"in this.options&&this.options.resourceRegExp&&this.options.resourceRegExp.test(v.request)){if("contextRegExp"in this.options&&this.options.contextRegExp){if(this.options.contextRegExp.test(v.context)){return false}}else{return false}}}apply(v){v.hooks.normalModuleFactory.tap("IgnorePlugin",(v=>{v.hooks.beforeResolve.tap("IgnorePlugin",this.checkIgnore)}));v.hooks.contextModuleFactory.tap("IgnorePlugin",(v=>{v.hooks.beforeResolve.tap("IgnorePlugin",this.checkIgnore)}))}}v.exports=IgnorePlugin},51674:function(v){"use strict";class IgnoreWarningsPlugin{constructor(v){this._ignoreWarnings=v}apply(v){v.hooks.compilation.tap("IgnoreWarningsPlugin",(v=>{v.hooks.processWarnings.tap("IgnoreWarningsPlugin",(E=>E.filter((E=>!this._ignoreWarnings.some((R=>R(E,v)))))))}))}}v.exports=IgnoreWarningsPlugin},64768:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(65764);const extractFragmentIndex=(v,E)=>[v,E];const sortFragmentWithIndex=([v,E],[R,$])=>{const j=v.stage-R.stage;if(j!==0)return j;const N=v.position-R.position;if(N!==0)return N;return E-$};class InitFragment{constructor(v,E,R,$,j){this.content=v;this.stage=E;this.position=R;this.key=$;this.endContent=j}getContent(v){return this.content}getEndContent(v){return this.endContent}static addToSource(v,E,R){if(E.length>0){const j=E.map(extractFragmentIndex).sort(sortFragmentWithIndex);const N=new Map;for(const[v]of j){if(typeof v.mergeAll==="function"){if(!v.key){throw new Error(`InitFragment with mergeAll function must have a valid key: ${v.constructor.name}`)}const E=N.get(v.key);if(E===undefined){N.set(v.key,v)}else if(Array.isArray(E)){E.push(v)}else{N.set(v.key,[E,v])}continue}else if(typeof v.merge==="function"){const E=N.get(v.key);if(E!==undefined){N.set(v.key,v.merge(E));continue}}N.set(v.key||Symbol(),v)}const q=new $;const G=[];for(let v of N.values()){if(Array.isArray(v)){v=v[0].mergeAll(v)}q.add(v.getContent(R));const E=v.getEndContent(R);if(E){G.push(E)}}q.add(v);for(const v of G.reverse()){q.add(v)}return q}else{return v}}serialize(v){const{write:E}=v;E(this.content);E(this.stage);E(this.position);E(this.key);E(this.endContent)}deserialize(v){const{read:E}=v;this.content=E();this.stage=E();this.position=E();this.key=E();this.endContent=E()}}j(InitFragment,"webpack/lib/InitFragment");InitFragment.prototype.merge=undefined;InitFragment.STAGE_CONSTANTS=10;InitFragment.STAGE_ASYNC_BOUNDARY=20;InitFragment.STAGE_HARMONY_EXPORTS=30;InitFragment.STAGE_HARMONY_IMPORTS=40;InitFragment.STAGE_PROVIDES=50;InitFragment.STAGE_ASYNC_DEPENDENCIES=60;InitFragment.STAGE_ASYNC_HARMONY_IMPORTS=70;v.exports=InitFragment},7787:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class InvalidDependenciesModuleWarning extends ${constructor(v,E){const R=E?Array.from(E).sort():[];const $=R.map((v=>` * ${JSON.stringify(v)}`));super(`Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.\nInvalid dependencies may lead to broken watching and caching.\nAs best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior.\nLoaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).\nPlugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).\nGlobs: They are not supported. Pass absolute path to the directory as context dependencies.\nThe following invalid values have been reported:\n${$.slice(0,3).join("\n")}${$.length>3?"\n * and more ...":""}`);this.name="InvalidDependenciesModuleWarning";this.details=$.slice(3).join("\n");this.module=v}}j(InvalidDependenciesModuleWarning,"webpack/lib/InvalidDependenciesModuleWarning");v.exports=InvalidDependenciesModuleWarning},82833:function(v,E,R){"use strict";const $=R(39236);class JavascriptMetaInfoPlugin{apply(v){v.hooks.compilation.tap("JavascriptMetaInfoPlugin",((v,{normalModuleFactory:E})=>{const handler=v=>{v.hooks.call.for("eval").tap("JavascriptMetaInfoPlugin",(()=>{v.state.module.buildInfo.moduleConcatenationBailout="eval()";v.state.module.buildInfo.usingEval=true;const E=$.getTopLevelSymbol(v.state);if(E){$.addUsage(v.state,null,E)}else{$.bailout(v.state)}}));v.hooks.finish.tap("JavascriptMetaInfoPlugin",(()=>{let E=v.state.module.buildInfo.topLevelDeclarations;if(E===undefined){E=v.state.module.buildInfo.topLevelDeclarations=new Set}for(const R of v.scope.definitions.asSet()){const $=v.getFreeInfoFromVariable(R);if($===undefined){E.add(R)}}}))};E.hooks.parser.for("javascript/auto").tap("JavascriptMetaInfoPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("JavascriptMetaInfoPlugin",handler);E.hooks.parser.for("javascript/esm").tap("JavascriptMetaInfoPlugin",handler)}))}}v.exports=JavascriptMetaInfoPlugin},91052:function(v,E,R){"use strict";const $=R(78175);const j=R(17380);const{someInIterable:N}=R(30922);const{compareModulesById:q}=R(58792);const{dirname:G,mkdirp:ie}=R(47077);class LibManifestPlugin{constructor(v){this.options=v}apply(v){v.hooks.emit.tapAsync("LibManifestPlugin",((E,R)=>{const ae=E.moduleGraph;$.forEach(Array.from(E.chunks),((R,$)=>{if(!R.canBeInitial()){$();return}const ce=E.chunkGraph;const le=E.getPath(this.options.path,{chunk:R});const me=this.options.name&&E.getPath(this.options.name,{chunk:R});const _e=Object.create(null);for(const E of ce.getOrderedChunkModulesIterable(R,q(ce))){if(this.options.entryOnly&&!N(ae.getIncomingConnections(E),(v=>v.dependency instanceof j))){continue}const R=E.libIdent({context:this.options.context||v.options.context,associatedObjectForCache:v.root});if(R){const v=ae.getExportsInfo(E);const $=v.getProvidedExports();const j={id:ce.getModuleId(E),buildMeta:E.buildMeta,exports:Array.isArray($)?$:undefined};_e[R]=j}}const Ie={name:me,type:this.options.type,content:_e};const Me=this.options.format?JSON.stringify(Ie,null,2):JSON.stringify(Ie);const Oe=Buffer.from(Me,"utf8");ie(v.intermediateFileSystem,G(v.intermediateFileSystem,le),(E=>{if(E)return $(E);v.intermediateFileSystem.writeFile(le,Oe,$)}))}),R)}))}}v.exports=LibManifestPlugin},59656:function(v,E,R){"use strict";const $=R(7616);class LibraryTemplatePlugin{constructor(v,E,R,$,j){this.library={type:E||"var",name:v,umdNamedDefine:R,auxiliaryComment:$,export:j}}apply(v){const{output:E}=v.options;E.library=this.library;new $(this.library.type).apply(v)}}v.exports=LibraryTemplatePlugin},60634:function(v,E,R){"use strict";const $=R(99523);const j=R(89417);const N=R(89699);const q=N(R(67892),(()=>R(46425)),{name:"Loader Options Plugin",baseDataPath:"options"});class LoaderOptionsPlugin{constructor(v={}){q(v);if(typeof v!=="object")v={};if(!v.test){v.test={test:()=>true}}this.options=v}apply(v){const E=this.options;v.hooks.compilation.tap("LoaderOptionsPlugin",(v=>{j.getCompilationHooks(v).loader.tap("LoaderOptionsPlugin",((v,R)=>{const j=R.resource;if(!j)return;const N=j.indexOf("?");if($.matchObject(E,N<0?j:j.slice(0,N))){for(const R of Object.keys(E)){if(R==="include"||R==="exclude"||R==="test"){continue}v[R]=E[R]}}}))}))}}v.exports=LoaderOptionsPlugin},67181:function(v,E,R){"use strict";const $=R(89417);class LoaderTargetPlugin{constructor(v){this.target=v}apply(v){v.hooks.compilation.tap("LoaderTargetPlugin",(v=>{$.getCompilationHooks(v).loader.tap("LoaderTargetPlugin",(v=>{v.target=this.target}))}))}}v.exports=LoaderTargetPlugin},87797:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73837);const N=R(39201);const q=R(61374);const G=q((()=>R(36109)));const ie=q((()=>R(44896)));const ae=q((()=>R(46750)));class MainTemplate{constructor(v,E){this._outputOptions=v||{};this.hooks=Object.freeze({renderManifest:{tap:j.deprecate(((v,R)=>{E.hooks.renderManifest.tap(v,((v,E)=>{if(!E.chunk.hasRuntime())return v;return R(v,E)}))}),"MainTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)","DEP_WEBPACK_MAIN_TEMPLATE_RENDER_MANIFEST")},modules:{tap:()=>{throw new Error("MainTemplate.hooks.modules has been removed (there is no replacement, please create an issue to request that)")}},moduleObj:{tap:()=>{throw new Error("MainTemplate.hooks.moduleObj has been removed (there is no replacement, please create an issue to request that)")}},require:{tap:j.deprecate(((v,R)=>{G().getCompilationHooks(E).renderRequire.tap(v,R)}),"MainTemplate.hooks.require is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderRequire instead)","DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE")},beforeStartup:{tap:()=>{throw new Error("MainTemplate.hooks.beforeStartup has been removed (use RuntimeGlobals.startupOnlyBefore instead)")}},startup:{tap:()=>{throw new Error("MainTemplate.hooks.startup has been removed (use RuntimeGlobals.startup instead)")}},afterStartup:{tap:()=>{throw new Error("MainTemplate.hooks.afterStartup has been removed (use RuntimeGlobals.startupOnlyAfter instead)")}},render:{tap:j.deprecate(((v,R)=>{G().getCompilationHooks(E).render.tap(v,((v,$)=>{if($.chunkGraph.getNumberOfEntryModules($.chunk)===0||!$.chunk.hasRuntime()){return v}return R(v,$.chunk,E.hash,E.moduleTemplates.javascript,E.dependencyTemplates)}))}),"MainTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)","DEP_WEBPACK_MAIN_TEMPLATE_RENDER")},renderWithEntry:{tap:j.deprecate(((v,R)=>{G().getCompilationHooks(E).render.tap(v,((v,$)=>{if($.chunkGraph.getNumberOfEntryModules($.chunk)===0||!$.chunk.hasRuntime()){return v}return R(v,$.chunk,E.hash)}))}),"MainTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)","DEP_WEBPACK_MAIN_TEMPLATE_RENDER_WITH_ENTRY")},assetPath:{tap:j.deprecate(((v,R)=>{E.hooks.assetPath.tap(v,R)}),"MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)","DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH"),call:j.deprecate(((v,R)=>E.getAssetPath(v,R)),"MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)","DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH")},hash:{tap:j.deprecate(((v,R)=>{E.hooks.fullHash.tap(v,R)}),"MainTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)","DEP_WEBPACK_MAIN_TEMPLATE_HASH")},hashForChunk:{tap:j.deprecate(((v,R)=>{G().getCompilationHooks(E).chunkHash.tap(v,((v,E)=>{if(!v.hasRuntime())return;return R(E,v)}))}),"MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)","DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK")},globalHashPaths:{tap:j.deprecate((()=>{}),"MainTemplate.hooks.globalHashPaths has been removed (it's no longer needed)","DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK")},globalHash:{tap:j.deprecate((()=>{}),"MainTemplate.hooks.globalHash has been removed (it's no longer needed)","DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK")},hotBootstrap:{tap:()=>{throw new Error("MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)")}},bootstrap:new $(["source","chunk","hash","moduleTemplate","dependencyTemplates"]),localVars:new $(["source","chunk","hash"]),requireExtensions:new $(["source","chunk","hash"]),requireEnsure:new $(["source","chunk","hash","chunkIdExpression"]),get jsonpScript(){const v=ae().getCompilationHooks(E);return v.createScript},get linkPrefetch(){const v=ie().getCompilationHooks(E);return v.linkPrefetch},get linkPreload(){const v=ie().getCompilationHooks(E);return v.linkPreload}});this.renderCurrentHashCode=j.deprecate(((v,E)=>{if(E){return`${N.getFullHash} ? ${N.getFullHash}().slice(0, ${E}) : ${v.slice(0,E)}`}return`${N.getFullHash} ? ${N.getFullHash}() : ${v}`}),"MainTemplate.renderCurrentHashCode is deprecated (use RuntimeGlobals.getFullHash runtime function instead)","DEP_WEBPACK_MAIN_TEMPLATE_RENDER_CURRENT_HASH_CODE");this.getPublicPath=j.deprecate((v=>E.getAssetPath(E.outputOptions.publicPath,v)),"MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)","DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH");this.getAssetPath=j.deprecate(((v,R)=>E.getAssetPath(v,R)),"MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)","DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH");this.getAssetPathWithInfo=j.deprecate(((v,R)=>E.getAssetPathWithInfo(v,R)),"MainTemplate.getAssetPathWithInfo is deprecated (use Compilation.getAssetPath instead)","DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH_WITH_INFO")}}Object.defineProperty(MainTemplate.prototype,"requireFn",{get:j.deprecate((()=>"__webpack_require__"),'MainTemplate.requireFn is deprecated (use "__webpack_require__")',"DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE_FN")});Object.defineProperty(MainTemplate.prototype,"outputOptions",{get:j.deprecate((function(){return this._outputOptions}),"MainTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)","DEP_WEBPACK_MAIN_TEMPLATE_OUTPUT_OPTIONS")});v.exports=MainTemplate},53840:function(v,E,R){"use strict";const $=R(73837);const j=R(75449);const N=R(82618);const q=R(13487);const G=R(39201);const{first:ie}=R(73268);const{compareChunksById:ae}=R(58792);const ce=R(65764);const le={};let me=1e3;const _e=new Set(["unknown"]);const Ie=new Set(["javascript"]);const Me=$.deprecate(((v,E)=>v.needRebuild(E.fileSystemInfo.getDeprecatedFileTimestamps(),E.fileSystemInfo.getDeprecatedContextTimestamps())),"Module.needRebuild is deprecated in favor of Module.needBuild","DEP_WEBPACK_MODULE_NEED_REBUILD");class Module extends N{constructor(v,E=null,R=null){super();this.type=v;this.context=E;this.layer=R;this.needId=true;this.debugId=me++;this.resolveOptions=le;this.factoryMeta=undefined;this.useSourceMap=false;this.useSimpleSourceMap=false;this._warnings=undefined;this._errors=undefined;this.buildMeta=undefined;this.buildInfo=undefined;this.presentationalDependencies=undefined;this.codeGenerationDependencies=undefined}get id(){return j.getChunkGraphForModule(this,"Module.id","DEP_WEBPACK_MODULE_ID").getModuleId(this)}set id(v){if(v===""){this.needId=false;return}j.getChunkGraphForModule(this,"Module.id","DEP_WEBPACK_MODULE_ID").setModuleId(this,v)}get hash(){return j.getChunkGraphForModule(this,"Module.hash","DEP_WEBPACK_MODULE_HASH").getModuleHash(this,undefined)}get renderedHash(){return j.getChunkGraphForModule(this,"Module.renderedHash","DEP_WEBPACK_MODULE_RENDERED_HASH").getRenderedModuleHash(this,undefined)}get profile(){return q.getModuleGraphForModule(this,"Module.profile","DEP_WEBPACK_MODULE_PROFILE").getProfile(this)}set profile(v){q.getModuleGraphForModule(this,"Module.profile","DEP_WEBPACK_MODULE_PROFILE").setProfile(this,v)}get index(){return q.getModuleGraphForModule(this,"Module.index","DEP_WEBPACK_MODULE_INDEX").getPreOrderIndex(this)}set index(v){q.getModuleGraphForModule(this,"Module.index","DEP_WEBPACK_MODULE_INDEX").setPreOrderIndex(this,v)}get index2(){return q.getModuleGraphForModule(this,"Module.index2","DEP_WEBPACK_MODULE_INDEX2").getPostOrderIndex(this)}set index2(v){q.getModuleGraphForModule(this,"Module.index2","DEP_WEBPACK_MODULE_INDEX2").setPostOrderIndex(this,v)}get depth(){return q.getModuleGraphForModule(this,"Module.depth","DEP_WEBPACK_MODULE_DEPTH").getDepth(this)}set depth(v){q.getModuleGraphForModule(this,"Module.depth","DEP_WEBPACK_MODULE_DEPTH").setDepth(this,v)}get issuer(){return q.getModuleGraphForModule(this,"Module.issuer","DEP_WEBPACK_MODULE_ISSUER").getIssuer(this)}set issuer(v){q.getModuleGraphForModule(this,"Module.issuer","DEP_WEBPACK_MODULE_ISSUER").setIssuer(this,v)}get usedExports(){return q.getModuleGraphForModule(this,"Module.usedExports","DEP_WEBPACK_MODULE_USED_EXPORTS").getUsedExports(this,undefined)}get optimizationBailout(){return q.getModuleGraphForModule(this,"Module.optimizationBailout","DEP_WEBPACK_MODULE_OPTIMIZATION_BAILOUT").getOptimizationBailout(this)}get optional(){return this.isOptional(q.getModuleGraphForModule(this,"Module.optional","DEP_WEBPACK_MODULE_OPTIONAL"))}addChunk(v){const E=j.getChunkGraphForModule(this,"Module.addChunk","DEP_WEBPACK_MODULE_ADD_CHUNK");if(E.isModuleInChunk(this,v))return false;E.connectChunkAndModule(v,this);return true}removeChunk(v){return j.getChunkGraphForModule(this,"Module.removeChunk","DEP_WEBPACK_MODULE_REMOVE_CHUNK").disconnectChunkAndModule(v,this)}isInChunk(v){return j.getChunkGraphForModule(this,"Module.isInChunk","DEP_WEBPACK_MODULE_IS_IN_CHUNK").isModuleInChunk(this,v)}isEntryModule(){return j.getChunkGraphForModule(this,"Module.isEntryModule","DEP_WEBPACK_MODULE_IS_ENTRY_MODULE").isEntryModule(this)}getChunks(){return j.getChunkGraphForModule(this,"Module.getChunks","DEP_WEBPACK_MODULE_GET_CHUNKS").getModuleChunks(this)}getNumberOfChunks(){return j.getChunkGraphForModule(this,"Module.getNumberOfChunks","DEP_WEBPACK_MODULE_GET_NUMBER_OF_CHUNKS").getNumberOfModuleChunks(this)}get chunksIterable(){return j.getChunkGraphForModule(this,"Module.chunksIterable","DEP_WEBPACK_MODULE_CHUNKS_ITERABLE").getOrderedModuleChunksIterable(this,ae)}isProvided(v){return q.getModuleGraphForModule(this,"Module.usedExports","DEP_WEBPACK_MODULE_USED_EXPORTS").isExportProvided(this,v)}get exportsArgument(){return this.buildInfo&&this.buildInfo.exportsArgument||"exports"}get moduleArgument(){return this.buildInfo&&this.buildInfo.moduleArgument||"module"}getExportsType(v,E){switch(this.buildMeta&&this.buildMeta.exportsType){case"flagged":return E?"default-with-named":"namespace";case"namespace":return"namespace";case"default":switch(this.buildMeta.defaultObject){case"redirect":return"default-with-named";case"redirect-warn":return E?"default-only":"default-with-named";default:return"default-only"}case"dynamic":{if(E)return"default-with-named";const handleDefault=()=>{switch(this.buildMeta.defaultObject){case"redirect":case"redirect-warn":return"default-with-named";default:return"default-only"}};const R=v.getReadOnlyExportInfo(this,"__esModule");if(R.provided===false){return handleDefault()}const $=R.getTarget(v);if(!$||!$.export||$.export.length!==1||$.export[0]!=="__esModule"){return"dynamic"}switch($.module.buildMeta&&$.module.buildMeta.exportsType){case"flagged":case"namespace":return"namespace";case"default":return handleDefault();default:return"dynamic"}}default:return E?"default-with-named":"dynamic"}}addPresentationalDependency(v){if(this.presentationalDependencies===undefined){this.presentationalDependencies=[]}this.presentationalDependencies.push(v)}addCodeGenerationDependency(v){if(this.codeGenerationDependencies===undefined){this.codeGenerationDependencies=[]}this.codeGenerationDependencies.push(v)}clearDependenciesAndBlocks(){if(this.presentationalDependencies!==undefined){this.presentationalDependencies.length=0}if(this.codeGenerationDependencies!==undefined){this.codeGenerationDependencies.length=0}super.clearDependenciesAndBlocks()}addWarning(v){if(this._warnings===undefined){this._warnings=[]}this._warnings.push(v)}getWarnings(){return this._warnings}getNumberOfWarnings(){return this._warnings!==undefined?this._warnings.length:0}addError(v){if(this._errors===undefined){this._errors=[]}this._errors.push(v)}getErrors(){return this._errors}getNumberOfErrors(){return this._errors!==undefined?this._errors.length:0}clearWarningsAndErrors(){if(this._warnings!==undefined){this._warnings.length=0}if(this._errors!==undefined){this._errors.length=0}}isOptional(v){let E=false;for(const R of v.getIncomingConnections(this)){if(!R.dependency||!R.dependency.optional||!R.isTargetActive(undefined)){return false}E=true}return E}isAccessibleInChunk(v,E,R){for(const R of E.groupsIterable){if(!this.isAccessibleInChunkGroup(v,R))return false}return true}isAccessibleInChunkGroup(v,E,R){const $=new Set([E]);e:for(const j of $){for(const E of j.chunks){if(E!==R&&v.isModuleInChunk(this,E))continue e}if(E.isInitial())return false;for(const v of E.parentsIterable)$.add(v)}return true}hasReasonForChunk(v,E,R){for(const[$,j]of E.getIncomingConnectionsByOriginModule(this)){if(!j.some((E=>E.isTargetActive(v.runtime))))continue;for(const E of R.getModuleChunksIterable($)){if(!this.isAccessibleInChunk(R,E,v))return true}}return false}hasReasons(v,E){for(const R of v.getIncomingConnections(this)){if(R.isTargetActive(E))return true}return false}toString(){return`Module[${this.debugId}: ${this.identifier()}]`}needBuild(v,E){E(null,!this.buildMeta||this.needRebuild===Module.prototype.needRebuild||Me(this,v))}needRebuild(v,E){return true}updateHash(v,E={chunkGraph:j.getChunkGraphForModule(this,"Module.updateHash","DEP_WEBPACK_MODULE_UPDATE_HASH"),runtime:undefined}){const{chunkGraph:R,runtime:$}=E;v.update(R.getModuleGraphHash(this,$));if(this.presentationalDependencies!==undefined){for(const R of this.presentationalDependencies){R.updateHash(v,E)}}super.updateHash(v,E)}invalidateBuild(){}identifier(){const v=R(73846);throw new v}readableIdentifier(v){const E=R(73846);throw new E}build(v,E,$,j,N){const q=R(73846);throw new q}getSourceTypes(){if(this.source===Module.prototype.source){return _e}else{return Ie}}source(v,E,$="javascript"){if(this.codeGeneration===Module.prototype.codeGeneration){const v=R(73846);throw new v}const N=j.getChunkGraphForModule(this,"Module.source() is deprecated. Use Compilation.codeGenerationResults.getSource(module, runtime, type) instead","DEP_WEBPACK_MODULE_SOURCE");const q={dependencyTemplates:v,runtimeTemplate:E,moduleGraph:N.moduleGraph,chunkGraph:N,runtime:undefined,codeGenerationResults:undefined};const G=this.codeGeneration(q).sources;return $?G.get($):G.get(ie(this.getSourceTypes()))}size(v){const E=R(73846);throw new E}libIdent(v){return null}nameForCondition(){return null}getConcatenationBailoutReason(v){return`Module Concatenation is not implemented for ${this.constructor.name}`}getSideEffectsConnectionState(v){return true}codeGeneration(v){const E=new Map;for(const R of this.getSourceTypes()){if(R!=="unknown"){E.set(R,this.source(v.dependencyTemplates,v.runtimeTemplate,R))}}return{sources:E,runtimeRequirements:new Set([G.module,G.exports,G.require])}}chunkCondition(v,E){return true}hasChunkCondition(){return this.chunkCondition!==Module.prototype.chunkCondition}updateCacheModule(v){this.type=v.type;this.layer=v.layer;this.context=v.context;this.factoryMeta=v.factoryMeta;this.resolveOptions=v.resolveOptions}getUnsafeCacheData(){return{factoryMeta:this.factoryMeta,resolveOptions:this.resolveOptions}}_restoreFromUnsafeCache(v,E){this.factoryMeta=v.factoryMeta;this.resolveOptions=v.resolveOptions}cleanupForCache(){this.factoryMeta=undefined;this.resolveOptions=undefined}originalSource(){return null}addCacheDependencies(v,E,R,$){}serialize(v){const{write:E}=v;E(this.type);E(this.layer);E(this.context);E(this.resolveOptions);E(this.factoryMeta);E(this.useSourceMap);E(this.useSimpleSourceMap);E(this._warnings!==undefined&&this._warnings.length===0?undefined:this._warnings);E(this._errors!==undefined&&this._errors.length===0?undefined:this._errors);E(this.buildMeta);E(this.buildInfo);E(this.presentationalDependencies);E(this.codeGenerationDependencies);super.serialize(v)}deserialize(v){const{read:E}=v;this.type=E();this.layer=E();this.context=E();this.resolveOptions=E();this.factoryMeta=E();this.useSourceMap=E();this.useSimpleSourceMap=E();this._warnings=E();this._errors=E();this.buildMeta=E();this.buildInfo=E();this.presentationalDependencies=E();this.codeGenerationDependencies=E();super.deserialize(v)}}ce(Module,"webpack/lib/Module");Object.defineProperty(Module.prototype,"hasEqualsChunks",{get(){throw new Error("Module.hasEqualsChunks was renamed (use hasEqualChunks instead)")}});Object.defineProperty(Module.prototype,"isUsed",{get(){throw new Error("Module.isUsed was renamed (use getUsedName, isExportUsed or isModuleUsed instead)")}});Object.defineProperty(Module.prototype,"errors",{get:$.deprecate((function(){if(this._errors===undefined){this._errors=[]}return this._errors}),"Module.errors was removed (use getErrors instead)","DEP_WEBPACK_MODULE_ERRORS")});Object.defineProperty(Module.prototype,"warnings",{get:$.deprecate((function(){if(this._warnings===undefined){this._warnings=[]}return this._warnings}),"Module.warnings was removed (use getWarnings instead)","DEP_WEBPACK_MODULE_WARNINGS")});Object.defineProperty(Module.prototype,"used",{get(){throw new Error("Module.used was refactored (use ModuleGraph.getUsedExports instead)")},set(v){throw new Error("Module.used was refactored (use ModuleGraph.setUsedExports instead)")}});v.exports=Module},12530:function(v,E,R){"use strict";const{cutOffLoaderExecution:$}=R(8821);const j=R(27154);const N=R(65764);class ModuleBuildError extends j{constructor(v,{from:E=null}={}){let R="Module build failed";let j=undefined;if(E){R+=` (from ${E}):\n`}else{R+=": "}if(v!==null&&typeof v==="object"){if(typeof v.stack==="string"&&v.stack){const E=$(v.stack);if(!v.hideStack){R+=E}else{j=E;if(typeof v.message==="string"&&v.message){R+=v.message}else{R+=v}}}else if(typeof v.message==="string"&&v.message){R+=v.message}else{R+=String(v)}}else{R+=String(v)}super(R);this.name="ModuleBuildError";this.details=j;this.error=v}serialize(v){const{write:E}=v;E(this.error);super.serialize(v)}deserialize(v){const{read:E}=v;this.error=E();super.deserialize(v)}}N(ModuleBuildError,"webpack/lib/ModuleBuildError");v.exports=ModuleBuildError},17799:function(v,E,R){"use strict";const $=R(27154);class ModuleDependencyError extends ${constructor(v,E,R){super(E.message);this.name="ModuleDependencyError";this.details=E&&!E.hideStack?E.stack.split("\n").slice(1).join("\n"):undefined;this.module=v;this.loc=R;this.error=E;if(E&&E.hideStack){this.stack=E.stack.split("\n").slice(1).join("\n")+"\n\n"+this.stack}}}v.exports=ModuleDependencyError},76218:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class ModuleDependencyWarning extends ${constructor(v,E,R){super(E?E.message:"");this.name="ModuleDependencyWarning";this.details=E&&!E.hideStack?E.stack.split("\n").slice(1).join("\n"):undefined;this.module=v;this.loc=R;this.error=E;if(E&&E.hideStack){this.stack=E.stack.split("\n").slice(1).join("\n")+"\n\n"+this.stack}}}j(ModuleDependencyWarning,"webpack/lib/ModuleDependencyWarning");v.exports=ModuleDependencyWarning},74938:function(v,E,R){"use strict";const{cleanUp:$}=R(8821);const j=R(27154);const N=R(65764);class ModuleError extends j{constructor(v,{from:E=null}={}){let R="Module Error";if(E){R+=` (from ${E}):\n`}else{R+=": "}if(v&&typeof v==="object"&&v.message){R+=v.message}else if(v){R+=v}super(R);this.name="ModuleError";this.error=v;this.details=v&&typeof v==="object"&&v.stack?$(v.stack,this.message):undefined}serialize(v){const{write:E}=v;E(this.error);super.serialize(v)}deserialize(v){const{read:E}=v;this.error=E();super.deserialize(v)}}N(ModuleError,"webpack/lib/ModuleError");v.exports=ModuleError},39744:function(v,E,R){"use strict";class ModuleFactory{create(v,E){const $=R(73846);throw new $}}v.exports=ModuleFactory},99523:function(v,E,R){"use strict";const $=R(89417);const j=R(85205);const N=R(61374);const q=E;q.ALL_LOADERS_RESOURCE="[all-loaders][resource]";q.REGEXP_ALL_LOADERS_RESOURCE=/\[all-?loaders\]\[resource\]/gi;q.LOADERS_RESOURCE="[loaders][resource]";q.REGEXP_LOADERS_RESOURCE=/\[loaders\]\[resource\]/gi;q.RESOURCE="[resource]";q.REGEXP_RESOURCE=/\[resource\]/gi;q.ABSOLUTE_RESOURCE_PATH="[absolute-resource-path]";q.REGEXP_ABSOLUTE_RESOURCE_PATH=/\[abs(olute)?-?resource-?path\]/gi;q.RESOURCE_PATH="[resource-path]";q.REGEXP_RESOURCE_PATH=/\[resource-?path\]/gi;q.ALL_LOADERS="[all-loaders]";q.REGEXP_ALL_LOADERS=/\[all-?loaders\]/gi;q.LOADERS="[loaders]";q.REGEXP_LOADERS=/\[loaders\]/gi;q.QUERY="[query]";q.REGEXP_QUERY=/\[query\]/gi;q.ID="[id]";q.REGEXP_ID=/\[id\]/gi;q.HASH="[hash]";q.REGEXP_HASH=/\[hash\]/gi;q.NAMESPACE="[namespace]";q.REGEXP_NAMESPACE=/\[namespace\]/gi;const getAfter=(v,E)=>()=>{const R=v();const $=R.indexOf(E);return $<0?"":R.slice($)};const getBefore=(v,E)=>()=>{const R=v();const $=R.lastIndexOf(E);return $<0?"":R.slice(0,$)};const getHash=(v,E)=>()=>{const R=j(E);R.update(v());const $=R.digest("hex");return $.slice(0,4)};const asRegExp=v=>{if(typeof v==="string"){v=new RegExp("^"+v.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))}return v};const lazyObject=v=>{const E={};for(const R of Object.keys(v)){const $=v[R];Object.defineProperty(E,R,{get:()=>$(),set:v=>{Object.defineProperty(E,R,{value:v,enumerable:true,writable:true})},enumerable:true,configurable:true})}return E};const G=/\[\\*([\w-]+)\\*\]/gi;q.createFilename=(v="",E,{requestShortener:R,chunkGraph:j,hashFunction:ie="md4"})=>{const ae={namespace:"",moduleFilenameTemplate:"",...typeof E==="object"?E:{moduleFilenameTemplate:E}};let ce;let le;let me;let _e;let Ie;if(typeof v==="string"){Ie=N((()=>R.shorten(v)));me=Ie;_e=()=>"";ce=()=>v.split("!").pop();le=getHash(me,ie)}else{Ie=N((()=>v.readableIdentifier(R)));me=N((()=>R.shorten(v.identifier())));_e=()=>j.getModuleId(v);ce=()=>v instanceof $?v.resource:v.identifier().split("!").pop();le=getHash(me,ie)}const Me=N((()=>Ie().split("!").pop()));const Oe=getBefore(Ie,"!");const Te=getBefore(me,"!");const Ne=getAfter(Me,"?");const resourcePath=()=>{const v=Ne().length;return v===0?Me():Me().slice(0,-v)};if(typeof ae.moduleFilenameTemplate==="function"){return ae.moduleFilenameTemplate(lazyObject({identifier:me,shortIdentifier:Ie,resource:Me,resourcePath:N(resourcePath),absoluteResourcePath:N(ce),allLoaders:N(Te),query:N(Ne),moduleId:N(_e),hash:N(le),namespace:()=>ae.namespace}))}const Be=new Map([["identifier",me],["short-identifier",Ie],["resource",Me],["resource-path",resourcePath],["resourcepath",resourcePath],["absolute-resource-path",ce],["abs-resource-path",ce],["absoluteresource-path",ce],["absresource-path",ce],["absolute-resourcepath",ce],["abs-resourcepath",ce],["absoluteresourcepath",ce],["absresourcepath",ce],["all-loaders",Te],["allloaders",Te],["loaders",Oe],["query",Ne],["id",_e],["hash",le],["namespace",()=>ae.namespace]]);return ae.moduleFilenameTemplate.replace(q.REGEXP_ALL_LOADERS_RESOURCE,"[identifier]").replace(q.REGEXP_LOADERS_RESOURCE,"[short-identifier]").replace(G,((v,E)=>{if(E.length+2===v.length){const v=Be.get(E.toLowerCase());if(v!==undefined){return v()}}else if(v.startsWith("[\\")&&v.endsWith("\\]")){return`[${v.slice(2,-2)}]`}return v}))};q.replaceDuplicates=(v,E,R)=>{const $=Object.create(null);const j=Object.create(null);v.forEach(((v,E)=>{$[v]=$[v]||[];$[v].push(E);j[v]=0}));if(R){Object.keys($).forEach((v=>{$[v].sort(R)}))}return v.map(((v,N)=>{if($[v].length>1){if(R&&$[v][0]===N)return v;return E(v,N,j[v]++)}else{return v}}))};q.matchPart=(v,E)=>{if(!E)return true;E=asRegExp(E);if(Array.isArray(E)){return E.map(asRegExp).some((E=>E.test(v)))}else{return E.test(v)}};q.matchObject=(v,E)=>{if(v.test){if(!q.matchPart(E,v.test)){return false}}if(v.include){if(!q.matchPart(E,v.include)){return false}}if(v.exclude){if(q.matchPart(E,v.exclude)){return false}}return true}},13487:function(v,E,R){"use strict";const $=R(73837);const j=R(13168);const N=R(82921);const q=R(87122);const G=R(20427);const ie=new Set;const getConnectionsByOriginModule=v=>{const E=new Map;let R=0;let $=undefined;for(const j of v){const{originModule:v}=j;if(R===v){$.push(j)}else{R=v;const N=E.get(v);if(N!==undefined){$=N;N.push(j)}else{const R=[j];$=R;E.set(v,R)}}}return E};const getConnectionsByModule=v=>{const E=new Map;let R=0;let $=undefined;for(const j of v){const{module:v}=j;if(R===v){$.push(j)}else{R=v;const N=E.get(v);if(N!==undefined){$=N;N.push(j)}else{const R=[j];$=R;E.set(v,R)}}}return E};class ModuleGraphModule{constructor(){this.incomingConnections=new q;this.outgoingConnections=undefined;this.issuer=undefined;this.optimizationBailout=[];this.exports=new j;this.preOrderIndex=null;this.postOrderIndex=null;this.depth=null;this.profile=undefined;this.async=false;this._unassignedConnections=undefined}}class ModuleGraph{constructor(){this._dependencyMap=new WeakMap;this._moduleMap=new Map;this._metaMap=new WeakMap;this._cache=undefined;this._moduleMemCaches=undefined}_getModuleGraphModule(v){let E=this._moduleMap.get(v);if(E===undefined){E=new ModuleGraphModule;this._moduleMap.set(v,E)}return E}setParents(v,E,R,$=-1){v._parentDependenciesBlockIndex=$;v._parentDependenciesBlock=E;v._parentModule=R}getParentModule(v){return v._parentModule}getParentBlock(v){return v._parentDependenciesBlock}getParentBlockIndex(v){return v._parentDependenciesBlockIndex}setResolvedModule(v,E,R){const $=new N(v,E,R,undefined,E.weak,E.getCondition(this));const j=this._getModuleGraphModule(R).incomingConnections;j.add($);if(v){const E=this._getModuleGraphModule(v);if(E._unassignedConnections===undefined){E._unassignedConnections=[]}E._unassignedConnections.push($);if(E.outgoingConnections===undefined){E.outgoingConnections=new q}E.outgoingConnections.add($)}else{this._dependencyMap.set(E,$)}}updateModule(v,E){const R=this.getConnection(v);if(R.module===E)return;const $=R.clone();$.module=E;this._dependencyMap.set(v,$);R.setActive(false);const j=this._getModuleGraphModule(R.originModule);j.outgoingConnections.add($);const N=this._getModuleGraphModule(E);N.incomingConnections.add($)}removeConnection(v){const E=this.getConnection(v);const R=this._getModuleGraphModule(E.module);R.incomingConnections.delete(E);const $=this._getModuleGraphModule(E.originModule);$.outgoingConnections.delete(E);this._dependencyMap.set(v,null)}addExplanation(v,E){const R=this.getConnection(v);R.addExplanation(E)}cloneModuleAttributes(v,E){const R=this._getModuleGraphModule(v);const $=this._getModuleGraphModule(E);$.postOrderIndex=R.postOrderIndex;$.preOrderIndex=R.preOrderIndex;$.depth=R.depth;$.exports=R.exports;$.async=R.async}removeModuleAttributes(v){const E=this._getModuleGraphModule(v);E.postOrderIndex=null;E.preOrderIndex=null;E.depth=null;E.async=false}removeAllModuleAttributes(){for(const v of this._moduleMap.values()){v.postOrderIndex=null;v.preOrderIndex=null;v.depth=null;v.async=false}}moveModuleConnections(v,E,R){if(v===E)return;const $=this._getModuleGraphModule(v);const j=this._getModuleGraphModule(E);const N=$.outgoingConnections;if(N!==undefined){if(j.outgoingConnections===undefined){j.outgoingConnections=new q}const v=j.outgoingConnections;for(const $ of N){if(R($)){$.originModule=E;v.add($);N.delete($)}}}const G=$.incomingConnections;const ie=j.incomingConnections;for(const v of G){if(R(v)){v.module=E;ie.add(v);G.delete(v)}}}copyOutgoingModuleConnections(v,E,R){if(v===E)return;const $=this._getModuleGraphModule(v);const j=this._getModuleGraphModule(E);const N=$.outgoingConnections;if(N!==undefined){if(j.outgoingConnections===undefined){j.outgoingConnections=new q}const v=j.outgoingConnections;for(const $ of N){if(R($)){const R=$.clone();R.originModule=E;v.add(R);if(R.module!==undefined){const v=this._getModuleGraphModule(R.module);v.incomingConnections.add(R)}}}}}addExtraReason(v,E){const R=this._getModuleGraphModule(v).incomingConnections;R.add(new N(null,null,v,E))}getResolvedModule(v){const E=this.getConnection(v);return E!==undefined?E.resolvedModule:null}getConnection(v){const E=this._dependencyMap.get(v);if(E===undefined){const E=this.getParentModule(v);if(E!==undefined){const R=this._getModuleGraphModule(E);if(R._unassignedConnections&&R._unassignedConnections.length!==0){let E;for(const $ of R._unassignedConnections){this._dependencyMap.set($.dependency,$);if($.dependency===v)E=$}R._unassignedConnections.length=0;if(E!==undefined){return E}}}this._dependencyMap.set(v,null);return undefined}return E===null?undefined:E}getModule(v){const E=this.getConnection(v);return E!==undefined?E.module:null}getOrigin(v){const E=this.getConnection(v);return E!==undefined?E.originModule:null}getResolvedOrigin(v){const E=this.getConnection(v);return E!==undefined?E.resolvedOriginModule:null}getIncomingConnections(v){const E=this._getModuleGraphModule(v).incomingConnections;return E}getOutgoingConnections(v){const E=this._getModuleGraphModule(v).outgoingConnections;return E===undefined?ie:E}getIncomingConnectionsByOriginModule(v){const E=this._getModuleGraphModule(v).incomingConnections;return E.getFromUnorderedCache(getConnectionsByOriginModule)}getOutgoingConnectionsByModule(v){const E=this._getModuleGraphModule(v).outgoingConnections;return E===undefined?undefined:E.getFromUnorderedCache(getConnectionsByModule)}getProfile(v){const E=this._getModuleGraphModule(v);return E.profile}setProfile(v,E){const R=this._getModuleGraphModule(v);R.profile=E}getIssuer(v){const E=this._getModuleGraphModule(v);return E.issuer}setIssuer(v,E){const R=this._getModuleGraphModule(v);R.issuer=E}setIssuerIfUnset(v,E){const R=this._getModuleGraphModule(v);if(R.issuer===undefined)R.issuer=E}getOptimizationBailout(v){const E=this._getModuleGraphModule(v);return E.optimizationBailout}getProvidedExports(v){const E=this._getModuleGraphModule(v);return E.exports.getProvidedExports()}isExportProvided(v,E){const R=this._getModuleGraphModule(v);const $=R.exports.isExportProvided(E);return $===undefined?null:$}getExportsInfo(v){const E=this._getModuleGraphModule(v);return E.exports}getExportInfo(v,E){const R=this._getModuleGraphModule(v);return R.exports.getExportInfo(E)}getReadOnlyExportInfo(v,E){const R=this._getModuleGraphModule(v);return R.exports.getReadOnlyExportInfo(E)}getUsedExports(v,E){const R=this._getModuleGraphModule(v);return R.exports.getUsedExports(E)}getPreOrderIndex(v){const E=this._getModuleGraphModule(v);return E.preOrderIndex}getPostOrderIndex(v){const E=this._getModuleGraphModule(v);return E.postOrderIndex}setPreOrderIndex(v,E){const R=this._getModuleGraphModule(v);R.preOrderIndex=E}setPreOrderIndexIfUnset(v,E){const R=this._getModuleGraphModule(v);if(R.preOrderIndex===null){R.preOrderIndex=E;return true}return false}setPostOrderIndex(v,E){const R=this._getModuleGraphModule(v);R.postOrderIndex=E}setPostOrderIndexIfUnset(v,E){const R=this._getModuleGraphModule(v);if(R.postOrderIndex===null){R.postOrderIndex=E;return true}return false}getDepth(v){const E=this._getModuleGraphModule(v);return E.depth}setDepth(v,E){const R=this._getModuleGraphModule(v);R.depth=E}setDepthIfLower(v,E){const R=this._getModuleGraphModule(v);if(R.depth===null||R.depth>E){R.depth=E;return true}return false}isAsync(v){const E=this._getModuleGraphModule(v);return E.async}setAsync(v){const E=this._getModuleGraphModule(v);E.async=true}getMeta(v){let E=this._metaMap.get(v);if(E===undefined){E=Object.create(null);this._metaMap.set(v,E)}return E}getMetaIfExisting(v){return this._metaMap.get(v)}freeze(v){this._cache=new G;this._cacheStage=v}unfreeze(){this._cache=undefined;this._cacheStage=undefined}cached(v,...E){if(this._cache===undefined)return v(this,...E);return this._cache.provide(v,...E,(()=>v(this,...E)))}setModuleMemCaches(v){this._moduleMemCaches=v}dependencyCacheProvide(v,...E){const R=E.pop();if(this._moduleMemCaches&&this._cacheStage){const $=this._moduleMemCaches.get(this.getParentModule(v));if($!==undefined){return $.provide(v,this._cacheStage,...E,(()=>R(this,v,...E)))}}if(this._cache===undefined)return R(this,v,...E);return this._cache.provide(v,...E,(()=>R(this,v,...E)))}static getModuleGraphForModule(v,E,R){const j=ce.get(E);if(j)return j(v);const N=$.deprecate((v=>{const R=ae.get(v);if(!R)throw new Error(E+"There was no ModuleGraph assigned to the Module for backward-compat (Use the new API)");return R}),E+": Use new ModuleGraph API",R);ce.set(E,N);return N(v)}static setModuleGraphForModule(v,E){ae.set(v,E)}static clearModuleGraphForModule(v){ae.delete(v)}}const ae=new WeakMap;const ce=new Map;v.exports=ModuleGraph;v.exports.ModuleGraphConnection=N},82921:function(v){"use strict";const E=Symbol("transitive only");const R=Symbol("circular connection");const addConnectionStates=(v,R)=>{if(v===true||R===true)return true;if(v===false)return R;if(R===false)return v;if(v===E)return R;if(R===E)return v;return v};const intersectConnectionStates=(v,E)=>{if(v===false||E===false)return false;if(v===true)return E;if(E===true)return v;if(v===R)return E;if(E===R)return v;return v};class ModuleGraphConnection{constructor(v,E,R,$,j=false,N=undefined){this.originModule=v;this.resolvedOriginModule=v;this.dependency=E;this.resolvedModule=R;this.module=R;this.weak=j;this.conditional=!!N;this._active=N!==false;this.condition=N||undefined;this.explanations=undefined;if($){this.explanations=new Set;this.explanations.add($)}}clone(){const v=new ModuleGraphConnection(this.resolvedOriginModule,this.dependency,this.resolvedModule,undefined,this.weak,this.condition);v.originModule=this.originModule;v.module=this.module;v.conditional=this.conditional;v._active=this._active;if(this.explanations)v.explanations=new Set(this.explanations);return v}addCondition(v){if(this.conditional){const E=this.condition;this.condition=(R,$)=>intersectConnectionStates(E(R,$),v(R,$))}else if(this._active){this.conditional=true;this.condition=v}}addExplanation(v){if(this.explanations===undefined){this.explanations=new Set}this.explanations.add(v)}get explanation(){if(this.explanations===undefined)return"";return Array.from(this.explanations).join(" ")}get active(){throw new Error("Use getActiveState instead")}isActive(v){if(!this.conditional)return this._active;return this.condition(this,v)!==false}isTargetActive(v){if(!this.conditional)return this._active;return this.condition(this,v)===true}getActiveState(v){if(!this.conditional)return this._active;return this.condition(this,v)}setActive(v){this.conditional=false;this._active=v}set active(v){throw new Error("Use setActive instead")}}v.exports=ModuleGraphConnection;v.exports.addConnectionStates=addConnectionStates;v.exports.TRANSITIVE_ONLY=E;v.exports.CIRCULAR_CONNECTION=R},16939:function(v,E,R){"use strict";const $=R(27154);class ModuleHashingError extends ${constructor(v,E){super();this.name="ModuleHashingError";this.error=E;this.message=E.message;this.details=E.stack;this.module=v}}v.exports=ModuleHashingError},56204:function(v,E,R){"use strict";const{ConcatSource:$,RawSource:j,CachedSource:N}=R(51255);const{UsageState:q}=R(13168);const G=R(43841);const ie=R(36109);const joinIterableWithComma=v=>{let E="";let R=true;for(const $ of v){if(R){R=false}else{E+=", "}E+=$}return E};const printExportsInfoToSource=(v,E,R,$,j,N=new Set)=>{const ie=R.otherExportsInfo;let ae=0;const ce=[];for(const v of R.orderedExports){if(!N.has(v)){N.add(v);ce.push(v)}else{ae++}}let le=false;if(!N.has(ie)){N.add(ie);le=true}else{ae++}for(const R of ce){const q=R.getTarget($);v.add(G.toComment(`${E}export ${JSON.stringify(R.name).slice(1,-1)} [${R.getProvidedInfo()}] [${R.getUsedInfo()}] [${R.getRenameInfo()}]${q?` -> ${q.module.readableIdentifier(j)}${q.export?` .${q.export.map((v=>JSON.stringify(v).slice(1,-1))).join(".")}`:""}`:""}`)+"\n");if(R.exportsInfo){printExportsInfoToSource(v,E+" ",R.exportsInfo,$,j,N)}}if(ae){v.add(G.toComment(`${E}... (${ae} already listed exports)`)+"\n")}if(le){const R=ie.getTarget($);if(R||ie.provided!==false||ie.getUsed(undefined)!==q.Unused){const $=ce.length>0||ae>0?"other exports":"exports";v.add(G.toComment(`${E}${$} [${ie.getProvidedInfo()}] [${ie.getUsedInfo()}]${R?` -> ${R.module.readableIdentifier(j)}`:""}`)+"\n")}}};const ae=new WeakMap;class ModuleInfoHeaderPlugin{constructor(v=true){this._verbose=v}apply(v){const{_verbose:E}=this;v.hooks.compilation.tap("ModuleInfoHeaderPlugin",(v=>{const R=ie.getCompilationHooks(v);R.renderModulePackage.tap("ModuleInfoHeaderPlugin",((v,R,{chunk:q,chunkGraph:ie,moduleGraph:ce,runtimeTemplate:le})=>{const{requestShortener:me}=le;let _e;let Ie=ae.get(me);if(Ie===undefined){ae.set(me,Ie=new WeakMap);Ie.set(R,_e={header:undefined,full:new WeakMap})}else{_e=Ie.get(R);if(_e===undefined){Ie.set(R,_e={header:undefined,full:new WeakMap})}else if(!E){const E=_e.full.get(v);if(E!==undefined)return E}}const Me=new $;let Oe=_e.header;if(Oe===undefined){const v=R.readableIdentifier(me);const E=v.replace(/\*\//g,"*_/");const $="*".repeat(E.length);const N=`/*!****${$}****!*\\\n !*** ${E} ***!\n \\****${$}****/\n`;Oe=new j(N);_e.header=Oe}Me.add(Oe);if(E){const E=R.buildMeta.exportsType;Me.add(G.toComment(E?`${E} exports`:"unknown exports (runtime-defined)")+"\n");if(E){const v=ce.getExportsInfo(R);printExportsInfoToSource(Me,"",v,ce,me)}Me.add(G.toComment(`runtime requirements: ${joinIterableWithComma(ie.getModuleRuntimeRequirements(R,q.runtime))}`)+"\n");const $=ce.getOptimizationBailout(R);if($){for(const v of $){let E;if(typeof v==="function"){E=v(me)}else{E=v}Me.add(G.toComment(`${E}`)+"\n")}}Me.add(v);return Me}else{Me.add(v);const E=new N(Me);_e.full.set(v,E);return E}}));R.chunkHash.tap("ModuleInfoHeaderPlugin",((v,E)=>{E.update("ModuleInfoHeaderPlugin");E.update("1")}))}))}}v.exports=ModuleInfoHeaderPlugin},16554:function(v,E,R){"use strict";const $=R(27154);const j={assert:"assert/",buffer:"buffer/",console:"console-browserify",constants:"constants-browserify",crypto:"crypto-browserify",domain:"domain-browser",events:"events/",http:"stream-http",https:"https-browserify",os:"os-browserify/browser",path:"path-browserify",punycode:"punycode/",process:"process/browser",querystring:"querystring-es3",stream:"stream-browserify",_stream_duplex:"readable-stream/duplex",_stream_passthrough:"readable-stream/passthrough",_stream_readable:"readable-stream/readable",_stream_transform:"readable-stream/transform",_stream_writable:"readable-stream/writable",string_decoder:"string_decoder/",sys:"util/",timers:"timers-browserify",tty:"tty-browserify",url:"url/",util:"util/",vm:"vm-browserify",zlib:"browserify-zlib"};class ModuleNotFoundError extends ${constructor(v,E,R){let $=`Module not found: ${E.toString()}`;const N=E.message.match(/Can't resolve '([^']+)'/);if(N){const v=N[1];const E=j[v];if(E){const R=E.indexOf("/");const j=R>0?E.slice(0,R):E;$+="\n\n"+"BREAKING CHANGE: "+"webpack < 5 used to include polyfills for node.js core modules by default.\n"+"This is no longer the case. Verify if you need this module and configure a polyfill for it.\n\n";$+="If you want to include a polyfill, you need to:\n"+`\t- add a fallback 'resolve.fallback: { "${v}": require.resolve("${E}") }'\n`+`\t- install '${j}'\n`;$+="If you don't want to include a polyfill, you can use an empty module like this:\n"+`\tresolve.fallback: { "${v}": false }`}}super($);this.name="ModuleNotFoundError";this.details=E.details;this.module=v;this.error=E;this.loc=R}}v.exports=ModuleNotFoundError},30417:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);const N=Buffer.from([0,97,115,109]);class ModuleParseError extends ${constructor(v,E,R,$){let j="Module parse failed: "+(E&&E.message);let q=undefined;if((Buffer.isBuffer(v)&&v.slice(0,4).equals(N)||typeof v==="string"&&/^\0asm/.test(v))&&!$.startsWith("webassembly")){j+="\nThe module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.";j+="\nBREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.";j+="\nYou need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated).";j+="\nFor files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: \"webassembly/async\"')."}else if(!R){j+="\nYou may need an appropriate loader to handle this file type."}else if(R.length>=1){j+=`\nFile was processed with these loaders:${R.map((v=>`\n * ${v}`)).join("")}`;j+="\nYou may need an additional loader to handle the result of these loaders."}else{j+="\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders"}if(E&&E.loc&&typeof E.loc==="object"&&typeof E.loc.line==="number"){var G=E.loc.line;if(Buffer.isBuffer(v)||/[\0\u0001\u0002\u0003\u0004\u0005\u0006\u0007]/.test(v)){j+="\n(Source code omitted for this binary file)"}else{const E=v.split(/\r?\n/);const R=Math.max(0,G-3);const $=E.slice(R,G-1);const N=E[G-1];const q=E.slice(G,G+2);j+=$.map((v=>`\n| ${v}`)).join("")+`\n> ${N}`+q.map((v=>`\n| ${v}`)).join("")}q={start:E.loc}}else if(E&&E.stack){j+="\n"+E.stack}super(j);this.name="ModuleParseError";this.loc=q;this.error=E}serialize(v){const{write:E}=v;E(this.error);super.serialize(v)}deserialize(v){const{read:E}=v;this.error=E();super.deserialize(v)}}j(ModuleParseError,"webpack/lib/ModuleParseError");v.exports=ModuleParseError},4833:function(v){"use strict";class ModuleProfile{constructor(){this.startTime=Date.now();this.factoryStartTime=0;this.factoryEndTime=0;this.factory=0;this.factoryParallelismFactor=0;this.restoringStartTime=0;this.restoringEndTime=0;this.restoring=0;this.restoringParallelismFactor=0;this.integrationStartTime=0;this.integrationEndTime=0;this.integration=0;this.integrationParallelismFactor=0;this.buildingStartTime=0;this.buildingEndTime=0;this.building=0;this.buildingParallelismFactor=0;this.storingStartTime=0;this.storingEndTime=0;this.storing=0;this.storingParallelismFactor=0;this.additionalFactoryTimes=undefined;this.additionalFactories=0;this.additionalFactoriesParallelismFactor=0;this.additionalIntegration=0}markFactoryStart(){this.factoryStartTime=Date.now()}markFactoryEnd(){this.factoryEndTime=Date.now();this.factory=this.factoryEndTime-this.factoryStartTime}markRestoringStart(){this.restoringStartTime=Date.now()}markRestoringEnd(){this.restoringEndTime=Date.now();this.restoring=this.restoringEndTime-this.restoringStartTime}markIntegrationStart(){this.integrationStartTime=Date.now()}markIntegrationEnd(){this.integrationEndTime=Date.now();this.integration=this.integrationEndTime-this.integrationStartTime}markBuildingStart(){this.buildingStartTime=Date.now()}markBuildingEnd(){this.buildingEndTime=Date.now();this.building=this.buildingEndTime-this.buildingStartTime}markStoringStart(){this.storingStartTime=Date.now()}markStoringEnd(){this.storingEndTime=Date.now();this.storing=this.storingEndTime-this.storingStartTime}mergeInto(v){v.additionalFactories=this.factory;(v.additionalFactoryTimes=v.additionalFactoryTimes||[]).push({start:this.factoryStartTime,end:this.factoryEndTime})}}v.exports=ModuleProfile},14273:function(v,E,R){"use strict";const $=R(27154);class ModuleRestoreError extends ${constructor(v,E){let R="Module restore failed: ";let $=undefined;if(E!==null&&typeof E==="object"){if(typeof E.stack==="string"&&E.stack){const v=E.stack;R+=v}else if(typeof E.message==="string"&&E.message){R+=E.message}else{R+=E}}else{R+=String(E)}super(R);this.name="ModuleRestoreError";this.details=$;this.module=v;this.error=E}}v.exports=ModuleRestoreError},73731:function(v,E,R){"use strict";const $=R(27154);class ModuleStoreError extends ${constructor(v,E){let R="Module storing failed: ";let $=undefined;if(E!==null&&typeof E==="object"){if(typeof E.stack==="string"&&E.stack){const v=E.stack;R+=v}else if(typeof E.message==="string"&&E.message){R+=E.message}else{R+=E}}else{R+=String(E)}super(R);this.name="ModuleStoreError";this.details=$;this.module=v;this.error=E}}v.exports=ModuleStoreError},88367:function(v,E,R){"use strict";const $=R(73837);const j=R(61374);const N=j((()=>R(36109)));class ModuleTemplate{constructor(v,E){this._runtimeTemplate=v;this.type="javascript";this.hooks=Object.freeze({content:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderModuleContent.tap(v,((v,E,$)=>R(v,E,$,$.dependencyTemplates)))}),"ModuleTemplate.hooks.content is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)","DEP_MODULE_TEMPLATE_CONTENT")},module:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderModuleContent.tap(v,((v,E,$)=>R(v,E,$,$.dependencyTemplates)))}),"ModuleTemplate.hooks.module is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)","DEP_MODULE_TEMPLATE_MODULE")},render:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderModuleContainer.tap(v,((v,E,$)=>R(v,E,$,$.dependencyTemplates)))}),"ModuleTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer instead)","DEP_MODULE_TEMPLATE_RENDER")},package:{tap:$.deprecate(((v,R)=>{N().getCompilationHooks(E).renderModulePackage.tap(v,((v,E,$)=>R(v,E,$,$.dependencyTemplates)))}),"ModuleTemplate.hooks.package is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModulePackage instead)","DEP_MODULE_TEMPLATE_PACKAGE")},hash:{tap:$.deprecate(((v,R)=>{E.hooks.fullHash.tap(v,R)}),"ModuleTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)","DEP_MODULE_TEMPLATE_HASH")}})}}Object.defineProperty(ModuleTemplate.prototype,"runtimeTemplate",{get:$.deprecate((function(){return this._runtimeTemplate}),"ModuleTemplate.runtimeTemplate is deprecated (use Compilation.runtimeTemplate instead)","DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS")});v.exports=ModuleTemplate},49537:function(v,E,R){"use strict";const{cleanUp:$}=R(8821);const j=R(27154);const N=R(65764);class ModuleWarning extends j{constructor(v,{from:E=null}={}){let R="Module Warning";if(E){R+=` (from ${E}):\n`}else{R+=": "}if(v&&typeof v==="object"&&v.message){R+=v.message}else if(v){R+=String(v)}super(R);this.name="ModuleWarning";this.warning=v;this.details=v&&typeof v==="object"&&v.stack?$(v.stack,this.message):undefined}serialize(v){const{write:E}=v;E(this.warning);super.serialize(v)}deserialize(v){const{read:E}=v;this.warning=E();super.deserialize(v)}}N(ModuleWarning,"webpack/lib/ModuleWarning");v.exports=ModuleWarning},39601:function(v,E,R){"use strict";const $=R(78175);const{SyncHook:j,MultiHook:N}=R(44217);const q=R(56275);const G=R(15716);const ie=R(25995);const ae=R(52074);v.exports=class MultiCompiler{constructor(v,E){if(!Array.isArray(v)){v=Object.keys(v).map((E=>{v[E].name=E;return v[E]}))}this.hooks=Object.freeze({done:new j(["stats"]),invalid:new N(v.map((v=>v.hooks.invalid))),run:new N(v.map((v=>v.hooks.run))),watchClose:new j([]),watchRun:new N(v.map((v=>v.hooks.watchRun))),infrastructureLog:new N(v.map((v=>v.hooks.infrastructureLog)))});this.compilers=v;this._options={parallelism:E.parallelism||Infinity};this.dependencies=new WeakMap;this.running=false;const R=this.compilers.map((()=>null));let $=0;for(let v=0;v{if(!N){N=true;$++}R[j]=v;if($===this.compilers.length){this.hooks.done.call(new G(R))}}));E.hooks.invalid.tap("MultiCompiler",(()=>{if(N){N=false;$--}}))}}get options(){return Object.assign(this.compilers.map((v=>v.options)),this._options)}get outputPath(){let v=this.compilers[0].outputPath;for(const E of this.compilers){while(E.outputPath.indexOf(v)!==0&&/[/\\]/.test(v)){v=v.replace(/[/\\][^/\\]*$/,"")}}if(!v&&this.compilers[0].outputPath[0]==="/")return"/";return v}get inputFileSystem(){throw new Error("Cannot read inputFileSystem of a MultiCompiler")}get outputFileSystem(){throw new Error("Cannot read outputFileSystem of a MultiCompiler")}get watchFileSystem(){throw new Error("Cannot read watchFileSystem of a MultiCompiler")}get intermediateFileSystem(){throw new Error("Cannot read outputFileSystem of a MultiCompiler")}set inputFileSystem(v){for(const E of this.compilers){E.inputFileSystem=v}}set outputFileSystem(v){for(const E of this.compilers){E.outputFileSystem=v}}set watchFileSystem(v){for(const E of this.compilers){E.watchFileSystem=v}}set intermediateFileSystem(v){for(const E of this.compilers){E.intermediateFileSystem=v}}getInfrastructureLogger(v){return this.compilers[0].getInfrastructureLogger(v)}setDependencies(v,E){this.dependencies.set(v,E)}validateDependencies(v){const E=new Set;const R=[];const targetFound=v=>{for(const R of E){if(R.target===v){return true}}return false};const sortEdges=(v,E)=>v.source.name.localeCompare(E.source.name)||v.target.name.localeCompare(E.target.name);for(const v of this.compilers){const $=this.dependencies.get(v);if($){for(const j of $){const $=this.compilers.find((v=>v.name===j));if(!$){R.push(j)}else{E.add({source:v,target:$})}}}}const $=R.map((v=>`Compiler dependency \`${v}\` not found.`));const j=this.compilers.filter((v=>!targetFound(v)));while(j.length>0){const v=j.pop();for(const R of E){if(R.source===v){E.delete(R);const v=R.target;if(!targetFound(v)){j.push(v)}}}}if(E.size>0){const v=Array.from(E).sort(sortEdges).map((v=>`${v.source.name} -> ${v.target.name}`));v.unshift("Circular dependency found in compiler dependencies.");$.unshift(v.join("\n"))}if($.length>0){const E=$.join("\n");v(new Error(E));return false}return true}runWithDependencies(v,E,R){const j=new Set;let N=v;const isDependencyFulfilled=v=>j.has(v);const getReadyCompilers=()=>{let v=[];let E=N;N=[];for(const R of E){const E=this.dependencies.get(R);const $=!E||E.every(isDependencyFulfilled);if($){v.push(R)}else{N.push(R)}}return v};const runCompilers=v=>{if(N.length===0)return v();$.map(getReadyCompilers(),((v,R)=>{E(v,(E=>{if(E)return R(E);j.add(v.name);runCompilers(R)}))}),v)};runCompilers(R)}_runGraph(v,E,R){const j=this.compilers.map((v=>({compiler:v,setupResult:undefined,result:undefined,state:"blocked",children:[],parents:[]})));const N=new Map;for(const v of j)N.set(v.compiler.name,v);for(const v of j){const E=this.dependencies.get(v.compiler);if(!E)continue;for(const R of E){const E=N.get(R);v.parents.push(E);E.children.push(v)}}const q=new ae;for(const v of j){if(v.parents.length===0){v.state="queued";q.enqueue(v)}}let ie=false;let ce=0;const le=this._options.parallelism;const nodeDone=(v,E,N)=>{if(ie)return;if(E){ie=true;return $.each(j,((v,E)=>{if(v.compiler.watching){v.compiler.watching.close(E)}else{E()}}),(()=>R(E)))}v.result=N;ce--;if(v.state==="running"){v.state="done";for(const E of v.children){if(E.state==="blocked")q.enqueue(E)}}else if(v.state==="running-outdated"){v.state="blocked";q.enqueue(v)}processQueue()};const nodeInvalidFromParent=v=>{if(v.state==="done"){v.state="blocked"}else if(v.state==="running"){v.state="running-outdated"}for(const E of v.children){nodeInvalidFromParent(E)}};const nodeInvalid=v=>{if(v.state==="done"){v.state="pending"}else if(v.state==="running"){v.state="running-outdated"}for(const E of v.children){nodeInvalidFromParent(E)}};const nodeChange=v=>{nodeInvalid(v);if(v.state==="pending"){v.state="blocked"}if(v.state==="blocked"){q.enqueue(v);processQueue()}};const me=[];j.forEach(((E,R)=>{me.push(E.setupResult=v(E.compiler,R,nodeDone.bind(null,E),(()=>E.state!=="starting"&&E.state!=="running"),(()=>nodeChange(E)),(()=>nodeInvalid(E))))}));let _e=true;const processQueue=()=>{if(_e)return;_e=true;process.nextTick(processQueueWorker)};const processQueueWorker=()=>{while(ce0&&!ie){const v=q.dequeue();if(v.state==="queued"||v.state==="blocked"&&v.parents.every((v=>v.state==="done"))){ce++;v.state="starting";E(v.compiler,v.setupResult,nodeDone.bind(null,v));v.state="running"}}_e=false;if(!ie&&ce===0&&j.every((v=>v.state==="done"))){const v=[];for(const E of j){const R=E.result;if(R){E.result=undefined;v.push(R)}}if(v.length>0){R(null,new G(v))}}};processQueueWorker();return me}watch(v,E){if(this.running){return E(new q)}this.running=true;if(this.validateDependencies(E)){const R=this._runGraph(((E,R,$,j,N,q)=>{const G=E.watch(Array.isArray(v)?v[R]:v,$);if(G){G._onInvalid=q;G._onChange=N;G._isBlocked=j}return G}),((v,E,R)=>{if(v.watching!==E)return;if(!E.running)E.invalidate()}),E);return new ie(R,this)}return new ie([],this)}run(v){if(this.running){return v(new q)}this.running=true;if(this.validateDependencies(v)){this._runGraph((()=>{}),((v,E,R)=>v.run(R)),((E,R)=>{this.running=false;if(v!==undefined){return v(E,R)}}))}}purgeInputFileSystem(){for(const v of this.compilers){if(v.inputFileSystem&&v.inputFileSystem.purge){v.inputFileSystem.purge()}}}close(v){$.each(this.compilers,((v,E)=>{v.close(E)}),v)}}},15716:function(v,E,R){"use strict";const $=R(20162);const indent=(v,E)=>{const R=v.replace(/\n([^\n])/g,"\n"+E+"$1");return E+R};class MultiStats{constructor(v){this.stats=v}get hash(){return this.stats.map((v=>v.hash)).join("")}hasErrors(){return this.stats.some((v=>v.hasErrors()))}hasWarnings(){return this.stats.some((v=>v.hasWarnings()))}_createChildOptions(v,E){if(!v){v={}}const{children:R=undefined,...$}=typeof v==="string"?{preset:v}:v;const j=this.stats.map(((v,j)=>{const N=Array.isArray(R)?R[j]:R;return v.compilation.createStatsOptions({...$,...typeof N==="string"?{preset:N}:N&&typeof N==="object"?N:undefined},E)}));return{version:j.every((v=>v.version)),hash:j.every((v=>v.hash)),errorsCount:j.every((v=>v.errorsCount)),warningsCount:j.every((v=>v.warningsCount)),errors:j.every((v=>v.errors)),warnings:j.every((v=>v.warnings)),children:j}}toJson(v){v=this._createChildOptions(v,{forToString:false});const E={};E.children=this.stats.map(((E,R)=>{const j=E.toJson(v.children[R]);const N=E.compilation.name;const q=N&&$.makePathsRelative(v.context,N,E.compilation.compiler.root);j.name=q;return j}));if(v.version){E.version=E.children[0].version}if(v.hash){E.hash=E.children.map((v=>v.hash)).join("")}const mapError=(v,E)=>({...E,compilerPath:E.compilerPath?`${v.name}.${E.compilerPath}`:v.name});if(v.errors){E.errors=[];for(const v of E.children){for(const R of v.errors){E.errors.push(mapError(v,R))}}}if(v.warnings){E.warnings=[];for(const v of E.children){for(const R of v.warnings){E.warnings.push(mapError(v,R))}}}if(v.errorsCount){E.errorsCount=0;for(const v of E.children){E.errorsCount+=v.errorsCount}}if(v.warningsCount){E.warningsCount=0;for(const v of E.children){E.warningsCount+=v.warningsCount}}return E}toString(v){v=this._createChildOptions(v,{forToString:true});const E=this.stats.map(((E,R)=>{const j=E.toString(v.children[R]);const N=E.compilation.name;const q=N&&$.makePathsRelative(v.context,N,E.compilation.compiler.root).replace(/\|/g," ");if(!j)return j;return q?`${q}:\n${indent(j," ")}`:j}));return E.filter(Boolean).join("\n\n")}}v.exports=MultiStats},25995:function(v,E,R){"use strict";const $=R(78175);class MultiWatching{constructor(v,E){this.watchings=v;this.compiler=E}invalidate(v){if(v){$.each(this.watchings,((v,E)=>v.invalidate(E)),v)}else{for(const v of this.watchings){v.invalidate()}}}suspend(){for(const v of this.watchings){v.suspend()}}resume(){for(const v of this.watchings){v.resume()}}close(v){$.forEach(this.watchings,((v,E)=>{v.close(E)}),(E=>{this.compiler.hooks.watchClose.call();if(typeof v==="function"){this.compiler.running=false;v(E)}}))}}v.exports=MultiWatching},424:function(v){"use strict";class NoEmitOnErrorsPlugin{apply(v){v.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin",(v=>{if(v.getStats().hasErrors())return false}));v.hooks.compilation.tap("NoEmitOnErrorsPlugin",(v=>{v.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin",(()=>{if(v.getStats().hasErrors())return false}))}))}}v.exports=NoEmitOnErrorsPlugin},95656:function(v,E,R){"use strict";const $=R(27154);v.exports=class NoModeWarning extends ${constructor(){super();this.name="NoModeWarning";this.message="configuration\n"+"The 'mode' option has not been set, webpack will fallback to 'production' for this value.\n"+"Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n"+"You can also set it to 'none' to disable any default behavior. "+"Learn more: https://webpack.js.org/configuration/mode/"}}},75199:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class NodeStuffInWebError extends ${constructor(v,E,R){super(`${JSON.stringify(E)} has been used, it will be undefined in next major version.\n${R}`);this.name="NodeStuffInWebError";this.loc=v}}j(NodeStuffInWebError,"webpack/lib/NodeStuffInWebError");v.exports=NodeStuffInWebError},17336:function(v,E,R){"use strict";const $=R(75199);const j=R(39201);const N=R(83106);const q=R(14367);const{evaluateToString:G,expressionIsUnsupported:ie}=R(97574);const{relative:ae}=R(47077);const{parseResource:ce}=R(20162);class NodeStuffPlugin{constructor(v){this.options=v}apply(v){const E=this.options;v.hooks.compilation.tap("NodeStuffPlugin",((R,{normalModuleFactory:le})=>{const handler=(R,le)=>{if(le.node===false)return;let me=E;if(le.node){me={...me,...le.node}}if(me.global!==false){const v=me.global==="warn";R.hooks.expression.for("global").tap("NodeStuffPlugin",(E=>{const N=new q(j.global,E.range,[j.global]);N.loc=E.loc;R.state.module.addPresentationalDependency(N);if(v){R.state.module.addWarning(new $(N.loc,"global","The global namespace object is a Node.js feature and isn't available in browsers."))}}));R.hooks.rename.for("global").tap("NodeStuffPlugin",(v=>{const E=new q(j.global,v.range,[j.global]);E.loc=v.loc;R.state.module.addPresentationalDependency(E);return false}))}const setModuleConstant=(v,E,j)=>{R.hooks.expression.for(v).tap("NodeStuffPlugin",(q=>{const G=new N(JSON.stringify(E(R.state.module)),q.range,v);G.loc=q.loc;R.state.module.addPresentationalDependency(G);if(j){R.state.module.addWarning(new $(G.loc,v,j))}return true}))};const setConstant=(v,E,R)=>setModuleConstant(v,(()=>E),R);const _e=v.context;if(me.__filename){switch(me.__filename){case"mock":setConstant("__filename","/index.js");break;case"warn-mock":setConstant("__filename","/index.js","__filename is a Node.js feature and isn't available in browsers.");break;case true:setModuleConstant("__filename",(E=>ae(v.inputFileSystem,_e,E.resource)));break}R.hooks.evaluateIdentifier.for("__filename").tap("NodeStuffPlugin",(v=>{if(!R.state.module)return;const E=ce(R.state.module.resource);return G(E.path)(v)}))}if(me.__dirname){switch(me.__dirname){case"mock":setConstant("__dirname","/");break;case"warn-mock":setConstant("__dirname","/","__dirname is a Node.js feature and isn't available in browsers.");break;case true:setModuleConstant("__dirname",(E=>ae(v.inputFileSystem,_e,E.context)));break}R.hooks.evaluateIdentifier.for("__dirname").tap("NodeStuffPlugin",(v=>{if(!R.state.module)return;return G(R.state.module.context)(v)}))}R.hooks.expression.for("require.extensions").tap("NodeStuffPlugin",ie(R,"require.extensions is not supported by webpack. Use a loader instead."))};le.hooks.parser.for("javascript/auto").tap("NodeStuffPlugin",handler);le.hooks.parser.for("javascript/dynamic").tap("NodeStuffPlugin",handler)}))}}v.exports=NodeStuffPlugin},89417:function(v,E,R){"use strict";const $=R(85685);const{getContext:j,runLoaders:N}=R(91256);const q=R(63477);const{HookMap:G,SyncHook:ie,AsyncSeriesBailHook:ae}=R(44217);const{CachedSource:ce,OriginalSource:le,RawSource:me,SourceMapSource:_e}=R(51255);const Ie=R(73002);const Me=R(35230);const Oe=R(53840);const Te=R(12530);const Ne=R(74938);const Be=R(82921);const Le=R(30417);const qe=R(49537);const Ue=R(39201);const Ge=R(69898);const He=R(27154);const We=R(24014);const Qe=R(96522);const{isSubset:Je}=R(73268);const{getScheme:Ve}=R(99716);const{compareLocations:Ke,concatComparators:Xe,compareSelect:Ye,keepOriginalOrder:Ze}=R(58792);const et=R(85205);const{createFakeHook:tt}=R(99321);const{join:nt}=R(47077);const{contextify:st,absolutify:rt,makePathsRelative:ot}=R(20162);const it=R(65764);const at=R(61374);const ct=at((()=>R(7787)));const lt=at((()=>R(38476).validate));const ut=/^([a-zA-Z]:\\|\\\\|\/)/;const contextifySourceUrl=(v,E,R)=>{if(E.startsWith("webpack://"))return E;return`webpack://${ot(v,E,R)}`};const contextifySourceMap=(v,E,R)=>{if(!Array.isArray(E.sources))return E;const{sourceRoot:$}=E;const j=!$?v=>v:$.endsWith("/")?v=>v.startsWith("/")?`${$.slice(0,-1)}${v}`:`${$}${v}`:v=>v.startsWith("/")?`${$}${v}`:`${$}/${v}`;const N=E.sources.map((E=>contextifySourceUrl(v,j(E),R)));return{...E,file:"x",sourceRoot:undefined,sources:N}};const asString=v=>{if(Buffer.isBuffer(v)){return v.toString("utf-8")}return v};const asBuffer=v=>{if(!Buffer.isBuffer(v)){return Buffer.from(v,"utf-8")}return v};class NonErrorEmittedError extends He{constructor(v){super();this.name="NonErrorEmittedError";this.message="(Emitted value instead of an instance of Error) "+v}}it(NonErrorEmittedError,"webpack/lib/NormalModule","NonErrorEmittedError");const pt=new WeakMap;class NormalModule extends Oe{static getCompilationHooks(v){if(!(v instanceof Ie)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=pt.get(v);if(E===undefined){E={loader:new ie(["loaderContext","module"]),beforeLoaders:new ie(["loaders","module","loaderContext"]),beforeParse:new ie(["module"]),beforeSnapshot:new ie(["module"]),readResourceForScheme:new G((v=>{const R=E.readResource.for(v);return tt({tap:(v,E)=>R.tap(v,(v=>E(v.resource,v._module))),tapAsync:(v,E)=>R.tapAsync(v,((v,R)=>E(v.resource,v._module,R))),tapPromise:(v,E)=>R.tapPromise(v,(v=>E(v.resource,v._module)))})})),readResource:new G((()=>new ae(["loaderContext"]))),needBuild:new ae(["module","context"])};pt.set(v,E)}return E}constructor({layer:v,type:E,request:R,userRequest:$,rawRequest:N,loaders:q,resource:G,resourceResolveData:ie,context:ae,matchResource:ce,parser:le,parserOptions:me,generator:_e,generatorOptions:Ie,resolveOptions:Me}){super(E,ae||j(G),v);this.request=R;this.userRequest=$;this.rawRequest=N;this.binary=/^(asset|webassembly)\b/.test(E);this.parser=le;this.parserOptions=me;this.generator=_e;this.generatorOptions=Ie;this.resource=G;this.resourceResolveData=ie;this.matchResource=ce;this.loaders=q;if(Me!==undefined){this.resolveOptions=Me}this.error=null;this._source=null;this._sourceSizes=undefined;this._sourceTypes=undefined;this._lastSuccessfulBuildMeta={};this._forceBuild=true;this._isEvaluatingSideEffects=false;this._addedSideEffectsBailout=undefined}identifier(){if(this.layer===null){if(this.type==="javascript/auto"){return this.request}else{return`${this.type}|${this.request}`}}else{return`${this.type}|${this.request}|${this.layer}`}}readableIdentifier(v){return v.shorten(this.userRequest)}libIdent(v){let E=st(v.context,this.userRequest,v.associatedObjectForCache);if(this.layer)E=`(${this.layer})/${E}`;return E}nameForCondition(){const v=this.matchResource||this.resource;const E=v.indexOf("?");if(E>=0)return v.slice(0,E);return v}updateCacheModule(v){super.updateCacheModule(v);const E=v;this.binary=E.binary;this.request=E.request;this.userRequest=E.userRequest;this.rawRequest=E.rawRequest;this.parser=E.parser;this.parserOptions=E.parserOptions;this.generator=E.generator;this.generatorOptions=E.generatorOptions;this.resource=E.resource;this.resourceResolveData=E.resourceResolveData;this.context=E.context;this.matchResource=E.matchResource;this.loaders=E.loaders}cleanupForCache(){if(this.buildInfo){if(this._sourceTypes===undefined)this.getSourceTypes();for(const v of this._sourceTypes){this.size(v)}}super.cleanupForCache();this.parser=undefined;this.parserOptions=undefined;this.generator=undefined;this.generatorOptions=undefined}getUnsafeCacheData(){const v=super.getUnsafeCacheData();v.parserOptions=this.parserOptions;v.generatorOptions=this.generatorOptions;return v}restoreFromUnsafeCache(v,E){this._restoreFromUnsafeCache(v,E)}_restoreFromUnsafeCache(v,E){super._restoreFromUnsafeCache(v,E);this.parserOptions=v.parserOptions;this.parser=E.getParser(this.type,this.parserOptions);this.generatorOptions=v.generatorOptions;this.generator=E.getGenerator(this.type,this.generatorOptions)}createSourceForAsset(v,E,R,$,j){if($){if(typeof $==="string"&&(this.useSourceMap||this.useSimpleSourceMap)){return new le(R,contextifySourceUrl(v,$,j))}if(this.useSourceMap){return new _e(R,E,contextifySourceMap(v,$,j))}}return new me(R)}_createLoaderContext(v,E,R,j,N){const{requestShortener:G}=R.runtimeTemplate;const getCurrentLoaderName=()=>{const v=this.getCurrentLoader(_e);if(!v)return"(not in loader scope)";return G.shorten(v.loader)};const getResolveContext=()=>({fileDependencies:{add:v=>_e.addDependency(v)},contextDependencies:{add:v=>_e.addContextDependency(v)},missingDependencies:{add:v=>_e.addMissingDependency(v)}});const ie=at((()=>rt.bindCache(R.compiler.root)));const ae=at((()=>rt.bindContextCache(this.context,R.compiler.root)));const ce=at((()=>st.bindCache(R.compiler.root)));const le=at((()=>st.bindContextCache(this.context,R.compiler.root)));const me={absolutify:(v,E)=>v===this.context?ae()(E):ie()(v,E),contextify:(v,E)=>v===this.context?le()(E):ce()(v,E),createHash:v=>et(v||R.outputOptions.hashFunction)};const _e={version:2,getOptions:v=>{const E=this.getCurrentLoader(_e);let{options:R}=E;if(typeof R==="string"){if(R.startsWith("{")&&R.endsWith("}")){try{R=$(R)}catch(v){throw new Error(`Cannot parse string options: ${v.message}`)}}else{R=q.parse(R,"&","=",{maxKeys:0})}}if(R===null||R===undefined){R={}}if(v){let E="Loader";let $="options";let j;if(v.title&&(j=/^(.+) (.+)$/.exec(v.title))){[,E,$]=j}lt()(v,R,{name:E,baseDataPath:$})}return R},emitWarning:v=>{if(!(v instanceof Error)){v=new NonErrorEmittedError(v)}this.addWarning(new qe(v,{from:getCurrentLoaderName()}))},emitError:v=>{if(!(v instanceof Error)){v=new NonErrorEmittedError(v)}this.addError(new Ne(v,{from:getCurrentLoaderName()}))},getLogger:v=>{const E=this.getCurrentLoader(_e);return R.getLogger((()=>[E&&E.loader,v,this.identifier()].filter(Boolean).join("|")))},resolve(E,R,$){v.resolve({},E,R,getResolveContext(),$)},getResolve(E){const R=E?v.withOptions(E):v;return(v,E,$)=>{if($){R.resolve({},v,E,getResolveContext(),$)}else{return new Promise((($,j)=>{R.resolve({},v,E,getResolveContext(),((v,E)=>{if(v)j(v);else $(E)}))}))}}},emitFile:(v,$,j,N)=>{if(!this.buildInfo.assets){this.buildInfo.assets=Object.create(null);this.buildInfo.assetsInfo=new Map}this.buildInfo.assets[v]=this.createSourceForAsset(E.context,v,$,j,R.compiler.root);this.buildInfo.assetsInfo.set(v,N)},addBuildDependency:v=>{if(this.buildInfo.buildDependencies===undefined){this.buildInfo.buildDependencies=new Qe}this.buildInfo.buildDependencies.add(v)},utils:me,rootContext:E.context,webpack:true,sourceMap:!!this.useSourceMap,mode:E.mode||"production",_module:this,_compilation:R,_compiler:R.compiler,fs:j};Object.assign(_e,E.loader);N.loader.call(_e,this);return _e}getCurrentLoader(v,E=v.loaderIndex){if(this.loaders&&this.loaders.length&&E=0&&this.loaders[E]){return this.loaders[E]}return null}createSource(v,E,R,$){if(Buffer.isBuffer(E)){return new me(E)}if(!this.identifier){return new me(E)}const j=this.identifier();if(this.useSourceMap&&R){return new _e(E,contextifySourceUrl(v,j,$),contextifySourceMap(v,R,$))}if(this.useSourceMap||this.useSimpleSourceMap){return new le(E,contextifySourceUrl(v,j,$))}return new me(E)}_doBuild(v,E,R,$,j,q){const G=this._createLoaderContext(R,v,E,$,j);const processResult=(R,$)=>{if(R){if(!(R instanceof Error)){R=new NonErrorEmittedError(R)}const v=this.getCurrentLoader(G);const $=new Te(R,{from:v&&E.runtimeTemplate.requestShortener.shorten(v.loader)});return q($)}const j=$[0];const N=$.length>=1?$[1]:null;const ie=$.length>=2?$[2]:null;if(!Buffer.isBuffer(j)&&typeof j!=="string"){const v=this.getCurrentLoader(G,0);const R=new Error(`Final loader (${v?E.runtimeTemplate.requestShortener.shorten(v.loader):"unknown"}) didn't return a Buffer or String`);const $=new Te(R);return q($)}this._source=this.createSource(v.context,this.binary?asBuffer(j):asString(j),N,E.compiler.root);if(this._sourceSizes!==undefined)this._sourceSizes.clear();this._ast=typeof ie==="object"&&ie!==null&&ie.webpackAST!==undefined?ie.webpackAST:null;return q()};this.buildInfo.fileDependencies=new Qe;this.buildInfo.contextDependencies=new Qe;this.buildInfo.missingDependencies=new Qe;this.buildInfo.cacheable=true;try{j.beforeLoaders.call(this.loaders,this,G)}catch(v){processResult(v);return}if(this.loaders.length>0){this.buildInfo.buildDependencies=new Qe}N({resource:this.resource,loaders:this.loaders,context:G,processResource:(v,E,R)=>{const $=v.resource;const N=Ve($);j.readResource.for(N).callAsync(v,((v,E)=>{if(v)return R(v);if(typeof E!=="string"&&!E){return R(new Ge(N,$))}return R(null,E)}))}},((v,E)=>{G._compilation=G._compiler=G._module=G.fs=undefined;if(!E){this.buildInfo.cacheable=false;return processResult(v||new Error("No result from loader-runner processing"),null)}this.buildInfo.fileDependencies.addAll(E.fileDependencies);this.buildInfo.contextDependencies.addAll(E.contextDependencies);this.buildInfo.missingDependencies.addAll(E.missingDependencies);for(const v of this.loaders){this.buildInfo.buildDependencies.add(v.loader)}this.buildInfo.cacheable=this.buildInfo.cacheable&&E.cacheable;processResult(v,E.result)}))}markModuleAsErrored(v){this.buildMeta={...this._lastSuccessfulBuildMeta};this.error=v;this.addError(v)}applyNoParseRule(v,E){if(typeof v==="string"){return E.startsWith(v)}if(typeof v==="function"){return v(E)}return v.test(E)}shouldPreventParsing(v,E){if(!v){return false}if(!Array.isArray(v)){return this.applyNoParseRule(v,E)}for(let R=0;R{if(R){this.markModuleAsErrored(R);this._initBuildHash(E);return j()}const handleParseError=R=>{const $=this._source.source();const N=this.loaders.map((R=>st(v.context,R.loader,E.compiler.root)));const q=new Le($,R,N,this.type);this.markModuleAsErrored(q);this._initBuildHash(E);return j()};const handleParseResult=v=>{this.dependencies.sort(Xe(Ye((v=>v.loc),Ke),Ze(this.dependencies)));this._initBuildHash(E);this._lastSuccessfulBuildMeta=this.buildMeta;return handleBuildDone()};const handleBuildDone=()=>{try{q.beforeSnapshot.call(this)}catch(v){this.markModuleAsErrored(v);return j()}const v=E.options.snapshot.module;if(!this.buildInfo.cacheable||!v){return j()}let R=undefined;const checkDependencies=v=>{for(const $ of v){if(!ut.test($)){if(R===undefined)R=new Set;R.add($);v.delete($);try{const R=$.replace(/[\\/]?\*.*$/,"");const j=nt(E.fileSystemInfo.fs,this.context,R);if(j!==$&&ut.test(j)){(R!==$?this.buildInfo.contextDependencies:v).add(j)}}catch(v){}}}};checkDependencies(this.buildInfo.fileDependencies);checkDependencies(this.buildInfo.missingDependencies);checkDependencies(this.buildInfo.contextDependencies);if(R!==undefined){const v=ct();this.addWarning(new v(this,R))}E.fileSystemInfo.createSnapshot(N,this.buildInfo.fileDependencies,this.buildInfo.contextDependencies,this.buildInfo.missingDependencies,v,((v,E)=>{if(v){this.markModuleAsErrored(v);return}this.buildInfo.fileDependencies=undefined;this.buildInfo.contextDependencies=undefined;this.buildInfo.missingDependencies=undefined;this.buildInfo.snapshot=E;return j()}))};try{q.beforeParse.call(this)}catch(R){this.markModuleAsErrored(R);this._initBuildHash(E);return j()}const $=v.module&&v.module.noParse;if(this.shouldPreventParsing($,this.request)){this.buildInfo.parsed=false;this._initBuildHash(E);return handleBuildDone()}let G;try{const R=this._source.source();G=this.parser.parse(this._ast||R,{source:R,current:this,module:this,compilation:E,options:v})}catch(v){handleParseError(v);return}handleParseResult(G)}))}getConcatenationBailoutReason(v){return this.generator.getConcatenationBailoutReason(this,v)}getSideEffectsConnectionState(v){if(this.factoryMeta!==undefined){if(this.factoryMeta.sideEffectFree)return false;if(this.factoryMeta.sideEffectFree===false)return true}if(this.buildMeta!==undefined&&this.buildMeta.sideEffectFree){if(this._isEvaluatingSideEffects)return Be.CIRCULAR_CONNECTION;this._isEvaluatingSideEffects=true;let E=false;for(const R of this.dependencies){const $=R.getModuleEvaluationSideEffectsState(v);if($===true){if(this._addedSideEffectsBailout===undefined?(this._addedSideEffectsBailout=new WeakSet,true):!this._addedSideEffectsBailout.has(v)){this._addedSideEffectsBailout.add(v);v.getOptimizationBailout(this).push((()=>`Dependency (${R.type}) with side effects at ${We(R.loc)}`))}this._isEvaluatingSideEffects=false;return true}else if($!==Be.CIRCULAR_CONNECTION){E=Be.addConnectionStates(E,$)}}this._isEvaluatingSideEffects=false;return E}else{return true}}getSourceTypes(){if(this._sourceTypes===undefined){this._sourceTypes=this.generator.getTypes(this)}return this._sourceTypes}codeGeneration({dependencyTemplates:v,runtimeTemplate:E,moduleGraph:R,chunkGraph:$,runtime:j,concatenationScope:N,codeGenerationResults:q,sourceTypes:G}){const ie=new Set;if(!this.buildInfo.parsed){ie.add(Ue.module);ie.add(Ue.exports);ie.add(Ue.thisAsExports)}let ae;const getData=()=>{if(ae===undefined)ae=new Map;return ae};const le=new Map;for(const ae of G||$.getModuleSourceTypes(this)){const G=this.error?new me("throw new Error("+JSON.stringify(this.error.message)+");"):this.generator.generate(this,{dependencyTemplates:v,runtimeTemplate:E,moduleGraph:R,chunkGraph:$,runtimeRequirements:ie,runtime:j,concatenationScope:N,codeGenerationResults:q,getData:getData,type:ae});if(G){le.set(ae,new ce(G))}}const _e={sources:le,runtimeRequirements:ie,data:ae};return _e}originalSource(){return this._source}invalidateBuild(){this._forceBuild=true}needBuild(v,E){const{fileSystemInfo:R,compilation:$,valueCacheVersions:j}=v;if(this._forceBuild)return E(null,true);if(this.error)return E(null,true);if(!this.buildInfo.cacheable)return E(null,true);if(!this.buildInfo.snapshot)return E(null,true);const N=this.buildInfo.valueDependencies;if(N){if(!j)return E(null,true);for(const[v,R]of N){if(R===undefined)return E(null,true);const $=j.get(v);if(R!==$&&(typeof R==="string"||typeof $==="string"||$===undefined||!Je(R,$))){return E(null,true)}}}R.checkSnapshotValid(this.buildInfo.snapshot,((R,j)=>{if(R)return E(R);if(!j)return E(null,true);const N=NormalModule.getCompilationHooks($);N.needBuild.callAsync(this,v,((v,R)=>{if(v){return E(Me.makeWebpackError(v,"NormalModule.getCompilationHooks().needBuild"))}E(null,!!R)}))}))}size(v){const E=this._sourceSizes===undefined?undefined:this._sourceSizes.get(v);if(E!==undefined){return E}const R=Math.max(1,this.generator.getSize(this,v));if(this._sourceSizes===undefined){this._sourceSizes=new Map}this._sourceSizes.set(v,R);return R}addCacheDependencies(v,E,R,$){const{snapshot:j,buildDependencies:N}=this.buildInfo;if(j){v.addAll(j.getFileIterable());E.addAll(j.getContextIterable());R.addAll(j.getMissingIterable())}else{const{fileDependencies:$,contextDependencies:j,missingDependencies:N}=this.buildInfo;if($!==undefined)v.addAll($);if(j!==undefined)E.addAll(j);if(N!==undefined)R.addAll(N)}if(N!==undefined){$.addAll(N)}}updateHash(v,E){v.update(this.buildInfo.hash);this.generator.updateHash(v,{module:this,...E});super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this._source);E(this.error);E(this._lastSuccessfulBuildMeta);E(this._forceBuild);super.serialize(v)}static deserialize(v){const E=new NormalModule({layer:null,type:"",resource:"",context:"",request:null,userRequest:null,rawRequest:null,loaders:null,matchResource:null,parser:null,parserOptions:null,generator:null,generatorOptions:null,resolveOptions:null});E.deserialize(v);return E}deserialize(v){const{read:E}=v;this._source=E();this.error=E();this._lastSuccessfulBuildMeta=E();this._forceBuild=E();super.deserialize(v)}}it(NormalModule,"webpack/lib/NormalModule");v.exports=NormalModule},26156:function(v,E,R){"use strict";const{getContext:$}=R(91256);const j=R(78175);const{AsyncSeriesBailHook:N,SyncWaterfallHook:q,SyncBailHook:G,SyncHook:ie,HookMap:ae}=R(44217);const ce=R(75449);const le=R(53840);const me=R(39744);const _e=R(13487);const Ie=R(89417);const Me=R(19110);const Oe=R(85732);const Te=R(75802);const Ne=R(53059);const Be=R(67859);const Le=R(96522);const{getScheme:qe}=R(99716);const{cachedCleverMerge:Ue,cachedSetProperty:Ge}=R(22093);const{join:He}=R(47077);const{parseResource:We,parseResourceWithoutFragment:Qe}=R(20162);const Je={};const Ve={};const Ke={};const Xe=[];const Ye=/^([^!]+)!=!/;const loaderToIdent=v=>{if(!v.options){return v.loader}if(typeof v.options==="string"){return v.loader+"?"+v.options}if(typeof v.options!=="object"){throw new Error("loader options must be string or object")}if(v.ident){return v.loader+"??"+v.ident}return v.loader+"?"+JSON.stringify(v.options)};const stringifyLoadersAndResource=(v,E)=>{let R="";for(const E of v){R+=loaderToIdent(E)+"!"}return R+E};const needCalls=(v,E)=>R=>{if(--v===0){return E(R)}if(R&&v>0){v=NaN;return E(R)}};const mergeGlobalOptions=(v,E,R)=>{const $=E.split("/");let j;let N="";for(const E of $){N=N?`${N}/${E}`:E;const R=v[N];if(typeof R==="object"){if(j===undefined){j=R}else{j=Ue(j,R)}}}if(j===undefined){return R}else{return Ue(j,R)}};const deprecationChangedHookMessage=(v,E)=>{const R=E.taps.map((v=>v.name)).join(", ");return`NormalModuleFactory.${v} (${R}) is no longer a waterfall hook, but a bailing hook instead. `+"Do not return the passed object, but modify it instead. "+"Returning false will ignore the request and results in no module created."};const Ze=new Ne([new Oe("test","resource"),new Oe("scheme"),new Oe("mimetype"),new Oe("dependency"),new Oe("include","resource"),new Oe("exclude","resource",true),new Oe("resource"),new Oe("resourceQuery"),new Oe("resourceFragment"),new Oe("realResource"),new Oe("issuer"),new Oe("compiler"),new Oe("issuerLayer"),new Te("assert","assertions"),new Te("descriptionData"),new Me("type"),new Me("sideEffects"),new Me("parser"),new Me("resolve"),new Me("generator"),new Me("layer"),new Be]);class NormalModuleFactory extends me{constructor({context:v,fs:E,resolverFactory:R,options:j,associatedObjectForCache:ce,layers:me=false}){super();this.hooks=Object.freeze({resolve:new N(["resolveData"]),resolveForScheme:new ae((()=>new N(["resourceData","resolveData"]))),resolveInScheme:new ae((()=>new N(["resourceData","resolveData"]))),factorize:new N(["resolveData"]),beforeResolve:new N(["resolveData"]),afterResolve:new N(["resolveData"]),createModule:new N(["createData","resolveData"]),module:new q(["module","createData","resolveData"]),createParser:new ae((()=>new G(["parserOptions"]))),parser:new ae((()=>new ie(["parser","parserOptions"]))),createGenerator:new ae((()=>new G(["generatorOptions"]))),generator:new ae((()=>new ie(["generator","generatorOptions"])))});this.resolverFactory=R;this.ruleSet=Ze.compile([{rules:j.defaultRules},{rules:j.rules}]);this.context=v||"";this.fs=E;this._globalParserOptions=j.parser;this._globalGeneratorOptions=j.generator;this.parserCache=new Map;this.generatorCache=new Map;this._restoredUnsafeCacheEntries=new Set;const _e=We.bindCache(ce);const Me=Qe.bindCache(ce);this._parseResourceWithoutFragment=Me;this.hooks.factorize.tapAsync({name:"NormalModuleFactory",stage:100},((v,E)=>{this.hooks.resolve.callAsync(v,((R,$)=>{if(R)return E(R);if($===false)return E();if($ instanceof le)return E(null,$);if(typeof $==="object")throw new Error(deprecationChangedHookMessage("resolve",this.hooks.resolve)+" Returning a Module object will result in this module used as result.");this.hooks.afterResolve.callAsync(v,((R,$)=>{if(R)return E(R);if(typeof $==="object")throw new Error(deprecationChangedHookMessage("afterResolve",this.hooks.afterResolve));if($===false)return E();const j=v.createData;this.hooks.createModule.callAsync(j,v,((R,$)=>{if(!$){if(!v.request){return E(new Error("Empty dependency (no request)"))}$=new Ie(j)}$=this.hooks.module.call($,j,v);return E(null,$)}))}))}))}));this.hooks.resolve.tapAsync({name:"NormalModuleFactory",stage:100},((v,E)=>{const{contextInfo:R,context:j,dependencies:N,dependencyType:q,request:G,assertions:ie,resolveOptions:ae,fileDependencies:ce,missingDependencies:le,contextDependencies:Ie}=v;const Oe=this.getResolver("loader");let Te=undefined;let Ne;let Be;let Le=false;let We=false;let Qe=false;const Ve=qe(j);let Ke=qe(G);if(!Ke){let v=G;const E=Ye.exec(G);if(E){let R=E[1];if(R.charCodeAt(0)===46){const v=R.charCodeAt(1);if(v===47||v===46&&R.charCodeAt(2)===47){R=He(this.fs,j,R)}}Te={resource:R,..._e(R)};v=G.slice(E[0].length)}Ke=qe(v);if(!Ke&&!Ve){const E=v.charCodeAt(0);const R=v.charCodeAt(1);Le=E===45&&R===33;We=Le||E===33;Qe=E===33&&R===33;const $=v.slice(Le||Qe?2:We?1:0).split(/!+/);Ne=$.pop();Be=$.map((v=>{const{path:E,query:R}=Me(v);return{loader:E,options:R?R.slice(1):undefined}}));Ke=qe(Ne)}else{Ne=v;Be=Xe}}else{Ne=G;Be=Xe}const Ze={fileDependencies:ce,missingDependencies:le,contextDependencies:Ie};let et;let tt;const nt=needCalls(2,(ae=>{if(ae)return E(ae);try{for(const v of tt){if(typeof v.options==="string"&&v.options[0]==="?"){const E=v.options.slice(1);if(E==="[[missing ident]]"){throw new Error("No ident is provided by referenced loader. "+"When using a function for Rule.use in config you need to "+"provide an 'ident' property for referenced loader options.")}v.options=this.ruleSet.references.get(E);if(v.options===undefined){throw new Error("Invalid ident is provided by referenced loader")}v.ident=E}}}catch(v){return E(v)}if(!et){return E(null,N[0].createIgnoredModule(j))}const ce=(Te!==undefined?`${Te.resource}!=!`:"")+stringifyLoadersAndResource(tt,et.resource);const le={};const _e=[];const Ie=[];const Me=[];let Ne;let Be;if(Te&&typeof(Ne=Te.resource)==="string"&&(Be=/\.webpack\[([^\]]+)\]$/.exec(Ne))){le.type=Be[1];Te.resource=Te.resource.slice(0,-le.type.length-10)}else{le.type="javascript/auto";const v=Te||et;const E=this.ruleSet.exec({resource:v.path,realResource:et.path,resourceQuery:v.query,resourceFragment:v.fragment,scheme:Ke,assertions:ie,mimetype:Te?"":et.data.mimetype||"",dependency:q,descriptionData:Te?undefined:et.data.descriptionFileData,issuer:R.issuer,compiler:R.compiler,issuerLayer:R.issuerLayer||""});for(const v of E){if(v.type==="use"){if(!We&&!Qe){Ie.push(v.value)}}else if(v.type==="use-post"){if(!Qe){_e.push(v.value)}}else if(v.type==="use-pre"){if(!Le&&!Qe){Me.push(v.value)}}else if(typeof v.value==="object"&&v.value!==null&&typeof le[v.type]==="object"&&le[v.type]!==null){le[v.type]=Ue(le[v.type],v.value)}else{le[v.type]=v.value}}}let qe,Ge,He;const Je=needCalls(3,(j=>{if(j){return E(j)}const N=qe;if(Te===undefined){for(const v of tt)N.push(v);for(const v of Ge)N.push(v)}else{for(const v of Ge)N.push(v);for(const v of tt)N.push(v)}for(const v of He)N.push(v);let q=le.type;const ie=le.resolve;const ae=le.layer;if(ae!==undefined&&!me){return E(new Error("'Rule.layer' is only allowed when 'experiments.layers' is enabled"))}try{Object.assign(v.createData,{layer:ae===undefined?R.issuerLayer||null:ae,request:stringifyLoadersAndResource(N,et.resource),userRequest:ce,rawRequest:G,loaders:N,resource:et.resource,context:et.context||$(et.resource),matchResource:Te?Te.resource:undefined,resourceResolveData:et.data,settings:le,type:q,parser:this.getParser(q,le.parser),parserOptions:le.parser,generator:this.getGenerator(q,le.generator),generatorOptions:le.generator,resolveOptions:ie})}catch(v){return E(v)}E()}));this.resolveRequestArray(R,this.context,_e,Oe,Ze,((v,E)=>{qe=E;Je(v)}));this.resolveRequestArray(R,this.context,Ie,Oe,Ze,((v,E)=>{Ge=E;Je(v)}));this.resolveRequestArray(R,this.context,Me,Oe,Ze,((v,E)=>{He=E;Je(v)}))}));this.resolveRequestArray(R,Ve?this.context:j,Be,Oe,Ze,((v,E)=>{if(v)return nt(v);tt=E;nt()}));const defaultResolve=v=>{if(/^($|\?)/.test(Ne)){et={resource:Ne,data:{},..._e(Ne)};nt()}else{const E=this.getResolver("normal",q?Ge(ae||Je,"dependencyType",q):ae);this.resolveResource(R,v,Ne,E,Ze,((v,E,R)=>{if(v)return nt(v);if(E!==false){et={resource:E,data:R,..._e(E)}}nt()}))}};if(Ke){et={resource:Ne,data:{},path:undefined,query:undefined,fragment:undefined,context:undefined};this.hooks.resolveForScheme.for(Ke).callAsync(et,v,(v=>{if(v)return nt(v);nt()}))}else if(Ve){et={resource:Ne,data:{},path:undefined,query:undefined,fragment:undefined,context:undefined};this.hooks.resolveInScheme.for(Ve).callAsync(et,v,((v,E)=>{if(v)return nt(v);if(!E)return defaultResolve(this.context);nt()}))}else defaultResolve(j)}))}cleanupForCache(){for(const v of this._restoredUnsafeCacheEntries){ce.clearChunkGraphForModule(v);_e.clearModuleGraphForModule(v);v.cleanupForCache()}}create(v,E){const R=v.dependencies;const $=v.context||this.context;const j=v.resolveOptions||Je;const N=R[0];const q=N.request;const G=N.assertions;const ie=v.contextInfo;const ae=new Le;const ce=new Le;const le=new Le;const me=R.length>0&&R[0].category||"";const _e={contextInfo:ie,resolveOptions:j,context:$,request:q,assertions:G,dependencies:R,dependencyType:me,fileDependencies:ae,missingDependencies:ce,contextDependencies:le,createData:{},cacheable:true};this.hooks.beforeResolve.callAsync(_e,((v,R)=>{if(v){return E(v,{fileDependencies:ae,missingDependencies:ce,contextDependencies:le,cacheable:false})}if(R===false){return E(null,{fileDependencies:ae,missingDependencies:ce,contextDependencies:le,cacheable:_e.cacheable})}if(typeof R==="object")throw new Error(deprecationChangedHookMessage("beforeResolve",this.hooks.beforeResolve));this.hooks.factorize.callAsync(_e,((v,R)=>{if(v){return E(v,{fileDependencies:ae,missingDependencies:ce,contextDependencies:le,cacheable:false})}const $={module:R,fileDependencies:ae,missingDependencies:ce,contextDependencies:le,cacheable:_e.cacheable};E(null,$)}))}))}resolveResource(v,E,R,$,j,N){$.resolve(v,E,R,j,((q,G,ie)=>{if(q){return this._resolveResourceErrorHints(q,v,E,R,$,j,((v,E)=>{if(v){q.message+=`\nAn fatal error happened during resolving additional hints for this error: ${v.message}`;q.stack+=`\n\nAn fatal error happened during resolving additional hints for this error:\n${v.stack}`;return N(q)}if(E&&E.length>0){q.message+=`\n${E.join("\n\n")}`}N(q)}))}N(q,G,ie)}))}_resolveResourceErrorHints(v,E,R,$,N,q,G){j.parallel([v=>{if(!N.options.fullySpecified)return v();N.withOptions({fullySpecified:false}).resolve(E,R,$,q,((E,R)=>{if(!E&&R){const E=We(R).path.replace(/^.*[\\/]/,"");return v(null,`Did you mean '${E}'?\nBREAKING CHANGE: The request '${$}' failed to resolve only because it was resolved as fully specified\n(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').\nThe extension in the request is mandatory for it to be fully specified.\nAdd the extension to the request.`)}v()}))},v=>{if(!N.options.enforceExtension)return v();N.withOptions({enforceExtension:false,extensions:[]}).resolve(E,R,$,q,((E,R)=>{if(!E&&R){let E="";const R=/(\.[^.]+)(\?|$)/.exec($);if(R){const v=$.replace(/(\.[^.]+)(\?|$)/,"$2");if(N.options.extensions.has(R[1])){E=`Did you mean '${v}'?`}else{E=`Did you mean '${v}'? Also note that '${R[1]}' is not in 'resolve.extensions' yet and need to be added for this to work?`}}else{E=`Did you mean to omit the extension or to remove 'resolve.enforceExtension'?`}return v(null,`The request '${$}' failed to resolve only because 'resolve.enforceExtension' was specified.\n${E}\nIncluding the extension in the request is no longer possible. Did you mean to enforce including the extension in requests with 'resolve.extensions: []' instead?`)}v()}))},v=>{if(/^\.\.?\//.test($)||N.options.preferRelative){return v()}N.resolve(E,R,`./${$}`,q,((E,R)=>{if(E||!R)return v();const j=N.options.modules.map((v=>Array.isArray(v)?v.join(", "):v)).join(", ");v(null,`Did you mean './${$}'?\nRequests that should resolve in the current directory need to start with './'.\nRequests that start with a name are treated as module requests and resolve within module directories (${j}).\nIf changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.`)}))}],((v,E)=>{if(v)return G(v);G(null,E.filter(Boolean))}))}resolveRequestArray(v,E,R,$,N,q){if(R.length===0)return q(null,R);j.map(R,((R,j)=>{$.resolve(v,E,R.loader,N,((q,G)=>{if(q&&/^[^/]*$/.test(R.loader)&&!/-loader$/.test(R.loader)){return $.resolve(v,E,R.loader+"-loader",N,(v=>{if(!v){q.message=q.message+"\n"+"BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n"+` You need to specify '${R.loader}-loader' instead of '${R.loader}',\n`+" see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed"}j(q)}))}if(q)return j(q);const ie=this._parseResourceWithoutFragment(G);const ae={loader:ie.path,options:R.options===undefined?ie.query?ie.query.slice(1):undefined:R.options,ident:R.options===undefined?undefined:R.ident};return j(null,ae)}))}),q)}getParser(v,E=Ve){let R=this.parserCache.get(v);if(R===undefined){R=new WeakMap;this.parserCache.set(v,R)}let $=R.get(E);if($===undefined){$=this.createParser(v,E);R.set(E,$)}return $}createParser(v,E={}){E=mergeGlobalOptions(this._globalParserOptions,v,E);const R=this.hooks.createParser.for(v).call(E);if(!R){throw new Error(`No parser registered for ${v}`)}this.hooks.parser.for(v).call(R,E);return R}getGenerator(v,E=Ke){let R=this.generatorCache.get(v);if(R===undefined){R=new WeakMap;this.generatorCache.set(v,R)}let $=R.get(E);if($===undefined){$=this.createGenerator(v,E);R.set(E,$)}return $}createGenerator(v,E={}){E=mergeGlobalOptions(this._globalGeneratorOptions,v,E);const R=this.hooks.createGenerator.for(v).call(E);if(!R){throw new Error(`No generator registered for ${v}`)}this.hooks.generator.for(v).call(R,E);return R}getResolver(v,E){return this.resolverFactory.get(v,E)}}v.exports=NormalModuleFactory},25755:function(v,E,R){"use strict";const{join:$,dirname:j}=R(47077);class NormalModuleReplacementPlugin{constructor(v,E){this.resourceRegExp=v;this.newResource=E}apply(v){const E=this.resourceRegExp;const R=this.newResource;v.hooks.normalModuleFactory.tap("NormalModuleReplacementPlugin",(N=>{N.hooks.beforeResolve.tap("NormalModuleReplacementPlugin",(v=>{if(E.test(v.request)){if(typeof R==="function"){R(v)}else{v.request=R}}}));N.hooks.afterResolve.tap("NormalModuleReplacementPlugin",(N=>{const q=N.createData;if(E.test(q.resource)){if(typeof R==="function"){R(N)}else{const E=v.inputFileSystem;if(R.startsWith("/")||R.length>1&&R[1]===":"){q.resource=R}else{q.resource=$(E,j(E,q.resource),R)}}}}))}))}}v.exports=NormalModuleReplacementPlugin},6267:function(v,E){"use strict";E.STAGE_BASIC=-10;E.STAGE_DEFAULT=0;E.STAGE_ADVANCED=10},23787:function(v){"use strict";class OptionsApply{process(v,E){}}v.exports=OptionsApply},68646:function(v,E,R){"use strict";class Parser{parse(v,E){const $=R(73846);throw new $}}v.exports=Parser},82353:function(v,E,R){"use strict";const $=R(45851);class PrefetchPlugin{constructor(v,E){if(E){this.context=v;this.request=E}else{this.context=null;this.request=v}}apply(v){v.hooks.compilation.tap("PrefetchPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set($,E)}));v.hooks.make.tapAsync("PrefetchPlugin",((E,R)=>{E.addModuleChain(this.context||v.context,new $(this.request),(v=>{R(v)}))}))}}v.exports=PrefetchPlugin},67317:function(v,E,R){"use strict";const $=R(37912);const j=R(39601);const N=R(89417);const q=R(89699);const{contextify:G}=R(20162);const ie=q(R(49196),(()=>R(18273)),{name:"Progress Plugin",baseDataPath:"options"});const median3=(v,E,R)=>v+E+R-Math.max(v,E,R)-Math.min(v,E,R);const createDefaultHandler=(v,E)=>{const R=[];const defaultHandler=($,j,...N)=>{if(v){if($===0){R.length=0}const v=[j,...N];const q=v.map((v=>v.replace(/\d+\/\d+ /g,"")));const G=Date.now();const ie=Math.max(q.length,R.length);for(let v=ie;v>=0;v--){const $=v0){$=R[v-1].value+" > "+$}const q=`${" | ".repeat(v)}${N} ms ${$}`;const G=N;{if(G>1e4){E.error(q)}else if(G>1e3){E.warn(q)}else if(G>10){E.info(q)}else if(G>5){E.log(q)}else{E.debug(q)}}}if($===undefined){R.length=v}else{j.value=$;j.time=G;R.length=v+1}}}else{R[v]={value:$,time:G}}}}E.status(`${Math.floor($*100)}%`,j,...N);if($===1||!j&&N.length===0)E.status()};return defaultHandler};const ae=new WeakMap;class ProgressPlugin{static getReporter(v){return ae.get(v)}constructor(v={}){if(typeof v==="function"){v={handler:v}}ie(v);v={...ProgressPlugin.defaultOptions,...v};this.profile=v.profile;this.handler=v.handler;this.modulesCount=v.modulesCount;this.dependenciesCount=v.dependenciesCount;this.showEntries=v.entries;this.showModules=v.modules;this.showDependencies=v.dependencies;this.showActiveModules=v.activeModules;this.percentBy=v.percentBy}apply(v){const E=this.handler||createDefaultHandler(this.profile,v.getInfrastructureLogger("webpack.Progress"));if(v instanceof j){this._applyOnMultiCompiler(v,E)}else if(v instanceof $){this._applyOnCompiler(v,E)}}_applyOnMultiCompiler(v,E){const R=v.compilers.map((()=>[0]));v.compilers.forEach(((v,$)=>{new ProgressPlugin(((v,j,...N)=>{R[$]=[v,j,...N];let q=0;for(const[v]of R)q+=v;E(q/R.length,`[${$}] ${j}`,...N)})).apply(v)}))}_applyOnCompiler(v,E){const R=this.showEntries;const $=this.showModules;const j=this.showDependencies;const N=this.showActiveModules;let q="";let ie="";let ce=0;let le=0;let me=0;let _e=0;let Ie=0;let Me=1;let Oe=0;let Te=0;let Ne=0;const Be=new Set;let Le=0;const updateThrottled=()=>{if(Le+500{const ae=[];const qe=Oe/Math.max(ce||this.modulesCount||1,_e);const Ue=Ne/Math.max(me||this.dependenciesCount||1,Me);const Ge=Te/Math.max(le||1,Ie);let He;switch(this.percentBy){case"entries":He=Ue;break;case"dependencies":He=Ge;break;case"modules":He=qe;break;default:He=median3(qe,Ue,Ge)}const We=.1+He*.55;if(ie){ae.push(`import loader ${G(v.context,ie,v.root)}`)}else{const v=[];if(R){v.push(`${Ne}/${Me} entries`)}if(j){v.push(`${Te}/${Ie} dependencies`)}if($){v.push(`${Oe}/${_e} modules`)}if(N){v.push(`${Be.size} active`)}if(v.length>0){ae.push(v.join(" "))}if(N){ae.push(q)}}E(We,"building",...ae);Le=Date.now()};const factorizeAdd=()=>{Ie++;if(Ie<50||Ie%100===0)updateThrottled()};const factorizeDone=()=>{Te++;if(Te<50||Te%100===0)updateThrottled()};const moduleAdd=()=>{_e++;if(_e<50||_e%100===0)updateThrottled()};const moduleBuild=v=>{const E=v.identifier();if(E){Be.add(E);q=E;update()}};const entryAdd=(v,E)=>{Me++;if(Me<5||Me%10===0)updateThrottled()};const moduleDone=v=>{Oe++;if(N){const E=v.identifier();if(E){Be.delete(E);if(q===E){q="";for(const v of Be){q=v}update();return}}}if(Oe<50||Oe%100===0)updateThrottled()};const entryDone=(v,E)=>{Ne++;update()};const qe=v.getCache("ProgressPlugin").getItemCache("counts",null);let Ue;v.hooks.beforeCompile.tap("ProgressPlugin",(()=>{if(!Ue){Ue=qe.getPromise().then((v=>{if(v){ce=ce||v.modulesCount;le=le||v.dependenciesCount}return v}),(v=>{}))}}));v.hooks.afterCompile.tapPromise("ProgressPlugin",(v=>{if(v.compiler.isChild())return Promise.resolve();return Ue.then((async v=>{if(!v||v.modulesCount!==_e||v.dependenciesCount!==Ie){await qe.storePromise({modulesCount:_e,dependenciesCount:Ie})}}))}));v.hooks.compilation.tap("ProgressPlugin",(R=>{if(R.compiler.isChild())return;ce=_e;me=Me;le=Ie;_e=Ie=Me=0;Oe=Te=Ne=0;R.factorizeQueue.hooks.added.tap("ProgressPlugin",factorizeAdd);R.factorizeQueue.hooks.result.tap("ProgressPlugin",factorizeDone);R.addModuleQueue.hooks.added.tap("ProgressPlugin",moduleAdd);R.processDependenciesQueue.hooks.result.tap("ProgressPlugin",moduleDone);if(N){R.hooks.buildModule.tap("ProgressPlugin",moduleBuild)}R.hooks.addEntry.tap("ProgressPlugin",entryAdd);R.hooks.failedEntry.tap("ProgressPlugin",entryDone);R.hooks.succeedEntry.tap("ProgressPlugin",entryDone);if(false){}const $={finishModules:"finish module graph",seal:"plugins",optimizeDependencies:"dependencies optimization",afterOptimizeDependencies:"after dependencies optimization",beforeChunks:"chunk graph",afterChunks:"after chunk graph",optimize:"optimizing",optimizeModules:"module optimization",afterOptimizeModules:"after module optimization",optimizeChunks:"chunk optimization",afterOptimizeChunks:"after chunk optimization",optimizeTree:"module and chunk tree optimization",afterOptimizeTree:"after module and chunk tree optimization",optimizeChunkModules:"chunk modules optimization",afterOptimizeChunkModules:"after chunk modules optimization",reviveModules:"module reviving",beforeModuleIds:"before module ids",moduleIds:"module ids",optimizeModuleIds:"module id optimization",afterOptimizeModuleIds:"module id optimization",reviveChunks:"chunk reviving",beforeChunkIds:"before chunk ids",chunkIds:"chunk ids",optimizeChunkIds:"chunk id optimization",afterOptimizeChunkIds:"after chunk id optimization",recordModules:"record modules",recordChunks:"record chunks",beforeModuleHash:"module hashing",beforeCodeGeneration:"code generation",beforeRuntimeRequirements:"runtime requirements",beforeHash:"hashing",afterHash:"after hashing",recordHash:"record hash",beforeModuleAssets:"module assets processing",beforeChunkAssets:"chunk assets processing",processAssets:"asset processing",afterProcessAssets:"after asset optimization",record:"recording",afterSeal:"after seal"};const j=Object.keys($).length;Object.keys($).forEach(((N,q)=>{const G=$[N];const ie=q/j*.25+.7;R.hooks[N].intercept({name:"ProgressPlugin",call(){E(ie,"sealing",G)},done(){ae.set(v,undefined);E(ie,"sealing",G)},result(){E(ie,"sealing",G)},error(){E(ie,"sealing",G)},tap(v){ae.set(R.compiler,((R,...$)=>{E(ie,"sealing",G,v.name,...$)}));E(ie,"sealing",G,v.name)}})}))}));v.hooks.make.intercept({name:"ProgressPlugin",call(){E(.1,"building")},done(){E(.65,"building")}});const interceptHook=(R,$,j,N)=>{R.intercept({name:"ProgressPlugin",call(){E($,j,N)},done(){ae.set(v,undefined);E($,j,N)},result(){E($,j,N)},error(){E($,j,N)},tap(R){ae.set(v,((v,...q)=>{E($,j,N,R.name,...q)}));E($,j,N,R.name)}})};v.cache.hooks.endIdle.intercept({name:"ProgressPlugin",call(){E(0,"")}});interceptHook(v.cache.hooks.endIdle,.01,"cache","end idle");v.hooks.beforeRun.intercept({name:"ProgressPlugin",call(){E(0,"")}});interceptHook(v.hooks.beforeRun,.01,"setup","before run");interceptHook(v.hooks.run,.02,"setup","run");interceptHook(v.hooks.watchRun,.03,"setup","watch run");interceptHook(v.hooks.normalModuleFactory,.04,"setup","normal module factory");interceptHook(v.hooks.contextModuleFactory,.05,"setup","context module factory");interceptHook(v.hooks.beforeCompile,.06,"setup","before compile");interceptHook(v.hooks.compile,.07,"setup","compile");interceptHook(v.hooks.thisCompilation,.08,"setup","compilation");interceptHook(v.hooks.compilation,.09,"setup","compilation");interceptHook(v.hooks.finishMake,.69,"building","finish");interceptHook(v.hooks.emit,.95,"emitting","emit");interceptHook(v.hooks.afterEmit,.98,"emitting","after emit");interceptHook(v.hooks.done,.99,"done","plugins");v.hooks.done.intercept({name:"ProgressPlugin",done(){E(.99,"")}});interceptHook(v.cache.hooks.storeBuildDependencies,.99,"cache","store build dependencies");interceptHook(v.cache.hooks.shutdown,.99,"cache","shutdown");interceptHook(v.cache.hooks.beginIdle,.99,"cache","begin idle");interceptHook(v.hooks.watchClose,.99,"end","closing watch compilation");v.cache.hooks.beginIdle.intercept({name:"ProgressPlugin",done(){E(1,"")}});v.cache.hooks.shutdown.intercept({name:"ProgressPlugin",done(){E(1,"")}})}}ProgressPlugin.defaultOptions={profile:false,modulesCount:5e3,dependenciesCount:1e4,modules:true,dependencies:true,activeModules:false,entries:true};v.exports=ProgressPlugin},79426:function(v,E,R){"use strict";const $=R(14367);const j=R(13996);const{approve:N}=R(97574);class ProvidePlugin{constructor(v){this.definitions=v}apply(v){const E=this.definitions;v.hooks.compilation.tap("ProvidePlugin",((v,{normalModuleFactory:R})=>{v.dependencyTemplates.set($,new $.Template);v.dependencyFactories.set(j,R);v.dependencyTemplates.set(j,new j.Template);const handler=(v,R)=>{Object.keys(E).forEach((R=>{const $=[].concat(E[R]);const q=R.split(".");if(q.length>0){q.slice(1).forEach(((E,R)=>{const $=q.slice(0,R+1).join(".");v.hooks.canRename.for($).tap("ProvidePlugin",N)}))}v.hooks.expression.for(R).tap("ProvidePlugin",(E=>{const N=R.includes(".")?`__webpack_provided_${R.replace(/\./g,"_dot_")}`:R;const q=new j($[0],N,$.slice(1),E.range);q.loc=E.loc;v.state.module.addDependency(q);return true}));v.hooks.call.for(R).tap("ProvidePlugin",(E=>{const N=R.includes(".")?`__webpack_provided_${R.replace(/\./g,"_dot_")}`:R;const q=new j($[0],N,$.slice(1),E.callee.range);q.loc=E.callee.loc;v.state.module.addDependency(q);v.walkExpressions(E.arguments);return true}))}))};R.hooks.parser.for("javascript/auto").tap("ProvidePlugin",handler);R.hooks.parser.for("javascript/dynamic").tap("ProvidePlugin",handler);R.hooks.parser.for("javascript/esm").tap("ProvidePlugin",handler)}))}}v.exports=ProvidePlugin},71133:function(v,E,R){"use strict";const{OriginalSource:$,RawSource:j}=R(51255);const N=R(53840);const q=R(65764);const G=new Set(["javascript"]);class RawModule extends N{constructor(v,E,R,$){super("javascript/dynamic",null);this.sourceStr=v;this.identifierStr=E||this.sourceStr;this.readableIdentifierStr=R||this.identifierStr;this.runtimeRequirements=$||null}getSourceTypes(){return G}identifier(){return this.identifierStr}size(v){return Math.max(1,this.sourceStr.length)}readableIdentifier(v){return v.shorten(this.readableIdentifierStr)}needBuild(v,E){return E(null,!this.buildMeta)}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={cacheable:true};j()}codeGeneration(v){const E=new Map;if(this.useSourceMap||this.useSimpleSourceMap){E.set("javascript",new $(this.sourceStr,this.identifier()))}else{E.set("javascript",new j(this.sourceStr))}return{sources:E,runtimeRequirements:this.runtimeRequirements}}updateHash(v,E){v.update(this.sourceStr);super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this.sourceStr);E(this.identifierStr);E(this.readableIdentifierStr);E(this.runtimeRequirements);super.serialize(v)}deserialize(v){const{read:E}=v;this.sourceStr=E();this.identifierStr=E();this.readableIdentifierStr=E();this.runtimeRequirements=E();super.deserialize(v)}}q(RawModule,"webpack/lib/RawModule");v.exports=RawModule},91060:function(v,E,R){"use strict";const{compareNumbers:$}=R(58792);const j=R(20162);class RecordIdsPlugin{constructor(v){this.options=v||{}}apply(v){const E=this.options.portableIds;const R=j.makePathsRelative.bindContextCache(v.context,v.root);const getModuleIdentifier=v=>{if(E){return R(v.identifier())}return v.identifier()};v.hooks.compilation.tap("RecordIdsPlugin",(v=>{v.hooks.recordModules.tap("RecordIdsPlugin",((E,R)=>{const j=v.chunkGraph;if(!R.modules)R.modules={};if(!R.modules.byIdentifier)R.modules.byIdentifier={};const N=new Set;for(const v of E){const E=j.getModuleId(v);if(typeof E!=="number")continue;const $=getModuleIdentifier(v);R.modules.byIdentifier[$]=E;N.add(E)}R.modules.usedIds=Array.from(N).sort($)}));v.hooks.reviveModules.tap("RecordIdsPlugin",((E,R)=>{if(!R.modules)return;if(R.modules.byIdentifier){const $=v.chunkGraph;const j=new Set;for(const v of E){const E=$.getModuleId(v);if(E!==null)continue;const N=getModuleIdentifier(v);const q=R.modules.byIdentifier[N];if(q===undefined)continue;if(j.has(q))continue;j.add(q);$.setModuleId(v,q)}}if(Array.isArray(R.modules.usedIds)){v.usedModuleIds=new Set(R.modules.usedIds)}}));const getChunkSources=v=>{const E=[];for(const R of v.groupsIterable){const $=R.chunks.indexOf(v);if(R.name){E.push(`${$} ${R.name}`)}else{for(const v of R.origins){if(v.module){if(v.request){E.push(`${$} ${getModuleIdentifier(v.module)} ${v.request}`)}else if(typeof v.loc==="string"){E.push(`${$} ${getModuleIdentifier(v.module)} ${v.loc}`)}else if(v.loc&&typeof v.loc==="object"&&"start"in v.loc){E.push(`${$} ${getModuleIdentifier(v.module)} ${JSON.stringify(v.loc.start)}`)}}}}}return E};v.hooks.recordChunks.tap("RecordIdsPlugin",((v,E)=>{if(!E.chunks)E.chunks={};if(!E.chunks.byName)E.chunks.byName={};if(!E.chunks.bySource)E.chunks.bySource={};const R=new Set;for(const $ of v){if(typeof $.id!=="number")continue;const v=$.name;if(v)E.chunks.byName[v]=$.id;const j=getChunkSources($);for(const v of j){E.chunks.bySource[v]=$.id}R.add($.id)}E.chunks.usedIds=Array.from(R).sort($)}));v.hooks.reviveChunks.tap("RecordIdsPlugin",((E,R)=>{if(!R.chunks)return;const $=new Set;if(R.chunks.byName){for(const v of E){if(v.id!==null)continue;if(!v.name)continue;const E=R.chunks.byName[v.name];if(E===undefined)continue;if($.has(E))continue;$.add(E);v.id=E;v.ids=[E]}}if(R.chunks.bySource){for(const v of E){if(v.id!==null)continue;const E=getChunkSources(v);for(const j of E){const E=R.chunks.bySource[j];if(E===undefined)continue;if($.has(E))continue;$.add(E);v.id=E;v.ids=[E];break}}}if(Array.isArray(R.chunks.usedIds)){v.usedChunkIds=new Set(R.chunks.usedIds)}}))}))}}v.exports=RecordIdsPlugin},41483:function(v,E,R){"use strict";const{contextify:$}=R(20162);class RequestShortener{constructor(v,E){this.contextify=$.bindContextCache(v,E)}shorten(v){if(!v){return v}return this.contextify(v)}}v.exports=RequestShortener},95173:function(v,E,R){"use strict";const $=R(39201);const j=R(14367);const{toConstantDependency:N}=R(97574);v.exports=class RequireJsStuffPlugin{apply(v){v.hooks.compilation.tap("RequireJsStuffPlugin",((v,{normalModuleFactory:E})=>{v.dependencyTemplates.set(j,new j.Template);const handler=(v,E)=>{if(E.requireJs===undefined||!E.requireJs){return}v.hooks.call.for("require.config").tap("RequireJsStuffPlugin",N(v,"undefined"));v.hooks.call.for("requirejs.config").tap("RequireJsStuffPlugin",N(v,"undefined"));v.hooks.expression.for("require.version").tap("RequireJsStuffPlugin",N(v,JSON.stringify("0.0.0")));v.hooks.expression.for("requirejs.onError").tap("RequireJsStuffPlugin",N(v,$.uncaughtErrorHandler,[$.uncaughtErrorHandler]))};E.hooks.parser.for("javascript/auto").tap("RequireJsStuffPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("RequireJsStuffPlugin",handler)}))}}},34001:function(v,E,R){"use strict";const $=R(958).ResolverFactory;const{HookMap:j,SyncHook:N,SyncWaterfallHook:q}=R(44217);const{cachedCleverMerge:G,removeOperations:ie,resolveByProperty:ae}=R(22093);const ce={};const convertToResolveOptions=v=>{const{dependencyType:E,plugins:R,...$}=v;const j={...$,plugins:R&&R.filter((v=>v!=="..."))};if(!j.fileSystem){throw new Error("fileSystem is missing in resolveOptions, but it's required for enhanced-resolve")}const N=j;return ie(ae(N,"byDependency",E))};v.exports=class ResolverFactory{constructor(){this.hooks=Object.freeze({resolveOptions:new j((()=>new q(["resolveOptions"]))),resolver:new j((()=>new N(["resolver","resolveOptions","userResolveOptions"])))});this.cache=new Map}get(v,E=ce){let R=this.cache.get(v);if(!R){R={direct:new WeakMap,stringified:new Map};this.cache.set(v,R)}const $=R.direct.get(E);if($){return $}const j=JSON.stringify(E);const N=R.stringified.get(j);if(N){R.direct.set(E,N);return N}const q=this._create(v,E);R.direct.set(E,q);R.stringified.set(j,q);return q}_create(v,E){const R={...E};const j=convertToResolveOptions(this.hooks.resolveOptions.for(v).call(E));const N=$.createResolver(j);if(!N){throw new Error("No resolver created")}const q=new WeakMap;N.withOptions=E=>{const $=q.get(E);if($!==undefined)return $;const j=G(R,E);const N=this.get(v,j);q.set(E,N);return N};this.hooks.resolver.for(v).call(N,j,R);return N}}},39201:function(v,E){"use strict";E.require="__webpack_require__";E.requireScope="__webpack_require__.*";E.exports="__webpack_exports__";E.thisAsExports="top-level-this-exports";E.returnExportsFromRuntime="return-exports-from-runtime";E.module="module";E.moduleId="module.id";E.moduleLoaded="module.loaded";E.publicPath="__webpack_require__.p";E.entryModuleId="__webpack_require__.s";E.moduleCache="__webpack_require__.c";E.moduleFactories="__webpack_require__.m";E.moduleFactoriesAddOnly="__webpack_require__.m (add only)";E.ensureChunk="__webpack_require__.e";E.ensureChunkHandlers="__webpack_require__.f";E.ensureChunkIncludeEntries="__webpack_require__.f (include entries)";E.prefetchChunk="__webpack_require__.E";E.prefetchChunkHandlers="__webpack_require__.F";E.preloadChunk="__webpack_require__.G";E.preloadChunkHandlers="__webpack_require__.H";E.definePropertyGetters="__webpack_require__.d";E.makeNamespaceObject="__webpack_require__.r";E.createFakeNamespaceObject="__webpack_require__.t";E.compatGetDefaultExport="__webpack_require__.n";E.harmonyModuleDecorator="__webpack_require__.hmd";E.nodeModuleDecorator="__webpack_require__.nmd";E.getFullHash="__webpack_require__.h";E.wasmInstances="__webpack_require__.w";E.instantiateWasm="__webpack_require__.v";E.uncaughtErrorHandler="__webpack_require__.oe";E.scriptNonce="__webpack_require__.nc";E.loadScript="__webpack_require__.l";E.createScript="__webpack_require__.ts";E.createScriptUrl="__webpack_require__.tu";E.getTrustedTypesPolicy="__webpack_require__.tt";E.chunkName="__webpack_require__.cn";E.runtimeId="__webpack_require__.j";E.getChunkScriptFilename="__webpack_require__.u";E.getChunkCssFilename="__webpack_require__.k";E.hasCssModules="has css modules";E.getChunkUpdateScriptFilename="__webpack_require__.hu";E.getChunkUpdateCssFilename="__webpack_require__.hk";E.startup="__webpack_require__.x";E.startupNoDefault="__webpack_require__.x (no default handler)";E.startupOnlyAfter="__webpack_require__.x (only after)";E.startupOnlyBefore="__webpack_require__.x (only before)";E.chunkCallback="webpackChunk";E.startupEntrypoint="__webpack_require__.X";E.onChunksLoaded="__webpack_require__.O";E.externalInstallChunk="__webpack_require__.C";E.interceptModuleExecution="__webpack_require__.i";E.global="__webpack_require__.g";E.shareScopeMap="__webpack_require__.S";E.initializeSharing="__webpack_require__.I";E.currentRemoteGetScope="__webpack_require__.R";E.getUpdateManifestFilename="__webpack_require__.hmrF";E.hmrDownloadManifest="__webpack_require__.hmrM";E.hmrDownloadUpdateHandlers="__webpack_require__.hmrC";E.hmrModuleData="__webpack_require__.hmrD";E.hmrInvalidateModuleHandlers="__webpack_require__.hmrI";E.hmrRuntimeStatePrefix="__webpack_require__.hmrS";E.amdDefine="__webpack_require__.amdD";E.amdOptions="__webpack_require__.amdO";E.system="__webpack_require__.System";E.hasOwnProperty="__webpack_require__.o";E.systemContext="__webpack_require__.y";E.baseURI="__webpack_require__.b";E.relativeUrl="__webpack_require__.U";E.asyncModule="__webpack_require__.a"},93496:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(51255).OriginalSource;const N=R(53840);const q=new Set(["runtime"]);class RuntimeModule extends N{constructor(v,E=0){super("runtime");this.name=v;this.stage=E;this.buildMeta={};this.buildInfo={};this.compilation=undefined;this.chunk=undefined;this.chunkGraph=undefined;this.fullHash=false;this.dependentHash=false;this._cachedGeneratedCode=undefined}attach(v,E,R=v.chunkGraph){this.compilation=v;this.chunk=E;this.chunkGraph=R}identifier(){return`webpack/runtime/${this.name}`}readableIdentifier(v){return`webpack/runtime/${this.name}`}needBuild(v,E){return E(null,false)}build(v,E,R,$,j){j()}updateHash(v,E){v.update(this.name);v.update(`${this.stage}`);try{if(this.fullHash||this.dependentHash){v.update(this.generate())}else{v.update(this.getGeneratedCode())}}catch(E){v.update(E.message)}super.updateHash(v,E)}getSourceTypes(){return q}codeGeneration(v){const E=new Map;const R=this.getGeneratedCode();if(R){E.set("runtime",this.useSourceMap||this.useSimpleSourceMap?new j(R,this.identifier()):new $(R))}return{sources:E,runtimeRequirements:null}}size(v){try{const v=this.getGeneratedCode();return v?v.length:0}catch(v){return 0}}generate(){const v=R(73846);throw new v}getGeneratedCode(){if(this._cachedGeneratedCode){return this._cachedGeneratedCode}return this._cachedGeneratedCode=this.generate()}shouldIsolate(){return true}}RuntimeModule.STAGE_NORMAL=0;RuntimeModule.STAGE_BASIC=5;RuntimeModule.STAGE_ATTACH=10;RuntimeModule.STAGE_TRIGGER=20;v.exports=RuntimeModule},92419:function(v,E,R){"use strict";const $=R(39201);const{getChunkFilenameTemplate:j}=R(39693);const N=R(12446);const q=R(36109);const G=R(57969);const ie=R(48178);const ae=R(60758);const ce=R(75410);const le=R(28349);const me=R(82865);const _e=R(44263);const Ie=R(71822);const Me=R(62277);const Oe=R(5079);const Te=R(44033);const Ne=R(69496);const Be=R(36011);const Le=R(91164);const qe=R(9698);const Ue=R(46750);const Ge=R(77159);const He=R(85856);const We=R(94800);const Qe=R(86747);const Je=R(89926);const Ve=R(86841);const Ke=R(63135);const Xe=R(59694);const Ye=R(8382);const Ze=[$.chunkName,$.runtimeId,$.compatGetDefaultExport,$.createFakeNamespaceObject,$.createScript,$.createScriptUrl,$.getTrustedTypesPolicy,$.definePropertyGetters,$.ensureChunk,$.entryModuleId,$.getFullHash,$.global,$.makeNamespaceObject,$.moduleCache,$.moduleFactories,$.moduleFactoriesAddOnly,$.interceptModuleExecution,$.publicPath,$.baseURI,$.relativeUrl,$.scriptNonce,$.uncaughtErrorHandler,$.asyncModule,$.wasmInstances,$.instantiateWasm,$.shareScopeMap,$.initializeSharing,$.loadScript,$.systemContext,$.onChunksLoaded];const et={[$.moduleLoaded]:[$.module],[$.moduleId]:[$.module]};const tt={[$.definePropertyGetters]:[$.hasOwnProperty],[$.compatGetDefaultExport]:[$.definePropertyGetters],[$.createFakeNamespaceObject]:[$.definePropertyGetters,$.makeNamespaceObject,$.require],[$.initializeSharing]:[$.shareScopeMap],[$.shareScopeMap]:[$.hasOwnProperty]};class RuntimePlugin{apply(v){v.hooks.compilation.tap("RuntimePlugin",(v=>{const E=v.outputOptions.chunkLoading;const isChunkLoadingDisabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.chunkLoading!==undefined?R.chunkLoading:E;return $===false};v.dependencyTemplates.set(N,new N.Template);for(const E of Ze){v.hooks.runtimeRequirementInModule.for(E).tap("RuntimePlugin",((v,E)=>{E.add($.requireScope)}));v.hooks.runtimeRequirementInTree.for(E).tap("RuntimePlugin",((v,E)=>{E.add($.requireScope)}))}for(const E of Object.keys(tt)){const R=tt[E];v.hooks.runtimeRequirementInTree.for(E).tap("RuntimePlugin",((v,E)=>{for(const v of R)E.add(v)}))}for(const E of Object.keys(et)){const R=et[E];v.hooks.runtimeRequirementInModule.for(E).tap("RuntimePlugin",((v,E)=>{for(const v of R)E.add(v)}))}v.hooks.runtimeRequirementInTree.for($.definePropertyGetters).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new Me);return true}));v.hooks.runtimeRequirementInTree.for($.makeNamespaceObject).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new Ge);return true}));v.hooks.runtimeRequirementInTree.for($.createFakeNamespaceObject).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new me);return true}));v.hooks.runtimeRequirementInTree.for($.hasOwnProperty).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new qe);return true}));v.hooks.runtimeRequirementInTree.for($.compatGetDefaultExport).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new ce);return true}));v.hooks.runtimeRequirementInTree.for($.runtimeId).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new Ve);return true}));v.hooks.runtimeRequirementInTree.for($.publicPath).tap("RuntimePlugin",((E,R)=>{const{outputOptions:j}=v;const{publicPath:N,scriptType:q}=j;const G=E.getEntryOptions();const ae=G&&G.publicPath!==undefined?G.publicPath:N;if(ae==="auto"){const j=new ie;if(q!=="module")R.add($.global);v.addRuntimeModule(E,j)}else{const R=new Qe(ae);if(typeof ae!=="string"||/\[(full)?hash\]/.test(ae)){R.fullHash=true}v.addRuntimeModule(E,R)}return true}));v.hooks.runtimeRequirementInTree.for($.global).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new Le);return true}));v.hooks.runtimeRequirementInTree.for($.asyncModule).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new G);return true}));v.hooks.runtimeRequirementInTree.for($.systemContext).tap("RuntimePlugin",(E=>{const{outputOptions:R}=v;const{library:$}=R;const j=E.getEntryOptions();const N=j&&j.library!==undefined?j.library.type:$.type;if(N==="system"){v.addRuntimeModule(E,new Ke)}return true}));v.hooks.runtimeRequirementInTree.for($.getChunkScriptFilename).tap("RuntimePlugin",((E,R)=>{if(typeof v.outputOptions.chunkFilename==="string"&&/\[(full)?hash(:\d+)?\]/.test(v.outputOptions.chunkFilename)){R.add($.getFullHash)}v.addRuntimeModule(E,new Te("javascript","javascript",$.getChunkScriptFilename,(E=>E.filenameTemplate||(E.canBeInitial()?v.outputOptions.filename:v.outputOptions.chunkFilename)),false));return true}));v.hooks.runtimeRequirementInTree.for($.getChunkCssFilename).tap("RuntimePlugin",((E,R)=>{if(typeof v.outputOptions.cssChunkFilename==="string"&&/\[(full)?hash(:\d+)?\]/.test(v.outputOptions.cssChunkFilename)){R.add($.getFullHash)}v.addRuntimeModule(E,new Te("css","css",$.getChunkCssFilename,(E=>j(E,v.outputOptions)),R.has($.hmrDownloadUpdateHandlers)));return true}));v.hooks.runtimeRequirementInTree.for($.getChunkUpdateScriptFilename).tap("RuntimePlugin",((E,R)=>{if(/\[(full)?hash(:\d+)?\]/.test(v.outputOptions.hotUpdateChunkFilename))R.add($.getFullHash);v.addRuntimeModule(E,new Te("javascript","javascript update",$.getChunkUpdateScriptFilename,(E=>v.outputOptions.hotUpdateChunkFilename),true));return true}));v.hooks.runtimeRequirementInTree.for($.getUpdateManifestFilename).tap("RuntimePlugin",((E,R)=>{if(/\[(full)?hash(:\d+)?\]/.test(v.outputOptions.hotUpdateMainFilename)){R.add($.getFullHash)}v.addRuntimeModule(E,new Ne("update manifest",$.getUpdateManifestFilename,v.outputOptions.hotUpdateMainFilename));return true}));v.hooks.runtimeRequirementInTree.for($.ensureChunk).tap("RuntimePlugin",((E,R)=>{const j=E.hasAsyncChunks();if(j){R.add($.ensureChunkHandlers)}v.addRuntimeModule(E,new Oe(R));return true}));v.hooks.runtimeRequirementInTree.for($.ensureChunkIncludeEntries).tap("RuntimePlugin",((v,E)=>{E.add($.ensureChunkHandlers)}));v.hooks.runtimeRequirementInTree.for($.shareScopeMap).tap("RuntimePlugin",((E,R)=>{v.addRuntimeModule(E,new Xe);return true}));v.hooks.runtimeRequirementInTree.for($.loadScript).tap("RuntimePlugin",((E,R)=>{const j=!!v.outputOptions.trustedTypes;if(j){R.add($.createScriptUrl)}v.addRuntimeModule(E,new Ue(j));return true}));v.hooks.runtimeRequirementInTree.for($.createScript).tap("RuntimePlugin",((E,R)=>{if(v.outputOptions.trustedTypes){R.add($.getTrustedTypesPolicy)}v.addRuntimeModule(E,new _e);return true}));v.hooks.runtimeRequirementInTree.for($.createScriptUrl).tap("RuntimePlugin",((E,R)=>{if(v.outputOptions.trustedTypes){R.add($.getTrustedTypesPolicy)}v.addRuntimeModule(E,new Ie);return true}));v.hooks.runtimeRequirementInTree.for($.getTrustedTypesPolicy).tap("RuntimePlugin",((E,R)=>{v.addRuntimeModule(E,new Be(R));return true}));v.hooks.runtimeRequirementInTree.for($.relativeUrl).tap("RuntimePlugin",((E,R)=>{v.addRuntimeModule(E,new Je);return true}));v.hooks.runtimeRequirementInTree.for($.onChunksLoaded).tap("RuntimePlugin",((E,R)=>{v.addRuntimeModule(E,new We);return true}));v.hooks.runtimeRequirementInTree.for($.baseURI).tap("RuntimePlugin",(E=>{if(isChunkLoadingDisabledForChunk(E)){v.addRuntimeModule(E,new ae);return true}}));v.hooks.runtimeRequirementInTree.for($.scriptNonce).tap("RuntimePlugin",(E=>{v.addRuntimeModule(E,new He);return true}));v.hooks.additionalTreeRuntimeRequirements.tap("RuntimePlugin",((E,R)=>{const{mainTemplate:$}=v;if($.hooks.bootstrap.isUsed()||$.hooks.localVars.isUsed()||$.hooks.requireEnsure.isUsed()||$.hooks.requireExtensions.isUsed()){v.addRuntimeModule(E,new le)}}));q.getCompilationHooks(v).chunkHash.tap("RuntimePlugin",((v,E,{chunkGraph:R})=>{const $=new Ye;for(const E of R.getChunkRuntimeModulesIterable(v)){$.add(R.getModuleHash(E,v.runtime))}$.updateHash(E)}))}))}}v.exports=RuntimePlugin},30514:function(v,E,R){"use strict";const $=R(64768);const j=R(39201);const N=R(43841);const{equals:q}=R(28087);const G=R(73897);const ie=R(67603);const{forEachRuntime:ae,subtractRuntime:ce}=R(47462);const noModuleIdErrorMessage=(v,E)=>`Module ${v.identifier()} has no id assigned.\nThis should not happen.\nIt's in these chunks: ${Array.from(E.getModuleChunksIterable(v),(v=>v.name||v.id||v.debugId)).join(", ")||"none"} (If module is in no chunk this indicates a bug in some chunk/module optimization logic)\nModule has these incoming connections: ${Array.from(E.moduleGraph.getIncomingConnections(v),(v=>`\n - ${v.originModule&&v.originModule.identifier()} ${v.dependency&&v.dependency.type} ${v.explanations&&Array.from(v.explanations).join(", ")||""}`)).join("")}`;function getGlobalObject(v){if(!v)return v;const E=v.trim();if(E.match(/^[_\p{L}][_0-9\p{L}]*$/iu)||E.match(/^([_\p{L}][_0-9\p{L}]*)?\(.*\)$/iu))return E;return`Object(${E})`}class RuntimeTemplate{constructor(v,E,R){this.compilation=v;this.outputOptions=E||{};this.requestShortener=R;this.globalObject=getGlobalObject(E.globalObject);this.contentHashReplacement="X".repeat(E.hashDigestLength)}isIIFE(){return this.outputOptions.iife}isModule(){return this.outputOptions.module}supportsConst(){return this.outputOptions.environment.const}supportsArrowFunction(){return this.outputOptions.environment.arrowFunction}supportsOptionalChaining(){return this.outputOptions.environment.optionalChaining}supportsForOf(){return this.outputOptions.environment.forOf}supportsDestructuring(){return this.outputOptions.environment.destructuring}supportsBigIntLiteral(){return this.outputOptions.environment.bigIntLiteral}supportsDynamicImport(){return this.outputOptions.environment.dynamicImport}supportsEcmaScriptModuleSyntax(){return this.outputOptions.environment.module}supportTemplateLiteral(){return this.outputOptions.environment.templateLiteral}returningFunction(v,E=""){return this.supportsArrowFunction()?`(${E}) => (${v})`:`function(${E}) { return ${v}; }`}basicFunction(v,E){return this.supportsArrowFunction()?`(${v}) => {\n${N.indent(E)}\n}`:`function(${v}) {\n${N.indent(E)}\n}`}concatenation(...v){const E=v.length;if(E===2)return this._es5Concatenation(v);if(E===0)return'""';if(E===1){return typeof v[0]==="string"?JSON.stringify(v[0]):`"" + ${v[0].expr}`}if(!this.supportTemplateLiteral())return this._es5Concatenation(v);let R=0;let $=0;let j=false;for(const E of v){const v=typeof E!=="string";if(v){R+=3;$+=j?1:4}j=v}if(j)$-=3;if(typeof v[0]!=="string"&&typeof v[1]==="string")$-=3;if($<=R)return this._es5Concatenation(v);return`\`${v.map((v=>typeof v==="string"?v:`\${${v.expr}}`)).join("")}\``}_es5Concatenation(v){const E=v.map((v=>typeof v==="string"?JSON.stringify(v):v.expr)).join(" + ");return typeof v[0]!=="string"&&typeof v[1]!=="string"?`"" + ${E}`:E}expressionFunction(v,E=""){return this.supportsArrowFunction()?`(${E}) => (${v})`:`function(${E}) { ${v}; }`}emptyFunction(){return this.supportsArrowFunction()?"x => {}":"function() {}"}destructureArray(v,E){return this.supportsDestructuring()?`var [${v.join(", ")}] = ${E};`:N.asString(v.map(((v,R)=>`var ${v} = ${E}[${R}];`)))}destructureObject(v,E){return this.supportsDestructuring()?`var {${v.join(", ")}} = ${E};`:N.asString(v.map((v=>`var ${v} = ${E}${ie([v])};`)))}iife(v,E){return`(${this.basicFunction(v,E)})()`}forEach(v,E,R){return this.supportsForOf()?`for(const ${v} of ${E}) {\n${N.indent(R)}\n}`:`${E}.forEach(function(${v}) {\n${N.indent(R)}\n});`}comment({request:v,chunkName:E,chunkReason:R,message:$,exportName:j}){let q;if(this.outputOptions.pathinfo){q=[$,v,E,R].filter(Boolean).map((v=>this.requestShortener.shorten(v))).join(" | ")}else{q=[$,E,R].filter(Boolean).map((v=>this.requestShortener.shorten(v))).join(" | ")}if(!q)return"";if(this.outputOptions.pathinfo){return N.toComment(q)+" "}else{return N.toNormalComment(q)+" "}}throwMissingModuleErrorBlock({request:v}){const E=`Cannot find module '${v}'`;return`var e = new Error(${JSON.stringify(E)}); e.code = 'MODULE_NOT_FOUND'; throw e;`}throwMissingModuleErrorFunction({request:v}){return`function webpackMissingModule() { ${this.throwMissingModuleErrorBlock({request:v})} }`}missingModule({request:v}){return`Object(${this.throwMissingModuleErrorFunction({request:v})}())`}missingModuleStatement({request:v}){return`${this.missingModule({request:v})};\n`}missingModulePromise({request:v}){return`Promise.resolve().then(${this.throwMissingModuleErrorFunction({request:v})})`}weakError({module:v,chunkGraph:E,request:R,idExpr:$,type:j}){const q=E.getModuleId(v);const G=q===null?JSON.stringify("Module is not available (weak dependency)"):$?`"Module '" + ${$} + "' is not available (weak dependency)"`:JSON.stringify(`Module '${q}' is not available (weak dependency)`);const ie=R?N.toNormalComment(R)+" ":"";const ae=`var e = new Error(${G}); `+ie+"e.code = 'MODULE_NOT_FOUND'; throw e;";switch(j){case"statements":return ae;case"promise":return`Promise.resolve().then(${this.basicFunction("",ae)})`;case"expression":return this.iife("",ae)}}moduleId({module:v,chunkGraph:E,request:R,weak:$}){if(!v){return this.missingModule({request:R})}const j=E.getModuleId(v);if(j===null){if($){return"null /* weak dependency, without id */"}throw new Error(`RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage(v,E)}`)}return`${this.comment({request:R})}${JSON.stringify(j)}`}moduleRaw({module:v,chunkGraph:E,request:R,weak:$,runtimeRequirements:N}){if(!v){return this.missingModule({request:R})}const q=E.getModuleId(v);if(q===null){if($){return this.weakError({module:v,chunkGraph:E,request:R,type:"expression"})}throw new Error(`RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage(v,E)}`)}N.add(j.require);return`__webpack_require__(${this.moduleId({module:v,chunkGraph:E,request:R,weak:$})})`}moduleExports({module:v,chunkGraph:E,request:R,weak:$,runtimeRequirements:j}){return this.moduleRaw({module:v,chunkGraph:E,request:R,weak:$,runtimeRequirements:j})}moduleNamespace({module:v,chunkGraph:E,request:R,strict:$,weak:N,runtimeRequirements:q}){if(!v){return this.missingModule({request:R})}if(E.getModuleId(v)===null){if(N){return this.weakError({module:v,chunkGraph:E,request:R,type:"expression"})}throw new Error(`RuntimeTemplate.moduleNamespace(): ${noModuleIdErrorMessage(v,E)}`)}const G=this.moduleId({module:v,chunkGraph:E,request:R,weak:N});const ie=v.getExportsType(E.moduleGraph,$);switch(ie){case"namespace":return this.moduleRaw({module:v,chunkGraph:E,request:R,weak:N,runtimeRequirements:q});case"default-with-named":q.add(j.createFakeNamespaceObject);return`${j.createFakeNamespaceObject}(${G}, 3)`;case"default-only":q.add(j.createFakeNamespaceObject);return`${j.createFakeNamespaceObject}(${G}, 1)`;case"dynamic":q.add(j.createFakeNamespaceObject);return`${j.createFakeNamespaceObject}(${G}, 7)`}}moduleNamespacePromise({chunkGraph:v,block:E,module:R,request:$,message:N,strict:q,weak:G,runtimeRequirements:ie}){if(!R){return this.missingModulePromise({request:$})}const ae=v.getModuleId(R);if(ae===null){if(G){return this.weakError({module:R,chunkGraph:v,request:$,type:"promise"})}throw new Error(`RuntimeTemplate.moduleNamespacePromise(): ${noModuleIdErrorMessage(R,v)}`)}const ce=this.blockPromise({chunkGraph:v,block:E,message:N,runtimeRequirements:ie});let le;let me=JSON.stringify(v.getModuleId(R));const _e=this.comment({request:$});let Ie="";if(G){if(me.length>8){Ie+=`var id = ${me}; `;me="id"}ie.add(j.moduleFactories);Ie+=`if(!${j.moduleFactories}[${me}]) { ${this.weakError({module:R,chunkGraph:v,request:$,idExpr:me,type:"statements"})} } `}const Me=this.moduleId({module:R,chunkGraph:v,request:$,weak:G});const Oe=R.getExportsType(v.moduleGraph,q);let Te=16;switch(Oe){case"namespace":if(Ie){const E=this.moduleRaw({module:R,chunkGraph:v,request:$,weak:G,runtimeRequirements:ie});le=`.then(${this.basicFunction("",`${Ie}return ${E};`)})`}else{ie.add(j.require);le=`.then(__webpack_require__.bind(__webpack_require__, ${_e}${me}))`}break;case"dynamic":Te|=4;case"default-with-named":Te|=2;case"default-only":ie.add(j.createFakeNamespaceObject);if(v.moduleGraph.isAsync(R)){if(Ie){const E=this.moduleRaw({module:R,chunkGraph:v,request:$,weak:G,runtimeRequirements:ie});le=`.then(${this.basicFunction("",`${Ie}return ${E};`)})`}else{ie.add(j.require);le=`.then(__webpack_require__.bind(__webpack_require__, ${_e}${me}))`}le+=`.then(${this.returningFunction(`${j.createFakeNamespaceObject}(m, ${Te})`,"m")})`}else{Te|=1;if(Ie){const v=`${j.createFakeNamespaceObject}(${Me}, ${Te})`;le=`.then(${this.basicFunction("",`${Ie}return ${v};`)})`}else{le=`.then(${j.createFakeNamespaceObject}.bind(__webpack_require__, ${_e}${me}, ${Te}))`}}break}return`${ce||"Promise.resolve()"}${le}`}runtimeConditionExpression({chunkGraph:v,runtimeCondition:E,runtime:R,runtimeRequirements:$}){if(E===undefined)return"true";if(typeof E==="boolean")return`${E}`;const N=new Set;ae(E,(E=>N.add(`${v.getRuntimeId(E)}`)));const q=new Set;ae(ce(R,E),(E=>q.add(`${v.getRuntimeId(E)}`)));$.add(j.runtimeId);return G.fromLists(Array.from(N),Array.from(q))(j.runtimeId)}importStatement({update:v,module:E,chunkGraph:R,request:$,importVar:N,originModule:q,weak:G,runtimeRequirements:ie}){if(!E){return[this.missingModuleStatement({request:$}),""]}if(R.getModuleId(E)===null){if(G){return[this.weakError({module:E,chunkGraph:R,request:$,type:"statements"}),""]}throw new Error(`RuntimeTemplate.importStatement(): ${noModuleIdErrorMessage(E,R)}`)}const ae=this.moduleId({module:E,chunkGraph:R,request:$,weak:G});const ce=v?"":"var ";const le=E.getExportsType(R.moduleGraph,q.buildMeta.strictHarmonyModule);ie.add(j.require);const me=`/* harmony import */ ${ce}${N} = __webpack_require__(${ae});\n`;if(le==="dynamic"){ie.add(j.compatGetDefaultExport);return[me,`/* harmony import */ ${ce}${N}_default = /*#__PURE__*/${j.compatGetDefaultExport}(${N});\n`]}return[me,""]}exportFromImport({moduleGraph:v,module:E,request:R,exportName:G,originModule:ae,asiSafe:ce,isCall:le,callContext:me,defaultInterop:_e,importVar:Ie,initFragments:Me,runtime:Oe,runtimeRequirements:Te}){if(!E){return this.missingModule({request:R})}if(!Array.isArray(G)){G=G?[G]:[]}const Ne=E.getExportsType(v,ae.buildMeta.strictHarmonyModule);if(_e){if(G.length>0&&G[0]==="default"){switch(Ne){case"dynamic":if(le){return`${Ie}_default()${ie(G,1)}`}else{return ce?`(${Ie}_default()${ie(G,1)})`:ce===false?`;(${Ie}_default()${ie(G,1)})`:`${Ie}_default.a${ie(G,1)}`}case"default-only":case"default-with-named":G=G.slice(1);break}}else if(G.length>0){if(Ne==="default-only"){return"/* non-default import from non-esm module */undefined"+ie(G,1)}else if(Ne!=="namespace"&&G[0]==="__esModule"){return"/* __esModule */true"}}else if(Ne==="default-only"||Ne==="default-with-named"){Te.add(j.createFakeNamespaceObject);Me.push(new $(`var ${Ie}_namespace_cache;\n`,$.STAGE_CONSTANTS,-1,`${Ie}_namespace_cache`));return`/*#__PURE__*/ ${ce?"":ce===false?";":"Object"}(${Ie}_namespace_cache || (${Ie}_namespace_cache = ${j.createFakeNamespaceObject}(${Ie}${Ne==="default-only"?"":", 2"})))`}}if(G.length>0){const R=v.getExportsInfo(E);const $=R.getUsedName(G,Oe);if(!$){const v=N.toNormalComment(`unused export ${ie(G)}`);return`${v} undefined`}const j=q($,G)?"":N.toNormalComment(ie(G))+" ";const ae=`${Ie}${j}${ie($)}`;if(le&&me===false){return ce?`(0,${ae})`:ce===false?`;(0,${ae})`:`/*#__PURE__*/Object(${ae})`}return ae}else{return Ie}}blockPromise({block:v,message:E,chunkGraph:R,runtimeRequirements:$}){if(!v){const v=this.comment({message:E});return`Promise.resolve(${v.trim()})`}const N=R.getBlockChunkGroup(v);if(!N||N.chunks.length===0){const v=this.comment({message:E});return`Promise.resolve(${v.trim()})`}const q=N.chunks.filter((v=>!v.hasRuntime()&&v.id!==null));const G=this.comment({message:E,chunkName:v.chunkName});if(q.length===1){const v=JSON.stringify(q[0].id);$.add(j.ensureChunk);return`${j.ensureChunk}(${G}${v})`}else if(q.length>0){$.add(j.ensureChunk);const requireChunkId=v=>`${j.ensureChunk}(${JSON.stringify(v.id)})`;return`Promise.all(${G.trim()}[${q.map(requireChunkId).join(", ")}])`}else{return`Promise.resolve(${G.trim()})`}}asyncModuleFactory({block:v,chunkGraph:E,runtimeRequirements:R,request:$}){const j=v.dependencies[0];const N=E.moduleGraph.getModule(j);const q=this.blockPromise({block:v,message:"",chunkGraph:E,runtimeRequirements:R});const G=this.returningFunction(this.moduleRaw({module:N,chunkGraph:E,request:$,runtimeRequirements:R}));return this.returningFunction(q.startsWith("Promise.resolve(")?`${G}`:`${q}.then(${this.returningFunction(G)})`)}syncModuleFactory({dependency:v,chunkGraph:E,runtimeRequirements:R,request:$}){const j=E.moduleGraph.getModule(v);const N=this.returningFunction(this.moduleRaw({module:j,chunkGraph:E,request:$,runtimeRequirements:R}));return this.returningFunction(N)}defineEsModuleFlagStatement({exportsArgument:v,runtimeRequirements:E}){E.add(j.makeNamespaceObject);E.add(j.exports);return`${j.makeNamespaceObject}(${v});\n`}assetUrl({publicPath:v,runtime:E,module:R,codeGenerationResults:$}){if(!R){return"data:,"}const j=$.get(R,E);const{data:N}=j;const q=N.get("url");if(q)return q.toString();const G=N.get("filename");return v+G}}v.exports=RuntimeTemplate},75193:function(v){"use strict";class SelfModuleFactory{constructor(v){this.moduleGraph=v}create(v,E){const R=this.moduleGraph.getParentModule(v.dependencies[0]);E(null,{module:R})}}v.exports=SelfModuleFactory},25928:function(v,E,R){"use strict";v.exports=R(19360)},67309:function(v,E){"use strict";E.formatSize=v=>{if(typeof v!=="number"||Number.isNaN(v)===true){return"unknown size"}if(v<=0){return"0 bytes"}const E=["bytes","KiB","MiB","GiB"];const R=Math.floor(Math.log(v)/Math.log(1024));return`${+(v/Math.pow(1024,R)).toPrecision(3)} ${E[R]}`}},44717:function(v,E,R){"use strict";const $=R(36109);class SourceMapDevToolModuleOptionsPlugin{constructor(v){this.options=v}apply(v){const E=this.options;if(E.module!==false){v.hooks.buildModule.tap("SourceMapDevToolModuleOptionsPlugin",(v=>{v.useSourceMap=true}));v.hooks.runtimeModule.tap("SourceMapDevToolModuleOptionsPlugin",(v=>{v.useSourceMap=true}))}else{v.hooks.buildModule.tap("SourceMapDevToolModuleOptionsPlugin",(v=>{v.useSimpleSourceMap=true}));v.hooks.runtimeModule.tap("SourceMapDevToolModuleOptionsPlugin",(v=>{v.useSimpleSourceMap=true}))}$.getCompilationHooks(v).useSourceMap.tap("SourceMapDevToolModuleOptionsPlugin",(()=>true))}}v.exports=SourceMapDevToolModuleOptionsPlugin},63645:function(v,E,R){"use strict";const $=R(78175);const{ConcatSource:j,RawSource:N}=R(51255);const q=R(73002);const G=R(99523);const ie=R(67317);const ae=R(44717);const ce=R(89699);const le=R(85205);const{relative:me,dirname:_e}=R(47077);const{makePathsAbsolute:Ie}=R(20162);const Me=ce(R(74633),(()=>R(52816)),{name:"SourceMap DevTool Plugin",baseDataPath:"options"});const quoteMeta=v=>v.replace(/[-[\]\\/{}()*+?.^$|]/g,"\\$&");const getTaskForFile=(v,E,R,$,j,N)=>{let q;let G;if(E.sourceAndMap){const v=E.sourceAndMap($);G=v.map;q=v.source}else{G=E.map($);q=E.source()}if(!G||typeof q!=="string")return;const ie=j.options.context;const ae=j.compiler.root;const ce=Ie.bindContextCache(ie,ae);const le=G.sources.map((v=>{if(!v.startsWith("webpack://"))return v;v=ce(v.slice(10));const E=j.findModule(v);return E||v}));return{file:v,asset:E,source:q,assetInfo:R,sourceMap:G,modules:le,cacheItem:N}};class SourceMapDevToolPlugin{constructor(v={}){Me(v);this.sourceMapFilename=v.filename;this.sourceMappingURLComment=v.append===false?false:v.append||"\n//# source"+"MappingURL=[url]";this.moduleFilenameTemplate=v.moduleFilenameTemplate||"webpack://[namespace]/[resourcePath]";this.fallbackModuleFilenameTemplate=v.fallbackModuleFilenameTemplate||"webpack://[namespace]/[resourcePath]?[hash]";this.namespace=v.namespace||"";this.options=v}apply(v){const E=v.outputFileSystem;const R=this.sourceMapFilename;const ce=this.sourceMappingURLComment;const Ie=this.moduleFilenameTemplate;const Me=this.namespace;const Oe=this.fallbackModuleFilenameTemplate;const Te=v.requestShortener;const Ne=this.options;Ne.test=Ne.test||/\.((c|m)?js|css)($|\?)/i;const Be=G.matchObject.bind(undefined,Ne);v.hooks.compilation.tap("SourceMapDevToolPlugin",(v=>{new ae(Ne).apply(v);v.hooks.processAssets.tapAsync({name:"SourceMapDevToolPlugin",stage:q.PROCESS_ASSETS_STAGE_DEV_TOOLING,additionalAssets:true},((q,ae)=>{const Le=v.chunkGraph;const qe=v.getCache("SourceMapDevToolPlugin");const Ue=new Map;const Ge=ie.getReporter(v.compiler)||(()=>{});const He=new Map;for(const E of v.chunks){for(const v of E.files){He.set(v,E)}for(const v of E.auxiliaryFiles){He.set(v,E)}}const We=[];for(const v of Object.keys(q)){if(Be(v)){We.push(v)}}Ge(0);const Qe=[];let Je=0;$.each(We,((E,R)=>{const $=v.getAsset(E);if($.info.related&&$.info.related.sourceMap){Je++;return R()}const j=qe.getItemCache(E,qe.mergeEtags(qe.getLazyHashedEtag($.source),Me));j.get(((N,q)=>{if(N){return R(N)}if(q){const{assets:$,assetsInfo:j}=q;for(const R of Object.keys($)){if(R===E){v.updateAsset(R,$[R],j[R])}else{v.emitAsset(R,$[R],j[R])}if(R!==E){const v=He.get(E);if(v!==undefined)v.auxiliaryFiles.add(R)}}Ge(.5*++Je/We.length,E,"restored cached SourceMap");return R()}Ge(.5*Je/We.length,E,"generate SourceMap");const ie=getTaskForFile(E,$.source,$.info,{module:Ne.module,columns:Ne.columns},v,j);if(ie){const E=ie.modules;for(let R=0;R{if(q){return ae(q)}Ge(.5,"resolve sources");const ie=new Set(Ue.values());const Ie=new Set;const Be=Array.from(Ue.keys()).sort(((v,E)=>{const R=typeof v==="string"?v:v.identifier();const $=typeof E==="string"?E:E.identifier();return R.length-$.length}));for(let E=0;E{const G=Object.create(null);const ie=Object.create(null);const ae=$.file;const Ie=He.get(ae);const Me=$.sourceMap;const Oe=$.source;const Te=$.modules;Ge(.5+.5*qe/Qe.length,ae,"attach SourceMap");const Be=Te.map((v=>Ue.get(v)));Me.sources=Be;if(Ne.noSources){Me.sourcesContent=undefined}Me.sourceRoot=Ne.sourceRoot||"";Me.file=ae;const Le=R&&/\[contenthash(:\w+)?\]/.test(R);if(Le&&$.assetInfo.contenthash){const v=$.assetInfo.contenthash;let E;if(Array.isArray(v)){E=v.map(quoteMeta).join("|")}else{E=quoteMeta(v)}Me.file=Me.file.replace(new RegExp(E,"g"),(v=>"x".repeat(v.length)))}let We=ce;if(We!==false&&/\.css($|\?)/i.test(ae)){We=We.replace(/^\n\/\/(.*)$/,"\n/*$1*/")}const Je=JSON.stringify(Me);if(R){let $=ae;const q=Le&&le(v.outputOptions.hashFunction).update(Je).digest("hex");const ce={chunk:Ie,filename:Ne.fileContext?me(E,`/${Ne.fileContext}`,`/${$}`):$,contentHash:q};const{path:Me,info:Te}=v.getPathWithInfo(R,ce);const Be=Ne.publicPath?Ne.publicPath+Me:me(E,_e(E,`/${ae}`),`/${Me}`);let qe=new N(Oe);if(We!==false){qe=new j(qe,v.getPath(We,Object.assign({url:Be},ce)))}const Ue={related:{sourceMap:Me}};G[ae]=qe;ie[ae]=Ue;v.updateAsset(ae,qe,Ue);const Ge=new N(Je);const He={...Te,development:true};G[Me]=Ge;ie[Me]=He;v.emitAsset(Me,Ge,He);if(Ie!==undefined)Ie.auxiliaryFiles.add(Me)}else{if(We===false){throw new Error("SourceMapDevToolPlugin: append can't be false when no filename is provided")}const E=new j(new N(Oe),We.replace(/\[map\]/g,(()=>Je)).replace(/\[url\]/g,(()=>`data:application/json;charset=utf-8;base64,${Buffer.from(Je,"utf-8").toString("base64")}`)));G[ae]=E;ie[ae]=undefined;v.updateAsset(ae,E)}$.cacheItem.store({assets:G,assetsInfo:ie},(v=>{Ge(.5+.5*++qe/Qe.length,$.file,"attached SourceMap");if(v){return q(v)}q()}))}),(v=>{Ge(1);ae(v)}))}))}))}))}}v.exports=SourceMapDevToolPlugin},47158:function(v){"use strict";class Stats{constructor(v){this.compilation=v}get hash(){return this.compilation.hash}get startTime(){return this.compilation.startTime}get endTime(){return this.compilation.endTime}hasWarnings(){return this.compilation.warnings.length>0||this.compilation.children.some((v=>v.getStats().hasWarnings()))}hasErrors(){return this.compilation.errors.length>0||this.compilation.children.some((v=>v.getStats().hasErrors()))}toJson(v){v=this.compilation.createStatsOptions(v,{forToString:false});const E=this.compilation.createStatsFactory(v);return E.create("compilation",this.compilation,{compilation:this.compilation})}toString(v){v=this.compilation.createStatsOptions(v,{forToString:true});const E=this.compilation.createStatsFactory(v);const R=this.compilation.createStatsPrinter(v);const $=E.create("compilation",this.compilation,{compilation:this.compilation});const j=R.print("compilation",$);return j===undefined?"":j}}v.exports=Stats},43841:function(v,E,R){"use strict";const{ConcatSource:$,PrefixSource:j}=R(51255);const N="a".charCodeAt(0);const q="A".charCodeAt(0);const G="z".charCodeAt(0)-N+1;const ie=G*2+2;const ae=ie+10;const ce=/^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g;const le=/^\t/gm;const me=/\r?\n/g;const _e=/^([^a-zA-Z$_])/;const Ie=/[^a-zA-Z0-9$]+/g;const Me=/\*\//g;const Oe=/[^a-zA-Z0-9_!§$()=\-^°]+/g;const Te=/^-|-$/g;class Template{static getFunctionContent(v){return v.toString().replace(ce,"").replace(le,"").replace(me,"\n")}static toIdentifier(v){if(typeof v!=="string")return"";return v.replace(_e,"_$1").replace(Ie,"_")}static toComment(v){if(!v)return"";return`/*! ${v.replace(Me,"* /")} */`}static toNormalComment(v){if(!v)return"";return`/* ${v.replace(Me,"* /")} */`}static toPath(v){if(typeof v!=="string")return"";return v.replace(Oe,"-").replace(Te,"")}static numberToIdentifier(v){if(v>=ie){return Template.numberToIdentifier(v%ie)+Template.numberToIdentifierContinuation(Math.floor(v/ie))}if(v=ae){return Template.numberToIdentifierContinuation(v%ae)+Template.numberToIdentifierContinuation(Math.floor(v/ae))}if(vv)R=v}if(R<16+(""+R).length){R=0}let $=-1;for(const E of v){$+=`${E.id}`.length+2}const j=R===0?E:16+`${R}`.length+E;return j<$?[R,E]:false}static renderChunkModules(v,E,R,j=""){const{chunkGraph:N}=v;var q=new $;if(E.length===0){return null}const G=E.map((v=>({id:N.getModuleId(v),source:R(v)||"false"})));const ie=Template.getModulesArrayBounds(G);if(ie){const v=ie[0];const E=ie[1];if(v!==0){q.add(`Array(${v}).concat(`)}q.add("[\n");const R=new Map;for(const v of G){R.set(v.id,v)}for(let $=v;$<=E;$++){const E=R.get($);if($!==v){q.add(",\n")}q.add(`/* ${$} */`);if(E){q.add("\n");q.add(E.source)}}q.add("\n"+j+"]");if(v!==0){q.add(")")}}else{q.add("{\n");for(let v=0;v {\n");R.add(new j("\t",N));R.add("\n})();\n\n")}else{R.add("!function() {\n");R.add(new j("\t",N));R.add("\n}();\n\n")}}}return R}static renderChunkRuntimeModules(v,E){return new j("/******/ ",new $("function(__webpack_require__) { // webpackRuntimeModules\n",this.renderRuntimeModules(v,E),"}\n"))}}v.exports=Template;v.exports.NUMBER_OF_IDENTIFIER_START_CHARS=ie;v.exports.NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS=ae},78055:function(v,E,R){"use strict";const $=R(92414);const{basename:j,extname:N}=R(71017);const q=R(73837);const G=R(84891);const ie=R(53840);const{parseResource:ae}=R(20162);const ce=/\[\\*([\w:]+)\\*\]/gi;const prepareId=v=>{if(typeof v!=="string")return v;if(/^"\s\+*.*\+\s*"$/.test(v)){const E=/^"\s\+*\s*(.*)\s*\+\s*"$/.exec(v);return`" + (${E[1]} + "").replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_") + "`}return v.replace(/(^[.-]|[^a-zA-Z0-9_-])+/g,"_")};const hashLength=(v,E,R,$)=>{const fn=(j,N,q)=>{let G;const ie=N&&parseInt(N,10);if(ie&&E){G=E(ie)}else{const E=v(j,N,q);G=ie?E.slice(0,ie):E}if(R){R.immutable=true;if(Array.isArray(R[$])){R[$]=[...R[$],G]}else if(R[$]){R[$]=[R[$],G]}else{R[$]=G}}return G};return fn};const replacer=(v,E)=>{const fn=(R,$,j)=>{if(typeof v==="function"){v=v()}if(v===null||v===undefined){if(!E){throw new Error(`Path variable ${R} not implemented in this context: ${j}`)}return""}else{return`${v}`}};return fn};const le=new Map;const me=(()=>()=>{})();const deprecated=(v,E,R)=>{let $=le.get(E);if($===undefined){$=q.deprecate(me,E,R);le.set(E,$)}return(...E)=>{$();return v(...E)}};const replacePathVariables=(v,E,R)=>{const q=E.chunkGraph;const le=new Map;if(typeof E.filename==="string"){let v=E.filename.match(/^data:([^;,]+)/);if(v){const E=$.extension(v[1]);const R=replacer("",true);le.set("file",R);le.set("query",R);le.set("fragment",R);le.set("path",R);le.set("base",R);le.set("name",R);le.set("ext",replacer(E?`.${E}`:"",true));le.set("filebase",deprecated(R,"[filebase] is now [base]","DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_FILENAME"))}else{const{path:v,query:R,fragment:$}=ae(E.filename);const q=N(v);const G=j(v);const ie=G.slice(0,G.length-q.length);const ce=v.slice(0,v.length-G.length);le.set("file",replacer(v));le.set("query",replacer(R,true));le.set("fragment",replacer($,true));le.set("path",replacer(ce,true));le.set("base",replacer(G));le.set("name",replacer(ie));le.set("ext",replacer(q,true));le.set("filebase",deprecated(replacer(G),"[filebase] is now [base]","DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_FILENAME"))}}if(E.hash){const v=hashLength(replacer(E.hash),E.hashWithLength,R,"fullhash");le.set("fullhash",v);le.set("hash",deprecated(v,"[hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)","DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH"))}if(E.chunk){const v=E.chunk;const $=E.contentHashType;const j=replacer(v.id);const N=replacer(v.name||v.id);const q=hashLength(replacer(v instanceof G?v.renderedHash:v.hash),"hashWithLength"in v?v.hashWithLength:undefined,R,"chunkhash");const ie=hashLength(replacer(E.contentHash||$&&v.contentHash&&v.contentHash[$]),E.contentHashWithLength||("contentHashWithLength"in v&&v.contentHashWithLength?v.contentHashWithLength[$]:undefined),R,"contenthash");le.set("id",j);le.set("name",N);le.set("chunkhash",q);le.set("contenthash",ie)}if(E.module){const v=E.module;const $=replacer((()=>prepareId(v instanceof ie?q.getModuleId(v):v.id)));const j=hashLength(replacer((()=>v instanceof ie?q.getRenderedModuleHash(v,E.runtime):v.hash)),"hashWithLength"in v?v.hashWithLength:undefined,R,"modulehash");const N=hashLength(replacer(E.contentHash),undefined,R,"contenthash");le.set("id",$);le.set("modulehash",j);le.set("contenthash",N);le.set("hash",E.contentHash?N:j);le.set("moduleid",deprecated($,"[moduleid] is now [id]","DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_MODULE_ID"))}if(E.url){le.set("url",replacer(E.url))}if(typeof E.runtime==="string"){le.set("runtime",replacer((()=>prepareId(E.runtime))))}else{le.set("runtime",replacer("_"))}if(typeof v==="function"){v=v(E,R)}v=v.replace(ce,((E,R)=>{if(R.length+2===E.length){const $=/^(\w+)(?::(\w+))?$/.exec(R);if(!$)return E;const[,j,N]=$;const q=le.get(j);if(q!==undefined){return q(E,N,v)}}else if(E.startsWith("[\\")&&E.endsWith("\\]")){return`[${E.slice(2,-2)}]`}return E}));return v};const _e="TemplatedPathPlugin";class TemplatedPathPlugin{apply(v){v.hooks.compilation.tap(_e,(v=>{v.hooks.assetPath.tap(_e,replacePathVariables)}))}}v.exports=TemplatedPathPlugin},69898:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class UnhandledSchemeError extends ${constructor(v,E){super(`Reading from "${E}" is not handled by plugins (Unhandled scheme).`+'\nWebpack supports "data:" and "file:" URIs by default.'+`\nYou may need an additional plugin to handle "${v}:" URIs.`);this.file=E;this.name="UnhandledSchemeError"}}j(UnhandledSchemeError,"webpack/lib/UnhandledSchemeError","UnhandledSchemeError");v.exports=UnhandledSchemeError},17623:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class UnsupportedFeatureWarning extends ${constructor(v,E){super(v);this.name="UnsupportedFeatureWarning";this.loc=E;this.hideStack=true}}j(UnsupportedFeatureWarning,"webpack/lib/UnsupportedFeatureWarning");v.exports=UnsupportedFeatureWarning},67142:function(v,E,R){"use strict";const $=R(14367);class UseStrictPlugin{apply(v){v.hooks.compilation.tap("UseStrictPlugin",((v,{normalModuleFactory:E})=>{const handler=v=>{v.hooks.program.tap("UseStrictPlugin",(E=>{const R=E.body[0];if(R&&R.type==="ExpressionStatement"&&R.expression.type==="Literal"&&R.expression.value==="use strict"){const E=new $("",R.range);E.loc=R.loc;v.state.module.addPresentationalDependency(E);v.state.module.buildInfo.strict=true}}))};E.hooks.parser.for("javascript/auto").tap("UseStrictPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("UseStrictPlugin",handler);E.hooks.parser.for("javascript/esm").tap("UseStrictPlugin",handler)}))}}v.exports=UseStrictPlugin},57804:function(v,E,R){"use strict";const $=R(36715);class WarnCaseSensitiveModulesPlugin{apply(v){v.hooks.compilation.tap("WarnCaseSensitiveModulesPlugin",(v=>{v.hooks.seal.tap("WarnCaseSensitiveModulesPlugin",(()=>{const E=new Map;for(const R of v.modules){const v=R.identifier();const $=v.toLowerCase();let j=E.get($);if(j===undefined){j=new Map;E.set($,j)}j.set(v,R)}for(const R of E){const E=R[1];if(E.size>1){v.warnings.push(new $(E.values(),v.moduleGraph))}}}))}))}}v.exports=WarnCaseSensitiveModulesPlugin},31481:function(v,E,R){"use strict";const $=R(27154);class WarnDeprecatedOptionPlugin{constructor(v,E,R){this.option=v;this.value=E;this.suggestion=R}apply(v){v.hooks.thisCompilation.tap("WarnDeprecatedOptionPlugin",(v=>{v.warnings.push(new DeprecatedOptionWarning(this.option,this.value,this.suggestion))}))}}class DeprecatedOptionWarning extends ${constructor(v,E,R){super();this.name="DeprecatedOptionWarning";this.message="configuration\n"+`The value '${E}' for option '${v}' is deprecated. `+`Use '${R}' instead.`}}v.exports=WarnDeprecatedOptionPlugin},28763:function(v,E,R){"use strict";const $=R(95656);class WarnNoModeSetPlugin{apply(v){v.hooks.thisCompilation.tap("WarnNoModeSetPlugin",(v=>{v.warnings.push(new $)}))}}v.exports=WarnNoModeSetPlugin},4179:function(v,E,R){"use strict";const{groupBy:$}=R(28087);const j=R(89699);const N=j(R(1553),(()=>R(14814)),{name:"Watch Ignore Plugin",baseDataPath:"options"});const q="ignore";class IgnoringWatchFileSystem{constructor(v,E){this.wfs=v;this.paths=E}watch(v,E,R,j,N,G,ie){v=Array.from(v);E=Array.from(E);const ignored=v=>this.paths.some((E=>E instanceof RegExp?E.test(v):v.indexOf(E)===0));const[ae,ce]=$(v,ignored);const[le,me]=$(E,ignored);const _e=this.wfs.watch(ce,me,R,j,N,((v,E,R,$,j)=>{if(v)return G(v);for(const v of ae){E.set(v,q)}for(const v of le){R.set(v,q)}G(v,E,R,$,j)}),ie);return{close:()=>_e.close(),pause:()=>_e.pause(),getContextTimeInfoEntries:()=>{const v=_e.getContextTimeInfoEntries();for(const E of le){v.set(E,q)}return v},getFileTimeInfoEntries:()=>{const v=_e.getFileTimeInfoEntries();for(const E of ae){v.set(E,q)}return v},getInfo:_e.getInfo&&(()=>{const v=_e.getInfo();const{fileTimeInfoEntries:E,contextTimeInfoEntries:R}=v;for(const v of ae){E.set(v,q)}for(const v of le){R.set(v,q)}return v})}}}class WatchIgnorePlugin{constructor(v){N(v);this.paths=v.paths}apply(v){v.hooks.afterEnvironment.tap("WatchIgnorePlugin",(()=>{v.watchFileSystem=new IgnoringWatchFileSystem(v.watchFileSystem,this.paths)}))}}v.exports=WatchIgnorePlugin},50313:function(v,E,R){"use strict";const $=R(47158);class Watching{constructor(v,E,R){this.startTime=null;this.invalid=false;this.handler=R;this.callbacks=[];this._closeCallbacks=undefined;this.closed=false;this.suspended=false;this.blocked=false;this._isBlocked=()=>false;this._onChange=()=>{};this._onInvalid=()=>{};if(typeof E==="number"){this.watchOptions={aggregateTimeout:E}}else if(E&&typeof E==="object"){this.watchOptions={...E}}else{this.watchOptions={}}if(typeof this.watchOptions.aggregateTimeout!=="number"){this.watchOptions.aggregateTimeout=20}this.compiler=v;this.running=false;this._initial=true;this._invalidReported=true;this._needRecords=true;this.watcher=undefined;this.pausedWatcher=undefined;this._collectedChangedFiles=undefined;this._collectedRemovedFiles=undefined;this._done=this._done.bind(this);process.nextTick((()=>{if(this._initial)this._invalidate()}))}_mergeWithCollected(v,E){if(!v)return;if(!this._collectedChangedFiles){this._collectedChangedFiles=new Set(v);this._collectedRemovedFiles=new Set(E)}else{for(const E of v){this._collectedChangedFiles.add(E);this._collectedRemovedFiles.delete(E)}for(const v of E){this._collectedChangedFiles.delete(v);this._collectedRemovedFiles.add(v)}}}_go(v,E,R,j){this._initial=false;if(this.startTime===null)this.startTime=Date.now();this.running=true;if(this.watcher){this.pausedWatcher=this.watcher;this.lastWatcherStartTime=Date.now();this.watcher.pause();this.watcher=null}else if(!this.lastWatcherStartTime){this.lastWatcherStartTime=Date.now()}this.compiler.fsStartTime=Date.now();if(R&&j&&v&&E){this._mergeWithCollected(R,j);this.compiler.fileTimestamps=v;this.compiler.contextTimestamps=E}else if(this.pausedWatcher){if(this.pausedWatcher.getInfo){const{changes:v,removals:E,fileTimeInfoEntries:R,contextTimeInfoEntries:$}=this.pausedWatcher.getInfo();this._mergeWithCollected(v,E);this.compiler.fileTimestamps=R;this.compiler.contextTimestamps=$}else{this._mergeWithCollected(this.pausedWatcher.getAggregatedChanges&&this.pausedWatcher.getAggregatedChanges(),this.pausedWatcher.getAggregatedRemovals&&this.pausedWatcher.getAggregatedRemovals());this.compiler.fileTimestamps=this.pausedWatcher.getFileTimeInfoEntries();this.compiler.contextTimestamps=this.pausedWatcher.getContextTimeInfoEntries()}}this.compiler.modifiedFiles=this._collectedChangedFiles;this._collectedChangedFiles=undefined;this.compiler.removedFiles=this._collectedRemovedFiles;this._collectedRemovedFiles=undefined;const run=()=>{if(this.compiler.idle){return this.compiler.cache.endIdle((v=>{if(v)return this._done(v);this.compiler.idle=false;run()}))}if(this._needRecords){return this.compiler.readRecords((v=>{if(v)return this._done(v);this._needRecords=false;run()}))}this.invalid=false;this._invalidReported=false;this.compiler.hooks.watchRun.callAsync(this.compiler,(v=>{if(v)return this._done(v);const onCompiled=(v,E)=>{if(v)return this._done(v,E);if(this.invalid)return this._done(null,E);if(this.compiler.hooks.shouldEmit.call(E)===false){return this._done(null,E)}process.nextTick((()=>{const v=E.getLogger("webpack.Compiler");v.time("emitAssets");this.compiler.emitAssets(E,(R=>{v.timeEnd("emitAssets");if(R)return this._done(R,E);if(this.invalid)return this._done(null,E);v.time("emitRecords");this.compiler.emitRecords((R=>{v.timeEnd("emitRecords");if(R)return this._done(R,E);if(E.hooks.needAdditionalPass.call()){E.needAdditionalPass=true;E.startTime=this.startTime;E.endTime=Date.now();v.time("done hook");const R=new $(E);this.compiler.hooks.done.callAsync(R,(R=>{v.timeEnd("done hook");if(R)return this._done(R,E);this.compiler.hooks.additionalPass.callAsync((v=>{if(v)return this._done(v,E);this.compiler.compile(onCompiled)}))}));return}return this._done(null,E)}))}))}))};this.compiler.compile(onCompiled)}))};run()}_getStats(v){const E=new $(v);return E}_done(v,E){this.running=false;const R=E&&E.getLogger("webpack.Watching");let j=null;const handleError=(v,E)=>{this.compiler.hooks.failed.call(v);this.compiler.cache.beginIdle();this.compiler.idle=true;this.handler(v,j);if(!E){E=this.callbacks;this.callbacks=[]}for(const R of E)R(v)};if(this.invalid&&!this.suspended&&!this.blocked&&!(this._isBlocked()&&(this.blocked=true))){if(E){R.time("storeBuildDependencies");this.compiler.cache.storeBuildDependencies(E.buildDependencies,(v=>{R.timeEnd("storeBuildDependencies");if(v)return handleError(v);this._go()}))}else{this._go()}return}if(E){E.startTime=this.startTime;E.endTime=Date.now();j=new $(E)}this.startTime=null;if(v)return handleError(v);const N=this.callbacks;this.callbacks=[];R.time("done hook");this.compiler.hooks.done.callAsync(j,(v=>{R.timeEnd("done hook");if(v)return handleError(v,N);this.handler(null,j);R.time("storeBuildDependencies");this.compiler.cache.storeBuildDependencies(E.buildDependencies,(v=>{R.timeEnd("storeBuildDependencies");if(v)return handleError(v,N);R.time("beginIdle");this.compiler.cache.beginIdle();this.compiler.idle=true;R.timeEnd("beginIdle");process.nextTick((()=>{if(!this.closed){this.watch(E.fileDependencies,E.contextDependencies,E.missingDependencies)}}));for(const v of N)v(null);this.compiler.hooks.afterDone.call(j)}))}))}watch(v,E,R){this.pausedWatcher=null;this.watcher=this.compiler.watchFileSystem.watch(v,E,R,this.lastWatcherStartTime,this.watchOptions,((v,E,R,$,j)=>{if(v){this.compiler.modifiedFiles=undefined;this.compiler.removedFiles=undefined;this.compiler.fileTimestamps=undefined;this.compiler.contextTimestamps=undefined;this.compiler.fsStartTime=undefined;return this.handler(v)}this._invalidate(E,R,$,j);this._onChange()}),((v,E)=>{if(!this._invalidReported){this._invalidReported=true;this.compiler.hooks.invalid.call(v,E)}this._onInvalid()}))}invalidate(v){if(v){this.callbacks.push(v)}if(!this._invalidReported){this._invalidReported=true;this.compiler.hooks.invalid.call(null,Date.now())}this._onChange();this._invalidate()}_invalidate(v,E,R,$){if(this.suspended||this._isBlocked()&&(this.blocked=true)){this._mergeWithCollected(R,$);return}if(this.running){this._mergeWithCollected(R,$);this.invalid=true}else{this._go(v,E,R,$)}}suspend(){this.suspended=true}resume(){if(this.suspended){this.suspended=false;this._invalidate()}}close(v){if(this._closeCallbacks){if(v){this._closeCallbacks.push(v)}return}const finalCallback=(v,E)=>{this.running=false;this.compiler.running=false;this.compiler.watching=undefined;this.compiler.watchMode=false;this.compiler.modifiedFiles=undefined;this.compiler.removedFiles=undefined;this.compiler.fileTimestamps=undefined;this.compiler.contextTimestamps=undefined;this.compiler.fsStartTime=undefined;const shutdown=v=>{this.compiler.hooks.watchClose.call();const E=this._closeCallbacks;this._closeCallbacks=undefined;for(const R of E)R(v)};if(E){const R=E.getLogger("webpack.Watching");R.time("storeBuildDependencies");this.compiler.cache.storeBuildDependencies(E.buildDependencies,(E=>{R.timeEnd("storeBuildDependencies");shutdown(v||E)}))}else{shutdown(v)}};this.closed=true;if(this.watcher){this.watcher.close();this.watcher=null}if(this.pausedWatcher){this.pausedWatcher.close();this.pausedWatcher=null}this._closeCallbacks=[];if(v){this._closeCallbacks.push(v)}if(this.running){this.invalid=true;this._done=finalCallback}else{finalCallback()}}}v.exports=Watching},27154:function(v,E,R){"use strict";const $=R(73837).inspect.custom;const j=R(65764);class WebpackError extends Error{constructor(v){super(v);this.details=undefined;this.module=undefined;this.loc=undefined;this.hideStack=undefined;this.chunk=undefined;this.file=undefined}[$](){return this.stack+(this.details?`\n${this.details}`:"")}serialize({write:v}){v(this.name);v(this.message);v(this.stack);v(this.details);v(this.loc);v(this.hideStack)}deserialize({read:v}){this.name=v();this.message=v();this.stack=v();this.details=v();this.loc=v();this.hideStack=v()}}j(WebpackError,"webpack/lib/WebpackError");v.exports=WebpackError},3756:function(v,E,R){"use strict";const $=R(6720);const j=R(64111);const{toConstantDependency:N}=R(97574);class WebpackIsIncludedPlugin{apply(v){v.hooks.compilation.tap("WebpackIsIncludedPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(j,new $(E));v.dependencyTemplates.set(j,new j.Template);const handler=v=>{v.hooks.call.for("__webpack_is_included__").tap("WebpackIsIncludedPlugin",(E=>{if(E.type!=="CallExpression"||E.arguments.length!==1||E.arguments[0].type==="SpreadElement")return;const R=v.evaluateExpression(E.arguments[0]);if(!R.isString())return;const $=new j(R.string,E.range);$.loc=E.loc;v.state.module.addDependency($);return true}));v.hooks.typeof.for("__webpack_is_included__").tap("WebpackIsIncludedPlugin",N(v,JSON.stringify("function")))};E.hooks.parser.for("javascript/auto").tap("WebpackIsIncludedPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("WebpackIsIncludedPlugin",handler);E.hooks.parser.for("javascript/esm").tap("WebpackIsIncludedPlugin",handler)}))}}v.exports=WebpackIsIncludedPlugin},73305:function(v,E,R){"use strict";const $=R(23787);const j=R(53694);const N=R(36109);const q=R(61014);const G=R(7006);const ie=R(2699);const ae=R(91060);const ce=R(92419);const le=R(77661);const me=R(39220);const _e=R(37163);const Ie=R(38460);const Me=R(3756);const Oe=R(78055);const Te=R(67142);const Ne=R(57804);const Be=R(36435);const Le=R(17613);const qe=R(94834);const Ue=R(93075);const Ge=R(43047);const He=R(87790);const We=R(23009);const Qe=R(7604);const Je=R(21422);const Ve=R(52138);const Ke=R(26278);const Xe=R(75061);const Ye=R(90020);const Ze=R(34822);const et=R(70298);const tt=R(57396);const nt=R(82833);const st=R(11285);const rt=R(16478);const ot=R(7058);const{cleverMerge:it}=R(22093);class WebpackOptionsApply extends ${constructor(){super()}process(v,E){E.outputPath=v.output.path;E.recordsInputPath=v.recordsInputPath||null;E.recordsOutputPath=v.recordsOutputPath||null;E.name=v.name;if(v.externals){const $=R(51562);new $(v.externalsType,v.externals).apply(E)}if(v.externalsPresets.node){const v=R(23066);(new v).apply(E)}if(v.externalsPresets.electronMain){const v=R(83290);new v("main").apply(E)}if(v.externalsPresets.electronPreload){const v=R(83290);new v("preload").apply(E)}if(v.externalsPresets.electronRenderer){const v=R(83290);new v("renderer").apply(E)}if(v.externalsPresets.electron&&!v.externalsPresets.electronMain&&!v.externalsPresets.electronPreload&&!v.externalsPresets.electronRenderer){const v=R(83290);(new v).apply(E)}if(v.externalsPresets.nwjs){const v=R(51562);new v("node-commonjs","nw.gui").apply(E)}if(v.externalsPresets.webAsync){const $=R(51562);new $("import",v.experiments.css?({request:v,dependencyType:E},R)=>{if(E==="url"){if(/^(\/\/|https?:\/\/)/.test(v))return R(null,`asset ${v}`)}else if(E==="css-import"){if(/^(\/\/|https?:\/\/)/.test(v))return R(null,`css-import ${v}`)}else if(/^(\/\/|https?:\/\/|std:)/.test(v)){if(/^\.css(\?|$)/.test(v))return R(null,`css-import ${v}`);return R(null,`import ${v}`)}R()}:/^(\/\/|https?:\/\/|std:)/).apply(E)}else if(v.externalsPresets.web){const $=R(51562);new $("module",v.experiments.css?({request:v,dependencyType:E},R)=>{if(E==="url"){if(/^(\/\/|https?:\/\/)/.test(v))return R(null,`asset ${v}`)}else if(E==="css-import"){if(/^(\/\/|https?:\/\/)/.test(v))return R(null,`css-import ${v}`)}else if(/^(\/\/|https?:\/\/|std:)/.test(v)){if(/^\.css(\?|$)/.test(v))return R(null,`css-import ${v}`);return R(null,`module ${v}`)}R()}:/^(\/\/|https?:\/\/|std:)/).apply(E)}(new G).apply(E);if(typeof v.output.chunkFormat==="string"){switch(v.output.chunkFormat){case"array-push":{const v=R(54433);(new v).apply(E);break}case"commonjs":{const v=R(93547);(new v).apply(E);break}case"module":{const v=R(94270);(new v).apply(E);break}default:throw new Error("Unsupported chunk format '"+v.output.chunkFormat+"'.")}}if(v.output.enabledChunkLoadingTypes.length>0){for(const $ of v.output.enabledChunkLoadingTypes){const v=R(49548);new v($).apply(E)}}if(v.output.enabledWasmLoadingTypes.length>0){for(const $ of v.output.enabledWasmLoadingTypes){const v=R(90115);new v($).apply(E)}}if(v.output.enabledLibraryTypes.length>0){for(const $ of v.output.enabledLibraryTypes){const v=R(7616);new v($).apply(E)}}if(v.output.pathinfo){const $=R(56204);new $(v.output.pathinfo!==true).apply(E)}if(v.output.clean){const $=R(40135);new $(v.output.clean===true?{}:v.output.clean).apply(E)}if(v.devtool){if(v.devtool.includes("source-map")){const $=v.devtool.includes("hidden");const j=v.devtool.includes("inline");const N=v.devtool.includes("eval");const q=v.devtool.includes("cheap");const G=v.devtool.includes("module");const ie=v.devtool.includes("nosources");const ae=N?R(67470):R(63645);new ae({filename:j?null:v.output.sourceMapFilename,moduleFilenameTemplate:v.output.devtoolModuleFilenameTemplate,fallbackModuleFilenameTemplate:v.output.devtoolFallbackModuleFilenameTemplate,append:$?false:undefined,module:G?true:q?false:true,columns:q?false:true,noSources:ie,namespace:v.output.devtoolNamespace}).apply(E)}else if(v.devtool.includes("eval")){const $=R(76289);new $({moduleFilenameTemplate:v.output.devtoolModuleFilenameTemplate,namespace:v.output.devtoolNamespace}).apply(E)}}(new N).apply(E);(new q).apply(E);(new j).apply(E);if(!v.experiments.outputModule){if(v.output.module){throw new Error("'output.module: true' is only allowed when 'experiments.outputModule' is enabled")}if(v.output.enabledLibraryTypes.includes("module")){throw new Error("library type \"module\" is only allowed when 'experiments.outputModule' is enabled")}if(v.externalsType==="module"){throw new Error("'externalsType: \"module\"' is only allowed when 'experiments.outputModule' is enabled")}}if(v.experiments.syncWebAssembly){const $=R(38372);new $({mangleImports:v.optimization.mangleWasmImports}).apply(E)}if(v.experiments.asyncWebAssembly){const $=R(24979);new $({mangleImports:v.optimization.mangleWasmImports}).apply(E)}if(v.experiments.css){const $=R(39693);new $(v.experiments.css).apply(E)}if(v.experiments.lazyCompilation){const $=R(94798);const j=typeof v.experiments.lazyCompilation==="object"?v.experiments.lazyCompilation:null;new $({backend:typeof j.backend==="function"?j.backend:R(10867)({...j.backend,client:j.backend&&j.backend.client||v.externalsPresets.node?R.ab+"lazy-compilation-node.js":R.ab+"lazy-compilation-web.js"}),entries:!j||j.entries!==false,imports:!j||j.imports!==false,test:j&&j.test||undefined}).apply(E)}if(v.experiments.buildHttp){const $=R(89674);const j=v.experiments.buildHttp;new $(j).apply(E)}(new ie).apply(E);E.hooks.entryOption.call(v.context,v.entry);(new ce).apply(E);(new tt).apply(E);(new Be).apply(E);(new Le).apply(E);(new me).apply(E);new Ge({topLevelAwait:v.experiments.topLevelAwait}).apply(E);if(v.amd!==false){const $=R(88646);const j=R(95173);new $(v.amd||{}).apply(E);(new j).apply(E)}(new Ue).apply(E);new Je({}).apply(E);if(v.node!==false){const $=R(17336);new $(v.node).apply(E)}(new le).apply(E);(new Ie).apply(E);(new Me).apply(E);(new _e).apply(E);(new Te).apply(E);(new Xe).apply(E);(new Ke).apply(E);(new Ve).apply(E);(new Qe).apply(E);(new He).apply(E);(new Ye).apply(E);(new We).apply(E);(new Ze).apply(E);new et(v.output.workerChunkLoading,v.output.workerWasmLoading,v.output.module).apply(E);(new st).apply(E);(new rt).apply(E);(new ot).apply(E);(new nt).apply(E);if(typeof v.mode!=="string"){const v=R(28763);(new v).apply(E)}const $=R(59869);(new $).apply(E);if(v.optimization.removeAvailableModules){const v=R(19906);(new v).apply(E)}if(v.optimization.removeEmptyChunks){const v=R(88876);(new v).apply(E)}if(v.optimization.mergeDuplicateChunks){const v=R(88831);(new v).apply(E)}if(v.optimization.flagIncludedChunks){const v=R(58794);(new v).apply(E)}if(v.optimization.sideEffects){const $=R(94281);new $(v.optimization.sideEffects===true).apply(E)}if(v.optimization.providedExports){const v=R(90124);(new v).apply(E)}if(v.optimization.usedExports){const $=R(71768);new $(v.optimization.usedExports==="global").apply(E)}if(v.optimization.innerGraph){const v=R(69129);(new v).apply(E)}if(v.optimization.mangleExports){const $=R(41199);new $(v.optimization.mangleExports!=="size").apply(E)}if(v.optimization.concatenateModules){const v=R(5279);(new v).apply(E)}if(v.optimization.splitChunks){const $=R(61167);new $(v.optimization.splitChunks).apply(E)}if(v.optimization.runtimeChunk){const $=R(57105);new $(v.optimization.runtimeChunk).apply(E)}if(!v.optimization.emitOnErrors){const v=R(424);(new v).apply(E)}if(v.optimization.realContentHash){const $=R(33347);new $({hashFunction:v.output.hashFunction,hashDigest:v.output.hashDigest}).apply(E)}if(v.optimization.checkWasmTypes){const v=R(15578);(new v).apply(E)}const at=v.optimization.moduleIds;if(at){switch(at){case"natural":{const v=R(74040);(new v).apply(E);break}case"named":{const v=R(23405);(new v).apply(E);break}case"hashed":{const $=R(31481);const j=R(13340);new $("optimization.moduleIds","hashed","deterministic").apply(E);new j({hashFunction:v.output.hashFunction}).apply(E);break}case"deterministic":{const v=R(49335);(new v).apply(E);break}case"size":{const v=R(12202);new v({prioritiseInitial:true}).apply(E);break}default:throw new Error(`webpack bug: moduleIds: ${at} is not implemented`)}}const ct=v.optimization.chunkIds;if(ct){switch(ct){case"natural":{const v=R(34697);(new v).apply(E);break}case"named":{const v=R(23750);(new v).apply(E);break}case"deterministic":{const v=R(6777);(new v).apply(E);break}case"size":{const v=R(4955);new v({prioritiseInitial:true}).apply(E);break}case"total-size":{const v=R(4955);new v({prioritiseInitial:false}).apply(E);break}default:throw new Error(`webpack bug: chunkIds: ${ct} is not implemented`)}}if(v.optimization.nodeEnv){const $=R(5354);new $({"process.env.NODE_ENV":JSON.stringify(v.optimization.nodeEnv)}).apply(E)}if(v.optimization.minimize){for(const R of v.optimization.minimizer){if(typeof R==="function"){R.call(E,E)}else if(R!=="..."){R.apply(E)}}}if(v.performance){const $=R(96740);new $(v.performance).apply(E)}(new Oe).apply(E);new ae({portableIds:v.optimization.portableRecords}).apply(E);(new Ne).apply(E);const lt=R(9652);new lt(v.snapshot.managedPaths,v.snapshot.immutablePaths).apply(E);if(v.cache&&typeof v.cache==="object"){const $=v.cache;switch($.type){case"memory":{if(isFinite($.maxGenerations)){const v=R(56171);new v({maxGenerations:$.maxGenerations}).apply(E)}else{const v=R(64542);(new v).apply(E)}if($.cacheUnaffected){if(!v.experiments.cacheUnaffected){throw new Error("'cache.cacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled")}E.moduleMemCaches=new Map}break}case"filesystem":{const j=R(81887);for(const v in $.buildDependencies){const R=$.buildDependencies[v];new j(R).apply(E)}if(!isFinite($.maxMemoryGenerations)){const v=R(64542);(new v).apply(E)}else if($.maxMemoryGenerations!==0){const v=R(56171);new v({maxGenerations:$.maxMemoryGenerations}).apply(E)}if($.memoryCacheUnaffected){if(!v.experiments.cacheUnaffected){throw new Error("'cache.memoryCacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled")}E.moduleMemCaches=new Map}switch($.store){case"pack":{const j=R(97079);const N=R(26174);new j(new N({compiler:E,fs:E.intermediateFileSystem,context:v.context,cacheLocation:$.cacheLocation,version:$.version,logger:E.getInfrastructureLogger("webpack.cache.PackFileCacheStrategy"),snapshot:v.snapshot,maxAge:$.maxAge,profile:$.profile,allowCollectingMemory:$.allowCollectingMemory,compression:$.compression}),$.idleTimeout,$.idleTimeoutForInitialStore,$.idleTimeoutAfterLargeChanges).apply(E);break}default:throw new Error("Unhandled value for cache.store")}break}default:throw new Error(`Unknown cache type ${$.type}`)}}(new qe).apply(E);if(v.ignoreWarnings&&v.ignoreWarnings.length>0){const $=R(51674);new $(v.ignoreWarnings).apply(E)}E.hooks.afterPlugins.call(E);if(!E.inputFileSystem){throw new Error("No input filesystem provided")}E.resolverFactory.hooks.resolveOptions.for("normal").tap("WebpackOptionsApply",(R=>{R=it(v.resolve,R);R.fileSystem=E.inputFileSystem;return R}));E.resolverFactory.hooks.resolveOptions.for("context").tap("WebpackOptionsApply",(R=>{R=it(v.resolve,R);R.fileSystem=E.inputFileSystem;R.resolveToContext=true;return R}));E.resolverFactory.hooks.resolveOptions.for("loader").tap("WebpackOptionsApply",(R=>{R=it(v.resolveLoader,R);R.fileSystem=E.inputFileSystem;return R}));E.hooks.afterResolvers.call(E);return v}}v.exports=WebpackOptionsApply},42163:function(v,E,R){"use strict";const{applyWebpackOptionsDefaults:$}=R(64395);const{getNormalizedWebpackOptions:j}=R(80593);class WebpackOptionsDefaulter{process(v){v=j(v);$(v);return v}}v.exports=WebpackOptionsDefaulter},23836:function(v,E,R){"use strict";const $=R(92414);const j=R(71017);const{RawSource:N}=R(51255);const q=R(81701);const G=R(97152);const ie=R(39201);const ae=R(85205);const{makePathsRelative:ce}=R(20162);const le=R(46849);const mergeMaybeArrays=(v,E)=>{const R=new Set;if(Array.isArray(v))for(const E of v)R.add(E);else R.add(v);if(Array.isArray(E))for(const v of E)R.add(v);else R.add(E);return Array.from(R)};const mergeAssetInfo=(v,E)=>{const R={...v,...E};for(const $ of Object.keys(v)){if($ in E){if(v[$]===E[$])continue;switch($){case"fullhash":case"chunkhash":case"modulehash":case"contenthash":R[$]=mergeMaybeArrays(v[$],E[$]);break;case"immutable":case"development":case"hotModuleReplacement":case"javascriptModule":R[$]=v[$]||E[$];break;case"related":R[$]=mergeRelatedInfo(v[$],E[$]);break;default:throw new Error(`Can't handle conflicting asset info for ${$}`)}}}return R};const mergeRelatedInfo=(v,E)=>{const R={...v,...E};for(const $ of Object.keys(v)){if($ in E){if(v[$]===E[$])continue;R[$]=mergeMaybeArrays(v[$],E[$])}}return R};const encodeDataUri=(v,E)=>{let R;switch(v){case"base64":{R=E.buffer().toString("base64");break}case false:{const v=E.source();if(typeof v!=="string"){R=v.toString("utf-8")}R=encodeURIComponent(R).replace(/[!'()*]/g,(v=>"%"+v.codePointAt(0).toString(16)));break}default:throw new Error(`Unsupported encoding '${v}'`)}return R};const decodeDataUriContent=(v,E)=>{const R=v==="base64";return R?Buffer.from(E,"base64"):Buffer.from(decodeURIComponent(E),"ascii")};const me=new Set(["javascript"]);const _e=new Set(["javascript","asset"]);const Ie="base64";class AssetGenerator extends G{constructor(v,E,R,$,j){super();this.dataUrlOptions=v;this.filename=E;this.publicPath=R;this.outputPath=$;this.emit=j}getSourceFileName(v,E){return ce(E.compilation.compiler.context,v.matchResource||v.resource,E.compilation.compiler.root).replace(/^\.\//,"")}getConcatenationBailoutReason(v,E){return undefined}getMimeType(v){if(typeof this.dataUrlOptions==="function"){throw new Error("This method must not be called when dataUrlOptions is a function")}let E=this.dataUrlOptions.mimetype;if(E===undefined){const R=j.extname(v.nameForCondition());if(v.resourceResolveData&&v.resourceResolveData.mimetype!==undefined){E=v.resourceResolveData.mimetype+v.resourceResolveData.parameters}else if(R){E=$.lookup(R);if(typeof E!=="string"){throw new Error("DataUrl can't be generated automatically, "+`because there is no mimetype for "${R}" in mimetype database. `+'Either pass a mimetype via "generator.mimetype" or '+'use type: "asset/resource" to create a resource file instead of a DataUrl')}}}if(typeof E!=="string"){throw new Error("DataUrl can't be generated automatically. "+'Either pass a mimetype via "generator.mimetype" or '+'use type: "asset/resource" to create a resource file instead of a DataUrl')}return E}generate(v,{runtime:E,concatenationScope:R,chunkGraph:$,runtimeTemplate:G,runtimeRequirements:ce,type:me,getData:_e}){switch(me){case"asset":return v.originalSource();default:{let me;const Me=v.originalSource();if(v.buildInfo.dataUrl){let E;if(typeof this.dataUrlOptions==="function"){E=this.dataUrlOptions.call(null,Me.source(),{filename:v.matchResource||v.resource,module:v})}else{let R=this.dataUrlOptions.encoding;if(R===undefined){if(v.resourceResolveData&&v.resourceResolveData.encoding!==undefined){R=v.resourceResolveData.encoding}}if(R===undefined){R=Ie}const $=this.getMimeType(v);let j;if(v.resourceResolveData&&v.resourceResolveData.encoding===R&&decodeDataUriContent(v.resourceResolveData.encoding,v.resourceResolveData.encodedContent).equals(Me.buffer())){j=v.resourceResolveData.encodedContent}else{j=encodeDataUri(R,Me)}E=`data:${$}${R?`;${R}`:""},${j}`}const R=_e();R.set("url",Buffer.from(E));me=JSON.stringify(E)}else{const R=this.filename||G.outputOptions.assetModuleFilename;const N=ae(G.outputOptions.hashFunction);if(G.outputOptions.hashSalt){N.update(G.outputOptions.hashSalt)}N.update(Me.buffer());const q=N.digest(G.outputOptions.hashDigest);const Ie=le(q,G.outputOptions.hashDigestLength);v.buildInfo.fullContentHash=q;const Oe=this.getSourceFileName(v,G);let{path:Te,info:Ne}=G.compilation.getAssetPathWithInfo(R,{module:v,runtime:E,filename:Oe,chunkGraph:$,contentHash:Ie});let Be;if(this.publicPath!==undefined){const{path:R,info:j}=G.compilation.getAssetPathWithInfo(this.publicPath,{module:v,runtime:E,filename:Oe,chunkGraph:$,contentHash:Ie});Ne=mergeAssetInfo(Ne,j);Be=JSON.stringify(R+Te)}else{ce.add(ie.publicPath);Be=G.concatenation({expr:ie.publicPath},Te)}Ne={sourceFilename:Oe,...Ne};if(this.outputPath){const{path:R,info:N}=G.compilation.getAssetPathWithInfo(this.outputPath,{module:v,runtime:E,filename:Oe,chunkGraph:$,contentHash:Ie});Ne=mergeAssetInfo(Ne,N);Te=j.posix.join(R,Te)}v.buildInfo.filename=Te;v.buildInfo.assetInfo=Ne;if(_e){const v=_e();v.set("fullContentHash",q);v.set("filename",Te);v.set("assetInfo",Ne)}me=Be}if(R){R.registerNamespaceExport(q.NAMESPACE_OBJECT_EXPORT);return new N(`${G.supportsConst()?"const":"var"} ${q.NAMESPACE_OBJECT_EXPORT} = ${me};`)}else{ce.add(ie.module);return new N(`${ie.module}.exports = ${me};`)}}}}getTypes(v){if(v.buildInfo&&v.buildInfo.dataUrl||this.emit===false){return me}else{return _e}}getSize(v,E){switch(E){case"asset":{const E=v.originalSource();if(!E){return 0}return E.size()}default:if(v.buildInfo&&v.buildInfo.dataUrl){const E=v.originalSource();if(!E){return 0}return E.size()*1.34+36}else{return 42}}}updateHash(v,{module:E,runtime:R,runtimeTemplate:$,chunkGraph:j}){if(E.buildInfo.dataUrl){v.update("data-url");if(typeof this.dataUrlOptions==="function"){const E=this.dataUrlOptions.ident;if(E)v.update(E)}else{if(this.dataUrlOptions.encoding&&this.dataUrlOptions.encoding!==Ie){v.update(this.dataUrlOptions.encoding)}if(this.dataUrlOptions.mimetype)v.update(this.dataUrlOptions.mimetype)}}else{v.update("resource");const N={module:E,runtime:R,filename:this.getSourceFileName(E,$),chunkGraph:j,contentHash:$.contentHashReplacement};if(typeof this.publicPath==="function"){v.update("path");const E={};v.update(this.publicPath(N,E));v.update(JSON.stringify(E))}else if(this.publicPath){v.update("path");v.update(this.publicPath)}else{v.update("no-path")}const q=this.filename||$.outputOptions.assetModuleFilename;const{path:G,info:ie}=$.compilation.getAssetPathWithInfo(q,N);v.update(G);v.update(JSON.stringify(ie))}}}v.exports=AssetGenerator},53694:function(v,E,R){"use strict";const{cleverMerge:$}=R(22093);const{compareModulesByIdentifier:j}=R(58792);const N=R(89699);const q=R(61374);const getSchema=v=>{const{definitions:E}=R(13954);return{definitions:E,oneOf:[{$ref:`#/definitions/${v}`}]}};const G={name:"Asset Modules Plugin",baseDataPath:"generator"};const ie={asset:N(R(12666),(()=>getSchema("AssetGeneratorOptions")),G),"asset/resource":N(R(9730),(()=>getSchema("AssetResourceGeneratorOptions")),G),"asset/inline":N(R(59117),(()=>getSchema("AssetInlineGeneratorOptions")),G)};const ae=N(R(1700),(()=>getSchema("AssetParserOptions")),{name:"Asset Modules Plugin",baseDataPath:"parser"});const ce=q((()=>R(23836)));const le=q((()=>R(38933)));const me=q((()=>R(83191)));const _e=q((()=>R(98530)));const Ie="asset";const Me="AssetModulesPlugin";class AssetModulesPlugin{apply(v){v.hooks.compilation.tap(Me,((E,{normalModuleFactory:R})=>{R.hooks.createParser.for("asset").tap(Me,(E=>{ae(E);E=$(v.options.module.parser.asset,E);let R=E.dataUrlCondition;if(!R||typeof R==="object"){R={maxSize:8096,...R}}const j=le();return new j(R)}));R.hooks.createParser.for("asset/inline").tap(Me,(v=>{const E=le();return new E(true)}));R.hooks.createParser.for("asset/resource").tap(Me,(v=>{const E=le();return new E(false)}));R.hooks.createParser.for("asset/source").tap(Me,(v=>{const E=me();return new E}));for(const v of["asset","asset/inline","asset/resource"]){R.hooks.createGenerator.for(v).tap(Me,(E=>{ie[v](E);let R=undefined;if(v!=="asset/resource"){R=E.dataUrl;if(!R||typeof R==="object"){R={encoding:undefined,mimetype:undefined,...R}}}let $=undefined;let j=undefined;let N=undefined;if(v!=="asset/inline"){$=E.filename;j=E.publicPath;N=E.outputPath}const q=ce();return new q(R,$,j,N,E.emit!==false)}))}R.hooks.createGenerator.for("asset/source").tap(Me,(()=>{const v=_e();return new v}));E.hooks.renderManifest.tap(Me,((v,R)=>{const{chunkGraph:$}=E;const{chunk:N,codeGenerationResults:q}=R;const G=$.getOrderedChunkModulesIterableBySourceType(N,"asset",j);if(G){for(const E of G){try{const R=q.get(E,N.runtime);v.push({render:()=>R.sources.get(Ie),filename:E.buildInfo.filename||R.data.get("filename"),info:E.buildInfo.assetInfo||R.data.get("assetInfo"),auxiliary:true,identifier:`assetModule${$.getModuleId(E)}`,hash:E.buildInfo.fullContentHash||R.data.get("fullContentHash")})}catch(v){v.message+=`\nduring rendering of asset ${E.identifier()}`;throw v}}}return v}));E.hooks.prepareModuleExecution.tap("AssetModulesPlugin",((v,E)=>{const{codeGenerationResult:R}=v;const $=R.sources.get("asset");if($===undefined)return;E.assets.set(R.data.get("filename"),{source:$,info:R.data.get("assetInfo")})}))}))}}v.exports=AssetModulesPlugin},38933:function(v,E,R){"use strict";const $=R(68646);class AssetParser extends ${constructor(v){super();this.dataUrlCondition=v}parse(v,E){if(typeof v==="object"&&!Buffer.isBuffer(v)){throw new Error("AssetParser doesn't accept preparsed AST")}E.module.buildInfo.strict=true;E.module.buildMeta.exportsType="default";E.module.buildMeta.defaultObject=false;if(typeof this.dataUrlCondition==="function"){E.module.buildInfo.dataUrl=this.dataUrlCondition(v,{filename:E.module.matchResource||E.module.resource,module:E.module})}else if(typeof this.dataUrlCondition==="boolean"){E.module.buildInfo.dataUrl=this.dataUrlCondition}else if(this.dataUrlCondition&&typeof this.dataUrlCondition==="object"){E.module.buildInfo.dataUrl=Buffer.byteLength(v)<=this.dataUrlCondition.maxSize}else{throw new Error("Unexpected dataUrlCondition type")}return E}}v.exports=AssetParser},98530:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(81701);const N=R(97152);const q=R(39201);const G=new Set(["javascript"]);class AssetSourceGenerator extends N{generate(v,{concatenationScope:E,chunkGraph:R,runtimeTemplate:N,runtimeRequirements:G}){const ie=v.originalSource();if(!ie){return new $("")}const ae=ie.source();let ce;if(typeof ae==="string"){ce=ae}else{ce=ae.toString("utf-8")}let le;if(E){E.registerNamespaceExport(j.NAMESPACE_OBJECT_EXPORT);le=`${N.supportsConst()?"const":"var"} ${j.NAMESPACE_OBJECT_EXPORT} = ${JSON.stringify(ce)};`}else{G.add(q.module);le=`${q.module}.exports = ${JSON.stringify(ce)};`}return new $(le)}getConcatenationBailoutReason(v,E){return undefined}getTypes(v){return G}getSize(v,E){const R=v.originalSource();if(!R){return 0}return R.size()+12}}v.exports=AssetSourceGenerator},83191:function(v,E,R){"use strict";const $=R(68646);class AssetSourceParser extends ${parse(v,E){if(typeof v==="object"&&!Buffer.isBuffer(v)){throw new Error("AssetSourceParser doesn't accept preparsed AST")}const{module:R}=E;R.buildInfo.strict=true;R.buildMeta.exportsType="default";E.module.buildMeta.defaultObject=false;return E}}v.exports=AssetSourceParser},66788:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(53840);const N=R(39201);const q=R(65764);const G=new Set(["javascript"]);class RawDataUrlModule extends j{constructor(v,E,R){super("asset/raw-data-url",null);this.url=v;this.urlBuffer=v?Buffer.from(v):undefined;this.identifierStr=E||this.url;this.readableIdentifierStr=R||this.identifierStr}getSourceTypes(){return G}identifier(){return this.identifierStr}size(v){if(this.url===undefined)this.url=this.urlBuffer.toString();return Math.max(1,this.url.length)}readableIdentifier(v){return v.shorten(this.readableIdentifierStr)}needBuild(v,E){return E(null,!this.buildMeta)}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={cacheable:true};j()}codeGeneration(v){if(this.url===undefined)this.url=this.urlBuffer.toString();const E=new Map;E.set("javascript",new $(`module.exports = ${JSON.stringify(this.url)};`));const R=new Map;R.set("url",this.urlBuffer);const j=new Set;j.add(N.module);return{sources:E,runtimeRequirements:j,data:R}}updateHash(v,E){v.update(this.urlBuffer);super.updateHash(v,E)}serialize(v){const{write:E}=v;E(this.urlBuffer);E(this.identifierStr);E(this.readableIdentifierStr);super.serialize(v)}deserialize(v){const{read:E}=v;this.urlBuffer=E();this.identifierStr=E();this.readableIdentifierStr=E();super.deserialize(v)}}q(RawDataUrlModule,"webpack/lib/asset/RawDataUrlModule");v.exports=RawDataUrlModule},14989:function(v,E,R){"use strict";const $=R(64768);const j=R(39201);const N=R(43841);class AwaitDependenciesInitFragment extends ${constructor(v){super(undefined,$.STAGE_ASYNC_DEPENDENCIES,0,"await-dependencies");this.promises=v}merge(v){const E=new Set(v.promises);for(const v of this.promises){E.add(v)}return new AwaitDependenciesInitFragment(E)}getContent({runtimeRequirements:v}){v.add(j.module);const E=this.promises;if(E.size===0){return""}if(E.size===1){for(const v of E){return N.asString([`var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${v}]);`,`${v} = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];`,""])}}const R=Array.from(E).join(", ");return N.asString([`var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${R}]);`,`([${R}] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);`,""])}}v.exports=AwaitDependenciesInitFragment},57396:function(v,E,R){"use strict";const $=R(58668);class InferAsyncModulesPlugin{apply(v){v.hooks.compilation.tap("InferAsyncModulesPlugin",(v=>{const{moduleGraph:E}=v;v.hooks.finishModules.tap("InferAsyncModulesPlugin",(v=>{const R=new Set;for(const E of v){if(E.buildMeta&&E.buildMeta.async){R.add(E)}}for(const v of R){E.setAsync(v);for(const[j,N]of E.getIncomingConnectionsByOriginModule(v)){if(N.some((v=>v.dependency instanceof $&&v.isTargetActive(undefined)))){R.add(j)}}}}))}))}}v.exports=InferAsyncModulesPlugin},21078:function(v,E,R){"use strict";const $=R(51558);const{connectChunkGroupParentAndChild:j}=R(37855);const N=R(82921);const{getEntryRuntime:q,mergeRuntime:G}=R(47462);const ie=new Set;ie.plus=ie;const bySetSize=(v,E)=>E.size+E.plus.size-v.size-v.plus.size;const extractBlockModules=(v,E,R,$)=>{let j;let q;const G=[];const ie=[v];while(ie.length>0){const v=ie.pop();const E=[];G.push(E);$.set(v,E);for(const E of v.blocks){ie.push(E)}}for(const N of E.getOutgoingConnections(v)){const v=N.dependency;if(!v)continue;const G=N.module;if(!G)continue;if(N.weak)continue;const ie=N.getActiveState(R);if(ie===false)continue;const ae=E.getParentBlock(v);let ce=E.getParentBlockIndex(v);if(ce<0){ce=ae.dependencies.indexOf(v)}if(j!==ae){q=$.get(j=ae)}const le=ce<<2;q[le]=G;q[le+1]=ie}for(const v of G){if(v.length===0)continue;let E;let R=0;e:for(let $=0;$30){E=new Map;for(let $=0;${const{moduleGraph:le,chunkGraph:me,moduleMemCaches:_e}=E;const Ie=new Map;let Me=false;let Oe;const getBlockModules=(E,R)=>{if(Me!==R){Oe=Ie.get(R);if(Oe===undefined){Oe=new Map;Ie.set(R,Oe)}}let $=Oe.get(E);if($!==undefined)return $;const j=E.getRootBlock();const N=_e&&_e.get(j);if(N!==undefined){const $=N.provide("bundleChunkGraph.blockModules",R,(()=>{v.time("visitModules: prepare");const E=new Map;extractBlockModules(j,le,R,E);v.timeAggregate("visitModules: prepare");return E}));for(const[v,E]of $)Oe.set(v,E);return $.get(E)}else{v.time("visitModules: prepare");extractBlockModules(j,le,R,Oe);$=Oe.get(E);v.timeAggregate("visitModules: prepare");return $}};let Te=0;let Ne=0;let Be=0;let Le=0;let qe=0;let Ue=0;let Ge=0;let He=0;let We=0;let Qe=0;let Je=0;let Ve=0;let Ke=0;let Xe=0;let Ye=0;let Ze=0;const et=new Map;const tt=new Map;const nt=new Map;const st=0;const rt=1;const ot=2;const it=3;const at=4;const ct=5;let lt=[];const ut=new Map;const pt=new Set;for(const[v,$]of R){const R=q(E,v.name,v.options);const N={chunkGroup:v,runtime:R,minAvailableModules:undefined,minAvailableModulesOwned:false,availableModulesToBeMerged:[],skippedItems:undefined,resultingAvailableModules:undefined,children:undefined,availableSources:undefined,availableChildren:undefined,preOrderIndex:0,postOrderIndex:0,chunkLoading:v.options.chunkLoading!==undefined?v.options.chunkLoading!==false:E.outputOptions.chunkLoading!==false,asyncChunks:v.options.asyncChunks!==undefined?v.options.asyncChunks:E.outputOptions.asyncChunks!==false};v.index=Xe++;if(v.getNumberOfParents()>0){const v=new Set;for(const E of $){v.add(E)}N.skippedItems=v;pt.add(N)}else{N.minAvailableModules=ie;const E=v.getEntrypointChunk();for(const R of $){lt.push({action:rt,block:R,module:R,chunk:E,chunkGroup:v,chunkGroupInfo:N})}}j.set(v,N);if(v.name){tt.set(v.name,N)}}for(const v of pt){const{chunkGroup:E}=v;v.availableSources=new Set;for(const R of E.parentsIterable){const E=j.get(R);v.availableSources.add(E);if(E.availableChildren===undefined){E.availableChildren=new Set}E.availableChildren.add(v)}}lt.reverse();const dt=new Set;const ft=new Set;let ht=[];const mt=[];const gt=[];const yt=[];let bt;let xt;let kt;let vt;let wt;const iteratorBlock=v=>{let R=et.get(v);let q;let G;const ae=v.groupOptions&&v.groupOptions.entryOptions;if(R===undefined){const le=v.groupOptions&&v.groupOptions.name||v.chunkName;if(ae){R=nt.get(le);if(!R){G=E.addAsyncEntrypoint(ae,bt,v.loc,v.request);G.index=Xe++;R={chunkGroup:G,runtime:G.options.runtime||G.name,minAvailableModules:ie,minAvailableModulesOwned:false,availableModulesToBeMerged:[],skippedItems:undefined,resultingAvailableModules:undefined,children:undefined,availableSources:undefined,availableChildren:undefined,preOrderIndex:0,postOrderIndex:0,chunkLoading:ae.chunkLoading!==undefined?ae.chunkLoading!==false:wt.chunkLoading,asyncChunks:ae.asyncChunks!==undefined?ae.asyncChunks:wt.asyncChunks};j.set(G,R);me.connectBlockAndChunkGroup(v,G);if(le){nt.set(le,R)}}else{G=R.chunkGroup;G.addOrigin(bt,v.loc,v.request);me.connectBlockAndChunkGroup(v,G)}ht.push({action:at,block:v,module:bt,chunk:G.chunks[0],chunkGroup:G,chunkGroupInfo:R})}else if(!wt.asyncChunks||!wt.chunkLoading){lt.push({action:it,block:v,module:bt,chunk:xt,chunkGroup:kt,chunkGroupInfo:wt})}else{R=le&&tt.get(le);if(!R){q=E.addChunkInGroup(v.groupOptions||v.chunkName,bt,v.loc,v.request);q.index=Xe++;R={chunkGroup:q,runtime:wt.runtime,minAvailableModules:undefined,minAvailableModulesOwned:undefined,availableModulesToBeMerged:[],skippedItems:undefined,resultingAvailableModules:undefined,children:undefined,availableSources:undefined,availableChildren:undefined,preOrderIndex:0,postOrderIndex:0,chunkLoading:wt.chunkLoading,asyncChunks:wt.asyncChunks};ce.add(q);j.set(q,R);if(le){tt.set(le,R)}}else{q=R.chunkGroup;if(q.isInitial()){E.errors.push(new $(le,bt,v.loc));q=kt}q.addOptions(v.groupOptions);q.addOrigin(bt,v.loc,v.request)}N.set(v,[])}et.set(v,R)}else if(ae){G=R.chunkGroup}else{q=R.chunkGroup}if(q!==undefined){N.get(v).push({originChunkGroupInfo:wt,chunkGroup:q});let E=ut.get(wt);if(E===undefined){E=new Set;ut.set(wt,E)}E.add(R);ht.push({action:it,block:v,module:bt,chunk:q.chunks[0],chunkGroup:q,chunkGroupInfo:R})}else if(G!==undefined){wt.chunkGroup.addAsyncEntrypoint(G)}};const processBlock=v=>{Ne++;const E=getBlockModules(v,wt.runtime);if(E!==undefined){const{minAvailableModules:v}=wt;for(let R=0;R0){let{skippedModuleConnections:v}=wt;if(v===undefined){wt.skippedModuleConnections=v=new Set}for(let E=mt.length-1;E>=0;E--){v.add(mt[E])}mt.length=0}if(gt.length>0){let{skippedItems:v}=wt;if(v===undefined){wt.skippedItems=v=new Set}for(let E=gt.length-1;E>=0;E--){v.add(gt[E])}gt.length=0}if(yt.length>0){for(let v=yt.length-1;v>=0;v--){lt.push(yt[v])}yt.length=0}}for(const E of v.blocks){iteratorBlock(E)}if(v.blocks.length>0&&bt!==v){ae.add(v)}};const processEntryBlock=v=>{Ne++;const E=getBlockModules(v,wt.runtime);if(E!==undefined){for(let v=0;v0){for(let v=yt.length-1;v>=0;v--){lt.push(yt[v])}yt.length=0}}for(const E of v.blocks){iteratorBlock(E)}if(v.blocks.length>0&&bt!==v){ae.add(v)}};const processQueue=()=>{while(lt.length){Te++;const v=lt.pop();bt=v.module;vt=v.block;xt=v.chunk;kt=v.chunkGroup;wt=v.chunkGroupInfo;switch(v.action){case st:me.connectChunkAndEntryModule(xt,bt,kt);case rt:{if(me.isModuleInChunk(bt,xt)){break}me.connectChunkAndModule(xt,bt)}case ot:{const E=kt.getModulePreOrderIndex(bt);if(E===undefined){kt.setModulePreOrderIndex(bt,wt.preOrderIndex++)}if(le.setPreOrderIndexIfUnset(bt,Ye)){Ye++}v.action=ct;lt.push(v)}case it:{processBlock(vt);break}case at:{processEntryBlock(vt);break}case ct:{const v=kt.getModulePostOrderIndex(bt);if(v===undefined){kt.setModulePostOrderIndex(bt,wt.postOrderIndex++)}if(le.setPostOrderIndexIfUnset(bt,Ze)){Ze++}break}}}};const calculateResultingAvailableModules=v=>{if(v.resultingAvailableModules)return v.resultingAvailableModules;const E=v.minAvailableModules;let R;if(E.size>E.plus.size){R=new Set;for(const v of E.plus)E.add(v);E.plus=ie;R.plus=E;v.minAvailableModulesOwned=false}else{R=new Set(E);R.plus=E.plus}for(const E of v.chunkGroup.chunks){for(const v of me.getChunkModulesIterable(E)){R.add(v)}}return v.resultingAvailableModules=R};const processConnectQueue=()=>{for(const[v,E]of ut){if(v.children===undefined){v.children=E}else{for(const R of E){v.children.add(R)}}const R=calculateResultingAvailableModules(v);const $=v.runtime;for(const v of E){v.availableModulesToBeMerged.push(R);ft.add(v);const E=v.runtime;const j=G(E,$);if(E!==j){v.runtime=j;dt.add(v)}}Be+=E.size}ut.clear()};const processChunkGroupsForMerging=()=>{Le+=ft.size;for(const v of ft){const E=v.availableModulesToBeMerged;let R=v.minAvailableModules;qe+=E.length;if(E.length>1){E.sort(bySetSize)}let $=false;e:for(const j of E){if(R===undefined){R=j;v.minAvailableModules=R;v.minAvailableModulesOwned=false;$=true}else{if(v.minAvailableModulesOwned){if(R.plus===j.plus){for(const v of R){if(!j.has(v)){R.delete(v);$=true}}}else{for(const v of R){if(!j.has(v)&&!j.plus.has(v)){R.delete(v);$=true}}for(const v of R.plus){if(!j.has(v)&&!j.plus.has(v)){const E=R.plus[Symbol.iterator]();let N;while(!(N=E.next()).done){const E=N.value;if(E===v)break;R.add(E)}while(!(N=E.next()).done){const v=N.value;if(j.has(v)||j.plus.has(v)){R.add(v)}}R.plus=ie;$=true;continue e}}}}else if(R.plus===j.plus){if(j.size{for(const v of pt){for(const E of v.availableSources){if(!E.minAvailableModules){pt.delete(v);break}}}for(const v of pt){const E=new Set;E.plus=ie;const mergeSet=v=>{if(v.size>E.plus.size){for(const v of E.plus)E.add(v);E.plus=v}else{for(const R of v)E.add(R)}};for(const E of v.availableSources){const v=calculateResultingAvailableModules(E);mergeSet(v);mergeSet(v.plus)}v.minAvailableModules=E;v.minAvailableModulesOwned=false;v.resultingAvailableModules=undefined;dt.add(v)}pt.clear()};const processOutdatedChunkGroupInfo=()=>{Ve+=dt.size;for(const v of dt){if(v.skippedItems!==undefined){const{minAvailableModules:E}=v;for(const R of v.skippedItems){if(!E.has(R)&&!E.plus.has(R)){lt.push({action:rt,block:R,module:R,chunk:v.chunkGroup.chunks[0],chunkGroup:v.chunkGroup,chunkGroupInfo:v});v.skippedItems.delete(R)}}}if(v.skippedModuleConnections!==undefined){const{minAvailableModules:E}=v;for(const R of v.skippedModuleConnections){const[$,j]=R;if(j===false)continue;if(j===true){v.skippedModuleConnections.delete(R)}if(j===true&&(E.has($)||E.plus.has($))){v.skippedItems.add($);continue}lt.push({action:j===true?rt:it,block:$,module:$,chunk:v.chunkGroup.chunks[0],chunkGroup:v.chunkGroup,chunkGroupInfo:v})}}if(v.children!==undefined){Ke+=v.children.size;for(const E of v.children){let R=ut.get(v);if(R===undefined){R=new Set;ut.set(v,R)}R.add(E)}}if(v.availableChildren!==undefined){for(const E of v.availableChildren){pt.add(E)}}}dt.clear()};while(lt.length||ut.size){v.time("visitModules: visiting");processQueue();v.timeAggregateEnd("visitModules: prepare");v.timeEnd("visitModules: visiting");if(pt.size>0){v.time("visitModules: combine available modules");processChunkGroupsForCombining();v.timeEnd("visitModules: combine available modules")}if(ut.size>0){v.time("visitModules: calculating available modules");processConnectQueue();v.timeEnd("visitModules: calculating available modules");if(ft.size>0){v.time("visitModules: merging available modules");processChunkGroupsForMerging();v.timeEnd("visitModules: merging available modules")}}if(dt.size>0){v.time("visitModules: check modules for revisit");processOutdatedChunkGroupInfo();v.timeEnd("visitModules: check modules for revisit")}if(lt.length===0){const v=lt;lt=ht.reverse();ht=v}}v.log(`${Te} queue items processed (${Ne} blocks)`);v.log(`${Be} chunk groups connected`);v.log(`${Le} chunk groups processed for merging (${qe} module sets, ${Ue} forked, ${Ge} + ${He} modules forked, ${We} + ${Qe} modules merged into fork, ${Je} resulting modules)`);v.log(`${Ve} chunk group info updated (${Ke} already connected chunk groups reconnected)`)};const connectChunkGroups=(v,E,R,$)=>{const{chunkGraph:N}=v;const areModulesAvailable=(v,E)=>{for(const R of v.chunks){for(const v of N.getChunkModulesIterable(R)){if(!E.has(v)&&!E.plus.has(v))return false}}return true};for(const[v,$]of R){if(!E.has(v)&&$.every((({chunkGroup:v,originChunkGroupInfo:E})=>areModulesAvailable(v,E.resultingAvailableModules)))){continue}for(let E=0;E<$.length;E++){const{chunkGroup:R,originChunkGroupInfo:q}=$[E];N.connectBlockAndChunkGroup(v,R);j(q.chunkGroup,R)}}};const cleanupUnconnectedGroups=(v,E)=>{const{chunkGraph:R}=v;for(const $ of E){if($.getNumberOfParents()===0){for(const E of $.chunks){v.chunks.delete(E);R.disconnectChunk(E)}R.disconnectChunkGroup($);$.remove()}}};const buildChunkGraph=(v,E)=>{const R=v.getLogger("webpack.buildChunkGraph");const $=new Map;const j=new Set;const N=new Map;const q=new Set;R.time("visitModules");visitModules(R,v,E,N,$,q,j);R.timeEnd("visitModules");R.time("connectChunkGroups");connectChunkGroups(v,q,$,N);R.timeEnd("connectChunkGroups");for(const[v,E]of N){for(const R of v.chunks)R.runtime=G(R.runtime,E.runtime)}R.time("cleanup");cleanupUnconnectedGroups(v,j);R.timeEnd("cleanup")};v.exports=buildChunkGraph},81887:function(v){"use strict";class AddBuildDependenciesPlugin{constructor(v){this.buildDependencies=new Set(v)}apply(v){v.hooks.compilation.tap("AddBuildDependenciesPlugin",(v=>{v.buildDependencies.addAll(this.buildDependencies)}))}}v.exports=AddBuildDependenciesPlugin},9652:function(v){"use strict";class AddManagedPathsPlugin{constructor(v,E){this.managedPaths=new Set(v);this.immutablePaths=new Set(E)}apply(v){for(const E of this.managedPaths){v.managedPaths.add(E)}for(const E of this.immutablePaths){v.immutablePaths.add(E)}}}v.exports=AddManagedPathsPlugin},97079:function(v,E,R){"use strict";const $=R(25363);const j=R(67317);const N=Symbol();class IdleFileCachePlugin{constructor(v,E,R,$){this.strategy=v;this.idleTimeout=E;this.idleTimeoutForInitialStore=R;this.idleTimeoutAfterLargeChanges=$}apply(v){let E=this.strategy;const R=this.idleTimeout;const q=Math.min(R,this.idleTimeoutForInitialStore);const G=this.idleTimeoutAfterLargeChanges;const ie=Promise.resolve();let ae=0;let ce=0;let le=0;const me=new Map;v.cache.hooks.store.tap({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},((v,R,$)=>{me.set(v,(()=>E.store(v,R,$)))}));v.cache.hooks.get.tapPromise({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},((v,R,$)=>{const restore=()=>E.restore(v,R).then((j=>{if(j===undefined){$.push((($,j)=>{if($!==undefined){me.set(v,(()=>E.store(v,R,$)))}j()}))}else{return j}}));const j=me.get(v);if(j!==undefined){me.delete(v);return j().then(restore)}return restore()}));v.cache.hooks.storeBuildDependencies.tap({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},(v=>{me.set(N,(()=>E.storeBuildDependencies(v)))}));v.cache.hooks.shutdown.tapPromise({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},(()=>{if(Oe){clearTimeout(Oe);Oe=undefined}Ie=false;const R=j.getReporter(v);const $=Array.from(me.values());if(R)R(0,"process pending cache items");const N=$.map((v=>v()));me.clear();N.push(_e);const q=Promise.all(N);_e=q.then((()=>E.afterAllStored()));if(R){_e=_e.then((()=>{R(1,`stored`)}))}return _e.then((()=>{if(E.clear)E.clear()}))}));let _e=ie;let Ie=false;let Me=true;const processIdleTasks=()=>{if(Ie){const R=Date.now();if(me.size>0){const v=[_e];const E=R+100;let $=100;for(const[R,j]of me){me.delete(R);v.push(j());if($--<=0||Date.now()>E)break}_e=Promise.all(v);_e.then((()=>{ce+=Date.now()-R;Oe=setTimeout(processIdleTasks,0);Oe.unref()}));return}_e=_e.then((async()=>{await E.afterAllStored();ce+=Date.now()-R;le=Math.max(le,ce)*.9+ce*.1;ce=0;ae=0})).catch((E=>{const R=v.getInfrastructureLogger("IdleFileCachePlugin");R.warn(`Background tasks during idle failed: ${E.message}`);R.debug(E.stack)}));Me=false}};let Oe=undefined;v.cache.hooks.beginIdle.tap({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},(()=>{const E=ae>le*2;if(Me&&q{Oe=undefined;Ie=true;ie.then(processIdleTasks)}),Math.min(Me?q:Infinity,E?G:Infinity,R));Oe.unref()}));v.cache.hooks.endIdle.tap({name:"IdleFileCachePlugin",stage:$.STAGE_DISK},(()=>{if(Oe){clearTimeout(Oe);Oe=undefined}Ie=false}));v.hooks.done.tap("IdleFileCachePlugin",(v=>{ae*=.9;ae+=v.endTime-v.startTime}))}}v.exports=IdleFileCachePlugin},64542:function(v,E,R){"use strict";const $=R(25363);class MemoryCachePlugin{apply(v){const E=new Map;v.cache.hooks.store.tap({name:"MemoryCachePlugin",stage:$.STAGE_MEMORY},((v,R,$)=>{E.set(v,{etag:R,data:$})}));v.cache.hooks.get.tap({name:"MemoryCachePlugin",stage:$.STAGE_MEMORY},((v,R,$)=>{const j=E.get(v);if(j===null){return null}else if(j!==undefined){return j.etag===R?j.data:null}$.push((($,j)=>{if($===undefined){E.set(v,null)}else{E.set(v,{etag:R,data:$})}return j()}))}));v.cache.hooks.shutdown.tap({name:"MemoryCachePlugin",stage:$.STAGE_MEMORY},(()=>{E.clear()}))}}v.exports=MemoryCachePlugin},56171:function(v,E,R){"use strict";const $=R(25363);class MemoryWithGcCachePlugin{constructor({maxGenerations:v}){this._maxGenerations=v}apply(v){const E=this._maxGenerations;const R=new Map;const j=new Map;let N=0;let q=0;const G=v.getInfrastructureLogger("MemoryWithGcCachePlugin");v.hooks.afterDone.tap("MemoryWithGcCachePlugin",(()=>{N++;let v=0;let $;for(const[E,q]of j){if(q.until>N)break;j.delete(E);if(R.get(E)===undefined){R.delete(E);v++;$=E}}if(v>0||j.size>0){G.log(`${R.size-j.size} active entries, ${j.size} recently unused cached entries${v>0?`, ${v} old unused cache entries removed e. g. ${$}`:""}`)}let ie=R.size/E|0;let ae=q>=R.size?0:q;q=ae+ie;for(const[v,$]of R){if(ae!==0){ae--;continue}if($!==undefined){R.set(v,undefined);j.delete(v);j.set(v,{entry:$,until:N+E});if(ie--===0)break}}}));v.cache.hooks.store.tap({name:"MemoryWithGcCachePlugin",stage:$.STAGE_MEMORY},((v,E,$)=>{R.set(v,{etag:E,data:$})}));v.cache.hooks.get.tap({name:"MemoryWithGcCachePlugin",stage:$.STAGE_MEMORY},((v,E,$)=>{const N=R.get(v);if(N===null){return null}else if(N!==undefined){return N.etag===E?N.data:null}const q=j.get(v);if(q!==undefined){const $=q.entry;if($===null){j.delete(v);R.set(v,$);return null}else{if($.etag!==E)return null;j.delete(v);R.set(v,$);return $.data}}$.push((($,j)=>{if($===undefined){R.set(v,null)}else{R.set(v,{etag:E,data:$})}return j()}))}));v.cache.hooks.shutdown.tap({name:"MemoryWithGcCachePlugin",stage:$.STAGE_MEMORY},(()=>{R.clear();j.clear()}))}}v.exports=MemoryWithGcCachePlugin},26174:function(v,E,R){"use strict";const $=R(67469);const j=R(67317);const{formatSize:N}=R(67309);const q=R(51947);const G=R(96522);const ie=R(65764);const ae=R(61374);const{createFileSerializer:ce,NOT_SERIALIZABLE:le}=R(7591);class PackContainer{constructor(v,E,R,$,j,N){this.data=v;this.version=E;this.buildSnapshot=R;this.buildDependencies=$;this.resolveResults=j;this.resolveBuildDependenciesSnapshot=N}serialize({write:v,writeLazy:E}){v(this.version);v(this.buildSnapshot);v(this.buildDependencies);v(this.resolveResults);v(this.resolveBuildDependenciesSnapshot);E(this.data)}deserialize({read:v}){this.version=v();this.buildSnapshot=v();this.buildDependencies=v();this.resolveResults=v();this.resolveBuildDependenciesSnapshot=v();this.data=v()}}ie(PackContainer,"webpack/lib/cache/PackFileCacheStrategy","PackContainer");const me=1024*1024;const _e=10;const Ie=100;const Me=5e4;const Oe=1*60*1e3;class PackItemInfo{constructor(v,E,R){this.identifier=v;this.etag=E;this.location=-1;this.lastAccess=Date.now();this.freshValue=R}}class Pack{constructor(v,E){this.itemInfo=new Map;this.requests=[];this.requestsTimeout=undefined;this.freshContent=new Map;this.content=[];this.invalid=false;this.logger=v;this.maxAge=E}_addRequest(v){this.requests.push(v);if(this.requestsTimeout===undefined){this.requestsTimeout=setTimeout((()=>{this.requests.push(undefined);this.requestsTimeout=undefined}),Oe);if(this.requestsTimeout.unref)this.requestsTimeout.unref()}}stopCapturingRequests(){if(this.requestsTimeout!==undefined){clearTimeout(this.requestsTimeout);this.requestsTimeout=undefined}}get(v,E){const R=this.itemInfo.get(v);this._addRequest(v);if(R===undefined){return undefined}if(R.etag!==E)return null;R.lastAccess=Date.now();const $=R.location;if($===-1){return R.freshValue}else{if(!this.content[$]){return undefined}return this.content[$].get(v)}}set(v,E,R){if(!this.invalid){this.invalid=true;this.logger.log(`Pack got invalid because of write to: ${v}`)}const $=this.itemInfo.get(v);if($===undefined){const $=new PackItemInfo(v,E,R);this.itemInfo.set(v,$);this._addRequest(v);this.freshContent.set(v,$)}else{const j=$.location;if(j>=0){this._addRequest(v);this.freshContent.set(v,$);const E=this.content[j];E.delete(v);if(E.items.size===0){this.content[j]=undefined;this.logger.debug("Pack %d got empty and is removed",j)}}$.freshValue=R;$.lastAccess=Date.now();$.etag=E;$.location=-1}}getContentStats(){let v=0;let E=0;for(const R of this.content){if(R!==undefined){v++;const $=R.getSize();if($>0){E+=$}}}return{count:v,size:E}}_findLocation(){let v;for(v=0;vthis.maxAge){this.itemInfo.delete(q);v.delete(q);E.delete(q);$++;j=q}else{G.location=R}}if($>0){this.logger.log("Garbage Collected %d old items at pack %d (%d items remaining) e. g. %s",$,R,v.size,j)}}_persistFreshContent(){const v=this.freshContent.size;if(v>0){const E=Math.ceil(v/Me);const R=Math.ceil(v/E);const $=[];let j=0;let N=false;const createNextPack=()=>{const v=this._findLocation();this.content[v]=null;const E={items:new Set,map:new Map,loc:v};$.push(E);return E};let q=createNextPack();if(this.requestsTimeout!==undefined)clearTimeout(this.requestsTimeout);for(const v of this.requests){if(v===undefined){if(N){N=false}else if(q.items.size>=Ie){j=0;q=createNextPack()}continue}const E=this.freshContent.get(v);if(E===undefined)continue;q.items.add(v);q.map.set(v,E.freshValue);E.location=q.loc;E.freshValue=undefined;this.freshContent.delete(v);if(++j>R){j=0;q=createNextPack();N=true}}this.requests.length=0;for(const v of $){this.content[v.loc]=new PackContent(v.items,new Set(v.items),new PackContentItems(v.map))}this.logger.log(`${v} fresh items in cache put into pack ${$.length>1?$.map((v=>`${v.loc} (${v.items.size} items)`)).join(", "):$[0].loc}`)}}_optimizeSmallContent(){const v=[];let E=0;const R=[];let $=0;for(let j=0;jme)continue;if(N.used.size>0){v.push(j);E+=q}else{R.push(j);$+=q}}let j;if(v.length>=_e||E>me){j=v}else if(R.length>=_e||$>me){j=R}else return;const N=[];for(const v of j){N.push(this.content[v]);this.content[v]=undefined}const q=new Set;const G=new Set;const ie=[];for(const v of N){for(const E of v.items){q.add(E)}for(const E of v.used){G.add(E)}ie.push((async E=>{await v.unpack("it should be merged with other small pack contents");for(const[R,$]of v.content){E.set(R,$)}}))}const ce=this._findLocation();this._gcAndUpdateLocation(q,G,ce);if(q.size>0){this.content[ce]=new PackContent(q,G,ae((async()=>{const v=new Map;await Promise.all(ie.map((E=>E(v))));return new PackContentItems(v)})));this.logger.log("Merged %d small files with %d cache items into pack %d",N.length,q.size,ce)}}_optimizeUnusedContent(){for(let v=0;v0&&$0){this.content[$]=new PackContent(R,new Set(R),(async()=>{await E.unpack("it should be splitted into used and unused items");const v=new Map;for(const $ of R){v.set($,E.content.get($))}return new PackContentItems(v)}))}const j=new Set(E.items);const N=new Set;for(const v of R){j.delete(v)}const q=this._findLocation();this._gcAndUpdateLocation(j,N,q);if(j.size>0){this.content[q]=new PackContent(j,N,(async()=>{await E.unpack("it should be splitted into used and unused items");const v=new Map;for(const R of j){v.set(R,E.content.get(R))}return new PackContentItems(v)}))}this.logger.log("Split pack %d into pack %d with %d used items and pack %d with %d unused items",v,$,R.size,q,j.size);return}}}_gcOldestContent(){let v=undefined;for(const E of this.itemInfo.values()){if(v===undefined||E.lastAccessthis.maxAge){const E=v.location;if(E<0)return;const R=this.content[E];const $=new Set(R.items);const j=new Set(R.used);this._gcAndUpdateLocation($,j,E);this.content[E]=$.size>0?new PackContent($,j,(async()=>{await R.unpack("it contains old items that should be garbage collected");const v=new Map;for(const E of $){v.set(E,R.content.get(E))}return new PackContentItems(v)})):undefined}}serialize({write:v,writeSeparate:E}){this._persistFreshContent();this._optimizeSmallContent();this._optimizeUnusedContent();this._gcOldestContent();for(const E of this.itemInfo.keys()){v(E)}v(null);for(const E of this.itemInfo.values()){v(E.etag)}for(const E of this.itemInfo.values()){v(E.lastAccess)}for(let R=0;RE(v,{name:`${R}`})))}else{v(undefined)}}v(null)}deserialize({read:v,logger:E}){this.logger=E;{const E=[];let R=v();while(R!==null){E.push(R);R=v()}this.itemInfo.clear();const $=E.map((v=>{const E=new PackItemInfo(v,undefined,undefined);this.itemInfo.set(v,E);return E}));for(const E of $){E.etag=v()}for(const E of $){E.lastAccess=v()}}this.content.length=0;let R=v();while(R!==null){if(R===undefined){this.content.push(R)}else{const $=this.content.length;const j=v();this.content.push(new PackContent(R,new Set,j,E,`${this.content.length}`));for(const v of R){this.itemInfo.get(v).location=$}}R=v()}}}ie(Pack,"webpack/lib/cache/PackFileCacheStrategy","Pack");class PackContentItems{constructor(v){this.map=v}serialize({write:v,snapshot:E,rollback:R,logger:$,profile:j}){if(j){v(false);for(const[j,N]of this.map){const q=E();try{v(j);const E=process.hrtime();v(N);const R=process.hrtime(E);const q=R[0]*1e3+R[1]/1e6;if(q>1){if(q>500)$.error(`Serialization of '${j}': ${q} ms`);else if(q>50)$.warn(`Serialization of '${j}': ${q} ms`);else if(q>10)$.info(`Serialization of '${j}': ${q} ms`);else if(q>5)$.log(`Serialization of '${j}': ${q} ms`);else $.debug(`Serialization of '${j}': ${q} ms`)}}catch(v){R(q);if(v===le)continue;const E="Skipped not serializable cache item";if(v.message.includes("ModuleBuildError")){$.log(`${E} (in build error): ${v.message}`);$.debug(`${E} '${j}' (in build error): ${v.stack}`)}else{$.warn(`${E}: ${v.message}`);$.debug(`${E} '${j}': ${v.stack}`)}}}v(null);return}const N=E();try{v(true);v(this.map)}catch(j){R(N);v(false);for(const[j,N]of this.map){const q=E();try{v(j);v(N)}catch(v){R(q);if(v===le)continue;$.warn(`Skipped not serializable cache item '${j}': ${v.message}`);$.debug(v.stack)}}v(null)}}deserialize({read:v,logger:E,profile:R}){if(v()){this.map=v()}else if(R){const R=new Map;let $=v();while($!==null){const j=process.hrtime();const N=v();const q=process.hrtime(j);const G=q[0]*1e3+q[1]/1e6;if(G>1){if(G>100)E.error(`Deserialization of '${$}': ${G} ms`);else if(G>20)E.warn(`Deserialization of '${$}': ${G} ms`);else if(G>5)E.info(`Deserialization of '${$}': ${G} ms`);else if(G>2)E.log(`Deserialization of '${$}': ${G} ms`);else E.debug(`Deserialization of '${$}': ${G} ms`)}R.set($,N);$=v()}this.map=R}else{const E=new Map;let R=v();while(R!==null){E.set(R,v());R=v()}this.map=E}}}ie(PackContentItems,"webpack/lib/cache/PackFileCacheStrategy","PackContentItems");class PackContent{constructor(v,E,R,$,j){this.items=v;this.lazy=typeof R==="function"?R:undefined;this.content=typeof R==="function"?undefined:R.map;this.outdated=false;this.used=E;this.logger=$;this.lazyName=j}get(v){this.used.add(v);if(this.content){return this.content.get(v)}const{lazyName:E}=this;let R;if(E){this.lazyName=undefined;R=`restore cache content ${E} (${N(this.getSize())})`;this.logger.log(`starting to restore cache content ${E} (${N(this.getSize())}) because of request to: ${v}`);this.logger.time(R)}const $=this.lazy();if("then"in $){return $.then((E=>{const $=E.map;if(R){this.logger.timeEnd(R)}this.content=$;this.lazy=q.unMemoizeLazy(this.lazy);return $.get(v)}))}else{const E=$.map;if(R){this.logger.timeEnd(R)}this.content=E;this.lazy=q.unMemoizeLazy(this.lazy);return E.get(v)}}unpack(v){if(this.content)return;if(this.lazy){const{lazyName:E}=this;let R;if(E){this.lazyName=undefined;R=`unpack cache content ${E} (${N(this.getSize())})`;this.logger.log(`starting to unpack cache content ${E} (${N(this.getSize())}) because ${v}`);this.logger.time(R)}const $=this.lazy();if("then"in $){return $.then((v=>{if(R){this.logger.timeEnd(R)}this.content=v.map}))}else{if(R){this.logger.timeEnd(R)}this.content=$.map}}}getSize(){if(!this.lazy)return-1;const v=this.lazy.options;if(!v)return-1;const E=v.size;if(typeof E!=="number")return-1;return E}delete(v){this.items.delete(v);this.used.delete(v);this.outdated=true}writeLazy(v){if(!this.outdated&&this.lazy){v(this.lazy);return}if(!this.outdated&&this.content){const E=new Map(this.content);this.lazy=q.unMemoizeLazy(v((()=>new PackContentItems(E))));return}if(this.content){const E=new Map;for(const v of this.items){E.set(v,this.content.get(v))}this.outdated=false;this.content=E;this.lazy=q.unMemoizeLazy(v((()=>new PackContentItems(E))));return}const{lazyName:E}=this;let R;if(E){this.lazyName=undefined;R=`unpack cache content ${E} (${N(this.getSize())})`;this.logger.log(`starting to unpack cache content ${E} (${N(this.getSize())}) because it's outdated and need to be serialized`);this.logger.time(R)}const $=this.lazy();this.outdated=false;if("then"in $){this.lazy=v((()=>$.then((v=>{if(R){this.logger.timeEnd(R)}const E=v.map;const $=new Map;for(const v of this.items){$.set(v,E.get(v))}this.content=$;this.lazy=q.unMemoizeLazy(this.lazy);return new PackContentItems($)}))))}else{if(R){this.logger.timeEnd(R)}const E=$.map;const j=new Map;for(const v of this.items){j.set(v,E.get(v))}this.content=j;this.lazy=v((()=>new PackContentItems(j)))}}}const allowCollectingMemory=v=>{const E=v.buffer.byteLength-v.byteLength;if(E>8192&&(E>1048576||E>v.byteLength)){return Buffer.from(v)}return v};class PackFileCacheStrategy{constructor({compiler:v,fs:E,context:R,cacheLocation:j,version:N,logger:q,snapshot:ie,maxAge:ae,profile:le,allowCollectingMemory:me,compression:_e}){this.fileSerializer=ce(E,v.options.output.hashFunction);this.fileSystemInfo=new $(E,{managedPaths:ie.managedPaths,immutablePaths:ie.immutablePaths,logger:q.getChildLogger("webpack.FileSystemInfo"),hashFunction:v.options.output.hashFunction});this.compiler=v;this.context=R;this.cacheLocation=j;this.version=N;this.logger=q;this.maxAge=ae;this.profile=le;this.allowCollectingMemory=me;this.compression=_e;this._extension=_e==="brotli"?".pack.br":_e==="gzip"?".pack.gz":".pack";this.snapshot=ie;this.buildDependencies=new Set;this.newBuildDependencies=new G;this.resolveBuildDependenciesSnapshot=undefined;this.resolveResults=undefined;this.buildSnapshot=undefined;this.packPromise=this._openPack();this.storePromise=Promise.resolve()}_getPack(){if(this.packPromise===undefined){this.packPromise=this.storePromise.then((()=>this._openPack()))}return this.packPromise}_openPack(){const{logger:v,profile:E,cacheLocation:R,version:$}=this;let j;let N;let q;let G;let ie;v.time("restore cache container");return this.fileSerializer.deserialize(null,{filename:`${R}/index${this._extension}`,extension:`${this._extension}`,logger:v,profile:E,retainedBuffer:this.allowCollectingMemory?allowCollectingMemory:undefined}).catch((E=>{if(E.code!=="ENOENT"){v.warn(`Restoring pack failed from ${R}${this._extension}: ${E}`);v.debug(E.stack)}else{v.debug(`No pack exists at ${R}${this._extension}: ${E}`)}return undefined})).then((E=>{v.timeEnd("restore cache container");if(!E)return undefined;if(!(E instanceof PackContainer)){v.warn(`Restored pack from ${R}${this._extension}, but contained content is unexpected.`,E);return undefined}if(E.version!==$){v.log(`Restored pack from ${R}${this._extension}, but version doesn't match.`);return undefined}v.time("check build dependencies");return Promise.all([new Promise((($,N)=>{this.fileSystemInfo.checkSnapshotValid(E.buildSnapshot,((N,q)=>{if(N){v.log(`Restored pack from ${R}${this._extension}, but checking snapshot of build dependencies errored: ${N}.`);v.debug(N.stack);return $(false)}if(!q){v.log(`Restored pack from ${R}${this._extension}, but build dependencies have changed.`);return $(false)}j=E.buildSnapshot;return $(true)}))})),new Promise((($,j)=>{this.fileSystemInfo.checkSnapshotValid(E.resolveBuildDependenciesSnapshot,((j,ae)=>{if(j){v.log(`Restored pack from ${R}${this._extension}, but checking snapshot of resolving of build dependencies errored: ${j}.`);v.debug(j.stack);return $(false)}if(ae){G=E.resolveBuildDependenciesSnapshot;N=E.buildDependencies;ie=E.resolveResults;return $(true)}v.log("resolving of build dependencies is invalid, will re-resolve build dependencies");this.fileSystemInfo.checkResolveResultsValid(E.resolveResults,((j,N)=>{if(j){v.log(`Restored pack from ${R}${this._extension}, but resolving of build dependencies errored: ${j}.`);v.debug(j.stack);return $(false)}if(N){q=E.buildDependencies;ie=E.resolveResults;return $(true)}v.log(`Restored pack from ${R}${this._extension}, but build dependencies resolve to different locations.`);return $(false)}))}))}))]).catch((E=>{v.timeEnd("check build dependencies");throw E})).then((([R,$])=>{v.timeEnd("check build dependencies");if(R&&$){v.time("restore cache content metadata");const R=E.data();v.timeEnd("restore cache content metadata");return R}return undefined}))})).then((E=>{if(E){E.maxAge=this.maxAge;this.buildSnapshot=j;if(N)this.buildDependencies=N;if(q)this.newBuildDependencies.addAll(q);this.resolveResults=ie;this.resolveBuildDependenciesSnapshot=G;return E}return new Pack(v,this.maxAge)})).catch((E=>{this.logger.warn(`Restoring pack from ${R}${this._extension} failed: ${E}`);this.logger.debug(E.stack);return new Pack(v,this.maxAge)}))}store(v,E,R){return this._getPack().then(($=>{$.set(v,E===null?null:E.toString(),R)}))}restore(v,E){return this._getPack().then((R=>R.get(v,E===null?null:E.toString()))).catch((E=>{if(E&&E.code!=="ENOENT"){this.logger.warn(`Restoring failed for ${v} from pack: ${E}`);this.logger.debug(E.stack)}}))}storeBuildDependencies(v){this.newBuildDependencies.addAll(v)}afterAllStored(){const v=this.packPromise;if(v===undefined)return Promise.resolve();const E=j.getReporter(this.compiler);return this.storePromise=v.then((v=>{v.stopCapturingRequests();if(!v.invalid)return;this.packPromise=undefined;this.logger.log(`Storing pack...`);let R;const $=new Set;for(const v of this.newBuildDependencies){if(!this.buildDependencies.has(v)){$.add(v)}}if($.size>0||!this.buildSnapshot){if(E)E(.5,"resolve build dependencies");this.logger.debug(`Capturing build dependencies... (${Array.from($).join(", ")})`);R=new Promise(((v,R)=>{this.logger.time("resolve build dependencies");this.fileSystemInfo.resolveBuildDependencies(this.context,$,(($,j)=>{this.logger.timeEnd("resolve build dependencies");if($)return R($);this.logger.time("snapshot build dependencies");const{files:N,directories:q,missing:G,resolveResults:ie,resolveDependencies:ae}=j;if(this.resolveResults){for(const[v,E]of ie){this.resolveResults.set(v,E)}}else{this.resolveResults=ie}if(E){E(.6,"snapshot build dependencies","resolving")}this.fileSystemInfo.createSnapshot(undefined,ae.files,ae.directories,ae.missing,this.snapshot.resolveBuildDependencies,(($,j)=>{if($){this.logger.timeEnd("snapshot build dependencies");return R($)}if(!j){this.logger.timeEnd("snapshot build dependencies");return R(new Error("Unable to snapshot resolve dependencies"))}if(this.resolveBuildDependenciesSnapshot){this.resolveBuildDependenciesSnapshot=this.fileSystemInfo.mergeSnapshots(this.resolveBuildDependenciesSnapshot,j)}else{this.resolveBuildDependenciesSnapshot=j}if(E){E(.7,"snapshot build dependencies","modules")}this.fileSystemInfo.createSnapshot(undefined,N,q,G,this.snapshot.buildDependencies,((E,$)=>{this.logger.timeEnd("snapshot build dependencies");if(E)return R(E);if(!$){return R(new Error("Unable to snapshot build dependencies"))}this.logger.debug("Captured build dependencies");if(this.buildSnapshot){this.buildSnapshot=this.fileSystemInfo.mergeSnapshots(this.buildSnapshot,$)}else{this.buildSnapshot=$}v()}))}))}))}))}else{R=Promise.resolve()}return R.then((()=>{if(E)E(.8,"serialize pack");this.logger.time(`store pack`);const R=new Set(this.buildDependencies);for(const v of $){R.add(v)}const j=new PackContainer(v,this.version,this.buildSnapshot,R,this.resolveResults,this.resolveBuildDependenciesSnapshot);return this.fileSerializer.serialize(j,{filename:`${this.cacheLocation}/index${this._extension}`,extension:`${this._extension}`,logger:this.logger,profile:this.profile}).then((()=>{for(const v of $){this.buildDependencies.add(v)}this.newBuildDependencies.clear();this.logger.timeEnd(`store pack`);const E=v.getContentStats();this.logger.log("Stored pack (%d items, %d files, %d MiB)",v.itemInfo.size,E.count,Math.round(E.size/1024/1024))})).catch((v=>{this.logger.timeEnd(`store pack`);this.logger.warn(`Caching failed for pack: ${v}`);this.logger.debug(v.stack)}))}))})).catch((v=>{this.logger.warn(`Caching failed for pack: ${v}`);this.logger.debug(v.stack)}))}clear(){this.fileSystemInfo.clear();this.buildDependencies.clear();this.newBuildDependencies.clear();this.resolveBuildDependenciesSnapshot=undefined;this.resolveResults=undefined;this.buildSnapshot=undefined;this.packPromise=undefined}}v.exports=PackFileCacheStrategy},94834:function(v,E,R){"use strict";const $=R(96522);const j=R(65764);class CacheEntry{constructor(v,E){this.result=v;this.snapshot=E}serialize({write:v}){v(this.result);v(this.snapshot)}deserialize({read:v}){this.result=v();this.snapshot=v()}}j(CacheEntry,"webpack/lib/cache/ResolverCachePlugin");const addAllToSet=(v,E)=>{if(v instanceof $){v.addAll(E)}else{for(const R of E){v.add(R)}}};const objectToString=(v,E)=>{let R="";for(const $ in v){if(E&&$==="context")continue;const j=v[$];if(typeof j==="object"&&j!==null){R+=`|${$}=[${objectToString(j,false)}|]`}else{R+=`|${$}=|${j}`}}return R};class ResolverCachePlugin{apply(v){const E=v.getCache("ResolverCachePlugin");let R;let j;let N=0;let q=0;let G=0;let ie=0;v.hooks.thisCompilation.tap("ResolverCachePlugin",(v=>{j=v.options.snapshot.resolve;R=v.fileSystemInfo;v.hooks.finishModules.tap("ResolverCachePlugin",(()=>{if(N+q>0){const E=v.getLogger("webpack.ResolverCachePlugin");E.log(`${Math.round(100*N/(N+q))}% really resolved (${N} real resolves with ${G} cached but invalid, ${q} cached valid, ${ie} concurrent)`);N=0;q=0;G=0;ie=0}}))}));const doRealResolve=(v,E,q,G,ie)=>{N++;const ae={_ResolverCachePluginCacheMiss:true,...G};const ce={...q,stack:new Set,missingDependencies:new $,fileDependencies:new $,contextDependencies:new $};let le;let me=false;if(typeof ce.yield==="function"){le=[];me=true;ce.yield=v=>le.push(v)}const propagate=v=>{if(q[v]){addAllToSet(q[v],ce[v])}};const _e=Date.now();E.doResolve(E.hooks.resolve,ae,"Cache miss",ce,((E,$)=>{propagate("fileDependencies");propagate("contextDependencies");propagate("missingDependencies");if(E)return ie(E);const N=ce.fileDependencies;const q=ce.contextDependencies;const G=ce.missingDependencies;R.createSnapshot(_e,N,q,G,j,((E,R)=>{if(E)return ie(E);const j=me?le:$;if(me&&$)le.push($);if(!R){if(j)return ie(null,j);return ie()}v.store(new CacheEntry(j,R),(v=>{if(v)return ie(v);if(j)return ie(null,j);ie()}))}))}))};v.resolverFactory.hooks.resolver.intercept({factory(v,$){const j=new Map;const N=new Map;$.tap("ResolverCachePlugin",(($,ie,ae)=>{if(ie.cache!==true)return;const ce=objectToString(ae,false);const le=ie.cacheWithContext!==undefined?ie.cacheWithContext:false;$.hooks.resolve.tapAsync({name:"ResolverCachePlugin",stage:-100},((ie,ae,me)=>{if(ie._ResolverCachePluginCacheMiss||!R){return me()}const _e=typeof ae.yield==="function";const Ie=`${v}${_e?"|yield":"|default"}${ce}${objectToString(ie,!le)}`;if(_e){const v=N.get(Ie);if(v){v[0].push(me);v[1].push(ae.yield);return}}else{const v=j.get(Ie);if(v){v.push(me);return}}const Me=E.getItemCache(Ie,null);let Oe,Te;const Ne=_e?(v,E)=>{if(Oe===undefined){if(v){me(v)}else{if(E)for(const v of E)ae.yield(v);me(null,null)}Te=undefined;Oe=false}else{if(v){for(const E of Oe)E(v)}else{for(let v=0;v{if(Oe===undefined){me(v,E);Oe=false}else{for(const R of Oe){R(v,E)}j.delete(Ie);Oe=false}};const processCacheResult=(v,E)=>{if(v)return Ne(v);if(E){const{snapshot:v,result:j}=E;R.checkSnapshotValid(v,((E,R)=>{if(E||!R){G++;return doRealResolve(Me,$,ae,ie,Ne)}q++;if(ae.missingDependencies){addAllToSet(ae.missingDependencies,v.getMissingIterable())}if(ae.fileDependencies){addAllToSet(ae.fileDependencies,v.getFileIterable())}if(ae.contextDependencies){addAllToSet(ae.contextDependencies,v.getContextIterable())}Ne(null,j)}))}else{doRealResolve(Me,$,ae,ie,Ne)}};Me.get(processCacheResult);if(_e&&Oe===undefined){Oe=[me];Te=[ae.yield];N.set(Ie,[Oe,Te])}else if(Oe===undefined){Oe=[me];j.set(Ie,Oe)}}))}));return $}})}}v.exports=ResolverCachePlugin},84059:function(v,E,R){"use strict";const $=R(85205);class LazyHashedEtag{constructor(v,E="md4"){this._obj=v;this._hash=undefined;this._hashFunction=E}toString(){if(this._hash===undefined){const v=$(this._hashFunction);this._obj.updateHash(v);this._hash=v.digest("base64")}return this._hash}}const j=new Map;const N=new WeakMap;const getter=(v,E="md4")=>{let R;if(typeof E==="string"){R=j.get(E);if(R===undefined){const $=new LazyHashedEtag(v,E);R=new WeakMap;R.set(v,$);j.set(E,R);return $}}else{R=N.get(E);if(R===undefined){const $=new LazyHashedEtag(v,E);R=new WeakMap;R.set(v,$);N.set(E,R);return $}}const $=R.get(v);if($!==undefined)return $;const q=new LazyHashedEtag(v,E);R.set(v,q);return q};v.exports=getter},81053:function(v){"use strict";class MergedEtag{constructor(v,E){this.a=v;this.b=E}toString(){return`${this.a.toString()}|${this.b.toString()}`}}const E=new WeakMap;const R=new WeakMap;const mergeEtags=(v,$)=>{if(typeof v==="string"){if(typeof $==="string"){return`${v}|${$}`}else{const E=$;$=v;v=E}}else{if(typeof $!=="string"){let R=E.get(v);if(R===undefined){E.set(v,R=new WeakMap)}const j=R.get($);if(j===undefined){const E=new MergedEtag(v,$);R.set($,E);return E}else{return j}}}let j=R.get(v);if(j===undefined){R.set(v,j=new Map)}const N=j.get($);if(N===undefined){const E=new MergedEtag(v,$);j.set($,E);return E}else{return N}};v.exports=mergeEtags},12218:function(v,E,R){"use strict";const $=R(71017);const j=R(13954);const getArguments=(v=j)=>{const E={};const pathToArgumentName=v=>v.replace(/\./g,"-").replace(/\[\]/g,"").replace(/(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/gu,"$1-$2").replace(/-?[^\p{Uppercase_Letter}\p{Lowercase_Letter}\d]+/gu,"-").toLowerCase();const getSchemaPart=E=>{const R=E.split("/");let $=v;for(let v=1;v{for(const{schema:E}of v){if(E.cli){if(E.cli.helper)continue;if(E.cli.description)return E.cli.description}if(E.description)return E.description}};const getNegatedDescription=v=>{for(const{schema:E}of v){if(E.cli){if(E.cli.helper)continue;if(E.cli.negatedDescription)return E.cli.negatedDescription}}};const getResetDescription=v=>{for(const{schema:E}of v){if(E.cli){if(E.cli.helper)continue;if(E.cli.resetDescription)return E.cli.resetDescription}}};const schemaToArgumentConfig=v=>{if(v.enum){return{type:"enum",values:v.enum}}switch(v.type){case"number":return{type:"number"};case"string":return{type:v.absolutePath?"path":"string"};case"boolean":return{type:"boolean"}}if(v.instanceof==="RegExp"){return{type:"RegExp"}}return undefined};const addResetFlag=v=>{const R=v[0].path;const $=pathToArgumentName(`${R}.reset`);const j=getResetDescription(v)||`Clear all items provided in '${R}' configuration. ${getDescription(v)}`;E[$]={configs:[{type:"reset",multiple:false,description:j,path:R}],description:undefined,simpleType:undefined,multiple:undefined}};const addFlag=(v,R)=>{const $=schemaToArgumentConfig(v[0].schema);if(!$)return 0;const j=getNegatedDescription(v);const N=pathToArgumentName(v[0].path);const q={...$,multiple:R,description:getDescription(v),path:v[0].path};if(j){q.negatedDescription=j}if(!E[N]){E[N]={configs:[],description:undefined,simpleType:undefined,multiple:undefined}}if(E[N].configs.some((v=>JSON.stringify(v)===JSON.stringify(q)))){return 0}if(E[N].configs.some((v=>v.type===q.type&&v.multiple!==R))){if(R){throw new Error(`Conflicting schema for ${v[0].path} with ${q.type} type (array type must be before single item type)`)}return 0}E[N].configs.push(q);return 1};const traverse=(v,E="",R=[],$=null)=>{while(v.$ref){v=getSchemaPart(v.$ref)}const j=R.filter((({schema:E})=>E===v));if(j.length>=2||j.some((({path:v})=>v===E))){return 0}if(v.cli&&v.cli.exclude)return 0;const N=[{schema:v,path:E},...R];let q=0;q+=addFlag(N,!!$);if(v.type==="object"){if(v.properties){for(const R of Object.keys(v.properties)){q+=traverse(v.properties[R],E?`${E}.${R}`:R,N,$)}}return q}if(v.type==="array"){if($){return 0}if(Array.isArray(v.items)){let R=0;for(const $ of v.items){q+=traverse($,`${E}.${R}`,N,E)}return q}q+=traverse(v.items,`${E}[]`,N,E);if(q>0){addResetFlag(N);q++}return q}const G=v.oneOf||v.anyOf||v.allOf;if(G){const v=G;for(let R=0;R{if(!v)return E;if(!E)return v;if(v.includes(E))return v;return`${v} ${E}`}),undefined);R.simpleType=R.configs.reduce(((v,E)=>{let R="string";switch(E.type){case"number":R="number";break;case"reset":case"boolean":R="boolean";break;case"enum":if(E.values.every((v=>typeof v==="boolean")))R="boolean";if(E.values.every((v=>typeof v==="number")))R="number";break}if(v===undefined)return R;return v===R?v:"string"}),undefined);R.multiple=R.configs.some((v=>v.multiple))}return E};const N=new WeakMap;const getObjectAndProperty=(v,E,R=0)=>{if(!E)return{value:v};const $=E.split(".");let j=$.pop();let q=v;let G=0;for(const v of $){const E=v.endsWith("[]");const j=E?v.slice(0,-2):v;let ie=q[j];if(E){if(ie===undefined){ie={};q[j]=[...Array.from({length:R}),ie];N.set(q[j],R+1)}else if(!Array.isArray(ie)){return{problem:{type:"unexpected-non-array-in-path",path:$.slice(0,G).join(".")}}}else{let v=N.get(ie)||0;while(v<=R){ie.push(undefined);v++}N.set(ie,v);const E=ie.length-v+R;if(ie[E]===undefined){ie[E]={}}else if(ie[E]===null||typeof ie[E]!=="object"){return{problem:{type:"unexpected-non-object-in-path",path:$.slice(0,G).join(".")}}}ie=ie[E]}}else{if(ie===undefined){ie=q[j]={}}else if(ie===null||typeof ie!=="object"){return{problem:{type:"unexpected-non-object-in-path",path:$.slice(0,G).join(".")}}}}q=ie;G++}let ie=q[j];if(j.endsWith("[]")){const v=j.slice(0,-2);const $=q[v];if($===undefined){q[v]=[...Array.from({length:R}),undefined];N.set(q[v],R+1);return{object:q[v],property:R,value:undefined}}else if(!Array.isArray($)){q[v]=[$,...Array.from({length:R}),undefined];N.set(q[v],R+1);return{object:q[v],property:R+1,value:undefined}}else{let v=N.get($)||0;while(v<=R){$.push(undefined);v++}N.set($,v);const j=$.length-v+R;if($[j]===undefined){$[j]={}}else if($[j]===null||typeof $[j]!=="object"){return{problem:{type:"unexpected-non-object-in-path",path:E}}}return{object:$,property:j,value:$[j]}}}return{object:q,property:j,value:ie}};const setValue=(v,E,R,$)=>{const{problem:j,object:N,property:q}=getObjectAndProperty(v,E,$);if(j)return j;N[q]=R;return null};const processArgumentConfig=(v,E,R,$)=>{if($!==undefined&&!v.multiple){return{type:"multiple-values-unexpected",path:v.path}}const j=parseValueForArgumentConfig(v,R);if(j===undefined){return{type:"invalid-value",path:v.path,expected:getExpectedValue(v)}}const N=setValue(E,v.path,j,$);if(N)return N;return null};const getExpectedValue=v=>{switch(v.type){default:return v.type;case"boolean":return"true | false";case"RegExp":return"regular expression (example: /ab?c*/)";case"enum":return v.values.map((v=>`${v}`)).join(" | ");case"reset":return"true (will reset the previous value to an empty array)"}};const parseValueForArgumentConfig=(v,E)=>{switch(v.type){case"string":if(typeof E==="string"){return E}break;case"path":if(typeof E==="string"){return $.resolve(E)}break;case"number":if(typeof E==="number")return E;if(typeof E==="string"&&/^[+-]?\d*(\.\d*)[eE]\d+$/){const v=+E;if(!isNaN(v))return v}break;case"boolean":if(typeof E==="boolean")return E;if(E==="true")return true;if(E==="false")return false;break;case"RegExp":if(E instanceof RegExp)return E;if(typeof E==="string"){const v=/^\/(.*)\/([yugi]*)$/.exec(E);if(v&&!/[^\\]\//.test(v[1]))return new RegExp(v[1],v[2])}break;case"enum":if(v.values.includes(E))return E;for(const R of v.values){if(`${R}`===E)return R}break;case"reset":if(E===true)return[];break}};const processArguments=(v,E,R)=>{const $=[];for(const j of Object.keys(R)){const N=v[j];if(!N){$.push({type:"unknown-argument",path:"",argument:j});continue}const processValue=(v,R)=>{const q=[];for(const $ of N.configs){const N=processArgumentConfig($,E,v,R);if(!N){return}q.push({...N,argument:j,value:v,index:R})}$.push(...q)};let q=R[j];if(Array.isArray(q)){for(let v=0;v{if(!v){return{}}if(j.isAbsolute(v)){const[,E,R]=N.exec(v)||[];return{configPath:E,env:R}}const R=$.findConfig(E);if(R&&Object.keys(R).includes(v)){return{env:v}}return{query:v}};const load=(v,E)=>{const{configPath:R,env:j,query:N}=parse(v,E);const q=N?N:R?$.loadConfig({config:R,env:j}):$.loadConfig({path:E,env:j});if(!q)return null;return $(q)};const resolve=v=>{const rawChecker=E=>v.every((v=>{const[R,$]=v.split(" ");if(!R)return false;const j=E[R];if(!j)return false;const[N,q]=$==="TP"?[Infinity,Infinity]:$.split(".");if(typeof j==="number"){return+N>=j}return j[0]===+N?+q>=j[1]:+N>j[0]}));const E=v.some((v=>/^node /.test(v)));const R=v.some((v=>/^(?!node)/.test(v)));const $=!R?false:E?null:true;const j=!E?false:R?null:true;const N=rawChecker({chrome:63,and_chr:63,edge:79,firefox:67,and_ff:67,opera:50,op_mob:46,safari:[11,1],ios_saf:[11,3],samsung:[8,2],android:63,and_qq:[10,4],node:[12,17]});return{const:rawChecker({chrome:49,and_chr:49,edge:12,firefox:36,and_ff:36,opera:36,op_mob:36,safari:[10,0],ios_saf:[10,0],samsung:[5,0],android:37,and_qq:[10,4],and_uc:[12,12],kaios:[2,5],node:[6,0]}),arrowFunction:rawChecker({chrome:45,and_chr:45,edge:12,firefox:39,and_ff:39,opera:32,op_mob:32,safari:10,ios_saf:10,samsung:[5,0],android:45,and_qq:[10,4],baidu:[7,12],and_uc:[12,12],kaios:[2,5],node:[6,0]}),forOf:rawChecker({chrome:38,and_chr:38,edge:12,firefox:51,and_ff:51,opera:25,op_mob:25,safari:7,ios_saf:7,samsung:[3,0],android:38,node:[0,12]}),destructuring:rawChecker({chrome:49,and_chr:49,edge:14,firefox:41,and_ff:41,opera:36,op_mob:36,safari:8,ios_saf:8,samsung:[5,0],android:49,node:[6,0]}),bigIntLiteral:rawChecker({chrome:67,and_chr:67,edge:79,firefox:68,and_ff:68,opera:54,op_mob:48,safari:14,ios_saf:14,samsung:[9,2],android:67,node:[10,4]}),module:rawChecker({chrome:61,and_chr:61,edge:16,firefox:60,and_ff:60,opera:48,op_mob:45,safari:[10,1],ios_saf:[10,3],samsung:[8,0],android:61,and_qq:[10,4],node:[12,17]}),dynamicImport:N,dynamicImportInWorker:N&&!E,globalThis:rawChecker({chrome:71,and_chr:71,edge:79,firefox:65,and_ff:65,opera:58,op_mob:50,safari:[12,1],ios_saf:[12,2],samsung:[10,1],android:71,node:12}),optionalChaining:rawChecker({chrome:80,and_chr:80,edge:80,firefox:74,and_ff:79,opera:67,op_mob:64,safari:[13,1],ios_saf:[13,4],samsung:13,android:80,node:14}),templateLiteral:rawChecker({chrome:41,and_chr:41,edge:13,firefox:34,and_ff:34,opera:29,op_mob:64,safari:[9,1],ios_saf:9,samsung:4,android:41,and_qq:[10,4],baidu:[7,12],and_uc:[12,12],kaios:[2,5],node:4}),browser:$,electron:false,node:j,nwjs:false,web:$,webworker:false,document:$,fetchWasm:$,global:j,importScripts:false,importScriptsInWorker:true,nodeBuiltins:j,require:j}};v.exports={resolve:resolve,load:load}},64395:function(v,E,R){"use strict";const $=R(57147);const j=R(71017);const N=R(43841);const{cleverMerge:q}=R(22093);const{getTargetsProperties:G,getTargetProperties:ie,getDefaultTarget:ae}=R(60065);const ce=/[\\/]node_modules[\\/]/i;const D=(v,E,R)=>{if(v[E]===undefined){v[E]=R}};const F=(v,E,R)=>{if(v[E]===undefined){v[E]=R()}};const A=(v,E,R)=>{const $=v[E];if($===undefined){v[E]=R()}else if(Array.isArray($)){let j=undefined;for(let N=0;N<$.length;N++){const q=$[N];if(q==="..."){if(j===undefined){j=$.slice(0,N);v[E]=j}const q=R();if(q!==undefined){for(const v of q){j.push(v)}}}else if(j!==undefined){j.push(q)}}}};const applyWebpackOptionsBaseDefaults=v=>{F(v,"context",(()=>process.cwd()));applyInfrastructureLoggingDefaults(v.infrastructureLogging)};const applyWebpackOptionsDefaults=v=>{F(v,"context",(()=>process.cwd()));F(v,"target",(()=>ae(v.context)));const{mode:E,name:$,target:j}=v;let N=j===false?false:typeof j==="string"?ie(j,v.context):G(j,v.context);const ce=E==="development";const le=E==="production"||!E;if(typeof v.entry!=="function"){for(const E of Object.keys(v.entry)){F(v.entry[E],"import",(()=>["./src"]))}}F(v,"devtool",(()=>ce?"eval":false));D(v,"watch",false);D(v,"profile",false);D(v,"parallelism",100);D(v,"recordsInputPath",false);D(v,"recordsOutputPath",false);applyExperimentsDefaults(v.experiments,{production:le,development:ce,targetProperties:N});const me=v.experiments.futureDefaults;F(v,"cache",(()=>ce?{type:"memory"}:false));applyCacheDefaults(v.cache,{name:$||"default",mode:E||"production",development:ce,cacheUnaffected:v.experiments.cacheUnaffected});const _e=!!v.cache;applySnapshotDefaults(v.snapshot,{production:le,futureDefaults:me});applyModuleDefaults(v.module,{cache:_e,syncWebAssembly:v.experiments.syncWebAssembly,asyncWebAssembly:v.experiments.asyncWebAssembly,css:v.experiments.css,futureDefaults:me,isNode:N&&N.node===true});applyOutputDefaults(v.output,{context:v.context,targetProperties:N,isAffectedByBrowserslist:j===undefined||typeof j==="string"&&j.startsWith("browserslist")||Array.isArray(j)&&j.some((v=>v.startsWith("browserslist"))),outputModule:v.experiments.outputModule,development:ce,entry:v.entry,module:v.module,futureDefaults:me});applyExternalsPresetsDefaults(v.externalsPresets,{targetProperties:N,buildHttp:!!v.experiments.buildHttp});applyLoaderDefaults(v.loader,{targetProperties:N});F(v,"externalsType",(()=>{const E=R(13954).definitions.ExternalsType["enum"];return v.output.library&&E.includes(v.output.library.type)?v.output.library.type:v.output.module?"module":"var"}));applyNodeDefaults(v.node,{futureDefaults:v.experiments.futureDefaults,targetProperties:N});F(v,"performance",(()=>le&&N&&(N.browser||N.browser===null)?{}:false));applyPerformanceDefaults(v.performance,{production:le});applyOptimizationDefaults(v.optimization,{development:ce,production:le,css:v.experiments.css,records:!!(v.recordsInputPath||v.recordsOutputPath)});v.resolve=q(getResolveDefaults({cache:_e,context:v.context,targetProperties:N,mode:v.mode}),v.resolve);v.resolveLoader=q(getResolveLoaderDefaults({cache:_e}),v.resolveLoader)};const applyExperimentsDefaults=(v,{production:E,development:R,targetProperties:$})=>{D(v,"futureDefaults",false);D(v,"backCompat",!v.futureDefaults);D(v,"topLevelAwait",v.futureDefaults);D(v,"syncWebAssembly",false);D(v,"asyncWebAssembly",v.futureDefaults);D(v,"outputModule",false);D(v,"layers",false);D(v,"lazyCompilation",undefined);D(v,"buildHttp",undefined);D(v,"cacheUnaffected",v.futureDefaults);F(v,"css",(()=>v.futureDefaults?{}:undefined));if(typeof v.buildHttp==="object"){D(v.buildHttp,"frozen",E);D(v.buildHttp,"upgrade",false)}if(typeof v.css==="object"){D(v.css,"exportsOnly",!$||!$.document)}};const applyCacheDefaults=(v,{name:E,mode:R,development:N,cacheUnaffected:q})=>{if(v===false)return;switch(v.type){case"filesystem":F(v,"name",(()=>E+"-"+R));D(v,"version","");F(v,"cacheDirectory",(()=>{const v=process.cwd();let E=v;for(;;){try{if($.statSync(j.join(E,"package.json")).isFile())break}catch(v){}const v=j.dirname(E);if(E===v){E=undefined;break}E=v}if(!E){return j.resolve(v,".cache/webpack")}else if(process.versions.pnp==="1"){return j.resolve(E,".pnp/.cache/webpack")}else if(process.versions.pnp==="3"){return j.resolve(E,".yarn/.cache/webpack")}else{return j.resolve(E,"node_modules/.cache/webpack")}}));F(v,"cacheLocation",(()=>j.resolve(v.cacheDirectory,v.name)));D(v,"hashAlgorithm","md4");D(v,"store","pack");D(v,"compression",false);D(v,"profile",false);D(v,"idleTimeout",6e4);D(v,"idleTimeoutForInitialStore",5e3);D(v,"idleTimeoutAfterLargeChanges",1e3);D(v,"maxMemoryGenerations",N?5:Infinity);D(v,"maxAge",1e3*60*60*24*60);D(v,"allowCollectingMemory",N);D(v,"memoryCacheUnaffected",N&&q);D(v.buildDependencies,"defaultWebpack",[j.resolve(__dirname,"..")+j.sep]);break;case"memory":D(v,"maxGenerations",Infinity);D(v,"cacheUnaffected",N&&q);break}};const applySnapshotDefaults=(v,{production:E,futureDefaults:R})=>{if(R){F(v,"managedPaths",(()=>process.versions.pnp==="3"?[/^(.+?(?:[\\/]\.yarn[\\/]unplugged[\\/][^\\/]+)?[\\/]node_modules[\\/])/]:[/^(.+?[\\/]node_modules[\\/])/]));F(v,"immutablePaths",(()=>process.versions.pnp==="3"?[/^(.+?[\\/]cache[\\/][^\\/]+\.zip[\\/]node_modules[\\/])/]:[]))}else{A(v,"managedPaths",(()=>{if(process.versions.pnp==="3"){const v=/^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec(36871);if(v){return[j.resolve(v[1],"unplugged")]}}else{const v=/^(.+?[\\/]node_modules[\\/])/.exec(36871);if(v){return[v[1]]}}return[]}));A(v,"immutablePaths",(()=>{if(process.versions.pnp==="1"){const v=/^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec(36871);if(v){return[v[1]]}}else if(process.versions.pnp==="3"){const v=/^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec(36871);if(v){return[v[1]]}}return[]}))}F(v,"resolveBuildDependencies",(()=>({timestamp:true,hash:true})));F(v,"buildDependencies",(()=>({timestamp:true,hash:true})));F(v,"module",(()=>E?{timestamp:true,hash:true}:{timestamp:true}));F(v,"resolve",(()=>E?{timestamp:true,hash:true}:{timestamp:true}))};const applyJavascriptParserOptionsDefaults=(v,{futureDefaults:E,isNode:R})=>{D(v,"unknownContextRequest",".");D(v,"unknownContextRegExp",false);D(v,"unknownContextRecursive",true);D(v,"unknownContextCritical",true);D(v,"exprContextRequest",".");D(v,"exprContextRegExp",false);D(v,"exprContextRecursive",true);D(v,"exprContextCritical",true);D(v,"wrappedContextRegExp",/.*/);D(v,"wrappedContextRecursive",true);D(v,"wrappedContextCritical",false);D(v,"strictThisContextOnImports",false);D(v,"importMeta",true);D(v,"dynamicImportMode","lazy");D(v,"dynamicImportPrefetch",false);D(v,"dynamicImportPreload",false);D(v,"createRequire",R);if(E)D(v,"exportsPresence","error")};const applyModuleDefaults=(v,{cache:E,syncWebAssembly:R,asyncWebAssembly:$,css:j,futureDefaults:N,isNode:q})=>{if(E){D(v,"unsafeCache",(v=>{const E=v.nameForCondition();return E&&ce.test(E)}))}else{D(v,"unsafeCache",false)}F(v.parser,"asset",(()=>({})));F(v.parser.asset,"dataUrlCondition",(()=>({})));if(typeof v.parser.asset.dataUrlCondition==="object"){D(v.parser.asset.dataUrlCondition,"maxSize",8096)}F(v.parser,"javascript",(()=>({})));applyJavascriptParserOptionsDefaults(v.parser.javascript,{futureDefaults:N,isNode:q});A(v,"defaultRules",(()=>{const v={type:"javascript/esm",resolve:{byDependency:{esm:{fullySpecified:true}}}};const E={type:"javascript/dynamic"};const N=[{mimetype:"application/node",type:"javascript/auto"},{test:/\.json$/i,type:"json"},{mimetype:"application/json",type:"json"},{test:/\.mjs$/i,...v},{test:/\.js$/i,descriptionData:{type:"module"},...v},{test:/\.cjs$/i,...E},{test:/\.js$/i,descriptionData:{type:"commonjs"},...E},{mimetype:{or:["text/javascript","application/javascript"]},...v}];if($){const v={type:"webassembly/async",rules:[{descriptionData:{type:"module"},resolve:{fullySpecified:true}}]};N.push({test:/\.wasm$/i,...v});N.push({mimetype:"application/wasm",...v})}else if(R){const v={type:"webassembly/sync",rules:[{descriptionData:{type:"module"},resolve:{fullySpecified:true}}]};N.push({test:/\.wasm$/i,...v});N.push({mimetype:"application/wasm",...v})}if(j){const v={type:"css",resolve:{fullySpecified:true,preferRelative:true}};const E={type:"css/module",resolve:{fullySpecified:true}};N.push({test:/\.css$/i,oneOf:[{test:/\.module\.css$/i,...E},{...v}]});N.push({mimetype:"text/css+module",...E});N.push({mimetype:"text/css",...v})}N.push({dependency:"url",oneOf:[{scheme:/^data$/,type:"asset/inline"},{type:"asset/resource"}]},{assert:{type:"json"},type:"json"});return N}))};const applyOutputDefaults=(v,{context:E,targetProperties:R,isAffectedByBrowserslist:q,outputModule:G,development:ie,entry:ae,module:ce,futureDefaults:le})=>{const getLibraryName=v=>{const E=typeof v==="object"&&v&&!Array.isArray(v)&&"type"in v?v.name:v;if(Array.isArray(E)){return E.join(".")}else if(typeof E==="object"){return getLibraryName(E.root)}else if(typeof E==="string"){return E}return""};F(v,"uniqueName",(()=>{const R=getLibraryName(v.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g,((v,E,R,$,j,N)=>{const q=E||j||N;return q.startsWith("\\")&&q.endsWith("\\")?`${$||""}[${q.slice(1,-1)}]${R||""}`:""}));if(R)return R;const N=j.resolve(E,"package.json");try{const v=JSON.parse($.readFileSync(N,"utf-8"));return v.name||""}catch(v){if(v.code!=="ENOENT"){v.message+=`\nwhile determining default 'output.uniqueName' from 'name' in ${N}`;throw v}return""}}));F(v,"module",(()=>!!G));D(v,"filename",v.module?"[name].mjs":"[name].js");F(v,"iife",(()=>!v.module));D(v,"importFunctionName","import");D(v,"importMetaName","import.meta");F(v,"chunkFilename",(()=>{const E=v.filename;if(typeof E!=="function"){const v=E.includes("[name]");const R=E.includes("[id]");const $=E.includes("[chunkhash]");const j=E.includes("[contenthash]");if($||j||v||R)return E;return E.replace(/(^|\/)([^/]*(?:\?|$))/,"$1[id].$2")}return v.module?"[id].mjs":"[id].js"}));F(v,"cssFilename",(()=>{const E=v.filename;if(typeof E!=="function"){return E.replace(/\.[mc]?js(\?|$)/,".css$1")}return"[id].css"}));F(v,"cssChunkFilename",(()=>{const E=v.chunkFilename;if(typeof E!=="function"){return E.replace(/\.[mc]?js(\?|$)/,".css$1")}return"[id].css"}));D(v,"assetModuleFilename","[hash][ext][query]");D(v,"webassemblyModuleFilename","[hash].module.wasm");D(v,"compareBeforeEmit",true);D(v,"charset",true);F(v,"hotUpdateGlobal",(()=>N.toIdentifier("webpackHotUpdate"+N.toIdentifier(v.uniqueName))));F(v,"chunkLoadingGlobal",(()=>N.toIdentifier("webpackChunk"+N.toIdentifier(v.uniqueName))));F(v,"globalObject",(()=>{if(R){if(R.global)return"global";if(R.globalThis)return"globalThis"}return"self"}));F(v,"chunkFormat",(()=>{if(R){const E=q?"Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly.":"Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";if(v.module){if(R.dynamicImport)return"module";if(R.document)return"array-push";throw new Error("For the selected environment is no default ESM chunk format available:\n"+"ESM exports can be chosen when 'import()' is available.\n"+"JSONP Array push can be chosen when 'document' is available.\n"+E)}else{if(R.document)return"array-push";if(R.require)return"commonjs";if(R.nodeBuiltins)return"commonjs";if(R.importScripts)return"array-push";throw new Error("For the selected environment is no default script chunk format available:\n"+"JSONP Array push can be chosen when 'document' or 'importScripts' is available.\n"+"CommonJs exports can be chosen when 'require' or node builtins are available.\n"+E)}}throw new Error("Chunk format can't be selected by default when no target is specified")}));D(v,"asyncChunks",true);F(v,"chunkLoading",(()=>{if(R){switch(v.chunkFormat){case"array-push":if(R.document)return"jsonp";if(R.importScripts)return"import-scripts";break;case"commonjs":if(R.require)return"require";if(R.nodeBuiltins)return"async-node";break;case"module":if(R.dynamicImport)return"import";break}if(R.require===null||R.nodeBuiltins===null||R.document===null||R.importScripts===null){return"universal"}}return false}));F(v,"workerChunkLoading",(()=>{if(R){switch(v.chunkFormat){case"array-push":if(R.importScriptsInWorker)return"import-scripts";break;case"commonjs":if(R.require)return"require";if(R.nodeBuiltins)return"async-node";break;case"module":if(R.dynamicImportInWorker)return"import";break}if(R.require===null||R.nodeBuiltins===null||R.importScriptsInWorker===null){return"universal"}}return false}));F(v,"wasmLoading",(()=>{if(R){if(R.fetchWasm)return"fetch";if(R.nodeBuiltins)return v.module?"async-node-module":"async-node";if(R.nodeBuiltins===null||R.fetchWasm===null){return"universal"}}return false}));F(v,"workerWasmLoading",(()=>v.wasmLoading));F(v,"devtoolNamespace",(()=>v.uniqueName));if(v.library){F(v.library,"type",(()=>v.module?"module":"var"))}F(v,"path",(()=>j.join(process.cwd(),"dist")));F(v,"pathinfo",(()=>ie));D(v,"sourceMapFilename","[file].map[query]");D(v,"hotUpdateChunkFilename",`[id].[fullhash].hot-update.${v.module?"mjs":"js"}`);D(v,"hotUpdateMainFilename","[runtime].[fullhash].hot-update.json");D(v,"crossOriginLoading",false);F(v,"scriptType",(()=>v.module?"module":false));D(v,"publicPath",R&&(R.document||R.importScripts)||v.scriptType==="module"?"auto":"");D(v,"chunkLoadTimeout",12e4);D(v,"hashFunction",le?"xxhash64":"md4");D(v,"hashDigest","hex");D(v,"hashDigestLength",le?16:20);D(v,"strictModuleExceptionHandling",false);const optimistic=v=>v||v===undefined;const conditionallyOptimistic=(v,E)=>v===undefined&&E||v;F(v.environment,"arrowFunction",(()=>R&&optimistic(R.arrowFunction)));F(v.environment,"const",(()=>R&&optimistic(R.const)));F(v.environment,"destructuring",(()=>R&&optimistic(R.destructuring)));F(v.environment,"forOf",(()=>R&&optimistic(R.forOf)));F(v.environment,"bigIntLiteral",(()=>R&&R.bigIntLiteral));F(v.environment,"dynamicImport",(()=>conditionallyOptimistic(R&&R.dynamicImport,v.module)));F(v.environment,"module",(()=>conditionallyOptimistic(R&&R.module,v.module)));const{trustedTypes:me}=v;if(me){F(me,"policyName",(()=>v.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g,"_")||"webpack"))}const forEachEntry=v=>{for(const E of Object.keys(ae)){v(ae[E])}};A(v,"enabledLibraryTypes",(()=>{const E=[];if(v.library){E.push(v.library.type)}forEachEntry((v=>{if(v.library){E.push(v.library.type)}}));return E}));A(v,"enabledChunkLoadingTypes",(()=>{const E=new Set;if(v.chunkLoading){E.add(v.chunkLoading)}if(v.workerChunkLoading){E.add(v.workerChunkLoading)}forEachEntry((v=>{if(v.chunkLoading){E.add(v.chunkLoading)}}));return Array.from(E)}));A(v,"enabledWasmLoadingTypes",(()=>{const E=new Set;if(v.wasmLoading){E.add(v.wasmLoading)}if(v.workerWasmLoading){E.add(v.workerWasmLoading)}forEachEntry((v=>{if(v.wasmLoading){E.add(v.wasmLoading)}}));return Array.from(E)}))};const applyExternalsPresetsDefaults=(v,{targetProperties:E,buildHttp:R})=>{D(v,"web",!R&&E&&E.web);D(v,"node",E&&E.node);D(v,"nwjs",E&&E.nwjs);D(v,"electron",E&&E.electron);D(v,"electronMain",E&&E.electron&&E.electronMain);D(v,"electronPreload",E&&E.electron&&E.electronPreload);D(v,"electronRenderer",E&&E.electron&&E.electronRenderer)};const applyLoaderDefaults=(v,{targetProperties:E})=>{F(v,"target",(()=>{if(E){if(E.electron){if(E.electronMain)return"electron-main";if(E.electronPreload)return"electron-preload";if(E.electronRenderer)return"electron-renderer";return"electron"}if(E.nwjs)return"nwjs";if(E.node)return"node";if(E.web)return"web"}}))};const applyNodeDefaults=(v,{futureDefaults:E,targetProperties:R})=>{if(v===false)return;F(v,"global",(()=>{if(R&&R.global)return false;return E?"warn":true}));F(v,"__filename",(()=>{if(R&&R.node)return"eval-only";return E?"warn-mock":"mock"}));F(v,"__dirname",(()=>{if(R&&R.node)return"eval-only";return E?"warn-mock":"mock"}))};const applyPerformanceDefaults=(v,{production:E})=>{if(v===false)return;D(v,"maxAssetSize",25e4);D(v,"maxEntrypointSize",25e4);F(v,"hints",(()=>E?"warning":false))};const applyOptimizationDefaults=(v,{production:E,development:$,css:j,records:N})=>{D(v,"removeAvailableModules",false);D(v,"removeEmptyChunks",true);D(v,"mergeDuplicateChunks",true);D(v,"flagIncludedChunks",E);F(v,"moduleIds",(()=>{if(E)return"deterministic";if($)return"named";return"natural"}));F(v,"chunkIds",(()=>{if(E)return"deterministic";if($)return"named";return"natural"}));F(v,"sideEffects",(()=>E?true:"flag"));D(v,"providedExports",true);D(v,"usedExports",E);D(v,"innerGraph",E);D(v,"mangleExports",E);D(v,"concatenateModules",E);D(v,"runtimeChunk",false);D(v,"emitOnErrors",!E);D(v,"checkWasmTypes",E);D(v,"mangleWasmImports",false);D(v,"portableRecords",N);D(v,"realContentHash",E);D(v,"minimize",E);A(v,"minimizer",(()=>[{apply:v=>{const E=R(55302);new E({terserOptions:{compress:{passes:2}}}).apply(v)}}]));F(v,"nodeEnv",(()=>{if(E)return"production";if($)return"development";return false}));const{splitChunks:q}=v;if(q){A(q,"defaultSizeTypes",(()=>j?["javascript","css","unknown"]:["javascript","unknown"]));D(q,"hidePathInfo",E);D(q,"chunks","async");D(q,"usedExports",v.usedExports===true);D(q,"minChunks",1);F(q,"minSize",(()=>E?2e4:1e4));F(q,"minRemainingSize",(()=>$?0:undefined));F(q,"enforceSizeThreshold",(()=>E?5e4:3e4));F(q,"maxAsyncRequests",(()=>E?30:Infinity));F(q,"maxInitialRequests",(()=>E?30:Infinity));D(q,"automaticNameDelimiter","-");const{cacheGroups:R}=q;F(R,"default",(()=>({idHint:"",reuseExistingChunk:true,minChunks:2,priority:-20})));F(R,"defaultVendors",(()=>({idHint:"vendors",reuseExistingChunk:true,test:ce,priority:-10})))}};const getResolveDefaults=({cache:v,context:E,targetProperties:R,mode:$})=>{const j=["webpack"];j.push($==="development"?"development":"production");if(R){if(R.webworker)j.push("worker");if(R.node)j.push("node");if(R.web)j.push("browser");if(R.electron)j.push("electron");if(R.nwjs)j.push("nwjs")}const N=[".js",".json",".wasm"];const q=R;const G=q&&q.web&&(!q.node||q.electron&&q.electronRenderer);const cjsDeps=()=>({aliasFields:G?["browser"]:[],mainFields:G?["browser","module","..."]:["module","..."],conditionNames:["require","module","..."],extensions:[...N]});const esmDeps=()=>({aliasFields:G?["browser"]:[],mainFields:G?["browser","module","..."]:["module","..."],conditionNames:["import","module","..."],extensions:[...N]});const ie={cache:v,modules:["node_modules"],conditionNames:j,mainFiles:["index"],extensions:[],aliasFields:[],exportsFields:["exports"],roots:[E],mainFields:["main"],byDependency:{wasm:esmDeps(),esm:esmDeps(),loaderImport:esmDeps(),url:{preferRelative:true},worker:{...esmDeps(),preferRelative:true},commonjs:cjsDeps(),amd:cjsDeps(),loader:cjsDeps(),unknown:cjsDeps(),undefined:cjsDeps()}};return ie};const getResolveLoaderDefaults=({cache:v})=>{const E={cache:v,conditionNames:["loader","require","node"],exportsFields:["exports"],mainFields:["loader","main"],extensions:[".js"],mainFiles:["index"]};return E};const applyInfrastructureLoggingDefaults=v=>{F(v,"stream",(()=>process.stderr));const E=v.stream.isTTY&&process.env.TERM!=="dumb";D(v,"level","info");D(v,"debug",false);D(v,"colors",E);D(v,"appendOnly",!E)};E.applyWebpackOptionsBaseDefaults=applyWebpackOptionsBaseDefaults;E.applyWebpackOptionsDefaults=applyWebpackOptionsDefaults},80593:function(v,E,R){"use strict";const $=R(73837);const j=$.deprecate(((v,E)=>{if(E!==undefined&&!v===!E){throw new Error("Conflicting use of 'optimization.noEmitOnErrors' and 'optimization.emitOnErrors'. Remove deprecated 'optimization.noEmitOnErrors' from config.")}return!v}),"optimization.noEmitOnErrors is deprecated in favor of optimization.emitOnErrors","DEP_WEBPACK_CONFIGURATION_OPTIMIZATION_NO_EMIT_ON_ERRORS");const nestedConfig=(v,E)=>v===undefined?E({}):E(v);const cloneObject=v=>({...v});const optionalNestedConfig=(v,E)=>v===undefined?undefined:E(v);const nestedArray=(v,E)=>Array.isArray(v)?E(v):E([]);const optionalNestedArray=(v,E)=>Array.isArray(v)?E(v):undefined;const keyedNestedConfig=(v,E,R)=>{const $=v===undefined?{}:Object.keys(v).reduce((($,j)=>($[j]=(R&&j in R?R[j]:E)(v[j]),$)),{});if(R){for(const v of Object.keys(R)){if(!(v in $)){$[v]=R[v]({})}}}return $};const getNormalizedWebpackOptions=v=>({amd:v.amd,bail:v.bail,cache:optionalNestedConfig(v.cache,(v=>{if(v===false)return false;if(v===true){return{type:"memory",maxGenerations:undefined}}switch(v.type){case"filesystem":return{type:"filesystem",allowCollectingMemory:v.allowCollectingMemory,maxMemoryGenerations:v.maxMemoryGenerations,maxAge:v.maxAge,profile:v.profile,buildDependencies:cloneObject(v.buildDependencies),cacheDirectory:v.cacheDirectory,cacheLocation:v.cacheLocation,hashAlgorithm:v.hashAlgorithm,compression:v.compression,idleTimeout:v.idleTimeout,idleTimeoutForInitialStore:v.idleTimeoutForInitialStore,idleTimeoutAfterLargeChanges:v.idleTimeoutAfterLargeChanges,name:v.name,store:v.store,version:v.version};case undefined:case"memory":return{type:"memory",maxGenerations:v.maxGenerations};default:throw new Error(`Not implemented cache.type ${v.type}`)}})),context:v.context,dependencies:v.dependencies,devServer:optionalNestedConfig(v.devServer,(v=>({...v}))),devtool:v.devtool,entry:v.entry===undefined?{main:{}}:typeof v.entry==="function"?(v=>()=>Promise.resolve().then(v).then(getNormalizedEntryStatic))(v.entry):getNormalizedEntryStatic(v.entry),experiments:nestedConfig(v.experiments,(v=>({...v,buildHttp:optionalNestedConfig(v.buildHttp,(v=>Array.isArray(v)?{allowedUris:v}:v)),lazyCompilation:optionalNestedConfig(v.lazyCompilation,(v=>v===true?{}:v===false?undefined:v)),css:optionalNestedConfig(v.css,(v=>v===true?{}:v===false?undefined:v))}))),externals:v.externals,externalsPresets:cloneObject(v.externalsPresets),externalsType:v.externalsType,ignoreWarnings:v.ignoreWarnings?v.ignoreWarnings.map((v=>{if(typeof v==="function")return v;const E=v instanceof RegExp?{message:v}:v;return(v,{requestShortener:R})=>{if(!E.message&&!E.module&&!E.file)return false;if(E.message&&!E.message.test(v.message)){return false}if(E.module&&(!v.module||!E.module.test(v.module.readableIdentifier(R)))){return false}if(E.file&&(!v.file||!E.file.test(v.file))){return false}return true}})):undefined,infrastructureLogging:cloneObject(v.infrastructureLogging),loader:cloneObject(v.loader),mode:v.mode,module:nestedConfig(v.module,(v=>({noParse:v.noParse,unsafeCache:v.unsafeCache,parser:keyedNestedConfig(v.parser,cloneObject,{javascript:E=>({unknownContextRequest:v.unknownContextRequest,unknownContextRegExp:v.unknownContextRegExp,unknownContextRecursive:v.unknownContextRecursive,unknownContextCritical:v.unknownContextCritical,exprContextRequest:v.exprContextRequest,exprContextRegExp:v.exprContextRegExp,exprContextRecursive:v.exprContextRecursive,exprContextCritical:v.exprContextCritical,wrappedContextRegExp:v.wrappedContextRegExp,wrappedContextRecursive:v.wrappedContextRecursive,wrappedContextCritical:v.wrappedContextCritical,strictExportPresence:v.strictExportPresence,strictThisContextOnImports:v.strictThisContextOnImports,...E})}),generator:cloneObject(v.generator),defaultRules:optionalNestedArray(v.defaultRules,(v=>[...v])),rules:nestedArray(v.rules,(v=>[...v]))}))),name:v.name,node:nestedConfig(v.node,(v=>v&&{...v})),optimization:nestedConfig(v.optimization,(v=>({...v,runtimeChunk:getNormalizedOptimizationRuntimeChunk(v.runtimeChunk),splitChunks:nestedConfig(v.splitChunks,(v=>v&&{...v,defaultSizeTypes:v.defaultSizeTypes?[...v.defaultSizeTypes]:["..."],cacheGroups:cloneObject(v.cacheGroups)})),emitOnErrors:v.noEmitOnErrors!==undefined?j(v.noEmitOnErrors,v.emitOnErrors):v.emitOnErrors}))),output:nestedConfig(v.output,(v=>{const{library:E}=v;const R=E;const $=typeof E==="object"&&E&&!Array.isArray(E)&&"type"in E?E:R||v.libraryTarget?{name:R}:undefined;const j={assetModuleFilename:v.assetModuleFilename,asyncChunks:v.asyncChunks,charset:v.charset,chunkFilename:v.chunkFilename,chunkFormat:v.chunkFormat,chunkLoading:v.chunkLoading,chunkLoadingGlobal:v.chunkLoadingGlobal,chunkLoadTimeout:v.chunkLoadTimeout,cssFilename:v.cssFilename,cssChunkFilename:v.cssChunkFilename,clean:v.clean,compareBeforeEmit:v.compareBeforeEmit,crossOriginLoading:v.crossOriginLoading,devtoolFallbackModuleFilenameTemplate:v.devtoolFallbackModuleFilenameTemplate,devtoolModuleFilenameTemplate:v.devtoolModuleFilenameTemplate,devtoolNamespace:v.devtoolNamespace,environment:cloneObject(v.environment),enabledChunkLoadingTypes:v.enabledChunkLoadingTypes?[...v.enabledChunkLoadingTypes]:["..."],enabledLibraryTypes:v.enabledLibraryTypes?[...v.enabledLibraryTypes]:["..."],enabledWasmLoadingTypes:v.enabledWasmLoadingTypes?[...v.enabledWasmLoadingTypes]:["..."],filename:v.filename,globalObject:v.globalObject,hashDigest:v.hashDigest,hashDigestLength:v.hashDigestLength,hashFunction:v.hashFunction,hashSalt:v.hashSalt,hotUpdateChunkFilename:v.hotUpdateChunkFilename,hotUpdateGlobal:v.hotUpdateGlobal,hotUpdateMainFilename:v.hotUpdateMainFilename,iife:v.iife,importFunctionName:v.importFunctionName,importMetaName:v.importMetaName,scriptType:v.scriptType,library:$&&{type:v.libraryTarget!==undefined?v.libraryTarget:$.type,auxiliaryComment:v.auxiliaryComment!==undefined?v.auxiliaryComment:$.auxiliaryComment,export:v.libraryExport!==undefined?v.libraryExport:$.export,name:$.name,umdNamedDefine:v.umdNamedDefine!==undefined?v.umdNamedDefine:$.umdNamedDefine},module:v.module,path:v.path,pathinfo:v.pathinfo,publicPath:v.publicPath,sourceMapFilename:v.sourceMapFilename,sourcePrefix:v.sourcePrefix,strictModuleExceptionHandling:v.strictModuleExceptionHandling,trustedTypes:optionalNestedConfig(v.trustedTypes,(v=>{if(v===true)return{};if(typeof v==="string")return{policyName:v};return{...v}})),uniqueName:v.uniqueName,wasmLoading:v.wasmLoading,webassemblyModuleFilename:v.webassemblyModuleFilename,workerChunkLoading:v.workerChunkLoading,workerWasmLoading:v.workerWasmLoading};return j})),parallelism:v.parallelism,performance:optionalNestedConfig(v.performance,(v=>{if(v===false)return false;return{...v}})),plugins:nestedArray(v.plugins,(v=>[...v])),profile:v.profile,recordsInputPath:v.recordsInputPath!==undefined?v.recordsInputPath:v.recordsPath,recordsOutputPath:v.recordsOutputPath!==undefined?v.recordsOutputPath:v.recordsPath,resolve:nestedConfig(v.resolve,(v=>({...v,byDependency:keyedNestedConfig(v.byDependency,cloneObject)}))),resolveLoader:cloneObject(v.resolveLoader),snapshot:nestedConfig(v.snapshot,(v=>({resolveBuildDependencies:optionalNestedConfig(v.resolveBuildDependencies,(v=>({timestamp:v.timestamp,hash:v.hash}))),buildDependencies:optionalNestedConfig(v.buildDependencies,(v=>({timestamp:v.timestamp,hash:v.hash}))),resolve:optionalNestedConfig(v.resolve,(v=>({timestamp:v.timestamp,hash:v.hash}))),module:optionalNestedConfig(v.module,(v=>({timestamp:v.timestamp,hash:v.hash}))),immutablePaths:optionalNestedArray(v.immutablePaths,(v=>[...v])),managedPaths:optionalNestedArray(v.managedPaths,(v=>[...v]))}))),stats:nestedConfig(v.stats,(v=>{if(v===false){return{preset:"none"}}if(v===true){return{preset:"normal"}}if(typeof v==="string"){return{preset:v}}return{...v}})),target:v.target,watch:v.watch,watchOptions:cloneObject(v.watchOptions)});const getNormalizedEntryStatic=v=>{if(typeof v==="string"){return{main:{import:[v]}}}if(Array.isArray(v)){return{main:{import:v}}}const E={};for(const R of Object.keys(v)){const $=v[R];if(typeof $==="string"){E[R]={import:[$]}}else if(Array.isArray($)){E[R]={import:$}}else{E[R]={import:$.import&&(Array.isArray($.import)?$.import:[$.import]),filename:$.filename,layer:$.layer,runtime:$.runtime,baseUri:$.baseUri,publicPath:$.publicPath,chunkLoading:$.chunkLoading,asyncChunks:$.asyncChunks,wasmLoading:$.wasmLoading,dependOn:$.dependOn&&(Array.isArray($.dependOn)?$.dependOn:[$.dependOn]),library:$.library}}}return E};const getNormalizedOptimizationRuntimeChunk=v=>{if(v===undefined)return undefined;if(v===false)return false;if(v==="single"){return{name:()=>"runtime"}}if(v===true||v==="multiple"){return{name:v=>`runtime~${v.name}`}}const{name:E}=v;return{name:typeof E==="function"?E:()=>E}};E.getNormalizedWebpackOptions=getNormalizedWebpackOptions},60065:function(v,E,R){"use strict";const $=R(61374);const j=$((()=>R(13980)));const getDefaultTarget=v=>{const E=j().load(null,v);return E?"browserslist":"web"};const versionDependent=(v,E)=>{if(!v)return()=>undefined;v=+v;E=E?+E:0;return(R,$=0)=>v>R||v===R&&E>=$};const N=[["browserslist / browserslist:env / browserslist:query / browserslist:path-to-config / browserslist:path-to-config:env","Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config",/^browserslist(?::(.+))?$/,(v,E)=>{const R=j();const $=R.load(v?v.trim():null,E);if(!$){throw new Error(`No browserslist config found to handle the 'browserslist' target.\nSee https://github.com/browserslist/browserslist#queries for possible ways to provide a config.\nThe recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions).\nYou can also more options via the 'target' option: 'browserslist' / 'browserslist:env' / 'browserslist:query' / 'browserslist:path-to-config' / 'browserslist:path-to-config:env'`)}return R.resolve($)}],["web","Web browser.",/^web$/,()=>({web:true,browser:true,webworker:null,node:false,electron:false,nwjs:false,document:true,importScriptsInWorker:true,fetchWasm:true,nodeBuiltins:false,importScripts:false,require:false,global:false})],["webworker","Web Worker, SharedWorker or Service Worker.",/^webworker$/,()=>({web:true,browser:true,webworker:true,node:false,electron:false,nwjs:false,importScripts:true,importScriptsInWorker:true,fetchWasm:true,nodeBuiltins:false,require:false,document:false,global:false})],["[async-]node[X[.Y]]","Node.js in version X.Y. The 'async-' prefix will load chunks asynchronously via 'fs' and 'vm' instead of 'require()'. Examples: node14.5, async-node10.",/^(async-)?node(\d+(?:\.(\d+))?)?$/,(v,E,R)=>{const $=versionDependent(E,R);return{node:true,electron:false,nwjs:false,web:false,webworker:false,browser:false,require:!v,nodeBuiltins:true,global:true,document:false,fetchWasm:false,importScripts:false,importScriptsInWorker:false,globalThis:$(12),const:$(6),templateLiteral:$(4),optionalChaining:$(14),arrowFunction:$(6),forOf:$(5),destructuring:$(6),bigIntLiteral:$(10,4),dynamicImport:$(12,17),dynamicImportInWorker:E?false:undefined,module:$(12,17)}}],["electron[X[.Y]]-main/preload/renderer","Electron in version X.Y. Script is running in main, preload resp. renderer context.",/^electron(\d+(?:\.(\d+))?)?-(main|preload|renderer)$/,(v,E,R)=>{const $=versionDependent(v,E);return{node:true,electron:true,web:R!=="main",webworker:false,browser:false,nwjs:false,electronMain:R==="main",electronPreload:R==="preload",electronRenderer:R==="renderer",global:true,nodeBuiltins:true,require:true,document:R==="renderer",fetchWasm:R==="renderer",importScripts:false,importScriptsInWorker:true,globalThis:$(5),const:$(1,1),templateLiteral:$(1,1),optionalChaining:$(8),arrowFunction:$(1,1),forOf:$(0,36),destructuring:$(1,1),bigIntLiteral:$(4),dynamicImport:$(11),dynamicImportInWorker:v?false:undefined,module:$(11)}}],["nwjs[X[.Y]] / node-webkit[X[.Y]]","NW.js in version X.Y.",/^(?:nwjs|node-webkit)(\d+(?:\.(\d+))?)?$/,(v,E)=>{const R=versionDependent(v,E);return{node:true,web:true,nwjs:true,webworker:null,browser:false,electron:false,global:true,nodeBuiltins:true,document:false,importScriptsInWorker:false,fetchWasm:false,importScripts:false,require:false,globalThis:R(0,43),const:R(0,15),templateLiteral:R(0,13),optionalChaining:R(0,44),arrowFunction:R(0,15),forOf:R(0,13),destructuring:R(0,15),bigIntLiteral:R(0,32),dynamicImport:R(0,43),dynamicImportInWorker:v?false:undefined,module:R(0,43)}}],["esX","EcmaScript in this version. Examples: es2020, es5.",/^es(\d+)$/,v=>{let E=+v;if(E<1e3)E=E+2009;return{const:E>=2015,templateLiteral:E>=2015,optionalChaining:E>=2020,arrowFunction:E>=2015,forOf:E>=2015,destructuring:E>=2015,module:E>=2015,globalThis:E>=2020,bigIntLiteral:E>=2020,dynamicImport:E>=2020,dynamicImportInWorker:E>=2020}}]];const getTargetProperties=(v,E)=>{for(const[,,R,$]of N){const j=R.exec(v);if(j){const[,...v]=j;const R=$(...v,E);if(R)return R}}throw new Error(`Unknown target '${v}'. The following targets are supported:\n${N.map((([v,E])=>`* ${v}: ${E}`)).join("\n")}`)};const mergeTargetProperties=v=>{const E=new Set;for(const R of v){for(const v of Object.keys(R)){E.add(v)}}const R={};for(const $ of E){let E=false;let j=false;for(const R of v){const v=R[$];switch(v){case true:E=true;break;case false:j=true;break}}if(E||j)R[$]=j&&E?null:E?true:false}return R};const getTargetsProperties=(v,E)=>mergeTargetProperties(v.map((v=>getTargetProperties(v,E))));E.getDefaultTarget=getDefaultTarget;E.getTargetProperties=getTargetProperties;E.getTargetsProperties=getTargetsProperties},77033:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);class ContainerEntryDependency extends ${constructor(v,E,R){super();this.name=v;this.exposes=E;this.shareScope=R}getResourceIdentifier(){return`container-entry-${this.name}`}get type(){return"container entry"}get category(){return"esm"}}j(ContainerEntryDependency,"webpack/lib/container/ContainerEntryDependency");v.exports=ContainerEntryDependency},17438:function(v,E,R){"use strict";const{OriginalSource:$,RawSource:j}=R(51255);const N=R(42290);const q=R(53840);const G=R(39201);const ie=R(43841);const ae=R(19383);const ce=R(65764);const le=R(91571);const me=new Set(["javascript"]);class ContainerEntryModule extends q{constructor(v,E,R){super("javascript/dynamic",null);this._name=v;this._exposes=E;this._shareScope=R}getSourceTypes(){return me}identifier(){return`container entry (${this._shareScope}) ${JSON.stringify(this._exposes)}`}readableIdentifier(v){return`container entry`}libIdent(v){return`${this.layer?`(${this.layer})/`:""}webpack/container/entry/${this._name}`}needBuild(v,E){return E(null,!this.buildMeta)}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={strict:true,topLevelDeclarations:new Set(["moduleMap","get","init"])};this.buildMeta.exportsType="namespace";this.clearDependenciesAndBlocks();for(const[v,E]of this._exposes){const R=new N({name:E.name},{name:v},E.import[E.import.length-1]);let $=0;for(const j of E.import){const E=new le(v,j);E.loc={name:v,index:$++};R.addDependency(E)}this.addBlock(R)}this.addDependency(new ae(["get","init"],false));j()}codeGeneration({moduleGraph:v,chunkGraph:E,runtimeTemplate:R}){const N=new Map;const q=new Set([G.definePropertyGetters,G.hasOwnProperty,G.exports]);const ae=[];for(const $ of this.blocks){const{dependencies:j}=$;const N=j.map((E=>{const R=E;return{name:R.exposedName,module:v.getModule(R),request:R.userRequest}}));let G;if(N.some((v=>!v.module))){G=R.throwMissingModuleErrorBlock({request:N.map((v=>v.request)).join(", ")})}else{G=`return ${R.blockPromise({block:$,message:"",chunkGraph:E,runtimeRequirements:q})}.then(${R.returningFunction(R.returningFunction(`(${N.map((({module:v,request:$})=>R.moduleRaw({module:v,chunkGraph:E,request:$,weak:false,runtimeRequirements:q}))).join(", ")})`))});`}ae.push(`${JSON.stringify(N[0].name)}: ${R.basicFunction("",G)}`)}const ce=ie.asString([`var moduleMap = {`,ie.indent(ae.join(",\n")),"};",`var get = ${R.basicFunction("module, getScope",[`${G.currentRemoteGetScope} = getScope;`,"getScope = (",ie.indent([`${G.hasOwnProperty}(moduleMap, module)`,ie.indent(["? moduleMap[module]()",`: Promise.resolve().then(${R.basicFunction("","throw new Error('Module \"' + module + '\" does not exist in container.');")})`])]),");",`${G.currentRemoteGetScope} = undefined;`,"return getScope;"])};`,`var init = ${R.basicFunction("shareScope, initScope",[`if (!${G.shareScopeMap}) return;`,`var name = ${JSON.stringify(this._shareScope)}`,`var oldScope = ${G.shareScopeMap}[name];`,`if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope");`,`${G.shareScopeMap}[name] = shareScope;`,`return ${G.initializeSharing}(name, initScope);`])};`,"","// This exports getters to disallow modifications",`${G.definePropertyGetters}(exports, {`,ie.indent([`get: ${R.returningFunction("get")},`,`init: ${R.returningFunction("init")}`]),"});"]);N.set("javascript",this.useSourceMap||this.useSimpleSourceMap?new $(ce,"webpack/container-entry"):new j(ce));return{sources:N,runtimeRequirements:q}}size(v){return 42}serialize(v){const{write:E}=v;E(this._name);E(this._exposes);E(this._shareScope);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new ContainerEntryModule(E(),E(),E());R.deserialize(v);return R}}ce(ContainerEntryModule,"webpack/lib/container/ContainerEntryModule");v.exports=ContainerEntryModule},52898:function(v,E,R){"use strict";const $=R(39744);const j=R(17438);v.exports=class ContainerEntryModuleFactory extends ${create({dependencies:[v]},E){const R=v;E(null,{module:new j(R.name,R.exposes,R.shareScope)})}}},91571:function(v,E,R){"use strict";const $=R(99809);const j=R(65764);class ContainerExposedDependency extends ${constructor(v,E){super(E);this.exposedName=v}get type(){return"container exposed"}get category(){return"esm"}getResourceIdentifier(){return`exposed dependency ${this.exposedName}=${this.request}`}serialize(v){v.write(this.exposedName);super.serialize(v)}deserialize(v){this.exposedName=v.read();super.deserialize(v)}}j(ContainerExposedDependency,"webpack/lib/container/ContainerExposedDependency");v.exports=ContainerExposedDependency},90005:function(v,E,R){"use strict";const $=R(89699);const j=R(77033);const N=R(52898);const q=R(91571);const{parseOptions:G}=R(58491);const ie=$(R(74484),(()=>R(57030)),{name:"Container Plugin",baseDataPath:"options"});const ae="ContainerPlugin";class ContainerPlugin{constructor(v){ie(v);this._options={name:v.name,shareScope:v.shareScope||"default",library:v.library||{type:"var",name:v.name},runtime:v.runtime,filename:v.filename||undefined,exposes:G(v.exposes,(v=>({import:Array.isArray(v)?v:[v],name:undefined})),(v=>({import:Array.isArray(v.import)?v.import:[v.import],name:v.name||undefined})))}}apply(v){const{name:E,exposes:R,shareScope:$,filename:G,library:ie,runtime:ce}=this._options;v.options.output.enabledLibraryTypes.push(ie.type);v.hooks.make.tapAsync(ae,((v,N)=>{const q=new j(E,R,$);q.loc={name:E};v.addEntry(v.options.context,q,{name:E,filename:G,runtime:ce,library:ie},(v=>{if(v)return N(v);N()}))}));v.hooks.thisCompilation.tap(ae,((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(j,new N);v.dependencyFactories.set(q,E)}))}}v.exports=ContainerPlugin},25405:function(v,E,R){"use strict";const $=R(51562);const j=R(39201);const N=R(89699);const q=R(65917);const G=R(25742);const ie=R(71958);const ae=R(40452);const ce=R(36296);const le=R(21290);const{parseOptions:me}=R(58491);const _e=N(R(47290),(()=>R(34290)),{name:"Container Reference Plugin",baseDataPath:"options"});const Ie="/".charCodeAt(0);class ContainerReferencePlugin{constructor(v){_e(v);this._remoteType=v.remoteType;this._remotes=me(v.remotes,(E=>({external:Array.isArray(E)?E:[E],shareScope:v.shareScope||"default"})),(E=>({external:Array.isArray(E.external)?E.external:[E.external],shareScope:E.shareScope||v.shareScope||"default"})))}apply(v){const{_remotes:E,_remoteType:R}=this;const N={};for(const[v,R]of E){let E=0;for(const $ of R.external){if($.startsWith("internal "))continue;N[`webpack/container/reference/${v}${E?`/fallback-${E}`:""}`]=$;E++}}new $(R,N).apply(v);v.hooks.compilation.tap("ContainerReferencePlugin",((v,{normalModuleFactory:R})=>{v.dependencyFactories.set(le,R);v.dependencyFactories.set(G,R);v.dependencyFactories.set(q,new ie);R.hooks.factorize.tap("ContainerReferencePlugin",(v=>{if(!v.request.includes("!")){for(const[R,$]of E){if(v.request.startsWith(`${R}`)&&(v.request.length===R.length||v.request.charCodeAt(R.length)===Ie)){return new ae(v.request,$.external.map(((v,E)=>v.startsWith("internal ")?v.slice(9):`webpack/container/reference/${R}${E?`/fallback-${E}`:""}`)),`.${v.request.slice(R.length)}`,$.shareScope)}}}}));v.hooks.runtimeRequirementInTree.for(j.ensureChunkHandlers).tap("ContainerReferencePlugin",((E,R)=>{R.add(j.module);R.add(j.moduleFactoriesAddOnly);R.add(j.hasOwnProperty);R.add(j.initializeSharing);R.add(j.shareScopeMap);v.addRuntimeModule(E,new ce)}))}))}}v.exports=ContainerReferencePlugin},65917:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);class FallbackDependency extends ${constructor(v){super();this.requests=v}getResourceIdentifier(){return`fallback ${this.requests.join(" ")}`}get type(){return"fallback"}get category(){return"esm"}serialize(v){const{write:E}=v;E(this.requests);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new FallbackDependency(E());R.deserialize(v);return R}}j(FallbackDependency,"webpack/lib/container/FallbackDependency");v.exports=FallbackDependency},25742:function(v,E,R){"use strict";const $=R(99809);const j=R(65764);class FallbackItemDependency extends ${constructor(v){super(v)}get type(){return"fallback item"}get category(){return"esm"}}j(FallbackItemDependency,"webpack/lib/container/FallbackItemDependency");v.exports=FallbackItemDependency},39387:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(53840);const N=R(39201);const q=R(43841);const G=R(65764);const ie=R(25742);const ae=new Set(["javascript"]);const ce=new Set([N.module]);class FallbackModule extends j{constructor(v){super("fallback-module");this.requests=v;this._identifier=`fallback ${this.requests.join(" ")}`}identifier(){return this._identifier}readableIdentifier(v){return this._identifier}libIdent(v){return`${this.layer?`(${this.layer})/`:""}webpack/container/fallback/${this.requests[0]}/and ${this.requests.length-1} more`}chunkCondition(v,{chunkGraph:E}){return E.getNumberOfEntryModules(v)>0}needBuild(v,E){E(null,!this.buildInfo)}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={strict:true};this.clearDependenciesAndBlocks();for(const v of this.requests)this.addDependency(new ie(v));j()}size(v){return this.requests.length*5+42}getSourceTypes(){return ae}codeGeneration({runtimeTemplate:v,moduleGraph:E,chunkGraph:R}){const j=this.dependencies.map((v=>R.getModuleId(E.getModule(v))));const N=q.asString([`var ids = ${JSON.stringify(j)};`,"var error, result, i = 0;",`var loop = ${v.basicFunction("next",["while(i < ids.length) {",q.indent(["try { next = __webpack_require__(ids[i++]); } catch(e) { return handleError(e); }","if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);"]),"}","if(error) throw error;"])}`,`var handleResult = ${v.basicFunction("result",["if(result) return result;","return loop();"])};`,`var handleError = ${v.basicFunction("e",["error = e;","return loop();"])};`,"module.exports = loop();"]);const G=new Map;G.set("javascript",new $(N));return{sources:G,runtimeRequirements:ce}}serialize(v){const{write:E}=v;E(this.requests);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new FallbackModule(E());R.deserialize(v);return R}}G(FallbackModule,"webpack/lib/container/FallbackModule");v.exports=FallbackModule},71958:function(v,E,R){"use strict";const $=R(39744);const j=R(39387);v.exports=class FallbackModuleFactory extends ${create({dependencies:[v]},E){const R=v;E(null,{module:new j(R.requests)})}}},45124:function(v,E,R){"use strict";const $=R(49183);const j=R(77443);const N=R(89699);const q=R(90005);const G=R(25405);const ie=N(R(44166),(()=>R(46413)),{name:"Module Federation Plugin",baseDataPath:"options"});class ModuleFederationPlugin{constructor(v){ie(v);this._options=v}apply(v){const{_options:E}=this;const R=E.library||{type:"var",name:E.name};const N=E.remoteType||(E.library&&$(E.library.type)?E.library.type:"script");if(R&&!v.options.output.enabledLibraryTypes.includes(R.type)){v.options.output.enabledLibraryTypes.push(R.type)}v.hooks.afterPlugins.tap("ModuleFederationPlugin",(()=>{if(E.exposes&&(Array.isArray(E.exposes)?E.exposes.length>0:Object.keys(E.exposes).length>0)){new q({name:E.name,library:R,filename:E.filename,runtime:E.runtime,shareScope:E.shareScope,exposes:E.exposes}).apply(v)}if(E.remotes&&(Array.isArray(E.remotes)?E.remotes.length>0:Object.keys(E.remotes).length>0)){new G({remoteType:N,shareScope:E.shareScope,remotes:E.remotes}).apply(v)}if(E.shared){new j({shared:E.shared,shareScope:E.shareScope}).apply(v)}}))}}v.exports=ModuleFederationPlugin},40452:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(53840);const N=R(39201);const q=R(65764);const G=R(65917);const ie=R(21290);const ae=new Set(["remote","share-init"]);const ce=new Set([N.module]);class RemoteModule extends j{constructor(v,E,R,$){super("remote-module");this.request=v;this.externalRequests=E;this.internalRequest=R;this.shareScope=$;this._identifier=`remote (${$}) ${this.externalRequests.join(" ")} ${this.internalRequest}`}identifier(){return this._identifier}readableIdentifier(v){return`remote ${this.request}`}libIdent(v){return`${this.layer?`(${this.layer})/`:""}webpack/container/remote/${this.request}`}needBuild(v,E){E(null,!this.buildInfo)}build(v,E,R,$,j){this.buildMeta={};this.buildInfo={strict:true};this.clearDependenciesAndBlocks();if(this.externalRequests.length===1){this.addDependency(new ie(this.externalRequests[0]))}else{this.addDependency(new G(this.externalRequests))}j()}size(v){return 6}getSourceTypes(){return ae}nameForCondition(){return this.request}codeGeneration({runtimeTemplate:v,moduleGraph:E,chunkGraph:R}){const j=E.getModule(this.dependencies[0]);const N=j&&R.getModuleId(j);const q=new Map;q.set("remote",new $(""));const G=new Map;G.set("share-init",[{shareScope:this.shareScope,initStage:20,init:N===undefined?"":`initExternal(${JSON.stringify(N)});`}]);return{sources:q,data:G,runtimeRequirements:ce}}serialize(v){const{write:E}=v;E(this.request);E(this.externalRequests);E(this.internalRequest);E(this.shareScope);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new RemoteModule(E(),E(),E(),E());R.deserialize(v);return R}}q(RemoteModule,"webpack/lib/container/RemoteModule");v.exports=RemoteModule},36296:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class RemoteRuntimeModule extends j{constructor(){super("remotes loading")}generate(){const{compilation:v,chunkGraph:E}=this;const{runtimeTemplate:R,moduleGraph:j}=v;const q={};const G={};for(const v of this.chunk.getAllAsyncChunks()){const R=E.getChunkModulesIterableBySourceType(v,"remote");if(!R)continue;const $=q[v.id]=[];for(const v of R){const R=v;const N=R.internalRequest;const q=E.getModuleId(R);const ie=R.shareScope;const ae=R.dependencies[0];const ce=j.getModule(ae);const le=ce&&E.getModuleId(ce);$.push(q);G[q]=[ie,N,le]}}return N.asString([`var chunkMapping = ${JSON.stringify(q,null,"\t")};`,`var idToExternalAndNameMapping = ${JSON.stringify(G,null,"\t")};`,`${$.ensureChunkHandlers}.remotes = ${R.basicFunction("chunkId, promises",[`if(${$.hasOwnProperty}(chunkMapping, chunkId)) {`,N.indent([`chunkMapping[chunkId].forEach(${R.basicFunction("id",[`var getScope = ${$.currentRemoteGetScope};`,"if(!getScope) getScope = [];","var data = idToExternalAndNameMapping[id];","if(getScope.indexOf(data) >= 0) return;","getScope.push(data);",`if(data.p) return promises.push(data.p);`,`var onError = ${R.basicFunction("error",['if(!error) error = new Error("Container missing");','if(typeof error.message === "string")',N.indent(`error.message += '\\nwhile loading "' + data[1] + '" from ' + data[2];`),`${$.moduleFactories}[id] = ${R.basicFunction("",["throw error;"])}`,"data.p = 0;"])};`,`var handleFunction = ${R.basicFunction("fn, arg1, arg2, d, next, first",["try {",N.indent(["var promise = fn(arg1, arg2);","if(promise && promise.then) {",N.indent([`var p = promise.then(${R.returningFunction("next(result, d)","result")}, onError);`,`if(first) promises.push(data.p = p); else return p;`]),"} else {",N.indent(["return next(promise, d, first);"]),"}"]),"} catch(error) {",N.indent(["onError(error);"]),"}"])}`,`var onExternal = ${R.returningFunction(`external ? handleFunction(${$.initializeSharing}, data[0], 0, external, onInitialized, first) : onError()`,"external, _, first")};`,`var onInitialized = ${R.returningFunction(`handleFunction(external.get, data[1], getScope, 0, onFactory, first)`,"_, external, first")};`,`var onFactory = ${R.basicFunction("factory",["data.p = 1;",`${$.moduleFactories}[id] = ${R.basicFunction("module",["module.exports = factory();"])}`])};`,"handleFunction(__webpack_require__, data[2], 0, 0, onExternal, 1);"])});`]),"}"])}`])}}v.exports=RemoteRuntimeModule},21290:function(v,E,R){"use strict";const $=R(99809);const j=R(65764);class RemoteToExternalDependency extends ${constructor(v){super(v)}get type(){return"remote to external"}get category(){return"esm"}}j(RemoteToExternalDependency,"webpack/lib/container/RemoteToExternalDependency");v.exports=RemoteToExternalDependency},58491:function(v,E){"use strict";const process=(v,E,R,$)=>{const array=v=>{for(const R of v){if(typeof R==="string"){$(R,E(R,R))}else if(R&&typeof R==="object"){object(R)}else{throw new Error("Unexpected options format")}}};const object=v=>{for(const[j,N]of Object.entries(v)){if(typeof N==="string"||Array.isArray(N)){$(j,E(N,j))}else{$(j,R(N,j))}}};if(!v){return}else if(Array.isArray(v)){array(v)}else if(typeof v==="object"){object(v)}else{throw new Error("Unexpected options format")}};const parseOptions=(v,E,R)=>{const $=[];process(v,E,R,((v,E)=>{$.push([v,E])}));return $};const scope=(v,E)=>{const R={};process(E,(v=>v),(v=>v),((E,$)=>{R[E.startsWith("./")?`${v}${E.slice(1)}`:`${v}/${E}`]=$}));return R};E.parseOptions=parseOptions;E.scope=scope},73841:function(v,E,R){"use strict";const{ReplaceSource:$,RawSource:j,ConcatSource:N}=R(51255);const{UsageState:q}=R(13168);const G=R(97152);const ie=R(39201);const ae=R(43841);const ce=new Set(["javascript"]);class CssExportsGenerator extends G{constructor(){super()}generate(v,E){const R=new $(new j(""));const G=[];const ce=new Map;E.runtimeRequirements.add(ie.module);const le=new Set;const me={runtimeTemplate:E.runtimeTemplate,dependencyTemplates:E.dependencyTemplates,moduleGraph:E.moduleGraph,chunkGraph:E.chunkGraph,module:v,runtime:E.runtime,runtimeRequirements:le,concatenationScope:E.concatenationScope,codeGenerationResults:E.codeGenerationResults,initFragments:G,cssExports:ce};const handleDependency=v=>{const $=v.constructor;const j=E.dependencyTemplates.get($);if(!j){throw new Error("No template for dependency: "+v.constructor.name)}j.apply(v,R,me)};v.dependencies.forEach(handleDependency);if(E.concatenationScope){const v=new N;const R=new Set;for(const[$,j]of ce){let N=ae.toIdentifier($);let q=0;while(R.has(N)){N=ae.toIdentifier($+q)}R.add(N);E.concatenationScope.registerExport($,N);v.add(`${E.runtimeTemplate.supportsConst?"const":"var"} ${N} = ${JSON.stringify(j)};\n`)}return v}else{const R=E.moduleGraph.getExportsInfo(v).otherExportsInfo.getUsed(E.runtime)!==q.Unused;if(R){E.runtimeRequirements.add(ie.makeNamespaceObject)}return new j(`${R?`${ie.makeNamespaceObject}(`:""}${v.moduleArgument}.exports = {\n${Array.from(ce,(([v,E])=>`\t${JSON.stringify(v)}: ${JSON.stringify(E)}`)).join(",\n")}\n}${R?")":""};`)}}getTypes(v){return ce}getSize(v,E){return 42}updateHash(v,{module:E}){}}v.exports=CssExportsGenerator},46559:function(v,E,R){"use strict";const{ReplaceSource:$}=R(51255);const j=R(97152);const N=R(64768);const q=R(39201);const G=new Set(["css"]);class CssGenerator extends j{constructor(){super()}generate(v,E){const R=v.originalSource();const j=new $(R);const G=[];const ie=new Map;E.runtimeRequirements.add(q.hasCssModules);const ae={runtimeTemplate:E.runtimeTemplate,dependencyTemplates:E.dependencyTemplates,moduleGraph:E.moduleGraph,chunkGraph:E.chunkGraph,module:v,runtime:E.runtime,runtimeRequirements:E.runtimeRequirements,concatenationScope:E.concatenationScope,codeGenerationResults:E.codeGenerationResults,initFragments:G,cssExports:ie};const handleDependency=v=>{const R=v.constructor;const $=E.dependencyTemplates.get(R);if(!$){throw new Error("No template for dependency: "+v.constructor.name)}$.apply(v,j,ae)};v.dependencies.forEach(handleDependency);if(v.presentationalDependencies!==undefined)v.presentationalDependencies.forEach(handleDependency);if(ie.size>0){const v=E.getData();v.set("css-exports",ie)}return N.addToSource(j,G,E)}getTypes(v){return G}getSize(v,E){const R=v.originalSource();if(!R){return 0}return R.size()}updateHash(v,{module:E}){}}v.exports=CssGenerator},58013:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73002);const N=R(39201);const q=R(93496);const G=R(43841);const ie=R(73897);const{chunkHasCss:ae}=R(39693);const ce=new WeakMap;class CssLoadingRuntimeModule extends q{static getCompilationHooks(v){if(!(v instanceof j)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=ce.get(v);if(E===undefined){E={createStylesheet:new $(["source","chunk"])};ce.set(v,E)}return E}constructor(v,E){super("css loading",10);this._runtimeRequirements=v;this.runtimeOptions=E}generate(){const{compilation:v,chunk:E,_runtimeRequirements:R}=this;const{chunkGraph:$,runtimeTemplate:j,outputOptions:{crossOriginLoading:q,uniqueName:ce,chunkLoadTimeout:le}}=v;const me=N.ensureChunkHandlers;const _e=$.getChunkConditionMap(E,((v,E)=>!!E.getChunkModulesIterableBySourceType(v,"css")));const Ie=ie(_e);const Me=R.has(N.ensureChunkHandlers)&&Ie!==false;const Oe=R.has(N.hmrDownloadUpdateHandlers);const Te=new Set;const Ne=new Set;for(const v of E.getAllInitialChunks()){(ae(v,$)?Te:Ne).add(v.id)}if(!Me&&!Oe&&Te.size===0){return null}const{createStylesheet:Be}=CssLoadingRuntimeModule.getCompilationHooks(v);const Le=Oe?`${N.hmrRuntimeStatePrefix}_css`:undefined;const qe=G.asString(["link = document.createElement('link');",ce?'link.setAttribute("data-webpack", uniqueName + ":" + key);':"","link.setAttribute(loadingAttribute, 1);",'link.rel = "stylesheet";',"link.href = url;",q?q==="use-credentials"?'link.crossOrigin = "use-credentials";':G.asString(["if (link.src.indexOf(window.location.origin + '/') !== 0) {",G.indent(`link.crossOrigin = ${JSON.stringify(q)};`),"}"]):""]);const cc=v=>v.charCodeAt(0);return G.asString(["// object to store loaded and loading chunks","// undefined = chunk not loaded, null = chunk preloaded/prefetched","// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded",`var installedChunks = ${Le?`${Le} = ${Le} || `:""}{${Array.from(Ne,(v=>`${JSON.stringify(v)}:0`)).join(",")}};`,"",ce?`var uniqueName = ${JSON.stringify(j.outputOptions.uniqueName)};`:"// data-webpack is not used as build has no uniqueName",`var loadCssChunkData = ${j.basicFunction("target, link, chunkId",[`var data, token = "", token2, exports = {}, exportsWithId = [], exportsWithDashes = [], ${Oe?"moduleIds = [], ":""}i = 0, cc = 1;`,"try { if(!link) link = loadStylesheet(chunkId); data = link.sheet.cssRules; data = data[data.length - 1].style; } catch(e) { data = getComputedStyle(document.head); }",`data = data.getPropertyValue(${ce?j.concatenation("--webpack-",{expr:"uniqueName"},"-",{expr:"chunkId"}):j.concatenation("--webpack-",{expr:"chunkId"})});`,"if(!data) return [];","for(; cc; i++) {",G.indent(["cc = data.charCodeAt(i);",`if(cc == ${cc("(")}) { token2 = token; token = ""; }`,`else if(cc == ${cc(")")}) { exports[token2.replace(/^_/, "")] = token.replace(/^_/, ""); token = ""; }`,`else if(cc == ${cc("/")} || cc == ${cc("%")}) { token = token.replace(/^_/, ""); exports[token] = token; exportsWithId.push(token); if(cc == ${cc("%")}) exportsWithDashes.push(token); token = ""; }`,`else if(!cc || cc == ${cc(",")}) { token = token.replace(/^_/, ""); exportsWithId.forEach(${j.expressionFunction(`exports[x] = ${ce?j.concatenation({expr:"uniqueName"},"-",{expr:"token"},"-",{expr:"exports[x]"}):j.concatenation({expr:"token"},"-",{expr:"exports[x]"})}`,"x")}); exportsWithDashes.forEach(${j.expressionFunction(`exports[x] = "--" + exports[x]`,"x")}); ${N.makeNamespaceObject}(exports); target[token] = (${j.basicFunction("exports, module",`module.exports = exports;`)}).bind(null, exports); ${Oe?"moduleIds.push(token); ":""}token = ""; exports = {}; exportsWithId.length = 0; }`,`else if(cc == ${cc("\\")}) { token += data[++i] }`,`else { token += data[i]; }`]),"}",`${Oe?`if(target == ${N.moduleFactories}) `:""}installedChunks[chunkId] = 0;`,Oe?"return moduleIds;":""])}`,'var loadingAttribute = "data-webpack-loading";',`var loadStylesheet = ${j.basicFunction("chunkId, url, done"+(Oe?", hmr":""),['var link, needAttach, key = "chunk-" + chunkId;',Oe?"if(!hmr) {":"",'var links = document.getElementsByTagName("link");',"for(var i = 0; i < links.length; i++) {",G.indent(["var l = links[i];",`if(l.rel == "stylesheet" && (${Oe?'l.href.startsWith(url) || l.getAttribute("href").startsWith(url)':'l.href == url || l.getAttribute("href") == url'}${ce?' || l.getAttribute("data-webpack") == uniqueName + ":" + key':""})) { link = l; break; }`]),"}","if(!done) return link;",Oe?"}":"","if(!link) {",G.indent(["needAttach = true;",Be.call(qe,this.chunk)]),"}",`var onLinkComplete = ${j.basicFunction("prev, event",G.asString(["link.onerror = link.onload = null;","link.removeAttribute(loadingAttribute);","clearTimeout(timeout);",'if(event && event.type != "load") link.parentNode.removeChild(link)',"done(event);","if(prev) return prev(event);"]))};`,"if(link.getAttribute(loadingAttribute)) {",G.indent([`var timeout = setTimeout(onLinkComplete.bind(null, undefined, { type: 'timeout', target: link }), ${le});`,"link.onerror = onLinkComplete.bind(null, link.onerror);","link.onload = onLinkComplete.bind(null, link.onload);"]),"} else onLinkComplete(undefined, { type: 'load', target: link });",Oe?"hmr ? document.head.insertBefore(link, hmr) :":"","needAttach && document.head.appendChild(link);","return link;"])};`,Te.size>2?`${JSON.stringify(Array.from(Te))}.forEach(loadCssChunkData.bind(null, ${N.moduleFactories}, 0));`:Te.size>0?`${Array.from(Te,(v=>`loadCssChunkData(${N.moduleFactories}, 0, ${JSON.stringify(v)});`)).join("")}`:"// no initial css","",Me?G.asString([`${me}.css = ${j.basicFunction("chunkId, promises",["// css chunk loading",`var installedChunkData = ${N.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,'if(installedChunkData !== 0) { // 0 means "already installed".',G.indent(["",'// a Promise means "currently loading".',"if(installedChunkData) {",G.indent(["promises.push(installedChunkData[2]);"]),"} else {",G.indent([Ie===true?"if(true) { // all chunks have CSS":`if(${Ie("chunkId")}) {`,G.indent(["// setup Promise in chunk cache",`var promise = new Promise(${j.expressionFunction(`installedChunkData = installedChunks[chunkId] = [resolve, reject]`,"resolve, reject")});`,"promises.push(installedChunkData[2] = promise);","","// start chunk loading",`var url = ${N.publicPath} + ${N.getChunkCssFilename}(chunkId);`,"// create error before stack unwound to get useful stacktrace later","var error = new Error();",`var loadingEnded = ${j.basicFunction("event",[`if(${N.hasOwnProperty}(installedChunks, chunkId)) {`,G.indent(["installedChunkData = installedChunks[chunkId];","if(installedChunkData !== 0) installedChunks[chunkId] = undefined;","if(installedChunkData) {",G.indent(['if(event.type !== "load") {',G.indent(["var errorType = event && event.type;","var realSrc = event && event.target && event.target.src;","error.message = 'Loading css chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';","error.name = 'ChunkLoadError';","error.type = errorType;","error.request = realSrc;","installedChunkData[1](error);"]),"} else {",G.indent([`loadCssChunkData(${N.moduleFactories}, link, chunkId);`,"installedChunkData[0]();"]),"}"]),"}"]),"}"])};`,"var link = loadStylesheet(chunkId, url, loadingEnded);"]),"} else installedChunks[chunkId] = 0;"]),"}"]),"}"])};`]):"// no chunk loading","",Oe?G.asString(["var oldTags = [];","var newTags = [];",`var applyHandler = ${j.basicFunction("options",[`return { dispose: ${j.basicFunction("",[])}, apply: ${j.basicFunction("",["var moduleIds = [];",`newTags.forEach(${j.expressionFunction("info[1].sheet.disabled = false","info")});`,"while(oldTags.length) {",G.indent(["var oldTag = oldTags.pop();","if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"]),"}","while(newTags.length) {",G.indent([`var info = newTags.pop();`,`var chunkModuleIds = loadCssChunkData(${N.moduleFactories}, info[1], info[0]);`,`chunkModuleIds.forEach(${j.expressionFunction("moduleIds.push(id)","id")});`]),"}","return moduleIds;"])} };`])}`,`var cssTextKey = ${j.returningFunction(`Array.from(link.sheet.cssRules, ${j.returningFunction("r.cssText","r")}).join()`,"link")}`,`${N.hmrDownloadUpdateHandlers}.css = ${j.basicFunction("chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList",["applyHandlers.push(applyHandler);",`chunkIds.forEach(${j.basicFunction("chunkId",[`var filename = ${N.getChunkCssFilename}(chunkId);`,`var url = ${N.publicPath} + filename;`,"var oldTag = loadStylesheet(chunkId, url);","if(!oldTag) return;",`promises.push(new Promise(${j.basicFunction("resolve, reject",[`var link = loadStylesheet(chunkId, url + (url.indexOf("?") < 0 ? "?" : "&") + "hmr=" + Date.now(), ${j.basicFunction("event",['if(event.type !== "load") {',G.indent(["var errorType = event && event.type;","var realSrc = event && event.target && event.target.src;","error.message = 'Loading css hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';","error.name = 'ChunkLoadError';","error.type = errorType;","error.request = realSrc;","reject(error);"]),"} else {",G.indent(["try { if(cssTextKey(oldTag) == cssTextKey(link)) { if(link.parentNode) link.parentNode.removeChild(link); return resolve(); } } catch(e) {}","var factories = {};","loadCssChunkData(factories, link, chunkId);",`Object.keys(factories).forEach(${j.expressionFunction("updatedModulesList.push(id)","id")})`,"link.sheet.disabled = true;","oldTags.push(oldTag);","newTags.push([chunkId, link]);","resolve();"]),"}"])}, oldTag);`])}));`])});`])}`]):"// no hmr"])}}v.exports=CssLoadingRuntimeModule},39693:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(23834);const N=R(39201);const q=R(75193);const G=R(12778);const ie=R(2951);const ae=R(75689);const ce=R(24769);const le=R(75178);const me=R(19383);const{compareModulesByIdentifier:_e}=R(58792);const Ie=R(89699);const Me=R(85205);const Oe=R(61374);const Te=R(46849);const Ne=R(73841);const Be=R(46559);const Le=R(43522);const qe=Oe((()=>R(58013)));const getSchema=v=>{const{definitions:E}=R(13954);return{definitions:E,oneOf:[{$ref:`#/definitions/${v}`}]}};const Ue=Ie(R(30035),(()=>getSchema("CssGeneratorOptions")),{name:"Css Modules Plugin",baseDataPath:"parser"});const Ge=Ie(R(33694),(()=>getSchema("CssParserOptions")),{name:"Css Modules Plugin",baseDataPath:"parser"});const escapeCss=(v,E)=>{const R=`${v}`.replace(/[^a-zA-Z0-9_\u0081-\uffff-]/g,(v=>`\\${v}`));return!E&&/^(?!--)[0-9_-]/.test(R)?`_${R}`:R};const He="CssModulesPlugin";class CssModulesPlugin{constructor({exportsOnly:v=false}){this._exportsOnly=v}apply(v){v.hooks.compilation.tap(He,((v,{normalModuleFactory:E})=>{const R=new q(v.moduleGraph);v.dependencyFactories.set(le,E);v.dependencyTemplates.set(le,new le.Template);v.dependencyTemplates.set(ae,new ae.Template);v.dependencyFactories.set(ce,R);v.dependencyTemplates.set(ce,new ce.Template);v.dependencyTemplates.set(G,new G.Template);v.dependencyFactories.set(ie,E);v.dependencyTemplates.set(ie,new ie.Template);v.dependencyTemplates.set(me,new me.Template);E.hooks.createParser.for("css").tap(He,(v=>{Ge(v);return new Le}));E.hooks.createParser.for("css/global").tap(He,(v=>{Ge(v);return new Le({allowPseudoBlocks:false,allowModeSwitch:false})}));E.hooks.createParser.for("css/module").tap(He,(v=>{Ge(v);return new Le({defaultMode:"local"})}));E.hooks.createGenerator.for("css").tap(He,(v=>{Ue(v);return this._exportsOnly?new Ne:new Be}));E.hooks.createGenerator.for("css/global").tap(He,(v=>{Ue(v);return this._exportsOnly?new Ne:new Be}));E.hooks.createGenerator.for("css/module").tap(He,(v=>{Ue(v);return this._exportsOnly?new Ne:new Be}));const $=new WeakMap;v.hooks.afterCodeGeneration.tap("CssModulesPlugin",(()=>{const{chunkGraph:E}=v;for(const R of v.chunks){if(CssModulesPlugin.chunkHasCss(R,E)){$.set(R,this.getOrderedChunkCssModules(R,E,v))}}}));v.hooks.contentHash.tap("CssModulesPlugin",(E=>{const{chunkGraph:R,outputOptions:{hashSalt:j,hashDigest:N,hashDigestLength:q,hashFunction:G}}=v;const ie=$.get(E);if(ie===undefined)return;const ae=Me(G);if(j)ae.update(j);for(const v of ie){ae.update(R.getModuleHash(v,E.runtime))}const ce=ae.digest(N);E.contentHash.css=Te(ce,q)}));v.hooks.renderManifest.tap(He,((E,R)=>{const{chunkGraph:N}=v;const{hash:q,chunk:G,codeGenerationResults:ie}=R;if(G instanceof j)return E;const ae=$.get(G);if(ae!==undefined){E.push({render:()=>this.renderChunk({chunk:G,chunkGraph:N,codeGenerationResults:ie,uniqueName:v.outputOptions.uniqueName,modules:ae}),filenameTemplate:CssModulesPlugin.getChunkFilenameTemplate(G,v.outputOptions),pathOptions:{hash:q,runtime:G.runtime,chunk:G,contentHashType:"css"},identifier:`css${G.id}`,hash:G.contentHash.css})}return E}));const _e=new WeakSet;const handler=(E,R)=>{if(_e.has(E)){return}_e.add(E);R.add(N.publicPath);R.add(N.getChunkCssFilename);R.add(N.hasOwnProperty);R.add(N.moduleFactoriesAddOnly);R.add(N.makeNamespaceObject);const $=qe();v.addRuntimeModule(E,new $(R))};v.hooks.runtimeRequirementInTree.for(N.hasCssModules).tap(He,handler);v.hooks.runtimeRequirementInTree.for(N.ensureChunkHandlers).tap(He,handler);v.hooks.runtimeRequirementInTree.for(N.hmrDownloadUpdateHandlers).tap(He,handler)}))}getModulesInOrder(v,E,R){if(!E)return[];const $=[...E];const j=Array.from(v.groupsIterable,(v=>{const E=$.map((E=>({module:E,index:v.getModulePostOrderIndex(E)}))).filter((v=>v.index!==undefined)).sort(((v,E)=>E.index-v.index)).map((v=>v.module));return{list:E,set:new Set(E)}}));if(j.length===1)return j[0].list.reverse();const compareModuleLists=({list:v},{list:E})=>{if(v.length===0){return E.length===0?0:1}else{if(E.length===0)return-1;return _e(v[v.length-1],E[E.length-1])}};j.sort(compareModuleLists);const N=[];for(;;){const E=new Set;const $=j[0].list;if($.length===0){break}let q=$[$.length-1];let G=undefined;e:for(;;){for(const{list:v,set:R}of j){if(v.length===0)continue;const $=v[v.length-1];if($===q)continue;if(!R.has(q))continue;E.add(q);if(E.has($)){G=$;continue}q=$;G=false;continue e}break}if(G){if(R){R.warnings.push(new Error(`chunk ${v.name||v.id}\nConflicting order between ${G.readableIdentifier(R.requestShortener)} and ${q.readableIdentifier(R.requestShortener)}`))}q=G}N.push(q);for(const{list:v,set:E}of j){const R=v[v.length-1];if(R===q)v.pop();else if(G&&E.has(q)){const E=v.indexOf(q);if(E>=0)v.splice(E,1)}}j.sort(compareModuleLists)}return N}getOrderedChunkCssModules(v,E,R){return[...this.getModulesInOrder(v,E.getOrderedChunkModulesIterableBySourceType(v,"css-import",_e),R),...this.getModulesInOrder(v,E.getOrderedChunkModulesIterableBySourceType(v,"css",_e),R)]}renderChunk({uniqueName:v,chunk:E,chunkGraph:R,codeGenerationResults:j,modules:N}){const q=new $;const G=[];for(const $ of N){try{const N=j.get($,E.runtime);const ie=N.sources.get("css")||N.sources.get("css-import");if(ie){q.add(ie);q.add("\n")}const ae=N.data&&N.data.get("css-exports");const ce=R.getModuleId($)+"";G.push(`${ae?Array.from(ae,(([E,R])=>{const $=`${v?v+"-":""}${ce}-${E}`;return R===$?`${escapeCss(E)}/`:R==="--"+$?`${escapeCss(E)}%`:`${escapeCss(E)}(${escapeCss(R)})`})).join(""):""}${escapeCss(ce)}`)}catch(v){v.message+=`\nduring rendering of css ${$.identifier()}`;throw v}}q.add(`head{--webpack-${escapeCss((v?v+"-":"")+E.id,true)}:${G.join(",")};}`);return q}static getChunkFilenameTemplate(v,E){if(v.cssFilenameTemplate){return v.cssFilenameTemplate}else if(v.canBeInitial()){return E.cssFilename}else{return E.cssChunkFilename}}static chunkHasCss(v,E){return!!E.getChunkModulesIterableBySourceType(v,"css")||!!E.getChunkModulesIterableBySourceType(v,"css-import")}}v.exports=CssModulesPlugin},43522:function(v,E,R){"use strict";const $=R(68646);const j=R(14367);const N=R(12778);const q=R(2951);const G=R(75689);const ie=R(24769);const ae=R(75178);const ce=R(19383);const le=R(62465);const me="{".charCodeAt(0);const _e="}".charCodeAt(0);const Ie=":".charCodeAt(0);const Me="/".charCodeAt(0);const Oe=";".charCodeAt(0);const cssUnescape=v=>v.replace(/\\([0-9a-fA-F]{1,6}[ \t\n\r\f]?|[\s\S])/g,(v=>{if(v.length>2){return String.fromCharCode(parseInt(v.slice(1).trim(),16))}else{return v[1]}}));class LocConverter{constructor(v){this._input=v;this.line=1;this.column=0;this.pos=0}get(v){if(this.pos!==v){if(this.pos0&&(R=E.lastIndexOf("\n",R-1))!==-1)this.line++}}else{let E=this._input.lastIndexOf("\n",this.pos);while(E>=v){this.line--;E=E>0?this._input.lastIndexOf("\n",E-1):-1}this.column=v-E}this.pos=v}return this}}const Te=0;const Ne=1;const Be=2;const Le=3;const qe=4;const Ue=5;const Ge=6;const explainMode=v=>{switch(v){case Te:return"parsing top level css";case Ne:return"parsing css rule content (global)";case Be:return"parsing css rule content (local)";case Le:return"parsing @import (expecting url)";case qe:return"parsing @import (expecting optionally supports or media query)";case Ue:return"parsing @import (expecting optionally media query)";case Ge:return"parsing at-rule";default:return v}};class CssParser extends ${constructor({allowPseudoBlocks:v=true,allowModeSwitch:E=true,defaultMode:R="global"}={}){super();this.allowPseudoBlocks=v;this.allowModeSwitch=E;this.defaultMode=R}parse(v,E){if(Buffer.isBuffer(v)){v=v.toString("utf-8")}else if(typeof v==="object"){throw new Error("webpackAst is unexpected for the CssParser")}if(v[0]==="\ufeff"){v=v.slice(1)}const R=E.module;const $=new Set;const Ge=new LocConverter(v);let He=Te;let We=0;let Qe=0;let Je=undefined;let Ve=undefined;let Ke=undefined;const Xe=[];const isTopLevelLocal=()=>Je==="local"||this.defaultMode==="local"&&Je===undefined;const eatWhiteLine=(v,E)=>{for(;;){const R=v.charCodeAt(E);if(R===32||R===9){E++;continue}if(R===10)E++;break}return E};const eatUntil=v=>{const E=Array.from({length:v.length},((E,R)=>v.charCodeAt(R)));const R=Array.from({length:E.reduce(((v,E)=>Math.max(v,E)),0)+1},(()=>false));E.forEach((v=>R[v]=true));return(v,E)=>{for(;;){const $=v.charCodeAt(E);if(${let $="";for(;;){if(v.charCodeAt(E)===Me){const R=le.eatComments(v,E);if(E!==R){E=R;if(E===v.length)break}else{$+="/";E++;if(E===v.length)break}}const j=R(v,E);if(E!==j){$+=v.slice(E,j);E=j}else{break}if(E===v.length)break}return[E,$.trimRight()]};const Ye=eatUntil(":};/");const Ze=eatUntil("};/");const parseExports=(v,E)=>{E=le.eatWhitespaceAndComments(v,E);const $=v.charCodeAt(E);if($!==me)throw new Error(`Unexpected ${v[E]} at ${E} during parsing of ':export' (expected '{')`);E++;E=le.eatWhitespaceAndComments(v,E);for(;;){if(v.charCodeAt(E)===_e)break;E=le.eatWhitespaceAndComments(v,E);if(E===v.length)return E;let $=E;let j;[E,j]=eatText(v,E,Ye);if(E===v.length)return E;if(v.charCodeAt(E)!==Ie){throw new Error(`Unexpected ${v[E]} at ${E} during parsing of export name in ':export' (expected ':')`)}E++;if(E===v.length)return E;E=le.eatWhitespaceAndComments(v,E);if(E===v.length)return E;let q;[E,q]=eatText(v,E,Ze);if(E===v.length)return E;const G=v.charCodeAt(E);if(G===Oe){E++;if(E===v.length)return E;E=le.eatWhitespaceAndComments(v,E);if(E===v.length)return E}else if(G!==_e){throw new Error(`Unexpected ${v[E]} at ${E} during parsing of export value in ':export' (expected ';' or '}')`)}const ie=new N(j,q);const{line:ae,column:ce}=Ge.get($);const{line:me,column:Me}=Ge.get(E);ie.setLoc(ae,ce,me,Me);R.addDependency(ie)}E++;if(E===v.length)return E;E=eatWhiteLine(v,E);return E};const et=eatUntil(":{};");const processLocalDeclaration=(v,E)=>{Je=undefined;const j=E;E=le.eatWhitespaceAndComments(v,E);const N=E;const[q,ie]=eatText(v,E,et);if(v.charCodeAt(q)!==Ie)return j;E=q+1;if(ie.startsWith("--")){const{line:v,column:E}=Ge.get(N);const{line:j,column:ae}=Ge.get(q);const ce=ie.slice(2);const le=new G(ce,[N,q],"--");le.setLoc(v,E,j,ae);R.addDependency(le);$.add(ce)}else if(ie==="animation-name"||ie==="animation"){Je="animation";Ke=undefined}return E};const processDeclarationValueDone=(v,E)=>{if(Je==="animation"&&Ke){const{line:E,column:$}=Ge.get(Ke[0]);const{line:j,column:N}=Ge.get(Ke[1]);const q=v.slice(Ke[0],Ke[1]);const G=new ie(q,Ke);G.setLoc(E,$,j,N);R.addDependency(G)}};const tt=eatUntil("{};/");const nt=eatUntil(",)};/");le(v,{isSelector:()=>He!==Ne&&He!==Be,url:(v,E,$,j,N)=>{const q=cssUnescape(v.slice(j,N));switch(He){case Le:{Je.url=q;He=qe;break}case qe:case Ue:throw new Error(`Unexpected ${v.slice(E,$)} at ${E} during ${explainMode(He)}`);default:{const v=new ae(q,[E,$],"url");const{line:j,column:N}=Ge.get(E);const{line:G,column:ie}=Ge.get($);v.setLoc(j,N,G,ie);R.addDependency(v);R.addCodeGenerationDependency(v);break}}return $},string:(v,E,R)=>{switch(He){case Le:{Je.url=cssUnescape(v.slice(E+1,R-1));He=qe;break}}return R},atKeyword:(v,E,$)=>{const j=v.slice(E,$);if(j==="@namespace"){throw new Error("@namespace is not supported in bundled CSS")}if(j==="@import"){if(He!==Te){throw new Error(`Unexpected @import at ${E} during ${explainMode(He)}`)}He=Le;We=$;Je={start:E,url:undefined,supports:undefined}}if(j==="@keyframes"){let E=$;E=le.eatWhitespaceAndComments(v,E);if(E===v.length)return E;const[j,N]=eatText(v,E,tt);const{line:q,column:ie}=Ge.get(E);const{line:ae,column:ce}=Ge.get(j);const _e=new G(N,[E,j]);_e.setLoc(q,ie,ae,ce);R.addDependency(_e);E=j;if(E===v.length)return E;if(v.charCodeAt(E)!==me){throw new Error(`Unexpected ${v[E]} at ${E} during parsing of @keyframes (expected '{')`)}He=Be;Qe=1;return E+1}return $},semicolon:(v,E,$)=>{switch(He){case Le:throw new Error(`Expected URL for @import at ${E}`);case Ue:case qe:{const{line:j,column:N}=Ge.get(Je.start);const{line:G,column:ie}=Ge.get($);$=eatWhiteLine(v,$);const ae=v.slice(We,E).trim();const ce=new q(Je.url,[Je.start,$],Je.supports,ae);ce.setLoc(j,N,G,ie);R.addDependency(ce);break}case Be:{processDeclarationValueDone(v,E);return processLocalDeclaration(v,$)}case Ne:{return $}}He=Te;Je=undefined;Ve=undefined;return $},leftCurlyBracket:(v,E,R)=>{switch(He){case Te:He=isTopLevelLocal()?Be:Ne;Qe=1;if(He===Be)return processLocalDeclaration(v,R);break;case Ne:case Be:Qe++;break}return R},rightCurlyBracket:(v,E,R)=>{switch(He){case Be:processDeclarationValueDone(v,E);case Ne:if(--Qe===0){He=Te;Je=undefined;Ve=undefined}break}return R},id:(v,E,$)=>{Ve=false;switch(He){case Te:if(isTopLevelLocal()){const j=v.slice(E+1,$);const N=new G(j,[E+1,$]);const{line:q,column:ie}=Ge.get(E);const{line:ae,column:ce}=Ge.get($);N.setLoc(q,ie,ae,ce);R.addDependency(N)}break}return $},identifier:(v,E,R)=>{Ve=false;switch(He){case Be:if(Je==="animation"){Ke=[E,R]}break}return R},class:(v,E,$)=>{switch(He){case Te:{if(isTopLevelLocal()){const j=v.slice(E+1,$);const N=new G(j,[E+1,$]);const{line:q,column:ie}=Ge.get(E);const{line:ae,column:ce}=Ge.get($);N.setLoc(q,ie,ae,ce);R.addDependency(N);if(Ve===undefined)Ve=j}else{Ve=false}break}}return $},leftParenthesis:(v,E,R)=>{switch(He){case Te:{Xe.push(false);break}}return R},rightParenthesis:(v,E,$)=>{switch(He){case Te:{const v=Xe.pop();if(v!==false){Je=v;const N=new j("",[E,$]);R.addPresentationalDependency(N)}break}}return $},pseudoClass:(v,E,$)=>{Ve=false;switch(He){case Te:{const N=v.slice(E,$);if(this.allowModeSwitch&&N===":global"){Je="global";const v=new j("",[E,$]);R.addPresentationalDependency(v)}else if(this.allowModeSwitch&&N===":local"){Je="local";const v=new j("",[E,$]);R.addPresentationalDependency(v)}else if(this.allowPseudoBlocks&&N===":export"){const N=parseExports(v,$);const q=new j("",[E,N]);R.addPresentationalDependency(q);return N}break}}return $},pseudoFunction:(v,E,$)=>{switch(He){case Te:{const N=v.slice(E,$-1);if(this.allowModeSwitch&&N===":global"){Xe.push(Je);Je="global";const v=new j("",[E,$]);R.addPresentationalDependency(v)}else if(this.allowModeSwitch&&N===":local"){Xe.push(Je);Je="local";const v=new j("",[E,$]);R.addPresentationalDependency(v)}else{Xe.push(false)}break}}return $},function:(v,E,j)=>{switch(He){case Be:{const N=v.slice(E,j-1);if(N==="var"){let E=le.eatWhitespaceAndComments(v,j);if(E===v.length)return E;const[N,q]=eatText(v,E,nt);if(!q.startsWith("--"))return j;const{line:G,column:ae}=Ge.get(E);const{line:ce,column:me}=Ge.get(N);const _e=new ie(q.slice(2),[E,N],"--",$);_e.setLoc(G,ae,ce,me);R.addDependency(_e);return N}break}}return j},comma:(v,E,R)=>{switch(He){case Te:Je=undefined;Xe.length=0;break;case Be:processDeclarationValueDone(v,E);break}return R}});R.buildInfo.strict=true;R.buildMeta.exportsType="namespace";R.addDependency(new ce([],true));return E}}v.exports=CssParser},62465:function(v){"use strict";const E="\n".charCodeAt(0);const R="\r".charCodeAt(0);const $="\f".charCodeAt(0);const j="\t".charCodeAt(0);const N=" ".charCodeAt(0);const q="/".charCodeAt(0);const G="\\".charCodeAt(0);const ie="*".charCodeAt(0);const ae="(".charCodeAt(0);const ce=")".charCodeAt(0);const le="{".charCodeAt(0);const me="}".charCodeAt(0);const _e='"'.charCodeAt(0);const Ie="'".charCodeAt(0);const Me=".".charCodeAt(0);const Oe=":".charCodeAt(0);const Te=";".charCodeAt(0);const Ne=",".charCodeAt(0);const Be="%".charCodeAt(0);const Le="@".charCodeAt(0);const qe="_".charCodeAt(0);const Ue="a".charCodeAt(0);const Ge="u".charCodeAt(0);const He="e".charCodeAt(0);const We="z".charCodeAt(0);const Qe="A".charCodeAt(0);const Je="E".charCodeAt(0);const Ve="Z".charCodeAt(0);const Ke="0".charCodeAt(0);const Xe="9".charCodeAt(0);const Ye="#".charCodeAt(0);const Ze="+".charCodeAt(0);const et="-".charCodeAt(0);const tt="<".charCodeAt(0);const nt=">".charCodeAt(0);const _isNewLine=v=>v===E||v===R||v===$;const consumeSpace=(v,E,R)=>{let $;do{E++;$=v.charCodeAt(E)}while(_isWhiteSpace($));return E};const _isWhiteSpace=v=>v===E||v===R||v===$||v===j||v===N;const consumeSingleCharToken=(v,E,R)=>E+1;const consumePotentialComment=(v,E,R)=>{E++;if(E===v.length)return E;let $=v.charCodeAt(E);if($!==ie)return E;for(;;){E++;if(E===v.length)return E;$=v.charCodeAt(E);while($===ie){E++;if(E===v.length)return E;$=v.charCodeAt(E);if($===q)return E+1}}};const consumeString=v=>(E,R,$)=>{const j=R;R=_consumeString(E,R,v);if($.string!==undefined){R=$.string(E,j,R)}return R};const _consumeString=(v,E,R)=>{E++;for(;;){if(E===v.length)return E;const $=v.charCodeAt(E);if($===R)return E+1;if(_isNewLine($)){return E}if($===G){E++;if(E===v.length)return E;E++}else{E++}}};const _isIdentifierStartCode=v=>v===qe||v>=Ue&&v<=We||v>=Qe&&v<=Ve||v>128;const _isDigit=v=>v>=Ke&&v<=Xe;const _startsIdentifier=(v,E)=>{const R=v.charCodeAt(E);if(R===et){if(E===v.length)return false;const R=v.charCodeAt(E+1);if(R===et)return true;if(R===G){const R=v.charCodeAt(E+2);return!_isNewLine(R)}return _isIdentifierStartCode(R)}if(R===G){const R=v.charCodeAt(E+1);return!_isNewLine(R)}return _isIdentifierStartCode(R)};const consumeNumberSign=(v,E,R)=>{const $=E;E++;if(E===v.length)return E;if(R.isSelector(v,E)&&_startsIdentifier(v,E)){E=_consumeIdentifier(v,E);if(R.id!==undefined){return R.id(v,$,E)}}return E};const consumeMinus=(v,E,R)=>{const $=E;E++;if(E===v.length)return E;const j=v.charCodeAt(E);if(j===Me||_isDigit(j)){return consumeNumericToken(v,E,R)}else if(j===et){E++;if(E===v.length)return E;const j=v.charCodeAt(E);if(j===nt){return E+1}else{E=_consumeIdentifier(v,E);if(R.identifier!==undefined){return R.identifier(v,$,E)}}}else if(j===G){if(E+1===v.length)return E;const j=v.charCodeAt(E+1);if(_isNewLine(j))return E;E=_consumeIdentifier(v,E);if(R.identifier!==undefined){return R.identifier(v,$,E)}}else if(_isIdentifierStartCode(j)){E++;E=_consumeIdentifier(v,E);if(R.identifier!==undefined){return R.identifier(v,$,E)}}return E};const consumeDot=(v,E,R)=>{const $=E;E++;if(E===v.length)return E;const j=v.charCodeAt(E);if(_isDigit(j))return consumeNumericToken(v,E-2,R);if(!R.isSelector(v,E)||!_startsIdentifier(v,E))return E;E=_consumeIdentifier(v,E);if(R.class!==undefined)return R.class(v,$,E);return E};const consumeNumericToken=(v,E,R)=>{E=_consumeNumber(v,E);if(E===v.length)return E;if(_startsIdentifier(v,E))return _consumeIdentifier(v,E);const $=v.charCodeAt(E);if($===Be)return E+1;return E};const consumeOtherIdentifier=(v,E,R)=>{const $=E;E=_consumeIdentifier(v,E);if(E!==v.length&&!R.isSelector(v,E)&&v.charCodeAt(E)===ae){E++;if(R.function!==undefined){return R.function(v,$,E)}}else{if(R.identifier!==undefined){return R.identifier(v,$,E)}}return E};const consumePotentialUrl=(v,E,R)=>{const $=E;E=_consumeIdentifier(v,E);if(E===$+3&&v.slice($,E+1)==="url("){E++;let j=v.charCodeAt(E);while(_isWhiteSpace(j)){E++;if(E===v.length)return E;j=v.charCodeAt(E)}if(j===_e||j===Ie){E++;const N=E;E=_consumeString(v,E,j);const q=E-1;j=v.charCodeAt(E);while(_isWhiteSpace(j)){E++;if(E===v.length)return E;j=v.charCodeAt(E)}if(j!==ce)return E;E++;if(R.url!==undefined)return R.url(v,$,E,N,q);return E}else{const N=E;let q;for(;;){if(j===G){E++;if(E===v.length)return E;E++}else if(_isWhiteSpace(j)){q=E;do{E++;if(E===v.length)return E;j=v.charCodeAt(E)}while(_isWhiteSpace(j));if(j!==ce)return E;E++;if(R.url!==undefined){return R.url(v,$,E,N,q)}return E}else if(j===ce){q=E;E++;if(R.url!==undefined){return R.url(v,$,E,N,q)}return E}else if(j===ae){return E}else{E++}if(E===v.length)return E;j=v.charCodeAt(E)}}}else{if(R.identifier!==undefined){return R.identifier(v,$,E)}return E}};const consumePotentialPseudo=(v,E,R)=>{const $=E;E++;if(!R.isSelector(v,E)||!_startsIdentifier(v,E))return E;E=_consumeIdentifier(v,E);let j=v.charCodeAt(E);if(j===ae){E++;if(R.pseudoFunction!==undefined){return R.pseudoFunction(v,$,E)}return E}if(R.pseudoClass!==undefined){return R.pseudoClass(v,$,E)}return E};const consumeLeftParenthesis=(v,E,R)=>{E++;if(R.leftParenthesis!==undefined){return R.leftParenthesis(v,E-1,E)}return E};const consumeRightParenthesis=(v,E,R)=>{E++;if(R.rightParenthesis!==undefined){return R.rightParenthesis(v,E-1,E)}return E};const consumeLeftCurlyBracket=(v,E,R)=>{E++;if(R.leftCurlyBracket!==undefined){return R.leftCurlyBracket(v,E-1,E)}return E};const consumeRightCurlyBracket=(v,E,R)=>{E++;if(R.rightCurlyBracket!==undefined){return R.rightCurlyBracket(v,E-1,E)}return E};const consumeSemicolon=(v,E,R)=>{E++;if(R.semicolon!==undefined){return R.semicolon(v,E-1,E)}return E};const consumeComma=(v,E,R)=>{E++;if(R.comma!==undefined){return R.comma(v,E-1,E)}return E};const _consumeIdentifier=(v,E)=>{for(;;){const R=v.charCodeAt(E);if(R===G){E++;if(E===v.length)return E;E++}else if(_isIdentifierStartCode(R)||_isDigit(R)||R===et){E++}else{return E}}};const _consumeNumber=(v,E)=>{E++;if(E===v.length)return E;let R=v.charCodeAt(E);while(_isDigit(R)){E++;if(E===v.length)return E;R=v.charCodeAt(E)}if(R===Me&&E+1!==v.length){const $=v.charCodeAt(E+1);if(_isDigit($)){E+=2;R=v.charCodeAt(E);while(_isDigit(R)){E++;if(E===v.length)return E;R=v.charCodeAt(E)}}}if(R===He||R===Je){if(E+1!==v.length){const R=v.charCodeAt(E+2);if(_isDigit(R)){E+=2}else if((R===et||R===Ze)&&E+2!==v.length){const R=v.charCodeAt(E+2);if(_isDigit(R)){E+=3}else{return E}}else{return E}}}else{return E}R=v.charCodeAt(E);while(_isDigit(R)){E++;if(E===v.length)return E;R=v.charCodeAt(E)}return E};const consumeLessThan=(v,E,R)=>{if(v.slice(E+1,E+4)==="!--")return E+4;return E+1};const consumeAt=(v,E,R)=>{const $=E;E++;if(E===v.length)return E;if(_startsIdentifier(v,E)){E=_consumeIdentifier(v,E);if(R.atKeyword!==undefined){E=R.atKeyword(v,$,E)}}return E};const st=Array.from({length:128},((v,G)=>{switch(G){case E:case R:case $:case j:case N:return consumeSpace;case _e:case Ie:return consumeString(G);case Ye:return consumeNumberSign;case q:return consumePotentialComment;case Ne:return consumeComma;case Te:return consumeSemicolon;case ae:return consumeLeftParenthesis;case ce:return consumeRightParenthesis;case le:return consumeLeftCurlyBracket;case me:return consumeRightCurlyBracket;case Oe:return consumePotentialPseudo;case Ze:return consumeNumericToken;case Me:return consumeDot;case et:return consumeMinus;case tt:return consumeLessThan;case Le:return consumeAt;case Ge:return consumePotentialUrl;case qe:return consumeOtherIdentifier;default:if(_isDigit(G))return consumeNumericToken;if(G>=Ue&&G<=We||G>=Qe&&G<=Ve){return consumeOtherIdentifier}return consumeSingleCharToken}}));v.exports=(v,E)=>{let R=0;while(R{e:for(;;){const R=v.charCodeAt(E);if(R===q){if(E===v.length)return E;let R=v.charCodeAt(E+1);if(R!==ie)return E;E++;for(;;){E++;if(E===v.length)return E;R=v.charCodeAt(E);while(R===ie){E++;if(E===v.length)return E;R=v.charCodeAt(E);if(R===q){E++;continue e}}}}return E}};v.exports.eatWhitespaceAndComments=(v,E)=>{e:for(;;){const R=v.charCodeAt(E);if(R===q){if(E===v.length)return E;let R=v.charCodeAt(E+1);if(R!==ie)return E;E++;for(;;){E++;if(E===v.length)return E;R=v.charCodeAt(E);while(R===ie){E++;if(E===v.length)return E;R=v.charCodeAt(E);if(R===q){E++;continue e}}}}else if(_isWhiteSpace(R)){E++;continue}return E}}},2366:function(v,E,R){"use strict";const{Tracer:$}=R(97098);const j=R(89699);const{dirname:N,mkdirpSync:q}=R(47077);const G=j(R(39109),(()=>R(95725)),{name:"Profiling Plugin",baseDataPath:"options"});let ie=undefined;try{ie=R(31405)}catch(v){console.log("Unable to CPU profile in < node 8.0")}class Profiler{constructor(v){this.session=undefined;this.inspector=v;this._startTime=0}hasSession(){return this.session!==undefined}startProfiling(){if(this.inspector===undefined){return Promise.resolve()}try{this.session=new ie.Session;this.session.connect()}catch(v){this.session=undefined;return Promise.resolve()}const v=process.hrtime();this._startTime=v[0]*1e6+Math.round(v[1]/1e3);return Promise.all([this.sendCommand("Profiler.setSamplingInterval",{interval:100}),this.sendCommand("Profiler.enable"),this.sendCommand("Profiler.start")])}sendCommand(v,E){if(this.hasSession()){return new Promise(((R,$)=>this.session.post(v,E,((v,E)=>{if(v!==null){$(v)}else{R(E)}}))))}else{return Promise.resolve()}}destroy(){if(this.hasSession()){this.session.disconnect()}return Promise.resolve()}stopProfiling(){return this.sendCommand("Profiler.stop").then((({profile:v})=>{const E=process.hrtime();const R=E[0]*1e6+Math.round(E[1]/1e3);if(v.startTimeR){const E=v.endTime-v.startTime;const $=R-this._startTime;const j=Math.max(0,$-E);v.startTime=this._startTime+j/2;v.endTime=R-j/2}return{profile:v}}))}}const createTrace=(v,E)=>{const R=new $;const j=new Profiler(ie);if(/\/|\\/.test(E)){const R=N(v,E);q(v,R)}const G=v.createWriteStream(E);let ae=0;R.pipe(G);R.instantEvent({name:"TracingStartedInPage",id:++ae,cat:["disabled-by-default-devtools.timeline"],args:{data:{sessionId:"-1",page:"0xfff",frames:[{frame:"0xfff",url:"webpack",name:""}]}}});R.instantEvent({name:"TracingStartedInBrowser",id:++ae,cat:["disabled-by-default-devtools.timeline"],args:{data:{sessionId:"-1"}}});return{trace:R,counter:ae,profiler:j,end:v=>{R.push("]");G.on("close",(()=>{v()}));R.push(null)}}};const ae="ProfilingPlugin";class ProfilingPlugin{constructor(v={}){G(v);this.outputPath=v.outputPath||"events.json"}apply(v){const E=createTrace(v.intermediateFileSystem,this.outputPath);E.profiler.startProfiling();Object.keys(v.hooks).forEach((R=>{const $=v.hooks[R];if($){$.intercept(makeInterceptorFor("Compiler",E)(R))}}));Object.keys(v.resolverFactory.hooks).forEach((R=>{const $=v.resolverFactory.hooks[R];if($){$.intercept(makeInterceptorFor("Resolver",E)(R))}}));v.hooks.compilation.tap(ae,((v,{normalModuleFactory:R,contextModuleFactory:$})=>{interceptAllHooksFor(v,E,"Compilation");interceptAllHooksFor(R,E,"Normal Module Factory");interceptAllHooksFor($,E,"Context Module Factory");interceptAllParserHooks(R,E);interceptAllJavascriptModulesPluginHooks(v,E)}));v.hooks.done.tapAsync({name:ae,stage:Infinity},((R,$)=>{if(v.watchMode)return $();E.profiler.stopProfiling().then((v=>{if(v===undefined){E.profiler.destroy();E.end($);return}const R=v.profile.startTime;const j=v.profile.endTime;E.trace.completeEvent({name:"TaskQueueManager::ProcessTaskFromWorkQueue",id:++E.counter,cat:["toplevel"],ts:R,args:{src_file:"../../ipc/ipc_moji_bootstrap.cc",src_func:"Accept"}});E.trace.completeEvent({name:"EvaluateScript",id:++E.counter,cat:["devtools.timeline"],ts:R,dur:j-R,args:{data:{url:"webpack",lineNumber:1,columnNumber:1,frame:"0xFFF"}}});E.trace.instantEvent({name:"CpuProfile",id:++E.counter,cat:["disabled-by-default-devtools.timeline"],ts:j,args:{data:{cpuProfile:v.profile}}});E.profiler.destroy();E.end($)}))}))}}const interceptAllHooksFor=(v,E,R)=>{if(Reflect.has(v,"hooks")){Object.keys(v.hooks).forEach(($=>{const j=v.hooks[$];if(j&&!j._fakeHook){j.intercept(makeInterceptorFor(R,E)($))}}))}};const interceptAllParserHooks=(v,E)=>{const R=["javascript/auto","javascript/dynamic","javascript/esm","json","webassembly/async","webassembly/sync"];R.forEach((R=>{v.hooks.parser.for(R).tap("ProfilingPlugin",((v,R)=>{interceptAllHooksFor(v,E,"Parser")}))}))};const interceptAllJavascriptModulesPluginHooks=(v,E)=>{interceptAllHooksFor({hooks:R(36109).getCompilationHooks(v)},E,"JavascriptModulesPlugin")};const makeInterceptorFor=(v,E)=>v=>({register:R=>{const{name:$,type:j,fn:N}=R;const q=$===ae?N:makeNewProfiledTapFn(v,E,{name:$,type:j,fn:N});return{...R,fn:q}}});const makeNewProfiledTapFn=(v,E,{name:R,type:$,fn:j})=>{const N=["blink.user_timing"];switch($){case"promise":return(...v)=>{const $=++E.counter;E.trace.begin({name:R,id:$,cat:N});const q=j(...v);return q.then((v=>{E.trace.end({name:R,id:$,cat:N});return v}))};case"async":return(...v)=>{const $=++E.counter;E.trace.begin({name:R,id:$,cat:N});const q=v.pop();j(...v,((...v)=>{E.trace.end({name:R,id:$,cat:N});q(...v)}))};case"sync":return(...v)=>{const $=++E.counter;if(R===ae){return j(...v)}E.trace.begin({name:R,id:$,cat:N});let q;try{q=j(...v)}catch(v){E.trace.end({name:R,id:$,cat:N});throw v}E.trace.end({name:R,id:$,cat:N});return q};default:break}};v.exports=ProfilingPlugin;v.exports.Profiler=Profiler},80463:function(v,E,R){"use strict";const $=R(39201);const j=R(65764);const N=R(91596);const q={f:{definition:"var __WEBPACK_AMD_DEFINE_RESULT__;",content:`!(__WEBPACK_AMD_DEFINE_RESULT__ = (#).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`,requests:[$.require,$.exports,$.module]},o:{definition:"",content:"!(module.exports = #)",requests:[$.module]},of:{definition:"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;",content:`!(__WEBPACK_AMD_DEFINE_FACTORY__ = (#),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`,requests:[$.require,$.exports,$.module]},af:{definition:"var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;",content:`!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_RESULT__ = (#).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`,requests:[$.exports,$.module]},ao:{definition:"",content:"!(#, module.exports = #)",requests:[$.module]},aof:{definition:"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;",content:`!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_FACTORY__ = (#),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`,requests:[$.exports,$.module]},lf:{definition:"var XXX, XXXmodule;",content:"!(XXXmodule = { id: YYY, exports: {}, loaded: false }, XXX = (#).call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule), XXXmodule.loaded = true, XXX === undefined && (XXX = XXXmodule.exports))",requests:[$.require,$.module]},lo:{definition:"var XXX;",content:"!(XXX = #)",requests:[]},lof:{definition:"var XXX, XXXfactory, XXXmodule;",content:"!(XXXfactory = (#), (typeof XXXfactory === 'function' ? ((XXXmodule = { id: YYY, exports: {}, loaded: false }), (XXX = XXXfactory.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule)), (XXXmodule.loaded = true), XXX === undefined && (XXX = XXXmodule.exports)) : XXX = XXXfactory))",requests:[$.require,$.module]},laf:{definition:"var __WEBPACK_AMD_DEFINE_ARRAY__, XXX, XXXexports;",content:"!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, XXX = (#).apply(XXXexports = {}, __WEBPACK_AMD_DEFINE_ARRAY__), XXX === undefined && (XXX = XXXexports))",requests:[]},lao:{definition:"var XXX;",content:"!(#, XXX = #)",requests:[]},laof:{definition:"var XXXarray, XXXfactory, XXXexports, XXX;",content:`!(XXXarray = #, XXXfactory = (#),\n\t\t(typeof XXXfactory === 'function' ?\n\t\t\t((XXX = XXXfactory.apply(XXXexports = {}, XXXarray)), XXX === undefined && (XXX = XXXexports)) :\n\t\t\t(XXX = XXXfactory)\n\t\t))`,requests:[]}};class AMDDefineDependency extends N{constructor(v,E,R,$,j){super();this.range=v;this.arrayRange=E;this.functionRange=R;this.objectRange=$;this.namedModule=j;this.localModule=null}get type(){return"amd define"}serialize(v){const{write:E}=v;E(this.range);E(this.arrayRange);E(this.functionRange);E(this.objectRange);E(this.namedModule);E(this.localModule);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.arrayRange=E();this.functionRange=E();this.objectRange=E();this.namedModule=E();this.localModule=E();super.deserialize(v)}}j(AMDDefineDependency,"webpack/lib/dependencies/AMDDefineDependency");AMDDefineDependency.Template=class AMDDefineDependencyTemplate extends N.Template{apply(v,E,{runtimeRequirements:R}){const $=v;const j=this.branch($);const{definition:N,content:G,requests:ie}=q[j];for(const v of ie){R.add(v)}this.replace($,E,N,G)}localModuleVar(v){return v.localModule&&v.localModule.used&&v.localModule.variableName()}branch(v){const E=this.localModuleVar(v)?"l":"";const R=v.arrayRange?"a":"";const $=v.objectRange?"o":"";const j=v.functionRange?"f":"";return E+R+$+j}replace(v,E,R,$){const j=this.localModuleVar(v);if(j){$=$.replace(/XXX/g,j.replace(/\$/g,"$$$$"));R=R.replace(/XXX/g,j.replace(/\$/g,"$$$$"))}if(v.namedModule){$=$.replace(/YYY/g,JSON.stringify(v.namedModule))}const N=$.split("#");if(R)E.insert(0,R);let q=v.range[0];if(v.arrayRange){E.replace(q,v.arrayRange[0]-1,N.shift());q=v.arrayRange[1]}if(v.objectRange){E.replace(q,v.objectRange[0]-1,N.shift());q=v.objectRange[1]}else if(v.functionRange){E.replace(q,v.functionRange[0]-1,N.shift());q=v.functionRange[1]}E.replace(q,v.range[1]-1,N.shift());if(N.length>0)throw new Error("Implementation error")}};v.exports=AMDDefineDependency},29580:function(v,E,R){"use strict";const $=R(39201);const j=R(80463);const N=R(73090);const q=R(39985);const G=R(61261);const ie=R(14367);const ae=R(32556);const ce=R(35485);const le=R(81600);const{addLocalModule:me,getLocalModule:_e}=R(59081);const isBoundFunctionExpression=v=>{if(v.type!=="CallExpression")return false;if(v.callee.type!=="MemberExpression")return false;if(v.callee.computed)return false;if(v.callee.object.type!=="FunctionExpression")return false;if(v.callee.property.type!=="Identifier")return false;if(v.callee.property.name!=="bind")return false;return true};const isUnboundFunctionExpression=v=>{if(v.type==="FunctionExpression")return true;if(v.type==="ArrowFunctionExpression")return true;return false};const isCallable=v=>{if(isUnboundFunctionExpression(v))return true;if(isBoundFunctionExpression(v))return true;return false};class AMDDefineDependencyParserPlugin{constructor(v){this.options=v}apply(v){v.hooks.call.for("define").tap("AMDDefineDependencyParserPlugin",this.processCallDefine.bind(this,v))}processArray(v,E,R,$,j){if(R.isArray()){R.items.forEach(((R,N)=>{if(R.isString()&&["require","module","exports"].includes(R.string))$[N]=R.string;const q=this.processItem(v,E,R,j);if(q===undefined){this.processContext(v,E,R)}}));return true}else if(R.isConstArray()){const j=[];R.array.forEach(((R,N)=>{let q;let G;if(R==="require"){$[N]=R;q="__webpack_require__"}else if(["exports","module"].includes(R)){$[N]=R;q=R}else if(G=_e(v.state,R)){G.flagUsed();q=new le(G,undefined,false);q.loc=E.loc;v.state.module.addPresentationalDependency(q)}else{q=this.newRequireItemDependency(R);q.loc=E.loc;q.optional=!!v.scope.inTry;v.state.current.addDependency(q)}j.push(q)}));const N=this.newRequireArrayDependency(j,R.range);N.loc=E.loc;N.optional=!!v.scope.inTry;v.state.module.addPresentationalDependency(N);return true}}processItem(v,E,R,j){if(R.isConditional()){R.options.forEach((R=>{const $=this.processItem(v,E,R);if($===undefined){this.processContext(v,E,R)}}));return true}else if(R.isString()){let N,q;if(R.string==="require"){N=new ie("__webpack_require__",R.range,[$.require])}else if(R.string==="exports"){N=new ie("exports",R.range,[$.exports])}else if(R.string==="module"){N=new ie("module",R.range,[$.module])}else if(q=_e(v.state,R.string,j)){q.flagUsed();N=new le(q,R.range,false)}else{N=this.newRequireItemDependency(R.string,R.range);N.optional=!!v.scope.inTry;v.state.current.addDependency(N);return true}N.loc=E.loc;v.state.module.addPresentationalDependency(N);return true}}processContext(v,E,R){const $=ae.create(q,R.range,R,E,this.options,{category:"amd"},v);if(!$)return;$.loc=E.loc;$.optional=!!v.scope.inTry;v.state.current.addDependency($);return true}processCallDefine(v,E){let R,$,j,N;switch(E.arguments.length){case 1:if(isCallable(E.arguments[0])){$=E.arguments[0]}else if(E.arguments[0].type==="ObjectExpression"){j=E.arguments[0]}else{j=$=E.arguments[0]}break;case 2:if(E.arguments[0].type==="Literal"){N=E.arguments[0].value;if(isCallable(E.arguments[1])){$=E.arguments[1]}else if(E.arguments[1].type==="ObjectExpression"){j=E.arguments[1]}else{j=$=E.arguments[1]}}else{R=E.arguments[0];if(isCallable(E.arguments[1])){$=E.arguments[1]}else if(E.arguments[1].type==="ObjectExpression"){j=E.arguments[1]}else{j=$=E.arguments[1]}}break;case 3:N=E.arguments[0].value;R=E.arguments[1];if(isCallable(E.arguments[2])){$=E.arguments[2]}else if(E.arguments[2].type==="ObjectExpression"){j=E.arguments[2]}else{j=$=E.arguments[2]}break;default:return}ce.bailout(v.state);let q=null;let G=0;if($){if(isUnboundFunctionExpression($)){q=$.params}else if(isBoundFunctionExpression($)){q=$.callee.object.params;G=$.arguments.length-1;if(G<0){G=0}}}let ie=new Map;if(R){const $={};const j=v.evaluateExpression(R);const ae=this.processArray(v,E,j,$,N);if(!ae)return;if(q){q=q.slice(G).filter(((E,R)=>{if($[R]){ie.set(E.name,v.getVariableInfo($[R]));return false}return true}))}}else{const E=["require","exports","module"];if(q){q=q.slice(G).filter(((R,$)=>{if(E[$]){ie.set(R.name,v.getVariableInfo(E[$]));return false}return true}))}}let ae;if($&&isUnboundFunctionExpression($)){ae=v.scope.inTry;v.inScope(q,(()=>{for(const[E,R]of ie){v.setVariable(E,R)}v.scope.inTry=ae;if($.body.type==="BlockStatement"){v.detectMode($.body.body);const E=v.prevStatement;v.preWalkStatement($.body);v.prevStatement=E;v.walkStatement($.body)}else{v.walkExpression($.body)}}))}else if($&&isBoundFunctionExpression($)){ae=v.scope.inTry;v.inScope($.callee.object.params.filter((v=>!["require","module","exports"].includes(v.name))),(()=>{for(const[E,R]of ie){v.setVariable(E,R)}v.scope.inTry=ae;if($.callee.object.body.type==="BlockStatement"){v.detectMode($.callee.object.body.body);const E=v.prevStatement;v.preWalkStatement($.callee.object.body);v.prevStatement=E;v.walkStatement($.callee.object.body)}else{v.walkExpression($.callee.object.body)}}));if($.arguments){v.walkExpressions($.arguments)}}else if($||j){v.walkExpression($||j)}const le=this.newDefineDependency(E.range,R?R.range:null,$?$.range:null,j?j.range:null,N?N:null);le.loc=E.loc;if(N){le.localModule=me(v.state,N)}v.state.module.addPresentationalDependency(le);return true}newDefineDependency(v,E,R,$,N){return new j(v,E,R,$,N)}newRequireArrayDependency(v,E){return new N(v,E)}newRequireItemDependency(v,E){return new G(v,E)}}v.exports=AMDDefineDependencyParserPlugin},88646:function(v,E,R){"use strict";const $=R(39201);const{approve:j,evaluateToIdentifier:N,evaluateToString:q,toConstantDependency:G}=R(97574);const ie=R(80463);const ae=R(29580);const ce=R(73090);const le=R(39985);const me=R(8436);const _e=R(45137);const Ie=R(61261);const{AMDDefineRuntimeModule:Me,AMDOptionsRuntimeModule:Oe}=R(14876);const Te=R(14367);const Ne=R(81600);const Be=R(42809);class AMDPlugin{constructor(v){this.amdOptions=v}apply(v){const E=this.amdOptions;v.hooks.compilation.tap("AMDPlugin",((v,{contextModuleFactory:R,normalModuleFactory:Le})=>{v.dependencyTemplates.set(_e,new _e.Template);v.dependencyFactories.set(Ie,Le);v.dependencyTemplates.set(Ie,new Ie.Template);v.dependencyTemplates.set(ce,new ce.Template);v.dependencyFactories.set(le,R);v.dependencyTemplates.set(le,new le.Template);v.dependencyTemplates.set(ie,new ie.Template);v.dependencyTemplates.set(Be,new Be.Template);v.dependencyTemplates.set(Ne,new Ne.Template);v.hooks.runtimeRequirementInModule.for($.amdDefine).tap("AMDPlugin",((v,E)=>{E.add($.require)}));v.hooks.runtimeRequirementInModule.for($.amdOptions).tap("AMDPlugin",((v,E)=>{E.add($.requireScope)}));v.hooks.runtimeRequirementInTree.for($.amdDefine).tap("AMDPlugin",((E,R)=>{v.addRuntimeModule(E,new Me)}));v.hooks.runtimeRequirementInTree.for($.amdOptions).tap("AMDPlugin",((R,$)=>{v.addRuntimeModule(R,new Oe(E))}));const handler=(v,E)=>{if(E.amd!==undefined&&!E.amd)return;const tapOptionsHooks=(E,R,j)=>{v.hooks.expression.for(E).tap("AMDPlugin",G(v,$.amdOptions,[$.amdOptions]));v.hooks.evaluateIdentifier.for(E).tap("AMDPlugin",N(E,R,j,true));v.hooks.evaluateTypeof.for(E).tap("AMDPlugin",q("object"));v.hooks.typeof.for(E).tap("AMDPlugin",G(v,JSON.stringify("object")))};new me(E).apply(v);new ae(E).apply(v);tapOptionsHooks("define.amd","define",(()=>"amd"));tapOptionsHooks("require.amd","require",(()=>["amd"]));tapOptionsHooks("__webpack_amd_options__","__webpack_amd_options__",(()=>[]));v.hooks.expression.for("define").tap("AMDPlugin",(E=>{const R=new Te($.amdDefine,E.range,[$.amdDefine]);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.typeof.for("define").tap("AMDPlugin",G(v,JSON.stringify("function")));v.hooks.evaluateTypeof.for("define").tap("AMDPlugin",q("function"));v.hooks.canRename.for("define").tap("AMDPlugin",j);v.hooks.rename.for("define").tap("AMDPlugin",(E=>{const R=new Te($.amdDefine,E.range,[$.amdDefine]);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return false}));v.hooks.typeof.for("require").tap("AMDPlugin",G(v,JSON.stringify("function")));v.hooks.evaluateTypeof.for("require").tap("AMDPlugin",q("function"))};Le.hooks.parser.for("javascript/auto").tap("AMDPlugin",handler);Le.hooks.parser.for("javascript/dynamic").tap("AMDPlugin",handler)}))}}v.exports=AMDPlugin},73090:function(v,E,R){"use strict";const $=R(94086);const j=R(65764);const N=R(91596);class AMDRequireArrayDependency extends N{constructor(v,E){super();this.depsArray=v;this.range=E}get type(){return"amd require array"}get category(){return"amd"}serialize(v){const{write:E}=v;E(this.depsArray);E(this.range);super.serialize(v)}deserialize(v){const{read:E}=v;this.depsArray=E();this.range=E();super.deserialize(v)}}j(AMDRequireArrayDependency,"webpack/lib/dependencies/AMDRequireArrayDependency");AMDRequireArrayDependency.Template=class AMDRequireArrayDependencyTemplate extends ${apply(v,E,R){const $=v;const j=this.getContent($,R);E.replace($.range[0],$.range[1]-1,j)}getContent(v,E){const R=v.depsArray.map((v=>this.contentForDependency(v,E)));return`[${R.join(", ")}]`}contentForDependency(v,{runtimeTemplate:E,moduleGraph:R,chunkGraph:$,runtimeRequirements:j}){if(typeof v==="string"){return v}if(v.localModule){return v.localModule.variableName()}else{return E.moduleExports({module:R.getModule(v),chunkGraph:$,request:v.request,runtimeRequirements:j})}}};v.exports=AMDRequireArrayDependency},39985:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);class AMDRequireContextDependency extends j{constructor(v,E,R){super(v);this.range=E;this.valueRange=R}get type(){return"amd require context"}get category(){return"amd"}serialize(v){const{write:E}=v;E(this.range);E(this.valueRange);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.valueRange=E();super.deserialize(v)}}$(AMDRequireContextDependency,"webpack/lib/dependencies/AMDRequireContextDependency");AMDRequireContextDependency.Template=R(5160);v.exports=AMDRequireContextDependency},93897:function(v,E,R){"use strict";const $=R(42290);const j=R(65764);class AMDRequireDependenciesBlock extends ${constructor(v,E){super(null,v,E)}}j(AMDRequireDependenciesBlock,"webpack/lib/dependencies/AMDRequireDependenciesBlock");v.exports=AMDRequireDependenciesBlock},8436:function(v,E,R){"use strict";const $=R(39201);const j=R(17623);const N=R(73090);const q=R(39985);const G=R(93897);const ie=R(45137);const ae=R(61261);const ce=R(14367);const le=R(32556);const me=R(81600);const{getLocalModule:_e}=R(59081);const Ie=R(42809);const Me=R(17926);class AMDRequireDependenciesBlockParserPlugin{constructor(v){this.options=v}processFunctionArgument(v,E){let R=true;const $=Me(E);if($){v.inScope($.fn.params.filter((v=>!["require","module","exports"].includes(v.name))),(()=>{if($.fn.body.type==="BlockStatement"){v.walkStatement($.fn.body)}else{v.walkExpression($.fn.body)}}));v.walkExpressions($.expressions);if($.needThis===false){R=false}}else{v.walkExpression(E)}return R}apply(v){v.hooks.call.for("require").tap("AMDRequireDependenciesBlockParserPlugin",this.processCallRequire.bind(this,v))}processArray(v,E,R){if(R.isArray()){for(const $ of R.items){const R=this.processItem(v,E,$);if(R===undefined){this.processContext(v,E,$)}}return true}else if(R.isConstArray()){const $=[];for(const j of R.array){let R,N;if(j==="require"){R="__webpack_require__"}else if(["exports","module"].includes(j)){R=j}else if(N=_e(v.state,j)){N.flagUsed();R=new me(N,undefined,false);R.loc=E.loc;v.state.module.addPresentationalDependency(R)}else{R=this.newRequireItemDependency(j);R.loc=E.loc;R.optional=!!v.scope.inTry;v.state.current.addDependency(R)}$.push(R)}const j=this.newRequireArrayDependency($,R.range);j.loc=E.loc;j.optional=!!v.scope.inTry;v.state.module.addPresentationalDependency(j);return true}}processItem(v,E,R){if(R.isConditional()){for(const $ of R.options){const R=this.processItem(v,E,$);if(R===undefined){this.processContext(v,E,$)}}return true}else if(R.isString()){let j,N;if(R.string==="require"){j=new ce("__webpack_require__",R.string,[$.require])}else if(R.string==="module"){j=new ce(v.state.module.buildInfo.moduleArgument,R.range,[$.module])}else if(R.string==="exports"){j=new ce(v.state.module.buildInfo.exportsArgument,R.range,[$.exports])}else if(N=_e(v.state,R.string)){N.flagUsed();j=new me(N,R.range,false)}else{j=this.newRequireItemDependency(R.string,R.range);j.loc=E.loc;j.optional=!!v.scope.inTry;v.state.current.addDependency(j);return true}j.loc=E.loc;v.state.module.addPresentationalDependency(j);return true}}processContext(v,E,R){const $=le.create(q,R.range,R,E,this.options,{category:"amd"},v);if(!$)return;$.loc=E.loc;$.optional=!!v.scope.inTry;v.state.current.addDependency($);return true}processArrayForRequestString(v){if(v.isArray()){const E=v.items.map((v=>this.processItemForRequestString(v)));if(E.every(Boolean))return E.join(" ")}else if(v.isConstArray()){return v.array.join(" ")}}processItemForRequestString(v){if(v.isConditional()){const E=v.options.map((v=>this.processItemForRequestString(v)));if(E.every(Boolean))return E.join("|")}else if(v.isString()){return v.string}}processCallRequire(v,E){let R;let $;let N;let q;const G=v.state.current;if(E.arguments.length>=1){R=v.evaluateExpression(E.arguments[0]);$=this.newRequireDependenciesBlock(E.loc,this.processArrayForRequestString(R));N=this.newRequireDependency(E.range,R.range,E.arguments.length>1?E.arguments[1].range:null,E.arguments.length>2?E.arguments[2].range:null);N.loc=E.loc;$.addDependency(N);v.state.current=$}if(E.arguments.length===1){v.inScope([],(()=>{q=this.processArray(v,E,R)}));v.state.current=G;if(!q)return;v.state.current.addBlock($);return true}if(E.arguments.length===2||E.arguments.length===3){try{v.inScope([],(()=>{q=this.processArray(v,E,R)}));if(!q){const R=new Ie("unsupported",E.range);G.addPresentationalDependency(R);if(v.state.module){v.state.module.addError(new j("Cannot statically analyse 'require(…, …)' in line "+E.loc.start.line,E.loc))}$=null;return true}N.functionBindThis=this.processFunctionArgument(v,E.arguments[1]);if(E.arguments.length===3){N.errorCallbackBindThis=this.processFunctionArgument(v,E.arguments[2])}}finally{v.state.current=G;if($)v.state.current.addBlock($)}return true}}newRequireDependenciesBlock(v,E){return new G(v,E)}newRequireDependency(v,E,R,$){return new ie(v,E,R,$)}newRequireItemDependency(v,E){return new ae(v,E)}newRequireArrayDependency(v,E){return new N(v,E)}}v.exports=AMDRequireDependenciesBlockParserPlugin},45137:function(v,E,R){"use strict";const $=R(39201);const j=R(65764);const N=R(91596);class AMDRequireDependency extends N{constructor(v,E,R,$){super();this.outerRange=v;this.arrayRange=E;this.functionRange=R;this.errorCallbackRange=$;this.functionBindThis=false;this.errorCallbackBindThis=false}get category(){return"amd"}serialize(v){const{write:E}=v;E(this.outerRange);E(this.arrayRange);E(this.functionRange);E(this.errorCallbackRange);E(this.functionBindThis);E(this.errorCallbackBindThis);super.serialize(v)}deserialize(v){const{read:E}=v;this.outerRange=E();this.arrayRange=E();this.functionRange=E();this.errorCallbackRange=E();this.functionBindThis=E();this.errorCallbackBindThis=E();super.deserialize(v)}}j(AMDRequireDependency,"webpack/lib/dependencies/AMDRequireDependency");AMDRequireDependency.Template=class AMDRequireDependencyTemplate extends N.Template{apply(v,E,{runtimeTemplate:R,moduleGraph:j,chunkGraph:N,runtimeRequirements:q}){const G=v;const ie=j.getParentBlock(G);const ae=R.blockPromise({chunkGraph:N,block:ie,message:"AMD require",runtimeRequirements:q});if(G.arrayRange&&!G.functionRange){const v=`${ae}.then(function() {`;const R=`;})['catch'](${$.uncaughtErrorHandler})`;q.add($.uncaughtErrorHandler);E.replace(G.outerRange[0],G.arrayRange[0]-1,v);E.replace(G.arrayRange[1],G.outerRange[1]-1,R);return}if(G.functionRange&&!G.arrayRange){const v=`${ae}.then((`;const R=`).bind(exports, __webpack_require__, exports, module))['catch'](${$.uncaughtErrorHandler})`;q.add($.uncaughtErrorHandler);E.replace(G.outerRange[0],G.functionRange[0]-1,v);E.replace(G.functionRange[1],G.outerRange[1]-1,R);return}if(G.arrayRange&&G.functionRange&&G.errorCallbackRange){const v=`${ae}.then(function() { `;const R=`}${G.functionBindThis?".bind(this)":""})['catch'](`;const $=`${G.errorCallbackBindThis?".bind(this)":""})`;E.replace(G.outerRange[0],G.arrayRange[0]-1,v);E.insert(G.arrayRange[0],"var __WEBPACK_AMD_REQUIRE_ARRAY__ = ");E.replace(G.arrayRange[1],G.functionRange[0]-1,"; (");E.insert(G.functionRange[1],").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);");E.replace(G.functionRange[1],G.errorCallbackRange[0]-1,R);E.replace(G.errorCallbackRange[1],G.outerRange[1]-1,$);return}if(G.arrayRange&&G.functionRange){const v=`${ae}.then(function() { `;const R=`}${G.functionBindThis?".bind(this)":""})['catch'](${$.uncaughtErrorHandler})`;q.add($.uncaughtErrorHandler);E.replace(G.outerRange[0],G.arrayRange[0]-1,v);E.insert(G.arrayRange[0],"var __WEBPACK_AMD_REQUIRE_ARRAY__ = ");E.replace(G.arrayRange[1],G.functionRange[0]-1,"; (");E.insert(G.functionRange[1],").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);");E.replace(G.functionRange[1],G.outerRange[1]-1,R)}}};v.exports=AMDRequireDependency},61261:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(59583);class AMDRequireItemDependency extends j{constructor(v,E){super(v);this.range=E}get type(){return"amd require"}get category(){return"amd"}}$(AMDRequireItemDependency,"webpack/lib/dependencies/AMDRequireItemDependency");AMDRequireItemDependency.Template=N;v.exports=AMDRequireItemDependency},14876:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class AMDDefineRuntimeModule extends j{constructor(){super("amd define")}generate(){return N.asString([`${$.amdDefine} = function () {`,N.indent("throw new Error('define cannot be used indirect');"),"};"])}}class AMDOptionsRuntimeModule extends j{constructor(v){super("amd options");this.options=v}generate(){return N.asString([`${$.amdOptions} = ${JSON.stringify(this.options)};`])}}E.AMDDefineRuntimeModule=AMDDefineRuntimeModule;E.AMDOptionsRuntimeModule=AMDOptionsRuntimeModule},83106:function(v,E,R){"use strict";const $=R(94086);const j=R(64768);const N=R(65764);const q=R(91596);class CachedConstDependency extends q{constructor(v,E,R){super();this.expression=v;this.range=E;this.identifier=R;this._hashUpdate=undefined}updateHash(v,E){if(this._hashUpdate===undefined)this._hashUpdate=""+this.identifier+this.range+this.expression;v.update(this._hashUpdate)}serialize(v){const{write:E}=v;E(this.expression);E(this.range);E(this.identifier);super.serialize(v)}deserialize(v){const{read:E}=v;this.expression=E();this.range=E();this.identifier=E();super.deserialize(v)}}N(CachedConstDependency,"webpack/lib/dependencies/CachedConstDependency");CachedConstDependency.Template=class CachedConstDependencyTemplate extends ${apply(v,E,{runtimeTemplate:R,dependencyTemplates:$,initFragments:N}){const q=v;N.push(new j(`var ${q.identifier} = ${q.expression};\n`,j.STAGE_CONSTANTS,0,`const ${q.identifier}`));if(typeof q.range==="number"){E.insert(q.range,q.identifier);return}E.replace(q.range[0],q.range[1]-1,q.identifier)}};v.exports=CachedConstDependency},99458:function(v,E,R){"use strict";const $=R(39201);E.handleDependencyBase=(v,E,R)=>{let j=undefined;let N;switch(v){case"exports":R.add($.exports);j=E.exportsArgument;N="expression";break;case"module.exports":R.add($.module);j=`${E.moduleArgument}.exports`;N="expression";break;case"this":R.add($.thisAsExports);j="this";N="expression";break;case"Object.defineProperty(exports)":R.add($.exports);j=E.exportsArgument;N="Object.defineProperty";break;case"Object.defineProperty(module.exports)":R.add($.module);j=`${E.moduleArgument}.exports`;N="Object.defineProperty";break;case"Object.defineProperty(this)":R.add($.thisAsExports);j="this";N="Object.defineProperty";break;default:throw new Error(`Unsupported base ${v}`)}return[N,j]}},70241:function(v,E,R){"use strict";const $=R(87056);const{UsageState:j}=R(13168);const N=R(43841);const{equals:q}=R(28087);const G=R(65764);const ie=R(67603);const{handleDependencyBase:ae}=R(99458);const ce=R(99809);const le=R(14666);const me=Symbol("CommonJsExportRequireDependency.ids");const _e={};class CommonJsExportRequireDependency extends ce{constructor(v,E,R,$,j,N,q){super(j);this.range=v;this.valueRange=E;this.base=R;this.names=$;this.ids=N;this.resultUsed=q;this.asiSafe=undefined}get type(){return"cjs export require"}couldAffectReferencingModule(){return $.TRANSITIVE}getIds(v){return v.getMeta(this)[me]||this.ids}setIds(v,E){v.getMeta(this)[me]=E}getReferencedExports(v,E){const R=this.getIds(v);const getFullResult=()=>{if(R.length===0){return $.EXPORTS_OBJECT_REFERENCED}else{return[{name:R,canMangle:false}]}};if(this.resultUsed)return getFullResult();let N=v.getExportsInfo(v.getParentModule(this));for(const v of this.names){const R=N.getReadOnlyExportInfo(v);const q=R.getUsed(E);if(q===j.Unused)return $.NO_EXPORTS_REFERENCED;if(q!==j.OnlyPropertiesUsed)return getFullResult();N=R.exportsInfo;if(!N)return getFullResult()}if(N.otherExportsInfo.getUsed(E)!==j.Unused){return getFullResult()}const q=[];for(const v of N.orderedExports){le(E,q,R.concat(v.name),v,false)}return q.map((v=>({name:v,canMangle:false})))}getExports(v){const E=this.getIds(v);if(this.names.length===1){const R=this.names[0];const $=v.getConnection(this);if(!$)return;return{exports:[{name:R,from:$,export:E.length===0?null:E,canMangle:!(R in _e)&&false}],dependencies:[$.module]}}else if(this.names.length>0){const v=this.names[0];return{exports:[{name:v,canMangle:!(v in _e)&&false}],dependencies:undefined}}else{const R=v.getConnection(this);if(!R)return;const $=this.getStarReexports(v,undefined,R.module);if($){return{exports:Array.from($.exports,(v=>({name:v,from:R,export:E.concat(v),canMangle:!(v in _e)&&false}))),dependencies:[R.module]}}else{return{exports:true,from:E.length===0?R:undefined,canMangle:false,dependencies:[R.module]}}}}getStarReexports(v,E,R=v.getModule(this)){let $=v.getExportsInfo(R);const N=this.getIds(v);if(N.length>0)$=$.getNestedExportsInfo(N);let q=v.getExportsInfo(v.getParentModule(this));if(this.names.length>0)q=q.getNestedExportsInfo(this.names);const G=$&&$.otherExportsInfo.provided===false;const ie=q&&q.otherExportsInfo.getUsed(E)===j.Unused;if(!G&&!ie){return}const ae=R.getExportsType(v,false)==="namespace";const ce=new Set;const le=new Set;if(ie){for(const v of q.orderedExports){const R=v.name;if(v.getUsed(E)===j.Unused)continue;if(R==="__esModule"&&ae){ce.add(R)}else if($){const v=$.getReadOnlyExportInfo(R);if(v.provided===false)continue;ce.add(R);if(v.provided===true)continue;le.add(R)}else{ce.add(R);le.add(R)}}}else if(G){for(const v of $.orderedExports){const R=v.name;if(v.provided===false)continue;if(q){const v=q.getReadOnlyExportInfo(R);if(v.getUsed(E)===j.Unused)continue}ce.add(R);if(v.provided===true)continue;le.add(R)}if(ae){ce.add("__esModule");le.delete("__esModule")}}return{exports:ce,checked:le}}serialize(v){const{write:E}=v;E(this.asiSafe);E(this.range);E(this.valueRange);E(this.base);E(this.names);E(this.ids);E(this.resultUsed);super.serialize(v)}deserialize(v){const{read:E}=v;this.asiSafe=E();this.range=E();this.valueRange=E();this.base=E();this.names=E();this.ids=E();this.resultUsed=E();super.deserialize(v)}}G(CommonJsExportRequireDependency,"webpack/lib/dependencies/CommonJsExportRequireDependency");CommonJsExportRequireDependency.Template=class CommonJsExportRequireDependencyTemplate extends ce.Template{apply(v,E,{module:R,runtimeTemplate:$,chunkGraph:j,moduleGraph:G,runtimeRequirements:ce,runtime:le}){const me=v;const _e=G.getExportsInfo(R).getUsedName(me.names,le);const[Ie,Me]=ae(me.base,R,ce);const Oe=G.getModule(me);let Te=$.moduleExports({module:Oe,chunkGraph:j,request:me.request,weak:me.weak,runtimeRequirements:ce});if(Oe){const v=me.getIds(G);const E=G.getExportsInfo(Oe).getUsedName(v,le);if(E){const R=q(E,v)?"":N.toNormalComment(ie(v))+" ";Te+=`${R}${ie(E)}`}}switch(Ie){case"expression":E.replace(me.range[0],me.range[1]-1,_e?`${Me}${ie(_e)} = ${Te}`:`/* unused reexport */ ${Te}`);return;case"Object.defineProperty":throw new Error("TODO");default:throw new Error("Unexpected type")}}};v.exports=CommonJsExportRequireDependency},65086:function(v,E,R){"use strict";const $=R(64768);const j=R(65764);const N=R(67603);const{handleDependencyBase:q}=R(99458);const G=R(91596);const ie={};class CommonJsExportsDependency extends G{constructor(v,E,R,$){super();this.range=v;this.valueRange=E;this.base=R;this.names=$}get type(){return"cjs exports"}getExports(v){const E=this.names[0];return{exports:[{name:E,canMangle:!(E in ie)}],dependencies:undefined}}serialize(v){const{write:E}=v;E(this.range);E(this.valueRange);E(this.base);E(this.names);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.valueRange=E();this.base=E();this.names=E();super.deserialize(v)}}j(CommonJsExportsDependency,"webpack/lib/dependencies/CommonJsExportsDependency");CommonJsExportsDependency.Template=class CommonJsExportsDependencyTemplate extends G.Template{apply(v,E,{module:R,moduleGraph:j,initFragments:G,runtimeRequirements:ie,runtime:ae}){const ce=v;const le=j.getExportsInfo(R).getUsedName(ce.names,ae);const[me,_e]=q(ce.base,R,ie);switch(me){case"expression":if(!le){G.push(new $("var __webpack_unused_export__;\n",$.STAGE_CONSTANTS,0,"__webpack_unused_export__"));E.replace(ce.range[0],ce.range[1]-1,"__webpack_unused_export__");return}E.replace(ce.range[0],ce.range[1]-1,`${_e}${N(le)}`);return;case"Object.defineProperty":if(!le){G.push(new $("var __webpack_unused_export__;\n",$.STAGE_CONSTANTS,0,"__webpack_unused_export__"));E.replace(ce.range[0],ce.valueRange[0]-1,"__webpack_unused_export__ = (");E.replace(ce.valueRange[1],ce.range[1]-1,")");return}E.replace(ce.range[0],ce.valueRange[0]-1,`Object.defineProperty(${_e}${N(le.slice(0,-1))}, ${JSON.stringify(le[le.length-1])}, (`);E.replace(ce.valueRange[1],ce.range[1]-1,"))");return}}};v.exports=CommonJsExportsDependency},26630:function(v,E,R){"use strict";const $=R(39201);const j=R(24014);const{evaluateToString:N}=R(97574);const q=R(67603);const G=R(70241);const ie=R(65086);const ae=R(27647);const ce=R(35485);const le=R(40699);const me=R(1569);const getValueOfPropertyDescription=v=>{if(v.type!=="ObjectExpression")return;for(const E of v.properties){if(E.computed)continue;const v=E.key;if(v.type!=="Identifier"||v.name!=="value")continue;return E.value}};const isTruthyLiteral=v=>{switch(v.type){case"Literal":return!!v.value;case"UnaryExpression":if(v.operator==="!")return isFalsyLiteral(v.argument)}return false};const isFalsyLiteral=v=>{switch(v.type){case"Literal":return!v.value;case"UnaryExpression":if(v.operator==="!")return isTruthyLiteral(v.argument)}return false};const parseRequireCall=(v,E)=>{const R=[];while(E.type==="MemberExpression"){if(E.object.type==="Super")return;if(!E.property)return;const v=E.property;if(E.computed){if(v.type!=="Literal")return;R.push(`${v.value}`)}else{if(v.type!=="Identifier")return;R.push(v.name)}E=E.object}if(E.type!=="CallExpression"||E.arguments.length!==1)return;const $=E.callee;if($.type!=="Identifier"||v.getVariableInfo($.name)!=="require"){return}const j=E.arguments[0];if(j.type==="SpreadElement")return;const N=v.evaluateExpression(j);return{argument:N,ids:R.reverse()}};class CommonJsExportsParserPlugin{constructor(v){this.moduleGraph=v}apply(v){const enableStructuredExports=()=>{ce.enable(v.state)};const checkNamespace=(E,R,$)=>{if(!ce.isEnabled(v.state))return;if(R.length>0&&R[0]==="__esModule"){if($&&isTruthyLiteral($)&&E){ce.setFlagged(v.state)}else{ce.setDynamic(v.state)}}};const bailout=E=>{ce.bailout(v.state);if(E)bailoutHint(E)};const bailoutHint=E=>{this.moduleGraph.getOptimizationBailout(v.state.module).push(`CommonJS bailout: ${E}`)};v.hooks.evaluateTypeof.for("module").tap("CommonJsExportsParserPlugin",N("object"));v.hooks.evaluateTypeof.for("exports").tap("CommonJsPlugin",N("object"));const handleAssignExport=(E,R,$)=>{if(le.isEnabled(v.state))return;const j=parseRequireCall(v,E.right);if(j&&j.argument.isString()&&($.length===0||$[0]!=="__esModule")){enableStructuredExports();if($.length===0)ce.setDynamic(v.state);const N=new G(E.range,null,R,$,j.argument.string,j.ids,!v.isStatementLevelExpression(E));N.loc=E.loc;N.optional=!!v.scope.inTry;v.state.module.addDependency(N);return true}if($.length===0)return;enableStructuredExports();const N=$;checkNamespace(v.statementPath.length===1&&v.isStatementLevelExpression(E),N,E.right);const q=new ie(E.left.range,null,R,N);q.loc=E.loc;v.state.module.addDependency(q);v.walkExpression(E.right);return true};v.hooks.assignMemberChain.for("exports").tap("CommonJsExportsParserPlugin",((v,E)=>handleAssignExport(v,"exports",E)));v.hooks.assignMemberChain.for("this").tap("CommonJsExportsParserPlugin",((E,R)=>{if(!v.scope.topLevelScope)return;return handleAssignExport(E,"this",R)}));v.hooks.assignMemberChain.for("module").tap("CommonJsExportsParserPlugin",((v,E)=>{if(E[0]!=="exports")return;return handleAssignExport(v,"module.exports",E.slice(1))}));v.hooks.call.for("Object.defineProperty").tap("CommonJsExportsParserPlugin",(E=>{const R=E;if(!v.isStatementLevelExpression(R))return;if(R.arguments.length!==3)return;if(R.arguments[0].type==="SpreadElement")return;if(R.arguments[1].type==="SpreadElement")return;if(R.arguments[2].type==="SpreadElement")return;const $=v.evaluateExpression(R.arguments[0]);if(!$.isIdentifier())return;if($.identifier!=="exports"&&$.identifier!=="module.exports"&&($.identifier!=="this"||!v.scope.topLevelScope)){return}const j=v.evaluateExpression(R.arguments[1]);const N=j.asString();if(typeof N!=="string")return;enableStructuredExports();const q=R.arguments[2];checkNamespace(v.statementPath.length===1,[N],getValueOfPropertyDescription(q));const G=new ie(R.range,R.arguments[2].range,`Object.defineProperty(${$.identifier})`,[N]);G.loc=R.loc;v.state.module.addDependency(G);v.walkExpression(R.arguments[2]);return true}));const handleAccessExport=(E,R,$,N=undefined)=>{if(le.isEnabled(v.state))return;if($.length===0){bailout(`${R} is used directly at ${j(E.loc)}`)}if(N&&$.length===1){bailoutHint(`${R}${q($)}(...) prevents optimization as ${R} is passed as call context at ${j(E.loc)}`)}const G=new ae(E.range,R,$,!!N);G.loc=E.loc;v.state.module.addDependency(G);if(N){v.walkExpressions(N.arguments)}return true};v.hooks.callMemberChain.for("exports").tap("CommonJsExportsParserPlugin",((v,E)=>handleAccessExport(v.callee,"exports",E,v)));v.hooks.expressionMemberChain.for("exports").tap("CommonJsExportsParserPlugin",((v,E)=>handleAccessExport(v,"exports",E)));v.hooks.expression.for("exports").tap("CommonJsExportsParserPlugin",(v=>handleAccessExport(v,"exports",[])));v.hooks.callMemberChain.for("module").tap("CommonJsExportsParserPlugin",((v,E)=>{if(E[0]!=="exports")return;return handleAccessExport(v.callee,"module.exports",E.slice(1),v)}));v.hooks.expressionMemberChain.for("module").tap("CommonJsExportsParserPlugin",((v,E)=>{if(E[0]!=="exports")return;return handleAccessExport(v,"module.exports",E.slice(1))}));v.hooks.expression.for("module.exports").tap("CommonJsExportsParserPlugin",(v=>handleAccessExport(v,"module.exports",[])));v.hooks.callMemberChain.for("this").tap("CommonJsExportsParserPlugin",((E,R)=>{if(!v.scope.topLevelScope)return;return handleAccessExport(E.callee,"this",R,E)}));v.hooks.expressionMemberChain.for("this").tap("CommonJsExportsParserPlugin",((E,R)=>{if(!v.scope.topLevelScope)return;return handleAccessExport(E,"this",R)}));v.hooks.expression.for("this").tap("CommonJsExportsParserPlugin",(E=>{if(!v.scope.topLevelScope)return;return handleAccessExport(E,"this",[])}));v.hooks.expression.for("module").tap("CommonJsPlugin",(E=>{bailout();const R=le.isEnabled(v.state);const j=new me(R?$.harmonyModuleDecorator:$.nodeModuleDecorator,!R);j.loc=E.loc;v.state.module.addDependency(j);return true}))}}v.exports=CommonJsExportsParserPlugin},96107:function(v,E,R){"use strict";const $=R(43841);const{equals:j}=R(28087);const N=R(65764);const q=R(67603);const G=R(99809);class CommonJsFullRequireDependency extends G{constructor(v,E,R){super(v);this.range=E;this.names=R;this.call=false;this.asiSafe=undefined}getReferencedExports(v,E){if(this.call){const E=v.getModule(this);if(!E||E.getExportsType(v,false)!=="namespace"){return[this.names.slice(0,-1)]}}return[this.names]}serialize(v){const{write:E}=v;E(this.names);E(this.call);E(this.asiSafe);super.serialize(v)}deserialize(v){const{read:E}=v;this.names=E();this.call=E();this.asiSafe=E();super.deserialize(v)}get type(){return"cjs full require"}get category(){return"commonjs"}}CommonJsFullRequireDependency.Template=class CommonJsFullRequireDependencyTemplate extends G.Template{apply(v,E,{module:R,runtimeTemplate:N,moduleGraph:G,chunkGraph:ie,runtimeRequirements:ae,runtime:ce,initFragments:le}){const me=v;if(!me.range)return;const _e=G.getModule(me);let Ie=N.moduleExports({module:_e,chunkGraph:ie,request:me.request,weak:me.weak,runtimeRequirements:ae});if(_e){const v=me.names;const E=G.getExportsInfo(_e).getUsedName(v,ce);if(E){const R=j(E,v)?"":$.toNormalComment(q(v))+" ";const N=`${R}${q(E)}`;Ie=me.asiSafe===true?`(${Ie}${N})`:`${Ie}${N}`}}E.replace(me.range[0],me.range[1]-1,Ie)}};N(CommonJsFullRequireDependency,"webpack/lib/dependencies/CommonJsFullRequireDependency");v.exports=CommonJsFullRequireDependency},75478:function(v,E,R){"use strict";const{fileURLToPath:$}=R(57310);const j=R(54437);const N=R(39201);const q=R(17623);const G=R(27154);const ie=R(94844);const{evaluateToIdentifier:ae,evaluateToString:ce,expressionIsUnsupported:le,toConstantDependency:me}=R(97574);const _e=R(96107);const Ie=R(85190);const Me=R(90345);const Oe=R(14367);const Te=R(32556);const Ne=R(81600);const{getLocalModule:Be}=R(59081);const Le=R(61820);const qe=R(99703);const Ue=R(57485);const Ge=R(2254);const He=Symbol("createRequire");const We=Symbol("createRequire()");class CommonJsImportsParserPlugin{constructor(v){this.options=v}apply(v){const E=this.options;const getContext=()=>{if(v.currentTagData){const{context:E}=v.currentTagData;return E}};const tapRequireExpression=(E,R)=>{v.hooks.typeof.for(E).tap("CommonJsImportsParserPlugin",me(v,JSON.stringify("function")));v.hooks.evaluateTypeof.for(E).tap("CommonJsImportsParserPlugin",ce("function"));v.hooks.evaluateIdentifier.for(E).tap("CommonJsImportsParserPlugin",ae(E,"require",R,true))};const tapRequireExpressionTag=E=>{v.hooks.typeof.for(E).tap("CommonJsImportsParserPlugin",me(v,JSON.stringify("function")));v.hooks.evaluateTypeof.for(E).tap("CommonJsImportsParserPlugin",ce("function"))};tapRequireExpression("require",(()=>[]));tapRequireExpression("require.resolve",(()=>["resolve"]));tapRequireExpression("require.resolveWeak",(()=>["resolveWeak"]));v.hooks.assign.for("require").tap("CommonJsImportsParserPlugin",(E=>{const R=new Oe("var require;",0);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.expression.for("require.main").tap("CommonJsImportsParserPlugin",le(v,"require.main is not supported by webpack."));v.hooks.call.for("require.main.require").tap("CommonJsImportsParserPlugin",le(v,"require.main.require is not supported by webpack."));v.hooks.expression.for("module.parent.require").tap("CommonJsImportsParserPlugin",le(v,"module.parent.require is not supported by webpack."));v.hooks.call.for("module.parent.require").tap("CommonJsImportsParserPlugin",le(v,"module.parent.require is not supported by webpack."));const defineUndefined=E=>{const R=new Oe("undefined",E.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return false};v.hooks.canRename.for("require").tap("CommonJsImportsParserPlugin",(()=>true));v.hooks.rename.for("require").tap("CommonJsImportsParserPlugin",defineUndefined);const R=me(v,N.moduleCache,[N.moduleCache,N.moduleId,N.moduleLoaded]);v.hooks.expression.for("require.cache").tap("CommonJsImportsParserPlugin",R);const requireAsExpressionHandler=R=>{const $=new Ie({request:E.unknownContextRequest,recursive:E.unknownContextRecursive,regExp:E.unknownContextRegExp,mode:"sync"},R.range,undefined,v.scope.inShorthand,getContext());$.critical=E.unknownContextCritical&&"require function is used in a way in which dependencies cannot be statically extracted";$.loc=R.loc;$.optional=!!v.scope.inTry;v.state.current.addDependency($);return true};v.hooks.expression.for("require").tap("CommonJsImportsParserPlugin",requireAsExpressionHandler);const processRequireItem=(E,R)=>{if(R.isString()){const $=new Me(R.string,R.range,getContext());$.loc=E.loc;$.optional=!!v.scope.inTry;v.state.current.addDependency($);return true}};const processRequireContext=(R,$)=>{const j=Te.create(Ie,R.range,$,R,E,{category:"commonjs"},v,undefined,getContext());if(!j)return;j.loc=R.loc;j.optional=!!v.scope.inTry;v.state.current.addDependency(j);return true};const createRequireHandler=R=>$=>{if(E.commonjsMagicComments){const{options:E,errors:R}=v.parseCommentOptions($.range);if(R){for(const E of R){const{comment:R}=E;v.state.module.addWarning(new j(`Compilation error while processing magic comment(-s): /*${R.value}*/: ${E.message}`,R.loc))}}if(E){if(E.webpackIgnore!==undefined){if(typeof E.webpackIgnore!=="boolean"){v.state.module.addWarning(new q(`\`webpackIgnore\` expected a boolean, but received: ${E.webpackIgnore}.`,$.loc))}else{if(E.webpackIgnore){return true}}}}}if($.arguments.length!==1)return;let N;const G=v.evaluateExpression($.arguments[0]);if(G.isConditional()){let E=false;for(const v of G.options){const R=processRequireItem($,v);if(R===undefined){E=true}}if(!E){const E=new Le($.callee.range);E.loc=$.loc;v.state.module.addPresentationalDependency(E);return true}}if(G.isString()&&(N=Be(v.state,G.string))){N.flagUsed();const E=new Ne(N,$.range,R);E.loc=$.loc;v.state.module.addPresentationalDependency(E);return true}else{const E=processRequireItem($,G);if(E===undefined){processRequireContext($,G)}else{const E=new Le($.callee.range);E.loc=$.loc;v.state.module.addPresentationalDependency(E)}return true}};v.hooks.call.for("require").tap("CommonJsImportsParserPlugin",createRequireHandler(false));v.hooks.new.for("require").tap("CommonJsImportsParserPlugin",createRequireHandler(true));v.hooks.call.for("module.require").tap("CommonJsImportsParserPlugin",createRequireHandler(false));v.hooks.new.for("module.require").tap("CommonJsImportsParserPlugin",createRequireHandler(true));const chainHandler=(E,R,$,j)=>{if($.arguments.length!==1)return;const N=v.evaluateExpression($.arguments[0]);if(N.isString()&&!Be(v.state,N.string)){const R=new _e(N.string,E.range,j);R.asiSafe=!v.isAsiPosition(E.range[0]);R.optional=!!v.scope.inTry;R.loc=E.loc;v.state.current.addDependency(R);return true}};const callChainHandler=(E,R,$,j)=>{if($.arguments.length!==1)return;const N=v.evaluateExpression($.arguments[0]);if(N.isString()&&!Be(v.state,N.string)){const R=new _e(N.string,E.callee.range,j);R.call=true;R.asiSafe=!v.isAsiPosition(E.range[0]);R.optional=!!v.scope.inTry;R.loc=E.callee.loc;v.state.current.addDependency(R);v.walkExpressions(E.arguments);return true}};v.hooks.memberChainOfCallMemberChain.for("require").tap("CommonJsImportsParserPlugin",chainHandler);v.hooks.memberChainOfCallMemberChain.for("module.require").tap("CommonJsImportsParserPlugin",chainHandler);v.hooks.callMemberChainOfCallMemberChain.for("require").tap("CommonJsImportsParserPlugin",callChainHandler);v.hooks.callMemberChainOfCallMemberChain.for("module.require").tap("CommonJsImportsParserPlugin",callChainHandler);const processResolve=(E,R)=>{if(E.arguments.length!==1)return;const $=v.evaluateExpression(E.arguments[0]);if($.isConditional()){for(const v of $.options){const $=processResolveItem(E,v,R);if($===undefined){processResolveContext(E,v,R)}}const j=new Ge(E.callee.range);j.loc=E.loc;v.state.module.addPresentationalDependency(j);return true}else{const j=processResolveItem(E,$,R);if(j===undefined){processResolveContext(E,$,R)}const N=new Ge(E.callee.range);N.loc=E.loc;v.state.module.addPresentationalDependency(N);return true}};const processResolveItem=(E,R,$)=>{if(R.isString()){const j=new Ue(R.string,R.range,getContext());j.loc=E.loc;j.optional=!!v.scope.inTry;j.weak=$;v.state.current.addDependency(j);return true}};const processResolveContext=(R,$,j)=>{const N=Te.create(qe,$.range,$,R,E,{category:"commonjs",mode:j?"weak":"sync"},v,getContext());if(!N)return;N.loc=R.loc;N.optional=!!v.scope.inTry;v.state.current.addDependency(N);return true};v.hooks.call.for("require.resolve").tap("CommonJsImportsParserPlugin",(v=>processResolve(v,false)));v.hooks.call.for("require.resolveWeak").tap("CommonJsImportsParserPlugin",(v=>processResolve(v,true)));if(!E.createRequire)return;let Qe;let Je;if(E.createRequire===true){Qe="module";Je="createRequire"}else{const v=/^(.*) from (.*)$/.exec(E.createRequire);if(v){[,Je,Qe]=v}if(!Je||!Qe){const v=new G(`Parsing javascript parser option "createRequire" failed, got ${JSON.stringify(E.createRequire)}`);v.details='Expected string in format "createRequire from module", where "createRequire" is specifier name and "module" name of the module';throw v}}tapRequireExpressionTag(We);tapRequireExpressionTag(He);v.hooks.evaluateCallExpression.for(He).tap("CommonJsImportsParserPlugin",(E=>{const R=parseCreateRequireArguments(E);if(R===undefined)return;const $=v.evaluatedVariable({tag:We,data:{context:R},next:undefined});return(new ie).setIdentifier($,$,(()=>[])).setSideEffects(false).setRange(E.range)}));v.hooks.unhandledExpressionMemberChain.for(We).tap("CommonJsImportsParserPlugin",((E,R)=>le(v,`createRequire().${R.join(".")} is not supported by webpack.`)(E)));v.hooks.canRename.for(We).tap("CommonJsImportsParserPlugin",(()=>true));v.hooks.canRename.for(He).tap("CommonJsImportsParserPlugin",(()=>true));v.hooks.rename.for(He).tap("CommonJsImportsParserPlugin",defineUndefined);v.hooks.expression.for(We).tap("CommonJsImportsParserPlugin",requireAsExpressionHandler);v.hooks.call.for(We).tap("CommonJsImportsParserPlugin",createRequireHandler(false));const parseCreateRequireArguments=E=>{const R=E.arguments;if(R.length!==1){const R=new G("module.createRequire supports only one argument.");R.loc=E.loc;v.state.module.addWarning(R);return}const j=R[0];const N=v.evaluateExpression(j);if(!N.isString()){const E=new G("module.createRequire failed parsing argument.");E.loc=j.loc;v.state.module.addWarning(E);return}const q=N.string.startsWith("file://")?$(N.string):N.string;return q.slice(0,q.lastIndexOf(q.startsWith("/")?"/":"\\"))};v.hooks.import.tap({name:"CommonJsImportsParserPlugin",stage:-10},((E,R)=>{if(R!==Qe||E.specifiers.length!==1||E.specifiers[0].type!=="ImportSpecifier"||E.specifiers[0].imported.type!=="Identifier"||E.specifiers[0].imported.name!==Je)return;const $=new Oe(v.isAsiPosition(E.range[0])?";":"",E.range);$.loc=E.loc;v.state.module.addPresentationalDependency($);v.unsetAsiPosition(E.range[1]);return true}));v.hooks.importSpecifier.tap({name:"CommonJsImportsParserPlugin",stage:-10},((E,R,$,j)=>{if(R!==Qe||$!==Je)return;v.tagVariable(j,He);return true}));v.hooks.preDeclarator.tap("CommonJsImportsParserPlugin",(E=>{if(E.id.type!=="Identifier"||!E.init||E.init.type!=="CallExpression"||E.init.callee.type!=="Identifier")return;const R=v.getVariableInfo(E.init.callee.name);if(R&&R.tagInfo&&R.tagInfo.tag===He){const R=parseCreateRequireArguments(E.init);if(R===undefined)return;v.tagVariable(E.id.name,We,{name:E.id.name,context:R});return true}}));v.hooks.memberChainOfCallMemberChain.for(He).tap("CommonJsImportsParserPlugin",((v,E,$,j)=>{if(E.length!==0||j.length!==1||j[0]!=="cache")return;const N=parseCreateRequireArguments($);if(N===undefined)return;return R(v)}));v.hooks.callMemberChainOfCallMemberChain.for(He).tap("CommonJsImportsParserPlugin",((v,E,R,$)=>{if(E.length!==0||$.length!==1||$[0]!=="resolve")return;return processResolve(v,false)}));v.hooks.expressionMemberChain.for(We).tap("CommonJsImportsParserPlugin",((v,E)=>{if(E.length===1&&E[0]==="cache"){return R(v)}}));v.hooks.callMemberChain.for(We).tap("CommonJsImportsParserPlugin",((v,E)=>{if(E.length===1&&E[0]==="resolve"){return processResolve(v,false)}}));v.hooks.call.for(He).tap("CommonJsImportsParserPlugin",(E=>{const R=new Oe("/* createRequire() */ undefined",E.range);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}))}}v.exports=CommonJsImportsParserPlugin},93075:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(75193);const q=R(43841);const G=R(65086);const ie=R(96107);const ae=R(85190);const ce=R(90345);const le=R(27647);const me=R(1569);const _e=R(61820);const Ie=R(99703);const Me=R(57485);const Oe=R(2254);const Te=R(12446);const Ne=R(26630);const Be=R(75478);const{evaluateToIdentifier:Le,toConstantDependency:qe}=R(97574);const Ue=R(70241);class CommonJsPlugin{apply(v){v.hooks.compilation.tap("CommonJsPlugin",((v,{contextModuleFactory:E,normalModuleFactory:R})=>{v.dependencyFactories.set(ce,R);v.dependencyTemplates.set(ce,new ce.Template);v.dependencyFactories.set(ie,R);v.dependencyTemplates.set(ie,new ie.Template);v.dependencyFactories.set(ae,E);v.dependencyTemplates.set(ae,new ae.Template);v.dependencyFactories.set(Me,R);v.dependencyTemplates.set(Me,new Me.Template);v.dependencyFactories.set(Ie,E);v.dependencyTemplates.set(Ie,new Ie.Template);v.dependencyTemplates.set(Oe,new Oe.Template);v.dependencyTemplates.set(_e,new _e.Template);v.dependencyTemplates.set(G,new G.Template);v.dependencyFactories.set(Ue,R);v.dependencyTemplates.set(Ue,new Ue.Template);const j=new N(v.moduleGraph);v.dependencyFactories.set(le,j);v.dependencyTemplates.set(le,new le.Template);v.dependencyFactories.set(me,j);v.dependencyTemplates.set(me,new me.Template);v.hooks.runtimeRequirementInModule.for($.harmonyModuleDecorator).tap("CommonJsPlugin",((v,E)=>{E.add($.module);E.add($.requireScope)}));v.hooks.runtimeRequirementInModule.for($.nodeModuleDecorator).tap("CommonJsPlugin",((v,E)=>{E.add($.module);E.add($.requireScope)}));v.hooks.runtimeRequirementInTree.for($.harmonyModuleDecorator).tap("CommonJsPlugin",((E,R)=>{v.addRuntimeModule(E,new HarmonyModuleDecoratorRuntimeModule)}));v.hooks.runtimeRequirementInTree.for($.nodeModuleDecorator).tap("CommonJsPlugin",((E,R)=>{v.addRuntimeModule(E,new NodeModuleDecoratorRuntimeModule)}));const handler=(E,R)=>{if(R.commonjs!==undefined&&!R.commonjs)return;E.hooks.typeof.for("module").tap("CommonJsPlugin",qe(E,JSON.stringify("object")));E.hooks.expression.for("require.main").tap("CommonJsPlugin",qe(E,`${$.moduleCache}[${$.entryModuleId}]`,[$.moduleCache,$.entryModuleId]));E.hooks.expression.for("module.loaded").tap("CommonJsPlugin",(v=>{E.state.module.buildInfo.moduleConcatenationBailout="module.loaded";const R=new Te([$.moduleLoaded]);R.loc=v.loc;E.state.module.addPresentationalDependency(R);return true}));E.hooks.expression.for("module.id").tap("CommonJsPlugin",(v=>{E.state.module.buildInfo.moduleConcatenationBailout="module.id";const R=new Te([$.moduleId]);R.loc=v.loc;E.state.module.addPresentationalDependency(R);return true}));E.hooks.evaluateIdentifier.for("module.hot").tap("CommonJsPlugin",Le("module.hot","module",(()=>["hot"]),null));new Be(R).apply(E);new Ne(v.moduleGraph).apply(E)};R.hooks.parser.for("javascript/auto").tap("CommonJsPlugin",handler);R.hooks.parser.for("javascript/dynamic").tap("CommonJsPlugin",handler)}))}}class HarmonyModuleDecoratorRuntimeModule extends j{constructor(){super("harmony module decorator")}generate(){const{runtimeTemplate:v}=this.compilation;return q.asString([`${$.harmonyModuleDecorator} = ${v.basicFunction("module",["module = Object.create(module);","if (!module.children) module.children = [];","Object.defineProperty(module, 'exports', {",q.indent(["enumerable: true,",`set: ${v.basicFunction("",["throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);"])}`]),"});","return module;"])};`])}}class NodeModuleDecoratorRuntimeModule extends j{constructor(){super("node module decorator")}generate(){const{runtimeTemplate:v}=this.compilation;return q.asString([`${$.nodeModuleDecorator} = ${v.basicFunction("module",["module.paths = [];","if (!module.children) module.children = [];","return module;"])};`])}}v.exports=CommonJsPlugin},85190:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);const N=R(5160);class CommonJsRequireContextDependency extends j{constructor(v,E,R,$,j){super(v,j);this.range=E;this.valueRange=R;this.inShorthand=$}get type(){return"cjs require context"}serialize(v){const{write:E}=v;E(this.range);E(this.valueRange);E(this.inShorthand);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.valueRange=E();this.inShorthand=E();super.deserialize(v)}}$(CommonJsRequireContextDependency,"webpack/lib/dependencies/CommonJsRequireContextDependency");CommonJsRequireContextDependency.Template=N;v.exports=CommonJsRequireContextDependency},90345:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(29355);class CommonJsRequireDependency extends j{constructor(v,E,R){super(v);this.range=E;this._context=R}get type(){return"cjs require"}get category(){return"commonjs"}}CommonJsRequireDependency.Template=N;$(CommonJsRequireDependency,"webpack/lib/dependencies/CommonJsRequireDependency");v.exports=CommonJsRequireDependency},27647:function(v,E,R){"use strict";const $=R(39201);const{equals:j}=R(28087);const N=R(65764);const q=R(67603);const G=R(91596);class CommonJsSelfReferenceDependency extends G{constructor(v,E,R,$){super();this.range=v;this.base=E;this.names=R;this.call=$}get type(){return"cjs self exports reference"}get category(){return"self"}getResourceIdentifier(){return`self`}getReferencedExports(v,E){return[this.call?this.names.slice(0,-1):this.names]}serialize(v){const{write:E}=v;E(this.range);E(this.base);E(this.names);E(this.call);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.base=E();this.names=E();this.call=E();super.deserialize(v)}}N(CommonJsSelfReferenceDependency,"webpack/lib/dependencies/CommonJsSelfReferenceDependency");CommonJsSelfReferenceDependency.Template=class CommonJsSelfReferenceDependencyTemplate extends G.Template{apply(v,E,{module:R,moduleGraph:N,runtime:G,runtimeRequirements:ie}){const ae=v;let ce;if(ae.names.length===0){ce=ae.names}else{ce=N.getExportsInfo(R).getUsedName(ae.names,G)}if(!ce){throw new Error("Self-reference dependency has unused export name: This should not happen")}let le=undefined;switch(ae.base){case"exports":ie.add($.exports);le=R.exportsArgument;break;case"module.exports":ie.add($.module);le=`${R.moduleArgument}.exports`;break;case"this":ie.add($.thisAsExports);le="this";break;default:throw new Error(`Unsupported base ${ae.base}`)}if(le===ae.base&&j(ce,ae.names)){return}E.replace(ae.range[0],ae.range[1]-1,`${le}${q(ce)}`)}};v.exports=CommonJsSelfReferenceDependency},14367:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class ConstDependency extends j{constructor(v,E,R){super();this.expression=v;this.range=E;this.runtimeRequirements=R?new Set(R):null;this._hashUpdate=undefined}updateHash(v,E){if(this._hashUpdate===undefined){let v=""+this.range+"|"+this.expression;if(this.runtimeRequirements){for(const E of this.runtimeRequirements){v+="|";v+=E}}this._hashUpdate=v}v.update(this._hashUpdate)}getModuleEvaluationSideEffectsState(v){return false}serialize(v){const{write:E}=v;E(this.expression);E(this.range);E(this.runtimeRequirements);super.serialize(v)}deserialize(v){const{read:E}=v;this.expression=E();this.range=E();this.runtimeRequirements=E();super.deserialize(v)}}$(ConstDependency,"webpack/lib/dependencies/ConstDependency");ConstDependency.Template=class ConstDependencyTemplate extends j.Template{apply(v,E,R){const $=v;if($.runtimeRequirements){for(const v of $.runtimeRequirements){R.runtimeRequirements.add(v)}}if(typeof $.range==="number"){E.insert($.range,$.expression);return}E.replace($.range[0],$.range[1]-1,$.expression)}};v.exports=ConstDependency},22429:function(v,E,R){"use strict";const $=R(87056);const j=R(94086);const N=R(65764);const q=R(61374);const G=q((()=>R(34219)));const regExpToString=v=>v?v+"":"";class ContextDependency extends ${constructor(v,E){super();this.options=v;this.userRequest=this.options&&this.options.request;this.critical=false;this.hadGlobalOrStickyRegExp=false;if(this.options&&(this.options.regExp.global||this.options.regExp.sticky)){this.options={...this.options,regExp:null};this.hadGlobalOrStickyRegExp=true}this.request=undefined;this.range=undefined;this.valueRange=undefined;this.inShorthand=undefined;this.replaces=undefined;this._requestContext=E}getContext(){return this._requestContext}get category(){return"commonjs"}couldAffectReferencingModule(){return true}getResourceIdentifier(){return`context${this._requestContext||""}|ctx request${this.options.request} ${this.options.recursive} `+`${regExpToString(this.options.regExp)} ${regExpToString(this.options.include)} ${regExpToString(this.options.exclude)} `+`${this.options.mode} ${this.options.chunkName} `+`${JSON.stringify(this.options.groupOptions)}`}getWarnings(v){let E=super.getWarnings(v);if(this.critical){if(!E)E=[];const v=G();E.push(new v(this.critical))}if(this.hadGlobalOrStickyRegExp){if(!E)E=[];const v=G();E.push(new v("Contexts can't use RegExps with the 'g' or 'y' flags."))}return E}serialize(v){const{write:E}=v;E(this.options);E(this.userRequest);E(this.critical);E(this.hadGlobalOrStickyRegExp);E(this.request);E(this._requestContext);E(this.range);E(this.valueRange);E(this.prepend);E(this.replaces);super.serialize(v)}deserialize(v){const{read:E}=v;this.options=E();this.userRequest=E();this.critical=E();this.hadGlobalOrStickyRegExp=E();this.request=E();this._requestContext=E();this.range=E();this.valueRange=E();this.prepend=E();this.replaces=E();super.deserialize(v)}}N(ContextDependency,"webpack/lib/dependencies/ContextDependency");ContextDependency.Template=j;v.exports=ContextDependency},32556:function(v,E,R){"use strict";const{parseResource:$}=R(20162);const quoteMeta=v=>v.replace(/[-[\]\\/{}()*+?.^$|]/g,"\\$&");const splitContextFromPrefix=v=>{const E=v.lastIndexOf("/");let R=".";if(E>=0){R=v.slice(0,E);v=`.${v.slice(E)}`}return{context:R,prefix:v}};E.create=(v,E,R,j,N,q,G,...ie)=>{if(R.isTemplateString()){let ae=R.quasis[0].string;let ce=R.quasis.length>1?R.quasis[R.quasis.length-1].string:"";const le=R.range;const{context:me,prefix:_e}=splitContextFromPrefix(ae);const{path:Ie,query:Me,fragment:Oe}=$(ce,G);const Te=R.quasis.slice(1,R.quasis.length-1);const Ne=N.wrappedContextRegExp.source+Te.map((v=>quoteMeta(v.string)+N.wrappedContextRegExp.source)).join("");const Be=new RegExp(`^${quoteMeta(_e)}${Ne}${quoteMeta(Ie)}$`);const Le=new v({request:me+Me+Oe,recursive:N.wrappedContextRecursive,regExp:Be,mode:"sync",...q},E,le,...ie);Le.loc=j.loc;const qe=[];R.parts.forEach(((v,E)=>{if(E%2===0){let $=v.range;let j=v.string;if(R.templateStringKind==="cooked"){j=JSON.stringify(j);j=j.slice(1,j.length-1)}if(E===0){j=_e;$=[R.range[0],v.range[1]];j=(R.templateStringKind==="cooked"?"`":"String.raw`")+j}else if(E===R.parts.length-1){j=Ie;$=[v.range[0],R.range[1]];j=j+"`"}else if(v.expression&&v.expression.type==="TemplateElement"&&v.expression.value.raw===j){return}qe.push({range:$,value:j})}else{G.walkExpression(v.expression)}}));Le.replaces=qe;Le.critical=N.wrappedContextCritical&&"a part of the request of a dependency is an expression";return Le}else if(R.isWrapped()&&(R.prefix&&R.prefix.isString()||R.postfix&&R.postfix.isString())){let ae=R.prefix&&R.prefix.isString()?R.prefix.string:"";let ce=R.postfix&&R.postfix.isString()?R.postfix.string:"";const le=R.prefix&&R.prefix.isString()?R.prefix.range:null;const me=R.postfix&&R.postfix.isString()?R.postfix.range:null;const _e=R.range;const{context:Ie,prefix:Me}=splitContextFromPrefix(ae);const{path:Oe,query:Te,fragment:Ne}=$(ce,G);const Be=new RegExp(`^${quoteMeta(Me)}${N.wrappedContextRegExp.source}${quoteMeta(Oe)}$`);const Le=new v({request:Ie+Te+Ne,recursive:N.wrappedContextRecursive,regExp:Be,mode:"sync",...q},E,_e,...ie);Le.loc=j.loc;const qe=[];if(le){qe.push({range:le,value:JSON.stringify(Me)})}if(me){qe.push({range:me,value:JSON.stringify(Oe)})}Le.replaces=qe;Le.critical=N.wrappedContextCritical&&"a part of the request of a dependency is an expression";if(G&&R.wrappedInnerExpressions){for(const v of R.wrappedInnerExpressions){if(v.expression)G.walkExpression(v.expression)}}return Le}else{const $=new v({request:N.exprContextRequest,recursive:N.exprContextRecursive,regExp:N.exprContextRegExp,mode:"sync",...q},E,R.range,...ie);$.loc=j.loc;$.critical=N.exprContextCritical&&"the request of a dependency is an expression";G.walkExpression(R.expression);return $}}},44967:function(v,E,R){"use strict";const $=R(22429);class ContextDependencyTemplateAsId extends $.Template{apply(v,E,{runtimeTemplate:R,moduleGraph:$,chunkGraph:j,runtimeRequirements:N}){const q=v;const G=R.moduleExports({module:$.getModule(q),chunkGraph:j,request:q.request,weak:q.weak,runtimeRequirements:N});if($.getModule(q)){if(q.valueRange){if(Array.isArray(q.replaces)){for(let v=0;v({name:v,canMangle:false}))):$.EXPORTS_OBJECT_REFERENCED}serialize(v){const{write:E}=v;E(this._typePrefix);E(this._category);E(this.referencedExports);super.serialize(v)}deserialize(v){const{read:E}=v;this._typePrefix=E();this._category=E();this.referencedExports=E();super.deserialize(v)}}j(ContextElementDependency,"webpack/lib/dependencies/ContextElementDependency");v.exports=ContextElementDependency},37857:function(v,E,R){"use strict";const $=R(39201);const j=R(65764);const N=R(91596);class CreateScriptUrlDependency extends N{constructor(v){super();this.range=v}get type(){return"create script url"}serialize(v){const{write:E}=v;E(this.range);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();super.deserialize(v)}}CreateScriptUrlDependency.Template=class CreateScriptUrlDependencyTemplate extends N.Template{apply(v,E,{runtimeRequirements:R}){const j=v;R.add($.createScriptUrl);E.insert(j.range[0],`${$.createScriptUrl}(`);E.insert(j.range[1],")")}};j(CreateScriptUrlDependency,"webpack/lib/dependencies/CreateScriptUrlDependency");v.exports=CreateScriptUrlDependency},34219:function(v,E,R){"use strict";const $=R(27154);const j=R(65764);class CriticalDependencyWarning extends ${constructor(v){super();this.name="CriticalDependencyWarning";this.message="Critical dependency: "+v}}j(CriticalDependencyWarning,"webpack/lib/dependencies/CriticalDependencyWarning");v.exports=CriticalDependencyWarning},12778:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class CssExportDependency extends j{constructor(v,E){super();this.name=v;this.value=E}get type(){return"css :export"}getExports(v){const E=this.name;return{exports:[{name:E,canMangle:true}],dependencies:undefined}}serialize(v){const{write:E}=v;E(this.name);E(this.value);super.serialize(v)}deserialize(v){const{read:E}=v;this.name=E();this.value=E();super.deserialize(v)}}CssExportDependency.Template=class CssExportDependencyTemplate extends j.Template{apply(v,E,{cssExports:R}){const $=v;R.set($.name,$.value)}};$(CssExportDependency,"webpack/lib/dependencies/CssExportDependency");v.exports=CssExportDependency},2951:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);class CssImportDependency extends j{constructor(v,E,R,$){super(v);this.range=E;this.supports=R;this.media=$}get type(){return"css @import"}get category(){return"css-import"}createIgnoredModule(v){return null}}CssImportDependency.Template=class CssImportDependencyTemplate extends j.Template{apply(v,E,R){const $=v;E.replace($.range[0],$.range[1]-1,"")}};$(CssImportDependency,"webpack/lib/dependencies/CssImportDependency");v.exports=CssImportDependency},75689:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class CssLocalIdentifierDependency extends j{constructor(v,E,R=""){super();this.name=v;this.range=E;this.prefix=R}get type(){return"css local identifier"}getExports(v){const E=this.name;return{exports:[{name:E,canMangle:true}],dependencies:undefined}}serialize(v){const{write:E}=v;E(this.name);E(this.range);E(this.prefix);super.serialize(v)}deserialize(v){const{read:E}=v;this.name=E();this.range=E();this.prefix=E();super.deserialize(v)}}const escapeCssIdentifier=(v,E)=>{const R=`${v}`.replace(/[^a-zA-Z0-9_\u0081-\uffff-]/g,(v=>`\\${v}`));return!E&&/^(?!--)[0-9-]/.test(R)?`_${R}`:R};CssLocalIdentifierDependency.Template=class CssLocalIdentifierDependencyTemplate extends j.Template{apply(v,E,{module:R,moduleGraph:$,chunkGraph:j,runtime:N,runtimeTemplate:q,cssExports:G}){const ie=v;const ae=$.getExportInfo(R,ie.name).getUsedName(ie.name,N);const ce=j.getModuleId(R);const le=ie.prefix+(q.outputOptions.uniqueName?q.outputOptions.uniqueName+"-":"")+(ae?ce+"-"+ae:"-");E.replace(ie.range[0],ie.range[1]-1,escapeCssIdentifier(le,ie.prefix));if(ae)G.set(ae,le)}};$(CssLocalIdentifierDependency,"webpack/lib/dependencies/CssLocalIdentifierDependency");v.exports=CssLocalIdentifierDependency},24769:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);const N=R(75689);class CssSelfLocalIdentifierDependency extends N{constructor(v,E,R="",$=undefined){super(v,E,R);this.declaredSet=$}get type(){return"css self local identifier"}get category(){return"self"}getResourceIdentifier(){return`self`}getExports(v){if(this.declaredSet&&!this.declaredSet.has(this.name))return;return super.getExports(v)}getReferencedExports(v,E){if(this.declaredSet&&!this.declaredSet.has(this.name))return $.NO_EXPORTS_REFERENCED;return[[this.name]]}serialize(v){const{write:E}=v;E(this.declaredSet);super.serialize(v)}deserialize(v){const{read:E}=v;this.declaredSet=E();super.deserialize(v)}}CssSelfLocalIdentifierDependency.Template=class CssSelfLocalIdentifierDependencyTemplate extends N.Template{apply(v,E,R){const $=v;if($.declaredSet&&!$.declaredSet.has($.name))return;super.apply(v,E,R)}};j(CssSelfLocalIdentifierDependency,"webpack/lib/dependencies/CssSelfLocalIdentifierDependency");v.exports=CssSelfLocalIdentifierDependency},75178:function(v,E,R){"use strict";const $=R(65764);const j=R(61374);const N=R(99809);const q=j((()=>R(66788)));class CssUrlDependency extends N{constructor(v,E,R){super(v);this.range=E;this.cssFunctionKind=R}get type(){return"css url()"}get category(){return"url"}createIgnoredModule(v){const E=q();return new E("data:,",`ignored-asset`,`(ignored asset)`)}serialize(v){const{write:E}=v;E(this.cssFunctionKind);super.serialize(v)}deserialize(v){const{read:E}=v;this.cssFunctionKind=E();super.deserialize(v)}}const cssEscapeString=v=>{let E=0;let R=0;let $=0;for(let j=0;j`\\${v}`))}else if(R<=$){return`"${v.replace(/[\n"\\]/g,(v=>`\\${v}`))}"`}else{return`'${v.replace(/[\n'\\]/g,(v=>`\\${v}`))}'`}};CssUrlDependency.Template=class CssUrlDependencyTemplate extends N.Template{apply(v,E,{runtime:R,moduleGraph:$,runtimeTemplate:j,codeGenerationResults:N}){const q=v;E.replace(q.range[0],q.range[1]-1,`${q.cssFunctionKind}(${cssEscapeString(j.assetUrl({publicPath:"",runtime:R,module:$.getModule(q),codeGenerationResults:N}))})`)}};$(CssUrlDependency,"webpack/lib/dependencies/CssUrlDependency");v.exports=CssUrlDependency},70688:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);class DelegatedSourceDependency extends j{constructor(v){super(v)}get type(){return"delegated source"}get category(){return"esm"}}$(DelegatedSourceDependency,"webpack/lib/dependencies/DelegatedSourceDependency");v.exports=DelegatedSourceDependency},21467:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);class DllEntryDependency extends ${constructor(v,E){super();this.dependencies=v;this.name=E}get type(){return"dll entry"}serialize(v){const{write:E}=v;E(this.dependencies);E(this.name);super.serialize(v)}deserialize(v){const{read:E}=v;this.dependencies=E();this.name=E();super.deserialize(v)}}j(DllEntryDependency,"webpack/lib/dependencies/DllEntryDependency");v.exports=DllEntryDependency},35485:function(v,E){"use strict";const R=new WeakMap;E.bailout=v=>{const E=R.get(v);R.set(v,false);if(E===true){v.module.buildMeta.exportsType=undefined;v.module.buildMeta.defaultObject=false}};E.enable=v=>{const E=R.get(v);if(E===false)return;R.set(v,true);if(E!==true){v.module.buildMeta.exportsType="default";v.module.buildMeta.defaultObject="redirect"}};E.setFlagged=v=>{const E=R.get(v);if(E!==true)return;const $=v.module.buildMeta;if($.exportsType==="dynamic")return;$.exportsType="flagged"};E.setDynamic=v=>{const E=R.get(v);if(E!==true)return;v.module.buildMeta.exportsType="dynamic"};E.isEnabled=v=>{const E=R.get(v);return E===true}},17380:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);class EntryDependency extends j{constructor(v){super(v)}get type(){return"entry"}get category(){return"esm"}}$(EntryDependency,"webpack/lib/dependencies/EntryDependency");v.exports=EntryDependency},36853:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const j=R(65764);const N=R(91596);const getProperty=(v,E,R,j,N)=>{if(!R){switch(j){case"usedExports":{const R=v.getExportsInfo(E).getUsedExports(N);if(typeof R==="boolean"||R===undefined||R===null){return R}return Array.from(R).sort()}}}switch(j){case"canMangle":{const $=v.getExportsInfo(E);const j=$.getExportInfo(R);if(j)return j.canMangle;return $.otherExportsInfo.canMangle}case"used":return v.getExportsInfo(E).getUsed(R,N)!==$.Unused;case"useInfo":{const j=v.getExportsInfo(E).getUsed(R,N);switch(j){case $.Used:case $.OnlyPropertiesUsed:return true;case $.Unused:return false;case $.NoInfo:return undefined;case $.Unknown:return null;default:throw new Error(`Unexpected UsageState ${j}`)}}case"provideInfo":return v.getExportsInfo(E).isExportProvided(R)}return undefined};class ExportsInfoDependency extends N{constructor(v,E,R){super();this.range=v;this.exportName=E;this.property=R}serialize(v){const{write:E}=v;E(this.range);E(this.exportName);E(this.property);super.serialize(v)}static deserialize(v){const E=new ExportsInfoDependency(v.read(),v.read(),v.read());E.deserialize(v);return E}}j(ExportsInfoDependency,"webpack/lib/dependencies/ExportsInfoDependency");ExportsInfoDependency.Template=class ExportsInfoDependencyTemplate extends N.Template{apply(v,E,{module:R,moduleGraph:$,runtime:j}){const N=v;const q=getProperty($,R,N.exportName,N.property,j);E.replace(N.range[0],N.range[1]-1,q===undefined?"undefined":JSON.stringify(q))}};v.exports=ExportsInfoDependency},98702:function(v,E,R){"use strict";const $=R(43841);const j=R(65764);const N=R(58668);const q=R(91596);class HarmonyAcceptDependency extends q{constructor(v,E,R){super();this.range=v;this.dependencies=E;this.hasCallback=R}get type(){return"accepted harmony modules"}serialize(v){const{write:E}=v;E(this.range);E(this.dependencies);E(this.hasCallback);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.dependencies=E();this.hasCallback=E();super.deserialize(v)}}j(HarmonyAcceptDependency,"webpack/lib/dependencies/HarmonyAcceptDependency");HarmonyAcceptDependency.Template=class HarmonyAcceptDependencyTemplate extends q.Template{apply(v,E,R){const j=v;const{module:q,runtime:G,runtimeRequirements:ie,runtimeTemplate:ae,moduleGraph:ce,chunkGraph:le}=R;const me=j.dependencies.map((v=>{const E=ce.getModule(v);return{dependency:v,runtimeCondition:E?N.Template.getImportEmittedRuntime(q,E):false}})).filter((({runtimeCondition:v})=>v!==false)).map((({dependency:v,runtimeCondition:E})=>{const j=ae.runtimeConditionExpression({chunkGraph:le,runtime:G,runtimeCondition:E,runtimeRequirements:ie});const N=v.getImportStatement(true,R);const q=N[0]+N[1];if(j!=="true"){return`if (${j}) {\n${$.indent(q)}\n}\n`}return q})).join("");if(j.hasCallback){if(ae.supportsArrowFunction()){E.insert(j.range[0],`__WEBPACK_OUTDATED_DEPENDENCIES__ => { ${me}(`);E.insert(j.range[1],")(__WEBPACK_OUTDATED_DEPENDENCIES__); }")}else{E.insert(j.range[0],`function(__WEBPACK_OUTDATED_DEPENDENCIES__) { ${me}(`);E.insert(j.range[1],")(__WEBPACK_OUTDATED_DEPENDENCIES__); }.bind(this)")}return}const _e=ae.supportsArrowFunction();E.insert(j.range[1]-.5,`, ${_e?"() =>":"function()"} { ${me} }`)}};v.exports=HarmonyAcceptDependency},13345:function(v,E,R){"use strict";const $=R(65764);const j=R(58668);const N=R(91596);class HarmonyAcceptImportDependency extends j{constructor(v){super(v,NaN);this.weak=true}get type(){return"harmony accept"}}$(HarmonyAcceptImportDependency,"webpack/lib/dependencies/HarmonyAcceptImportDependency");HarmonyAcceptImportDependency.Template=N.Template;v.exports=HarmonyAcceptImportDependency},48180:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const j=R(64768);const N=R(39201);const q=R(65764);const G=R(91596);class HarmonyCompatibilityDependency extends G{get type(){return"harmony export header"}}q(HarmonyCompatibilityDependency,"webpack/lib/dependencies/HarmonyCompatibilityDependency");HarmonyCompatibilityDependency.Template=class HarmonyExportDependencyTemplate extends G.Template{apply(v,E,{module:R,runtimeTemplate:q,moduleGraph:G,initFragments:ie,runtimeRequirements:ae,runtime:ce,concatenationScope:le}){if(le)return;const me=G.getExportsInfo(R);if(me.getReadOnlyExportInfo("__esModule").getUsed(ce)!==$.Unused){const v=q.defineEsModuleFlagStatement({exportsArgument:R.exportsArgument,runtimeRequirements:ae});ie.push(new j(v,j.STAGE_HARMONY_EXPORTS,0,"harmony compatibility"))}if(G.isAsync(R)){ae.add(N.module);ae.add(N.asyncModule);ie.push(new j(q.supportsArrowFunction()?`${N.asyncModule}(${R.moduleArgument}, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n`:`${N.asyncModule}(${R.moduleArgument}, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {\n`,j.STAGE_ASYNC_BOUNDARY,0,undefined,`\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } }${R.buildMeta.async?", 1":""});`))}}};v.exports=HarmonyCompatibilityDependency},69585:function(v,E,R){"use strict";const $=R(35485);const j=R(48180);const N=R(40699);v.exports=class HarmonyDetectionParserPlugin{constructor(v){const{topLevelAwait:E=false}=v||{};this.topLevelAwait=E}apply(v){v.hooks.program.tap("HarmonyDetectionParserPlugin",(E=>{const R=v.state.module.type==="javascript/esm";const q=R||E.body.some((v=>v.type==="ImportDeclaration"||v.type==="ExportDefaultDeclaration"||v.type==="ExportNamedDeclaration"||v.type==="ExportAllDeclaration"));if(q){const E=v.state.module;const q=new j;q.loc={start:{line:-1,column:0},end:{line:-1,column:0},index:-3};E.addPresentationalDependency(q);$.bailout(v.state);N.enable(v.state,R);v.scope.isStrict=true}}));v.hooks.topLevelAwait.tap("HarmonyDetectionParserPlugin",(()=>{const E=v.state.module;if(!this.topLevelAwait){throw new Error("The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)")}if(!N.isEnabled(v.state)){throw new Error("Top-level-await is only supported in EcmaScript Modules")}E.buildMeta.async=true}));const skipInHarmony=()=>{if(N.isEnabled(v.state)){return true}};const nullInHarmony=()=>{if(N.isEnabled(v.state)){return null}};const E=["define","exports"];for(const R of E){v.hooks.evaluateTypeof.for(R).tap("HarmonyDetectionParserPlugin",nullInHarmony);v.hooks.typeof.for(R).tap("HarmonyDetectionParserPlugin",skipInHarmony);v.hooks.evaluate.for(R).tap("HarmonyDetectionParserPlugin",nullInHarmony);v.hooks.expression.for(R).tap("HarmonyDetectionParserPlugin",skipInHarmony);v.hooks.call.for(R).tap("HarmonyDetectionParserPlugin",skipInHarmony)}}}},87799:function(v,E,R){"use strict";const $=R(65764);const j=R(577);class HarmonyEvaluatedImportSpecifierDependency extends j{constructor(v,E,R,$,j,N,q){super(v,E,R,$,j,false,N);this.operator=q}get type(){return`evaluated X ${this.operator} harmony import specifier`}serialize(v){super.serialize(v);const{write:E}=v;E(this.operator)}deserialize(v){super.deserialize(v);const{read:E}=v;this.operator=E()}}$(HarmonyEvaluatedImportSpecifierDependency,"webpack/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency");HarmonyEvaluatedImportSpecifierDependency.Template=class HarmonyEvaluatedImportSpecifierDependencyTemplate extends j.Template{apply(v,E,R){const $=v;const{module:j,moduleGraph:N,runtime:q}=R;const G=N.getConnection($);if(G&&!G.isTargetActive(q))return;const ie=N.getExportsInfo(G.module);const ae=$.getIds(N);let ce;const le=G.module.getExportsType(N,j.buildMeta.strictHarmonyModule);switch(le){case"default-with-named":{if(ae[0]==="default"){ce=ae.length===1||ie.isExportProvided(ae.slice(1))}else{ce=ie.isExportProvided(ae)}break}case"namespace":{if(ae[0]==="__esModule"){ce=ae.length===1||undefined}else{ce=ie.isExportProvided(ae)}break}case"dynamic":{if(ae[0]!=="default"){ce=ie.isExportProvided(ae)}break}}if(typeof ce==="boolean"){E.replace($.range[0],$.range[1]-1,` ${ce}`)}else{const v=ie.getUsedName(ae,q);const j=this._getCodeForIds($,E,R,ae.slice(0,-1));E.replace($.range[0],$.range[1]-1,`${v?JSON.stringify(v[v.length-1]):'""'} in ${j}`)}}};v.exports=HarmonyEvaluatedImportSpecifierDependency},28445:function(v,E,R){"use strict";const $=R(39236);const j=R(14367);const N=R(61404);const q=R(31623);const G=R(96577);const ie=R(22437);const{ExportPresenceModes:ae}=R(58668);const{harmonySpecifierTag:ce,getAssertions:le}=R(59152);const me=R(95913);const{HarmonyStarExportsList:_e}=G;v.exports=class HarmonyExportDependencyParserPlugin{constructor(v){this.exportPresenceMode=v.reexportExportsPresence!==undefined?ae.fromUserOption(v.reexportExportsPresence):v.exportsPresence!==undefined?ae.fromUserOption(v.exportsPresence):v.strictExportPresence?ae.ERROR:ae.AUTO}apply(v){const{exportPresenceMode:E}=this;v.hooks.export.tap("HarmonyExportDependencyParserPlugin",(E=>{const R=new q(E.declaration&&E.declaration.range,E.range);R.loc=Object.create(E.loc);R.loc.index=-1;v.state.module.addPresentationalDependency(R);return true}));v.hooks.exportImport.tap("HarmonyExportDependencyParserPlugin",((E,R)=>{v.state.lastHarmonyImportOrder=(v.state.lastHarmonyImportOrder||0)+1;const $=new j("",E.range);$.loc=Object.create(E.loc);$.loc.index=-1;v.state.module.addPresentationalDependency($);const N=new me(R,v.state.lastHarmonyImportOrder,le(E));N.loc=Object.create(E.loc);N.loc.index=-1;v.state.current.addDependency(N);return true}));v.hooks.exportExpression.tap("HarmonyExportDependencyParserPlugin",((E,R)=>{const j=R.type==="FunctionDeclaration";const q=v.getComments([E.range[0],R.range[0]]);const G=new N(R.range,E.range,q.map((v=>{switch(v.type){case"Block":return`/*${v.value}*/`;case"Line":return`//${v.value}\n`}return""})).join(""),R.type.endsWith("Declaration")&&R.id?R.id.name:j?{id:R.id?R.id.name:undefined,range:[R.range[0],R.params.length>0?R.params[0].range[0]:R.body.range[0]],prefix:`${R.async?"async ":""}function${R.generator?"*":""} `,suffix:`(${R.params.length>0?"":") "}`}:undefined);G.loc=Object.create(E.loc);G.loc.index=-1;v.state.current.addDependency(G);$.addVariableUsage(v,R.type.endsWith("Declaration")&&R.id?R.id.name:"*default*","default");return true}));v.hooks.exportSpecifier.tap("HarmonyExportDependencyParserPlugin",((R,j,N,q)=>{const ae=v.getTagData(j,ce);let le;const me=v.state.harmonyNamedExports=v.state.harmonyNamedExports||new Set;me.add(N);$.addVariableUsage(v,j,N);if(ae){le=new G(ae.source,ae.sourceOrder,ae.ids,N,me,null,E,null,ae.assertions)}else{le=new ie(j,N)}le.loc=Object.create(R.loc);le.loc.index=q;v.state.current.addDependency(le);return true}));v.hooks.exportImportSpecifier.tap("HarmonyExportDependencyParserPlugin",((R,$,j,N,q)=>{const ie=v.state.harmonyNamedExports=v.state.harmonyNamedExports||new Set;let ae=null;if(N){ie.add(N)}else{ae=v.state.harmonyStarExports=v.state.harmonyStarExports||new _e}const ce=new G($,v.state.lastHarmonyImportOrder,j?[j]:[],N,ie,ae&&ae.slice(),E,ae);if(ae){ae.push(ce)}ce.loc=Object.create(R.loc);ce.loc.index=q;v.state.current.addDependency(ce);return true}))}}},61404:function(v,E,R){"use strict";const $=R(81701);const j=R(39201);const N=R(65764);const q=R(64139);const G=R(91596);class HarmonyExportExpressionDependency extends G{constructor(v,E,R,$){super();this.range=v;this.rangeStatement=E;this.prefix=R;this.declarationId=$}get type(){return"harmony export expression"}getExports(v){return{exports:["default"],priority:1,terminalBinding:true,dependencies:undefined}}getModuleEvaluationSideEffectsState(v){return false}serialize(v){const{write:E}=v;E(this.range);E(this.rangeStatement);E(this.prefix);E(this.declarationId);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.rangeStatement=E();this.prefix=E();this.declarationId=E();super.deserialize(v)}}N(HarmonyExportExpressionDependency,"webpack/lib/dependencies/HarmonyExportExpressionDependency");HarmonyExportExpressionDependency.Template=class HarmonyExportDependencyTemplate extends G.Template{apply(v,E,{module:R,moduleGraph:N,runtimeTemplate:G,runtimeRequirements:ie,initFragments:ae,runtime:ce,concatenationScope:le}){const me=v;const{declarationId:_e}=me;const Ie=R.exportsArgument;if(_e){let v;if(typeof _e==="string"){v=_e}else{v=$.DEFAULT_EXPORT;E.replace(_e.range[0],_e.range[1]-1,`${_e.prefix}${v}${_e.suffix}`)}if(le){le.registerExport("default",v)}else{const E=N.getExportsInfo(R).getUsedName("default",ce);if(E){const R=new Map;R.set(E,`/* export default binding */ ${v}`);ae.push(new q(Ie,R))}}E.replace(me.rangeStatement[0],me.range[0]-1,`/* harmony default export */ ${me.prefix}`)}else{let v;const _e=$.DEFAULT_EXPORT;if(G.supportsConst()){v=`/* harmony default export */ const ${_e} = `;if(le){le.registerExport("default",_e)}else{const E=N.getExportsInfo(R).getUsedName("default",ce);if(E){ie.add(j.exports);const v=new Map;v.set(E,_e);ae.push(new q(Ie,v))}else{v=`/* unused harmony default export */ var ${_e} = `}}}else if(le){v=`/* harmony default export */ var ${_e} = `;le.registerExport("default",_e)}else{const E=N.getExportsInfo(R).getUsedName("default",ce);if(E){ie.add(j.exports);v=`/* harmony default export */ ${Ie}[${JSON.stringify(E)}] = `}else{v=`/* unused harmony default export */ var ${_e} = `}}if(me.range){E.replace(me.rangeStatement[0],me.range[0]-1,v+"("+me.prefix);E.replace(me.range[1],me.rangeStatement[1]-.5,");");return}E.replace(me.rangeStatement[0],me.rangeStatement[1]-1,v)}}};v.exports=HarmonyExportExpressionDependency},31623:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class HarmonyExportHeaderDependency extends j{constructor(v,E){super();this.range=v;this.rangeStatement=E}get type(){return"harmony export header"}serialize(v){const{write:E}=v;E(this.range);E(this.rangeStatement);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.rangeStatement=E();super.deserialize(v)}}$(HarmonyExportHeaderDependency,"webpack/lib/dependencies/HarmonyExportHeaderDependency");HarmonyExportHeaderDependency.Template=class HarmonyExportDependencyTemplate extends j.Template{apply(v,E,R){const $=v;const j="";const N=$.range?$.range[0]-1:$.rangeStatement[1]-1;E.replace($.rangeStatement[0],N,j)}};v.exports=HarmonyExportHeaderDependency},96577:function(v,E,R){"use strict";const $=R(87056);const{UsageState:j}=R(13168);const N=R(14330);const q=R(64768);const G=R(39201);const ie=R(43841);const{countIterable:ae}=R(30922);const{first:ce,combine:le}=R(73268);const me=R(65764);const _e=R(67603);const{getRuntimeKey:Ie,keyToRuntime:Me}=R(47462);const Oe=R(64139);const Te=R(58668);const Ne=R(14666);const{ExportPresenceModes:Be}=Te;const Le=Symbol("HarmonyExportImportedSpecifierDependency.ids");class NormalReexportItem{constructor(v,E,R,$,j){this.name=v;this.ids=E;this.exportInfo=R;this.checked=$;this.hidden=j}}class ExportMode{constructor(v){this.type=v;this.items=null;this.name=null;this.partialNamespaceExportInfo=null;this.ignored=null;this.hidden=null;this.userRequest=null;this.fakeType=0}}const determineExportAssignments=(v,E,R)=>{const $=new Set;const j=[];if(R){E=E.concat(R)}for(const R of E){const E=j.length;j[E]=$.size;const N=v.getModule(R);if(N){const R=v.getExportsInfo(N);for(const v of R.exports){if(v.provided===true&&v.name!=="default"&&!$.has(v.name)){$.add(v.name);j[E]=$.size}}}}j.push($.size);return{names:Array.from($),dependencyIndices:j}};const findDependencyForName=({names:v,dependencyIndices:E},R,$)=>{const j=$[Symbol.iterator]();const N=E[Symbol.iterator]();let q=j.next();let G=N.next();if(G.done)return;for(let E=0;E=G.value){q=j.next();G=N.next();if(G.done)return}if(v[E]===R)return q.value}return undefined};const getMode=(v,E,R)=>{const $=v.getModule(E);if(!$){const v=new ExportMode("missing");v.userRequest=E.userRequest;return v}const N=E.name;const q=Me(R);const G=v.getParentModule(E);const ie=v.getExportsInfo(G);if(N?ie.getUsed(N,q)===j.Unused:ie.isUsed(q)===false){const v=new ExportMode("unused");v.name=N||"*";return v}const ae=$.getExportsType(v,G.buildMeta.strictHarmonyModule);const ce=E.getIds(v);if(N&&ce.length>0&&ce[0]==="default"){switch(ae){case"dynamic":{const v=new ExportMode("reexport-dynamic-default");v.name=N;return v}case"default-only":case"default-with-named":{const v=ie.getReadOnlyExportInfo(N);const E=new ExportMode("reexport-named-default");E.name=N;E.partialNamespaceExportInfo=v;return E}}}if(N){let v;const E=ie.getReadOnlyExportInfo(N);if(ce.length>0){switch(ae){case"default-only":v=new ExportMode("reexport-undefined");v.name=N;break;default:v=new ExportMode("normal-reexport");v.items=[new NormalReexportItem(N,ce,E,false,false)];break}}else{switch(ae){case"default-only":v=new ExportMode("reexport-fake-namespace-object");v.name=N;v.partialNamespaceExportInfo=E;v.fakeType=0;break;case"default-with-named":v=new ExportMode("reexport-fake-namespace-object");v.name=N;v.partialNamespaceExportInfo=E;v.fakeType=2;break;case"dynamic":default:v=new ExportMode("reexport-namespace-object");v.name=N;v.partialNamespaceExportInfo=E}}return v}const{ignoredExports:le,exports:me,checked:_e,hidden:Ie}=E.getStarReexports(v,q,ie,$);if(!me){const v=new ExportMode("dynamic-reexport");v.ignored=le;v.hidden=Ie;return v}if(me.size===0){const v=new ExportMode("empty-star");v.hidden=Ie;return v}const Oe=new ExportMode("normal-reexport");Oe.items=Array.from(me,(v=>new NormalReexportItem(v,[v],ie.getReadOnlyExportInfo(v),_e.has(v),false)));if(Ie!==undefined){for(const v of Ie){Oe.items.push(new NormalReexportItem(v,[v],ie.getReadOnlyExportInfo(v),false,true))}}return Oe};class HarmonyExportImportedSpecifierDependency extends Te{constructor(v,E,R,$,j,N,q,G,ie){super(v,E,ie);this.ids=R;this.name=$;this.activeExports=j;this.otherStarExports=N;this.exportPresenceMode=q;this.allStarExports=G}couldAffectReferencingModule(){return $.TRANSITIVE}get id(){throw new Error("id was renamed to ids and type changed to string[]")}getId(){throw new Error("id was renamed to ids and type changed to string[]")}setId(){throw new Error("id was renamed to ids and type changed to string[]")}get type(){return"harmony export imported specifier"}getIds(v){return v.getMeta(this)[Le]||this.ids}setIds(v,E){v.getMeta(this)[Le]=E}getMode(v,E){return v.dependencyCacheProvide(this,Ie(E),getMode)}getStarReexports(v,E,R=v.getExportsInfo(v.getParentModule(this)),$=v.getModule(this)){const N=v.getExportsInfo($);const q=N.otherExportsInfo.provided===false;const G=R.otherExportsInfo.getUsed(E)===j.Unused;const ie=new Set(["default",...this.activeExports]);let ae=undefined;const ce=this._discoverActiveExportsFromOtherStarExports(v);if(ce!==undefined){ae=new Set;for(let v=0;v{const $=this.getMode(v,R);return $.type!=="unused"&&$.type!=="empty-star"}}getModuleEvaluationSideEffectsState(v){return false}getReferencedExports(v,E){const R=this.getMode(v,E);switch(R.type){case"missing":case"unused":case"empty-star":case"reexport-undefined":return $.NO_EXPORTS_REFERENCED;case"reexport-dynamic-default":return $.EXPORTS_OBJECT_REFERENCED;case"reexport-named-default":{if(!R.partialNamespaceExportInfo)return $.EXPORTS_OBJECT_REFERENCED;const v=[];Ne(E,v,[],R.partialNamespaceExportInfo);return v}case"reexport-namespace-object":case"reexport-fake-namespace-object":{if(!R.partialNamespaceExportInfo)return $.EXPORTS_OBJECT_REFERENCED;const v=[];Ne(E,v,[],R.partialNamespaceExportInfo,R.type==="reexport-fake-namespace-object");return v}case"dynamic-reexport":return $.EXPORTS_OBJECT_REFERENCED;case"normal-reexport":{const v=[];for(const{ids:$,exportInfo:j,hidden:N}of R.items){if(N)continue;Ne(E,v,$,j,false)}return v}default:throw new Error(`Unknown mode ${R.type}`)}}_discoverActiveExportsFromOtherStarExports(v){if(!this.otherStarExports)return undefined;const E="length"in this.otherStarExports?this.otherStarExports.length:ae(this.otherStarExports);if(E===0)return undefined;if(this.allStarExports){const{names:R,dependencyIndices:$}=v.cached(determineExportAssignments,this.allStarExports.dependencies);return{names:R,namesSlice:$[E-1],dependencyIndices:$,dependencyIndex:E}}const{names:R,dependencyIndices:$}=v.cached(determineExportAssignments,this.otherStarExports,this);return{names:R,namesSlice:$[E-1],dependencyIndices:$,dependencyIndex:E}}getExports(v){const E=this.getMode(v,undefined);switch(E.type){case"missing":return undefined;case"dynamic-reexport":{const R=v.getConnection(this);return{exports:true,from:R,canMangle:false,excludeExports:E.hidden?le(E.ignored,E.hidden):E.ignored,hideExports:E.hidden,dependencies:[R.module]}}case"empty-star":return{exports:[],hideExports:E.hidden,dependencies:[v.getModule(this)]};case"normal-reexport":{const R=v.getConnection(this);return{exports:Array.from(E.items,(v=>({name:v.name,from:R,export:v.ids,hidden:v.hidden}))),priority:1,dependencies:[R.module]}}case"reexport-dynamic-default":{{const R=v.getConnection(this);return{exports:[{name:E.name,from:R,export:["default"]}],priority:1,dependencies:[R.module]}}}case"reexport-undefined":return{exports:[E.name],dependencies:[v.getModule(this)]};case"reexport-fake-namespace-object":{const R=v.getConnection(this);return{exports:[{name:E.name,from:R,export:null,exports:[{name:"default",canMangle:false,from:R,export:null}]}],priority:1,dependencies:[R.module]}}case"reexport-namespace-object":{const R=v.getConnection(this);return{exports:[{name:E.name,from:R,export:null}],priority:1,dependencies:[R.module]}}case"reexport-named-default":{const R=v.getConnection(this);return{exports:[{name:E.name,from:R,export:["default"]}],priority:1,dependencies:[R.module]}}default:throw new Error(`Unknown mode ${E.type}`)}}_getEffectiveExportPresenceLevel(v){if(this.exportPresenceMode!==Be.AUTO)return this.exportPresenceMode;return v.getParentModule(this).buildMeta.strictHarmonyModule?Be.ERROR:Be.WARN}getWarnings(v){const E=this._getEffectiveExportPresenceLevel(v);if(E===Be.WARN){return this._getErrors(v)}return null}getErrors(v){const E=this._getEffectiveExportPresenceLevel(v);if(E===Be.ERROR){return this._getErrors(v)}return null}_getErrors(v){const E=this.getIds(v);let R=this.getLinkingErrors(v,E,`(reexported as '${this.name}')`);if(E.length===0&&this.name===null){const E=this._discoverActiveExportsFromOtherStarExports(v);if(E&&E.namesSlice>0){const $=new Set(E.names.slice(E.namesSlice,E.dependencyIndices[E.dependencyIndex]));const j=v.getModule(this);if(j){const q=v.getExportsInfo(j);const G=new Map;for(const R of q.orderedExports){if(R.provided!==true)continue;if(R.name==="default")continue;if(this.activeExports.has(R.name))continue;if($.has(R.name))continue;const N=findDependencyForName(E,R.name,this.allStarExports?this.allStarExports.dependencies:[...this.otherStarExports,this]);if(!N)continue;const q=R.getTerminalBinding(v);if(!q)continue;const ie=v.getModule(N);if(ie===j)continue;const ae=v.getExportInfo(ie,R.name);const ce=ae.getTerminalBinding(v);if(!ce)continue;if(q===ce)continue;const le=G.get(N.request);if(le===undefined){G.set(N.request,[R.name])}else{le.push(R.name)}}for(const[v,E]of G){if(!R)R=[];R.push(new N(`The requested module '${this.request}' contains conflicting star exports for the ${E.length>1?"names":"name"} ${E.map((v=>`'${v}'`)).join(", ")} with the previous requested module '${v}'`))}}}}return R}serialize(v){const{write:E,setCircularReference:R}=v;R(this);E(this.ids);E(this.name);E(this.activeExports);E(this.otherStarExports);E(this.exportPresenceMode);E(this.allStarExports);super.serialize(v)}deserialize(v){const{read:E,setCircularReference:R}=v;R(this);this.ids=E();this.name=E();this.activeExports=E();this.otherStarExports=E();this.exportPresenceMode=E();this.allStarExports=E();super.deserialize(v)}}me(HarmonyExportImportedSpecifierDependency,"webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency");v.exports=HarmonyExportImportedSpecifierDependency;HarmonyExportImportedSpecifierDependency.Template=class HarmonyExportImportedSpecifierDependencyTemplate extends Te.Template{apply(v,E,R){const{moduleGraph:$,runtime:j,concatenationScope:N}=R;const q=v;const G=q.getMode($,j);if(N){switch(G.type){case"reexport-undefined":N.registerRawExport(G.name,"/* reexport non-default export from non-harmony */ undefined")}return}if(G.type!=="unused"&&G.type!=="empty-star"){super.apply(v,E,R);this._addExportFragments(R.initFragments,q,G,R.module,$,j,R.runtimeTemplate,R.runtimeRequirements)}}_addExportFragments(v,E,R,$,j,N,ae,me){const _e=j.getModule(E);const Ie=E.getImportVar(j);switch(R.type){case"missing":case"empty-star":v.push(new q("/* empty/unused harmony star reexport */\n",q.STAGE_HARMONY_EXPORTS,1));break;case"unused":v.push(new q(`${ie.toNormalComment(`unused harmony reexport ${R.name}`)}\n`,q.STAGE_HARMONY_EXPORTS,1));break;case"reexport-dynamic-default":v.push(this.getReexportFragment($,"reexport default from dynamic",j.getExportsInfo($).getUsedName(R.name,N),Ie,null,me));break;case"reexport-fake-namespace-object":v.push(...this.getReexportFakeNamespaceObjectFragments($,j.getExportsInfo($).getUsedName(R.name,N),Ie,R.fakeType,me));break;case"reexport-undefined":v.push(this.getReexportFragment($,"reexport non-default export from non-harmony",j.getExportsInfo($).getUsedName(R.name,N),"undefined","",me));break;case"reexport-named-default":v.push(this.getReexportFragment($,"reexport default export from named module",j.getExportsInfo($).getUsedName(R.name,N),Ie,"",me));break;case"reexport-namespace-object":v.push(this.getReexportFragment($,"reexport module object",j.getExportsInfo($).getUsedName(R.name,N),Ie,"",me));break;case"normal-reexport":for(const{name:G,ids:ie,checked:ae,hidden:ce}of R.items){if(ce)continue;if(ae){v.push(new q("/* harmony reexport (checked) */ "+this.getConditionalReexportStatement($,G,Ie,ie,me),j.isAsync(_e)?q.STAGE_ASYNC_HARMONY_IMPORTS:q.STAGE_HARMONY_IMPORTS,E.sourceOrder))}else{v.push(this.getReexportFragment($,"reexport safe",j.getExportsInfo($).getUsedName(G,N),Ie,j.getExportsInfo(_e).getUsedName(ie,N),me))}}break;case"dynamic-reexport":{const N=R.hidden?le(R.ignored,R.hidden):R.ignored;const ie=ae.supportsConst()&&ae.supportsArrowFunction();let Me="/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n"+`/* harmony reexport (unknown) */ for(${ie?"const":"var"} __WEBPACK_IMPORT_KEY__ in ${Ie}) `;if(N.size>1){Me+="if("+JSON.stringify(Array.from(N))+".indexOf(__WEBPACK_IMPORT_KEY__) < 0) "}else if(N.size===1){Me+=`if(__WEBPACK_IMPORT_KEY__ !== ${JSON.stringify(ce(N))}) `}Me+=`__WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = `;if(ie){Me+=`() => ${Ie}[__WEBPACK_IMPORT_KEY__]`}else{Me+=`function(key) { return ${Ie}[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)`}me.add(G.exports);me.add(G.definePropertyGetters);const Oe=$.exportsArgument;v.push(new q(`${Me}\n/* harmony reexport (unknown) */ ${G.definePropertyGetters}(${Oe}, __WEBPACK_REEXPORT_OBJECT__);\n`,j.isAsync(_e)?q.STAGE_ASYNC_HARMONY_IMPORTS:q.STAGE_HARMONY_IMPORTS,E.sourceOrder));break}default:throw new Error(`Unknown mode ${R.type}`)}}getReexportFragment(v,E,R,$,j,N){const q=this.getReturnValue($,j);N.add(G.exports);N.add(G.definePropertyGetters);const ie=new Map;ie.set(R,`/* ${E} */ ${q}`);return new Oe(v.exportsArgument,ie)}getReexportFakeNamespaceObjectFragments(v,E,R,$,j){j.add(G.exports);j.add(G.definePropertyGetters);j.add(G.createFakeNamespaceObject);const N=new Map;N.set(E,`/* reexport fake namespace object from non-harmony */ ${R}_namespace_cache || (${R}_namespace_cache = ${G.createFakeNamespaceObject}(${R}${$?`, ${$}`:""}))`);return[new q(`var ${R}_namespace_cache;\n`,q.STAGE_CONSTANTS,-1,`${R}_namespace_cache`),new Oe(v.exportsArgument,N)]}getConditionalReexportStatement(v,E,R,$,j){if($===false){return"/* unused export */\n"}const N=v.exportsArgument;const q=this.getReturnValue(R,$);j.add(G.exports);j.add(G.definePropertyGetters);j.add(G.hasOwnProperty);return`if(${G.hasOwnProperty}(${R}, ${JSON.stringify($[0])})) ${G.definePropertyGetters}(${N}, { ${JSON.stringify(E)}: function() { return ${q}; } });\n`}getReturnValue(v,E){if(E===null){return`${v}_default.a`}if(E===""){return v}if(E===false){return"/* unused export */ undefined"}return`${v}${_e(E)}`}};class HarmonyStarExportsList{constructor(){this.dependencies=[]}push(v){this.dependencies.push(v)}slice(){return this.dependencies.slice()}serialize({write:v,setCircularReference:E}){E(this);v(this.dependencies)}deserialize({read:v,setCircularReference:E}){E(this);this.dependencies=v()}}me(HarmonyStarExportsList,"webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency","HarmonyStarExportsList");v.exports.HarmonyStarExportsList=HarmonyStarExportsList},64139:function(v,E,R){"use strict";const $=R(64768);const j=R(39201);const{first:N}=R(73268);const joinIterableWithComma=v=>{let E="";let R=true;for(const $ of v){if(R){R=false}else{E+=", "}E+=$}return E};const q=new Map;const G=new Set;class HarmonyExportInitFragment extends ${constructor(v,E=q,R=G){super(undefined,$.STAGE_HARMONY_EXPORTS,1,"harmony-exports");this.exportsArgument=v;this.exportMap=E;this.unusedExports=R}mergeAll(v){let E;let R=false;let $;let j=false;for(const N of v){if(N.exportMap.size!==0){if(E===undefined){E=N.exportMap;R=false}else{if(!R){E=new Map(E);R=true}for(const[v,R]of N.exportMap){if(!E.has(v))E.set(v,R)}}}if(N.unusedExports.size!==0){if($===undefined){$=N.unusedExports;j=false}else{if(!j){$=new Set($);j=true}for(const v of N.unusedExports){$.add(v)}}}}return new HarmonyExportInitFragment(this.exportsArgument,E,$)}merge(v){let E;if(this.exportMap.size===0){E=v.exportMap}else if(v.exportMap.size===0){E=this.exportMap}else{E=new Map(v.exportMap);for(const[v,R]of this.exportMap){if(!E.has(v))E.set(v,R)}}let R;if(this.unusedExports.size===0){R=v.unusedExports}else if(v.unusedExports.size===0){R=this.unusedExports}else{R=new Set(v.unusedExports);for(const v of this.unusedExports){R.add(v)}}return new HarmonyExportInitFragment(this.exportsArgument,E,R)}getContent({runtimeTemplate:v,runtimeRequirements:E}){E.add(j.exports);E.add(j.definePropertyGetters);const R=this.unusedExports.size>1?`/* unused harmony exports ${joinIterableWithComma(this.unusedExports)} */\n`:this.unusedExports.size>0?`/* unused harmony export ${N(this.unusedExports)} */\n`:"";const $=[];const q=Array.from(this.exportMap).sort((([v],[E])=>v0?`/* harmony export */ ${j.definePropertyGetters}(${this.exportsArgument}, {${$.join(",")}\n/* harmony export */ });\n`:"";return`${G}${R}`}}v.exports=HarmonyExportInitFragment},22437:function(v,E,R){"use strict";const $=R(65764);const j=R(64139);const N=R(91596);class HarmonyExportSpecifierDependency extends N{constructor(v,E){super();this.id=v;this.name=E}get type(){return"harmony export specifier"}getExports(v){return{exports:[this.name],priority:1,terminalBinding:true,dependencies:undefined}}getModuleEvaluationSideEffectsState(v){return false}serialize(v){const{write:E}=v;E(this.id);E(this.name);super.serialize(v)}deserialize(v){const{read:E}=v;this.id=E();this.name=E();super.deserialize(v)}}$(HarmonyExportSpecifierDependency,"webpack/lib/dependencies/HarmonyExportSpecifierDependency");HarmonyExportSpecifierDependency.Template=class HarmonyExportSpecifierDependencyTemplate extends N.Template{apply(v,E,{module:R,moduleGraph:$,initFragments:N,runtime:q,concatenationScope:G}){const ie=v;if(G){G.registerExport(ie.name,ie.id);return}const ae=$.getExportsInfo(R).getUsedName(ie.name,q);if(!ae){const v=new Set;v.add(ie.name||"namespace");N.push(new j(R.exportsArgument,undefined,v));return}const ce=new Map;ce.set(ae,`/* binding */ ${ie.id}`);N.push(new j(R.exportsArgument,ce,undefined))}};v.exports=HarmonyExportSpecifierDependency},40699:function(v,E){"use strict";const R=new WeakMap;E.enable=(v,E)=>{const $=R.get(v);if($===false)return;R.set(v,true);if($!==true){v.module.buildMeta.exportsType="namespace";v.module.buildInfo.strict=true;v.module.buildInfo.exportsArgument="__webpack_exports__";if(E){v.module.buildMeta.strictHarmonyModule=true;v.module.buildInfo.moduleArgument="__webpack_module__"}}};E.isEnabled=v=>{const E=R.get(v);return E===true}},58668:function(v,E,R){"use strict";const $=R(47146);const j=R(87056);const N=R(14330);const q=R(64768);const G=R(43841);const ie=R(14989);const{filterRuntime:ae,mergeRuntime:ce}=R(47462);const le=R(99809);const me={NONE:0,WARN:1,AUTO:2,ERROR:3,fromUserOption(v){switch(v){case"error":return me.ERROR;case"warn":return me.WARN;case"auto":return me.AUTO;case false:return me.NONE;default:throw new Error(`Invalid export presence value ${v}`)}}};class HarmonyImportDependency extends le{constructor(v,E,R){super(v);this.sourceOrder=E;this.assertions=R}get category(){return"esm"}getReferencedExports(v,E){return j.NO_EXPORTS_REFERENCED}getImportVar(v){const E=v.getParentModule(this);const R=v.getMeta(E);let $=R.importVarMap;if(!$)R.importVarMap=$=new Map;let j=$.get(v.getModule(this));if(j)return j;j=`${G.toIdentifier(`${this.userRequest}`)}__WEBPACK_IMPORTED_MODULE_${$.size}__`;$.set(v.getModule(this),j);return j}getImportStatement(v,{runtimeTemplate:E,module:R,moduleGraph:$,chunkGraph:j,runtimeRequirements:N}){return E.importStatement({update:v,module:$.getModule(this),chunkGraph:j,importVar:this.getImportVar($),request:this.request,originModule:R,runtimeRequirements:N})}getLinkingErrors(v,E,R){const $=v.getModule(this);if(!$||$.getNumberOfErrors()>0){return}const j=v.getParentModule(this);const q=$.getExportsType(v,j.buildMeta.strictHarmonyModule);if(q==="namespace"||q==="default-with-named"){if(E.length===0){return}if((q!=="default-with-named"||E[0]!=="default")&&v.isExportProvided($,E)===false){let j=0;let q=v.getExportsInfo($);while(j`'${v}'`)).join(".")} ${R} was not found in '${this.userRequest}'${$}`)]}q=$.getNestedExportsInfo()}return[new N(`export ${E.map((v=>`'${v}'`)).join(".")} ${R} was not found in '${this.userRequest}'`)]}}switch(q){case"default-only":if(E.length>0&&E[0]!=="default"){return[new N(`Can't import the named export ${E.map((v=>`'${v}'`)).join(".")} ${R} from default-exporting module (only default export is available)`)]}break;case"default-with-named":if(E.length>0&&E[0]!=="default"&&$.buildMeta.defaultObject==="redirect-warn"){return[new N(`Should not import the named export ${E.map((v=>`'${v}'`)).join(".")} ${R} from default-exporting module (only default export is available soon)`)]}break}}serialize(v){const{write:E}=v;E(this.sourceOrder);E(this.assertions);super.serialize(v)}deserialize(v){const{read:E}=v;this.sourceOrder=E();this.assertions=E();super.deserialize(v)}}v.exports=HarmonyImportDependency;const _e=new WeakMap;HarmonyImportDependency.Template=class HarmonyImportDependencyTemplate extends le.Template{apply(v,E,R){const j=v;const{module:N,chunkGraph:G,moduleGraph:le,runtime:me}=R;const Ie=le.getConnection(j);if(Ie&&!Ie.isTargetActive(me))return;const Me=Ie&&Ie.module;if(Ie&&Ie.weak&&Me&&G.getModuleId(Me)===null){return}const Oe=Me?Me.identifier():j.request;const Te=`harmony import ${Oe}`;const Ne=j.weak?false:Ie?ae(me,(v=>Ie.isTargetActive(v))):true;if(N&&Me){let v=_e.get(N);if(v===undefined){v=new WeakMap;_e.set(N,v)}let E=Ne;const R=v.get(Me)||false;if(R!==false&&E!==true){if(E===false||R===true){E=R}else{E=ce(R,E)}}v.set(Me,E)}const Be=j.getImportStatement(false,R);if(Me&&R.moduleGraph.isAsync(Me)){R.initFragments.push(new $(Be[0],q.STAGE_HARMONY_IMPORTS,j.sourceOrder,Te,Ne));R.initFragments.push(new ie(new Set([j.getImportVar(R.moduleGraph)])));R.initFragments.push(new $(Be[1],q.STAGE_ASYNC_HARMONY_IMPORTS,j.sourceOrder,Te+" compat",Ne))}else{R.initFragments.push(new $(Be[0]+Be[1],q.STAGE_HARMONY_IMPORTS,j.sourceOrder,Te,Ne))}}static getImportEmittedRuntime(v,E){const R=_e.get(v);if(R===undefined)return false;return R.get(E)||false}};v.exports.ExportPresenceModes=me},59152:function(v,E,R){"use strict";const $=R(23456);const j=R(39236);const N=R(14367);const q=R(98702);const G=R(13345);const ie=R(87799);const ae=R(40699);const{ExportPresenceModes:ce}=R(58668);const le=R(95913);const me=R(577);const _e=Symbol("harmony import");function getAssertions(v){const E=v.assertions;if(E===undefined){return undefined}const R={};for(const v of E){const E=v.key.type==="Identifier"?v.key.name:v.key.value;R[E]=v.value.value}return R}v.exports=class HarmonyImportDependencyParserPlugin{constructor(v){this.exportPresenceMode=v.importExportsPresence!==undefined?ce.fromUserOption(v.importExportsPresence):v.exportsPresence!==undefined?ce.fromUserOption(v.exportsPresence):v.strictExportPresence?ce.ERROR:ce.AUTO;this.strictThisContextOnImports=v.strictThisContextOnImports}apply(v){const{exportPresenceMode:E}=this;function getNonOptionalPart(v,E){let R=0;while(R{const R=E;if(v.isVariableDefined(R.name)||v.getTagData(R.name,_e)){return true}}));v.hooks.import.tap("HarmonyImportDependencyParserPlugin",((E,R)=>{v.state.lastHarmonyImportOrder=(v.state.lastHarmonyImportOrder||0)+1;const $=new N(v.isAsiPosition(E.range[0])?";":"",E.range);$.loc=E.loc;v.state.module.addPresentationalDependency($);v.unsetAsiPosition(E.range[1]);const j=getAssertions(E);const q=new le(R,v.state.lastHarmonyImportOrder,j);q.loc=E.loc;v.state.module.addDependency(q);return true}));v.hooks.importSpecifier.tap("HarmonyImportDependencyParserPlugin",((E,R,$,j)=>{const N=$===null?[]:[$];v.tagVariable(j,_e,{name:j,source:R,ids:N,sourceOrder:v.state.lastHarmonyImportOrder,assertions:getAssertions(E)});return true}));v.hooks.binaryExpression.tap("HarmonyImportDependencyParserPlugin",(E=>{if(E.operator!=="in")return;const R=v.evaluateExpression(E.left);if(R.couldHaveSideEffects())return;const $=R.asString();if(!$)return;const N=v.evaluateExpression(E.right);if(!N.isIdentifier())return;const q=N.rootInfo;if(!q||!q.tagInfo||q.tagInfo.tag!==_e)return;const G=q.tagInfo.data;const ae=N.getMembers();const ce=new ie(G.source,G.sourceOrder,G.ids.concat(ae).concat([$]),G.name,E.range,G.assertions,"in");ce.directImport=ae.length===0;ce.asiSafe=!v.isAsiPosition(E.range[0]);ce.loc=E.loc;v.state.module.addDependency(ce);j.onUsage(v.state,(v=>ce.usedByExports=v));return true}));v.hooks.expression.for(_e).tap("HarmonyImportDependencyParserPlugin",(R=>{const $=v.currentTagData;const N=new me($.source,$.sourceOrder,$.ids,$.name,R.range,E,$.assertions);N.shorthand=v.scope.inShorthand;N.directImport=true;N.asiSafe=!v.isAsiPosition(R.range[0]);N.loc=R.loc;v.state.module.addDependency(N);j.onUsage(v.state,(v=>N.usedByExports=v));return true}));v.hooks.expressionMemberChain.for(_e).tap("HarmonyImportDependencyParserPlugin",((R,$,N)=>{const q=v.currentTagData;const G=getNonOptionalPart($,N);const ie=G!==$?getNonOptionalMemberChain(R,$.length-G.length):R;const ae=q.ids.concat(G);const ce=new me(q.source,q.sourceOrder,ae,q.name,ie.range,E,q.assertions);ce.asiSafe=!v.isAsiPosition(ie.range[0]);ce.loc=ie.loc;v.state.module.addDependency(ce);j.onUsage(v.state,(v=>ce.usedByExports=v));return true}));v.hooks.callMemberChain.for(_e).tap("HarmonyImportDependencyParserPlugin",((R,$,N)=>{const{arguments:q,callee:G}=R;const ie=v.currentTagData;const ae=getNonOptionalPart($,N);const ce=ae!==$?getNonOptionalMemberChain(G,$.length-ae.length):G;const le=ie.ids.concat(ae);const _e=new me(ie.source,ie.sourceOrder,le,ie.name,ce.range,E,ie.assertions);_e.directImport=$.length===0;_e.call=true;_e.asiSafe=!v.isAsiPosition(ce.range[0]);_e.namespaceObjectAsContext=$.length>0&&this.strictThisContextOnImports;_e.loc=ce.loc;v.state.module.addDependency(_e);if(q)v.walkExpressions(q);j.onUsage(v.state,(v=>_e.usedByExports=v));return true}));const{hotAcceptCallback:R,hotAcceptWithoutCallback:ce}=$.getParserHooks(v);R.tap("HarmonyImportDependencyParserPlugin",((E,R)=>{if(!ae.isEnabled(v.state)){return}const $=R.map((R=>{const $=new G(R);$.loc=E.loc;v.state.module.addDependency($);return $}));if($.length>0){const R=new q(E.range,$,true);R.loc=E.loc;v.state.module.addDependency(R)}}));ce.tap("HarmonyImportDependencyParserPlugin",((E,R)=>{if(!ae.isEnabled(v.state)){return}const $=R.map((R=>{const $=new G(R);$.loc=E.loc;v.state.module.addDependency($);return $}));if($.length>0){const R=new q(E.range,$,false);R.loc=E.loc;v.state.module.addDependency(R)}}))}};v.exports.harmonySpecifierTag=_e;v.exports.getAssertions=getAssertions},95913:function(v,E,R){"use strict";const $=R(65764);const j=R(58668);class HarmonyImportSideEffectDependency extends j{constructor(v,E,R){super(v,E,R)}get type(){return"harmony side effect evaluation"}getCondition(v){return E=>{const R=E.resolvedModule;if(!R)return true;return R.getSideEffectsConnectionState(v)}}getModuleEvaluationSideEffectsState(v){const E=v.getModule(this);if(!E)return true;return E.getSideEffectsConnectionState(v)}}$(HarmonyImportSideEffectDependency,"webpack/lib/dependencies/HarmonyImportSideEffectDependency");HarmonyImportSideEffectDependency.Template=class HarmonyImportSideEffectDependencyTemplate extends j.Template{apply(v,E,R){const{moduleGraph:$,concatenationScope:j}=R;if(j){const E=$.getModule(v);if(j.isModuleInScope(E)){return}}super.apply(v,E,R)}};v.exports=HarmonyImportSideEffectDependency},577:function(v,E,R){"use strict";const $=R(87056);const{getDependencyUsedByExportsCondition:j}=R(39236);const N=R(65764);const q=R(67603);const G=R(58668);const ie=Symbol("HarmonyImportSpecifierDependency.ids");const{ExportPresenceModes:ae}=G;class HarmonyImportSpecifierDependency extends G{constructor(v,E,R,$,j,N,q){super(v,E,q);this.ids=R;this.name=$;this.range=j;this.exportPresenceMode=N;this.namespaceObjectAsContext=false;this.call=undefined;this.directImport=undefined;this.shorthand=undefined;this.asiSafe=undefined;this.usedByExports=undefined}get id(){throw new Error("id was renamed to ids and type changed to string[]")}getId(){throw new Error("id was renamed to ids and type changed to string[]")}setId(){throw new Error("id was renamed to ids and type changed to string[]")}get type(){return"harmony import specifier"}getIds(v){const E=v.getMetaIfExisting(this);if(E===undefined)return this.ids;const R=E[ie];return R!==undefined?R:this.ids}setIds(v,E){v.getMeta(this)[ie]=E}getCondition(v){return j(this,this.usedByExports,v)}getModuleEvaluationSideEffectsState(v){return false}getReferencedExports(v,E){let R=this.getIds(v);if(R.length===0)return $.EXPORTS_OBJECT_REFERENCED;let j=this.namespaceObjectAsContext;if(R[0]==="default"){const E=v.getParentModule(this);const N=v.getModule(this);switch(N.getExportsType(v,E.buildMeta.strictHarmonyModule)){case"default-only":case"default-with-named":if(R.length===1)return $.EXPORTS_OBJECT_REFERENCED;R=R.slice(1);j=true;break;case"dynamic":return $.EXPORTS_OBJECT_REFERENCED}}if(this.call&&!this.directImport&&(j||R.length>1)){if(R.length===1)return $.EXPORTS_OBJECT_REFERENCED;R=R.slice(0,-1)}return[R]}_getEffectiveExportPresenceLevel(v){if(this.exportPresenceMode!==ae.AUTO)return this.exportPresenceMode;return v.getParentModule(this).buildMeta.strictHarmonyModule?ae.ERROR:ae.WARN}getWarnings(v){const E=this._getEffectiveExportPresenceLevel(v);if(E===ae.WARN){return this._getErrors(v)}return null}getErrors(v){const E=this._getEffectiveExportPresenceLevel(v);if(E===ae.ERROR){return this._getErrors(v)}return null}_getErrors(v){const E=this.getIds(v);return this.getLinkingErrors(v,E,`(imported as '${this.name}')`)}getNumberOfIdOccurrences(){return 0}serialize(v){const{write:E}=v;E(this.ids);E(this.name);E(this.range);E(this.exportPresenceMode);E(this.namespaceObjectAsContext);E(this.call);E(this.directImport);E(this.shorthand);E(this.asiSafe);E(this.usedByExports);super.serialize(v)}deserialize(v){const{read:E}=v;this.ids=E();this.name=E();this.range=E();this.exportPresenceMode=E();this.namespaceObjectAsContext=E();this.call=E();this.directImport=E();this.shorthand=E();this.asiSafe=E();this.usedByExports=E();super.deserialize(v)}}N(HarmonyImportSpecifierDependency,"webpack/lib/dependencies/HarmonyImportSpecifierDependency");HarmonyImportSpecifierDependency.Template=class HarmonyImportSpecifierDependencyTemplate extends G.Template{apply(v,E,R){const $=v;const{moduleGraph:j,runtime:N}=R;const q=j.getConnection($);if(q&&!q.isTargetActive(N))return;const G=$.getIds(j);const ie=this._getCodeForIds($,E,R,G);const ae=$.range;if($.shorthand){E.insert(ae[1],`: ${ie}`)}else{E.replace(ae[0],ae[1]-1,ie)}}_getCodeForIds(v,E,R,$){const{moduleGraph:j,module:N,runtime:G,concatenationScope:ie}=R;const ae=j.getConnection(v);let ce;if(ae&&ie&&ie.isModuleInScope(ae.module)){if($.length===0){ce=ie.createModuleReference(ae.module,{asiSafe:v.asiSafe})}else if(v.namespaceObjectAsContext&&$.length===1){ce=ie.createModuleReference(ae.module,{asiSafe:v.asiSafe})+q($)}else{ce=ie.createModuleReference(ae.module,{ids:$,call:v.call,directImport:v.directImport,asiSafe:v.asiSafe})}}else{super.apply(v,E,R);const{runtimeTemplate:q,initFragments:ie,runtimeRequirements:ae}=R;ce=q.exportFromImport({moduleGraph:j,module:j.getModule(v),request:v.request,exportName:$,originModule:N,asiSafe:v.shorthand?true:v.asiSafe,isCall:v.call,callContext:!v.directImport,defaultInterop:true,importVar:v.getImportVar(j),initFragments:ie,runtime:G,runtimeRequirements:ae})}return ce}};v.exports=HarmonyImportSpecifierDependency},43047:function(v,E,R){"use strict";const $=R(98702);const j=R(13345);const N=R(48180);const q=R(87799);const G=R(61404);const ie=R(31623);const ae=R(96577);const ce=R(22437);const le=R(95913);const me=R(577);const _e=R(69585);const Ie=R(28445);const Me=R(59152);const Oe=R(39929);class HarmonyModulesPlugin{constructor(v){this.options=v}apply(v){v.hooks.compilation.tap("HarmonyModulesPlugin",((v,{normalModuleFactory:E})=>{v.dependencyTemplates.set(N,new N.Template);v.dependencyFactories.set(le,E);v.dependencyTemplates.set(le,new le.Template);v.dependencyFactories.set(me,E);v.dependencyTemplates.set(me,new me.Template);v.dependencyFactories.set(q,E);v.dependencyTemplates.set(q,new q.Template);v.dependencyTemplates.set(ie,new ie.Template);v.dependencyTemplates.set(G,new G.Template);v.dependencyTemplates.set(ce,new ce.Template);v.dependencyFactories.set(ae,E);v.dependencyTemplates.set(ae,new ae.Template);v.dependencyTemplates.set($,new $.Template);v.dependencyFactories.set(j,E);v.dependencyTemplates.set(j,new j.Template);const handler=(v,E)=>{if(E.harmony!==undefined&&!E.harmony)return;new _e(this.options).apply(v);new Me(E).apply(v);new Ie(E).apply(v);(new Oe).apply(v)};E.hooks.parser.for("javascript/auto").tap("HarmonyModulesPlugin",handler);E.hooks.parser.for("javascript/esm").tap("HarmonyModulesPlugin",handler)}))}}v.exports=HarmonyModulesPlugin},39929:function(v,E,R){"use strict";const $=R(14367);const j=R(40699);class HarmonyTopLevelThisParserPlugin{apply(v){v.hooks.expression.for("this").tap("HarmonyTopLevelThisParserPlugin",(E=>{if(!v.scope.topLevelScope)return;if(j.isEnabled(v.state)){const R=new $("undefined",E.range,null);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return this}}))}}v.exports=HarmonyTopLevelThisParserPlugin},28801:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);const N=R(5160);class ImportContextDependency extends j{constructor(v,E,R){super(v);this.range=E;this.valueRange=R}get type(){return`import() context ${this.options.mode}`}get category(){return"esm"}serialize(v){const{write:E}=v;E(this.valueRange);super.serialize(v)}deserialize(v){const{read:E}=v;this.valueRange=E();super.deserialize(v)}}$(ImportContextDependency,"webpack/lib/dependencies/ImportContextDependency");ImportContextDependency.Template=N;v.exports=ImportContextDependency},36074:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);const N=R(99809);class ImportDependency extends N{constructor(v,E,R){super(v);this.range=E;this.referencedExports=R}get type(){return"import()"}get category(){return"esm"}getReferencedExports(v,E){return this.referencedExports?this.referencedExports.map((v=>({name:v,canMangle:false}))):$.EXPORTS_OBJECT_REFERENCED}serialize(v){v.write(this.range);v.write(this.referencedExports);super.serialize(v)}deserialize(v){this.range=v.read();this.referencedExports=v.read();super.deserialize(v)}}j(ImportDependency,"webpack/lib/dependencies/ImportDependency");ImportDependency.Template=class ImportDependencyTemplate extends N.Template{apply(v,E,{runtimeTemplate:R,module:$,moduleGraph:j,chunkGraph:N,runtimeRequirements:q}){const G=v;const ie=j.getParentBlock(G);const ae=R.moduleNamespacePromise({chunkGraph:N,block:ie,module:j.getModule(G),request:G.request,strict:$.buildMeta.strictHarmonyModule,message:"import()",runtimeRequirements:q});E.replace(G.range[0],G.range[1]-1,ae)}};v.exports=ImportDependency},29646:function(v,E,R){"use strict";const $=R(65764);const j=R(36074);class ImportEagerDependency extends j{constructor(v,E,R){super(v,E,R)}get type(){return"import() eager"}get category(){return"esm"}}$(ImportEagerDependency,"webpack/lib/dependencies/ImportEagerDependency");ImportEagerDependency.Template=class ImportEagerDependencyTemplate extends j.Template{apply(v,E,{runtimeTemplate:R,module:$,moduleGraph:j,chunkGraph:N,runtimeRequirements:q}){const G=v;const ie=R.moduleNamespacePromise({chunkGraph:N,module:j.getModule(G),request:G.request,strict:$.buildMeta.strictHarmonyModule,message:"import() eager",runtimeRequirements:q});E.replace(G.range[0],G.range[1]-1,ie)}};v.exports=ImportEagerDependency},14894:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);const N=R(59583);class ImportMetaContextDependency extends j{constructor(v,E){super(v);this.range=E}get category(){return"esm"}get type(){return`import.meta.webpackContext ${this.options.mode}`}}$(ImportMetaContextDependency,"webpack/lib/dependencies/ImportMetaContextDependency");ImportMetaContextDependency.Template=N;v.exports=ImportMetaContextDependency},81518:function(v,E,R){"use strict";const $=R(27154);const{evaluateToIdentifier:j}=R(97574);const N=R(14894);function createPropertyParseError(v,E){return createError(`Parsing import.meta.webpackContext options failed. Unknown value for property ${JSON.stringify(v.key.name)}, expected type ${E}.`,v.value.loc)}function createError(v,E){const R=new $(v);R.name="ImportMetaContextError";R.loc=E;return R}v.exports=class ImportMetaContextDependencyParserPlugin{apply(v){v.hooks.evaluateIdentifier.for("import.meta.webpackContext").tap("HotModuleReplacementPlugin",(v=>j("import.meta.webpackContext","import.meta",(()=>["webpackContext"]),true)(v)));v.hooks.call.for("import.meta.webpackContext").tap("ImportMetaContextDependencyParserPlugin",(E=>{if(E.arguments.length<1||E.arguments.length>2)return;const[R,$]=E.arguments;if($&&$.type!=="ObjectExpression")return;const j=v.evaluateExpression(R);if(!j.isString())return;const q=j.string;const G=[];let ie=/^\.\/.*$/;let ae=true;let ce="sync";let le;let me;const _e={};let Ie;let Me;if($){for(const E of $.properties){if(E.type!=="Property"||E.key.type!=="Identifier"){G.push(createError("Parsing import.meta.webpackContext options failed.",$.loc));break}switch(E.key.name){case"regExp":{const R=v.evaluateExpression(E.value);if(!R.isRegExp()){G.push(createPropertyParseError(E,"RegExp"))}else{ie=R.regExp}break}case"include":{const R=v.evaluateExpression(E.value);if(!R.isRegExp()){G.push(createPropertyParseError(E,"RegExp"))}else{le=R.regExp}break}case"exclude":{const R=v.evaluateExpression(E.value);if(!R.isRegExp()){G.push(createPropertyParseError(E,"RegExp"))}else{me=R.regExp}break}case"mode":{const R=v.evaluateExpression(E.value);if(!R.isString()){G.push(createPropertyParseError(E,"string"))}else{ce=R.string}break}case"chunkName":{const R=v.evaluateExpression(E.value);if(!R.isString()){G.push(createPropertyParseError(E,"string"))}else{Ie=R.string}break}case"exports":{const R=v.evaluateExpression(E.value);if(R.isString()){Me=[[R.string]]}else if(R.isArray()){const v=R.items;if(v.every((v=>{if(!v.isArray())return false;const E=v.items;return E.every((v=>v.isString()))}))){Me=[];for(const E of v){const v=[];for(const R of E.items){v.push(R.string)}Me.push(v)}}else{G.push(createPropertyParseError(E,"string|string[][]"))}}else{G.push(createPropertyParseError(E,"string|string[][]"))}break}case"prefetch":{const R=v.evaluateExpression(E.value);if(R.isBoolean()){_e.prefetchOrder=0}else if(R.isNumber()){_e.prefetchOrder=R.number}else{G.push(createPropertyParseError(E,"boolean|number"))}break}case"preload":{const R=v.evaluateExpression(E.value);if(R.isBoolean()){_e.preloadOrder=0}else if(R.isNumber()){_e.preloadOrder=R.number}else{G.push(createPropertyParseError(E,"boolean|number"))}break}case"recursive":{const R=v.evaluateExpression(E.value);if(!R.isBoolean()){G.push(createPropertyParseError(E,"boolean"))}else{ae=R.bool}break}default:G.push(createError(`Parsing import.meta.webpackContext options failed. Unknown property ${JSON.stringify(E.key.name)}.`,$.loc))}}}if(G.length){for(const E of G)v.state.current.addError(E);return}const Oe=new N({request:q,include:le,exclude:me,recursive:ae,regExp:ie,groupOptions:_e,chunkName:Ie,referencedExports:Me,mode:ce,category:"esm"},E.range);Oe.loc=E.loc;Oe.optional=!!v.scope.inTry;v.state.current.addDependency(Oe);return true}))}}},87790:function(v,E,R){"use strict";const $=R(34192);const j=R(14894);const N=R(81518);class ImportMetaContextPlugin{apply(v){v.hooks.compilation.tap("RequireContextPlugin",((v,{contextModuleFactory:E,normalModuleFactory:R})=>{v.dependencyFactories.set(j,E);v.dependencyTemplates.set(j,new j.Template);v.dependencyFactories.set($,R);const handler=(v,E)=>{if(E.importMetaContext!==undefined&&!E.importMetaContext)return;(new N).apply(v)};R.hooks.parser.for("javascript/auto").tap("ImportMetaContextPlugin",handler);R.hooks.parser.for("javascript/esm").tap("ImportMetaContextPlugin",handler)}))}}v.exports=ImportMetaContextPlugin},94717:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(29355);class ImportMetaHotAcceptDependency extends j{constructor(v,E){super(v);this.range=E;this.weak=true}get type(){return"import.meta.webpackHot.accept"}get category(){return"esm"}}$(ImportMetaHotAcceptDependency,"webpack/lib/dependencies/ImportMetaHotAcceptDependency");ImportMetaHotAcceptDependency.Template=N;v.exports=ImportMetaHotAcceptDependency},15491:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(29355);class ImportMetaHotDeclineDependency extends j{constructor(v,E){super(v);this.range=E;this.weak=true}get type(){return"import.meta.webpackHot.decline"}get category(){return"esm"}}$(ImportMetaHotDeclineDependency,"webpack/lib/dependencies/ImportMetaHotDeclineDependency");ImportMetaHotDeclineDependency.Template=N;v.exports=ImportMetaHotDeclineDependency},23009:function(v,E,R){"use strict";const{pathToFileURL:$}=R(57310);const j=R(76218);const N=R(43841);const q=R(94844);const{evaluateToIdentifier:G,toConstantDependency:ie,evaluateToString:ae,evaluateToNumber:ce}=R(97574);const le=R(61374);const me=R(67603);const _e=R(14367);const Ie=le((()=>R(34219)));class ImportMetaPlugin{apply(v){v.hooks.compilation.tap("ImportMetaPlugin",((v,{normalModuleFactory:E})=>{const getUrl=v=>$(v.resource).toString();const parserHandler=(E,{importMeta:$})=>{if($===false){const{importMetaName:R}=v.outputOptions;if(R==="import.meta")return;E.hooks.expression.for("import.meta").tap("ImportMetaPlugin",(v=>{const $=new _e(R,v.range);$.loc=v.loc;E.state.module.addPresentationalDependency($);return true}));return}E.hooks.typeof.for("import.meta").tap("ImportMetaPlugin",ie(E,JSON.stringify("object")));E.hooks.expression.for("import.meta").tap("ImportMetaPlugin",(v=>{const R=Ie();E.state.module.addWarning(new j(E.state.module,new R("Accessing import.meta directly is unsupported (only property access is supported)"),v.loc));const $=new _e(`${E.isAsiPosition(v.range[0])?";":""}({})`,v.range);$.loc=v.loc;E.state.module.addPresentationalDependency($);return true}));E.hooks.evaluateTypeof.for("import.meta").tap("ImportMetaPlugin",ae("object"));E.hooks.evaluateIdentifier.for("import.meta").tap("ImportMetaPlugin",G("import.meta","import.meta",(()=>[]),true));E.hooks.typeof.for("import.meta.url").tap("ImportMetaPlugin",ie(E,JSON.stringify("string")));E.hooks.expression.for("import.meta.url").tap("ImportMetaPlugin",(v=>{const R=new _e(JSON.stringify(getUrl(E.state.module)),v.range);R.loc=v.loc;E.state.module.addPresentationalDependency(R);return true}));E.hooks.evaluateTypeof.for("import.meta.url").tap("ImportMetaPlugin",ae("string"));E.hooks.evaluateIdentifier.for("import.meta.url").tap("ImportMetaPlugin",(v=>(new q).setString(getUrl(E.state.module)).setRange(v.range)));const le=parseInt(R(27012).i8,10);E.hooks.typeof.for("import.meta.webpack").tap("ImportMetaPlugin",ie(E,JSON.stringify("number")));E.hooks.expression.for("import.meta.webpack").tap("ImportMetaPlugin",ie(E,JSON.stringify(le)));E.hooks.evaluateTypeof.for("import.meta.webpack").tap("ImportMetaPlugin",ae("number"));E.hooks.evaluateIdentifier.for("import.meta.webpack").tap("ImportMetaPlugin",ce(le));E.hooks.unhandledExpressionMemberChain.for("import.meta").tap("ImportMetaPlugin",((v,R)=>{const $=new _e(`${N.toNormalComment("unsupported import.meta."+R.join("."))} undefined${me(R,1)}`,v.range);$.loc=v.loc;E.state.module.addPresentationalDependency($);return true}));E.hooks.evaluate.for("MemberExpression").tap("ImportMetaPlugin",(v=>{const E=v;if(E.object.type==="MetaProperty"&&E.object.meta.name==="import"&&E.object.property.name==="meta"&&E.property.type===(E.computed?"Literal":"Identifier")){return(new q).setUndefined().setRange(E.range)}}))};E.hooks.parser.for("javascript/auto").tap("ImportMetaPlugin",parserHandler);E.hooks.parser.for("javascript/esm").tap("ImportMetaPlugin",parserHandler)}))}}v.exports=ImportMetaPlugin},41018:function(v,E,R){"use strict";const $=R(42290);const j=R(54437);const N=R(17623);const q=R(32556);const G=R(28801);const ie=R(36074);const ae=R(29646);const ce=R(97001);class ImportParserPlugin{constructor(v){this.options=v}apply(v){v.hooks.importCall.tap("ImportParserPlugin",(E=>{const R=v.evaluateExpression(E.source);let le=null;let me=this.options.dynamicImportMode;let _e=null;let Ie=null;let Me=null;const Oe={};const{dynamicImportPreload:Te,dynamicImportPrefetch:Ne}=this.options;if(Te!==undefined&&Te!==false)Oe.preloadOrder=Te===true?0:Te;if(Ne!==undefined&&Ne!==false)Oe.prefetchOrder=Ne===true?0:Ne;const{options:Be,errors:Le}=v.parseCommentOptions(E.range);if(Le){for(const E of Le){const{comment:R}=E;v.state.module.addWarning(new j(`Compilation error while processing magic comment(-s): /*${R.value}*/: ${E.message}`,R.loc))}}if(Be){if(Be.webpackIgnore!==undefined){if(typeof Be.webpackIgnore!=="boolean"){v.state.module.addWarning(new N(`\`webpackIgnore\` expected a boolean, but received: ${Be.webpackIgnore}.`,E.loc))}else{if(Be.webpackIgnore){return false}}}if(Be.webpackChunkName!==undefined){if(typeof Be.webpackChunkName!=="string"){v.state.module.addWarning(new N(`\`webpackChunkName\` expected a string, but received: ${Be.webpackChunkName}.`,E.loc))}else{le=Be.webpackChunkName}}if(Be.webpackMode!==undefined){if(typeof Be.webpackMode!=="string"){v.state.module.addWarning(new N(`\`webpackMode\` expected a string, but received: ${Be.webpackMode}.`,E.loc))}else{me=Be.webpackMode}}if(Be.webpackPrefetch!==undefined){if(Be.webpackPrefetch===true){Oe.prefetchOrder=0}else if(typeof Be.webpackPrefetch==="number"){Oe.prefetchOrder=Be.webpackPrefetch}else{v.state.module.addWarning(new N(`\`webpackPrefetch\` expected true or a number, but received: ${Be.webpackPrefetch}.`,E.loc))}}if(Be.webpackPreload!==undefined){if(Be.webpackPreload===true){Oe.preloadOrder=0}else if(typeof Be.webpackPreload==="number"){Oe.preloadOrder=Be.webpackPreload}else{v.state.module.addWarning(new N(`\`webpackPreload\` expected true or a number, but received: ${Be.webpackPreload}.`,E.loc))}}if(Be.webpackInclude!==undefined){if(!Be.webpackInclude||Be.webpackInclude.constructor.name!=="RegExp"){v.state.module.addWarning(new N(`\`webpackInclude\` expected a regular expression, but received: ${Be.webpackInclude}.`,E.loc))}else{_e=new RegExp(Be.webpackInclude)}}if(Be.webpackExclude!==undefined){if(!Be.webpackExclude||Be.webpackExclude.constructor.name!=="RegExp"){v.state.module.addWarning(new N(`\`webpackExclude\` expected a regular expression, but received: ${Be.webpackExclude}.`,E.loc))}else{Ie=new RegExp(Be.webpackExclude)}}if(Be.webpackExports!==undefined){if(!(typeof Be.webpackExports==="string"||Array.isArray(Be.webpackExports)&&Be.webpackExports.every((v=>typeof v==="string")))){v.state.module.addWarning(new N(`\`webpackExports\` expected a string or an array of strings, but received: ${Be.webpackExports}.`,E.loc))}else{if(typeof Be.webpackExports==="string"){Me=[[Be.webpackExports]]}else{Me=Array.from(Be.webpackExports,(v=>[v]))}}}}if(me!=="lazy"&&me!=="lazy-once"&&me!=="eager"&&me!=="weak"){v.state.module.addWarning(new N(`\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${me}.`,E.loc));me="lazy"}if(R.isString()){if(me==="eager"){const $=new ae(R.string,E.range,Me);v.state.current.addDependency($)}else if(me==="weak"){const $=new ce(R.string,E.range,Me);v.state.current.addDependency($)}else{const j=new $({...Oe,name:le},E.loc,R.string);const N=new ie(R.string,E.range,Me);N.loc=E.loc;j.addDependency(N);v.state.current.addBlock(j)}return true}else{if(me==="weak"){me="async-weak"}const $=q.create(G,E.range,R,E,this.options,{chunkName:le,groupOptions:Oe,include:_e,exclude:Ie,mode:me,namespaceObject:v.state.module.buildMeta.strictHarmonyModule?"strict":true,typePrefix:"import()",category:"esm",referencedExports:Me},v);if(!$)return;$.loc=E.loc;$.optional=!!v.scope.inTry;v.state.current.addDependency($);return true}}))}}v.exports=ImportParserPlugin},7604:function(v,E,R){"use strict";const $=R(28801);const j=R(36074);const N=R(29646);const q=R(41018);const G=R(97001);class ImportPlugin{apply(v){v.hooks.compilation.tap("ImportPlugin",((v,{contextModuleFactory:E,normalModuleFactory:R})=>{v.dependencyFactories.set(j,R);v.dependencyTemplates.set(j,new j.Template);v.dependencyFactories.set(N,R);v.dependencyTemplates.set(N,new N.Template);v.dependencyFactories.set(G,R);v.dependencyTemplates.set(G,new G.Template);v.dependencyFactories.set($,E);v.dependencyTemplates.set($,new $.Template);const handler=(v,E)=>{if(E.import!==undefined&&!E.import)return;new q(E).apply(v)};R.hooks.parser.for("javascript/auto").tap("ImportPlugin",handler);R.hooks.parser.for("javascript/dynamic").tap("ImportPlugin",handler);R.hooks.parser.for("javascript/esm").tap("ImportPlugin",handler)}))}}v.exports=ImportPlugin},97001:function(v,E,R){"use strict";const $=R(65764);const j=R(36074);class ImportWeakDependency extends j{constructor(v,E,R){super(v,E,R);this.weak=true}get type(){return"import() weak"}}$(ImportWeakDependency,"webpack/lib/dependencies/ImportWeakDependency");ImportWeakDependency.Template=class ImportDependencyTemplate extends j.Template{apply(v,E,{runtimeTemplate:R,module:$,moduleGraph:j,chunkGraph:N,runtimeRequirements:q}){const G=v;const ie=R.moduleNamespacePromise({chunkGraph:N,module:j.getModule(G),request:G.request,strict:$.buildMeta.strictHarmonyModule,message:"import() weak",weak:true,runtimeRequirements:q});E.replace(G.range[0],G.range[1]-1,ie)}};v.exports=ImportWeakDependency},67762:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);const getExportsFromData=v=>{if(v&&typeof v==="object"){if(Array.isArray(v)){return v.length<100?v.map(((v,E)=>({name:`${E}`,canMangle:true,exports:getExportsFromData(v)}))):undefined}else{const E=[];for(const R of Object.keys(v)){E.push({name:R,canMangle:true,exports:getExportsFromData(v[R])})}return E}}return undefined};class JsonExportsDependency extends j{constructor(v){super();this.data=v}get type(){return"json exports"}getExports(v){return{exports:getExportsFromData(this.data&&this.data.get()),dependencies:undefined}}updateHash(v,E){this.data.updateHash(v)}serialize(v){const{write:E}=v;E(this.data);super.serialize(v)}deserialize(v){const{read:E}=v;this.data=E();super.deserialize(v)}}$(JsonExportsDependency,"webpack/lib/dependencies/JsonExportsDependency");v.exports=JsonExportsDependency},21749:function(v,E,R){"use strict";const $=R(99809);class LoaderDependency extends ${constructor(v){super(v)}get type(){return"loader"}get category(){return"loader"}getCondition(v){return false}}v.exports=LoaderDependency},77779:function(v,E,R){"use strict";const $=R(99809);class LoaderImportDependency extends ${constructor(v){super(v);this.weak=true}get type(){return"loader import"}get category(){return"loaderImport"}getCondition(v){return false}}v.exports=LoaderImportDependency},21422:function(v,E,R){"use strict";const $=R(89417);const j=R(96522);const N=R(21749);const q=R(77779);class LoaderPlugin{constructor(v={}){}apply(v){v.hooks.compilation.tap("LoaderPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(N,E);v.dependencyFactories.set(q,E)}));v.hooks.compilation.tap("LoaderPlugin",(v=>{const E=v.moduleGraph;$.getCompilationHooks(v).loader.tap("LoaderPlugin",(R=>{R.loadModule=($,q)=>{const G=new N($);G.loc={name:$};const ie=v.dependencyFactories.get(G.constructor);if(ie===undefined){return q(new Error(`No module factory available for dependency type: ${G.constructor.name}`))}v.buildQueue.increaseParallelism();v.handleModuleCreation({factory:ie,dependencies:[G],originModule:R._module,context:R.context,recursive:false},($=>{v.buildQueue.decreaseParallelism();if($){return q($)}const N=E.getModule(G);if(!N){return q(new Error("Cannot load the module"))}if(N.getNumberOfErrors()>0){return q(new Error("The loaded module contains errors"))}const ie=N.originalSource();if(!ie){return q(new Error("The module created for a LoaderDependency must have an original source"))}let ae,ce;if(ie.sourceAndMap){const v=ie.sourceAndMap();ce=v.map;ae=v.source}else{ce=ie.map();ae=ie.source()}const le=new j;const me=new j;const _e=new j;const Ie=new j;N.addCacheDependencies(le,me,_e,Ie);for(const v of le){R.addDependency(v)}for(const v of me){R.addContextDependency(v)}for(const v of _e){R.addMissingDependency(v)}for(const v of Ie){R.addBuildDependency(v)}return q(null,ae,ce,N)}))};const importModule=($,j,N)=>{const G=new q($);G.loc={name:$};const ie=v.dependencyFactories.get(G.constructor);if(ie===undefined){return N(new Error(`No module factory available for dependency type: ${G.constructor.name}`))}v.buildQueue.increaseParallelism();v.handleModuleCreation({factory:ie,dependencies:[G],originModule:R._module,contextInfo:{issuerLayer:j.layer},context:R.context,connectOrigin:false},($=>{v.buildQueue.decreaseParallelism();if($){return N($)}const q=E.getModule(G);if(!q){return N(new Error("Cannot load the module"))}v.executeModule(q,{entryOptions:{baseUri:j.baseUri,publicPath:j.publicPath}},((v,E)=>{if(v)return N(v);for(const v of E.fileDependencies){R.addDependency(v)}for(const v of E.contextDependencies){R.addContextDependency(v)}for(const v of E.missingDependencies){R.addMissingDependency(v)}for(const v of E.buildDependencies){R.addBuildDependency(v)}if(E.cacheable===false)R.cacheable(false);for(const[v,{source:$,info:j}]of E.assets){const{buildInfo:E}=R._module;if(!E.assets){E.assets=Object.create(null);E.assetsInfo=new Map}E.assets[v]=$;E.assetsInfo.set(v,j)}N(null,E.exports)}))}))};R.importModule=(v,E,R)=>{if(!R){return new Promise(((R,$)=>{importModule(v,E||{},((v,E)=>{if(v)$(v);else R(E)}))}))}return importModule(v,E||{},R)}}))}))}}v.exports=LoaderPlugin},71195:function(v,E,R){"use strict";const $=R(65764);class LocalModule{constructor(v,E){this.name=v;this.idx=E;this.used=false}flagUsed(){this.used=true}variableName(){return"__WEBPACK_LOCAL_MODULE_"+this.idx+"__"}serialize(v){const{write:E}=v;E(this.name);E(this.idx);E(this.used)}deserialize(v){const{read:E}=v;this.name=E();this.idx=E();this.used=E()}}$(LocalModule,"webpack/lib/dependencies/LocalModule");v.exports=LocalModule},81600:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class LocalModuleDependency extends j{constructor(v,E,R){super();this.localModule=v;this.range=E;this.callNew=R}serialize(v){const{write:E}=v;E(this.localModule);E(this.range);E(this.callNew);super.serialize(v)}deserialize(v){const{read:E}=v;this.localModule=E();this.range=E();this.callNew=E();super.deserialize(v)}}$(LocalModuleDependency,"webpack/lib/dependencies/LocalModuleDependency");LocalModuleDependency.Template=class LocalModuleDependencyTemplate extends j.Template{apply(v,E,R){const $=v;if(!$.range)return;const j=$.callNew?`new (function () { return ${$.localModule.variableName()}; })()`:$.localModule.variableName();E.replace($.range[0],$.range[1]-1,j)}};v.exports=LocalModuleDependency},59081:function(v,E,R){"use strict";const $=R(71195);const lookup=(v,E)=>{if(E.charAt(0)!==".")return E;var R=v.split("/");var $=E.split("/");R.pop();for(let v=0;v<$.length;v++){const E=$[v];if(E===".."){R.pop()}else if(E!=="."){R.push(E)}}return R.join("/")};E.addLocalModule=(v,E)=>{if(!v.localModules){v.localModules=[]}const R=new $(E,v.localModules.length);v.localModules.push(R);return R};E.getLocalModule=(v,E,R)=>{if(!v.localModules)return null;if(R){E=lookup(R,E)}for(let R=0;RR(71133)));class ModuleDependency extends ${constructor(v){super();this.request=v;this.userRequest=v;this.range=undefined;this.assertions=undefined;this._context=undefined}getContext(){return this._context}getResourceIdentifier(){let v=`context${this._context||""}|module${this.request}`;if(this.assertions!==undefined){v+=JSON.stringify(this.assertions)}return v}couldAffectReferencingModule(){return true}createIgnoredModule(v){const E=q();return new E("/* (ignored) */",`ignored|${v}|${this.request}`,`${this.request} (ignored)`)}serialize(v){const{write:E}=v;E(this.request);E(this.userRequest);E(this._context);E(this.range);super.serialize(v)}deserialize(v){const{read:E}=v;this.request=E();this.userRequest=E();this._context=E();this.range=E();super.deserialize(v)}}ModuleDependency.Template=j;v.exports=ModuleDependency},29355:function(v,E,R){"use strict";const $=R(99809);class ModuleDependencyTemplateAsId extends $.Template{apply(v,E,{runtimeTemplate:R,moduleGraph:$,chunkGraph:j}){const N=v;if(!N.range)return;const q=R.moduleId({module:$.getModule(N),chunkGraph:j,request:N.request,weak:N.weak});E.replace(N.range[0],N.range[1]-1,q)}}v.exports=ModuleDependencyTemplateAsId},59583:function(v,E,R){"use strict";const $=R(99809);class ModuleDependencyTemplateAsRequireId extends $.Template{apply(v,E,{runtimeTemplate:R,moduleGraph:$,chunkGraph:j,runtimeRequirements:N}){const q=v;if(!q.range)return;const G=R.moduleExports({module:$.getModule(q),chunkGraph:j,request:q.request,weak:q.weak,runtimeRequirements:N});E.replace(q.range[0],q.range[1]-1,G)}}v.exports=ModuleDependencyTemplateAsRequireId},72674:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(29355);class ModuleHotAcceptDependency extends j{constructor(v,E){super(v);this.range=E;this.weak=true}get type(){return"module.hot.accept"}get category(){return"commonjs"}}$(ModuleHotAcceptDependency,"webpack/lib/dependencies/ModuleHotAcceptDependency");ModuleHotAcceptDependency.Template=N;v.exports=ModuleHotAcceptDependency},40213:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(29355);class ModuleHotDeclineDependency extends j{constructor(v,E){super(v);this.range=E;this.weak=true}get type(){return"module.hot.decline"}get category(){return"commonjs"}}$(ModuleHotDeclineDependency,"webpack/lib/dependencies/ModuleHotDeclineDependency");ModuleHotDeclineDependency.Template=N;v.exports=ModuleHotDeclineDependency},91596:function(v,E,R){"use strict";const $=R(87056);const j=R(94086);class NullDependency extends ${get type(){return"null"}couldAffectReferencingModule(){return false}}NullDependency.Template=class NullDependencyTemplate extends j{apply(v,E,R){}};v.exports=NullDependency},45851:function(v,E,R){"use strict";const $=R(99809);class PrefetchDependency extends ${constructor(v){super(v)}get type(){return"prefetch"}get category(){return"esm"}}v.exports=PrefetchDependency},13996:function(v,E,R){"use strict";const $=R(87056);const j=R(64768);const N=R(65764);const q=R(99809);const pathToString=v=>v!==null&&v.length>0?v.map((v=>`[${JSON.stringify(v)}]`)).join(""):"";class ProvidedDependency extends q{constructor(v,E,R,$){super(v);this.identifier=E;this.ids=R;this.range=$;this._hashUpdate=undefined}get type(){return"provided"}get category(){return"esm"}getReferencedExports(v,E){let R=this.ids;if(R.length===0)return $.EXPORTS_OBJECT_REFERENCED;return[R]}updateHash(v,E){if(this._hashUpdate===undefined){this._hashUpdate=this.identifier+(this.ids?this.ids.join(","):"")}v.update(this._hashUpdate)}serialize(v){const{write:E}=v;E(this.identifier);E(this.ids);super.serialize(v)}deserialize(v){const{read:E}=v;this.identifier=E();this.ids=E();super.deserialize(v)}}N(ProvidedDependency,"webpack/lib/dependencies/ProvidedDependency");class ProvidedDependencyTemplate extends q.Template{apply(v,E,{runtime:R,runtimeTemplate:$,moduleGraph:N,chunkGraph:q,initFragments:G,runtimeRequirements:ie}){const ae=v;const ce=N.getConnection(ae);const le=N.getExportsInfo(ce.module);const me=le.getUsedName(ae.ids,R);G.push(new j(`/* provided dependency */ var ${ae.identifier} = ${$.moduleExports({module:N.getModule(ae),chunkGraph:q,request:ae.request,runtimeRequirements:ie})}${pathToString(me)};\n`,j.STAGE_PROVIDES,1,`provided ${ae.identifier}`));E.replace(ae.range[0],ae.range[1]-1,ae.identifier)}}ProvidedDependency.Template=ProvidedDependencyTemplate;v.exports=ProvidedDependency},72926:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const j=R(65764);const{filterRuntime:N}=R(47462);const q=R(91596);class PureExpressionDependency extends q{constructor(v){super();this.range=v;this.usedByExports=false;this._hashUpdate=undefined}updateHash(v,E){if(this._hashUpdate===undefined){this._hashUpdate=this.range+""}v.update(this._hashUpdate)}getModuleEvaluationSideEffectsState(v){return false}serialize(v){const{write:E}=v;E(this.range);E(this.usedByExports);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.usedByExports=E();super.deserialize(v)}}j(PureExpressionDependency,"webpack/lib/dependencies/PureExpressionDependency");PureExpressionDependency.Template=class PureExpressionDependencyTemplate extends q.Template{apply(v,E,{chunkGraph:R,moduleGraph:j,runtime:q,runtimeTemplate:G,runtimeRequirements:ie}){const ae=v;const ce=ae.usedByExports;if(ce!==false){const v=j.getParentModule(ae);const le=j.getExportsInfo(v);const me=N(q,(v=>{for(const E of ce){if(le.getUsed(E,v)!==$.Unused){return true}}return false}));if(me===true)return;if(me!==false){const v=G.runtimeConditionExpression({chunkGraph:R,runtime:q,runtimeCondition:me,runtimeRequirements:ie});E.insert(ae.range[0],`(/* runtime-dependent pure expression or super */ ${v} ? (`);E.insert(ae.range[1],") : null)");return}}E.insert(ae.range[0],`(/* unused pure expression or super */ null && (`);E.insert(ae.range[1],"))")}};v.exports=PureExpressionDependency},30174:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);const N=R(59583);class RequireContextDependency extends j{constructor(v,E){super(v);this.range=E}get type(){return"require.context"}}$(RequireContextDependency,"webpack/lib/dependencies/RequireContextDependency");RequireContextDependency.Template=N;v.exports=RequireContextDependency},21239:function(v,E,R){"use strict";const $=R(30174);v.exports=class RequireContextDependencyParserPlugin{apply(v){v.hooks.call.for("require.context").tap("RequireContextDependencyParserPlugin",(E=>{let R=/^\.\/.*$/;let j=true;let N="sync";switch(E.arguments.length){case 4:{const R=v.evaluateExpression(E.arguments[3]);if(!R.isString())return;N=R.string}case 3:{const $=v.evaluateExpression(E.arguments[2]);if(!$.isRegExp())return;R=$.regExp}case 2:{const R=v.evaluateExpression(E.arguments[1]);if(!R.isBoolean())return;j=R.bool}case 1:{const q=v.evaluateExpression(E.arguments[0]);if(!q.isString())return;const G=new $({request:q.string,recursive:j,regExp:R,mode:N,category:"commonjs"},E.range);G.loc=E.loc;G.optional=!!v.scope.inTry;v.state.current.addDependency(G);return true}}}))}}},52138:function(v,E,R){"use strict";const{cachedSetProperty:$}=R(22093);const j=R(34192);const N=R(30174);const q=R(21239);const G={};class RequireContextPlugin{apply(v){v.hooks.compilation.tap("RequireContextPlugin",((E,{contextModuleFactory:R,normalModuleFactory:ie})=>{E.dependencyFactories.set(N,R);E.dependencyTemplates.set(N,new N.Template);E.dependencyFactories.set(j,ie);const handler=(v,E)=>{if(E.requireContext!==undefined&&!E.requireContext)return;(new q).apply(v)};ie.hooks.parser.for("javascript/auto").tap("RequireContextPlugin",handler);ie.hooks.parser.for("javascript/dynamic").tap("RequireContextPlugin",handler);R.hooks.alternativeRequests.tap("RequireContextPlugin",((E,R)=>{if(E.length===0)return E;const j=v.resolverFactory.get("normal",$(R.resolveOptions||G,"dependencyType",R.category)).options;let N;if(!j.fullySpecified){N=[];for(const v of E){const{request:E,context:R}=v;for(const v of j.extensions){if(E.endsWith(v)){N.push({context:R,request:E.slice(0,-v.length)})}}if(!j.enforceExtension){N.push(v)}}E=N;N=[];for(const v of E){const{request:E,context:R}=v;for(const v of j.mainFiles){if(E.endsWith(`/${v}`)){N.push({context:R,request:E.slice(0,-v.length)});N.push({context:R,request:E.slice(0,-v.length-1)})}}N.push(v)}E=N}N=[];for(const v of E){let E=false;for(const R of j.modules){if(Array.isArray(R)){for(const $ of R){if(v.request.startsWith(`./${$}/`)){N.push({context:v.context,request:v.request.slice($.length+3)});E=true}}}else{const E=R.replace(/\\/g,"/");const $=v.context.replace(/\\/g,"/")+v.request.slice(1);if($.startsWith(E)){N.push({context:v.context,request:$.slice(E.length+1)})}}}if(!E){N.push(v)}}return N}))}))}}v.exports=RequireContextPlugin},45375:function(v,E,R){"use strict";const $=R(42290);const j=R(65764);class RequireEnsureDependenciesBlock extends ${constructor(v,E){super(v,E,null)}}j(RequireEnsureDependenciesBlock,"webpack/lib/dependencies/RequireEnsureDependenciesBlock");v.exports=RequireEnsureDependenciesBlock},79424:function(v,E,R){"use strict";const $=R(45375);const j=R(87182);const N=R(33154);const q=R(17926);v.exports=class RequireEnsureDependenciesBlockParserPlugin{apply(v){v.hooks.call.for("require.ensure").tap("RequireEnsureDependenciesBlockParserPlugin",(E=>{let R=null;let G=null;let ie=null;switch(E.arguments.length){case 4:{const $=v.evaluateExpression(E.arguments[3]);if(!$.isString())return;R=$.string}case 3:{G=E.arguments[2];ie=q(G);if(!ie&&!R){const $=v.evaluateExpression(E.arguments[2]);if(!$.isString())return;R=$.string}}case 2:{const ae=v.evaluateExpression(E.arguments[0]);const ce=ae.isArray()?ae.items:[ae];const le=E.arguments[1];const me=q(le);if(me){v.walkExpressions(me.expressions)}if(ie){v.walkExpressions(ie.expressions)}const _e=new $(R,E.loc);const Ie=E.arguments.length===4||!R&&E.arguments.length===3;const Me=new j(E.range,E.arguments[1].range,Ie&&E.arguments[2].range);Me.loc=E.loc;_e.addDependency(Me);const Oe=v.state.current;v.state.current=_e;try{let R=false;v.inScope([],(()=>{for(const v of ce){if(v.isString()){const R=new N(v.string);R.loc=v.loc||E.loc;_e.addDependency(R)}else{R=true}}}));if(R){return}if(me){if(me.fn.body.type==="BlockStatement"){v.walkStatement(me.fn.body)}else{v.walkExpression(me.fn.body)}}Oe.addBlock(_e)}finally{v.state.current=Oe}if(!me){v.walkExpression(le)}if(ie){if(ie.fn.body.type==="BlockStatement"){v.walkStatement(ie.fn.body)}else{v.walkExpression(ie.fn.body)}}else if(G){v.walkExpression(G)}return true}}}))}}},87182:function(v,E,R){"use strict";const $=R(39201);const j=R(65764);const N=R(91596);class RequireEnsureDependency extends N{constructor(v,E,R){super();this.range=v;this.contentRange=E;this.errorHandlerRange=R}get type(){return"require.ensure"}serialize(v){const{write:E}=v;E(this.range);E(this.contentRange);E(this.errorHandlerRange);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.contentRange=E();this.errorHandlerRange=E();super.deserialize(v)}}j(RequireEnsureDependency,"webpack/lib/dependencies/RequireEnsureDependency");RequireEnsureDependency.Template=class RequireEnsureDependencyTemplate extends N.Template{apply(v,E,{runtimeTemplate:R,moduleGraph:j,chunkGraph:N,runtimeRequirements:q}){const G=v;const ie=j.getParentBlock(G);const ae=R.blockPromise({chunkGraph:N,block:ie,message:"require.ensure",runtimeRequirements:q});const ce=G.range;const le=G.contentRange;const me=G.errorHandlerRange;E.replace(ce[0],le[0]-1,`${ae}.then((`);if(me){E.replace(le[1],me[0]-1,").bind(null, __webpack_require__))['catch'](");E.replace(me[1],ce[1]-1,")")}else{E.replace(le[1],ce[1]-1,`).bind(null, __webpack_require__))['catch'](${$.uncaughtErrorHandler})`)}}};v.exports=RequireEnsureDependency},33154:function(v,E,R){"use strict";const $=R(65764);const j=R(99809);const N=R(91596);class RequireEnsureItemDependency extends j{constructor(v){super(v)}get type(){return"require.ensure item"}get category(){return"commonjs"}}$(RequireEnsureItemDependency,"webpack/lib/dependencies/RequireEnsureItemDependency");RequireEnsureItemDependency.Template=N.Template;v.exports=RequireEnsureItemDependency},26278:function(v,E,R){"use strict";const $=R(87182);const j=R(33154);const N=R(79424);const{evaluateToString:q,toConstantDependency:G}=R(97574);class RequireEnsurePlugin{apply(v){v.hooks.compilation.tap("RequireEnsurePlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(j,E);v.dependencyTemplates.set(j,new j.Template);v.dependencyTemplates.set($,new $.Template);const handler=(v,E)=>{if(E.requireEnsure!==undefined&&!E.requireEnsure)return;(new N).apply(v);v.hooks.evaluateTypeof.for("require.ensure").tap("RequireEnsurePlugin",q("function"));v.hooks.typeof.for("require.ensure").tap("RequireEnsurePlugin",G(v,JSON.stringify("function")))};E.hooks.parser.for("javascript/auto").tap("RequireEnsurePlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("RequireEnsurePlugin",handler)}))}}v.exports=RequireEnsurePlugin},61820:function(v,E,R){"use strict";const $=R(39201);const j=R(65764);const N=R(91596);class RequireHeaderDependency extends N{constructor(v){super();if(!Array.isArray(v))throw new Error("range must be valid");this.range=v}serialize(v){const{write:E}=v;E(this.range);super.serialize(v)}static deserialize(v){const E=new RequireHeaderDependency(v.read());E.deserialize(v);return E}}j(RequireHeaderDependency,"webpack/lib/dependencies/RequireHeaderDependency");RequireHeaderDependency.Template=class RequireHeaderDependencyTemplate extends N.Template{apply(v,E,{runtimeRequirements:R}){const j=v;R.add($.require);E.replace(j.range[0],j.range[1]-1,"__webpack_require__")}};v.exports=RequireHeaderDependency},90040:function(v,E,R){"use strict";const $=R(87056);const j=R(43841);const N=R(65764);const q=R(99809);class RequireIncludeDependency extends q{constructor(v,E){super(v);this.range=E}getReferencedExports(v,E){return $.NO_EXPORTS_REFERENCED}get type(){return"require.include"}get category(){return"commonjs"}}N(RequireIncludeDependency,"webpack/lib/dependencies/RequireIncludeDependency");RequireIncludeDependency.Template=class RequireIncludeDependencyTemplate extends q.Template{apply(v,E,{runtimeTemplate:R}){const $=v;const N=R.outputOptions.pathinfo?j.toComment(`require.include ${R.requestShortener.shorten($.request)}`):"";E.replace($.range[0],$.range[1]-1,`undefined${N}`)}};v.exports=RequireIncludeDependency},98034:function(v,E,R){"use strict";const $=R(27154);const{evaluateToString:j,toConstantDependency:N}=R(97574);const q=R(65764);const G=R(90040);v.exports=class RequireIncludeDependencyParserPlugin{constructor(v){this.warn=v}apply(v){const{warn:E}=this;v.hooks.call.for("require.include").tap("RequireIncludeDependencyParserPlugin",(R=>{if(R.arguments.length!==1)return;const $=v.evaluateExpression(R.arguments[0]);if(!$.isString())return;if(E){v.state.module.addWarning(new RequireIncludeDeprecationWarning(R.loc))}const j=new G($.string,R.range);j.loc=R.loc;v.state.current.addDependency(j);return true}));v.hooks.evaluateTypeof.for("require.include").tap("RequireIncludePlugin",(R=>{if(E){v.state.module.addWarning(new RequireIncludeDeprecationWarning(R.loc))}return j("function")(R)}));v.hooks.typeof.for("require.include").tap("RequireIncludePlugin",(R=>{if(E){v.state.module.addWarning(new RequireIncludeDeprecationWarning(R.loc))}return N(v,JSON.stringify("function"))(R)}))}};class RequireIncludeDeprecationWarning extends ${constructor(v){super("require.include() is deprecated and will be removed soon.");this.name="RequireIncludeDeprecationWarning";this.loc=v}}q(RequireIncludeDeprecationWarning,"webpack/lib/dependencies/RequireIncludeDependencyParserPlugin","RequireIncludeDeprecationWarning")},75061:function(v,E,R){"use strict";const $=R(90040);const j=R(98034);class RequireIncludePlugin{apply(v){v.hooks.compilation.tap("RequireIncludePlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set($,E);v.dependencyTemplates.set($,new $.Template);const handler=(v,E)=>{if(E.requireInclude===false)return;const R=E.requireInclude===undefined;new j(R).apply(v)};E.hooks.parser.for("javascript/auto").tap("RequireIncludePlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("RequireIncludePlugin",handler)}))}}v.exports=RequireIncludePlugin},99703:function(v,E,R){"use strict";const $=R(65764);const j=R(22429);const N=R(44967);class RequireResolveContextDependency extends j{constructor(v,E,R,$){super(v,$);this.range=E;this.valueRange=R}get type(){return"amd require context"}serialize(v){const{write:E}=v;E(this.range);E(this.valueRange);super.serialize(v)}deserialize(v){const{read:E}=v;this.range=E();this.valueRange=E();super.deserialize(v)}}$(RequireResolveContextDependency,"webpack/lib/dependencies/RequireResolveContextDependency");RequireResolveContextDependency.Template=N;v.exports=RequireResolveContextDependency},57485:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);const N=R(99809);const q=R(29355);class RequireResolveDependency extends N{constructor(v,E,R){super(v);this.range=E;this._context=R}get type(){return"require.resolve"}get category(){return"commonjs"}getReferencedExports(v,E){return $.NO_EXPORTS_REFERENCED}}j(RequireResolveDependency,"webpack/lib/dependencies/RequireResolveDependency");RequireResolveDependency.Template=q;v.exports=RequireResolveDependency},2254:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class RequireResolveHeaderDependency extends j{constructor(v){super();if(!Array.isArray(v))throw new Error("range must be valid");this.range=v}serialize(v){const{write:E}=v;E(this.range);super.serialize(v)}static deserialize(v){const E=new RequireResolveHeaderDependency(v.read());E.deserialize(v);return E}}$(RequireResolveHeaderDependency,"webpack/lib/dependencies/RequireResolveHeaderDependency");RequireResolveHeaderDependency.Template=class RequireResolveHeaderDependencyTemplate extends j.Template{apply(v,E,R){const $=v;E.replace($.range[0],$.range[1]-1,"/*require.resolve*/")}applyAsTemplateArgument(v,E,R){R.replace(E.range[0],E.range[1]-1,"/*require.resolve*/")}};v.exports=RequireResolveHeaderDependency},12446:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class RuntimeRequirementsDependency extends j{constructor(v){super();this.runtimeRequirements=new Set(v);this._hashUpdate=undefined}updateHash(v,E){if(this._hashUpdate===undefined){this._hashUpdate=Array.from(this.runtimeRequirements).join()+""}v.update(this._hashUpdate)}serialize(v){const{write:E}=v;E(this.runtimeRequirements);super.serialize(v)}deserialize(v){const{read:E}=v;this.runtimeRequirements=E();super.deserialize(v)}}$(RuntimeRequirementsDependency,"webpack/lib/dependencies/RuntimeRequirementsDependency");RuntimeRequirementsDependency.Template=class RuntimeRequirementsDependencyTemplate extends j.Template{apply(v,E,{runtimeRequirements:R}){const $=v;for(const v of $.runtimeRequirements){R.add(v)}}};v.exports=RuntimeRequirementsDependency},19383:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class StaticExportsDependency extends j{constructor(v,E){super();this.exports=v;this.canMangle=E}get type(){return"static exports"}getExports(v){return{exports:this.exports,canMangle:this.canMangle,dependencies:undefined}}serialize(v){const{write:E}=v;E(this.exports);E(this.canMangle);super.serialize(v)}deserialize(v){const{read:E}=v;this.exports=E();this.canMangle=E();super.deserialize(v)}}$(StaticExportsDependency,"webpack/lib/dependencies/StaticExportsDependency");v.exports=StaticExportsDependency},90020:function(v,E,R){"use strict";const $=R(39201);const j=R(27154);const{evaluateToString:N,expressionIsUnsupported:q,toConstantDependency:G}=R(97574);const ie=R(65764);const ae=R(14367);const ce=R(43587);class SystemPlugin{apply(v){v.hooks.compilation.tap("SystemPlugin",((v,{normalModuleFactory:E})=>{v.hooks.runtimeRequirementInModule.for($.system).tap("SystemPlugin",((v,E)=>{E.add($.requireScope)}));v.hooks.runtimeRequirementInTree.for($.system).tap("SystemPlugin",((E,R)=>{v.addRuntimeModule(E,new ce)}));const handler=(v,E)=>{if(E.system===undefined||!E.system){return}const setNotSupported=E=>{v.hooks.evaluateTypeof.for(E).tap("SystemPlugin",N("undefined"));v.hooks.expression.for(E).tap("SystemPlugin",q(v,E+" is not supported by webpack."))};v.hooks.typeof.for("System.import").tap("SystemPlugin",G(v,JSON.stringify("function")));v.hooks.evaluateTypeof.for("System.import").tap("SystemPlugin",N("function"));v.hooks.typeof.for("System").tap("SystemPlugin",G(v,JSON.stringify("object")));v.hooks.evaluateTypeof.for("System").tap("SystemPlugin",N("object"));setNotSupported("System.set");setNotSupported("System.get");setNotSupported("System.register");v.hooks.expression.for("System").tap("SystemPlugin",(E=>{const R=new ae($.system,E.range,[$.system]);R.loc=E.loc;v.state.module.addPresentationalDependency(R);return true}));v.hooks.call.for("System.import").tap("SystemPlugin",(E=>{v.state.module.addWarning(new SystemImportDeprecationWarning(E.loc));return v.hooks.importCall.call({type:"ImportExpression",source:E.arguments[0],loc:E.loc,range:E.range})}))};E.hooks.parser.for("javascript/auto").tap("SystemPlugin",handler);E.hooks.parser.for("javascript/dynamic").tap("SystemPlugin",handler)}))}}class SystemImportDeprecationWarning extends j{constructor(v){super("System.import() is deprecated and will be removed soon. Use import() instead.\n"+"For more info visit https://webpack.js.org/guides/code-splitting/");this.name="SystemImportDeprecationWarning";this.loc=v}}ie(SystemImportDeprecationWarning,"webpack/lib/dependencies/SystemPlugin","SystemImportDeprecationWarning");v.exports=SystemPlugin;v.exports.SystemImportDeprecationWarning=SystemImportDeprecationWarning},43587:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class SystemRuntimeModule extends j{constructor(){super("system")}generate(){return N.asString([`${$.system} = {`,N.indent(["import: function () {",N.indent("throw new Error('System.import cannot be used indirectly');"),"}"]),"};"])}}v.exports=SystemRuntimeModule},71278:function(v,E,R){"use strict";const $=R(39201);const{getDependencyUsedByExportsCondition:j}=R(39236);const N=R(65764);const q=R(61374);const G=R(99809);const ie=q((()=>R(66788)));class URLDependency extends G{constructor(v,E,R,$){super(v);this.range=E;this.outerRange=R;this.relative=$||false;this.usedByExports=undefined}get type(){return"new URL()"}get category(){return"url"}getCondition(v){return j(this,this.usedByExports,v)}createIgnoredModule(v){const E=ie();return new E("data:,",`ignored-asset`,`(ignored asset)`)}serialize(v){const{write:E}=v;E(this.outerRange);E(this.relative);E(this.usedByExports);super.serialize(v)}deserialize(v){const{read:E}=v;this.outerRange=E();this.relative=E();this.usedByExports=E();super.deserialize(v)}}URLDependency.Template=class URLDependencyTemplate extends G.Template{apply(v,E,R){const{chunkGraph:j,moduleGraph:N,runtimeRequirements:q,runtimeTemplate:G,runtime:ie}=R;const ae=v;const ce=N.getConnection(ae);if(ce&&!ce.isTargetActive(ie)){E.replace(ae.outerRange[0],ae.outerRange[1]-1,"/* unused asset import */ undefined");return}q.add($.require);if(ae.relative){q.add($.relativeUrl);E.replace(ae.outerRange[0],ae.outerRange[1]-1,`/* asset import */ new ${$.relativeUrl}(${G.moduleRaw({chunkGraph:j,module:N.getModule(ae),request:ae.request,runtimeRequirements:q,weak:false})})`)}else{q.add($.baseURI);E.replace(ae.range[0],ae.range[1]-1,`/* asset import */ ${G.moduleRaw({chunkGraph:j,module:N.getModule(ae),request:ae.request,runtimeRequirements:q,weak:false})}, ${$.baseURI}`)}}};N(URLDependency,"webpack/lib/dependencies/URLDependency");v.exports=URLDependency},34822:function(v,E,R){"use strict";const{pathToFileURL:$}=R(57310);const j=R(94844);const{approve:N}=R(97574);const q=R(39236);const G=R(71278);class URLPlugin{apply(v){v.hooks.compilation.tap("URLPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(G,E);v.dependencyTemplates.set(G,new G.Template);const getUrl=v=>$(v.resource);const parserCallback=(v,E)=>{if(E.url===false)return;const R=E.url==="relative";const getUrlRequest=E=>{if(E.arguments.length!==2)return;const[R,$]=E.arguments;if($.type!=="MemberExpression"||R.type==="SpreadElement")return;const j=v.extractMemberExpressionChain($);if(j.members.length!==1||j.object.type!=="MetaProperty"||j.object.meta.name!=="import"||j.object.property.name!=="meta"||j.members[0]!=="url")return;const N=v.evaluateExpression(R).asString();return N};v.hooks.canRename.for("URL").tap("URLPlugin",N);v.hooks.evaluateNewExpression.for("URL").tap("URLPlugin",(E=>{const R=getUrlRequest(E);if(!R)return;const $=new URL(R,getUrl(v.state.module));return(new j).setString($.toString()).setRange(E.range)}));v.hooks.new.for("URL").tap("URLPlugin",(E=>{const $=E;const j=getUrlRequest($);if(!j)return;const[N,ie]=$.arguments;const ae=new G(j,[N.range[0],ie.range[1]],$.range,R);ae.loc=$.loc;v.state.current.addDependency(ae);q.onUsage(v.state,(v=>ae.usedByExports=v));return true}));v.hooks.isPure.for("NewExpression").tap("URLPlugin",(E=>{const R=E;const{callee:$}=R;if($.type!=="Identifier")return;const j=v.getFreeInfoFromVariable($.name);if(!j||j.name!=="URL")return;const N=getUrlRequest(R);if(N)return true}))};E.hooks.parser.for("javascript/auto").tap("URLPlugin",parserCallback);E.hooks.parser.for("javascript/esm").tap("URLPlugin",parserCallback)}))}}v.exports=URLPlugin},42809:function(v,E,R){"use strict";const $=R(65764);const j=R(91596);class UnsupportedDependency extends j{constructor(v,E){super();this.request=v;this.range=E}serialize(v){const{write:E}=v;E(this.request);E(this.range);super.serialize(v)}deserialize(v){const{read:E}=v;this.request=E();this.range=E();super.deserialize(v)}}$(UnsupportedDependency,"webpack/lib/dependencies/UnsupportedDependency");UnsupportedDependency.Template=class UnsupportedDependencyTemplate extends j.Template{apply(v,E,{runtimeTemplate:R}){const $=v;E.replace($.range[0],$.range[1],R.missingModule({request:$.request}))}};v.exports=UnsupportedDependency},76598:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);const N=R(99809);class WebAssemblyExportImportedDependency extends N{constructor(v,E,R,$){super(E);this.exportName=v;this.name=R;this.valueType=$}couldAffectReferencingModule(){return $.TRANSITIVE}getReferencedExports(v,E){return[[this.name]]}get type(){return"wasm export import"}get category(){return"wasm"}serialize(v){const{write:E}=v;E(this.exportName);E(this.name);E(this.valueType);super.serialize(v)}deserialize(v){const{read:E}=v;this.exportName=E();this.name=E();this.valueType=E();super.deserialize(v)}}j(WebAssemblyExportImportedDependency,"webpack/lib/dependencies/WebAssemblyExportImportedDependency");v.exports=WebAssemblyExportImportedDependency},60718:function(v,E,R){"use strict";const $=R(65764);const j=R(69889);const N=R(99809);class WebAssemblyImportDependency extends N{constructor(v,E,R,$){super(v);this.name=E;this.description=R;this.onlyDirectImport=$}get type(){return"wasm import"}get category(){return"wasm"}getReferencedExports(v,E){return[[this.name]]}getErrors(v){const E=v.getModule(this);if(this.onlyDirectImport&&E&&!E.type.startsWith("webassembly")){return[new j(`Import "${this.name}" from "${this.request}" with ${this.onlyDirectImport} can only be used for direct wasm to wasm dependencies`)]}}serialize(v){const{write:E}=v;E(this.name);E(this.description);E(this.onlyDirectImport);super.serialize(v)}deserialize(v){const{read:E}=v;this.name=E();this.description=E();this.onlyDirectImport=E();super.deserialize(v)}}$(WebAssemblyImportDependency,"webpack/lib/dependencies/WebAssemblyImportDependency");v.exports=WebAssemblyImportDependency},64111:function(v,E,R){"use strict";const $=R(87056);const j=R(43841);const N=R(65764);const q=R(99809);class WebpackIsIncludedDependency extends q{constructor(v,E){super(v);this.weak=true;this.range=E}getReferencedExports(v,E){return $.NO_EXPORTS_REFERENCED}get type(){return"__webpack_is_included__"}}N(WebpackIsIncludedDependency,"webpack/lib/dependencies/WebpackIsIncludedDependency");WebpackIsIncludedDependency.Template=class WebpackIsIncludedDependencyTemplate extends q.Template{apply(v,E,{runtimeTemplate:R,chunkGraph:$,moduleGraph:N}){const q=v;const G=N.getConnection(q);const ie=G?$.getNumberOfModuleChunks(G.module)>0:false;const ae=R.outputOptions.pathinfo?j.toComment(`__webpack_is_included__ ${R.requestShortener.shorten(q.request)}`):"";E.replace(q.range[0],q.range[1]-1,`${ae}${JSON.stringify(ie)}`)}};v.exports=WebpackIsIncludedDependency},30598:function(v,E,R){"use strict";const $=R(87056);const j=R(39201);const N=R(65764);const q=R(99809);class WorkerDependency extends q{constructor(v,E){super(v);this.range=E}getReferencedExports(v,E){return $.NO_EXPORTS_REFERENCED}get type(){return"new Worker()"}get category(){return"worker"}}WorkerDependency.Template=class WorkerDependencyTemplate extends q.Template{apply(v,E,R){const{chunkGraph:$,moduleGraph:N,runtimeRequirements:q}=R;const G=v;const ie=N.getParentBlock(v);const ae=$.getBlockChunkGroup(ie);const ce=ae.getEntrypointChunk();q.add(j.publicPath);q.add(j.baseURI);q.add(j.getChunkScriptFilename);E.replace(G.range[0],G.range[1]-1,`/* worker import */ ${j.publicPath} + ${j.getChunkScriptFilename}(${JSON.stringify(ce.id)}), ${j.baseURI}`)}};N(WorkerDependency,"webpack/lib/dependencies/WorkerDependency");v.exports=WorkerDependency},70298:function(v,E,R){"use strict";const{pathToFileURL:$}=R(57310);const j=R(42290);const N=R(54437);const q=R(17623);const G=R(49548);const{equals:ie}=R(28087);const ae=R(85205);const{contextify:ce}=R(20162);const le=R(90115);const me=R(14367);const _e=R(37857);const{harmonySpecifierTag:Ie}=R(59152);const Me=R(30598);const getUrl=v=>$(v.resource).toString();const Oe=["Worker","SharedWorker","navigator.serviceWorker.register()","Worker from worker_threads"];const Te=new WeakMap;class WorkerPlugin{constructor(v,E,R){this._chunkLoading=v;this._wasmLoading=E;this._module=R}apply(v){if(this._chunkLoading){new G(this._chunkLoading).apply(v)}if(this._wasmLoading){new le(this._wasmLoading).apply(v)}const E=ce.bindContextCache(v.context,v.root);v.hooks.thisCompilation.tap("WorkerPlugin",((v,{normalModuleFactory:R})=>{v.dependencyFactories.set(Me,R);v.dependencyTemplates.set(Me,new Me.Template);v.dependencyTemplates.set(_e,new _e.Template);const parseModuleUrl=(v,E)=>{if(E.type!=="NewExpression"||E.callee.type==="Super"||E.arguments.length!==2)return;const[R,$]=E.arguments;if(R.type==="SpreadElement")return;if($.type==="SpreadElement")return;const j=v.evaluateExpression(E.callee);if(!j.isIdentifier()||j.identifier!=="URL")return;const N=v.evaluateExpression($);if(!N.isString()||!N.string.startsWith("file://")||N.string!==getUrl(v.state.module)){return}const q=v.evaluateExpression(R);return[q,[R.range[0],$.range[1]]]};const parseObjectExpression=(v,E)=>{const R={};const $={};const j=[];let N=false;for(const q of E.properties){if(q.type==="SpreadElement"){N=true}else if(q.type==="Property"&&!q.method&&!q.computed&&q.key.type==="Identifier"){$[q.key.name]=q.value;if(!q.shorthand&&!q.value.type.endsWith("Pattern")){const E=v.evaluateExpression(q.value);if(E.isCompileTimeValue())R[q.key.name]=E.asCompileTimeValue()}}else{j.push(q)}}const q=E.properties.length>0?"comma":"single";const G=E.properties[E.properties.length-1].range[1];return{expressions:$,otherElements:j,values:R,spread:N,insertType:q,insertLocation:G}};const parserPlugin=(R,$)=>{if($.worker===false)return;const G=!Array.isArray($.worker)?["..."]:$.worker;const handleNewWorker=$=>{if($.arguments.length===0||$.arguments.length>2)return;const[G,ie]=$.arguments;if(G.type==="SpreadElement")return;if(ie&&ie.type==="SpreadElement")return;const ce=parseModuleUrl(R,G);if(!ce)return;const[le,Ie]=ce;if(!le.isString())return;const{expressions:Oe,otherElements:Ne,values:Be,spread:Le,insertType:qe,insertLocation:Ue}=ie&&ie.type==="ObjectExpression"?parseObjectExpression(R,ie):{expressions:{},otherElements:[],values:{},spread:false,insertType:ie?"spread":"argument",insertLocation:ie?ie.range:G.range[1]};const{options:Ge,errors:He}=R.parseCommentOptions($.range);if(He){for(const v of He){const{comment:E}=v;R.state.module.addWarning(new N(`Compilation error while processing magic comment(-s): /*${E.value}*/: ${v.message}`,E.loc))}}let We={};if(Ge){if(Ge.webpackIgnore!==undefined){if(typeof Ge.webpackIgnore!=="boolean"){R.state.module.addWarning(new q(`\`webpackIgnore\` expected a boolean, but received: ${Ge.webpackIgnore}.`,$.loc))}else{if(Ge.webpackIgnore){return false}}}if(Ge.webpackEntryOptions!==undefined){if(typeof Ge.webpackEntryOptions!=="object"||Ge.webpackEntryOptions===null){R.state.module.addWarning(new q(`\`webpackEntryOptions\` expected a object, but received: ${Ge.webpackEntryOptions}.`,$.loc))}else{Object.assign(We,Ge.webpackEntryOptions)}}if(Ge.webpackChunkName!==undefined){if(typeof Ge.webpackChunkName!=="string"){R.state.module.addWarning(new q(`\`webpackChunkName\` expected a string, but received: ${Ge.webpackChunkName}.`,$.loc))}else{We.name=Ge.webpackChunkName}}}if(!Object.prototype.hasOwnProperty.call(We,"name")&&Be&&typeof Be.name==="string"){We.name=Be.name}if(We.runtime===undefined){let $=Te.get(R.state)||0;Te.set(R.state,$+1);let j=`${E(R.state.module.identifier())}|${$}`;const N=ae(v.outputOptions.hashFunction);N.update(j);const q=N.digest(v.outputOptions.hashDigest);We.runtime=q.slice(0,v.outputOptions.hashDigestLength)}const Qe=new j({name:We.name,entryOptions:{chunkLoading:this._chunkLoading,wasmLoading:this._wasmLoading,...We}});Qe.loc=$.loc;const Je=new Me(le.string,Ie);Je.loc=$.loc;Qe.addDependency(Je);R.state.module.addBlock(Qe);if(v.outputOptions.trustedTypes){const v=new _e($.arguments[0].range);v.loc=$.loc;R.state.module.addDependency(v)}if(Oe.type){const v=Oe.type;if(Be.type!==false){const E=new me(this._module?'"module"':"undefined",v.range);E.loc=v.loc;R.state.module.addPresentationalDependency(E);Oe.type=undefined}}else if(qe==="comma"){if(this._module||Le){const v=new me(`, type: ${this._module?'"module"':"undefined"}`,Ue);v.loc=$.loc;R.state.module.addPresentationalDependency(v)}}else if(qe==="spread"){const v=new me("Object.assign({}, ",Ue[0]);const E=new me(`, { type: ${this._module?'"module"':"undefined"} })`,Ue[1]);v.loc=$.loc;E.loc=$.loc;R.state.module.addPresentationalDependency(v);R.state.module.addPresentationalDependency(E)}else if(qe==="argument"){if(this._module){const v=new me(', { type: "module" }',Ue);v.loc=$.loc;R.state.module.addPresentationalDependency(v)}}R.walkExpression($.callee);for(const v of Object.keys(Oe)){if(Oe[v])R.walkExpression(Oe[v])}for(const v of Ne){R.walkProperty(v)}if(qe==="spread"){R.walkExpression(ie)}return true};const processItem=v=>{if(v.endsWith("()")){R.hooks.call.for(v.slice(0,-2)).tap("WorkerPlugin",handleNewWorker)}else{const E=/^(.+?)(\(\))?\s+from\s+(.+)$/.exec(v);if(E){const v=E[1].split(".");const $=E[2];const j=E[3];($?R.hooks.call:R.hooks.new).for(Ie).tap("WorkerPlugin",(E=>{const $=R.currentTagData;if(!$||$.source!==j||!ie($.ids,v)){return}return handleNewWorker(E)}))}else{R.hooks.new.for(v).tap("WorkerPlugin",handleNewWorker)}}};for(const v of G){if(v==="..."){Oe.forEach(processItem)}else processItem(v)}};R.hooks.parser.for("javascript/auto").tap("WorkerPlugin",parserPlugin);R.hooks.parser.for("javascript/esm").tap("WorkerPlugin",parserPlugin)}))}}v.exports=WorkerPlugin},17926:function(v){"use strict";v.exports=v=>{if(v.type==="FunctionExpression"||v.type==="ArrowFunctionExpression"){return{fn:v,expressions:[],needThis:false}}if(v.type==="CallExpression"&&v.callee.type==="MemberExpression"&&v.callee.object.type==="FunctionExpression"&&v.callee.property.type==="Identifier"&&v.callee.property.name==="bind"&&v.arguments.length===1){return{fn:v.callee.object,expressions:[v.arguments[0]],needThis:undefined}}if(v.type==="CallExpression"&&v.callee.type==="FunctionExpression"&&v.callee.body.type==="BlockStatement"&&v.arguments.length===1&&v.arguments[0].type==="ThisExpression"&&v.callee.body.body&&v.callee.body.body.length===1&&v.callee.body.body[0].type==="ReturnStatement"&&v.callee.body.body[0].argument&&v.callee.body.body[0].argument.type==="FunctionExpression"){return{fn:v.callee.body.body[0].argument,expressions:[],needThis:true}}}},14666:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const processExportInfo=(v,E,R,j,N=false,q=new Set)=>{if(!j){E.push(R);return}const G=j.getUsed(v);if(G===$.Unused)return;if(q.has(j)){E.push(R);return}q.add(j);if(G!==$.OnlyPropertiesUsed||!j.exportsInfo||j.exportsInfo.otherExportsInfo.getUsed(v)!==$.Unused){q.delete(j);E.push(R);return}const ie=j.exportsInfo;for(const $ of ie.orderedExports){processExportInfo(v,E,N&&$.name==="default"?R:R.concat($.name),$,false,q)}q.delete(j)};v.exports=processExportInfo},83290:function(v,E,R){"use strict";const $=R(51562);class ElectronTargetPlugin{constructor(v){this._context=v}apply(v){new $("node-commonjs",["clipboard","crash-reporter","electron","ipc","native-image","original-fs","screen","shell"]).apply(v);switch(this._context){case"main":new $("node-commonjs",["app","auto-updater","browser-window","content-tracing","dialog","global-shortcut","ipc-main","menu","menu-item","power-monitor","power-save-blocker","protocol","session","tray","web-contents"]).apply(v);break;case"preload":case"renderer":new $("node-commonjs",["desktop-capturer","ipc-renderer","remote","web-frame"]).apply(v);break}}}v.exports=ElectronTargetPlugin},55774:function(v,E,R){"use strict";const $=R(27154);class BuildCycleError extends ${constructor(v){super("There is a circular build dependency, which makes it impossible to create this module");this.name="BuildCycleError";this.module=v}}v.exports=BuildCycleError},71083:function(v,E,R){"use strict";const $=R(93496);class ExportWebpackRequireRuntimeModule extends ${constructor(){super("export webpack runtime",$.STAGE_ATTACH)}shouldIsolate(){return false}generate(){return"export default __webpack_require__;"}}v.exports=ExportWebpackRequireRuntimeModule},94270:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const{RuntimeGlobals:j}=R(13733);const N=R(23834);const q=R(43841);const{getAllChunks:G}=R(5575);const{getCompilationHooks:ie,getChunkFilenameTemplate:ae}=R(36109);const{updateHashForEntryStartup:ce}=R(82695);class ModuleChunkFormatPlugin{apply(v){v.hooks.thisCompilation.tap("ModuleChunkFormatPlugin",(v=>{v.hooks.additionalChunkRuntimeRequirements.tap("ModuleChunkFormatPlugin",((E,R)=>{if(E.hasRuntime())return;if(v.chunkGraph.getNumberOfEntryModules(E)>0){R.add(j.require);R.add(j.startupEntrypoint);R.add(j.externalInstallChunk)}}));const E=ie(v);E.renderChunk.tap("ModuleChunkFormatPlugin",((R,ie)=>{const{chunk:ce,chunkGraph:le,runtimeTemplate:me}=ie;const _e=ce instanceof N?ce:null;const Ie=new $;if(_e){throw new Error("HMR is not implemented for module chunk format yet")}else{Ie.add(`export const id = ${JSON.stringify(ce.id)};\n`);Ie.add(`export const ids = ${JSON.stringify(ce.ids)};\n`);Ie.add(`export const modules = `);Ie.add(R);Ie.add(`;\n`);const N=le.getChunkRuntimeModulesInOrder(ce);if(N.length>0){Ie.add("export const runtime =\n");Ie.add(q.renderChunkRuntimeModules(N,ie))}const _e=Array.from(le.getChunkEntryModulesWithChunkGroupIterable(ce));if(_e.length>0){const R=_e[0][1].getRuntimeChunk();const N=v.getPath(ae(ce,v.outputOptions),{chunk:ce,contentHashType:"javascript"}).split("/");N.pop();const getRelativePath=E=>{const R=N.slice();const $=v.getPath(ae(E,v.outputOptions),{chunk:E,contentHashType:"javascript"}).split("/");while(R.length>0&&$.length>0&&R[0]===$[0]){R.shift();$.shift()}return(R.length>0?"../".repeat(R.length):"./")+$.join("/")};const q=new $;q.add(Ie);q.add(";\n\n// load runtime\n");q.add(`import __webpack_require__ from ${JSON.stringify(getRelativePath(R))};\n`);const Me=new $;Me.add(`var __webpack_exec__ = ${me.returningFunction(`__webpack_require__(${j.entryModuleId} = moduleId)`,"moduleId")}\n`);const Oe=new Set;let Te=0;for(let v=0;v<_e.length;v++){const[E,$]=_e[v];const N=v+1===_e.length;const q=le.getModuleId(E);const ie=G($,R,undefined);for(const v of ie){if(Oe.has(v))continue;Oe.add(v);Me.add(`import * as __webpack_chunk_${Te}__ from ${JSON.stringify(getRelativePath(v))};\n`);Me.add(`${j.externalInstallChunk}(__webpack_chunk_${Te}__);\n`);Te++}Me.add(`${N?"var __webpack_exports__ = ":""}__webpack_exec__(${JSON.stringify(q)});\n`)}q.add(E.renderStartup.call(Me,_e[_e.length-1][0],{...ie,inlined:false}));return q}}return Ie}));E.chunkHash.tap("ModuleChunkFormatPlugin",((v,E,{chunkGraph:R,runtimeTemplate:$})=>{if(v.hasRuntime())return;E.update("ModuleChunkFormatPlugin");E.update("1");const j=Array.from(R.getChunkEntryModulesWithChunkGroupIterable(v));ce(E,R,j,v)}))}))}}v.exports=ModuleChunkFormatPlugin},94603:function(v,E,R){"use strict";const $=R(39201);const j=R(71083);const N=R(95365);class ModuleChunkLoadingPlugin{apply(v){v.hooks.thisCompilation.tap("ModuleChunkLoadingPlugin",(v=>{const E=v.outputOptions.chunkLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.chunkLoading!==undefined?R.chunkLoading:E;return $==="import"};const R=new WeakSet;const handler=(E,j)=>{if(R.has(E))return;R.add(E);if(!isEnabledForChunk(E))return;j.add($.moduleFactoriesAddOnly);j.add($.hasOwnProperty);v.addRuntimeModule(E,new N(j))};v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("ModuleChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.baseURI).tap("ModuleChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.externalInstallChunk).tap("ModuleChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.onChunksLoaded).tap("ModuleChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.externalInstallChunk).tap("ModuleChunkLoadingPlugin",((E,R)=>{if(!isEnabledForChunk(E))return;v.addRuntimeModule(E,new j)}));v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("ModuleChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.getChunkScriptFilename)}))}))}}v.exports=ModuleChunkLoadingPlugin},95365:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73002);const N=R(39201);const q=R(93496);const G=R(43841);const{getChunkFilenameTemplate:ie,chunkHasJs:ae}=R(36109);const{getInitialChunkIds:ce}=R(82695);const le=R(73897);const{getUndoPath:me}=R(20162);const _e=new WeakMap;class ModuleChunkLoadingRuntimeModule extends q{static getCompilationHooks(v){if(!(v instanceof j)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=_e.get(v);if(E===undefined){E={linkPreload:new $(["source","chunk"]),linkPrefetch:new $(["source","chunk"])};_e.set(v,E)}return E}constructor(v){super("import chunk loading",q.STAGE_ATTACH);this._runtimeRequirements=v}_generateBaseUri(v,E){const R=v.getEntryOptions();if(R&&R.baseUri){return`${N.baseURI} = ${JSON.stringify(R.baseUri)};`}const{compilation:{outputOptions:{importMetaName:$}}}=this;return`${N.baseURI} = new URL(${JSON.stringify(E)}, ${$}.url);`}generate(){const{compilation:v,chunk:E,chunkGraph:R}=this;const{runtimeTemplate:$,outputOptions:{importFunctionName:j}}=v;const q=N.ensureChunkHandlers;const _e=this._runtimeRequirements.has(N.baseURI);const Ie=this._runtimeRequirements.has(N.externalInstallChunk);const Me=this._runtimeRequirements.has(N.ensureChunkHandlers);const Oe=this._runtimeRequirements.has(N.onChunksLoaded);const Te=this._runtimeRequirements.has(N.hmrDownloadUpdateHandlers);const Ne=R.getChunkConditionMap(E,ae);const Be=le(Ne);const Le=ce(E,R,ae);const qe=this.compilation.getPath(ie(E,this.compilation.outputOptions),{chunk:E,contentHashType:"javascript"});const Ue=me(qe,this.compilation.outputOptions.path,true);const Ge=Te?`${N.hmrRuntimeStatePrefix}_module`:undefined;return G.asString([_e?this._generateBaseUri(E,Ue):"// no baseURI","","// object to store loaded and loading chunks","// undefined = chunk not loaded, null = chunk preloaded/prefetched","// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded",`var installedChunks = ${Ge?`${Ge} = ${Ge} || `:""}{`,G.indent(Array.from(Le,(v=>`${JSON.stringify(v)}: 0`)).join(",\n")),"};","",Me||Ie?`var installChunk = ${$.basicFunction("data",[$.destructureObject(["ids","modules","runtime"],"data"),'// add "modules" to the modules object,','// then flag all "ids" as loaded and fire callback',"var moduleId, chunkId, i = 0;","for(moduleId in modules) {",G.indent([`if(${N.hasOwnProperty}(modules, moduleId)) {`,G.indent(`${N.moduleFactories}[moduleId] = modules[moduleId];`),"}"]),"}","if(runtime) runtime(__webpack_require__);","for(;i < ids.length; i++) {",G.indent(["chunkId = ids[i];",`if(${N.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`,G.indent("installedChunks[chunkId][0]();"),"}","installedChunks[ids[i]] = 0;"]),"}",Oe?`${N.onChunksLoaded}();`:""])}`:"// no install chunk","",Me?G.asString([`${q}.j = ${$.basicFunction("chunkId, promises",Be!==false?G.indent(["// import() chunk loading for javascript",`var installedChunkData = ${N.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,'if(installedChunkData !== 0) { // 0 means "already installed".',G.indent(["",'// a Promise means "currently loading".',"if(installedChunkData) {",G.indent(["promises.push(installedChunkData[1]);"]),"} else {",G.indent([Be===true?"if(true) { // all chunks have JS":`if(${Be("chunkId")}) {`,G.indent(["// setup Promise in chunk cache",`var promise = ${j}(${JSON.stringify(Ue)} + ${N.getChunkScriptFilename}(chunkId)).then(installChunk, ${$.basicFunction("e",["if(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;","throw e;"])});`,`var promise = Promise.race([promise, new Promise(${$.expressionFunction(`installedChunkData = installedChunks[chunkId] = [resolve]`,"resolve")})])`,`promises.push(installedChunkData[1] = promise);`]),"} else installedChunks[chunkId] = 0;"]),"}"]),"}"]):G.indent(["installedChunks[chunkId] = 0;"]))};`]):"// no chunk on demand loading","",Ie?G.asString([`${N.externalInstallChunk} = installChunk;`]):"// no external install chunk","",Oe?`${N.onChunksLoaded}.j = ${$.returningFunction("installedChunks[chunkId] === 0","chunkId")};`:"// no on chunks loaded"])}}v.exports=ModuleChunkLoadingRuntimeModule},24014:function(v){"use strict";const formatPosition=v=>{if(v&&typeof v==="object"){if("line"in v&&"column"in v){return`${v.line}:${v.column}`}else if("line"in v){return`${v.line}:?`}}return""};const formatLocation=v=>{if(v&&typeof v==="object"){if("start"in v&&v.start&&"end"in v&&v.end){if(typeof v.start==="object"&&typeof v.start.line==="number"&&typeof v.end==="object"&&typeof v.end.line==="number"&&typeof v.end.column==="number"&&v.start.line===v.end.line){return`${formatPosition(v.start)}-${v.end.column}`}else if(typeof v.start==="object"&&typeof v.start.line==="number"&&typeof v.start.column!=="number"&&typeof v.end==="object"&&typeof v.end.line==="number"&&typeof v.end.column!=="number"){return`${v.start.line}-${v.end.line}`}else{return`${formatPosition(v.start)}-${formatPosition(v.end)}`}}if("start"in v&&v.start){return formatPosition(v.start)}if("name"in v&&"index"in v){return`${v.name}[${v.index}]`}if("name"in v){return v.name}}return""};v.exports=formatLocation},37658:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class HotModuleReplacementRuntimeModule extends j{constructor(){super("hot module replacement",j.STAGE_BASIC)}generate(){return N.getFunctionContent(require("./HotModuleReplacement.runtime.js")).replace(/\$getFullHash\$/g,$.getFullHash).replace(/\$interceptModuleExecution\$/g,$.interceptModuleExecution).replace(/\$moduleCache\$/g,$.moduleCache).replace(/\$hmrModuleData\$/g,$.hmrModuleData).replace(/\$hmrDownloadManifest\$/g,$.hmrDownloadManifest).replace(/\$hmrInvalidateModuleHandlers\$/g,$.hmrInvalidateModuleHandlers).replace(/\$hmrDownloadUpdateHandlers\$/g,$.hmrDownloadUpdateHandlers)}}v.exports=HotModuleReplacementRuntimeModule},94798:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(42290);const N=R(87056);const q=R(53840);const G=R(39744);const ie=R(39201);const ae=R(43841);const ce=R(90345);const{registerNotSerializable:le}=R(7591);const me=new Set(["import.meta.webpackHot.accept","import.meta.webpackHot.decline","module.hot.accept","module.hot.decline"]);const checkTest=(v,E)=>{if(v===undefined)return true;if(typeof v==="function"){return v(E)}if(typeof v==="string"){const R=E.nameForCondition();return R&&R.startsWith(v)}if(v instanceof RegExp){const R=E.nameForCondition();return R&&v.test(R)}return false};const _e=new Set(["javascript"]);class LazyCompilationDependency extends N{constructor(v){super();this.proxyModule=v}get category(){return"esm"}get type(){return"lazy import()"}getResourceIdentifier(){return this.proxyModule.originalModule.identifier()}}le(LazyCompilationDependency);class LazyCompilationProxyModule extends q{constructor(v,E,R,$,j,N){super("lazy-compilation-proxy",v,E.layer);this.originalModule=E;this.request=R;this.client=$;this.data=j;this.active=N}identifier(){return`lazy-compilation-proxy|${this.originalModule.identifier()}`}readableIdentifier(v){return`lazy-compilation-proxy ${this.originalModule.readableIdentifier(v)}`}updateCacheModule(v){super.updateCacheModule(v);const E=v;this.originalModule=E.originalModule;this.request=E.request;this.client=E.client;this.data=E.data;this.active=E.active}libIdent(v){return`${this.originalModule.libIdent(v)}!lazy-compilation-proxy`}needBuild(v,E){E(null,!this.buildInfo||this.buildInfo.active!==this.active)}build(v,E,R,$,N){this.buildInfo={active:this.active};this.buildMeta={};this.clearDependenciesAndBlocks();const q=new ce(this.client);this.addDependency(q);if(this.active){const v=new LazyCompilationDependency(this);const E=new j({});E.addDependency(v);this.addBlock(E)}N()}getSourceTypes(){return _e}size(v){return 200}codeGeneration({runtimeTemplate:v,chunkGraph:E,moduleGraph:R}){const j=new Map;const N=new Set;N.add(ie.module);const q=this.dependencies[0];const G=R.getModule(q);const ce=this.blocks[0];const le=ae.asString([`var client = ${v.moduleExports({module:G,chunkGraph:E,request:q.userRequest,runtimeRequirements:N})}`,`var data = ${JSON.stringify(this.data)};`]);const me=ae.asString([`var dispose = client.keepAlive({ data: data, active: ${JSON.stringify(!!ce)}, module: module, onError: onError });`]);let _e;if(ce){const $=ce.dependencies[0];const j=R.getModule($);_e=ae.asString([le,`module.exports = ${v.moduleNamespacePromise({chunkGraph:E,block:ce,module:j,request:this.request,strict:false,message:"import()",runtimeRequirements:N})};`,"if (module.hot) {",ae.indent(["module.hot.accept();",`module.hot.accept(${JSON.stringify(E.getModuleId(j))}, function() { module.hot.invalidate(); });`,"module.hot.dispose(function(data) { delete data.resolveSelf; dispose(data); });","if (module.hot.data && module.hot.data.resolveSelf) module.hot.data.resolveSelf(module.exports);"]),"}","function onError() { /* ignore */ }",me])}else{_e=ae.asString([le,"var resolveSelf, onError;",`module.exports = new Promise(function(resolve, reject) { resolveSelf = resolve; onError = reject; });`,"if (module.hot) {",ae.indent(["module.hot.accept();","if (module.hot.data && module.hot.data.resolveSelf) module.hot.data.resolveSelf(module.exports);","module.hot.dispose(function(data) { data.resolveSelf = resolveSelf; dispose(data); });"]),"}",me])}j.set("javascript",new $(_e));return{sources:j,runtimeRequirements:N}}updateHash(v,E){super.updateHash(v,E);v.update(this.active?"active":"");v.update(JSON.stringify(this.data))}}le(LazyCompilationProxyModule);class LazyCompilationDependencyFactory extends G{constructor(v){super();this._factory=v}create(v,E){const R=v.dependencies[0];E(null,{module:R.proxyModule.originalModule})}}class LazyCompilationPlugin{constructor({backend:v,entries:E,imports:R,test:$}){this.backend=v;this.entries=E;this.imports=R;this.test=$}apply(v){let E;v.hooks.beforeCompile.tapAsync("LazyCompilationPlugin",((R,$)=>{if(E!==undefined)return $();const j=this.backend(v,((v,R)=>{if(v)return $(v);E=R;$()}));if(j&&j.then){j.then((v=>{E=v;$()}),$)}}));v.hooks.thisCompilation.tap("LazyCompilationPlugin",((R,{normalModuleFactory:$})=>{$.hooks.module.tap("LazyCompilationPlugin",(($,j,N)=>{if(N.dependencies.every((v=>me.has(v.type)))){const v=N.dependencies[0];const E=R.moduleGraph.getParentModule(v);const $=E.blocks.some((E=>E.dependencies.some((E=>E.type==="import()"&&E.request===v.request))));if(!$)return}else if(!N.dependencies.every((v=>me.has(v.type)||this.imports&&(v.type==="import()"||v.type==="import() context element")||this.entries&&v.type==="entry")))return;if(/webpack[/\\]hot[/\\]|webpack-dev-server[/\\]client|webpack-hot-middleware[/\\]client/.test(N.request)||!checkTest(this.test,$))return;const q=E.module($);if(!q)return;const{client:G,data:ie,active:ae}=q;return new LazyCompilationProxyModule(v.context,$,N.request,G,ie,ae)}));R.dependencyFactories.set(LazyCompilationDependency,new LazyCompilationDependencyFactory)}));v.hooks.shutdown.tapAsync("LazyCompilationPlugin",(v=>{E.dispose(v)}))}}v.exports=LazyCompilationPlugin},10867:function(v,E,R){"use strict";v.exports=v=>(E,$)=>{const j=E.getInfrastructureLogger("LazyCompilationBackend");const N=new Map;const q="/lazy-compilation-using-";const G=v.protocol==="https"||typeof v.server==="object"&&("key"in v.server||"pfx"in v.server);const ie=typeof v.server==="function"?v.server:(()=>{const E=G?R(95687):R(13685);return E.createServer.bind(E,v.server)})();const ae=typeof v.listen==="function"?v.listen:E=>{let R=v.listen;if(typeof R==="object"&&!("port"in R))R={...R,port:undefined};E.listen(R)};const ce=v.protocol||(G?"https":"http");const requestListener=(v,R)=>{const $=v.url.slice(q.length).split("@");v.socket.on("close",(()=>{setTimeout((()=>{for(const v of $){const E=N.get(v)||0;N.set(v,E-1);if(E===1){j.log(`${v} is no longer in use. Next compilation will skip this module.`)}}}),12e4)}));v.socket.setNoDelay(true);R.writeHead(200,{"content-type":"text/event-stream","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"*","Access-Control-Allow-Headers":"*"});R.write("\n");let G=false;for(const v of $){const E=N.get(v)||0;N.set(v,E+1);if(E===0){j.log(`${v} is now in use and will be compiled.`);G=true}}if(G&&E.watching)E.watching.invalidate()};const le=ie();le.on("request",requestListener);let me=false;const _e=new Set;le.on("connection",(v=>{_e.add(v);v.on("close",(()=>{_e.delete(v)}));if(me)v.destroy()}));le.on("clientError",(v=>{if(v.message!=="Server is disposing")j.warn(v)}));le.on("listening",(E=>{if(E)return $(E);const R=le.address();if(typeof R==="string")throw new Error("addr must not be a string");const G=R.address==="::"||R.address==="0.0.0.0"?`${ce}://localhost:${R.port}`:R.family==="IPv6"?`${ce}://[${R.address}]:${R.port}`:`${ce}://${R.address}:${R.port}`;j.log(`Server-Sent-Events server for lazy compilation open at ${G}.`);$(null,{dispose(v){me=true;le.off("request",requestListener);le.close((E=>{v(E)}));for(const v of _e){v.destroy(new Error("Server is disposing"))}},module(E){const R=`${encodeURIComponent(E.identifier().replace(/\\/g,"/").replace(/@/g,"_")).replace(/%(2F|3A|24|26|2B|2C|3B|3D|3A)/g,decodeURIComponent)}`;const $=N.get(R)>0;return{client:`${v.client}?${encodeURIComponent(G+q)}`,data:R,active:$}}})}));ae(le)}},87352:function(v,E,R){"use strict";const{find:$}=R(73268);const{compareModulesByPreOrderIndexOrIdentifier:j,compareModulesByPostOrderIndexOrIdentifier:N}=R(58792);class ChunkModuleIdRangePlugin{constructor(v){this.options=v}apply(v){const E=this.options;v.hooks.compilation.tap("ChunkModuleIdRangePlugin",(v=>{const R=v.moduleGraph;v.hooks.moduleIds.tap("ChunkModuleIdRangePlugin",(q=>{const G=v.chunkGraph;const ie=$(v.chunks,(v=>v.name===E.name));if(!ie){throw new Error(`ChunkModuleIdRangePlugin: Chunk with name '${E.name}"' was not found`)}let ae;if(E.order){let v;switch(E.order){case"index":case"preOrderIndex":v=j(R);break;case"index2":case"postOrderIndex":v=N(R);break;default:throw new Error("ChunkModuleIdRangePlugin: unexpected value of order")}ae=G.getOrderedChunkModules(ie,v)}else{ae=Array.from(q).filter((v=>G.isModuleInChunk(v,ie))).sort(j(R))}let ce=E.start||0;for(let v=0;vE.end)break}}))}))}}v.exports=ChunkModuleIdRangePlugin},6777:function(v,E,R){"use strict";const{compareChunksNatural:$}=R(58792);const{getFullChunkName:j,getUsedChunkIds:N,assignDeterministicIds:q}=R(76283);class DeterministicChunkIdsPlugin{constructor(v){this.options=v||{}}apply(v){v.hooks.compilation.tap("DeterministicChunkIdsPlugin",(E=>{E.hooks.chunkIds.tap("DeterministicChunkIdsPlugin",(R=>{const G=E.chunkGraph;const ie=this.options.context?this.options.context:v.context;const ae=this.options.maxLength||3;const ce=$(G);const le=N(E);q(Array.from(R).filter((v=>v.id===null)),(E=>j(E,G,ie,v.root)),ce,((v,E)=>{const R=le.size;le.add(`${E}`);if(R===le.size)return false;v.id=E;v.ids=[E];return true}),[Math.pow(10,ae)],10,le.size)}))}))}}v.exports=DeterministicChunkIdsPlugin},49335:function(v,E,R){"use strict";const{compareModulesByPreOrderIndexOrIdentifier:$}=R(58792);const{getUsedModuleIdsAndModules:j,getFullModuleName:N,assignDeterministicIds:q}=R(76283);class DeterministicModuleIdsPlugin{constructor(v={}){this.options=v}apply(v){v.hooks.compilation.tap("DeterministicModuleIdsPlugin",(E=>{E.hooks.moduleIds.tap("DeterministicModuleIdsPlugin",(()=>{const R=E.chunkGraph;const G=this.options.context?this.options.context:v.context;const ie=this.options.maxLength||3;const ae=this.options.failOnConflict||false;const ce=this.options.fixedLength||false;const le=this.options.salt||0;let me=0;const[_e,Ie]=j(E,this.options.test);q(Ie,(E=>N(E,G,v.root)),ae?()=>0:$(E.moduleGraph),((v,E)=>{const $=_e.size;_e.add(`${E}`);if($===_e.size){me++;return false}R.setModuleId(v,E);return true}),[Math.pow(10,ie)],ce?0:10,_e.size,le);if(ae&&me)throw new Error(`Assigning deterministic module ids has lead to ${me} conflict${me>1?"s":""}.\nIncrease the 'maxLength' to increase the id space and make conflicts less likely (recommended when there are many conflicts or application is expected to grow), or add an 'salt' number to try another hash starting value in the same id space (recommended when there is only a single conflict).`)}))}))}}v.exports=DeterministicModuleIdsPlugin},13340:function(v,E,R){"use strict";const{compareModulesByPreOrderIndexOrIdentifier:$}=R(58792);const j=R(89699);const N=R(85205);const{getUsedModuleIdsAndModules:q,getFullModuleName:G}=R(76283);const ie=j(R(22194),(()=>R(99422)),{name:"Hashed Module Ids Plugin",baseDataPath:"options"});class HashedModuleIdsPlugin{constructor(v={}){ie(v);this.options={context:null,hashFunction:"md4",hashDigest:"base64",hashDigestLength:4,...v}}apply(v){const E=this.options;v.hooks.compilation.tap("HashedModuleIdsPlugin",(R=>{R.hooks.moduleIds.tap("HashedModuleIdsPlugin",(()=>{const j=R.chunkGraph;const ie=this.options.context?this.options.context:v.context;const[ae,ce]=q(R);const le=ce.sort($(R.moduleGraph));for(const R of le){const $=G(R,ie,v.root);const q=N(E.hashFunction);q.update($||"");const ce=q.digest(E.hashDigest);let le=E.hashDigestLength;while(ae.has(ce.slice(0,le)))le++;const me=ce.slice(0,le);j.setModuleId(R,me);ae.add(me)}}))}))}}v.exports=HashedModuleIdsPlugin},76283:function(v,E,R){"use strict";const $=R(85205);const{makePathsRelative:j}=R(20162);const N=R(49167);const getHash=(v,E,R)=>{const j=$(R);j.update(v);const N=j.digest("hex");return N.slice(0,E)};const avoidNumber=v=>{if(v.length>21)return v;const E=v.charCodeAt(0);if(E<49){if(E!==45)return v}else if(E>57){return v}if(v===+v+""){return`_${v}`}return v};const requestToId=v=>v.replace(/^(\.\.?\/)+/,"").replace(/(^[.-]|[^a-zA-Z0-9_-])+/g,"_");E.requestToId=requestToId;const shortenLongString=(v,E,R)=>{if(v.length<100)return v;return v.slice(0,100-6-E.length)+E+getHash(v,6,R)};const getShortModuleName=(v,E,R)=>{const $=v.libIdent({context:E,associatedObjectForCache:R});if($)return avoidNumber($);const N=v.nameForCondition();if(N)return avoidNumber(j(E,N,R));return""};E.getShortModuleName=getShortModuleName;const getLongModuleName=(v,E,R,$,j)=>{const N=getFullModuleName(E,R,j);return`${v}?${getHash(N,4,$)}`};E.getLongModuleName=getLongModuleName;const getFullModuleName=(v,E,R)=>j(E,v.identifier(),R);E.getFullModuleName=getFullModuleName;const getShortChunkName=(v,E,R,$,j,N)=>{const q=E.getChunkRootModules(v);const G=q.map((v=>requestToId(getShortModuleName(v,R,N))));v.idNameHints.sort();const ie=Array.from(v.idNameHints).concat(G).filter(Boolean).join($);return shortenLongString(ie,$,j)};E.getShortChunkName=getShortChunkName;const getLongChunkName=(v,E,R,$,j,N)=>{const q=E.getChunkRootModules(v);const G=q.map((v=>requestToId(getShortModuleName(v,R,N))));const ie=q.map((v=>requestToId(getLongModuleName("",v,R,j,N))));v.idNameHints.sort();const ae=Array.from(v.idNameHints).concat(G,ie).filter(Boolean).join($);return shortenLongString(ae,$,j)};E.getLongChunkName=getLongChunkName;const getFullChunkName=(v,E,R,$)=>{if(v.name)return v.name;const N=E.getChunkRootModules(v);const q=N.map((v=>j(R,v.identifier(),$)));return q.join()};E.getFullChunkName=getFullChunkName;const addToMapOfItems=(v,E,R)=>{let $=v.get(E);if($===undefined){$=[];v.set(E,$)}$.push(R)};const getUsedModuleIdsAndModules=(v,E)=>{const R=v.chunkGraph;const $=[];const j=new Set;if(v.usedModuleIds){for(const E of v.usedModuleIds){j.add(E+"")}}for(const N of v.modules){if(!N.needId)continue;const v=R.getModuleId(N);if(v!==null){j.add(v+"")}else{if((!E||E(N))&&R.getNumberOfModuleChunks(N)!==0){$.push(N)}}}return[j,$]};E.getUsedModuleIdsAndModules=getUsedModuleIdsAndModules;const getUsedChunkIds=v=>{const E=new Set;if(v.usedChunkIds){for(const R of v.usedChunkIds){E.add(R+"")}}for(const R of v.chunks){const v=R.id;if(v!==null){E.add(v+"")}}return E};E.getUsedChunkIds=getUsedChunkIds;const assignNames=(v,E,R,$,j,N)=>{const q=new Map;for(const R of v){const v=E(R);addToMapOfItems(q,v,R)}const G=new Map;for(const[v,E]of q){if(E.length>1||!v){for(const $ of E){const E=R($,v);addToMapOfItems(G,E,$)}}else{addToMapOfItems(G,v,E[0])}}const ie=[];for(const[v,E]of G){if(!v){for(const v of E){ie.push(v)}}else if(E.length===1&&!j.has(v)){N(E[0],v);j.add(v)}else{E.sort($);let R=0;for(const $ of E){while(G.has(v+R)&&j.has(v+R))R++;N($,v+R);j.add(v+R);R++}}}ie.sort($);return ie};E.assignNames=assignNames;const assignDeterministicIds=(v,E,R,$,j=[10],q=10,G=0,ie=0)=>{v.sort(R);const ae=Math.min(Math.ceil(v.length*20)+G,Number.MAX_SAFE_INTEGER);let ce=0;let le=j[ce];while(le{const $=R.chunkGraph;let j=0;let N;if(v.size>0){N=E=>{if($.getModuleId(E)===null){while(v.has(j+""))j++;$.setModuleId(E,j++)}}}else{N=v=>{if($.getModuleId(v)===null){$.setModuleId(v,j++)}}}for(const v of E){N(v)}};E.assignAscendingModuleIds=assignAscendingModuleIds;const assignAscendingChunkIds=(v,E)=>{const R=getUsedChunkIds(E);let $=0;if(R.size>0){for(const E of v){if(E.id===null){while(R.has($+""))$++;E.id=$;E.ids=[$];$++}}}else{for(const E of v){if(E.id===null){E.id=$;E.ids=[$];$++}}}};E.assignAscendingChunkIds=assignAscendingChunkIds},23750:function(v,E,R){"use strict";const{compareChunksNatural:$}=R(58792);const{getShortChunkName:j,getLongChunkName:N,assignNames:q,getUsedChunkIds:G,assignAscendingChunkIds:ie}=R(76283);class NamedChunkIdsPlugin{constructor(v){this.delimiter=v&&v.delimiter||"-";this.context=v&&v.context}apply(v){v.hooks.compilation.tap("NamedChunkIdsPlugin",(E=>{const{hashFunction:R}=E.outputOptions;E.hooks.chunkIds.tap("NamedChunkIdsPlugin",(ae=>{const ce=E.chunkGraph;const le=this.context?this.context:v.context;const me=this.delimiter;const _e=q(Array.from(ae).filter((v=>{if(v.name){v.id=v.name;v.ids=[v.name]}return v.id===null})),(E=>j(E,ce,le,me,R,v.root)),(E=>N(E,ce,le,me,R,v.root)),$(ce),G(E),((v,E)=>{v.id=E;v.ids=[E]}));if(_e.length>0){ie(_e,E)}}))}))}}v.exports=NamedChunkIdsPlugin},23405:function(v,E,R){"use strict";const{compareModulesByIdentifier:$}=R(58792);const{getShortModuleName:j,getLongModuleName:N,assignNames:q,getUsedModuleIdsAndModules:G,assignAscendingModuleIds:ie}=R(76283);class NamedModuleIdsPlugin{constructor(v){this.options=v||{}}apply(v){const{root:E}=v;v.hooks.compilation.tap("NamedModuleIdsPlugin",(R=>{const{hashFunction:ae}=R.outputOptions;R.hooks.moduleIds.tap("NamedModuleIdsPlugin",(()=>{const ce=R.chunkGraph;const le=this.options.context?this.options.context:v.context;const[me,_e]=G(R);const Ie=q(_e,(v=>j(v,le,E)),((v,R)=>N(R,v,le,ae,E)),$,me,((v,E)=>ce.setModuleId(v,E)));if(Ie.length>0){ie(me,Ie,R)}}))}))}}v.exports=NamedModuleIdsPlugin},34697:function(v,E,R){"use strict";const{compareChunksNatural:$}=R(58792);const{assignAscendingChunkIds:j}=R(76283);class NaturalChunkIdsPlugin{apply(v){v.hooks.compilation.tap("NaturalChunkIdsPlugin",(v=>{v.hooks.chunkIds.tap("NaturalChunkIdsPlugin",(E=>{const R=v.chunkGraph;const N=$(R);const q=Array.from(E).sort(N);j(q,v)}))}))}}v.exports=NaturalChunkIdsPlugin},74040:function(v,E,R){"use strict";const{compareModulesByPreOrderIndexOrIdentifier:$}=R(58792);const{assignAscendingModuleIds:j,getUsedModuleIdsAndModules:N}=R(76283);class NaturalModuleIdsPlugin{apply(v){v.hooks.compilation.tap("NaturalModuleIdsPlugin",(v=>{v.hooks.moduleIds.tap("NaturalModuleIdsPlugin",(E=>{const[R,q]=N(v);q.sort($(v.moduleGraph));j(R,q,v)}))}))}}v.exports=NaturalModuleIdsPlugin},4955:function(v,E,R){"use strict";const{compareChunksNatural:$}=R(58792);const j=R(89699);const{assignAscendingChunkIds:N}=R(76283);const q=j(R(64264),(()=>R(92738)),{name:"Occurrence Order Chunk Ids Plugin",baseDataPath:"options"});class OccurrenceChunkIdsPlugin{constructor(v={}){q(v);this.options=v}apply(v){const E=this.options.prioritiseInitial;v.hooks.compilation.tap("OccurrenceChunkIdsPlugin",(v=>{v.hooks.chunkIds.tap("OccurrenceChunkIdsPlugin",(R=>{const j=v.chunkGraph;const q=new Map;const G=$(j);for(const v of R){let E=0;for(const R of v.groupsIterable){for(const v of R.parentsIterable){if(v.isInitial())E++}}q.set(v,E)}const ie=Array.from(R).sort(((v,R)=>{if(E){const E=q.get(v);const $=q.get(R);if(E>$)return-1;if(E<$)return 1}const $=v.getNumberOfGroups();const j=R.getNumberOfGroups();if($>j)return-1;if($R(2710)),{name:"Occurrence Order Module Ids Plugin",baseDataPath:"options"});class OccurrenceModuleIdsPlugin{constructor(v={}){G(v);this.options=v}apply(v){const E=this.options.prioritiseInitial;v.hooks.compilation.tap("OccurrenceModuleIdsPlugin",(v=>{const R=v.moduleGraph;v.hooks.moduleIds.tap("OccurrenceModuleIdsPlugin",(()=>{const j=v.chunkGraph;const[G,ie]=q(v);const ae=new Map;const ce=new Map;const le=new Map;const me=new Map;for(const v of ie){let E=0;let R=0;for(const $ of j.getModuleChunksIterable(v)){if($.canBeInitial())E++;if(j.isEntryModuleInChunk(v,$))R++}le.set(v,E);me.set(v,R)}const countOccursInEntry=v=>{let E=0;for(const[$,j]of R.getIncomingConnectionsByOriginModule(v)){if(!$)continue;if(!j.some((v=>v.isTargetActive(undefined))))continue;E+=le.get($)}return E};const countOccurs=v=>{let E=0;for(const[$,N]of R.getIncomingConnectionsByOriginModule(v)){if(!$)continue;const v=j.getNumberOfModuleChunks($);for(const R of N){if(!R.isTargetActive(undefined))continue;if(!R.dependency)continue;const $=R.dependency.getNumberOfIdOccurrences();if($===0)continue;E+=$*v}}return E};if(E){for(const v of ie){const E=countOccursInEntry(v)+le.get(v)+me.get(v);ae.set(v,E)}}for(const v of ie){const E=countOccurs(v)+j.getNumberOfModuleChunks(v)+me.get(v);ce.set(v,E)}const _e=$(v.moduleGraph);ie.sort(((v,R)=>{if(E){const E=ae.get(v);const $=ae.get(R);if(E>$)return-1;if(E<$)return 1}const $=ce.get(v);const j=ce.get(R);if($>j)return-1;if($true);const j=!$||$==="merge"||$==="update";this._read=j||$==="read";this._write=j||$==="create";this._prune=$==="update"}apply(v){let E;let R=false;if(this._read){v.hooks.readRecords.tapAsync(N,($=>{const j=v.intermediateFileSystem;j.readFile(this._path,((v,j)=>{if(v){if(v.code!=="ENOENT"){return $(v)}return $()}const N=JSON.parse(j.toString());E=new Map;for(const v of Object.keys(N)){E.set(v,N[v])}R=false;return $()}))}))}if(this._write){v.hooks.emitRecords.tapAsync(N,($=>{if(!E||!R)return $();const j={};const N=Array.from(E).sort((([v],[E])=>v{const G=v.root;const ie=this._context||v.context;if(this._read){q.hooks.reviveModules.tap(N,((v,R)=>{if(!E)return;const{chunkGraph:N}=q;const[ae,ce]=j(q,this._test);for(const v of ce){const R=v.libIdent({context:ie,associatedObjectForCache:G});if(!R)continue;const j=E.get(R);const ce=`${j}`;if(ae.has(ce)){const E=new $(`SyncModuleIdsPlugin: Unable to restore id '${j}' from '${this._path}' as it's already used.`);E.module=v;q.errors.push(E)}N.setModuleId(v,j);ae.add(ce)}}))}if(this._write){q.hooks.recordModules.tap(N,(v=>{const{chunkGraph:$}=q;let j=E;if(!j){j=E=new Map}else if(this._prune){E=new Map}for(const N of v){if(this._test(N)){const v=N.libIdent({context:ie,associatedObjectForCache:G});if(!v)continue;const q=$.getModuleId(N);if(q===null)continue;const ae=j.get(v);if(ae!==q){R=true}else if(E===j){continue}E.set(v,q)}}if(E.size!==j.size)R=true}))}}))}}v.exports=SyncModuleIdsPlugin},13733:function(v,E,R){"use strict";const $=R(73837);const j=R(61374);const lazyFunction=v=>{const E=j(v);const f=(...v)=>E()(...v);return f};const mergeExports=(v,E)=>{const R=Object.getOwnPropertyDescriptors(E);for(const E of Object.keys(R)){const $=R[E];if($.get){const R=$.get;Object.defineProperty(v,E,{configurable:false,enumerable:true,get:j(R)})}else if(typeof $.value==="object"){Object.defineProperty(v,E,{configurable:false,enumerable:true,writable:false,value:mergeExports({},$.value)})}else{throw new Error("Exposed values must be either a getter or an nested object")}}return Object.freeze(v)};const N=lazyFunction((()=>R(20761)));v.exports=mergeExports(N,{get webpack(){return R(20761)},get validate(){const v=R(62136);const E=j((()=>{const v=R(71732);const E=R(13954);return R=>v(E,R)}));return R=>{if(!v(R))E()(R)}},get validateSchema(){const v=R(71732);return v},get version(){return R(27012).i8},get cli(){return R(12218)},get AutomaticPrefetchPlugin(){return R(59851)},get AsyncDependenciesBlock(){return R(42290)},get BannerPlugin(){return R(65502)},get Cache(){return R(25363)},get Chunk(){return R(84891)},get ChunkGraph(){return R(75449)},get CleanPlugin(){return R(40135)},get Compilation(){return R(73002)},get Compiler(){return R(37912)},get ConcatenationScope(){return R(81701)},get ContextExclusionPlugin(){return R(98633)},get ContextReplacementPlugin(){return R(31705)},get DefinePlugin(){return R(5354)},get DelegatedPlugin(){return R(82059)},get Dependency(){return R(87056)},get DllPlugin(){return R(89978)},get DllReferencePlugin(){return R(1282)},get DynamicEntryPlugin(){return R(41924)},get EntryOptionPlugin(){return R(2699)},get EntryPlugin(){return R(19360)},get EnvironmentPlugin(){return R(48681)},get EvalDevToolModulePlugin(){return R(76289)},get EvalSourceMapDevToolPlugin(){return R(67470)},get ExternalModule(){return R(73096)},get ExternalsPlugin(){return R(51562)},get Generator(){return R(97152)},get HotUpdateChunk(){return R(23834)},get HotModuleReplacementPlugin(){return R(23456)},get IgnorePlugin(){return R(46683)},get JavascriptModulesPlugin(){return $.deprecate((()=>R(36109)),"webpack.JavascriptModulesPlugin has moved to webpack.javascript.JavascriptModulesPlugin","DEP_WEBPACK_JAVASCRIPT_MODULES_PLUGIN")()},get LibManifestPlugin(){return R(91052)},get LibraryTemplatePlugin(){return $.deprecate((()=>R(59656)),"webpack.LibraryTemplatePlugin is deprecated and has been replaced by compilation.outputOptions.library or compilation.addEntry + passing a library option","DEP_WEBPACK_LIBRARY_TEMPLATE_PLUGIN")()},get LoaderOptionsPlugin(){return R(60634)},get LoaderTargetPlugin(){return R(67181)},get Module(){return R(53840)},get ModuleFilenameHelpers(){return R(99523)},get ModuleGraph(){return R(13487)},get ModuleGraphConnection(){return R(82921)},get NoEmitOnErrorsPlugin(){return R(424)},get NormalModule(){return R(89417)},get NormalModuleReplacementPlugin(){return R(25755)},get MultiCompiler(){return R(39601)},get Parser(){return R(68646)},get PrefetchPlugin(){return R(82353)},get ProgressPlugin(){return R(67317)},get ProvidePlugin(){return R(79426)},get RuntimeGlobals(){return R(39201)},get RuntimeModule(){return R(93496)},get SingleEntryPlugin(){return $.deprecate((()=>R(19360)),"SingleEntryPlugin was renamed to EntryPlugin","DEP_WEBPACK_SINGLE_ENTRY_PLUGIN")()},get SourceMapDevToolPlugin(){return R(63645)},get Stats(){return R(47158)},get Template(){return R(43841)},get UsageState(){return R(13168).UsageState},get WatchIgnorePlugin(){return R(4179)},get WebpackError(){return R(27154)},get WebpackOptionsApply(){return R(73305)},get WebpackOptionsDefaulter(){return $.deprecate((()=>R(42163)),"webpack.WebpackOptionsDefaulter is deprecated and has been replaced by webpack.config.getNormalizedWebpackOptions and webpack.config.applyWebpackOptionsDefaults","DEP_WEBPACK_OPTIONS_DEFAULTER")()},get WebpackOptionsValidationError(){return R(38476).ValidationError},get ValidationError(){return R(38476).ValidationError},cache:{get MemoryCachePlugin(){return R(64542)}},config:{get getNormalizedWebpackOptions(){return R(80593).getNormalizedWebpackOptions},get applyWebpackOptionsDefaults(){return R(64395).applyWebpackOptionsDefaults}},dependencies:{get ModuleDependency(){return R(99809)},get HarmonyImportDependency(){return R(58668)},get ConstDependency(){return R(14367)},get NullDependency(){return R(91596)}},ids:{get ChunkModuleIdRangePlugin(){return R(87352)},get NaturalModuleIdsPlugin(){return R(74040)},get OccurrenceModuleIdsPlugin(){return R(12202)},get NamedModuleIdsPlugin(){return R(23405)},get DeterministicChunkIdsPlugin(){return R(6777)},get DeterministicModuleIdsPlugin(){return R(49335)},get NamedChunkIdsPlugin(){return R(23750)},get OccurrenceChunkIdsPlugin(){return R(4955)},get HashedModuleIdsPlugin(){return R(13340)}},javascript:{get EnableChunkLoadingPlugin(){return R(49548)},get JavascriptModulesPlugin(){return R(36109)},get JavascriptParser(){return R(33177)}},optimize:{get AggressiveMergingPlugin(){return R(88455)},get AggressiveSplittingPlugin(){return $.deprecate((()=>R(97239)),"AggressiveSplittingPlugin is deprecated in favor of SplitChunksPlugin","DEP_WEBPACK_AGGRESSIVE_SPLITTING_PLUGIN")()},get InnerGraph(){return R(39236)},get LimitChunkCountPlugin(){return R(96049)},get MinChunkSizePlugin(){return R(37434)},get ModuleConcatenationPlugin(){return R(5279)},get RealContentHashPlugin(){return R(33347)},get RuntimeChunkPlugin(){return R(57105)},get SideEffectsFlagPlugin(){return R(94281)},get SplitChunksPlugin(){return R(61167)}},runtime:{get GetChunkFilenameRuntimeModule(){return R(44033)},get LoadScriptRuntimeModule(){return R(46750)}},prefetch:{get ChunkPrefetchPreloadPlugin(){return R(7006)}},web:{get FetchCompileAsyncWasmPlugin(){return R(90692)},get FetchCompileWasmPlugin(){return R(70390)},get JsonpChunkLoadingRuntimeModule(){return R(6594)},get JsonpTemplatePlugin(){return R(44896)}},webworker:{get WebWorkerTemplatePlugin(){return R(29649)}},node:{get NodeEnvironmentPlugin(){return R(27381)},get NodeSourcePlugin(){return R(54250)},get NodeTargetPlugin(){return R(23066)},get NodeTemplatePlugin(){return R(33999)},get ReadFileCompileWasmPlugin(){return R(29023)}},electron:{get ElectronTargetPlugin(){return R(83290)}},wasm:{get AsyncWebAssemblyModulesPlugin(){return R(24979)}},library:{get AbstractLibraryPlugin(){return R(19880)},get EnableLibraryPlugin(){return R(7616)}},container:{get ContainerPlugin(){return R(90005)},get ContainerReferencePlugin(){return R(25405)},get ModuleFederationPlugin(){return R(45124)},get scope(){return R(58491).scope}},sharing:{get ConsumeSharedPlugin(){return R(40724)},get ProvideSharedPlugin(){return R(90432)},get SharePlugin(){return R(77443)},get scope(){return R(58491).scope}},debug:{get ProfilingPlugin(){return R(2366)}},util:{get createHash(){return R(85205)},get comparators(){return R(58792)},get runtime(){return R(47462)},get serialization(){return R(7591)},get cleverMerge(){return R(22093).cachedCleverMerge},get LazySet(){return R(96522)}},get sources(){return R(51255)},experiments:{schemes:{get HttpUriPlugin(){return R(89674)}},ids:{get SyncModuleIdsPlugin(){return R(63004)}}}})},54433:function(v,E,R){"use strict";const{ConcatSource:$,PrefixSource:j,RawSource:N}=R(51255);const{RuntimeGlobals:q}=R(13733);const G=R(23834);const ie=R(43841);const{getCompilationHooks:ae}=R(36109);const{generateEntryStartup:ce,updateHashForEntryStartup:le}=R(82695);class ArrayPushCallbackChunkFormatPlugin{apply(v){v.hooks.thisCompilation.tap("ArrayPushCallbackChunkFormatPlugin",(v=>{v.hooks.additionalChunkRuntimeRequirements.tap("ArrayPushCallbackChunkFormatPlugin",((v,E,{chunkGraph:R})=>{if(v.hasRuntime())return;if(R.getNumberOfEntryModules(v)>0){E.add(q.onChunksLoaded);E.add(q.require)}E.add(q.chunkCallback)}));const E=ae(v);E.renderChunk.tap("ArrayPushCallbackChunkFormatPlugin",((R,ae)=>{const{chunk:le,chunkGraph:me,runtimeTemplate:_e}=ae;const Ie=le instanceof G?le:null;const Me=_e.globalObject;const Oe=new $;const Te=me.getChunkRuntimeModulesInOrder(le);if(Ie){const v=_e.outputOptions.hotUpdateGlobal;Oe.add(`${Me}[${JSON.stringify(v)}](`);Oe.add(`${JSON.stringify(le.id)},`);Oe.add(R);if(Te.length>0){Oe.add(",\n");const v=ie.renderChunkRuntimeModules(Te,ae);Oe.add(v)}Oe.add(")")}else{const G=_e.outputOptions.chunkLoadingGlobal;Oe.add(`(${Me}[${JSON.stringify(G)}] = ${Me}[${JSON.stringify(G)}] || []).push([`);Oe.add(`${JSON.stringify(le.ids)},`);Oe.add(R);const Ie=Array.from(me.getChunkEntryModulesWithChunkGroupIterable(le));if(Te.length>0||Ie.length>0){const R=new $((_e.supportsArrowFunction()?"__webpack_require__ =>":"function(__webpack_require__)")+" { // webpackRuntimeModules\n");if(Te.length>0){R.add(ie.renderRuntimeModules(Te,{...ae,codeGenerationResults:v.codeGenerationResults}))}if(Ie.length>0){const v=new N(ce(me,_e,Ie,le,true));R.add(E.renderStartup.call(v,Ie[Ie.length-1][0],{...ae,inlined:false}));if(me.getChunkRuntimeRequirements(le).has(q.returnExportsFromRuntime)){R.add("return __webpack_exports__;\n")}}R.add("}\n");Oe.add(",\n");Oe.add(new j("/******/ ",R))}Oe.add("])")}return Oe}));E.chunkHash.tap("ArrayPushCallbackChunkFormatPlugin",((v,E,{chunkGraph:R,runtimeTemplate:$})=>{if(v.hasRuntime())return;E.update(`ArrayPushCallbackChunkFormatPlugin1${$.outputOptions.chunkLoadingGlobal}${$.outputOptions.hotUpdateGlobal}${$.globalObject}`);const j=Array.from(R.getChunkEntryModulesWithChunkGroupIterable(v));le(E,R,j,v)}))}))}}v.exports=ArrayPushCallbackChunkFormatPlugin},94844:function(v){"use strict";const E=0;const R=1;const $=2;const j=3;const N=4;const q=5;const G=6;const ie=7;const ae=8;const ce=9;const le=10;const me=11;const _e=12;const Ie=13;class BasicEvaluatedExpression{constructor(){this.type=E;this.range=undefined;this.falsy=false;this.truthy=false;this.nullish=undefined;this.sideEffects=true;this.bool=undefined;this.number=undefined;this.bigint=undefined;this.regExp=undefined;this.string=undefined;this.quasis=undefined;this.parts=undefined;this.array=undefined;this.items=undefined;this.options=undefined;this.prefix=undefined;this.postfix=undefined;this.wrappedInnerExpressions=undefined;this.identifier=undefined;this.rootInfo=undefined;this.getMembers=undefined;this.getMembersOptionals=undefined;this.expression=undefined}isUnknown(){return this.type===E}isNull(){return this.type===$}isUndefined(){return this.type===R}isString(){return this.type===j}isNumber(){return this.type===N}isBigInt(){return this.type===Ie}isBoolean(){return this.type===q}isRegExp(){return this.type===G}isConditional(){return this.type===ie}isArray(){return this.type===ae}isConstArray(){return this.type===ce}isIdentifier(){return this.type===le}isWrapped(){return this.type===me}isTemplateString(){return this.type===_e}isPrimitiveType(){switch(this.type){case R:case $:case j:case N:case q:case Ie:case me:case _e:return true;case G:case ae:case ce:return false;default:return undefined}}isCompileTimeValue(){switch(this.type){case R:case $:case j:case N:case q:case G:case ce:case Ie:return true;default:return false}}asCompileTimeValue(){switch(this.type){case R:return undefined;case $:return null;case j:return this.string;case N:return this.number;case q:return this.bool;case G:return this.regExp;case ce:return this.array;case Ie:return this.bigint;default:throw new Error("asCompileTimeValue must only be called for compile-time values")}}isTruthy(){return this.truthy}isFalsy(){return this.falsy}isNullish(){return this.nullish}couldHaveSideEffects(){return this.sideEffects}asBool(){if(this.truthy)return true;if(this.falsy||this.nullish)return false;if(this.isBoolean())return this.bool;if(this.isNull())return false;if(this.isUndefined())return false;if(this.isString())return this.string!=="";if(this.isNumber())return this.number!==0;if(this.isBigInt())return this.bigint!==BigInt(0);if(this.isRegExp())return true;if(this.isArray())return true;if(this.isConstArray())return true;if(this.isWrapped()){return this.prefix&&this.prefix.asBool()||this.postfix&&this.postfix.asBool()?true:undefined}if(this.isTemplateString()){const v=this.asString();if(typeof v==="string")return v!==""}return undefined}asNullish(){const v=this.isNullish();if(v===true||this.isNull()||this.isUndefined())return true;if(v===false)return false;if(this.isTruthy())return false;if(this.isBoolean())return false;if(this.isString())return false;if(this.isNumber())return false;if(this.isBigInt())return false;if(this.isRegExp())return false;if(this.isArray())return false;if(this.isConstArray())return false;if(this.isTemplateString())return false;if(this.isRegExp())return false;return undefined}asString(){if(this.isBoolean())return`${this.bool}`;if(this.isNull())return"null";if(this.isUndefined())return"undefined";if(this.isString())return this.string;if(this.isNumber())return`${this.number}`;if(this.isBigInt())return`${this.bigint}`;if(this.isRegExp())return`${this.regExp}`;if(this.isArray()){let v=[];for(const E of this.items){const R=E.asString();if(R===undefined)return undefined;v.push(R)}return`${v}`}if(this.isConstArray())return`${this.array}`;if(this.isTemplateString()){let v="";for(const E of this.parts){const R=E.asString();if(R===undefined)return undefined;v+=R}return v}return undefined}setString(v){this.type=j;this.string=v;this.sideEffects=false;return this}setUndefined(){this.type=R;this.sideEffects=false;return this}setNull(){this.type=$;this.sideEffects=false;return this}setNumber(v){this.type=N;this.number=v;this.sideEffects=false;return this}setBigInt(v){this.type=Ie;this.bigint=v;this.sideEffects=false;return this}setBoolean(v){this.type=q;this.bool=v;this.sideEffects=false;return this}setRegExp(v){this.type=G;this.regExp=v;this.sideEffects=false;return this}setIdentifier(v,E,R,$){this.type=le;this.identifier=v;this.rootInfo=E;this.getMembers=R;this.getMembersOptionals=$;this.sideEffects=true;return this}setWrapped(v,E,R){this.type=me;this.prefix=v;this.postfix=E;this.wrappedInnerExpressions=R;this.sideEffects=true;return this}setOptions(v){this.type=ie;this.options=v;this.sideEffects=true;return this}addOptions(v){if(!this.options){this.type=ie;this.options=[];this.sideEffects=true}for(const E of v){this.options.push(E)}return this}setItems(v){this.type=ae;this.items=v;this.sideEffects=v.some((v=>v.couldHaveSideEffects()));return this}setArray(v){this.type=ce;this.array=v;this.sideEffects=false;return this}setTemplateString(v,E,R){this.type=_e;this.quasis=v;this.parts=E;this.templateStringKind=R;this.sideEffects=E.some((v=>v.sideEffects));return this}setTruthy(){this.falsy=false;this.truthy=true;this.nullish=false;return this}setFalsy(){this.falsy=true;this.truthy=false;return this}setNullish(v){this.nullish=v;if(v)return this.setFalsy();return this}setRange(v){this.range=v;return this}setSideEffects(v=true){this.sideEffects=v;return this}setExpression(v){this.expression=v;return this}}BasicEvaluatedExpression.isValidRegExpFlags=v=>{const E=v.length;if(E===0)return true;if(E>4)return false;let R=0;for(let $=0;${const j=new Set([v]);const N=new Set;for(const v of j){for(const $ of v.chunks){if($===E)continue;if($===R)continue;N.add($)}for(const E of v.parentsIterable){if(E instanceof $)j.add(E)}}return N};E.getAllChunks=getAllChunks},93547:function(v,E,R){"use strict";const{ConcatSource:$,RawSource:j}=R(51255);const N=R(39201);const q=R(43841);const{getChunkFilenameTemplate:G,getCompilationHooks:ie}=R(36109);const{generateEntryStartup:ae,updateHashForEntryStartup:ce}=R(82695);class CommonJsChunkFormatPlugin{apply(v){v.hooks.thisCompilation.tap("CommonJsChunkFormatPlugin",(v=>{v.hooks.additionalChunkRuntimeRequirements.tap("CommonJsChunkLoadingPlugin",((v,E,{chunkGraph:R})=>{if(v.hasRuntime())return;if(R.getNumberOfEntryModules(v)>0){E.add(N.require);E.add(N.startupEntrypoint);E.add(N.externalInstallChunk)}}));const E=ie(v);E.renderChunk.tap("CommonJsChunkFormatPlugin",((R,ie)=>{const{chunk:ce,chunkGraph:le,runtimeTemplate:me}=ie;const _e=new $;_e.add(`exports.id = ${JSON.stringify(ce.id)};\n`);_e.add(`exports.ids = ${JSON.stringify(ce.ids)};\n`);_e.add(`exports.modules = `);_e.add(R);_e.add(";\n");const Ie=le.getChunkRuntimeModulesInOrder(ce);if(Ie.length>0){_e.add("exports.runtime =\n");_e.add(q.renderChunkRuntimeModules(Ie,ie))}const Me=Array.from(le.getChunkEntryModulesWithChunkGroupIterable(ce));if(Me.length>0){const R=Me[0][1].getRuntimeChunk();const q=v.getPath(G(ce,v.outputOptions),{chunk:ce,contentHashType:"javascript"}).split("/");const Ie=v.getPath(G(R,v.outputOptions),{chunk:R,contentHashType:"javascript"}).split("/");q.pop();while(q.length>0&&Ie.length>0&&q[0]===Ie[0]){q.shift();Ie.shift()}const Oe=(q.length>0?"../".repeat(q.length):"./")+Ie.join("/");const Te=new $;Te.add(`(${me.supportsArrowFunction()?"() => ":"function() "}{\n`);Te.add("var exports = {};\n");Te.add(_e);Te.add(";\n\n// load runtime\n");Te.add(`var __webpack_require__ = require(${JSON.stringify(Oe)});\n`);Te.add(`${N.externalInstallChunk}(exports);\n`);const Ne=new j(ae(le,me,Me,ce,false));Te.add(E.renderStartup.call(Ne,Me[Me.length-1][0],{...ie,inlined:false}));Te.add("\n})()");return Te}return _e}));E.chunkHash.tap("CommonJsChunkFormatPlugin",((v,E,{chunkGraph:R})=>{if(v.hasRuntime())return;E.update("CommonJsChunkFormatPlugin");E.update("1");const $=Array.from(R.getChunkEntryModulesWithChunkGroupIterable(v));ce(E,R,$,v)}))}))}}v.exports=CommonJsChunkFormatPlugin},49548:function(v,E,R){"use strict";const $=new WeakMap;const getEnabledTypes=v=>{let E=$.get(v);if(E===undefined){E=new Set;$.set(v,E)}return E};class EnableChunkLoadingPlugin{constructor(v){this.type=v}static setEnabled(v,E){getEnabledTypes(v).add(E)}static checkEnabled(v,E){if(!getEnabledTypes(v).has(E)){throw new Error(`Chunk loading type "${E}" is not enabled. `+"EnableChunkLoadingPlugin need to be used to enable this type of chunk loading. "+'This usually happens through the "output.enabledChunkLoadingTypes" option. '+'If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes". '+"These types are enabled: "+Array.from(getEnabledTypes(v)).join(", "))}}apply(v){const{type:E}=this;const $=getEnabledTypes(v);if($.has(E))return;$.add(E);if(typeof E==="string"){switch(E){case"jsonp":{const E=R(21631);(new E).apply(v);break}case"import-scripts":{const E=R(22188);(new E).apply(v);break}case"require":{const E=R(70979);new E({asyncChunkLoading:false}).apply(v);break}case"async-node":{const E=R(70979);new E({asyncChunkLoading:true}).apply(v);break}case"import":{const E=R(94603);(new E).apply(v);break}case"universal":throw new Error("Universal Chunk Loading is not implemented yet");default:throw new Error(`Unsupported chunk loading type ${E}.\nPlugins which provide custom chunk loading types must call EnableChunkLoadingPlugin.setEnabled(compiler, type) to disable this error.`)}}else{}}}v.exports=EnableChunkLoadingPlugin},88893:function(v,E,R){"use strict";const $=R(73837);const{RawSource:j,ReplaceSource:N}=R(51255);const q=R(97152);const G=R(64768);const ie=R(48180);const ae=$.deprecate(((v,E,R)=>v.getInitFragments(E,R)),"DependencyTemplate.getInitFragment is deprecated (use apply(dep, source, { initFragments }) instead)","DEP_WEBPACK_JAVASCRIPT_GENERATOR_GET_INIT_FRAGMENTS");const ce=new Set(["javascript"]);class JavascriptGenerator extends q{getTypes(v){return ce}getSize(v,E){const R=v.originalSource();if(!R){return 39}return R.size()}getConcatenationBailoutReason(v,E){if(!v.buildMeta||v.buildMeta.exportsType!=="namespace"||v.presentationalDependencies===undefined||!v.presentationalDependencies.some((v=>v instanceof ie))){return"Module is not an ECMAScript module"}if(v.buildInfo&&v.buildInfo.moduleConcatenationBailout){return`Module uses ${v.buildInfo.moduleConcatenationBailout}`}}generate(v,E){const R=v.originalSource();if(!R){return new j("throw new Error('No source available');")}const $=new N(R);const q=[];this.sourceModule(v,q,$,E);return G.addToSource($,q,E)}sourceModule(v,E,R,$){for(const j of v.dependencies){this.sourceDependency(v,j,E,R,$)}if(v.presentationalDependencies!==undefined){for(const j of v.presentationalDependencies){this.sourceDependency(v,j,E,R,$)}}for(const j of v.blocks){this.sourceBlock(v,j,E,R,$)}}sourceBlock(v,E,R,$,j){for(const N of E.dependencies){this.sourceDependency(v,N,R,$,j)}for(const N of E.blocks){this.sourceBlock(v,N,R,$,j)}}sourceDependency(v,E,R,$,j){const N=E.constructor;const q=j.dependencyTemplates.get(N);if(!q){throw new Error("No template for dependency: "+E.constructor.name)}const G={runtimeTemplate:j.runtimeTemplate,dependencyTemplates:j.dependencyTemplates,moduleGraph:j.moduleGraph,chunkGraph:j.chunkGraph,module:v,runtime:j.runtime,runtimeRequirements:j.runtimeRequirements,concatenationScope:j.concatenationScope,codeGenerationResults:j.codeGenerationResults,initFragments:R};q.apply(E,$,G);if("getInitFragments"in q){const v=ae(q,E,G);if(v){for(const E of v){R.push(E)}}}}}v.exports=JavascriptGenerator},36109:function(v,E,R){"use strict";const{SyncWaterfallHook:$,SyncHook:j,SyncBailHook:N}=R(44217);const q=R(26144);const{ConcatSource:G,OriginalSource:ie,PrefixSource:ae,RawSource:ce,CachedSource:le}=R(51255);const me=R(73002);const{tryRunOrWebpackError:_e}=R(35230);const Ie=R(23834);const Me=R(64768);const Oe=R(39201);const Te=R(43841);const{last:Ne,someInIterable:Be}=R(30922);const Le=R(8382);const{compareModulesByIdentifier:qe}=R(58792);const Ue=R(85205);const Ge=R(46849);const{intersectRuntime:He}=R(47462);const We=R(88893);const Qe=R(33177);const chunkHasJs=(v,E)=>{if(E.getNumberOfEntryModules(v)>0)return true;return E.getChunkModulesIterableBySourceType(v,"javascript")?true:false};const printGeneratedCodeForStack=(v,E)=>{const R=E.split("\n");const $=`${R.length}`.length;return`\n\nGenerated code for ${v.identifier()}\n${R.map(((v,E,R)=>{const j=`${E+1}`;return`${" ".repeat($-j.length)}${j} | ${v}`})).join("\n")}`};const Je=new WeakMap;class JavascriptModulesPlugin{static getCompilationHooks(v){if(!(v instanceof me)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=Je.get(v);if(E===undefined){E={renderModuleContent:new $(["source","module","renderContext"]),renderModuleContainer:new $(["source","module","renderContext"]),renderModulePackage:new $(["source","module","renderContext"]),render:new $(["source","renderContext"]),renderContent:new $(["source","renderContext"]),renderStartup:new $(["source","module","startupRenderContext"]),renderChunk:new $(["source","renderContext"]),renderMain:new $(["source","renderContext"]),renderRequire:new $(["code","renderContext"]),inlineInRuntimeBailout:new N(["module","renderContext"]),embedInRuntimeBailout:new N(["module","renderContext"]),strictRuntimeBailout:new N(["renderContext"]),chunkHash:new j(["chunk","hash","context"]),useSourceMap:new N(["chunk","renderContext"])};Je.set(v,E)}return E}constructor(v={}){this.options=v;this._moduleFactoryCache=new WeakMap}apply(v){v.hooks.compilation.tap("JavascriptModulesPlugin",((v,{normalModuleFactory:E})=>{const R=JavascriptModulesPlugin.getCompilationHooks(v);E.hooks.createParser.for("javascript/auto").tap("JavascriptModulesPlugin",(v=>new Qe("auto")));E.hooks.createParser.for("javascript/dynamic").tap("JavascriptModulesPlugin",(v=>new Qe("script")));E.hooks.createParser.for("javascript/esm").tap("JavascriptModulesPlugin",(v=>new Qe("module")));E.hooks.createGenerator.for("javascript/auto").tap("JavascriptModulesPlugin",(()=>new We));E.hooks.createGenerator.for("javascript/dynamic").tap("JavascriptModulesPlugin",(()=>new We));E.hooks.createGenerator.for("javascript/esm").tap("JavascriptModulesPlugin",(()=>new We));v.hooks.renderManifest.tap("JavascriptModulesPlugin",((E,$)=>{const{hash:j,chunk:N,chunkGraph:q,moduleGraph:G,runtimeTemplate:ie,dependencyTemplates:ae,outputOptions:ce,codeGenerationResults:le}=$;const me=N instanceof Ie?N:null;let _e;const Me=JavascriptModulesPlugin.getChunkFilenameTemplate(N,ce);if(me){_e=()=>this.renderChunk({chunk:N,dependencyTemplates:ae,runtimeTemplate:ie,moduleGraph:G,chunkGraph:q,codeGenerationResults:le,strictMode:ie.isModule()},R)}else if(N.hasRuntime()){_e=()=>this.renderMain({hash:j,chunk:N,dependencyTemplates:ae,runtimeTemplate:ie,moduleGraph:G,chunkGraph:q,codeGenerationResults:le,strictMode:ie.isModule()},R,v)}else{if(!chunkHasJs(N,q)){return E}_e=()=>this.renderChunk({chunk:N,dependencyTemplates:ae,runtimeTemplate:ie,moduleGraph:G,chunkGraph:q,codeGenerationResults:le,strictMode:ie.isModule()},R)}E.push({render:_e,filenameTemplate:Me,pathOptions:{hash:j,runtime:N.runtime,chunk:N,contentHashType:"javascript"},info:{javascriptModule:v.runtimeTemplate.isModule()},identifier:me?`hotupdatechunk${N.id}`:`chunk${N.id}`,hash:N.contentHash.javascript});return E}));v.hooks.chunkHash.tap("JavascriptModulesPlugin",((v,E,$)=>{R.chunkHash.call(v,E,$);if(v.hasRuntime()){this.updateHashWithBootstrap(E,{hash:"0000",chunk:v,codeGenerationResults:$.codeGenerationResults,chunkGraph:$.chunkGraph,moduleGraph:$.moduleGraph,runtimeTemplate:$.runtimeTemplate},R)}}));v.hooks.contentHash.tap("JavascriptModulesPlugin",(E=>{const{chunkGraph:$,codeGenerationResults:j,moduleGraph:N,runtimeTemplate:q,outputOptions:{hashSalt:G,hashDigest:ie,hashDigestLength:ae,hashFunction:ce}}=v;const le=Ue(ce);if(G)le.update(G);if(E.hasRuntime()){this.updateHashWithBootstrap(le,{hash:"0000",chunk:E,codeGenerationResults:j,chunkGraph:v.chunkGraph,moduleGraph:v.moduleGraph,runtimeTemplate:v.runtimeTemplate},R)}else{le.update(`${E.id} `);le.update(E.ids?E.ids.join(","):"")}R.chunkHash.call(E,le,{chunkGraph:$,codeGenerationResults:j,moduleGraph:N,runtimeTemplate:q});const me=$.getChunkModulesIterableBySourceType(E,"javascript");if(me){const v=new Le;for(const R of me){v.add($.getModuleHash(R,E.runtime))}v.updateHash(le)}const _e=$.getChunkModulesIterableBySourceType(E,"runtime");if(_e){const v=new Le;for(const R of _e){v.add($.getModuleHash(R,E.runtime))}v.updateHash(le)}const Ie=le.digest(ie);E.contentHash.javascript=Ge(Ie,ae)}));v.hooks.additionalTreeRuntimeRequirements.tap("JavascriptModulesPlugin",((v,E,{chunkGraph:R})=>{if(!E.has(Oe.startupNoDefault)&&R.hasChunkEntryDependentChunks(v)){E.add(Oe.onChunksLoaded);E.add(Oe.require)}}));v.hooks.executeModule.tap("JavascriptModulesPlugin",((v,E)=>{const R=v.codeGenerationResult.sources.get("javascript");if(R===undefined)return;const{module:$,moduleObject:j}=v;const N=R.source();const G=q.runInThisContext(`(function(${$.moduleArgument}, ${$.exportsArgument}, __webpack_require__) {\n${N}\n/**/})`,{filename:$.identifier(),lineOffset:-1});try{G.call(j.exports,j,j.exports,E.__webpack_require__)}catch(E){E.stack+=printGeneratedCodeForStack(v.module,N);throw E}}));v.hooks.executeModule.tap("JavascriptModulesPlugin",((v,E)=>{const R=v.codeGenerationResult.sources.get("runtime");if(R===undefined)return;let $=R.source();if(typeof $!=="string")$=$.toString();const j=q.runInThisContext(`(function(__webpack_require__) {\n${$}\n/**/})`,{filename:v.module.identifier(),lineOffset:-1});try{j.call(null,E.__webpack_require__)}catch(E){E.stack+=printGeneratedCodeForStack(v.module,$);throw E}}))}))}static getChunkFilenameTemplate(v,E){if(v.filenameTemplate){return v.filenameTemplate}else if(v instanceof Ie){return E.hotUpdateChunkFilename}else if(v.canBeInitial()){return E.filename}else{return E.chunkFilename}}renderModule(v,E,R,$){const{chunk:j,chunkGraph:N,runtimeTemplate:q,codeGenerationResults:ie,strictMode:ae}=E;try{const ce=ie.get(v,j.runtime);const me=ce.sources.get("javascript");if(!me)return null;if(ce.data!==undefined){const v=ce.data.get("chunkInitFragments");if(v){for(const R of v)E.chunkInitFragments.push(R)}}const Ie=_e((()=>R.renderModuleContent.call(me,v,E)),"JavascriptModulesPlugin.getCompilationHooks().renderModuleContent");let Me;if($){const $=N.getModuleRuntimeRequirements(v,j.runtime);const ie=$.has(Oe.module);const ce=$.has(Oe.exports);const me=$.has(Oe.require)||$.has(Oe.requireScope);const Te=$.has(Oe.thisAsExports);const Ne=v.buildInfo.strict&&!ae;const Be=this._moduleFactoryCache.get(Ie);let Le;if(Be&&Be.needModule===ie&&Be.needExports===ce&&Be.needRequire===me&&Be.needThisAsExports===Te&&Be.needStrict===Ne){Le=Be.source}else{const E=new G;const R=[];if(ce||me||ie)R.push(ie?v.moduleArgument:"__unused_webpack_"+v.moduleArgument);if(ce||me)R.push(ce?v.exportsArgument:"__unused_webpack_"+v.exportsArgument);if(me)R.push("__webpack_require__");if(!Te&&q.supportsArrowFunction()){E.add("/***/ (("+R.join(", ")+") => {\n\n")}else{E.add("/***/ (function("+R.join(", ")+") {\n\n")}if(Ne){E.add('"use strict";\n')}E.add(Ie);E.add("\n\n/***/ })");Le=new le(E);this._moduleFactoryCache.set(Ie,{source:Le,needModule:ie,needExports:ce,needRequire:me,needThisAsExports:Te,needStrict:Ne})}Me=_e((()=>R.renderModuleContainer.call(Le,v,E)),"JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer")}else{Me=Ie}return _e((()=>R.renderModulePackage.call(Me,v,E)),"JavascriptModulesPlugin.getCompilationHooks().renderModulePackage")}catch(E){E.module=v;throw E}}renderChunk(v,E){const{chunk:R,chunkGraph:$}=v;const j=$.getOrderedChunkModulesIterableBySourceType(R,"javascript",qe);const N=j?Array.from(j):[];let q;let ie=v.strictMode;if(!ie&&N.every((v=>v.buildInfo.strict))){const R=E.strictRuntimeBailout.call(v);q=R?`// runtime can't be in strict mode because ${R}.\n`:'"use strict";\n';if(!R)ie=true}const ae={...v,chunkInitFragments:[],strictMode:ie};const le=Te.renderChunkModules(ae,N,(v=>this.renderModule(v,ae,E,true)))||new ce("{}");let me=_e((()=>E.renderChunk.call(le,ae)),"JavascriptModulesPlugin.getCompilationHooks().renderChunk");me=_e((()=>E.renderContent.call(me,ae)),"JavascriptModulesPlugin.getCompilationHooks().renderContent");if(!me){throw new Error("JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderContent plugins should return something")}me=Me.addToSource(me,ae.chunkInitFragments,ae);me=_e((()=>E.render.call(me,ae)),"JavascriptModulesPlugin.getCompilationHooks().render");if(!me){throw new Error("JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().render plugins should return something")}R.rendered=true;return q?new G(q,me,";"):v.runtimeTemplate.isModule()?me:new G(me,";")}renderMain(v,E,R){const{chunk:$,chunkGraph:j,runtimeTemplate:N}=v;const q=j.getTreeRuntimeRequirements($);const le=N.isIIFE();const me=this.renderBootstrap(v,E);const Ie=E.useSourceMap.call($,v);const Be=Array.from(j.getOrderedChunkModulesIterableBySourceType($,"javascript",qe)||[]);const Le=j.getNumberOfEntryModules($)>0;let Ue;if(me.allowInlineStartup&&Le){Ue=new Set(j.getChunkEntryModulesIterable($))}let Ge=new G;let He;if(le){if(N.supportsArrowFunction()){Ge.add("/******/ (() => { // webpackBootstrap\n")}else{Ge.add("/******/ (function() { // webpackBootstrap\n")}He="/******/ \t"}else{He="/******/ "}let We=v.strictMode;if(!We&&Be.every((v=>v.buildInfo.strict))){const R=E.strictRuntimeBailout.call(v);if(R){Ge.add(He+`// runtime can't be in strict mode because ${R}.\n`)}else{We=true;Ge.add(He+'"use strict";\n')}}const Qe={...v,chunkInitFragments:[],strictMode:We};const Je=Te.renderChunkModules(Qe,Ue?Be.filter((v=>!Ue.has(v))):Be,(v=>this.renderModule(v,Qe,E,true)),He);if(Je||q.has(Oe.moduleFactories)||q.has(Oe.moduleFactoriesAddOnly)||q.has(Oe.require)){Ge.add(He+"var __webpack_modules__ = (");Ge.add(Je||"{}");Ge.add(");\n");Ge.add("/************************************************************************/\n")}if(me.header.length>0){const v=Te.asString(me.header)+"\n";Ge.add(new ae(He,Ie?new ie(v,"webpack/bootstrap"):new ce(v)));Ge.add("/************************************************************************/\n")}const Ve=v.chunkGraph.getChunkRuntimeModulesInOrder($);if(Ve.length>0){Ge.add(new ae(He,Te.renderRuntimeModules(Ve,Qe)));Ge.add("/************************************************************************/\n");for(const v of Ve){R.codeGeneratedModules.add(v)}}if(Ue){if(me.beforeStartup.length>0){const v=Te.asString(me.beforeStartup)+"\n";Ge.add(new ae(He,Ie?new ie(v,"webpack/before-startup"):new ce(v)))}const R=Ne(Ue);const le=new G;le.add(`var __webpack_exports__ = {};\n`);for(const q of Ue){const G=this.renderModule(q,Qe,E,false);if(G){const ie=!We&&q.buildInfo.strict;const ae=j.getModuleRuntimeRequirements(q,$.runtime);const ce=ae.has(Oe.exports);const me=ce&&q.exportsArgument==="__webpack_exports__";let _e=ie?"it need to be in strict mode.":Ue.size>1?"it need to be isolated against other entry modules.":Je?"it need to be isolated against other modules in the chunk.":ce&&!me?`it uses a non-standard name for the exports (${q.exportsArgument}).`:E.embedInRuntimeBailout.call(q,v);let Ie;if(_e!==undefined){le.add(`// This entry need to be wrapped in an IIFE because ${_e}\n`);const v=N.supportsArrowFunction();if(v){le.add("(() => {\n");Ie="\n})();\n\n"}else{le.add("!function() {\n");Ie="\n}();\n"}if(ie)le.add('"use strict";\n')}else{Ie="\n"}if(ce){if(q!==R)le.add(`var ${q.exportsArgument} = {};\n`);else if(q.exportsArgument!=="__webpack_exports__")le.add(`var ${q.exportsArgument} = __webpack_exports__;\n`)}le.add(G);le.add(Ie)}}if(q.has(Oe.onChunksLoaded)){le.add(`__webpack_exports__ = ${Oe.onChunksLoaded}(__webpack_exports__);\n`)}Ge.add(E.renderStartup.call(le,R,{...v,inlined:true}));if(me.afterStartup.length>0){const v=Te.asString(me.afterStartup)+"\n";Ge.add(new ae(He,Ie?new ie(v,"webpack/after-startup"):new ce(v)))}}else{const R=Ne(j.getChunkEntryModulesIterable($));const N=Ie?(v,E)=>new ie(Te.asString(v),E):v=>new ce(Te.asString(v));Ge.add(new ae(He,new G(N(me.beforeStartup,"webpack/before-startup"),"\n",E.renderStartup.call(N(me.startup.concat(""),"webpack/startup"),R,{...v,inlined:false}),N(me.afterStartup,"webpack/after-startup"),"\n")))}if(Le&&q.has(Oe.returnExportsFromRuntime)){Ge.add(`${He}return __webpack_exports__;\n`)}if(le){Ge.add("/******/ })()\n")}let Ke=_e((()=>E.renderMain.call(Ge,v)),"JavascriptModulesPlugin.getCompilationHooks().renderMain");if(!Ke){throw new Error("JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderMain plugins should return something")}Ke=_e((()=>E.renderContent.call(Ke,v)),"JavascriptModulesPlugin.getCompilationHooks().renderContent");if(!Ke){throw new Error("JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderContent plugins should return something")}Ke=Me.addToSource(Ke,Qe.chunkInitFragments,Qe);Ke=_e((()=>E.render.call(Ke,v)),"JavascriptModulesPlugin.getCompilationHooks().render");if(!Ke){throw new Error("JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().render plugins should return something")}$.rendered=true;return le?new G(Ke,";"):Ke}updateHashWithBootstrap(v,E,R){const $=this.renderBootstrap(E,R);for(const E of Object.keys($)){v.update(E);if(Array.isArray($[E])){for(const R of $[E]){v.update(R)}}else{v.update(JSON.stringify($[E]))}}}renderBootstrap(v,E){const{chunkGraph:R,codeGenerationResults:$,moduleGraph:j,chunk:N,runtimeTemplate:q}=v;const G=R.getTreeRuntimeRequirements(N);const ie=G.has(Oe.require);const ae=G.has(Oe.moduleCache);const ce=G.has(Oe.moduleFactories);const le=G.has(Oe.module);const me=G.has(Oe.requireScope);const _e=G.has(Oe.interceptModuleExecution);const Ie=ie||_e||le;const Me={header:[],beforeStartup:[],startup:[],afterStartup:[],allowInlineStartup:true};let{header:Ne,startup:Le,beforeStartup:qe,afterStartup:Ue}=Me;if(Me.allowInlineStartup&&ce){Le.push("// module factories are used so entry inlining is disabled");Me.allowInlineStartup=false}if(Me.allowInlineStartup&&ae){Le.push("// module cache are used so entry inlining is disabled");Me.allowInlineStartup=false}if(Me.allowInlineStartup&&_e){Le.push("// module execution is intercepted so entry inlining is disabled");Me.allowInlineStartup=false}if(Ie||ae){Ne.push("// The module cache");Ne.push("var __webpack_module_cache__ = {};");Ne.push("")}if(Ie){Ne.push("// The require function");Ne.push(`function __webpack_require__(moduleId) {`);Ne.push(Te.indent(this.renderRequire(v,E)));Ne.push("}");Ne.push("")}else if(G.has(Oe.requireScope)){Ne.push("// The require scope");Ne.push("var __webpack_require__ = {};");Ne.push("")}if(ce||G.has(Oe.moduleFactoriesAddOnly)){Ne.push("// expose the modules object (__webpack_modules__)");Ne.push(`${Oe.moduleFactories} = __webpack_modules__;`);Ne.push("")}if(ae){Ne.push("// expose the module cache");Ne.push(`${Oe.moduleCache} = __webpack_module_cache__;`);Ne.push("")}if(_e){Ne.push("// expose the module execution interceptor");Ne.push(`${Oe.interceptModuleExecution} = [];`);Ne.push("")}if(!G.has(Oe.startupNoDefault)){if(R.getNumberOfEntryModules(N)>0){const G=[];const ie=R.getTreeRuntimeRequirements(N);G.push("// Load entry module and return exports");let ae=R.getNumberOfEntryModules(N);for(const[ce,le]of R.getChunkEntryModulesWithChunkGroupIterable(N)){const _e=le.chunks.filter((v=>v!==N));if(Me.allowInlineStartup&&_e.length>0){G.push("// This entry module depends on other loaded chunks and execution need to be delayed");Me.allowInlineStartup=false}if(Me.allowInlineStartup&&Be(j.getIncomingConnectionsByOriginModule(ce),(([v,E])=>v&&E.some((v=>v.isTargetActive(N.runtime)))&&Be(R.getModuleRuntimes(v),(v=>He(v,N.runtime)!==undefined))))){G.push("// This entry module is referenced by other modules so it can't be inlined");Me.allowInlineStartup=false}let Te;if($.has(ce,N.runtime)){const v=$.get(ce,N.runtime);Te=v.data}if(Me.allowInlineStartup&&(!Te||!Te.get("topLevelDeclarations"))&&(!ce.buildInfo||!ce.buildInfo.topLevelDeclarations)){G.push("// This entry module doesn't tell about it's top-level declarations so it can't be inlined");Me.allowInlineStartup=false}if(Me.allowInlineStartup){const R=E.inlineInRuntimeBailout.call(ce,v);if(R!==undefined){G.push(`// This entry module can't be inlined because ${R}`);Me.allowInlineStartup=false}}ae--;const Ne=R.getModuleId(ce);const Le=R.getModuleRuntimeRequirements(ce,N.runtime);let qe=JSON.stringify(Ne);if(ie.has(Oe.entryModuleId)){qe=`${Oe.entryModuleId} = ${qe}`}if(Me.allowInlineStartup&&Le.has(Oe.module)){Me.allowInlineStartup=false;G.push("// This entry module used 'module' so it can't be inlined")}if(_e.length>0){G.push(`${ae===0?"var __webpack_exports__ = ":""}${Oe.onChunksLoaded}(undefined, ${JSON.stringify(_e.map((v=>v.id)))}, ${q.returningFunction(`__webpack_require__(${qe})`)})`)}else if(Ie){G.push(`${ae===0?"var __webpack_exports__ = ":""}__webpack_require__(${qe});`)}else{if(ae===0)G.push("var __webpack_exports__ = {};");if(me){G.push(`__webpack_modules__[${qe}](0, ${ae===0?"__webpack_exports__":"{}"}, __webpack_require__);`)}else if(Le.has(Oe.exports)){G.push(`__webpack_modules__[${qe}](0, ${ae===0?"__webpack_exports__":"{}"});`)}else{G.push(`__webpack_modules__[${qe}]();`)}}}if(ie.has(Oe.onChunksLoaded)){G.push(`__webpack_exports__ = ${Oe.onChunksLoaded}(__webpack_exports__);`)}if(ie.has(Oe.startup)||ie.has(Oe.startupOnlyBefore)&&ie.has(Oe.startupOnlyAfter)){Me.allowInlineStartup=false;Ne.push("// the startup function");Ne.push(`${Oe.startup} = ${q.basicFunction("",[...G,"return __webpack_exports__;"])};`);Ne.push("");Le.push("// run startup");Le.push(`var __webpack_exports__ = ${Oe.startup}();`)}else if(ie.has(Oe.startupOnlyBefore)){Ne.push("// the startup function");Ne.push(`${Oe.startup} = ${q.emptyFunction()};`);qe.push("// run runtime startup");qe.push(`${Oe.startup}();`);Le.push("// startup");Le.push(Te.asString(G))}else if(ie.has(Oe.startupOnlyAfter)){Ne.push("// the startup function");Ne.push(`${Oe.startup} = ${q.emptyFunction()};`);Le.push("// startup");Le.push(Te.asString(G));Ue.push("// run runtime startup");Ue.push(`${Oe.startup}();`)}else{Le.push("// startup");Le.push(Te.asString(G))}}else if(G.has(Oe.startup)||G.has(Oe.startupOnlyBefore)||G.has(Oe.startupOnlyAfter)){Ne.push("// the startup function","// It's empty as no entry modules are in this chunk",`${Oe.startup} = ${q.emptyFunction()};`,"")}}else if(G.has(Oe.startup)||G.has(Oe.startupOnlyBefore)||G.has(Oe.startupOnlyAfter)){Me.allowInlineStartup=false;Ne.push("// the startup function","// It's empty as some runtime module handles the default behavior",`${Oe.startup} = ${q.emptyFunction()};`);Le.push("// run startup");Le.push(`var __webpack_exports__ = ${Oe.startup}();`)}return Me}renderRequire(v,E){const{chunk:R,chunkGraph:$,runtimeTemplate:{outputOptions:j}}=v;const N=$.getTreeRuntimeRequirements(R);const q=N.has(Oe.interceptModuleExecution)?Te.asString(["var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };",`${Oe.interceptModuleExecution}.forEach(function(handler) { handler(execOptions); });`,"module = execOptions.module;","execOptions.factory.call(module.exports, module, module.exports, execOptions.require);"]):N.has(Oe.thisAsExports)?Te.asString(["__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);"]):Te.asString(["__webpack_modules__[moduleId](module, module.exports, __webpack_require__);"]);const G=N.has(Oe.moduleId);const ie=N.has(Oe.moduleLoaded);const ae=Te.asString(["// Check if module is in cache","var cachedModule = __webpack_module_cache__[moduleId];","if (cachedModule !== undefined) {",j.strictModuleErrorHandling?Te.indent(["if (cachedModule.error !== undefined) throw cachedModule.error;","return cachedModule.exports;"]):Te.indent("return cachedModule.exports;"),"}","// Create a new module (and put it into the cache)","var module = __webpack_module_cache__[moduleId] = {",Te.indent([G?"id: moduleId,":"// no module.id needed",ie?"loaded: false,":"// no module.loaded needed","exports: {}"]),"};","",j.strictModuleExceptionHandling?Te.asString(["// Execute the module function","var threw = true;","try {",Te.indent([q,"threw = false;"]),"} finally {",Te.indent(["if(threw) delete __webpack_module_cache__[moduleId];"]),"}"]):j.strictModuleErrorHandling?Te.asString(["// Execute the module function","try {",Te.indent(q),"} catch(e) {",Te.indent(["module.error = e;","throw e;"]),"}"]):Te.asString(["// Execute the module function",q]),ie?Te.asString(["","// Flag the module as loaded","module.loaded = true;",""]):"","// Return the exports of the module","return module.exports;"]);return _e((()=>E.renderRequire.call(ae,v)),"JavascriptModulesPlugin.getCompilationHooks().renderRequire")}}v.exports=JavascriptModulesPlugin;v.exports.chunkHasJs=chunkHasJs},33177:function(v,E,R){"use strict";const{Parser:$}=R(31988);const{importAssertions:j}=R(81579);const{SyncBailHook:N,HookMap:q}=R(44217);const G=R(26144);const ie=R(68646);const ae=R(53214);const ce=R(12076);const le=R(61374);const me=R(94844);const _e=[];const Ie=1;const Me=2;const Oe=3;const Te=$.extend(j);class VariableInfo{constructor(v,E,R){this.declaredScope=v;this.freeName=E;this.tagInfo=R}}const joinRanges=(v,E)=>{if(!E)return v;if(!v)return E;return[v[0],E[1]]};const objectAndMembersToName=(v,E)=>{let R=v;for(let v=E.length-1;v>=0;v--){R=R+"."+E[v]}return R};const getRootName=v=>{switch(v.type){case"Identifier":return v.name;case"ThisExpression":return"this";case"MetaProperty":return`${v.meta.name}.${v.property.name}`;default:return undefined}};const Ne={ranges:true,locations:true,ecmaVersion:"latest",sourceType:"module",allowHashBang:true,onComment:null};const Be=new RegExp(/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/);const Le={options:null,errors:null};class JavascriptParser extends ie{constructor(v="auto"){super();this.hooks=Object.freeze({evaluateTypeof:new q((()=>new N(["expression"]))),evaluate:new q((()=>new N(["expression"]))),evaluateIdentifier:new q((()=>new N(["expression"]))),evaluateDefinedIdentifier:new q((()=>new N(["expression"]))),evaluateNewExpression:new q((()=>new N(["expression"]))),evaluateCallExpression:new q((()=>new N(["expression"]))),evaluateCallExpressionMember:new q((()=>new N(["expression","param"]))),isPure:new q((()=>new N(["expression","commentsStartPosition"]))),preStatement:new N(["statement"]),blockPreStatement:new N(["declaration"]),statement:new N(["statement"]),statementIf:new N(["statement"]),classExtendsExpression:new N(["expression","classDefinition"]),classBodyElement:new N(["element","classDefinition"]),classBodyValue:new N(["expression","element","classDefinition"]),label:new q((()=>new N(["statement"]))),import:new N(["statement","source"]),importSpecifier:new N(["statement","source","exportName","identifierName"]),export:new N(["statement"]),exportImport:new N(["statement","source"]),exportDeclaration:new N(["statement","declaration"]),exportExpression:new N(["statement","declaration"]),exportSpecifier:new N(["statement","identifierName","exportName","index"]),exportImportSpecifier:new N(["statement","source","identifierName","exportName","index"]),preDeclarator:new N(["declarator","statement"]),declarator:new N(["declarator","statement"]),varDeclaration:new q((()=>new N(["declaration"]))),varDeclarationLet:new q((()=>new N(["declaration"]))),varDeclarationConst:new q((()=>new N(["declaration"]))),varDeclarationVar:new q((()=>new N(["declaration"]))),pattern:new q((()=>new N(["pattern"]))),canRename:new q((()=>new N(["initExpression"]))),rename:new q((()=>new N(["initExpression"]))),assign:new q((()=>new N(["expression"]))),assignMemberChain:new q((()=>new N(["expression","members"]))),typeof:new q((()=>new N(["expression"]))),importCall:new N(["expression"]),topLevelAwait:new N(["expression"]),call:new q((()=>new N(["expression"]))),callMemberChain:new q((()=>new N(["expression","members","membersOptionals"]))),memberChainOfCallMemberChain:new q((()=>new N(["expression","calleeMembers","callExpression","members"]))),callMemberChainOfCallMemberChain:new q((()=>new N(["expression","calleeMembers","innerCallExpression","members"]))),optionalChaining:new N(["optionalChaining"]),new:new q((()=>new N(["expression"]))),binaryExpression:new N(["binaryExpression"]),expression:new q((()=>new N(["expression"]))),expressionMemberChain:new q((()=>new N(["expression","members","membersOptionals"]))),unhandledExpressionMemberChain:new q((()=>new N(["expression","members"]))),expressionConditionalOperator:new N(["expression"]),expressionLogicalOperator:new N(["expression"]),program:new N(["ast","comments"]),finish:new N(["ast","comments"])});this.sourceType=v;this.scope=undefined;this.state=undefined;this.comments=undefined;this.semicolons=undefined;this.statementPath=undefined;this.prevStatement=undefined;this.currentTagData=undefined;this._initializeEvaluating()}_initializeEvaluating(){this.hooks.evaluate.for("Literal").tap("JavascriptParser",(v=>{const E=v;switch(typeof E.value){case"number":return(new me).setNumber(E.value).setRange(E.range);case"bigint":return(new me).setBigInt(E.value).setRange(E.range);case"string":return(new me).setString(E.value).setRange(E.range);case"boolean":return(new me).setBoolean(E.value).setRange(E.range)}if(E.value===null){return(new me).setNull().setRange(E.range)}if(E.value instanceof RegExp){return(new me).setRegExp(E.value).setRange(E.range)}}));this.hooks.evaluate.for("NewExpression").tap("JavascriptParser",(v=>{const E=v;const R=E.callee;if(R.type!=="Identifier")return;if(R.name!=="RegExp"){return this.callHooksForName(this.hooks.evaluateNewExpression,R.name,E)}else if(E.arguments.length>2||this.getVariableInfo("RegExp")!=="RegExp")return;let $,j;const N=E.arguments[0];if(N){if(N.type==="SpreadElement")return;const v=this.evaluateExpression(N);if(!v)return;$=v.asString();if(!$)return}else{return(new me).setRegExp(new RegExp("")).setRange(E.range)}const q=E.arguments[1];if(q){if(q.type==="SpreadElement")return;const v=this.evaluateExpression(q);if(!v)return;if(!v.isUndefined()){j=v.asString();if(j===undefined||!me.isValidRegExpFlags(j))return}}return(new me).setRegExp(j?new RegExp($,j):new RegExp($)).setRange(E.range)}));this.hooks.evaluate.for("LogicalExpression").tap("JavascriptParser",(v=>{const E=v;const R=this.evaluateExpression(E.left);let $=false;let j;if(E.operator==="&&"){const v=R.asBool();if(v===false)return R.setRange(E.range);$=v===true;j=false}else if(E.operator==="||"){const v=R.asBool();if(v===true)return R.setRange(E.range);$=v===false;j=true}else if(E.operator==="??"){const v=R.asNullish();if(v===false)return R.setRange(E.range);if(v!==true)return;$=true}else return;const N=this.evaluateExpression(E.right);if($){if(R.couldHaveSideEffects())N.setSideEffects();return N.setRange(E.range)}const q=N.asBool();if(j===true&&q===true){return(new me).setRange(E.range).setTruthy()}else if(j===false&&q===false){return(new me).setRange(E.range).setFalsy()}}));const valueAsExpression=(v,E,R)=>{switch(typeof v){case"boolean":return(new me).setBoolean(v).setSideEffects(R).setRange(E.range);case"number":return(new me).setNumber(v).setSideEffects(R).setRange(E.range);case"bigint":return(new me).setBigInt(v).setSideEffects(R).setRange(E.range);case"string":return(new me).setString(v).setSideEffects(R).setRange(E.range)}};this.hooks.evaluate.for("BinaryExpression").tap("JavascriptParser",(v=>{const E=v;const handleConstOperation=v=>{const R=this.evaluateExpression(E.left);if(!R.isCompileTimeValue())return;const $=this.evaluateExpression(E.right);if(!$.isCompileTimeValue())return;const j=v(R.asCompileTimeValue(),$.asCompileTimeValue());return valueAsExpression(j,E,R.couldHaveSideEffects()||$.couldHaveSideEffects())};const isAlwaysDifferent=(v,E)=>v===true&&E===false||v===false&&E===true;const handleTemplateStringCompare=(v,E,R,$)=>{const getPrefix=v=>{let E="";for(const R of v){const v=R.asString();if(v!==undefined)E+=v;else break}return E};const getSuffix=v=>{let E="";for(let R=v.length-1;R>=0;R--){const $=v[R].asString();if($!==undefined)E=$+E;else break}return E};const j=getPrefix(v.parts);const N=getPrefix(E.parts);const q=getSuffix(v.parts);const G=getSuffix(E.parts);const ie=Math.min(j.length,N.length);const ae=Math.min(q.length,G.length);if(j.slice(0,ie)!==N.slice(0,ie)||q.slice(-ae)!==G.slice(-ae)){return R.setBoolean(!$).setSideEffects(v.couldHaveSideEffects()||E.couldHaveSideEffects())}};const handleStrictEqualityComparison=v=>{const R=this.evaluateExpression(E.left);const $=this.evaluateExpression(E.right);const j=new me;j.setRange(E.range);const N=R.isCompileTimeValue();const q=$.isCompileTimeValue();if(N&&q){return j.setBoolean(v===(R.asCompileTimeValue()===$.asCompileTimeValue())).setSideEffects(R.couldHaveSideEffects()||$.couldHaveSideEffects())}if(R.isArray()&&$.isArray()){return j.setBoolean(!v).setSideEffects(R.couldHaveSideEffects()||$.couldHaveSideEffects())}if(R.isTemplateString()&&$.isTemplateString()){return handleTemplateStringCompare(R,$,j,v)}const G=R.isPrimitiveType();const ie=$.isPrimitiveType();if(G===false&&(N||ie===true)||ie===false&&(q||G===true)||isAlwaysDifferent(R.asBool(),$.asBool())||isAlwaysDifferent(R.asNullish(),$.asNullish())){return j.setBoolean(!v).setSideEffects(R.couldHaveSideEffects()||$.couldHaveSideEffects())}};const handleAbstractEqualityComparison=v=>{const R=this.evaluateExpression(E.left);const $=this.evaluateExpression(E.right);const j=new me;j.setRange(E.range);const N=R.isCompileTimeValue();const q=$.isCompileTimeValue();if(N&&q){return j.setBoolean(v===(R.asCompileTimeValue()==$.asCompileTimeValue())).setSideEffects(R.couldHaveSideEffects()||$.couldHaveSideEffects())}if(R.isArray()&&$.isArray()){return j.setBoolean(!v).setSideEffects(R.couldHaveSideEffects()||$.couldHaveSideEffects())}if(R.isTemplateString()&&$.isTemplateString()){return handleTemplateStringCompare(R,$,j,v)}};if(E.operator==="+"){const v=this.evaluateExpression(E.left);const R=this.evaluateExpression(E.right);const $=new me;if(v.isString()){if(R.isString()){$.setString(v.string+R.string)}else if(R.isNumber()){$.setString(v.string+R.number)}else if(R.isWrapped()&&R.prefix&&R.prefix.isString()){$.setWrapped((new me).setString(v.string+R.prefix.string).setRange(joinRanges(v.range,R.prefix.range)),R.postfix,R.wrappedInnerExpressions)}else if(R.isWrapped()){$.setWrapped(v,R.postfix,R.wrappedInnerExpressions)}else{$.setWrapped(v,null,[R])}}else if(v.isNumber()){if(R.isString()){$.setString(v.number+R.string)}else if(R.isNumber()){$.setNumber(v.number+R.number)}else{return}}else if(v.isBigInt()){if(R.isBigInt()){$.setBigInt(v.bigint+R.bigint)}}else if(v.isWrapped()){if(v.postfix&&v.postfix.isString()&&R.isString()){$.setWrapped(v.prefix,(new me).setString(v.postfix.string+R.string).setRange(joinRanges(v.postfix.range,R.range)),v.wrappedInnerExpressions)}else if(v.postfix&&v.postfix.isString()&&R.isNumber()){$.setWrapped(v.prefix,(new me).setString(v.postfix.string+R.number).setRange(joinRanges(v.postfix.range,R.range)),v.wrappedInnerExpressions)}else if(R.isString()){$.setWrapped(v.prefix,R,v.wrappedInnerExpressions)}else if(R.isNumber()){$.setWrapped(v.prefix,(new me).setString(R.number+"").setRange(R.range),v.wrappedInnerExpressions)}else if(R.isWrapped()){$.setWrapped(v.prefix,R.postfix,v.wrappedInnerExpressions&&R.wrappedInnerExpressions&&v.wrappedInnerExpressions.concat(v.postfix?[v.postfix]:[]).concat(R.prefix?[R.prefix]:[]).concat(R.wrappedInnerExpressions))}else{$.setWrapped(v.prefix,null,v.wrappedInnerExpressions&&v.wrappedInnerExpressions.concat(v.postfix?[v.postfix,R]:[R]))}}else{if(R.isString()){$.setWrapped(null,R,[v])}else if(R.isWrapped()){$.setWrapped(null,R.postfix,R.wrappedInnerExpressions&&(R.prefix?[v,R.prefix]:[v]).concat(R.wrappedInnerExpressions))}else{return}}if(v.couldHaveSideEffects()||R.couldHaveSideEffects())$.setSideEffects();$.setRange(E.range);return $}else if(E.operator==="-"){return handleConstOperation(((v,E)=>v-E))}else if(E.operator==="*"){return handleConstOperation(((v,E)=>v*E))}else if(E.operator==="/"){return handleConstOperation(((v,E)=>v/E))}else if(E.operator==="**"){return handleConstOperation(((v,E)=>v**E))}else if(E.operator==="==="){return handleStrictEqualityComparison(true)}else if(E.operator==="=="){return handleAbstractEqualityComparison(true)}else if(E.operator==="!=="){return handleStrictEqualityComparison(false)}else if(E.operator==="!="){return handleAbstractEqualityComparison(false)}else if(E.operator==="&"){return handleConstOperation(((v,E)=>v&E))}else if(E.operator==="|"){return handleConstOperation(((v,E)=>v|E))}else if(E.operator==="^"){return handleConstOperation(((v,E)=>v^E))}else if(E.operator===">>>"){return handleConstOperation(((v,E)=>v>>>E))}else if(E.operator===">>"){return handleConstOperation(((v,E)=>v>>E))}else if(E.operator==="<<"){return handleConstOperation(((v,E)=>v<v"){return handleConstOperation(((v,E)=>v>E))}else if(E.operator==="<="){return handleConstOperation(((v,E)=>v<=E))}else if(E.operator===">="){return handleConstOperation(((v,E)=>v>=E))}}));this.hooks.evaluate.for("UnaryExpression").tap("JavascriptParser",(v=>{const E=v;const handleConstOperation=v=>{const R=this.evaluateExpression(E.argument);if(!R.isCompileTimeValue())return;const $=v(R.asCompileTimeValue());return valueAsExpression($,E,R.couldHaveSideEffects())};if(E.operator==="typeof"){switch(E.argument.type){case"Identifier":{const v=this.callHooksForName(this.hooks.evaluateTypeof,E.argument.name,E);if(v!==undefined)return v;break}case"MetaProperty":{const v=this.callHooksForName(this.hooks.evaluateTypeof,getRootName(E.argument),E);if(v!==undefined)return v;break}case"MemberExpression":{const v=this.callHooksForExpression(this.hooks.evaluateTypeof,E.argument,E);if(v!==undefined)return v;break}case"ChainExpression":{const v=this.callHooksForExpression(this.hooks.evaluateTypeof,E.argument.expression,E);if(v!==undefined)return v;break}case"FunctionExpression":{return(new me).setString("function").setRange(E.range)}}const v=this.evaluateExpression(E.argument);if(v.isUnknown())return;if(v.isString()){return(new me).setString("string").setRange(E.range)}if(v.isWrapped()){return(new me).setString("string").setSideEffects().setRange(E.range)}if(v.isUndefined()){return(new me).setString("undefined").setRange(E.range)}if(v.isNumber()){return(new me).setString("number").setRange(E.range)}if(v.isBigInt()){return(new me).setString("bigint").setRange(E.range)}if(v.isBoolean()){return(new me).setString("boolean").setRange(E.range)}if(v.isConstArray()||v.isRegExp()||v.isNull()){return(new me).setString("object").setRange(E.range)}if(v.isArray()){return(new me).setString("object").setSideEffects(v.couldHaveSideEffects()).setRange(E.range)}}else if(E.operator==="!"){const v=this.evaluateExpression(E.argument);const R=v.asBool();if(typeof R!=="boolean")return;return(new me).setBoolean(!R).setSideEffects(v.couldHaveSideEffects()).setRange(E.range)}else if(E.operator==="~"){return handleConstOperation((v=>~v))}else if(E.operator==="+"){return handleConstOperation((v=>+v))}else if(E.operator==="-"){return handleConstOperation((v=>-v))}}));this.hooks.evaluateTypeof.for("undefined").tap("JavascriptParser",(v=>(new me).setString("undefined").setRange(v.range)));this.hooks.evaluate.for("Identifier").tap("JavascriptParser",(v=>{if(v.name==="undefined"){return(new me).setUndefined().setRange(v.range)}}));const tapEvaluateWithVariableInfo=(v,E)=>{let R=undefined;let $=undefined;this.hooks.evaluate.for(v).tap("JavascriptParser",(v=>{const j=v;const N=E(v);if(N!==undefined){return this.callHooksForInfoWithFallback(this.hooks.evaluateIdentifier,N.name,(v=>{R=j;$=N}),(v=>{const E=this.hooks.evaluateDefinedIdentifier.get(v);if(E!==undefined){return E.call(j)}}),j)}}));this.hooks.evaluate.for(v).tap({name:"JavascriptParser",stage:100},(v=>{const j=R===v?$:E(v);if(j!==undefined){return(new me).setIdentifier(j.name,j.rootInfo,j.getMembers,j.getMembersOptionals).setRange(v.range)}}));this.hooks.finish.tap("JavascriptParser",(()=>{R=$=undefined}))};tapEvaluateWithVariableInfo("Identifier",(v=>{const E=this.getVariableInfo(v.name);if(typeof E==="string"||E instanceof VariableInfo&&typeof E.freeName==="string"){return{name:E,rootInfo:E,getMembers:()=>[],getMembersOptionals:()=>[]}}}));tapEvaluateWithVariableInfo("ThisExpression",(v=>{const E=this.getVariableInfo("this");if(typeof E==="string"||E instanceof VariableInfo&&typeof E.freeName==="string"){return{name:E,rootInfo:E,getMembers:()=>[],getMembersOptionals:()=>[]}}}));this.hooks.evaluate.for("MetaProperty").tap("JavascriptParser",(v=>{const E=v;return this.callHooksForName(this.hooks.evaluateIdentifier,getRootName(v),E)}));tapEvaluateWithVariableInfo("MemberExpression",(v=>this.getMemberExpressionInfo(v,Me)));this.hooks.evaluate.for("CallExpression").tap("JavascriptParser",(v=>{const E=v;if(E.callee.type==="MemberExpression"&&E.callee.property.type===(E.callee.computed?"Literal":"Identifier")){const v=this.evaluateExpression(E.callee.object);const R=E.callee.property.type==="Literal"?`${E.callee.property.value}`:E.callee.property.name;const $=this.hooks.evaluateCallExpressionMember.get(R);if($!==undefined){return $.call(E,v)}}else if(E.callee.type==="Identifier"){return this.callHooksForName(this.hooks.evaluateCallExpression,E.callee.name,E)}}));this.hooks.evaluateCallExpressionMember.for("indexOf").tap("JavascriptParser",((v,E)=>{if(!E.isString())return;if(v.arguments.length===0)return;const[R,$]=v.arguments;if(R.type==="SpreadElement")return;const j=this.evaluateExpression(R);if(!j.isString())return;const N=j.string;let q;if($){if($.type==="SpreadElement")return;const v=this.evaluateExpression($);if(!v.isNumber())return;q=E.string.indexOf(N,v.number)}else{q=E.string.indexOf(N)}return(new me).setNumber(q).setSideEffects(E.couldHaveSideEffects()).setRange(v.range)}));this.hooks.evaluateCallExpressionMember.for("replace").tap("JavascriptParser",((v,E)=>{if(!E.isString())return;if(v.arguments.length!==2)return;if(v.arguments[0].type==="SpreadElement")return;if(v.arguments[1].type==="SpreadElement")return;let R=this.evaluateExpression(v.arguments[0]);let $=this.evaluateExpression(v.arguments[1]);if(!R.isString()&&!R.isRegExp())return;const j=R.regExp||R.string;if(!$.isString())return;const N=$.string;return(new me).setString(E.string.replace(j,N)).setSideEffects(E.couldHaveSideEffects()).setRange(v.range)}));["substr","substring","slice"].forEach((v=>{this.hooks.evaluateCallExpressionMember.for(v).tap("JavascriptParser",((E,R)=>{if(!R.isString())return;let $;let j,N=R.string;switch(E.arguments.length){case 1:if(E.arguments[0].type==="SpreadElement")return;$=this.evaluateExpression(E.arguments[0]);if(!$.isNumber())return;j=N[v]($.number);break;case 2:{if(E.arguments[0].type==="SpreadElement")return;if(E.arguments[1].type==="SpreadElement")return;$=this.evaluateExpression(E.arguments[0]);const R=this.evaluateExpression(E.arguments[1]);if(!$.isNumber())return;if(!R.isNumber())return;j=N[v]($.number,R.number);break}default:return}return(new me).setString(j).setSideEffects(R.couldHaveSideEffects()).setRange(E.range)}))}));const getSimplifiedTemplateResult=(v,E)=>{const R=[];const $=[];for(let j=0;j0){const v=$[$.length-1];const R=this.evaluateExpression(E.expressions[j-1]);const G=R.asString();if(typeof G==="string"&&!R.couldHaveSideEffects()){v.setString(v.string+G+q);v.setRange([v.range[0],N.range[1]]);v.setExpression(undefined);continue}$.push(R)}const G=(new me).setString(q).setRange(N.range).setExpression(N);R.push(G);$.push(G)}return{quasis:R,parts:$}};this.hooks.evaluate.for("TemplateLiteral").tap("JavascriptParser",(v=>{const E=v;const{quasis:R,parts:$}=getSimplifiedTemplateResult("cooked",E);if($.length===1){return $[0].setRange(E.range)}return(new me).setTemplateString(R,$,"cooked").setRange(E.range)}));this.hooks.evaluate.for("TaggedTemplateExpression").tap("JavascriptParser",(v=>{const E=v;const R=this.evaluateExpression(E.tag);if(R.isIdentifier()&&R.identifier==="String.raw"){const{quasis:v,parts:R}=getSimplifiedTemplateResult("raw",E.quasi);return(new me).setTemplateString(v,R,"raw").setRange(E.range)}}));this.hooks.evaluateCallExpressionMember.for("concat").tap("JavascriptParser",((v,E)=>{if(!E.isString()&&!E.isWrapped())return;let R=null;let $=false;const j=[];for(let E=v.arguments.length-1;E>=0;E--){const N=v.arguments[E];if(N.type==="SpreadElement")return;const q=this.evaluateExpression(N);if($||!q.isString()&&!q.isNumber()){$=true;j.push(q);continue}const G=q.isString()?q.string:""+q.number;const ie=G+(R?R.string:"");const ae=[q.range[0],(R||q).range[1]];R=(new me).setString(ie).setSideEffects(R&&R.couldHaveSideEffects()||q.couldHaveSideEffects()).setRange(ae)}if($){const $=E.isString()?E:E.prefix;const N=E.isWrapped()&&E.wrappedInnerExpressions?E.wrappedInnerExpressions.concat(j.reverse()):j.reverse();return(new me).setWrapped($,R,N).setRange(v.range)}else if(E.isWrapped()){const $=R||E.postfix;const N=E.wrappedInnerExpressions?E.wrappedInnerExpressions.concat(j.reverse()):j.reverse();return(new me).setWrapped(E.prefix,$,N).setRange(v.range)}else{const $=E.string+(R?R.string:"");return(new me).setString($).setSideEffects(R&&R.couldHaveSideEffects()||E.couldHaveSideEffects()).setRange(v.range)}}));this.hooks.evaluateCallExpressionMember.for("split").tap("JavascriptParser",((v,E)=>{if(!E.isString())return;if(v.arguments.length!==1)return;if(v.arguments[0].type==="SpreadElement")return;let R;const $=this.evaluateExpression(v.arguments[0]);if($.isString()){R=E.string.split($.string)}else if($.isRegExp()){R=E.string.split($.regExp)}else{return}return(new me).setArray(R).setSideEffects(E.couldHaveSideEffects()).setRange(v.range)}));this.hooks.evaluate.for("ConditionalExpression").tap("JavascriptParser",(v=>{const E=v;const R=this.evaluateExpression(E.test);const $=R.asBool();let j;if($===undefined){const v=this.evaluateExpression(E.consequent);const R=this.evaluateExpression(E.alternate);j=new me;if(v.isConditional()){j.setOptions(v.options)}else{j.setOptions([v])}if(R.isConditional()){j.addOptions(R.options)}else{j.addOptions([R])}}else{j=this.evaluateExpression($?E.consequent:E.alternate);if(R.couldHaveSideEffects())j.setSideEffects()}j.setRange(E.range);return j}));this.hooks.evaluate.for("ArrayExpression").tap("JavascriptParser",(v=>{const E=v;const R=E.elements.map((v=>v!==null&&v.type!=="SpreadElement"&&this.evaluateExpression(v)));if(!R.every(Boolean))return;return(new me).setItems(R).setRange(E.range)}));this.hooks.evaluate.for("ChainExpression").tap("JavascriptParser",(v=>{const E=v;const R=[];let $=E.expression;while($.type==="MemberExpression"||$.type==="CallExpression"){if($.type==="MemberExpression"){if($.optional){R.push($.object)}$=$.object}else{if($.optional){R.push($.callee)}$=$.callee}}while(R.length>0){const E=R.pop();const $=this.evaluateExpression(E);if($.asNullish()){return $.setRange(v.range)}}return this.evaluateExpression(E.expression)}))}getRenameIdentifier(v){const E=this.evaluateExpression(v);if(E.isIdentifier()){return E.identifier}}walkClass(v){if(v.superClass){if(!this.hooks.classExtendsExpression.call(v.superClass,v)){this.walkExpression(v.superClass)}}if(v.body&&v.body.type==="ClassBody"){for(const E of v.body.body){if(!this.hooks.classBodyElement.call(E,v)){if(E.computed&&E.key){this.walkExpression(E.key)}if(E.value){if(!this.hooks.classBodyValue.call(E.value,E,v)){const v=this.scope.topLevelScope;this.scope.topLevelScope=false;this.walkExpression(E.value);this.scope.topLevelScope=v}}else if(E.type==="StaticBlock"){const v=this.scope.topLevelScope;this.scope.topLevelScope=false;this.walkBlockStatement(E);this.scope.topLevelScope=v}}}}}preWalkStatements(v){for(let E=0,R=v.length;E{const E=v.body;const R=this.prevStatement;this.blockPreWalkStatements(E);this.prevStatement=R;this.walkStatements(E)}))}walkExpressionStatement(v){this.walkExpression(v.expression)}preWalkIfStatement(v){this.preWalkStatement(v.consequent);if(v.alternate){this.preWalkStatement(v.alternate)}}walkIfStatement(v){const E=this.hooks.statementIf.call(v);if(E===undefined){this.walkExpression(v.test);this.walkNestedStatement(v.consequent);if(v.alternate){this.walkNestedStatement(v.alternate)}}else{if(E){this.walkNestedStatement(v.consequent)}else if(v.alternate){this.walkNestedStatement(v.alternate)}}}preWalkLabeledStatement(v){this.preWalkStatement(v.body)}walkLabeledStatement(v){const E=this.hooks.label.get(v.label.name);if(E!==undefined){const R=E.call(v);if(R===true)return}this.walkNestedStatement(v.body)}preWalkWithStatement(v){this.preWalkStatement(v.body)}walkWithStatement(v){this.walkExpression(v.object);this.walkNestedStatement(v.body)}preWalkSwitchStatement(v){this.preWalkSwitchCases(v.cases)}walkSwitchStatement(v){this.walkExpression(v.discriminant);this.walkSwitchCases(v.cases)}walkTerminatingStatement(v){if(v.argument)this.walkExpression(v.argument)}walkReturnStatement(v){this.walkTerminatingStatement(v)}walkThrowStatement(v){this.walkTerminatingStatement(v)}preWalkTryStatement(v){this.preWalkStatement(v.block);if(v.handler)this.preWalkCatchClause(v.handler);if(v.finializer)this.preWalkStatement(v.finializer)}walkTryStatement(v){if(this.scope.inTry){this.walkStatement(v.block)}else{this.scope.inTry=true;this.walkStatement(v.block);this.scope.inTry=false}if(v.handler)this.walkCatchClause(v.handler);if(v.finalizer)this.walkStatement(v.finalizer)}preWalkWhileStatement(v){this.preWalkStatement(v.body)}walkWhileStatement(v){this.walkExpression(v.test);this.walkNestedStatement(v.body)}preWalkDoWhileStatement(v){this.preWalkStatement(v.body)}walkDoWhileStatement(v){this.walkNestedStatement(v.body);this.walkExpression(v.test)}preWalkForStatement(v){if(v.init){if(v.init.type==="VariableDeclaration"){this.preWalkStatement(v.init)}}this.preWalkStatement(v.body)}walkForStatement(v){this.inBlockScope((()=>{if(v.init){if(v.init.type==="VariableDeclaration"){this.blockPreWalkVariableDeclaration(v.init);this.prevStatement=undefined;this.walkStatement(v.init)}else{this.walkExpression(v.init)}}if(v.test){this.walkExpression(v.test)}if(v.update){this.walkExpression(v.update)}const E=v.body;if(E.type==="BlockStatement"){const v=this.prevStatement;this.blockPreWalkStatements(E.body);this.prevStatement=v;this.walkStatements(E.body)}else{this.walkNestedStatement(E)}}))}preWalkForInStatement(v){if(v.left.type==="VariableDeclaration"){this.preWalkVariableDeclaration(v.left)}this.preWalkStatement(v.body)}walkForInStatement(v){this.inBlockScope((()=>{if(v.left.type==="VariableDeclaration"){this.blockPreWalkVariableDeclaration(v.left);this.walkVariableDeclaration(v.left)}else{this.walkPattern(v.left)}this.walkExpression(v.right);const E=v.body;if(E.type==="BlockStatement"){const v=this.prevStatement;this.blockPreWalkStatements(E.body);this.prevStatement=v;this.walkStatements(E.body)}else{this.walkNestedStatement(E)}}))}preWalkForOfStatement(v){if(v.await&&this.scope.topLevelScope===true){this.hooks.topLevelAwait.call(v)}if(v.left.type==="VariableDeclaration"){this.preWalkVariableDeclaration(v.left)}this.preWalkStatement(v.body)}walkForOfStatement(v){this.inBlockScope((()=>{if(v.left.type==="VariableDeclaration"){this.blockPreWalkVariableDeclaration(v.left);this.walkVariableDeclaration(v.left)}else{this.walkPattern(v.left)}this.walkExpression(v.right);const E=v.body;if(E.type==="BlockStatement"){const v=this.prevStatement;this.blockPreWalkStatements(E.body);this.prevStatement=v;this.walkStatements(E.body)}else{this.walkNestedStatement(E)}}))}preWalkFunctionDeclaration(v){if(v.id){this.defineVariable(v.id.name)}}walkFunctionDeclaration(v){const E=this.scope.topLevelScope;this.scope.topLevelScope=false;this.inFunctionScope(true,v.params,(()=>{for(const E of v.params){this.walkPattern(E)}if(v.body.type==="BlockStatement"){this.detectMode(v.body.body);const E=this.prevStatement;this.preWalkStatement(v.body);this.prevStatement=E;this.walkStatement(v.body)}else{this.walkExpression(v.body)}}));this.scope.topLevelScope=E}blockPreWalkImportDeclaration(v){const E=v.source.value;this.hooks.import.call(v,E);for(const R of v.specifiers){const $=R.local.name;switch(R.type){case"ImportDefaultSpecifier":if(!this.hooks.importSpecifier.call(v,E,"default",$)){this.defineVariable($)}break;case"ImportSpecifier":if(!this.hooks.importSpecifier.call(v,E,R.imported.name||R.imported.value,$)){this.defineVariable($)}break;case"ImportNamespaceSpecifier":if(!this.hooks.importSpecifier.call(v,E,null,$)){this.defineVariable($)}break;default:this.defineVariable($)}}}enterDeclaration(v,E){switch(v.type){case"VariableDeclaration":for(const R of v.declarations){switch(R.type){case"VariableDeclarator":{this.enterPattern(R.id,E);break}}}break;case"FunctionDeclaration":this.enterPattern(v.id,E);break;case"ClassDeclaration":this.enterPattern(v.id,E);break}}blockPreWalkExportNamedDeclaration(v){let E;if(v.source){E=v.source.value;this.hooks.exportImport.call(v,E)}else{this.hooks.export.call(v)}if(v.declaration){if(!this.hooks.exportDeclaration.call(v,v.declaration)){const E=this.prevStatement;this.preWalkStatement(v.declaration);this.prevStatement=E;this.blockPreWalkStatement(v.declaration);let R=0;this.enterDeclaration(v.declaration,(E=>{this.hooks.exportSpecifier.call(v,E,E,R++)}))}}if(v.specifiers){for(let R=0;R{let $=E.get(v);if($===undefined||!$.call(R)){$=this.hooks.varDeclaration.get(v);if($===undefined||!$.call(R)){this.defineVariable(v)}}}))}break}}}}walkVariableDeclaration(v){for(const E of v.declarations){switch(E.type){case"VariableDeclarator":{const R=E.init&&this.getRenameIdentifier(E.init);if(R&&E.id.type==="Identifier"){const v=this.hooks.canRename.get(R);if(v!==undefined&&v.call(E.init)){const v=this.hooks.rename.get(R);if(v===undefined||!v.call(E.init)){this.setVariable(E.id.name,R)}break}}if(!this.hooks.declarator.call(E,v)){this.walkPattern(E.id);if(E.init)this.walkExpression(E.init)}break}}}}blockPreWalkClassDeclaration(v){if(v.id){this.defineVariable(v.id.name)}}walkClassDeclaration(v){this.walkClass(v)}preWalkSwitchCases(v){for(let E=0,R=v.length;E{const E=v.length;for(let R=0;R0){const v=this.prevStatement;this.blockPreWalkStatements(E.consequent);this.prevStatement=v}}for(let R=0;R0){this.walkStatements(E.consequent)}}}))}preWalkCatchClause(v){this.preWalkStatement(v.body)}walkCatchClause(v){this.inBlockScope((()=>{if(v.param!==null){this.enterPattern(v.param,(v=>{this.defineVariable(v)}));this.walkPattern(v.param)}const E=this.prevStatement;this.blockPreWalkStatement(v.body);this.prevStatement=E;this.walkStatement(v.body)}))}walkPattern(v){switch(v.type){case"ArrayPattern":this.walkArrayPattern(v);break;case"AssignmentPattern":this.walkAssignmentPattern(v);break;case"MemberExpression":this.walkMemberExpression(v);break;case"ObjectPattern":this.walkObjectPattern(v);break;case"RestElement":this.walkRestElement(v);break}}walkAssignmentPattern(v){this.walkExpression(v.right);this.walkPattern(v.left)}walkObjectPattern(v){for(let E=0,R=v.properties.length;E{for(const E of v.params){this.walkPattern(E)}if(v.body.type==="BlockStatement"){this.detectMode(v.body.body);const E=this.prevStatement;this.preWalkStatement(v.body);this.prevStatement=E;this.walkStatement(v.body)}else{this.walkExpression(v.body)}}));this.scope.topLevelScope=E}walkArrowFunctionExpression(v){const E=this.scope.topLevelScope;this.scope.topLevelScope=E?"arrow":false;this.inFunctionScope(false,v.params,(()=>{for(const E of v.params){this.walkPattern(E)}if(v.body.type==="BlockStatement"){this.detectMode(v.body.body);const E=this.prevStatement;this.preWalkStatement(v.body);this.prevStatement=E;this.walkStatement(v.body)}else{this.walkExpression(v.body)}}));this.scope.topLevelScope=E}walkSequenceExpression(v){if(!v.expressions)return;const E=this.statementPath[this.statementPath.length-1];if(E===v||E.type==="ExpressionStatement"&&E.expression===v){const E=this.statementPath.pop();for(const E of v.expressions){this.statementPath.push(E);this.walkExpression(E);this.statementPath.pop()}this.statementPath.push(E)}else{this.walkExpressions(v.expressions)}}walkUpdateExpression(v){this.walkExpression(v.argument)}walkUnaryExpression(v){if(v.operator==="typeof"){const E=this.callHooksForExpression(this.hooks.typeof,v.argument,v);if(E===true)return;if(v.argument.type==="ChainExpression"){const E=this.callHooksForExpression(this.hooks.typeof,v.argument.expression,v);if(E===true)return}}this.walkExpression(v.argument)}walkLeftRightExpression(v){this.walkExpression(v.left);this.walkExpression(v.right)}walkBinaryExpression(v){if(this.hooks.binaryExpression.call(v)===undefined){this.walkLeftRightExpression(v)}}walkLogicalExpression(v){const E=this.hooks.expressionLogicalOperator.call(v);if(E===undefined){this.walkLeftRightExpression(v)}else{if(E){this.walkExpression(v.right)}}}walkAssignmentExpression(v){if(v.left.type==="Identifier"){const E=this.getRenameIdentifier(v.right);if(E){if(this.callHooksForInfo(this.hooks.canRename,E,v.right)){if(!this.callHooksForInfo(this.hooks.rename,E,v.right)){this.setVariable(v.left.name,typeof E==="string"?this.getVariableInfo(E):E)}return}}this.walkExpression(v.right);this.enterPattern(v.left,((E,R)=>{if(!this.callHooksForName(this.hooks.assign,E,v)){this.walkExpression(v.left)}}));return}if(v.left.type.endsWith("Pattern")){this.walkExpression(v.right);this.enterPattern(v.left,((E,R)=>{if(!this.callHooksForName(this.hooks.assign,E,v)){this.defineVariable(E)}}));this.walkPattern(v.left)}else if(v.left.type==="MemberExpression"){const E=this.getMemberExpressionInfo(v.left,Me);if(E){if(this.callHooksForInfo(this.hooks.assignMemberChain,E.rootInfo,v,E.getMembers())){return}}this.walkExpression(v.right);this.walkExpression(v.left)}else{this.walkExpression(v.right);this.walkExpression(v.left)}}walkConditionalExpression(v){const E=this.hooks.expressionConditionalOperator.call(v);if(E===undefined){this.walkExpression(v.test);this.walkExpression(v.consequent);if(v.alternate){this.walkExpression(v.alternate)}}else{if(E){this.walkExpression(v.consequent)}else if(v.alternate){this.walkExpression(v.alternate)}}}walkNewExpression(v){const E=this.callHooksForExpression(this.hooks.new,v.callee,v);if(E===true)return;this.walkExpression(v.callee);if(v.arguments){this.walkExpressions(v.arguments)}}walkYieldExpression(v){if(v.argument){this.walkExpression(v.argument)}}walkTemplateLiteral(v){if(v.expressions){this.walkExpressions(v.expressions)}}walkTaggedTemplateExpression(v){if(v.tag){this.walkExpression(v.tag)}if(v.quasi&&v.quasi.expressions){this.walkExpressions(v.quasi.expressions)}}walkClassExpression(v){this.walkClass(v)}walkChainExpression(v){const E=this.hooks.optionalChaining.call(v);if(E===undefined){if(v.expression.type==="CallExpression"){this.walkCallExpression(v.expression)}else{this.walkMemberExpression(v.expression)}}}_walkIIFE(v,E,R){const getVarInfo=v=>{const E=this.getRenameIdentifier(v);if(E){if(this.callHooksForInfo(this.hooks.canRename,E,v)){if(!this.callHooksForInfo(this.hooks.rename,E,v)){return typeof E==="string"?this.getVariableInfo(E):E}}}this.walkExpression(v)};const{params:$,type:j}=v;const N=j==="ArrowFunctionExpression";const q=R?getVarInfo(R):null;const G=E.map(getVarInfo);const ie=this.scope.topLevelScope;this.scope.topLevelScope=ie&&N?"arrow":false;const ae=$.filter(((v,E)=>!G[E]));if(v.id){ae.push(v.id.name)}this.inFunctionScope(true,ae,(()=>{if(q&&!N){this.setVariable("this",q)}for(let v=0;vv.params.every((v=>v.type==="Identifier"));if(v.callee.type==="MemberExpression"&&v.callee.object.type.endsWith("FunctionExpression")&&!v.callee.computed&&(v.callee.property.name==="call"||v.callee.property.name==="bind")&&v.arguments.length>0&&isSimpleFunction(v.callee.object)){this._walkIIFE(v.callee.object,v.arguments.slice(1),v.arguments[0])}else if(v.callee.type.endsWith("FunctionExpression")&&isSimpleFunction(v.callee)){this._walkIIFE(v.callee,v.arguments,null)}else{if(v.callee.type==="MemberExpression"){const E=this.getMemberExpressionInfo(v.callee,Ie);if(E&&E.type==="call"){const R=this.callHooksForInfo(this.hooks.callMemberChainOfCallMemberChain,E.rootInfo,v,E.getCalleeMembers(),E.call,E.getMembers());if(R===true)return}}const E=this.evaluateExpression(v.callee);if(E.isIdentifier()){const R=this.callHooksForInfo(this.hooks.callMemberChain,E.rootInfo,v,E.getMembers(),E.getMembersOptionals?E.getMembersOptionals():E.getMembers().map((()=>false)));if(R===true)return;const $=this.callHooksForInfo(this.hooks.call,E.identifier,v);if($===true)return}if(v.callee){if(v.callee.type==="MemberExpression"){this.walkExpression(v.callee.object);if(v.callee.computed===true)this.walkExpression(v.callee.property)}else{this.walkExpression(v.callee)}}if(v.arguments)this.walkExpressions(v.arguments)}}walkMemberExpression(v){const E=this.getMemberExpressionInfo(v,Oe);if(E){switch(E.type){case"expression":{const R=this.callHooksForInfo(this.hooks.expression,E.name,v);if(R===true)return;const $=E.getMembers();const j=E.getMembersOptionals();const N=this.callHooksForInfo(this.hooks.expressionMemberChain,E.rootInfo,v,$,j);if(N===true)return;this.walkMemberExpressionWithExpressionName(v,E.name,E.rootInfo,$.slice(),(()=>this.callHooksForInfo(this.hooks.unhandledExpressionMemberChain,E.rootInfo,v,$)));return}case"call":{const R=this.callHooksForInfo(this.hooks.memberChainOfCallMemberChain,E.rootInfo,v,E.getCalleeMembers(),E.call,E.getMembers());if(R===true)return;this.walkExpression(E.call);return}}}this.walkExpression(v.object);if(v.computed===true)this.walkExpression(v.property)}walkMemberExpressionWithExpressionName(v,E,R,$,j){if(v.object.type==="MemberExpression"){const N=v.property.name||`${v.property.value}`;E=E.slice(0,-N.length-1);$.pop();const q=this.callHooksForInfo(this.hooks.expression,E,v.object);if(q===true)return;this.walkMemberExpressionWithExpressionName(v.object,E,R,$,j)}else if(!j||!j()){this.walkExpression(v.object)}if(v.computed===true)this.walkExpression(v.property)}walkThisExpression(v){this.callHooksForName(this.hooks.expression,"this",v)}walkIdentifier(v){this.callHooksForName(this.hooks.expression,v.name,v)}walkMetaProperty(v){this.hooks.expression.for(getRootName(v)).call(v)}callHooksForExpression(v,E,...R){return this.callHooksForExpressionWithFallback(v,E,undefined,undefined,...R)}callHooksForExpressionWithFallback(v,E,R,$,...j){const N=this.getMemberExpressionInfo(E,Me);if(N!==undefined){const E=N.getMembers();return this.callHooksForInfoWithFallback(v,E.length===0?N.rootInfo:N.name,R&&(v=>R(v,N.rootInfo,N.getMembers)),$&&(()=>$(N.name)),...j)}}callHooksForName(v,E,...R){return this.callHooksForNameWithFallback(v,E,undefined,undefined,...R)}callHooksForInfo(v,E,...R){return this.callHooksForInfoWithFallback(v,E,undefined,undefined,...R)}callHooksForInfoWithFallback(v,E,R,$,...j){let N;if(typeof E==="string"){N=E}else{if(!(E instanceof VariableInfo)){if($!==undefined){return $()}return}let R=E.tagInfo;while(R!==undefined){const E=v.get(R.tag);if(E!==undefined){this.currentTagData=R.data;const v=E.call(...j);this.currentTagData=undefined;if(v!==undefined)return v}R=R.next}if(E.freeName===true){if($!==undefined){return $()}return}N=E.freeName}const q=v.get(N);if(q!==undefined){const v=q.call(...j);if(v!==undefined)return v}if(R!==undefined){return R(N)}}callHooksForNameWithFallback(v,E,R,$,...j){return this.callHooksForInfoWithFallback(v,this.getVariableInfo(E),R,$,...j)}inScope(v,E){const R=this.scope;this.scope={topLevelScope:R.topLevelScope,inTry:false,inShorthand:false,isStrict:R.isStrict,isAsmJs:R.isAsmJs,definitions:R.definitions.createChild()};this.undefineVariable("this");this.enterPatterns(v,((v,E)=>{this.defineVariable(v)}));E();this.scope=R}inFunctionScope(v,E,R){const $=this.scope;this.scope={topLevelScope:$.topLevelScope,inTry:false,inShorthand:false,isStrict:$.isStrict,isAsmJs:$.isAsmJs,definitions:$.definitions.createChild()};if(v){this.undefineVariable("this")}this.enterPatterns(E,((v,E)=>{this.defineVariable(v)}));R();this.scope=$}inBlockScope(v){const E=this.scope;this.scope={topLevelScope:E.topLevelScope,inTry:E.inTry,inShorthand:false,isStrict:E.isStrict,isAsmJs:E.isAsmJs,definitions:E.definitions.createChild()};v();this.scope=E}detectMode(v){const E=v.length>=1&&v[0].type==="ExpressionStatement"&&v[0].expression.type==="Literal";if(E&&v[0].expression.value==="use strict"){this.scope.isStrict=true}if(E&&v[0].expression.value==="use asm"){this.scope.isAsmJs=true}}enterPatterns(v,E){for(const R of v){if(typeof R!=="string"){this.enterPattern(R,E)}else if(R){E(R)}}}enterPattern(v,E){if(!v)return;switch(v.type){case"ArrayPattern":this.enterArrayPattern(v,E);break;case"AssignmentPattern":this.enterAssignmentPattern(v,E);break;case"Identifier":this.enterIdentifier(v,E);break;case"ObjectPattern":this.enterObjectPattern(v,E);break;case"RestElement":this.enterRestElement(v,E);break;case"Property":if(v.shorthand&&v.value.type==="Identifier"){this.scope.inShorthand=v.value.name;this.enterIdentifier(v.value,E);this.scope.inShorthand=false}else{this.enterPattern(v.value,E)}break}}enterIdentifier(v,E){if(!this.callHooksForName(this.hooks.pattern,v.name,v)){E(v.name,v)}}enterObjectPattern(v,E){for(let R=0,$=v.properties.length;R<$;R++){const $=v.properties[R];this.enterPattern($,E)}}enterArrayPattern(v,E){for(let R=0,$=v.elements.length;R<$;R++){const $=v.elements[R];this.enterPattern($,E)}}enterRestElement(v,E){this.enterPattern(v.argument,E)}enterAssignmentPattern(v,E){this.enterPattern(v.left,E)}evaluateExpression(v){try{const E=this.hooks.evaluate.get(v.type);if(E!==undefined){const R=E.call(v);if(R!==undefined&&R!==null){R.setExpression(v);return R}}}catch(v){console.warn(v)}return(new me).setRange(v.range).setExpression(v)}parseString(v){switch(v.type){case"BinaryExpression":if(v.operator==="+"){return this.parseString(v.left)+this.parseString(v.right)}break;case"Literal":return v.value+""}throw new Error(v.type+" is not supported as parameter for require")}parseCalculatedString(v){switch(v.type){case"BinaryExpression":if(v.operator==="+"){const E=this.parseCalculatedString(v.left);const R=this.parseCalculatedString(v.right);if(E.code){return{range:E.range,value:E.value,code:true,conditional:false}}else if(R.code){return{range:[E.range[0],R.range?R.range[1]:E.range[1]],value:E.value+R.value,code:true,conditional:false}}else{return{range:[E.range[0],R.range[1]],value:E.value+R.value,code:false,conditional:false}}}break;case"ConditionalExpression":{const E=this.parseCalculatedString(v.consequent);const R=this.parseCalculatedString(v.alternate);const $=[];if(E.conditional){$.push(...E.conditional)}else if(!E.code){$.push(E)}else{break}if(R.conditional){$.push(...R.conditional)}else if(!R.code){$.push(R)}else{break}return{range:undefined,value:"",code:true,conditional:$}}case"Literal":return{range:v.range,value:v.value+"",code:false,conditional:false}}return{range:undefined,value:"",code:true,conditional:false}}parse(v,E){let R;let $;const j=new Set;if(v===null){throw new Error("source must not be null")}if(Buffer.isBuffer(v)){v=v.toString("utf-8")}if(typeof v==="object"){R=v;$=v.comments}else{$=[];R=JavascriptParser._parse(v,{sourceType:this.sourceType,onComment:$,onInsertedSemicolon:v=>j.add(v)})}const N=this.scope;const q=this.state;const G=this.comments;const ie=this.semicolons;const ce=this.statementPath;const le=this.prevStatement;this.scope={topLevelScope:true,inTry:false,inShorthand:false,isStrict:false,isAsmJs:false,definitions:new ae};this.state=E;this.comments=$;this.semicolons=j;this.statementPath=[];this.prevStatement=undefined;if(this.hooks.program.call(R,$)===undefined){this.detectMode(R.body);this.preWalkStatements(R.body);this.prevStatement=undefined;this.blockPreWalkStatements(R.body);this.prevStatement=undefined;this.walkStatements(R.body)}this.hooks.finish.call(R,$);this.scope=N;this.state=q;this.comments=G;this.semicolons=ie;this.statementPath=ce;this.prevStatement=le;return E}evaluate(v){const E=JavascriptParser._parse("("+v+")",{sourceType:this.sourceType,locations:false});if(E.body.length!==1||E.body[0].type!=="ExpressionStatement"){throw new Error("evaluate: Source is not a expression")}return this.evaluateExpression(E.body[0].expression)}isPure(v,E){if(!v)return true;const R=this.hooks.isPure.for(v.type).call(v,E);if(typeof R==="boolean")return R;switch(v.type){case"ClassDeclaration":case"ClassExpression":{if(v.body.type!=="ClassBody")return false;if(v.superClass&&!this.isPure(v.superClass,v.range[0])){return false}const E=v.body.body;return E.every((v=>(!v.computed||!v.key||this.isPure(v.key,v.range[0]))&&(!v.static||!v.value||this.isPure(v.value,v.key?v.key.range[1]:v.range[0]))))}case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"Literal":case"PrivateIdentifier":return true;case"VariableDeclaration":return v.declarations.every((v=>this.isPure(v.init,v.range[0])));case"ConditionalExpression":return this.isPure(v.test,E)&&this.isPure(v.consequent,v.test.range[1])&&this.isPure(v.alternate,v.consequent.range[1]);case"SequenceExpression":return v.expressions.every((v=>{const R=this.isPure(v,E);E=v.range[1];return R}));case"CallExpression":{const R=v.range[0]-E>12&&this.getComments([E,v.range[0]]).some((v=>v.type==="Block"&&/^\s*(#|@)__PURE__\s*$/.test(v.value)));if(!R)return false;E=v.callee.range[1];return v.arguments.every((v=>{if(v.type==="SpreadElement")return false;const R=this.isPure(v,E);E=v.range[1];return R}))}}const $=this.evaluateExpression(v);return!$.couldHaveSideEffects()}getComments(v){const[E,R]=v;const compare=(v,E)=>v.range[0]-E;let $=ce.ge(this.comments,E,compare);let j=[];while(this.comments[$]&&this.comments[$].range[1]<=R){j.push(this.comments[$]);$++}return j}isAsiPosition(v){const E=this.statementPath[this.statementPath.length-1];if(E===undefined)throw new Error("Not in statement");return E.range[1]===v&&this.semicolons.has(v)||E.range[0]===v&&this.prevStatement!==undefined&&this.semicolons.has(this.prevStatement.range[1])}unsetAsiPosition(v){this.semicolons.delete(v)}isStatementLevelExpression(v){const E=this.statementPath[this.statementPath.length-1];return v===E||E.type==="ExpressionStatement"&&E.expression===v}getTagData(v,E){const R=this.scope.definitions.get(v);if(R instanceof VariableInfo){let v=R.tagInfo;while(v!==undefined){if(v.tag===E)return v.data;v=v.next}}}tagVariable(v,E,R){const $=this.scope.definitions.get(v);let j;if($===undefined){j=new VariableInfo(this.scope,v,{tag:E,data:R,next:undefined})}else if($ instanceof VariableInfo){j=new VariableInfo($.declaredScope,$.freeName,{tag:E,data:R,next:$.tagInfo})}else{j=new VariableInfo($,true,{tag:E,data:R,next:undefined})}this.scope.definitions.set(v,j)}defineVariable(v){const E=this.scope.definitions.get(v);if(E instanceof VariableInfo&&E.declaredScope===this.scope)return;this.scope.definitions.set(v,this.scope)}undefineVariable(v){this.scope.definitions.delete(v)}isVariableDefined(v){const E=this.scope.definitions.get(v);if(E===undefined)return false;if(E instanceof VariableInfo){return E.freeName===true}return true}getVariableInfo(v){const E=this.scope.definitions.get(v);if(E===undefined){return v}else{return E}}setVariable(v,E){if(typeof E==="string"){if(E===v){this.scope.definitions.delete(v)}else{this.scope.definitions.set(v,new VariableInfo(this.scope,E,undefined))}}else{this.scope.definitions.set(v,E)}}evaluatedVariable(v){return new VariableInfo(this.scope,undefined,v)}parseCommentOptions(v){const E=this.getComments(v);if(E.length===0){return Le}let R={};let $=[];for(const v of E){const{value:E}=v;if(E&&Be.test(E)){try{const v=G.runInNewContext(`(function(){return {${E}};})()`);Object.assign(R,v)}catch(E){E.comment=v;$.push(E)}}}return{options:R,errors:$}}extractMemberExpressionChain(v){let E=v;const R=[];const $=[];while(E.type==="MemberExpression"){if(E.computed){if(E.property.type!=="Literal")break;R.push(`${E.property.value}`)}else{if(E.property.type!=="Identifier")break;R.push(E.property.name)}$.push(E.optional);E=E.object}return{members:R,membersOptionals:$,object:E}}getFreeInfoFromVariable(v){const E=this.getVariableInfo(v);let R;if(E instanceof VariableInfo){R=E.freeName;if(typeof R!=="string")return undefined}else if(typeof E!=="string"){return undefined}else{R=E}return{info:E,name:R}}getMemberExpressionInfo(v,E){const{object:R,members:$,membersOptionals:j}=this.extractMemberExpressionChain(v);switch(R.type){case"CallExpression":{if((E&Ie)===0)return undefined;let v=R.callee;let N=_e;if(v.type==="MemberExpression"){({object:v,members:N}=this.extractMemberExpressionChain(v))}const q=getRootName(v);if(!q)return undefined;const G=this.getFreeInfoFromVariable(q);if(!G)return undefined;const{info:ie,name:ae}=G;const ce=objectAndMembersToName(ae,N);return{type:"call",call:R,calleeName:ce,rootInfo:ie,getCalleeMembers:le((()=>N.reverse())),name:objectAndMembersToName(`${ce}()`,$),getMembers:le((()=>$.reverse())),getMembersOptionals:le((()=>j.reverse()))}}case"Identifier":case"MetaProperty":case"ThisExpression":{if((E&Me)===0)return undefined;const v=getRootName(R);if(!v)return undefined;const N=this.getFreeInfoFromVariable(v);if(!N)return undefined;const{info:q,name:G}=N;return{type:"expression",name:objectAndMembersToName(G,$),rootInfo:q,getMembers:le((()=>$.reverse())),getMembersOptionals:le((()=>j.reverse()))}}}}getNameForExpression(v){return this.getMemberExpressionInfo(v,Me)}static _parse(v,E){const R=E?E.sourceType:"module";const $={...Ne,allowReturnOutsideFunction:R==="script",...E,sourceType:R==="auto"?"module":R};let j;let N;let q=false;try{j=Te.parse(v,$)}catch(v){N=v;q=true}if(q&&R==="auto"){$.sourceType="script";if(!("allowReturnOutsideFunction"in E)){$.allowReturnOutsideFunction=true}if(Array.isArray($.onComment)){$.onComment.length=0}try{j=Te.parse(v,$);q=false}catch(v){}}if(q){throw N}return j}}v.exports=JavascriptParser;v.exports.ALLOWED_MEMBER_TYPES_ALL=Oe;v.exports.ALLOWED_MEMBER_TYPES_EXPRESSION=Me;v.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION=Ie},97574:function(v,E,R){"use strict";const $=R(17623);const j=R(14367);const N=R(94844);E.toConstantDependency=(v,E,R)=>function constDependency($){const N=new j(E,$.range,R);N.loc=$.loc;v.state.module.addPresentationalDependency(N);return true};E.evaluateToString=v=>function stringExpression(E){return(new N).setString(v).setRange(E.range)};E.evaluateToNumber=v=>function stringExpression(E){return(new N).setNumber(v).setRange(E.range)};E.evaluateToBoolean=v=>function booleanExpression(E){return(new N).setBoolean(v).setRange(E.range)};E.evaluateToIdentifier=(v,E,R,$)=>function identifierExpression(j){let q=(new N).setIdentifier(v,E,R).setSideEffects(false).setRange(j.range);switch($){case true:q.setTruthy();break;case null:q.setNullish(true);break;case false:q.setFalsy();break}return q};E.expressionIsUnsupported=(v,E)=>function unsupportedExpression(R){const N=new j("(void 0)",R.range,null);N.loc=R.loc;v.state.module.addPresentationalDependency(N);if(!v.state.module)return;v.state.module.addWarning(new $(E,R.loc));return true};E.skipTraversal=()=>true;E.approve=()=>true},82695:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const{isSubset:N}=R(73268);const{getAllChunks:q}=R(5575);const G="var __webpack_exports__ = ";E.generateEntryStartup=(v,E,R,ie,ae)=>{const ce=[`var __webpack_exec__ = ${E.returningFunction(`__webpack_require__(${$.entryModuleId} = moduleId)`,"moduleId")}`];const runModule=v=>`__webpack_exec__(${JSON.stringify(v)})`;const outputCombination=(v,R,j)=>{if(v.size===0){ce.push(`${j?G:""}(${R.map(runModule).join(", ")});`)}else{const N=E.returningFunction(R.map(runModule).join(", "));ce.push(`${j&&!ae?G:""}${ae?$.onChunksLoaded:$.startupEntrypoint}(0, ${JSON.stringify(Array.from(v,(v=>v.id)))}, ${N});`);if(j&&ae){ce.push(`${G}${$.onChunksLoaded}();`)}}};let le=undefined;let me=undefined;for(const[E,$]of R){const R=$.getRuntimeChunk();const j=v.getModuleId(E);const G=q($,ie,R);if(le&&le.size===G.size&&N(le,G)){me.push(j)}else{if(le){outputCombination(le,me)}le=G;me=[j]}}if(le){outputCombination(le,me,true)}ce.push("");return j.asString(ce)};E.updateHashForEntryStartup=(v,E,R,$)=>{for(const[j,N]of R){const R=N.getRuntimeChunk();const G=E.getModuleId(j);v.update(`${G}`);for(const E of q(N,$,R))v.update(`${E.id}`)}};E.getInitialChunkIds=(v,E,R)=>{const $=new Set(v.ids);for(const j of v.getAllInitialChunks()){if(j===v||R(j,E))continue;for(const v of j.ids)$.add(v)}return $}},67927:function(v,E,R){"use strict";const{register:$}=R(7591);class JsonData{constructor(v){this._buffer=undefined;this._data=undefined;if(Buffer.isBuffer(v)){this._buffer=v}else{this._data=v}}get(){if(this._data===undefined&&this._buffer!==undefined){this._data=JSON.parse(this._buffer.toString())}return this._data}updateHash(v){if(this._buffer===undefined&&this._data!==undefined){this._buffer=Buffer.from(JSON.stringify(this._data))}if(this._buffer)return v.update(this._buffer)}}$(JsonData,"webpack/lib/json/JsonData",null,{serialize(v,{write:E}){if(v._buffer===undefined&&v._data!==undefined){v._buffer=Buffer.from(JSON.stringify(v._data))}E(v._buffer)},deserialize({read:v}){return new JsonData(v())}});v.exports=JsonData},85298:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(81701);const{UsageState:N}=R(13168);const q=R(97152);const G=R(39201);const stringifySafe=v=>{const E=JSON.stringify(v);if(!E){return undefined}return E.replace(/\u2028|\u2029/g,(v=>v==="\u2029"?"\\u2029":"\\u2028"))};const createObjectForExportsInfo=(v,E,R)=>{if(E.otherExportsInfo.getUsed(R)!==N.Unused)return v;const $=Array.isArray(v);const j=$?[]:{};for(const $ of Object.keys(v)){const q=E.getReadOnlyExportInfo($);const G=q.getUsed(R);if(G===N.Unused)continue;let ie;if(G===N.OnlyPropertiesUsed&&q.exportsInfo){ie=createObjectForExportsInfo(v[$],q.exportsInfo,R)}else{ie=v[$]}const ae=q.getUsedName($,R);j[ae]=ie}if($){let $=E.getReadOnlyExportInfo("length").getUsed(R)!==N.Unused?v.length:undefined;let q=0;for(let v=0;v20&&typeof me==="object"?`JSON.parse('${_e.replace(/[\\']/g,"\\$&")}')`:_e;let Me;if(ae){Me=`${R.supportsConst()?"const":"var"} ${j.NAMESPACE_OBJECT_EXPORT} = ${Ie};`;ae.registerNamespaceExport(j.NAMESPACE_OBJECT_EXPORT)}else{q.add(G.module);Me=`${v.moduleArgument}.exports = ${Ie};`}return new $(Me)}}v.exports=JsonGenerator},61014:function(v,E,R){"use strict";const $=R(89699);const j=R(85298);const N=R(79898);const q=$(R(79327),(()=>R(54206)),{name:"Json Modules Plugin",baseDataPath:"parser"});class JsonModulesPlugin{apply(v){v.hooks.compilation.tap("JsonModulesPlugin",((v,{normalModuleFactory:E})=>{E.hooks.createParser.for("json").tap("JsonModulesPlugin",(v=>{q(v);return new N(v)}));E.hooks.createGenerator.for("json").tap("JsonModulesPlugin",(()=>new j))}))}}v.exports=JsonModulesPlugin},79898:function(v,E,R){"use strict";const $=R(85685);const j=R(68646);const N=R(67762);const q=R(67927);class JsonParser extends j{constructor(v){super();this.options=v||{}}parse(v,E){if(Buffer.isBuffer(v)){v=v.toString("utf-8")}const R=typeof this.options.parse==="function"?this.options.parse:$;const j=typeof v==="object"?v:R(v[0]==="\ufeff"?v.slice(1):v);const G=new q(j);E.module.buildInfo.jsonData=G;E.module.buildInfo.strict=true;E.module.buildMeta.exportsType="default";E.module.buildMeta.defaultObject=typeof j==="object"?"redirect-warn":false;E.module.addDependency(new N(G));return E}}v.exports=JsonParser},19880:function(v,E,R){"use strict";const $=R(39201);const j=R(36109);const N="Common configuration options that specific library names are 'output.library[.name]', 'entry.xyz.library[.name]', 'ModuleFederationPlugin.name' and 'ModuleFederationPlugin.library[.name]'.";class AbstractLibraryPlugin{constructor({pluginName:v,type:E}){this._pluginName=v;this._type=E;this._parseCache=new WeakMap}apply(v){const{_pluginName:E}=this;v.hooks.thisCompilation.tap(E,(v=>{v.hooks.finishModules.tap({name:E,stage:10},(()=>{for(const[E,{dependencies:R,options:{library:$}}]of v.entries){const j=this._parseOptionsCached($!==undefined?$:v.outputOptions.library);if(j!==false){const $=R[R.length-1];if($){const R=v.moduleGraph.getModule($);if(R){this.finishEntryModule(R,E,{options:j,compilation:v,chunkGraph:v.chunkGraph})}}}}}));const getOptionsForChunk=E=>{if(v.chunkGraph.getNumberOfEntryModules(E)===0)return false;const R=E.getEntryOptions();const $=R&&R.library;return this._parseOptionsCached($!==undefined?$:v.outputOptions.library)};if(this.render!==AbstractLibraryPlugin.prototype.render||this.runtimeRequirements!==AbstractLibraryPlugin.prototype.runtimeRequirements){v.hooks.additionalChunkRuntimeRequirements.tap(E,((E,R,{chunkGraph:$})=>{const j=getOptionsForChunk(E);if(j!==false){this.runtimeRequirements(E,R,{options:j,compilation:v,chunkGraph:$})}}))}const R=j.getCompilationHooks(v);if(this.render!==AbstractLibraryPlugin.prototype.render){R.render.tap(E,((E,R)=>{const $=getOptionsForChunk(R.chunk);if($===false)return E;return this.render(E,R,{options:$,compilation:v,chunkGraph:v.chunkGraph})}))}if(this.embedInRuntimeBailout!==AbstractLibraryPlugin.prototype.embedInRuntimeBailout){R.embedInRuntimeBailout.tap(E,((E,R)=>{const $=getOptionsForChunk(R.chunk);if($===false)return;return this.embedInRuntimeBailout(E,R,{options:$,compilation:v,chunkGraph:v.chunkGraph})}))}if(this.strictRuntimeBailout!==AbstractLibraryPlugin.prototype.strictRuntimeBailout){R.strictRuntimeBailout.tap(E,(E=>{const R=getOptionsForChunk(E.chunk);if(R===false)return;return this.strictRuntimeBailout(E,{options:R,compilation:v,chunkGraph:v.chunkGraph})}))}if(this.renderStartup!==AbstractLibraryPlugin.prototype.renderStartup){R.renderStartup.tap(E,((E,R,$)=>{const j=getOptionsForChunk($.chunk);if(j===false)return E;return this.renderStartup(E,R,$,{options:j,compilation:v,chunkGraph:v.chunkGraph})}))}R.chunkHash.tap(E,((E,R,$)=>{const j=getOptionsForChunk(E);if(j===false)return;this.chunkHash(E,R,$,{options:j,compilation:v,chunkGraph:v.chunkGraph})}))}))}_parseOptionsCached(v){if(!v)return false;if(v.type!==this._type)return false;const E=this._parseCache.get(v);if(E!==undefined)return E;const R=this.parseOptions(v);this._parseCache.set(v,R);return R}parseOptions(v){const E=R(73846);throw new E}finishEntryModule(v,E,R){}embedInRuntimeBailout(v,E,R){return undefined}strictRuntimeBailout(v,E){return undefined}runtimeRequirements(v,E,R){if(this.render!==AbstractLibraryPlugin.prototype.render)E.add($.returnExportsFromRuntime)}render(v,E,R){return v}renderStartup(v,E,R,$){return v}chunkHash(v,E,R,$){const j=this._parseOptionsCached($.compilation.outputOptions.library);E.update(this._pluginName);E.update(JSON.stringify(j))}}AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE=N;v.exports=AbstractLibraryPlugin},31205:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(73096);const N=R(43841);const q=R(19880);class AmdLibraryPlugin extends q{constructor(v){super({pluginName:"AmdLibraryPlugin",type:v.type});this.requireAsWrapper=v.requireAsWrapper}parseOptions(v){const{name:E}=v;if(this.requireAsWrapper){if(E){throw new Error(`AMD library name must be unset. ${q.COMMON_LIBRARY_NAME_MESSAGE}`)}}else{if(E&&typeof E!=="string"){throw new Error(`AMD library name must be a simple string or unset. ${q.COMMON_LIBRARY_NAME_MESSAGE}`)}}return{name:E}}render(v,{chunkGraph:E,chunk:R,runtimeTemplate:q},{options:G,compilation:ie}){const ae=q.supportsArrowFunction();const ce=E.getChunkModules(R).filter((v=>v instanceof j));const le=ce;const me=JSON.stringify(le.map((v=>typeof v.request==="object"&&!Array.isArray(v.request)?v.request.amd:v.request)));const _e=le.map((v=>`__WEBPACK_EXTERNAL_MODULE_${N.toIdentifier(`${E.getModuleId(v)}`)}__`)).join(", ");const Ie=q.isIIFE();const Me=(ae?`(${_e}) => {`:`function(${_e}) {`)+(Ie||!R.hasRuntime()?" return ":"\n");const Oe=Ie?";\n}":"\n}";if(this.requireAsWrapper){return new $(`require(${me}, ${Me}`,v,`${Oe});`)}else if(G.name){const E=ie.getPath(G.name,{chunk:R});return new $(`define(${JSON.stringify(E)}, ${me}, ${Me}`,v,`${Oe});`)}else if(_e){return new $(`define(${me}, ${Me}`,v,`${Oe});`)}else{return new $(`define(${Me}`,v,`${Oe});`)}}chunkHash(v,E,R,{options:$,compilation:j}){E.update("AmdLibraryPlugin");if(this.requireAsWrapper){E.update("requireAsWrapper")}else if($.name){E.update("named");const R=j.getPath($.name,{chunk:v});E.update(R)}}}v.exports=AmdLibraryPlugin},746:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const{UsageState:j}=R(13168);const N=R(43841);const q=R(67603);const{getEntryRuntime:G}=R(47462);const ie=R(19880);const ae=/^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/;const ce=/^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu;const isNameValid=v=>!ae.test(v)&&ce.test(v);const accessWithInit=(v,E,R=false)=>{const $=v[0];if(v.length===1&&!R)return $;let j=E>0?$:`(${$} = typeof ${$} === "undefined" ? {} : ${$})`;let N=1;let G;if(E>N){G=v.slice(1,E);N=E;j+=q(G)}else{G=[]}const ie=R?v.length:v.length-1;for(;NR.getPath(v,{chunk:E})))}render(v,{chunk:E},{options:R,compilation:j}){const q=this._getResolvedFullName(R,E,j);if(this.declare){const E=q[0];if(!isNameValid(E)){throw new Error(`Library name base (${E}) must be a valid identifier when using a var declaring library type. Either use a valid identifier (e. g. ${N.toIdentifier(E)}) or use a different library type (e. g. 'type: "global"', which assign a property on the global scope instead of declaring a variable). ${ie.COMMON_LIBRARY_NAME_MESSAGE}`)}v=new $(`${this.declare} ${E};\n`,v)}return v}embedInRuntimeBailout(v,{chunk:E,codeGenerationResults:R},{options:$,compilation:j}){const{data:N}=R.get(v,E.runtime);const q=N&&N.get("topLevelDeclarations")||v.buildInfo&&v.buildInfo.topLevelDeclarations;if(!q)return"it doesn't tell about top level declarations.";const G=this._getResolvedFullName($,E,j);const ie=G[0];if(q.has(ie))return`it declares '${ie}' on top-level, which conflicts with the current library output.`}strictRuntimeBailout({chunk:v},{options:E,compilation:R}){if(this.declare||this.prefix==="global"||this.prefix.length>0||!E.name){return}return"a global variable is assign and maybe created"}renderStartup(v,E,{moduleGraph:R,chunk:j},{options:N,compilation:G}){const ie=this._getResolvedFullName(N,j,G);const ae=this.unnamed==="static";const ce=N.export?q(Array.isArray(N.export)?N.export:[N.export]):"";const le=new $(v);if(ae){const v=R.getExportsInfo(E);const $=accessWithInit(ie,this._getPrefix(G).length,true);for(const E of v.orderedExports){if(!E.provided)continue;const v=q([E.name]);le.add(`${$}${v} = __webpack_exports__${ce}${v};\n`)}le.add(`Object.defineProperty(${$}, "__esModule", { value: true });\n`)}else if(N.name?this.named==="copy":this.unnamed==="copy"){le.add(`var __webpack_export_target__ = ${accessWithInit(ie,this._getPrefix(G).length,true)};\n`);let v="__webpack_exports__";if(ce){le.add(`var __webpack_exports_export__ = __webpack_exports__${ce};\n`);v="__webpack_exports_export__"}le.add(`for(var i in ${v}) __webpack_export_target__[i] = ${v}[i];\n`);le.add(`if(${v}.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });\n`)}else{le.add(`${accessWithInit(ie,this._getPrefix(G).length,false)} = __webpack_exports__${ce};\n`)}return le}runtimeRequirements(v,E,R){}chunkHash(v,E,R,{options:$,compilation:j}){E.update("AssignLibraryPlugin");const N=this._getResolvedFullName($,v,j);if($.name?this.named==="copy":this.unnamed==="copy"){E.update("copy")}if(this.declare){E.update(this.declare)}E.update(N.join("."));if($.export){E.update(`${$.export}`)}}}v.exports=AssignLibraryPlugin},7616:function(v,E,R){"use strict";const $=new WeakMap;const getEnabledTypes=v=>{let E=$.get(v);if(E===undefined){E=new Set;$.set(v,E)}return E};class EnableLibraryPlugin{constructor(v){this.type=v}static setEnabled(v,E){getEnabledTypes(v).add(E)}static checkEnabled(v,E){if(!getEnabledTypes(v).has(E)){throw new Error(`Library type "${E}" is not enabled. `+"EnableLibraryPlugin need to be used to enable this type of library. "+'This usually happens through the "output.enabledLibraryTypes" option. '+'If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". '+"These types are enabled: "+Array.from(getEnabledTypes(v)).join(", "))}}apply(v){const{type:E}=this;const $=getEnabledTypes(v);if($.has(E))return;$.add(E);if(typeof E==="string"){const enableExportProperty=()=>{const $=R(95495);new $({type:E,nsObjectUsed:E!=="module"}).apply(v)};switch(E){case"var":{const $=R(746);new $({type:E,prefix:[],declare:"var",unnamed:"error"}).apply(v);break}case"assign-properties":{const $=R(746);new $({type:E,prefix:[],declare:false,unnamed:"error",named:"copy"}).apply(v);break}case"assign":{const $=R(746);new $({type:E,prefix:[],declare:false,unnamed:"error"}).apply(v);break}case"this":{const $=R(746);new $({type:E,prefix:["this"],declare:false,unnamed:"copy"}).apply(v);break}case"window":{const $=R(746);new $({type:E,prefix:["window"],declare:false,unnamed:"copy"}).apply(v);break}case"self":{const $=R(746);new $({type:E,prefix:["self"],declare:false,unnamed:"copy"}).apply(v);break}case"global":{const $=R(746);new $({type:E,prefix:"global",declare:false,unnamed:"copy"}).apply(v);break}case"commonjs":{const $=R(746);new $({type:E,prefix:["exports"],declare:false,unnamed:"copy"}).apply(v);break}case"commonjs-static":{const $=R(746);new $({type:E,prefix:["exports"],declare:false,unnamed:"static"}).apply(v);break}case"commonjs2":case"commonjs-module":{const $=R(746);new $({type:E,prefix:["module","exports"],declare:false,unnamed:"assign"}).apply(v);break}case"amd":case"amd-require":{enableExportProperty();const $=R(31205);new $({type:E,requireAsWrapper:E==="amd-require"}).apply(v);break}case"umd":case"umd2":{enableExportProperty();const $=R(41398);new $({type:E,optionalAmdExternalAsGlobal:E==="umd2"}).apply(v);break}case"system":{enableExportProperty();const $=R(59916);new $({type:E}).apply(v);break}case"jsonp":{enableExportProperty();const $=R(67228);new $({type:E}).apply(v);break}case"module":{enableExportProperty();const $=R(92914);new $({type:E}).apply(v);break}default:throw new Error(`Unsupported library type ${E}.\nPlugins which provide custom library types must call EnableLibraryPlugin.setEnabled(compiler, type) to disable this error.`)}}else{}}}v.exports=EnableLibraryPlugin},95495:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const{UsageState:j}=R(13168);const N=R(67603);const{getEntryRuntime:q}=R(47462);const G=R(19880);class ExportPropertyLibraryPlugin extends G{constructor({type:v,nsObjectUsed:E}){super({pluginName:"ExportPropertyLibraryPlugin",type:v});this.nsObjectUsed=E}parseOptions(v){return{export:v.export}}finishEntryModule(v,E,{options:R,compilation:$,compilation:{moduleGraph:N}}){const G=q($,E);if(R.export){const E=N.getExportInfo(v,Array.isArray(R.export)?R.export[0]:R.export);E.setUsed(j.Used,G);E.canMangleUse=false}else{const E=N.getExportsInfo(v);if(this.nsObjectUsed){E.setUsedInUnknownWay(G)}else{E.setAllKnownExportsUsed(G)}}N.addExtraReason(v,"used as library export")}runtimeRequirements(v,E,R){}renderStartup(v,E,R,{options:j}){if(!j.export)return v;const q=`__webpack_exports__ = __webpack_exports__${N(Array.isArray(j.export)?j.export:[j.export])};\n`;return new $(v,q)}}v.exports=ExportPropertyLibraryPlugin},67228:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(19880);class JsonpLibraryPlugin extends j{constructor(v){super({pluginName:"JsonpLibraryPlugin",type:v.type})}parseOptions(v){const{name:E}=v;if(typeof E!=="string"){throw new Error(`Jsonp library name must be a simple string. ${j.COMMON_LIBRARY_NAME_MESSAGE}`)}return{name:E}}render(v,{chunk:E},{options:R,compilation:j}){const N=j.getPath(R.name,{chunk:E});return new $(`${N}(`,v,")")}chunkHash(v,E,R,{options:$,compilation:j}){E.update("JsonpLibraryPlugin");E.update(j.getPath($.name,{chunk:v}))}}v.exports=JsonpLibraryPlugin},92914:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const j=R(43841);const N=R(67603);const q=R(19880);class ModuleLibraryPlugin extends q{constructor(v){super({pluginName:"ModuleLibraryPlugin",type:v.type})}parseOptions(v){const{name:E}=v;if(E){throw new Error(`Library name must be unset. ${q.COMMON_LIBRARY_NAME_MESSAGE}`)}return{name:E}}renderStartup(v,E,{moduleGraph:R,chunk:q},{options:G,compilation:ie}){const ae=new $(v);const ce=R.getExportsInfo(E);const le=[];const me=R.isAsync(E);if(me){ae.add(`__webpack_exports__ = await __webpack_exports__;\n`)}for(const v of ce.orderedExports){if(!v.provided)continue;const E=`__webpack_exports__${j.toIdentifier(v.name)}`;ae.add(`var ${E} = __webpack_exports__${N([v.getUsedName(v.name,q.runtime)])};\n`);le.push(`${E} as ${v.name}`)}if(le.length>0){ae.add(`export { ${le.join(", ")} };\n`)}return ae}}v.exports=ModuleLibraryPlugin},59916:function(v,E,R){"use strict";const{ConcatSource:$}=R(51255);const{UsageState:j}=R(13168);const N=R(73096);const q=R(43841);const G=R(67603);const ie=R(19880);class SystemLibraryPlugin extends ie{constructor(v){super({pluginName:"SystemLibraryPlugin",type:v.type})}parseOptions(v){const{name:E}=v;if(E&&typeof E!=="string"){throw new Error(`System.js library name must be a simple string or unset. ${ie.COMMON_LIBRARY_NAME_MESSAGE}`)}return{name:E}}render(v,{chunkGraph:E,moduleGraph:R,chunk:ie},{options:ae,compilation:ce}){const le=E.getChunkModules(ie).filter((v=>v instanceof N&&v.externalType==="system"));const me=le;const _e=ae.name?`${JSON.stringify(ce.getPath(ae.name,{chunk:ie}))}, `:"";const Ie=JSON.stringify(me.map((v=>typeof v.request==="object"&&!Array.isArray(v.request)?v.request.amd:v.request)));const Me="__WEBPACK_DYNAMIC_EXPORT__";const Oe=me.map((v=>`__WEBPACK_EXTERNAL_MODULE_${q.toIdentifier(`${E.getModuleId(v)}`)}__`));const Te=Oe.map((v=>`var ${v} = {};`)).join("\n");const Ne=[];const Be=Oe.length===0?"":q.asString(["setters: [",q.indent(me.map(((v,E)=>{const $=Oe[E];const N=R.getExportsInfo(v);const ae=N.otherExportsInfo.getUsed(ie.runtime)===j.Unused;const ce=[];const le=[];for(const v of N.orderedExports){const E=v.getUsedName(undefined,ie.runtime);if(E){if(ae||E!==v.name){ce.push(`${$}${G([E])} = module${G([v.name])};`);le.push(v.name)}}else{le.push(v.name)}}if(!ae){if(!Array.isArray(v.request)||v.request.length===1){Ne.push(`Object.defineProperty(${$}, "__esModule", { value: true });`)}if(le.length>0){const v=`${$}handledNames`;Ne.push(`var ${v} = ${JSON.stringify(le)};`);ce.push(q.asString(["Object.keys(module).forEach(function(key) {",q.indent([`if(${v}.indexOf(key) >= 0)`,q.indent(`${$}[key] = module[key];`)]),"});"]))}else{ce.push(q.asString(["Object.keys(module).forEach(function(key) {",q.indent([`${$}[key] = module[key];`]),"});"]))}}if(ce.length===0)return"function() {}";return q.asString(["function(module) {",q.indent(ce),"}"])})).join(",\n")),"],"]);return new $(q.asString([`System.register(${_e}${Ie}, function(${Me}, __system_context__) {`,q.indent([Te,q.asString(Ne),"return {",q.indent([Be,"execute: function() {",q.indent(`${Me}(`)])]),""]),v,q.asString(["",q.indent([q.indent([q.indent([");"]),"}"]),"};"]),"})"]))}chunkHash(v,E,R,{options:$,compilation:j}){E.update("SystemLibraryPlugin");if($.name){E.update(j.getPath($.name,{chunk:v}))}}}v.exports=SystemLibraryPlugin},41398:function(v,E,R){"use strict";const{ConcatSource:$,OriginalSource:j}=R(51255);const N=R(73096);const q=R(43841);const G=R(19880);const accessorToObjectAccess=v=>v.map((v=>`[${JSON.stringify(v)}]`)).join("");const accessorAccess=(v,E,R=", ")=>{const $=Array.isArray(E)?E:[E];return $.map(((E,R)=>{const j=v?v+accessorToObjectAccess($.slice(0,R+1)):$[0]+accessorToObjectAccess($.slice(1,R+1));if(R===$.length-1)return j;if(R===0&&v===undefined)return`${j} = typeof ${j} === "object" ? ${j} : {}`;return`${j} = ${j} || {}`})).join(R)};class UmdLibraryPlugin extends G{constructor(v){super({pluginName:"UmdLibraryPlugin",type:v.type});this.optionalAmdExternalAsGlobal=v.optionalAmdExternalAsGlobal}parseOptions(v){let E;let R;if(typeof v.name==="object"&&!Array.isArray(v.name)){E=v.name.root||v.name.amd||v.name.commonjs;R=v.name}else{E=v.name;const $=Array.isArray(E)?E[0]:E;R={commonjs:$,root:v.name,amd:$}}return{name:E,names:R,auxiliaryComment:v.auxiliaryComment,namedDefine:v.umdNamedDefine}}render(v,{chunkGraph:E,runtimeTemplate:R,chunk:G,moduleGraph:ie},{options:ae,compilation:ce}){const le=E.getChunkModules(G).filter((v=>v instanceof N&&(v.externalType==="umd"||v.externalType==="umd2")));let me=le;const _e=[];let Ie=[];if(this.optionalAmdExternalAsGlobal){for(const v of me){if(v.isOptional(ie)){_e.push(v)}else{Ie.push(v)}}me=Ie.concat(_e)}else{Ie=me}const replaceKeys=v=>ce.getPath(v,{chunk:G});const externalsDepsArray=v=>`[${replaceKeys(v.map((v=>JSON.stringify(typeof v.request==="object"?v.request.amd:v.request))).join(", "))}]`;const externalsRootArray=v=>replaceKeys(v.map((v=>{let E=v.request;if(typeof E==="object")E=E.root;return`root${accessorToObjectAccess([].concat(E))}`})).join(", "));const externalsRequireArray=v=>replaceKeys(me.map((E=>{let R;let $=E.request;if(typeof $==="object"){$=$[v]}if($===undefined){throw new Error("Missing external configuration for type:"+v)}if(Array.isArray($)){R=`require(${JSON.stringify($[0])})${accessorToObjectAccess($.slice(1))}`}else{R=`require(${JSON.stringify($)})`}if(E.isOptional(ie)){R=`(function webpackLoadOptionalExternalModule() { try { return ${R}; } catch(e) {} }())`}return R})).join(", "));const externalsArguments=v=>v.map((v=>`__WEBPACK_EXTERNAL_MODULE_${q.toIdentifier(`${E.getModuleId(v)}`)}__`)).join(", ");const libraryName=v=>JSON.stringify(replaceKeys([].concat(v).pop()));let Me;if(_e.length>0){const v=externalsArguments(Ie);const E=Ie.length>0?externalsArguments(Ie)+", "+externalsRootArray(_e):externalsRootArray(_e);Me=`function webpackLoadOptionalExternalModuleAmd(${v}) {\n`+`\t\t\treturn factory(${E});\n`+"\t\t}"}else{Me="factory"}const{auxiliaryComment:Oe,namedDefine:Te,names:Ne}=ae;const getAuxiliaryComment=v=>{if(Oe){if(typeof Oe==="string")return"\t//"+Oe+"\n";if(Oe[v])return"\t//"+Oe[v]+"\n"}return""};return new $(new j("(function webpackUniversalModuleDefinition(root, factory) {\n"+getAuxiliaryComment("commonjs2")+"\tif(typeof exports === 'object' && typeof module === 'object')\n"+"\t\tmodule.exports = factory("+externalsRequireArray("commonjs2")+");\n"+getAuxiliaryComment("amd")+"\telse if(typeof define === 'function' && define.amd)\n"+(Ie.length>0?Ne.amd&&Te===true?"\t\tdefine("+libraryName(Ne.amd)+", "+externalsDepsArray(Ie)+", "+Me+");\n":"\t\tdefine("+externalsDepsArray(Ie)+", "+Me+");\n":Ne.amd&&Te===true?"\t\tdefine("+libraryName(Ne.amd)+", [], "+Me+");\n":"\t\tdefine([], "+Me+");\n")+(Ne.root||Ne.commonjs?getAuxiliaryComment("commonjs")+"\telse if(typeof exports === 'object')\n"+"\t\texports["+libraryName(Ne.commonjs||Ne.root)+"] = factory("+externalsRequireArray("commonjs")+");\n"+getAuxiliaryComment("root")+"\telse\n"+"\t\t"+replaceKeys(accessorAccess("root",Ne.root||Ne.commonjs))+" = factory("+externalsRootArray(me)+");\n":"\telse {\n"+(me.length>0?"\t\tvar a = typeof exports === 'object' ? factory("+externalsRequireArray("commonjs")+") : factory("+externalsRootArray(me)+");\n":"\t\tvar a = factory();\n")+"\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n"+"\t}\n")+`})(${R.outputOptions.globalObject}, ${R.supportsArrowFunction()?`(${externalsArguments(me)}) =>`:`function(${externalsArguments(me)})`} {\nreturn `,"webpack/universalModuleDefinition"),v,";\n})")}}v.exports=UmdLibraryPlugin},33594:function(v,E){"use strict";const R=Object.freeze({error:"error",warn:"warn",info:"info",log:"log",debug:"debug",trace:"trace",group:"group",groupCollapsed:"groupCollapsed",groupEnd:"groupEnd",profile:"profile",profileEnd:"profileEnd",time:"time",clear:"clear",status:"status"});E.LogType=R;const $=Symbol("webpack logger raw log method");const j=Symbol("webpack logger times");const N=Symbol("webpack logger aggregated times");class WebpackLogger{constructor(v,E){this[$]=v;this.getChildLogger=E}error(...v){this[$](R.error,v)}warn(...v){this[$](R.warn,v)}info(...v){this[$](R.info,v)}log(...v){this[$](R.log,v)}debug(...v){this[$](R.debug,v)}assert(v,...E){if(!v){this[$](R.error,E)}}trace(){this[$](R.trace,["Trace"])}clear(){this[$](R.clear)}status(...v){this[$](R.status,v)}group(...v){this[$](R.group,v)}groupCollapsed(...v){this[$](R.groupCollapsed,v)}groupEnd(...v){this[$](R.groupEnd,v)}profile(v){this[$](R.profile,[v])}profileEnd(v){this[$](R.profileEnd,[v])}time(v){this[j]=this[j]||new Map;this[j].set(v,process.hrtime())}timeLog(v){const E=this[j]&&this[j].get(v);if(!E){throw new Error(`No such label '${v}' for WebpackLogger.timeLog()`)}const N=process.hrtime(E);this[$](R.time,[v,...N])}timeEnd(v){const E=this[j]&&this[j].get(v);if(!E){throw new Error(`No such label '${v}' for WebpackLogger.timeEnd()`)}const N=process.hrtime(E);this[j].delete(v);this[$](R.time,[v,...N])}timeAggregate(v){const E=this[j]&&this[j].get(v);if(!E){throw new Error(`No such label '${v}' for WebpackLogger.timeAggregate()`)}const R=process.hrtime(E);this[j].delete(v);this[N]=this[N]||new Map;const $=this[N].get(v);if($!==undefined){if(R[1]+$[1]>1e9){R[0]+=$[0]+1;R[1]=R[1]-1e9+$[1]}else{R[0]+=$[0];R[1]+=$[1]}}this[N].set(v,R)}timeAggregateEnd(v){if(this[N]===undefined)return;const E=this[N].get(v);if(E===undefined)return;this[N].delete(v);this[$](R.time,[v,...E])}}E.Logger=WebpackLogger},86455:function(v,E,R){"use strict";const{LogType:$}=R(33594);const filterToFunction=v=>{if(typeof v==="string"){const E=new RegExp(`[\\\\/]${v.replace(/[-[\]{}()*+?.\\^$|]/g,"\\$&")}([\\\\/]|$|!|\\?)`);return v=>E.test(v)}if(v&&typeof v==="object"&&typeof v.test==="function"){return E=>v.test(E)}if(typeof v==="function"){return v}if(typeof v==="boolean"){return()=>v}};const j={none:6,false:6,error:5,warn:4,info:3,log:2,true:2,verbose:1};v.exports=({level:v="info",debug:E=false,console:R})=>{const N=typeof E==="boolean"?[()=>E]:[].concat(E).map(filterToFunction);const q=j[`${v}`]||0;const logger=(v,E,G)=>{const labeledArgs=()=>{if(Array.isArray(G)){if(G.length>0&&typeof G[0]==="string"){return[`[${v}] ${G[0]}`,...G.slice(1)]}else{return[`[${v}]`,...G]}}else{return[]}};const ie=N.some((E=>E(v)));switch(E){case $.debug:if(!ie)return;if(typeof R.debug==="function"){R.debug(...labeledArgs())}else{R.log(...labeledArgs())}break;case $.log:if(!ie&&q>j.log)return;R.log(...labeledArgs());break;case $.info:if(!ie&&q>j.info)return;R.info(...labeledArgs());break;case $.warn:if(!ie&&q>j.warn)return;R.warn(...labeledArgs());break;case $.error:if(!ie&&q>j.error)return;R.error(...labeledArgs());break;case $.trace:if(!ie)return;R.trace();break;case $.groupCollapsed:if(!ie&&q>j.log)return;if(!ie&&q>j.verbose){if(typeof R.groupCollapsed==="function"){R.groupCollapsed(...labeledArgs())}else{R.log(...labeledArgs())}break}case $.group:if(!ie&&q>j.log)return;if(typeof R.group==="function"){R.group(...labeledArgs())}else{R.log(...labeledArgs())}break;case $.groupEnd:if(!ie&&q>j.log)return;if(typeof R.groupEnd==="function"){R.groupEnd()}break;case $.time:{if(!ie&&q>j.log)return;const E=G[1]*1e3+G[2]/1e6;const $=`[${v}] ${G[0]}: ${E} ms`;if(typeof R.logTime==="function"){R.logTime($)}else{R.log($)}break}case $.profile:if(typeof R.profile==="function"){R.profile(...labeledArgs())}break;case $.profileEnd:if(typeof R.profileEnd==="function"){R.profileEnd(...labeledArgs())}break;case $.clear:if(!ie&&q>j.log)return;if(typeof R.clear==="function"){R.clear()}break;case $.status:if(!ie&&q>j.info)return;if(typeof R.status==="function"){if(G.length===0){R.status()}else{R.status(...labeledArgs())}}else{if(G.length!==0){R.info(...labeledArgs())}}break;default:throw new Error(`Unexpected LogType ${E}`)}};return logger}},77818:function(v){"use strict";const arraySum=v=>{let E=0;for(const R of v)E+=R;return E};const truncateArgs=(v,E)=>{const R=v.map((v=>`${v}`.length));const $=E-R.length+1;if($>0&&v.length===1){if($>=v[0].length){return v}else if($>3){return["..."+v[0].slice(-$+3)]}else{return[v[0].slice(-$)]}}if($Math.min(v,6))))){if(v.length>1)return truncateArgs(v.slice(0,v.length-1),E);return[]}let j=arraySum(R);if(j<=$)return v;while(j>$){const v=Math.max(...R);const E=R.filter((E=>E!==v));const N=E.length>0?Math.max(...E):0;const q=v-N;let G=R.length-E.length;let ie=j-$;for(let E=0;E{const $=`${v}`;const j=R[E];if($.length===j){return $}else if(j>5){return"..."+$.slice(-j+3)}else if(j>0){return $.slice(-j)}else{return""}}))};v.exports=truncateArgs},70979:function(v,E,R){"use strict";const $=R(39201);const j=R(61411);class CommonJsChunkLoadingPlugin{constructor(v){v=v||{};this._asyncChunkLoading=v.asyncChunkLoading}apply(v){const E=this._asyncChunkLoading?R(82441):R(12001);const N=this._asyncChunkLoading?"async-node":"require";new j({chunkLoading:N,asyncChunkLoading:this._asyncChunkLoading}).apply(v);v.hooks.thisCompilation.tap("CommonJsChunkLoadingPlugin",(v=>{const R=v.outputOptions.chunkLoading;const isEnabledForChunk=v=>{const E=v.getEntryOptions();const $=E&&E.chunkLoading!==undefined?E.chunkLoading:R;return $===N};const j=new WeakSet;const handler=(R,N)=>{if(j.has(R))return;j.add(R);if(!isEnabledForChunk(R))return;N.add($.moduleFactoriesAddOnly);N.add($.hasOwnProperty);v.addRuntimeModule(R,new E(N))};v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.baseURI).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.externalInstallChunk).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.onChunksLoaded).tap("CommonJsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("CommonJsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.getChunkScriptFilename)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("CommonJsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.getChunkUpdateScriptFilename);E.add($.moduleCache);E.add($.hmrModuleData);E.add($.moduleFactoriesAddOnly)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("CommonJsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.getUpdateManifestFilename)}))}))}}v.exports=CommonJsChunkLoadingPlugin},27381:function(v,E,R){"use strict";const $=R(28754);const j=R(41653);const N=R(86455);const q=R(66378);const G=R(33796);class NodeEnvironmentPlugin{constructor(v){this.options=v}apply(v){const{infrastructureLogging:E}=this.options;v.infrastructureLogger=N({level:E.level||"info",debug:E.debug||false,console:E.console||G({colors:E.colors,appendOnly:E.appendOnly,stream:E.stream})});v.inputFileSystem=new $(j,6e4);const R=v.inputFileSystem;v.outputFileSystem=j;v.intermediateFileSystem=j;v.watchFileSystem=new q(v.inputFileSystem);v.hooks.beforeRun.tap("NodeEnvironmentPlugin",(v=>{if(v.inputFileSystem===R){v.fsStartTime=Date.now();R.purge()}}))}}v.exports=NodeEnvironmentPlugin},54250:function(v){"use strict";class NodeSourcePlugin{apply(v){}}v.exports=NodeSourcePlugin},23066:function(v,E,R){"use strict";const $=R(51562);const j=["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib",/^node:/,"pnpapi"];class NodeTargetPlugin{apply(v){new $("node-commonjs",j).apply(v)}}v.exports=NodeTargetPlugin},33999:function(v,E,R){"use strict";const $=R(93547);const j=R(49548);class NodeTemplatePlugin{constructor(v){this._options=v||{}}apply(v){const E=this._options.asyncChunkLoading?"async-node":"require";v.options.output.chunkLoading=E;(new $).apply(v);new j(E).apply(v)}}v.exports=NodeTemplatePlugin},66378:function(v,E,R){"use strict";const $=R(73837);const j=R(36871);class NodeWatchFileSystem{constructor(v){this.inputFileSystem=v;this.watcherOptions={aggregateTimeout:0};this.watcher=new j(this.watcherOptions)}watch(v,E,R,N,q,G,ie){if(!v||typeof v[Symbol.iterator]!=="function"){throw new Error("Invalid arguments: 'files'")}if(!E||typeof E[Symbol.iterator]!=="function"){throw new Error("Invalid arguments: 'directories'")}if(!R||typeof R[Symbol.iterator]!=="function"){throw new Error("Invalid arguments: 'missing'")}if(typeof G!=="function"){throw new Error("Invalid arguments: 'callback'")}if(typeof N!=="number"&&N){throw new Error("Invalid arguments: 'startTime'")}if(typeof q!=="object"){throw new Error("Invalid arguments: 'options'")}if(typeof ie!=="function"&&ie){throw new Error("Invalid arguments: 'callbackUndelayed'")}const ae=this.watcher;this.watcher=new j(q);if(ie){this.watcher.once("change",ie)}const fetchTimeInfo=()=>{const v=new Map;const E=new Map;if(this.watcher){this.watcher.collectTimeInfoEntries(v,E)}return{fileTimeInfoEntries:v,contextTimeInfoEntries:E}};this.watcher.once("aggregated",((v,E)=>{this.watcher.pause();if(this.inputFileSystem&&this.inputFileSystem.purge){const R=this.inputFileSystem;for(const E of v){R.purge(E)}for(const v of E){R.purge(v)}}const{fileTimeInfoEntries:R,contextTimeInfoEntries:$}=fetchTimeInfo();G(null,R,$,v,E)}));this.watcher.watch({files:v,directories:E,missing:R,startTime:N});if(ae){ae.close()}return{close:()=>{if(this.watcher){this.watcher.close();this.watcher=null}},pause:()=>{if(this.watcher){this.watcher.pause()}},getAggregatedRemovals:$.deprecate((()=>{const v=this.watcher&&this.watcher.aggregatedRemovals;if(v&&this.inputFileSystem&&this.inputFileSystem.purge){const E=this.inputFileSystem;for(const R of v){E.purge(R)}}return v}),"Watcher.getAggregatedRemovals is deprecated in favor of Watcher.getInfo since that's more performant.","DEP_WEBPACK_WATCHER_GET_AGGREGATED_REMOVALS"),getAggregatedChanges:$.deprecate((()=>{const v=this.watcher&&this.watcher.aggregatedChanges;if(v&&this.inputFileSystem&&this.inputFileSystem.purge){const E=this.inputFileSystem;for(const R of v){E.purge(R)}}return v}),"Watcher.getAggregatedChanges is deprecated in favor of Watcher.getInfo since that's more performant.","DEP_WEBPACK_WATCHER_GET_AGGREGATED_CHANGES"),getFileTimeInfoEntries:$.deprecate((()=>fetchTimeInfo().fileTimeInfoEntries),"Watcher.getFileTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.","DEP_WEBPACK_WATCHER_FILE_TIME_INFO_ENTRIES"),getContextTimeInfoEntries:$.deprecate((()=>fetchTimeInfo().contextTimeInfoEntries),"Watcher.getContextTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.","DEP_WEBPACK_WATCHER_CONTEXT_TIME_INFO_ENTRIES"),getInfo:()=>{const v=this.watcher&&this.watcher.aggregatedRemovals;const E=this.watcher&&this.watcher.aggregatedChanges;if(this.inputFileSystem&&this.inputFileSystem.purge){const R=this.inputFileSystem;if(v){for(const E of v){R.purge(E)}}if(E){for(const v of E){R.purge(v)}}}const{fileTimeInfoEntries:R,contextTimeInfoEntries:$}=fetchTimeInfo();return{changes:E,removals:v,fileTimeInfoEntries:R,contextTimeInfoEntries:$}}}}}v.exports=NodeWatchFileSystem},82441:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{chunkHasJs:q,getChunkFilenameTemplate:G}=R(36109);const{getInitialChunkIds:ie}=R(82695);const ae=R(73897);const{getUndoPath:ce}=R(20162);class ReadFileChunkLoadingRuntimeModule extends j{constructor(v){super("readFile chunk loading",j.STAGE_ATTACH);this.runtimeRequirements=v}_generateBaseUri(v,E){const R=v.getEntryOptions();if(R&&R.baseUri){return`${$.baseURI} = ${JSON.stringify(R.baseUri)};`}return`${$.baseURI} = require("url").pathToFileURL(${E?`__dirname + ${JSON.stringify("/"+E)}`:"__filename"});`}generate(){const{chunkGraph:v,chunk:E}=this;const{runtimeTemplate:R}=this.compilation;const j=$.ensureChunkHandlers;const le=this.runtimeRequirements.has($.baseURI);const me=this.runtimeRequirements.has($.externalInstallChunk);const _e=this.runtimeRequirements.has($.onChunksLoaded);const Ie=this.runtimeRequirements.has($.ensureChunkHandlers);const Me=this.runtimeRequirements.has($.hmrDownloadUpdateHandlers);const Oe=this.runtimeRequirements.has($.hmrDownloadManifest);const Te=v.getChunkConditionMap(E,q);const Ne=ae(Te);const Be=ie(E,v,q);const Le=this.compilation.getPath(G(E,this.compilation.outputOptions),{chunk:E,contentHashType:"javascript"});const qe=ce(Le,this.compilation.outputOptions.path,false);const Ue=Me?`${$.hmrRuntimeStatePrefix}_readFileVm`:undefined;return N.asString([le?this._generateBaseUri(E,qe):"// no baseURI","","// object to store loaded chunks",'// "0" means "already loaded", Promise means loading',`var installedChunks = ${Ue?`${Ue} = ${Ue} || `:""}{`,N.indent(Array.from(Be,(v=>`${JSON.stringify(v)}: 0`)).join(",\n")),"};","",_e?`${$.onChunksLoaded}.readFileVm = ${R.returningFunction("installedChunks[chunkId] === 0","chunkId")};`:"// no on chunks loaded","",Ie||me?`var installChunk = ${R.basicFunction("chunk",["var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;","for(var moduleId in moreModules) {",N.indent([`if(${$.hasOwnProperty}(moreModules, moduleId)) {`,N.indent([`${$.moduleFactories}[moduleId] = moreModules[moduleId];`]),"}"]),"}",`if(runtime) runtime(__webpack_require__);`,"for(var i = 0; i < chunkIds.length; i++) {",N.indent(["if(installedChunks[chunkIds[i]]) {",N.indent(["installedChunks[chunkIds[i]][0]();"]),"}","installedChunks[chunkIds[i]] = 0;"]),"}",_e?`${$.onChunksLoaded}();`:""])};`:"// no chunk install function needed","",Ie?N.asString(["// ReadFile + VM.run chunk loading for javascript",`${j}.readFileVm = function(chunkId, promises) {`,Ne!==false?N.indent(["","var installedChunkData = installedChunks[chunkId];",'if(installedChunkData !== 0) { // 0 means "already installed".',N.indent(['// array of [resolve, reject, promise] means "currently loading"',"if(installedChunkData) {",N.indent(["promises.push(installedChunkData[2]);"]),"} else {",N.indent([Ne===true?"if(true) { // all chunks have JS":`if(${Ne("chunkId")}) {`,N.indent(["// load the chunk and return promise to it","var promise = new Promise(function(resolve, reject) {",N.indent(["installedChunkData = installedChunks[chunkId] = [resolve, reject];",`var filename = require('path').join(__dirname, ${JSON.stringify(qe)} + ${$.getChunkScriptFilename}(chunkId));`,"require('fs').readFile(filename, 'utf-8', function(err, content) {",N.indent(["if(err) return reject(err);","var chunk = {};","require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)"+"(chunk, require, require('path').dirname(filename), filename);","installChunk(chunk);"]),"});"]),"});","promises.push(installedChunkData[2] = promise);"]),"} else installedChunks[chunkId] = 0;"]),"}"]),"}"]):N.indent(["installedChunks[chunkId] = 0;"]),"};"]):"// no chunk loading","",me?N.asString(["module.exports = __webpack_require__;",`${$.externalInstallChunk} = installChunk;`]):"// no external install chunk","",Me?N.asString(["function loadUpdateChunk(chunkId, updatedModulesList) {",N.indent(["return new Promise(function(resolve, reject) {",N.indent([`var filename = require('path').join(__dirname, ${JSON.stringify(qe)} + ${$.getChunkUpdateScriptFilename}(chunkId));`,"require('fs').readFile(filename, 'utf-8', function(err, content) {",N.indent(["if(err) return reject(err);","var update = {};","require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)"+"(update, require, require('path').dirname(filename), filename);","var updatedModules = update.modules;","var runtime = update.runtime;","for(var moduleId in updatedModules) {",N.indent([`if(${$.hasOwnProperty}(updatedModules, moduleId)) {`,N.indent([`currentUpdate[moduleId] = updatedModules[moduleId];`,"if(updatedModulesList) updatedModulesList.push(moduleId);"]),"}"]),"}","if(runtime) currentUpdateRuntime.push(runtime);","resolve();"]),"});"]),"});"]),"}","",N.getFunctionContent(require("./JavascriptHotModuleReplacement.runtime.js")).replace(/\$key\$/g,"readFileVm").replace(/\$installedChunks\$/g,"installedChunks").replace(/\$loadUpdateChunk\$/g,"loadUpdateChunk").replace(/\$moduleCache\$/g,$.moduleCache).replace(/\$moduleFactories\$/g,$.moduleFactories).replace(/\$ensureChunkHandlers\$/g,$.ensureChunkHandlers).replace(/\$hasOwnProperty\$/g,$.hasOwnProperty).replace(/\$hmrModuleData\$/g,$.hmrModuleData).replace(/\$hmrDownloadUpdateHandlers\$/g,$.hmrDownloadUpdateHandlers).replace(/\$hmrInvalidateModuleHandlers\$/g,$.hmrInvalidateModuleHandlers)]):"// no HMR","",Oe?N.asString([`${$.hmrDownloadManifest} = function() {`,N.indent(["return new Promise(function(resolve, reject) {",N.indent([`var filename = require('path').join(__dirname, ${JSON.stringify(qe)} + ${$.getUpdateManifestFilename}());`,"require('fs').readFile(filename, 'utf-8', function(err, content) {",N.indent(["if(err) {",N.indent(['if(err.code === "ENOENT") return resolve();',"return reject(err);"]),"}","try { resolve(JSON.parse(content)); }","catch(e) { reject(e); }"]),"});"]),"});"]),"}"]):"// no HMR manifest"])}}v.exports=ReadFileChunkLoadingRuntimeModule},63582:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(12501);class ReadFileCompileAsyncWasmPlugin{constructor({type:v="async-node",import:E=false}={}){this._type=v;this._import=E}apply(v){v.hooks.thisCompilation.tap("ReadFileCompileAsyncWasmPlugin",(v=>{const E=v.outputOptions.wasmLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.wasmLoading!==undefined?R.wasmLoading:E;return $===this._type};const R=this._import?v=>j.asString(["Promise.all([import('fs'), import('url')]).then(([{ readFile }, { URL }]) => new Promise((resolve, reject) => {",j.indent([`readFile(new URL(${v}, import.meta.url), (err, buffer) => {`,j.indent(["if (err) return reject(err);","","// Fake fetch response","resolve({",j.indent(["arrayBuffer() { return buffer; }"]),"});"]),"});"]),"}))"]):v=>j.asString(["new Promise(function (resolve, reject) {",j.indent(["try {",j.indent(["var { readFile } = require('fs');","var { join } = require('path');","",`readFile(join(__dirname, ${v}), function(err, buffer){`,j.indent(["if (err) return reject(err);","","// Fake fetch response","resolve({",j.indent(["arrayBuffer() { return buffer; }"]),"});"]),"});"]),"} catch (err) { reject(err); }"]),"})"]);v.hooks.runtimeRequirementInTree.for($.instantiateWasm).tap("ReadFileCompileAsyncWasmPlugin",((E,j)=>{if(!isEnabledForChunk(E))return;const q=v.chunkGraph;if(!q.hasModuleInGraph(E,(v=>v.type==="webassembly/async"))){return}j.add($.publicPath);v.addRuntimeModule(E,new N({generateLoadBinaryCode:R,supportsStreaming:false}))}))}))}}v.exports=ReadFileCompileAsyncWasmPlugin},29023:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(16671);class ReadFileCompileWasmPlugin{constructor(v){this.options=v||{}}apply(v){v.hooks.thisCompilation.tap("ReadFileCompileWasmPlugin",(v=>{const E=v.outputOptions.wasmLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.wasmLoading!==undefined?R.wasmLoading:E;return $==="async-node"};const generateLoadBinaryCode=v=>j.asString(["new Promise(function (resolve, reject) {",j.indent(["var { readFile } = require('fs');","var { join } = require('path');","","try {",j.indent([`readFile(join(__dirname, ${v}), function(err, buffer){`,j.indent(["if (err) return reject(err);","","// Fake fetch response","resolve({",j.indent(["arrayBuffer() { return buffer; }"]),"});"]),"});"]),"} catch (err) { reject(err); }"]),"})"]);v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("ReadFileCompileWasmPlugin",((E,R)=>{if(!isEnabledForChunk(E))return;const j=v.chunkGraph;if(!j.hasModuleInGraph(E,(v=>v.type==="webassembly/sync"))){return}R.add($.moduleCache);v.addRuntimeModule(E,new N({generateLoadBinaryCode:generateLoadBinaryCode,supportsStreaming:false,mangleImports:this.options.mangleImports,runtimeRequirements:R}))}))}))}}v.exports=ReadFileCompileWasmPlugin},12001:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{chunkHasJs:q,getChunkFilenameTemplate:G}=R(36109);const{getInitialChunkIds:ie}=R(82695);const ae=R(73897);const{getUndoPath:ce}=R(20162);class RequireChunkLoadingRuntimeModule extends j{constructor(v){super("require chunk loading",j.STAGE_ATTACH);this.runtimeRequirements=v}_generateBaseUri(v,E){const R=v.getEntryOptions();if(R&&R.baseUri){return`${$.baseURI} = ${JSON.stringify(R.baseUri)};`}return`${$.baseURI} = require("url").pathToFileURL(${E!=="./"?`__dirname + ${JSON.stringify("/"+E)}`:"__filename"});`}generate(){const{chunkGraph:v,chunk:E}=this;const{runtimeTemplate:R}=this.compilation;const j=$.ensureChunkHandlers;const le=this.runtimeRequirements.has($.baseURI);const me=this.runtimeRequirements.has($.externalInstallChunk);const _e=this.runtimeRequirements.has($.onChunksLoaded);const Ie=this.runtimeRequirements.has($.ensureChunkHandlers);const Me=this.runtimeRequirements.has($.hmrDownloadUpdateHandlers);const Oe=this.runtimeRequirements.has($.hmrDownloadManifest);const Te=v.getChunkConditionMap(E,q);const Ne=ae(Te);const Be=ie(E,v,q);const Le=this.compilation.getPath(G(E,this.compilation.outputOptions),{chunk:E,contentHashType:"javascript"});const qe=ce(Le,this.compilation.outputOptions.path,true);const Ue=Me?`${$.hmrRuntimeStatePrefix}_require`:undefined;return N.asString([le?this._generateBaseUri(E,qe):"// no baseURI","","// object to store loaded chunks",'// "1" means "loaded", otherwise not loaded yet',`var installedChunks = ${Ue?`${Ue} = ${Ue} || `:""}{`,N.indent(Array.from(Be,(v=>`${JSON.stringify(v)}: 1`)).join(",\n")),"};","",_e?`${$.onChunksLoaded}.require = ${R.returningFunction("installedChunks[chunkId]","chunkId")};`:"// no on chunks loaded","",Ie||me?`var installChunk = ${R.basicFunction("chunk",["var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;","for(var moduleId in moreModules) {",N.indent([`if(${$.hasOwnProperty}(moreModules, moduleId)) {`,N.indent([`${$.moduleFactories}[moduleId] = moreModules[moduleId];`]),"}"]),"}",`if(runtime) runtime(__webpack_require__);`,"for(var i = 0; i < chunkIds.length; i++)",N.indent("installedChunks[chunkIds[i]] = 1;"),_e?`${$.onChunksLoaded}();`:""])};`:"// no chunk install function needed","",Ie?N.asString(["// require() chunk loading for javascript",`${j}.require = ${R.basicFunction("chunkId, promises",Ne!==false?['// "1" is the signal for "already loaded"',"if(!installedChunks[chunkId]) {",N.indent([Ne===true?"if(true) { // all chunks have JS":`if(${Ne("chunkId")}) {`,N.indent([`installChunk(require(${JSON.stringify(qe)} + ${$.getChunkScriptFilename}(chunkId)));`]),"} else installedChunks[chunkId] = 1;",""]),"}"]:"installedChunks[chunkId] = 1;")};`]):"// no chunk loading","",me?N.asString(["module.exports = __webpack_require__;",`${$.externalInstallChunk} = installChunk;`]):"// no external install chunk","",Me?N.asString(["function loadUpdateChunk(chunkId, updatedModulesList) {",N.indent([`var update = require(${JSON.stringify(qe)} + ${$.getChunkUpdateScriptFilename}(chunkId));`,"var updatedModules = update.modules;","var runtime = update.runtime;","for(var moduleId in updatedModules) {",N.indent([`if(${$.hasOwnProperty}(updatedModules, moduleId)) {`,N.indent([`currentUpdate[moduleId] = updatedModules[moduleId];`,"if(updatedModulesList) updatedModulesList.push(moduleId);"]),"}"]),"}","if(runtime) currentUpdateRuntime.push(runtime);"]),"}","",N.getFunctionContent(require("./JavascriptHotModuleReplacement.runtime.js")).replace(/\$key\$/g,"require").replace(/\$installedChunks\$/g,"installedChunks").replace(/\$loadUpdateChunk\$/g,"loadUpdateChunk").replace(/\$moduleCache\$/g,$.moduleCache).replace(/\$moduleFactories\$/g,$.moduleFactories).replace(/\$ensureChunkHandlers\$/g,$.ensureChunkHandlers).replace(/\$hasOwnProperty\$/g,$.hasOwnProperty).replace(/\$hmrModuleData\$/g,$.hmrModuleData).replace(/\$hmrDownloadUpdateHandlers\$/g,$.hmrDownloadUpdateHandlers).replace(/\$hmrInvalidateModuleHandlers\$/g,$.hmrInvalidateModuleHandlers)]):"// no HMR","",Oe?N.asString([`${$.hmrDownloadManifest} = function() {`,N.indent(["return Promise.resolve().then(function() {",N.indent([`return require(${JSON.stringify(qe)} + ${$.getUpdateManifestFilename}());`]),"})['catch'](function(err) { if(err.code !== 'MODULE_NOT_FOUND') throw err; });"]),"}"]):"// no HMR manifest"])}}v.exports=RequireChunkLoadingRuntimeModule},33796:function(v,E,R){"use strict";const $=R(73837);const j=R(77818);v.exports=({colors:v,appendOnly:E,stream:R})=>{let N=undefined;let q=false;let G="";let ie=0;const indent=(E,R,$,j)=>{if(E==="")return E;R=G+R;if(v){return R+$+E.replace(/\n/g,j+"\n"+R+$)+j}else{return R+E.replace(/\n/g,"\n"+R)}};const clearStatusMessage=()=>{if(q){R.write("\r");q=false}};const writeStatusMessage=()=>{if(!N)return;const v=R.columns;const E=v?j(N,v-1):N;const $=E.join(" ");const G=`${$}`;R.write(`\r${G}`);q=true};const writeColored=(v,E,j)=>(...N)=>{if(ie>0)return;clearStatusMessage();const q=indent($.format(...N),v,E,j);R.write(q+"\n");writeStatusMessage()};const ae=writeColored("<-> ","","");const ce=writeColored("<+> ","","");return{log:writeColored(" ","",""),debug:writeColored(" ","",""),trace:writeColored(" ","",""),info:writeColored(" ","",""),warn:writeColored(" ","",""),error:writeColored(" ","",""),logTime:writeColored(" ","",""),group:(...v)=>{ae(...v);if(ie>0){ie++}else{G+=" "}},groupCollapsed:(...v)=>{ce(...v);ie++},groupEnd:()=>{if(ie>0)ie--;else if(G.length>=2)G=G.slice(0,G.length-2)},profile:console.profile&&(v=>console.profile(v)),profileEnd:console.profileEnd&&(v=>console.profileEnd(v)),clear:!E&&console.clear&&(()=>{clearStatusMessage();console.clear();writeStatusMessage()}),status:E?writeColored(" ","",""):(v,...E)=>{E=E.filter(Boolean);if(v===undefined&&E.length===0){clearStatusMessage();N=undefined}else if(typeof v==="string"&&v.startsWith("[webpack.Progress] ")){N=[v.slice(19),...E];writeStatusMessage()}else if(v==="[webpack.Progress]"){N=[...E];writeStatusMessage()}else{N=[v,...E];writeStatusMessage()}}}}},88455:function(v,E,R){"use strict";const{STAGE_ADVANCED:$}=R(6267);class AggressiveMergingPlugin{constructor(v){if(v!==undefined&&typeof v!=="object"||Array.isArray(v)){throw new Error("Argument should be an options object. To use defaults, pass in nothing.\nFor more info on options, see https://webpack.js.org/plugins/")}this.options=v||{}}apply(v){const E=this.options;const R=E.minSizeReduce||1.5;v.hooks.thisCompilation.tap("AggressiveMergingPlugin",(v=>{v.hooks.optimizeChunks.tap({name:"AggressiveMergingPlugin",stage:$},(E=>{const $=v.chunkGraph;let j=[];for(const v of E){if(v.canBeInitial())continue;for(const R of E){if(R.canBeInitial())continue;if(R===v)break;if(!$.canChunksBeIntegrated(v,R)){continue}const E=$.getChunkSize(R,{chunkOverhead:0});const N=$.getChunkSize(v,{chunkOverhead:0});const q=$.getIntegratedChunksSize(R,v,{chunkOverhead:0});const G=(E+N)/q;j.push({a:v,b:R,improvement:G})}}j.sort(((v,E)=>E.improvement-v.improvement));const N=j[0];if(!N)return;if(N.improvementR(71013)),{name:"Aggressive Splitting Plugin",baseDataPath:"options"});const moveModuleBetween=(v,E,R)=>$=>{v.disconnectChunkAndModule(E,$);v.connectChunkAndModule(R,$)};const isNotAEntryModule=(v,E)=>R=>!v.isEntryModuleInChunk(R,E);const ce=new WeakSet;class AggressiveSplittingPlugin{constructor(v={}){ae(v);this.options=v;if(typeof this.options.minSize!=="number"){this.options.minSize=30*1024}if(typeof this.options.maxSize!=="number"){this.options.maxSize=50*1024}if(typeof this.options.chunkOverhead!=="number"){this.options.chunkOverhead=0}if(typeof this.options.entryChunkMultiplicator!=="number"){this.options.entryChunkMultiplicator=1}}static wasChunkRecorded(v){return ce.has(v)}apply(v){v.hooks.thisCompilation.tap("AggressiveSplittingPlugin",(E=>{let R=false;let G;let ae;let le;E.hooks.optimize.tap("AggressiveSplittingPlugin",(()=>{G=[];ae=new Set;le=new Map}));E.hooks.optimizeChunks.tap({name:"AggressiveSplittingPlugin",stage:$},(R=>{const $=E.chunkGraph;const ce=new Map;const me=new Map;const _e=ie.makePathsRelative.bindContextCache(v.context,v.root);for(const v of E.modules){const E=_e(v.identifier());ce.set(E,v);me.set(v,E)}const Ie=new Set;for(const v of R){Ie.add(v.id)}const Me=E.records&&E.records.aggressiveSplits||[];const Oe=G?Me.concat(G):Me;const Te=this.options.minSize;const Ne=this.options.maxSize;const applySplit=v=>{if(v.id!==undefined&&Ie.has(v.id)){return false}const R=v.modules.map((v=>ce.get(v)));if(!R.every(Boolean))return false;let N=0;for(const v of R)N+=v.size();if(N!==v.size)return false;const q=j(R.map((v=>new Set($.getModuleChunksIterable(v)))));if(q.size===0)return false;if(q.size===1&&$.getNumberOfChunkModules(Array.from(q)[0])===R.length){const E=Array.from(q)[0];if(ae.has(E))return false;ae.add(E);le.set(E,v);return true}const G=E.addChunk();G.chunkReason="aggressive splitted";for(const v of q){R.forEach(moveModuleBetween($,v,G));v.split(G);v.name=null}ae.add(G);le.set(G,v);if(v.id!==null&&v.id!==undefined){G.id=v.id;G.ids=[v.id]}return true};let Be=false;for(let v=0;v{const R=$.getChunkModulesSize(E)-$.getChunkModulesSize(v);if(R)return R;const j=$.getNumberOfChunkModules(v)-$.getNumberOfChunkModules(E);if(j)return j;return Le(v,E)}));for(const v of qe){if(ae.has(v))continue;const E=$.getChunkModulesSize(v);if(E>Ne&&$.getNumberOfChunkModules(v)>1){const E=$.getOrderedChunkModules(v,N).filter(isNotAEntryModule($,v));const R=[];let j=0;for(let v=0;vNe&&j>=Te){break}j=N;R.push($)}if(R.length===0)continue;const q={modules:R.map((v=>me.get(v))).sort(),size:j};if(applySplit(q)){G=(G||[]).concat(q);Be=true}}}if(Be)return true}));E.hooks.recordHash.tap("AggressiveSplittingPlugin",(v=>{const $=new Set;const j=new Set;for(const v of E.chunks){const E=le.get(v);if(E!==undefined){if(E.hash&&v.hash!==E.hash){j.add(E)}}}if(j.size>0){v.aggressiveSplits=v.aggressiveSplits.filter((v=>!j.has(v)));R=true}else{for(const v of E.chunks){const E=le.get(v);if(E!==undefined){E.hash=v.hash;E.id=v.id;$.add(E);ce.add(v)}}const N=E.records&&E.records.aggressiveSplits;if(N){for(const v of N){if(!j.has(v))$.add(v)}}v.aggressiveSplits=Array.from($);R=false}}));E.hooks.needAdditionalSeal.tap("AggressiveSplittingPlugin",(()=>{if(R){R=false;return true}}))}))}}v.exports=AggressiveSplittingPlugin},4272:function(v,E,R){"use strict";const $=R(77736);const j=R(41759);const{CachedSource:N,ConcatSource:q,ReplaceSource:G}=R(51255);const ie=R(81701);const{UsageState:ae}=R(13168);const ce=R(53840);const le=R(39201);const me=R(43841);const _e=R(58668);const Ie=R(33177);const{equals:Me}=R(28087);const Oe=R(96522);const{concatComparators:Te}=R(58792);const Ne=R(85205);const{makePathsRelative:Be}=R(20162);const Le=R(65764);const qe=R(67603);const{filterRuntime:Ue,intersectRuntime:Ge,mergeRuntimeCondition:He,mergeRuntimeConditionNonFalse:We,runtimeConditionToString:Qe,subtractRuntimeCondition:Je}=R(47462);const Ve=j;if(!Ve.prototype.PropertyDefinition){Ve.prototype.PropertyDefinition=Ve.prototype.Property}const Ke=new Set([ie.DEFAULT_EXPORT,ie.NAMESPACE_OBJECT_EXPORT,"abstract,arguments,async,await,boolean,break,byte,case,catch,char,class,const,continue","debugger,default,delete,do,double,else,enum,eval,export,extends,false,final,finally,float","for,function,goto,if,implements,import,in,instanceof,int,interface,let,long,native,new,null","package,private,protected,public,return,short,static,super,switch,synchronized,this,throw","throws,transient,true,try,typeof,var,void,volatile,while,with,yield","module,__dirname,__filename,exports,require,define","Array,Date,eval,function,hasOwnProperty,Infinity,isFinite,isNaN,isPrototypeOf,length,Math","NaN,name,Number,Object,prototype,String,toString,undefined,valueOf","alert,all,anchor,anchors,area,assign,blur,button,checkbox,clearInterval,clearTimeout","clientInformation,close,closed,confirm,constructor,crypto,decodeURI,decodeURIComponent","defaultStatus,document,element,elements,embed,embeds,encodeURI,encodeURIComponent,escape","event,fileUpload,focus,form,forms,frame,innerHeight,innerWidth,layer,layers,link,location","mimeTypes,navigate,navigator,frames,frameRate,hidden,history,image,images,offscreenBuffering","open,opener,option,outerHeight,outerWidth,packages,pageXOffset,pageYOffset,parent,parseFloat","parseInt,password,pkcs11,plugin,prompt,propertyIsEnum,radio,reset,screenX,screenY,scroll","secure,select,self,setInterval,setTimeout,status,submit,taint,text,textarea,top,unescape","untaint,window","onblur,onclick,onerror,onfocus,onkeydown,onkeypress,onkeyup,onmouseover,onload,onmouseup,onmousedown,onsubmit"].join(",").split(","));const createComparator=(v,E)=>(R,$)=>E(R[v],$[v]);const compareNumbers=(v,E)=>{if(isNaN(v)){if(!isNaN(E)){return 1}}else{if(isNaN(E)){return-1}if(v!==E){return v{let E="";let R=true;for(const $ of v){if(R){R=false}else{E+=", "}E+=$}return E};const getFinalBinding=(v,E,R,$,j,N,q,G,ie,ae,ce,le=new Set)=>{const _e=E.module.getExportsType(v,ae);if(R.length===0){switch(_e){case"default-only":E.interopNamespaceObject2Used=true;return{info:E,rawName:E.interopNamespaceObject2Name,ids:R,exportName:R};case"default-with-named":E.interopNamespaceObjectUsed=true;return{info:E,rawName:E.interopNamespaceObjectName,ids:R,exportName:R};case"namespace":case"dynamic":break;default:throw new Error(`Unexpected exportsType ${_e}`)}}else{switch(_e){case"namespace":break;case"default-with-named":switch(R[0]){case"default":R=R.slice(1);break;case"__esModule":return{info:E,rawName:"/* __esModule */true",ids:R.slice(1),exportName:R}}break;case"default-only":{const v=R[0];if(v==="__esModule"){return{info:E,rawName:"/* __esModule */true",ids:R.slice(1),exportName:R}}R=R.slice(1);if(v!=="default"){return{info:E,rawName:"/* non-default import from default-exporting module */undefined",ids:R,exportName:R}}break}case"dynamic":switch(R[0]){case"default":{R=R.slice(1);E.interopDefaultAccessUsed=true;const v=ie?`${E.interopDefaultAccessName}()`:ce?`(${E.interopDefaultAccessName}())`:ce===false?`;(${E.interopDefaultAccessName}())`:`${E.interopDefaultAccessName}.a`;return{info:E,rawName:v,ids:R,exportName:R}}case"__esModule":return{info:E,rawName:"/* __esModule */true",ids:R.slice(1),exportName:R}}break;default:throw new Error(`Unexpected exportsType ${_e}`)}}if(R.length===0){switch(E.type){case"concatenated":G.add(E);return{info:E,rawName:E.namespaceObjectName,ids:R,exportName:R};case"external":return{info:E,rawName:E.name,ids:R,exportName:R}}}const Ie=v.getExportsInfo(E.module);const Oe=Ie.getExportInfo(R[0]);if(le.has(Oe)){return{info:E,rawName:"/* circular reexport */ Object(function x() { x() }())",ids:[],exportName:R}}le.add(Oe);switch(E.type){case"concatenated":{const ae=R[0];if(Oe.provided===false){G.add(E);return{info:E,rawName:E.namespaceObjectName,ids:R,exportName:R}}const me=E.exportMap&&E.exportMap.get(ae);if(me){const v=Ie.getUsedName(R,j);if(!v){return{info:E,rawName:"/* unused export */ undefined",ids:R.slice(1),exportName:R}}return{info:E,name:me,ids:v.slice(1),exportName:R}}const _e=E.rawExportMap&&E.rawExportMap.get(ae);if(_e){return{info:E,rawName:_e,ids:R.slice(1),exportName:R}}const Me=Oe.findTarget(v,(v=>$.has(v)));if(Me===false){throw new Error(`Target module of reexport from '${E.module.readableIdentifier(N)}' is not part of the concatenation (export '${ae}')\nModules in the concatenation:\n${Array.from($,(([v,E])=>` * ${E.type} ${v.readableIdentifier(N)}`)).join("\n")}`)}if(Me){const ae=$.get(Me.module);return getFinalBinding(v,ae,Me.export?[...Me.export,...R.slice(1)]:R.slice(1),$,j,N,q,G,ie,E.module.buildMeta.strictHarmonyModule,ce,le)}if(E.namespaceExportSymbol){const v=Ie.getUsedName(R,j);return{info:E,rawName:E.namespaceObjectName,ids:v,exportName:R}}throw new Error(`Cannot get final name for export '${R.join(".")}' of ${E.module.readableIdentifier(N)}`)}case"external":{const v=Ie.getUsedName(R,j);if(!v){return{info:E,rawName:"/* unused export */ undefined",ids:R.slice(1),exportName:R}}const $=Me(v,R)?"":me.toNormalComment(`${R.join(".")}`);return{info:E,rawName:E.name+$,ids:v,exportName:R}}}};const getFinalName=(v,E,R,$,j,N,q,G,ie,ae,ce,le)=>{const me=getFinalBinding(v,E,R,$,j,N,q,G,ie,ce,le);{const{ids:v,comment:E}=me;let R;let $;if("rawName"in me){R=`${me.rawName}${E||""}${qe(v)}`;$=v.length>0}else{const{info:j,name:q}=me;const G=j.internalNames.get(q);if(!G){throw new Error(`The export "${q}" in "${j.module.readableIdentifier(N)}" has no internal name (existing names: ${Array.from(j.internalNames,(([v,E])=>`${v}: ${E}`)).join(", ")||"none"})`)}R=`${G}${E||""}${qe(v)}`;$=v.length>1}if($&&ie&&ae===false){return le?`(0,${R})`:le===false?`;(0,${R})`:`/*#__PURE__*/Object(${R})`}return R}};const addScopeSymbols=(v,E,R,$)=>{let j=v;while(j){if(R.has(j))break;if($.has(j))break;R.add(j);for(const v of j.variables){E.add(v.name)}j=j.upper}};const getAllReferences=v=>{let E=v.references;const R=new Set(v.identifiers);for(const $ of v.scope.childScopes){for(const v of $.variables){if(v.identifiers.some((v=>R.has(v)))){E=E.concat(v.references);break}}}return E};const getPathInAst=(v,E)=>{if(v===E){return[]}const R=E.range;const enterNode=v=>{if(!v)return undefined;const $=v.range;if($){if($[0]<=R[0]&&$[1]>=R[1]){const R=getPathInAst(v,E);if(R){R.push(v);return R}}}return undefined};if(Array.isArray(v)){for(let E=0;E!(v instanceof _e)||!this._modules.has(E.moduleGraph.getModule(v))))){this.dependencies.push(R)}for(const E of v.blocks){this.blocks.push(E)}const R=v.getWarnings();if(R!==undefined){for(const v of R){this.addWarning(v)}}const $=v.getErrors();if($!==undefined){for(const v of $){this.addError(v)}}if(v.buildInfo.topLevelDeclarations){const E=this.buildInfo.topLevelDeclarations;if(E!==undefined){for(const R of v.buildInfo.topLevelDeclarations){E.add(R)}}}else{this.buildInfo.topLevelDeclarations=undefined}if(v.buildInfo.assets){if(this.buildInfo.assets===undefined){this.buildInfo.assets=Object.create(null)}Object.assign(this.buildInfo.assets,v.buildInfo.assets)}if(v.buildInfo.assetsInfo){if(this.buildInfo.assetsInfo===undefined){this.buildInfo.assetsInfo=new Map}for(const[E,R]of v.buildInfo.assetsInfo){this.buildInfo.assetsInfo.set(E,R)}}}j()}size(v){let E=0;for(const R of this._modules){E+=R.size(v)}return E}_createConcatenationList(v,E,R,$){const j=[];const N=new Map;const getConcatenatedImports=E=>{let j=Array.from($.getOutgoingConnections(E));if(E===v){for(const v of $.getOutgoingConnections(this))j.push(v)}const N=j.filter((v=>{if(!(v.dependency instanceof _e))return false;return v&&v.resolvedOriginModule===E&&v.module&&v.isTargetActive(R)})).map((v=>{const E=v.dependency;return{connection:v,sourceOrder:E.sourceOrder,rangeStart:E.range&&E.range[0]}}));N.sort(Te(Xe,Ye));const q=new Map;for(const{connection:v}of N){const E=Ue(R,(E=>v.isTargetActive(E)));if(E===false)continue;const $=v.module;const j=q.get($);if(j===undefined){q.set($,{connection:v,runtimeCondition:E});continue}j.runtimeCondition=We(j.runtimeCondition,E,R)}return q.values()};const enterModule=(v,$)=>{const q=v.module;if(!q)return;const G=N.get(q);if(G===true){return}if(E.has(q)){N.set(q,true);if($!==true){throw new Error(`Cannot runtime-conditional concatenate a module (${q.identifier()} in ${this.rootModule.identifier()}, ${Qe($)}). This should not happen.`)}const E=getConcatenatedImports(q);for(const{connection:v,runtimeCondition:R}of E)enterModule(v,R);j.push({type:"concatenated",module:v.module,runtimeCondition:$})}else{if(G!==undefined){const E=Je($,G,R);if(E===false)return;$=E;N.set(v.module,We(G,$,R))}else{N.set(v.module,$)}if(j.length>0){const E=j[j.length-1];if(E.type==="external"&&E.module===v.module){E.runtimeCondition=He(E.runtimeCondition,$,R);return}}j.push({type:"external",get module(){return v.module},runtimeCondition:$})}};N.set(v,true);const q=getConcatenatedImports(v);for(const{connection:v,runtimeCondition:E}of q)enterModule(v,E);j.push({type:"concatenated",module:v,runtimeCondition:true});return j}static _createIdentifier(v,E,R,$="md4"){const j=Be.bindContextCache(v.context,R);let N=[];for(const v of E){N.push(j(v.identifier()))}N.sort();const q=Ne($);q.update(N.join(" "));return v.identifier()+"|"+q.digest("hex")}addCacheDependencies(v,E,R,$){for(const j of this._modules){j.addCacheDependencies(v,E,R,$)}}codeGeneration({dependencyTemplates:v,runtimeTemplate:E,moduleGraph:R,chunkGraph:$,runtime:j,codeGenerationResults:G}){const ce=new Set;const me=Ge(j,this._runtime);const _e=E.requestShortener;const[Ie,Me]=this._getModulesWithInfo(R,me);const Oe=new Set;for(const j of Me.values()){this._analyseModule(Me,j,v,E,R,$,me,G)}const Te=new Set(Ke);const Ne=new Set;const Be=new Map;const getUsedNamesInScopeInfo=(v,E)=>{const R=`${v}-${E}`;let $=Be.get(R);if($===undefined){$={usedNames:new Set,alreadyCheckedScopes:new Set};Be.set(R,$)}return $};const Le=new Set;for(const v of Ie){if(v.type==="concatenated"){if(v.moduleScope){Le.add(v.moduleScope)}const $=new WeakMap;const getSuperClassExpressions=v=>{const E=$.get(v);if(E!==undefined)return E;const R=[];for(const E of v.childScopes){if(E.type!=="class")continue;const v=E.block;if((v.type==="ClassDeclaration"||v.type==="ClassExpression")&&v.superClass){R.push({range:v.superClass.range,variables:E.variables})}}$.set(v,R);return R};if(v.globalScope){for(const $ of v.globalScope.through){const j=$.identifier.name;if(ie.isModuleReference(j)){const N=ie.matchModuleReference(j);if(!N)continue;const q=Ie[N.index];if(q.type==="reference")throw new Error("Module reference can't point to a reference");const G=getFinalBinding(R,q,N.ids,Me,me,_e,E,Oe,false,v.module.buildMeta.strictHarmonyModule,true);if(!G.ids)continue;const{usedNames:ae,alreadyCheckedScopes:ce}=getUsedNamesInScopeInfo(G.info.module.identifier(),"name"in G?G.name:"");for(const v of getSuperClassExpressions($.from)){if(v.range[0]<=$.identifier.range[0]&&v.range[1]>=$.identifier.range[1]){for(const E of v.variables){ae.add(E.name)}}}addScopeSymbols($.from,ae,ce,Le)}else{Te.add(j)}}}}}for(const v of Me.values()){const{usedNames:E}=getUsedNamesInScopeInfo(v.module.identifier(),"");switch(v.type){case"concatenated":{for(const E of v.moduleScope.variables){const R=E.name;const{usedNames:$,alreadyCheckedScopes:j}=getUsedNamesInScopeInfo(v.module.identifier(),R);if(Te.has(R)||$.has(R)){const N=getAllReferences(E);for(const v of N){addScopeSymbols(v.from,$,j,Le)}const q=this.findNewName(R,Te,$,v.module.readableIdentifier(_e));Te.add(q);v.internalNames.set(R,q);Ne.add(q);const G=v.source;const ie=new Set(N.map((v=>v.identifier)).concat(E.identifiers));for(const E of ie){const R=E.range;const $=getPathInAst(v.ast,E);if($&&$.length>1){const v=$[1].type==="AssignmentPattern"&&$[1].left===$[0]?$[2]:$[1];if(v.type==="Property"&&v.shorthand){G.insert(R[1],`: ${q}`);continue}}G.replace(R[0],R[1]-1,q)}}else{Te.add(R);v.internalNames.set(R,R);Ne.add(R)}}let R;if(v.namespaceExportSymbol){R=v.internalNames.get(v.namespaceExportSymbol)}else{R=this.findNewName("namespaceObject",Te,E,v.module.readableIdentifier(_e));Te.add(R)}v.namespaceObjectName=R;Ne.add(R);break}case"external":{const R=this.findNewName("",Te,E,v.module.readableIdentifier(_e));Te.add(R);v.name=R;Ne.add(R);break}}if(v.module.buildMeta.exportsType!=="namespace"){const R=this.findNewName("namespaceObject",Te,E,v.module.readableIdentifier(_e));Te.add(R);v.interopNamespaceObjectName=R;Ne.add(R)}if(v.module.buildMeta.exportsType==="default"&&v.module.buildMeta.defaultObject!=="redirect"){const R=this.findNewName("namespaceObject2",Te,E,v.module.readableIdentifier(_e));Te.add(R);v.interopNamespaceObject2Name=R;Ne.add(R)}if(v.module.buildMeta.exportsType==="dynamic"||!v.module.buildMeta.exportsType){const R=this.findNewName("default",Te,E,v.module.readableIdentifier(_e));Te.add(R);v.interopDefaultAccessName=R;Ne.add(R)}}for(const v of Me.values()){if(v.type==="concatenated"){for(const $ of v.globalScope.through){const j=$.identifier.name;const N=ie.matchModuleReference(j);if(N){const j=Ie[N.index];if(j.type==="reference")throw new Error("Module reference can't point to a reference");const q=getFinalName(R,j,N.ids,Me,me,_e,E,Oe,N.call,!N.directImport,v.module.buildMeta.strictHarmonyModule,N.asiSafe);const G=$.identifier.range;const ie=v.source;ie.replace(G[0],G[1]+1,q)}}}}const qe=new Map;const Ue=new Set;const He=Me.get(this.rootModule);const We=He.module.buildMeta.strictHarmonyModule;const Qe=R.getExportsInfo(He.module);for(const v of Qe.orderedExports){const $=v.name;if(v.provided===false)continue;const j=v.getUsedName(undefined,me);if(!j){Ue.add($);continue}qe.set(j,(N=>{try{const j=getFinalName(R,He,[$],Me,me,N,E,Oe,false,false,We,true);return`/* ${v.isReexport()?"reexport":"binding"} */ ${j}`}catch(v){v.message+=`\nwhile generating the root export '${$}' (used name: '${j}')`;throw v}}))}const Je=new q;if(R.getExportsInfo(this).otherExportsInfo.getUsed(me)!==ae.Unused){Je.add(`// ESM COMPAT FLAG\n`);Je.add(E.defineEsModuleFlagStatement({exportsArgument:this.exportsArgument,runtimeRequirements:ce}))}if(qe.size>0){ce.add(le.exports);ce.add(le.definePropertyGetters);const v=[];for(const[R,$]of qe){v.push(`\n ${JSON.stringify(R)}: ${E.returningFunction($(_e))}`)}Je.add(`\n// EXPORTS\n`);Je.add(`${le.definePropertyGetters}(${this.exportsArgument}, {${v.join(",")}\n});\n`)}if(Ue.size>0){Je.add(`\n// UNUSED EXPORTS: ${joinIterableWithComma(Ue)}\n`)}const Ve=new Map;for(const v of Oe){if(v.namespaceExportSymbol)continue;const $=[];const j=R.getExportsInfo(v.module);for(const N of j.orderedExports){if(N.provided===false)continue;const j=N.getUsedName(undefined,me);if(j){const q=getFinalName(R,v,[N.name],Me,me,_e,E,Oe,false,undefined,v.module.buildMeta.strictHarmonyModule,true);$.push(`\n ${JSON.stringify(j)}: ${E.returningFunction(q)}`)}}const N=v.namespaceObjectName;const q=$.length>0?`${le.definePropertyGetters}(${N}, {${$.join(",")}\n});\n`:"";if($.length>0)ce.add(le.definePropertyGetters);Ve.set(v,`\n// NAMESPACE OBJECT: ${v.module.readableIdentifier(_e)}\nvar ${N} = {};\n${le.makeNamespaceObject}(${N});\n${q}`);ce.add(le.makeNamespaceObject)}for(const v of Ie){if(v.type==="concatenated"){const E=Ve.get(v);if(!E)continue;Je.add(E)}}const Xe=[];for(const v of Ie){let R;let j=false;const N=v.type==="reference"?v.target:v;switch(N.type){case"concatenated":{Je.add(`\n;// CONCATENATED MODULE: ${N.module.readableIdentifier(_e)}\n`);Je.add(N.source);if(N.chunkInitFragments){for(const v of N.chunkInitFragments)Xe.push(v)}if(N.runtimeRequirements){for(const v of N.runtimeRequirements){ce.add(v)}}R=N.namespaceObjectName;break}case"external":{Je.add(`\n// EXTERNAL MODULE: ${N.module.readableIdentifier(_e)}\n`);ce.add(le.require);const{runtimeCondition:q}=v;const G=E.runtimeConditionExpression({chunkGraph:$,runtimeCondition:q,runtime:me,runtimeRequirements:ce});if(G!=="true"){j=true;Je.add(`if (${G}) {\n`)}Je.add(`var ${N.name} = __webpack_require__(${JSON.stringify($.getModuleId(N.module))});`);R=N.name;break}default:throw new Error(`Unsupported concatenation entry type ${N.type}`)}if(N.interopNamespaceObjectUsed){ce.add(le.createFakeNamespaceObject);Je.add(`\nvar ${N.interopNamespaceObjectName} = /*#__PURE__*/${le.createFakeNamespaceObject}(${R}, 2);`)}if(N.interopNamespaceObject2Used){ce.add(le.createFakeNamespaceObject);Je.add(`\nvar ${N.interopNamespaceObject2Name} = /*#__PURE__*/${le.createFakeNamespaceObject}(${R});`)}if(N.interopDefaultAccessUsed){ce.add(le.compatGetDefaultExport);Je.add(`\nvar ${N.interopDefaultAccessName} = /*#__PURE__*/${le.compatGetDefaultExport}(${R});`)}if(j){Je.add("\n}")}}const Ye=new Map;if(Xe.length>0)Ye.set("chunkInitFragments",Xe);Ye.set("topLevelDeclarations",Ne);const Ze={sources:new Map([["javascript",new N(Je)]]),data:Ye,runtimeRequirements:ce};return Ze}_analyseModule(v,E,R,j,N,q,ae,ce){if(E.type==="concatenated"){const le=E.module;try{const me=new ie(v,E);const _e=le.codeGeneration({dependencyTemplates:R,runtimeTemplate:j,moduleGraph:N,chunkGraph:q,runtime:ae,concatenationScope:me,codeGenerationResults:ce,sourceTypes:Ze});const Me=_e.sources.get("javascript");const Oe=_e.data;const Te=Oe&&Oe.get("chunkInitFragments");const Ne=Me.source().toString();let Be;try{Be=Ie._parse(Ne,{sourceType:"module"})}catch(v){if(v.loc&&typeof v.loc==="object"&&typeof v.loc.line==="number"){const E=v.loc.line;const R=Ne.split("\n");v.message+="\n| "+R.slice(Math.max(0,E-3),E+2).join("\n| ")}throw v}const Le=$.analyze(Be,{ecmaVersion:6,sourceType:"module",optimistic:true,ignoreEval:true,impliedStrict:true});const qe=Le.acquire(Be);const Ue=qe.childScopes[0];const Ge=new G(Me);E.runtimeRequirements=_e.runtimeRequirements;E.ast=Be;E.internalSource=Me;E.source=Ge;E.chunkInitFragments=Te;E.globalScope=qe;E.moduleScope=Ue}catch(v){v.message+=`\nwhile analyzing module ${le.identifier()} for concatenation`;throw v}}}_getModulesWithInfo(v,E){const R=this._createConcatenationList(this.rootModule,this._modules,E,v);const $=new Map;const j=R.map(((v,E)=>{let R=$.get(v.module);if(R===undefined){switch(v.type){case"concatenated":R={type:"concatenated",module:v.module,index:E,ast:undefined,internalSource:undefined,runtimeRequirements:undefined,source:undefined,globalScope:undefined,moduleScope:undefined,internalNames:new Map,exportMap:undefined,rawExportMap:undefined,namespaceExportSymbol:undefined,namespaceObjectName:undefined,interopNamespaceObjectUsed:false,interopNamespaceObjectName:undefined,interopNamespaceObject2Used:false,interopNamespaceObject2Name:undefined,interopDefaultAccessUsed:false,interopDefaultAccessName:undefined};break;case"external":R={type:"external",module:v.module,runtimeCondition:v.runtimeCondition,index:E,name:undefined,interopNamespaceObjectUsed:false,interopNamespaceObjectName:undefined,interopNamespaceObject2Used:false,interopNamespaceObject2Name:undefined,interopDefaultAccessUsed:false,interopDefaultAccessName:undefined};break;default:throw new Error(`Unsupported concatenation entry type ${v.type}`)}$.set(R.module,R);return R}else{const E={type:"reference",runtimeCondition:v.runtimeCondition,target:R};return E}}));return[j,$]}findNewName(v,E,R,$){let j=v;if(j===ie.DEFAULT_EXPORT){j=""}if(j===ie.NAMESPACE_OBJECT_EXPORT){j="namespaceObject"}$=$.replace(/\.+\/|(\/index)?\.([a-zA-Z0-9]{1,4})($|\s|\?)|\s*\+\s*\d+\s*modules/g,"");const N=$.split("/");while(N.length){j=N.pop()+(j?"_"+j:"");const v=me.toIdentifier(j);if(!E.has(v)&&(!R||!R.has(v)))return v}let q=0;let G=me.toIdentifier(`${j}_${q}`);while(E.has(G)||R&&R.has(G)){q++;G=me.toIdentifier(`${j}_${q}`)}return G}updateHash(v,E){const{chunkGraph:R,runtime:$}=E;for(const j of this._createConcatenationList(this.rootModule,this._modules,Ge($,this._runtime),R.moduleGraph)){switch(j.type){case"concatenated":j.module.updateHash(v,E);break;case"external":v.update(`${R.getModuleId(j.module)}`);break}}super.updateHash(v,E)}static deserialize(v){const E=new ConcatenatedModule({identifier:undefined,rootModule:undefined,modules:undefined,runtime:undefined});E.deserialize(v);return E}}Le(ConcatenatedModule,"webpack/lib/optimize/ConcatenatedModule");v.exports=ConcatenatedModule},59869:function(v,E,R){"use strict";const{STAGE_BASIC:$}=R(6267);class EnsureChunkConditionsPlugin{apply(v){v.hooks.compilation.tap("EnsureChunkConditionsPlugin",(v=>{const handler=E=>{const R=v.chunkGraph;const $=new Set;const j=new Set;for(const E of v.modules){if(!E.hasChunkCondition())continue;for(const N of R.getModuleChunksIterable(E)){if(!E.chunkCondition(N,v)){$.add(N);for(const v of N.groupsIterable){j.add(v)}}}if($.size===0)continue;const N=new Set;e:for(const R of j){for(const $ of R.chunks){if(E.chunkCondition($,v)){N.add($);continue e}}if(R.isInitial()){throw new Error("Cannot fullfil chunk condition of "+E.identifier())}for(const v of R.parentsIterable){j.add(v)}}for(const v of $){R.disconnectChunkAndModule(v,E)}for(const v of N){R.connectChunkAndModule(v,E)}$.clear();j.clear()}};v.hooks.optimizeChunks.tap({name:"EnsureChunkConditionsPlugin",stage:$},handler)}))}}v.exports=EnsureChunkConditionsPlugin},58794:function(v){"use strict";class FlagIncludedChunksPlugin{apply(v){v.hooks.compilation.tap("FlagIncludedChunksPlugin",(v=>{v.hooks.optimizeChunkIds.tap("FlagIncludedChunksPlugin",(E=>{const R=v.chunkGraph;const $=new WeakMap;const j=v.modules.size;const N=1/Math.pow(1/j,1/31);const q=Array.from({length:31},((v,E)=>Math.pow(N,E)|0));let G=0;for(const E of v.modules){let v=30;while(G%q[v]!==0){v--}$.set(E,1<R.getNumberOfModuleChunks(E))j=E}e:for(const N of R.getModuleChunksIterable(j)){if(v===N)continue;const j=R.getNumberOfChunkModules(N);if(j===0)continue;if($>j)continue;const q=ie.get(N);if((q&E)!==E)continue;for(const E of R.getChunkModulesIterable(v)){if(!R.isModuleInChunk(E,N))continue e}N.ids.push(v.id)}}}))}))}}v.exports=FlagIncludedChunksPlugin},39236:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const j=new WeakMap;const N=Symbol("top level symbol");function getState(v){return j.get(v)}E.bailout=v=>{j.set(v,false)};E.enable=v=>{const E=j.get(v);if(E===false){return}j.set(v,{innerGraph:new Map,currentTopLevelSymbol:undefined,usageCallbackMap:new Map})};E.isEnabled=v=>{const E=j.get(v);return!!E};E.addUsage=(v,E,R)=>{const $=getState(v);if($){const{innerGraph:v}=$;const j=v.get(E);if(R===true){v.set(E,true)}else if(j===undefined){v.set(E,new Set([R]))}else if(j!==true){j.add(R)}}};E.addVariableUsage=(v,R,$)=>{const j=v.getTagData(R,N)||E.tagTopLevelSymbol(v,R);if(j){E.addUsage(v.state,j,$)}};E.inferDependencyUsage=v=>{const E=getState(v);if(!E){return}const{innerGraph:R,usageCallbackMap:$}=E;const j=new Map;const N=new Set(R.keys());while(N.size>0){for(const v of N){let E=new Set;let $=true;const q=R.get(v);let G=j.get(v);if(G===undefined){G=new Set;j.set(v,G)}if(q!==true&&q!==undefined){for(const v of q){G.add(v)}for(const j of q){if(typeof j==="string"){E.add(j)}else{const N=R.get(j);if(N===true){E=true;break}if(N!==undefined){for(const R of N){if(R===v)continue;if(G.has(R))continue;E.add(R);if(typeof R!=="string"){$=false}}}}}if(E===true){R.set(v,true)}else if(E.size===0){R.set(v,undefined)}else{R.set(v,E)}}if($){N.delete(v);if(v===null){const v=R.get(null);if(v){for(const[E,$]of R){if(E!==null&&$!==true){if(v===true){R.set(E,true)}else{const j=new Set($);for(const E of v){j.add(E)}R.set(E,j)}}}}}}}}for(const[v,E]of $){const $=R.get(v);for(const v of E){v($===undefined?false:$)}}};E.onUsage=(v,E)=>{const R=getState(v);if(R){const{usageCallbackMap:v,currentTopLevelSymbol:$}=R;if($){let R=v.get($);if(R===undefined){R=new Set;v.set($,R)}R.add(E)}else{E(true)}}else{E(undefined)}};E.setTopLevelSymbol=(v,E)=>{const R=getState(v);if(R){R.currentTopLevelSymbol=E}};E.getTopLevelSymbol=v=>{const E=getState(v);if(E){return E.currentTopLevelSymbol}};E.tagTopLevelSymbol=(v,E)=>{const R=getState(v.state);if(!R)return;v.defineVariable(E);const $=v.getTagData(E,N);if($){return $}const j=new TopLevelSymbol(E);v.tagVariable(E,N,j);return j};E.isDependencyUsedByExports=(v,E,R,j)=>{if(E===false)return false;if(E!==true&&E!==undefined){const N=R.getParentModule(v);const q=R.getExportsInfo(N);let G=false;for(const v of E){if(q.getUsed(v,j)!==$.Unused)G=true}if(!G)return false}return true};E.getDependencyUsedByExportsCondition=(v,E,R)=>{if(E===false)return false;if(E!==true&&E!==undefined){const j=R.getParentModule(v);const N=R.getExportsInfo(j);return(v,R)=>{for(const v of E){if(N.getUsed(v,R)!==$.Unused)return true}return false}}return null};class TopLevelSymbol{constructor(v){this.name=v}}E.TopLevelSymbol=TopLevelSymbol;E.topLevelSymbolTag=N},69129:function(v,E,R){"use strict";const $=R(72926);const j=R(39236);const{topLevelSymbolTag:N}=j;class InnerGraphPlugin{apply(v){v.hooks.compilation.tap("InnerGraphPlugin",((v,{normalModuleFactory:E})=>{const R=v.getLogger("webpack.InnerGraphPlugin");v.dependencyTemplates.set($,new $.Template);const handler=(v,E)=>{const onUsageSuper=E=>{j.onUsage(v.state,(R=>{switch(R){case undefined:case true:return;default:{const j=new $(E.range);j.loc=E.loc;j.usedByExports=R;v.state.module.addDependency(j);break}}}))};v.hooks.program.tap("InnerGraphPlugin",(()=>{j.enable(v.state)}));v.hooks.finish.tap("InnerGraphPlugin",(()=>{if(!j.isEnabled(v.state))return;R.time("infer dependency usage");j.inferDependencyUsage(v.state);R.timeAggregate("infer dependency usage")}));const q=new WeakMap;const G=new WeakMap;const ie=new WeakMap;const ae=new WeakMap;const ce=new WeakSet;v.hooks.preStatement.tap("InnerGraphPlugin",(E=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){if(E.type==="FunctionDeclaration"){const R=E.id?E.id.name:"*default*";const $=j.tagTopLevelSymbol(v,R);q.set(E,$);return true}}}));v.hooks.blockPreStatement.tap("InnerGraphPlugin",(E=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){if(E.type==="ClassDeclaration"){const R=E.id?E.id.name:"*default*";const $=j.tagTopLevelSymbol(v,R);ie.set(E,$);return true}if(E.type==="ExportDefaultDeclaration"){const R="*default*";const $=j.tagTopLevelSymbol(v,R);const N=E.declaration;if(N.type==="ClassExpression"||N.type==="ClassDeclaration"){ie.set(N,$)}else if(v.isPure(N,E.range[0])){q.set(E,$);if(!N.type.endsWith("FunctionExpression")&&!N.type.endsWith("Declaration")&&N.type!=="Literal"){G.set(E,N)}}}}}));v.hooks.preDeclarator.tap("InnerGraphPlugin",((E,R)=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true&&E.init&&E.id.type==="Identifier"){const R=E.id.name;if(E.init.type==="ClassExpression"){const $=j.tagTopLevelSymbol(v,R);ie.set(E.init,$)}else if(v.isPure(E.init,E.id.range[1])){const $=j.tagTopLevelSymbol(v,R);ae.set(E,$);if(!E.init.type.endsWith("FunctionExpression")&&E.init.type!=="Literal"){ce.add(E)}return true}}}));v.hooks.statement.tap("InnerGraphPlugin",(E=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){j.setTopLevelSymbol(v.state,undefined);const R=q.get(E);if(R){j.setTopLevelSymbol(v.state,R);const N=G.get(E);if(N){j.onUsage(v.state,(R=>{switch(R){case undefined:case true:return;default:{const j=new $(N.range);j.loc=E.loc;j.usedByExports=R;v.state.module.addDependency(j);break}}}))}}}}));v.hooks.classExtendsExpression.tap("InnerGraphPlugin",((E,R)=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){const $=ie.get(R);if($&&v.isPure(E,R.id?R.id.range[1]:R.range[0])){j.setTopLevelSymbol(v.state,$);onUsageSuper(E)}}}));v.hooks.classBodyElement.tap("InnerGraphPlugin",((E,R)=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){const E=ie.get(R);if(E){j.setTopLevelSymbol(v.state,undefined)}}}));v.hooks.classBodyValue.tap("InnerGraphPlugin",((E,R,N)=>{if(!j.isEnabled(v.state))return;if(v.scope.topLevelScope===true){const q=ie.get(N);if(q){if(!R.static||v.isPure(E,R.key?R.key.range[1]:R.range[0])){j.setTopLevelSymbol(v.state,q);if(R.type!=="MethodDefinition"&&R.static){j.onUsage(v.state,(R=>{switch(R){case undefined:case true:return;default:{const j=new $(E.range);j.loc=E.loc;j.usedByExports=R;v.state.module.addDependency(j);break}}}))}}else{j.setTopLevelSymbol(v.state,undefined)}}}}));v.hooks.declarator.tap("InnerGraphPlugin",((E,R)=>{if(!j.isEnabled(v.state))return;const N=ae.get(E);if(N){j.setTopLevelSymbol(v.state,N);if(ce.has(E)){if(E.init.type==="ClassExpression"){if(E.init.superClass){onUsageSuper(E.init.superClass)}}else{j.onUsage(v.state,(R=>{switch(R){case undefined:case true:return;default:{const j=new $(E.init.range);j.loc=E.loc;j.usedByExports=R;v.state.module.addDependency(j);break}}}))}}v.walkExpression(E.init);j.setTopLevelSymbol(v.state,undefined);return true}}));v.hooks.expression.for(N).tap("InnerGraphPlugin",(()=>{const E=v.currentTagData;const R=j.getTopLevelSymbol(v.state);j.addUsage(v.state,E,R||true)}));v.hooks.assign.for(N).tap("InnerGraphPlugin",(E=>{if(!j.isEnabled(v.state))return;if(E.operator==="=")return true}))};E.hooks.parser.for("javascript/auto").tap("InnerGraphPlugin",handler);E.hooks.parser.for("javascript/esm").tap("InnerGraphPlugin",handler);v.hooks.finishModules.tap("InnerGraphPlugin",(()=>{R.timeAggregateEnd("infer dependency usage")}))}))}}v.exports=InnerGraphPlugin},96049:function(v,E,R){"use strict";const{STAGE_ADVANCED:$}=R(6267);const j=R(57126);const{compareChunks:N}=R(58792);const q=R(89699);const G=q(R(91113),(()=>R(35041)),{name:"Limit Chunk Count Plugin",baseDataPath:"options"});const addToSetMap=(v,E,R)=>{const $=v.get(E);if($===undefined){v.set(E,new Set([R]))}else{$.add(R)}};class LimitChunkCountPlugin{constructor(v){G(v);this.options=v}apply(v){const E=this.options;v.hooks.compilation.tap("LimitChunkCountPlugin",(v=>{v.hooks.optimizeChunks.tap({name:"LimitChunkCountPlugin",stage:$},(R=>{const $=v.chunkGraph;const q=E.maxChunks;if(!q)return;if(q<1)return;if(v.chunks.size<=q)return;let G=v.chunks.size-q;const ie=N($);const ae=Array.from(R).sort(ie);const ce=new j((v=>v.sizeDiff),((v,E)=>E-v),(v=>v.integratedSize),((v,E)=>v-E),(v=>v.bIdx-v.aIdx),((v,E)=>v-E),((v,E)=>v.bIdx-E.bIdx));const le=new Map;ae.forEach(((v,R)=>{for(let j=0;j0){const v=new Set(j.groupsIterable);for(const E of N.groupsIterable){v.add(E)}for(const E of v){for(const v of me){if(v!==j&&v!==N&&v.isInGroup(E)){G--;if(G<=0)break e;me.add(j);me.add(N);continue e}}for(const R of E.parentsIterable){v.add(R)}}}if($.canChunksBeIntegrated(j,N)){$.integrateChunks(j,N);v.chunks.delete(N);me.add(j);_e=true;G--;if(G<=0)break;for(const v of le.get(j)){if(v.deleted)continue;v.deleted=true;ce.delete(v)}for(const v of le.get(N)){if(v.deleted)continue;if(v.a===N){if(!$.canChunksBeIntegrated(j,v.b)){v.deleted=true;ce.delete(v);continue}const R=$.getIntegratedChunksSize(j,v.b,E);const N=ce.startUpdate(v);v.a=j;v.integratedSize=R;v.aSize=q;v.sizeDiff=v.bSize+q-R;N()}else if(v.b===N){if(!$.canChunksBeIntegrated(v.a,j)){v.deleted=true;ce.delete(v);continue}const R=$.getIntegratedChunksSize(v.a,j,E);const N=ce.startUpdate(v);v.b=j;v.integratedSize=R;v.bSize=q;v.sizeDiff=q+v.aSize-R;N()}}le.set(j,le.get(N));le.delete(N)}}if(_e)return true}))}))}}v.exports=LimitChunkCountPlugin},41199:function(v,E,R){"use strict";const{UsageState:$}=R(13168);const{numberToIdentifier:j,NUMBER_OF_IDENTIFIER_START_CHARS:N,NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS:q}=R(43841);const{assignDeterministicIds:G}=R(76283);const{compareSelect:ie,compareStringsNumeric:ae}=R(58792);const canMangle=v=>{if(v.otherExportsInfo.getUsed(undefined)!==$.Unused)return false;let E=false;for(const R of v.exports){if(R.canMangle===true){E=true}}return E};const ce=ie((v=>v.name),ae);const mangleExportsInfo=(v,E,R)=>{if(!canMangle(E))return;const ie=new Set;const ae=[];let le=!R;if(!le&&v){for(const v of E.ownedExports){if(v.provided!==false){le=true;break}}}for(const R of E.ownedExports){const E=R.name;if(!R.hasUsedName()){if(R.canMangle!==true||E.length===1&&/^[a-zA-Z0-9_$]/.test(E)||v&&E.length===2&&/^[a-zA-Z_$][a-zA-Z0-9_$]|^[1-9][0-9]/.test(E)||le&&R.provided!==true){R.setUsedName(E);ie.add(E)}else{ae.push(R)}}if(R.exportsInfoOwned){const E=R.getUsed(undefined);if(E===$.OnlyPropertiesUsed||E===$.Unused){mangleExportsInfo(v,R.exportsInfo,false)}}}if(v){G(ae,(v=>v.name),ce,((v,E)=>{const R=j(E);const $=ie.size;ie.add(R);if($===ie.size)return false;v.setUsedName(R);return true}),[N,N*q],q,ie.size)}else{const v=[];const E=[];for(const R of ae){if(R.getUsed(undefined)===$.Unused){E.push(R)}else{v.push(R)}}v.sort(ce);E.sort(ce);let R=0;for(const $ of[v,E]){for(const v of $){let E;do{E=j(R++)}while(ie.has(E));v.setUsedName(E)}}}};class MangleExportsPlugin{constructor(v){this._deterministic=v}apply(v){const{_deterministic:E}=this;v.hooks.compilation.tap("MangleExportsPlugin",(v=>{const R=v.moduleGraph;v.hooks.optimizeCodeGeneration.tap("MangleExportsPlugin",($=>{if(v.moduleMemCaches){throw new Error("optimization.mangleExports can't be used with cacheUnaffected as export mangling is a global effect")}for(const v of $){const $=v.buildMeta&&v.buildMeta.exportsType==="namespace";const j=R.getExportsInfo(v);mangleExportsInfo(E,j,$)}}))}))}}v.exports=MangleExportsPlugin},88831:function(v,E,R){"use strict";const{STAGE_BASIC:$}=R(6267);const{runtimeEqual:j}=R(47462);class MergeDuplicateChunksPlugin{apply(v){v.hooks.compilation.tap("MergeDuplicateChunksPlugin",(v=>{v.hooks.optimizeChunks.tap({name:"MergeDuplicateChunksPlugin",stage:$},(E=>{const{chunkGraph:R,moduleGraph:$}=v;const N=new Set;for(const q of E){let E;for(const v of R.getChunkModulesIterable(q)){if(E===undefined){for(const $ of R.getModuleChunksIterable(v)){if($!==q&&R.getNumberOfChunkModules(q)===R.getNumberOfChunkModules($)&&!N.has($)){if(E===undefined){E=new Set}E.add($)}}if(E===undefined)break}else{for(const $ of E){if(!R.isModuleInChunk(v,$)){E.delete($)}}if(E.size===0)break}}if(E!==undefined&&E.size>0){e:for(const N of E){if(N.hasRuntime()!==q.hasRuntime())continue;if(R.getNumberOfEntryModules(q)>0)continue;if(R.getNumberOfEntryModules(N)>0)continue;if(!j(q.runtime,N.runtime)){for(const v of R.getChunkModulesIterable(q)){const E=$.getExportsInfo(v);if(!E.isEquallyUsed(q.runtime,N.runtime)){continue e}}}if(R.canChunksBeIntegrated(q,N)){R.integrateChunks(q,N);v.chunks.delete(N)}}}N.add(q)}}))}))}}v.exports=MergeDuplicateChunksPlugin},37434:function(v,E,R){"use strict";const{STAGE_ADVANCED:$}=R(6267);const j=R(89699);const N=j(R(927),(()=>R(72649)),{name:"Min Chunk Size Plugin",baseDataPath:"options"});class MinChunkSizePlugin{constructor(v){N(v);this.options=v}apply(v){const E=this.options;const R=E.minChunkSize;v.hooks.compilation.tap("MinChunkSizePlugin",(v=>{v.hooks.optimizeChunks.tap({name:"MinChunkSizePlugin",stage:$},($=>{const j=v.chunkGraph;const N={chunkOverhead:1,entryChunkMultiplicator:1};const q=new Map;const G=[];const ie=[];const ae=[];for(const v of $){if(j.getChunkSize(v,N){const R=q.get(v[0]);const $=q.get(v[1]);const N=j.getIntegratedChunksSize(v[0],v[1],E);const G=[R+$-N,N,v[0],v[1]];return G})).sort(((v,E)=>{const R=E[0]-v[0];if(R!==0)return R;return v[1]-E[1]}));if(ce.length===0)return;const le=ce[0];j.integrateChunks(le[2],le[3]);v.chunks.delete(le[3]);return true}))}))}}v.exports=MinChunkSizePlugin},45337:function(v,E,R){"use strict";const $=R(67309);const j=R(27154);class MinMaxSizeWarning extends j{constructor(v,E,R){let j="Fallback cache group";if(v){j=v.length>1?`Cache groups ${v.sort().join(", ")}`:`Cache group ${v[0]}`}super(`SplitChunksPlugin\n`+`${j}\n`+`Configured minSize (${$.formatSize(E)}) is `+`bigger than maxSize (${$.formatSize(R)}).\n`+"This seem to be a invalid optimization.splitChunks configuration.")}}v.exports=MinMaxSizeWarning},5279:function(v,E,R){"use strict";const $=R(78175);const j=R(75449);const N=R(13487);const{STAGE_DEFAULT:q}=R(6267);const G=R(58668);const{compareModulesByIdentifier:ie}=R(58792);const{intersectRuntime:ae,mergeRuntimeOwned:ce,filterRuntime:le,runtimeToString:me,mergeRuntime:_e}=R(47462);const Ie=R(4272);const formatBailoutReason=v=>"ModuleConcatenation bailout: "+v;class ModuleConcatenationPlugin{constructor(v){if(typeof v!=="object")v={};this.options=v}apply(v){const{_backCompat:E}=v;v.hooks.compilation.tap("ModuleConcatenationPlugin",(R=>{if(R.moduleMemCaches){throw new Error("optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect")}const ie=R.moduleGraph;const ae=new Map;const setBailoutReason=(v,E)=>{setInnerBailoutReason(v,E);ie.getOptimizationBailout(v).push(typeof E==="function"?v=>formatBailoutReason(E(v)):formatBailoutReason(E))};const setInnerBailoutReason=(v,E)=>{ae.set(v,E)};const getInnerBailoutReason=(v,E)=>{const R=ae.get(v);if(typeof R==="function")return R(E);return R};const formatBailoutWarning=(v,E)=>R=>{if(typeof E==="function"){return formatBailoutReason(`Cannot concat with ${v.readableIdentifier(R)}: ${E(R)}`)}const $=getInnerBailoutReason(v,R);const j=$?`: ${$}`:"";if(v===E){return formatBailoutReason(`Cannot concat with ${v.readableIdentifier(R)}${j}`)}else{return formatBailoutReason(`Cannot concat with ${v.readableIdentifier(R)} because of ${E.readableIdentifier(R)}${j}`)}};R.hooks.optimizeChunkModules.tapAsync({name:"ModuleConcatenationPlugin",stage:q},((q,ie,ae)=>{const me=R.getLogger("webpack.ModuleConcatenationPlugin");const{chunkGraph:_e,moduleGraph:Me}=R;const Oe=[];const Te=new Set;const Ne={chunkGraph:_e,moduleGraph:Me};me.time("select relevant modules");for(const v of ie){let E=true;let R=true;const $=v.getConcatenationBailoutReason(Ne);if($){setBailoutReason(v,$);continue}if(Me.isAsync(v)){setBailoutReason(v,`Module is async`);continue}if(!v.buildInfo.strict){setBailoutReason(v,`Module is not in strict mode`);continue}if(_e.getNumberOfModuleChunks(v)===0){setBailoutReason(v,"Module is not in any chunk");continue}const j=Me.getExportsInfo(v);const N=j.getRelevantExports(undefined);const q=N.filter((v=>v.isReexport()&&!v.getTarget(Me)));if(q.length>0){setBailoutReason(v,`Reexports in this module do not have a static target (${Array.from(q,(v=>`${v.name||"other exports"}: ${v.getUsedInfo()}`)).join(", ")})`);continue}const G=N.filter((v=>v.provided!==true));if(G.length>0){setBailoutReason(v,`List of module exports is dynamic (${Array.from(G,(v=>`${v.name||"other exports"}: ${v.getProvidedInfo()} and ${v.getUsedInfo()}`)).join(", ")})`);E=false}if(_e.isEntryModule(v)){setInnerBailoutReason(v,"Module is an entry point");R=false}if(E)Oe.push(v);if(R)Te.add(v)}me.timeEnd("select relevant modules");me.debug(`${Oe.length} potential root modules, ${Te.size} potential inner modules`);me.time("sort relevant modules");Oe.sort(((v,E)=>Me.getDepth(v)-Me.getDepth(E)));me.timeEnd("sort relevant modules");const Be={cached:0,alreadyInConfig:0,invalidModule:0,incorrectChunks:0,incorrectDependency:0,incorrectModuleDependency:0,incorrectChunksOfImporter:0,incorrectRuntimeCondition:0,importerFailed:0,added:0};let Le=0;let qe=0;let Ue=0;me.time("find modules to concatenate");const Ge=[];const He=new Set;for(const v of Oe){if(He.has(v))continue;let E=undefined;for(const R of _e.getModuleRuntimes(v)){E=ce(E,R)}const $=Me.getExportsInfo(v);const j=le(E,(v=>$.isModuleUsed(v)));const N=j===true?E:j===false?undefined:j;const q=new ConcatConfiguration(v,N);const G=new Map;const ie=new Set;for(const E of this._getImports(R,v,N)){ie.add(E)}for(const v of ie){const $=new Set;const j=this._tryToAdd(R,q,v,E,N,Te,$,G,_e,true,Be);if(j){G.set(v,j);q.addWarning(v,j)}else{for(const v of $){ie.add(v)}}}Le+=ie.size;if(!q.isEmpty()){const v=q.getModules();qe+=v.size;Ge.push(q);for(const E of v){if(E!==q.rootModule){He.add(E)}}}else{Ue++;const E=Me.getOptimizationBailout(v);for(const v of q.getWarningsSorted()){E.push(formatBailoutWarning(v[0],v[1]))}}}me.timeEnd("find modules to concatenate");me.debug(`${Ge.length} successful concat configurations (avg size: ${qe/Ge.length}), ${Ue} bailed out completely`);me.debug(`${Le} candidates were considered for adding (${Be.cached} cached failure, ${Be.alreadyInConfig} already in config, ${Be.invalidModule} invalid module, ${Be.incorrectChunks} incorrect chunks, ${Be.incorrectDependency} incorrect dependency, ${Be.incorrectChunksOfImporter} incorrect chunks of importer, ${Be.incorrectModuleDependency} incorrect module dependency, ${Be.incorrectRuntimeCondition} incorrect runtime condition, ${Be.importerFailed} importer failed, ${Be.added} added)`);me.time(`sort concat configurations`);Ge.sort(((v,E)=>E.modules.size-v.modules.size));me.timeEnd(`sort concat configurations`);const We=new Set;me.time("create concatenated modules");$.each(Ge,(($,q)=>{const ie=$.rootModule;if(We.has(ie))return q();const ae=$.getModules();for(const v of ae){We.add(v)}let ce=Ie.create(ie,ae,$.runtime,v.root,R.outputOptions.hashFunction);const build=()=>{ce.build(v.options,R,null,null,(v=>{if(v){if(!v.module){v.module=ce}return q(v)}integrate()}))};const integrate=()=>{if(E){j.setChunkGraphForModule(ce,_e);N.setModuleGraphForModule(ce,Me)}for(const v of $.getWarningsSorted()){Me.getOptimizationBailout(ce).push(formatBailoutWarning(v[0],v[1]))}Me.cloneModuleAttributes(ie,ce);for(const v of ae){if(R.builtModules.has(v)){R.builtModules.add(ce)}if(v!==ie){Me.copyOutgoingModuleConnections(v,ce,(E=>E.originModule===v&&!(E.dependency instanceof G&&ae.has(E.module))));for(const E of _e.getModuleChunksIterable(ie)){const R=_e.getChunkModuleSourceTypes(E,v);if(R.size===1){_e.disconnectChunkAndModule(E,v)}else{const $=new Set(R);$.delete("javascript");_e.setChunkModuleSourceTypes(E,v,$)}}}}R.modules.delete(ie);j.clearChunkGraphForModule(ie);N.clearModuleGraphForModule(ie);_e.replaceModule(ie,ce);Me.moveModuleConnections(ie,ce,(v=>{const E=v.module===ie?v.originModule:v.module;const R=v.dependency instanceof G&&ae.has(E);return!R}));R.modules.add(ce);q()};build()}),(v=>{me.timeEnd("create concatenated modules");process.nextTick(ae.bind(null,v))}))}))}))}_getImports(v,E,R){const $=v.moduleGraph;const j=new Set;for(const N of E.dependencies){if(!(N instanceof G))continue;const q=$.getConnection(N);if(!q||!q.module||!q.isTargetActive(R)){continue}const ie=v.getDependencyReferencedExports(N,undefined);if(ie.every((v=>Array.isArray(v)?v.length>0:v.name.length>0))||Array.isArray($.getProvidedExports(E))){j.add(q.module)}}return j}_tryToAdd(v,E,R,$,j,N,q,Ie,Me,Oe,Te){const Ne=Ie.get(R);if(Ne){Te.cached++;return Ne}if(E.has(R)){Te.alreadyInConfig++;return null}if(!N.has(R)){Te.invalidModule++;Ie.set(R,R);return R}const Be=Array.from(Me.getModuleChunksIterable(E.rootModule)).filter((v=>!Me.isModuleInChunk(R,v)));if(Be.length>0){const problem=v=>{const E=Array.from(new Set(Be.map((v=>v.name||"unnamed chunk(s)")))).sort();const $=Array.from(new Set(Array.from(Me.getModuleChunksIterable(R)).map((v=>v.name||"unnamed chunk(s)")))).sort();return`Module ${R.readableIdentifier(v)} is not in the same chunk(s) (expected in chunk(s) ${E.join(", ")}, module is in chunk(s) ${$.join(", ")})`};Te.incorrectChunks++;Ie.set(R,problem);return problem}const Le=v.moduleGraph;const qe=Le.getIncomingConnectionsByOriginModule(R);const Ue=qe.get(null)||qe.get(undefined);if(Ue){const v=Ue.filter((v=>v.isActive($)));if(v.length>0){const problem=E=>{const $=new Set(v.map((v=>v.explanation)).filter(Boolean));const j=Array.from($).sort();return`Module ${R.readableIdentifier(E)} is referenced ${j.length>0?`by: ${j.join(", ")}`:"in an unsupported way"}`};Te.incorrectDependency++;Ie.set(R,problem);return problem}}const Ge=new Map;for(const[v,E]of qe){if(v){if(Me.getNumberOfModuleChunks(v)===0)continue;let R=undefined;for(const E of Me.getModuleRuntimes(v)){R=ce(R,E)}if(!ae($,R))continue;const j=E.filter((v=>v.isActive($)));if(j.length>0)Ge.set(v,j)}}const He=Array.from(Ge.keys());const We=He.filter((v=>{for(const R of Me.getModuleChunksIterable(E.rootModule)){if(!Me.isModuleInChunk(v,R)){return true}}return false}));if(We.length>0){const problem=v=>{const E=We.map((E=>E.readableIdentifier(v))).sort();return`Module ${R.readableIdentifier(v)} is referenced from different chunks by these modules: ${E.join(", ")}`};Te.incorrectChunksOfImporter++;Ie.set(R,problem);return problem}const Qe=new Map;for(const[v,E]of Ge){const R=E.filter((v=>!v.dependency||!(v.dependency instanceof G)));if(R.length>0)Qe.set(v,E)}if(Qe.size>0){const problem=v=>{const E=Array.from(Qe).map((([E,R])=>`${E.readableIdentifier(v)} (referenced with ${Array.from(new Set(R.map((v=>v.dependency&&v.dependency.type)).filter(Boolean))).sort().join(", ")})`)).sort();return`Module ${R.readableIdentifier(v)} is referenced from these modules with unsupported syntax: ${E.join(", ")}`};Te.incorrectModuleDependency++;Ie.set(R,problem);return problem}if($!==undefined&&typeof $!=="string"){const v=[];e:for(const[E,R]of Ge){let j=false;for(const v of R){const E=le($,(E=>v.isTargetActive(E)));if(E===false)continue;if(E===true)continue e;if(j!==false){j=_e(j,E)}else{j=E}}if(j!==false){v.push({originModule:E,runtimeCondition:j})}}if(v.length>0){const problem=E=>`Module ${R.readableIdentifier(E)} is runtime-dependent referenced by these modules: ${Array.from(v,(({originModule:v,runtimeCondition:R})=>`${v.readableIdentifier(E)} (expected runtime ${me($)}, module is only referenced in ${me(R)})`)).join(", ")}`;Te.incorrectRuntimeCondition++;Ie.set(R,problem);return problem}}let Je;if(Oe){Je=E.snapshot()}E.add(R);He.sort(ie);for(const G of He){const ie=this._tryToAdd(v,E,G,$,j,N,q,Ie,Me,false,Te);if(ie){if(Je!==undefined)E.rollback(Je);Te.importerFailed++;Ie.set(R,ie);return ie}}for(const E of this._getImports(v,R,$)){q.add(E)}Te.added++;return null}}class ConcatConfiguration{constructor(v,E){this.rootModule=v;this.runtime=E;this.modules=new Set;this.modules.add(v);this.warnings=new Map}add(v){this.modules.add(v)}has(v){return this.modules.has(v)}isEmpty(){return this.modules.size===1}addWarning(v,E){this.warnings.set(v,E)}getWarningsSorted(){return new Map(Array.from(this.warnings).sort(((v,E)=>{const R=v[0].identifier();const $=E[0].identifier();if(R<$)return-1;if(R>$)return 1;return 0})))}getModules(){return this.modules}snapshot(){return this.modules.size}rollback(v){const E=this.modules;for(const R of E){if(v===0){E.delete(R)}else{v--}}}}v.exports=ModuleConcatenationPlugin},33347:function(v,E,R){"use strict";const{SyncBailHook:$}=R(44217);const{RawSource:j,CachedSource:N,CompatSource:q}=R(51255);const G=R(73002);const ie=R(27154);const{compareSelect:ae,compareStrings:ce}=R(58792);const le=R(85205);const me=new Set;const addToList=(v,E)=>{if(Array.isArray(v)){for(const R of v){E.add(R)}}else if(v){E.add(v)}};const mapAndDeduplicateBuffers=(v,E)=>{const R=[];e:for(const $ of v){const v=E($);for(const E of R){if(v.equals(E))continue e}R.push(v)}return R};const quoteMeta=v=>v.replace(/[-[\]\\/{}()*+?.^$|]/g,"\\$&");const _e=new WeakMap;const toCachedSource=v=>{if(v instanceof N){return v}const E=_e.get(v);if(E!==undefined)return E;const R=new N(q.from(v));_e.set(v,R);return R};const Ie=new WeakMap;class RealContentHashPlugin{static getCompilationHooks(v){if(!(v instanceof G)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=Ie.get(v);if(E===undefined){E={updateHash:new $(["content","oldHash"])};Ie.set(v,E)}return E}constructor({hashFunction:v,hashDigest:E}){this._hashFunction=v;this._hashDigest=E}apply(v){v.hooks.compilation.tap("RealContentHashPlugin",(v=>{const E=v.getCache("RealContentHashPlugin|analyse");const R=v.getCache("RealContentHashPlugin|generate");const $=RealContentHashPlugin.getCompilationHooks(v);v.hooks.processAssets.tapPromise({name:"RealContentHashPlugin",stage:G.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH},(async()=>{const N=v.getAssets();const q=[];const G=new Map;for(const{source:v,info:E,name:R}of N){const $=toCachedSource(v);const j=$.source();const N=new Set;addToList(E.contenthash,N);const ie={name:R,info:E,source:$,newSource:undefined,newSourceWithoutOwn:undefined,content:j,ownHashes:undefined,contentComputePromise:undefined,contentComputeWithoutOwnPromise:undefined,referencedHashes:undefined,hashes:N};q.push(ie);for(const v of N){const E=G.get(v);if(E===undefined){G.set(v,[ie])}else{E.push(ie)}}}if(G.size===0)return;const _e=new RegExp(Array.from(G.keys(),quoteMeta).join("|"),"g");await Promise.all(q.map((async v=>{const{name:R,source:$,content:j,hashes:N}=v;if(Buffer.isBuffer(j)){v.referencedHashes=me;v.ownHashes=me;return}const q=E.mergeEtags(E.getLazyHashedEtag($),Array.from(N).join("|"));[v.referencedHashes,v.ownHashes]=await E.providePromise(R,q,(()=>{const v=new Set;let E=new Set;const R=j.match(_e);if(R){for(const $ of R){if(N.has($)){E.add($);continue}v.add($)}}return[v,E]}))})));const getDependencies=E=>{const R=G.get(E);if(!R){const R=q.filter((v=>v.referencedHashes.has(E)));const $=new ie(`RealContentHashPlugin\nSome kind of unexpected caching problem occurred.\nAn asset was cached with a reference to another asset (${E}) that's not in the compilation anymore.\nEither the asset was incorrectly cached, or the referenced asset should also be restored from cache.\nReferenced by:\n${R.map((v=>{const R=new RegExp(`.{0,20}${quoteMeta(E)}.{0,20}`).exec(v.content);return` - ${v.name}: ...${R?R[0]:"???"}...`})).join("\n")}`);v.errors.push($);return undefined}const $=new Set;for(const{referencedHashes:v,ownHashes:j}of R){if(!j.has(E)){for(const v of j){$.add(v)}}for(const E of v){$.add(E)}}return $};const hashInfo=v=>{const E=G.get(v);return`${v} (${Array.from(E,(v=>v.name))})`};const Ie=new Set;for(const v of G.keys()){const add=(v,E)=>{const R=getDependencies(v);if(!R)return;E.add(v);for(const v of R){if(Ie.has(v))continue;if(E.has(v)){throw new Error(`Circular hash dependency ${Array.from(E,hashInfo).join(" -> ")} -> ${hashInfo(v)}`)}add(v,E)}Ie.add(v);E.delete(v)};if(Ie.has(v))continue;add(v,new Set)}const Me=new Map;const getEtag=v=>R.mergeEtags(R.getLazyHashedEtag(v.source),Array.from(v.referencedHashes,(v=>Me.get(v))).join("|"));const computeNewContent=v=>{if(v.contentComputePromise)return v.contentComputePromise;return v.contentComputePromise=(async()=>{if(v.ownHashes.size>0||Array.from(v.referencedHashes).some((v=>Me.get(v)!==v))){const E=v.name;const $=getEtag(v);v.newSource=await R.providePromise(E,$,(()=>{const E=v.content.replace(_e,(v=>Me.get(v)));return new j(E)}))}})()};const computeNewContentWithoutOwn=v=>{if(v.contentComputeWithoutOwnPromise)return v.contentComputeWithoutOwnPromise;return v.contentComputeWithoutOwnPromise=(async()=>{if(v.ownHashes.size>0||Array.from(v.referencedHashes).some((v=>Me.get(v)!==v))){const E=v.name+"|without-own";const $=getEtag(v);v.newSourceWithoutOwn=await R.providePromise(E,$,(()=>{const E=v.content.replace(_e,(E=>{if(v.ownHashes.has(E)){return""}return Me.get(E)}));return new j(E)}))}})()};const Oe=ae((v=>v.name),ce);for(const v of Ie){const E=G.get(v);E.sort(Oe);const R=le(this._hashFunction);await Promise.all(E.map((E=>E.ownHashes.has(v)?computeNewContentWithoutOwn(E):computeNewContent(E))));const j=mapAndDeduplicateBuffers(E,(E=>{if(E.ownHashes.has(v)){return E.newSourceWithoutOwn?E.newSourceWithoutOwn.buffer():E.source.buffer()}else{return E.newSource?E.newSource.buffer():E.source.buffer()}}));let N=$.updateHash.call(j,v);if(!N){for(const v of j){R.update(v)}const E=R.digest(this._hashDigest);N=E.slice(0,v.length)}Me.set(v,N)}await Promise.all(q.map((async E=>{await computeNewContent(E);const R=E.name.replace(_e,(v=>Me.get(v)));const $={};const j=E.info.contenthash;$.contenthash=Array.isArray(j)?j.map((v=>Me.get(v))):Me.get(j);if(E.newSource!==undefined){v.updateAsset(E.name,E.newSource,$)}else{v.updateAsset(E.name,E.source,$)}if(E.name!==R){v.renameAsset(E.name,R)}})))}))}))}}v.exports=RealContentHashPlugin},88876:function(v,E,R){"use strict";const{STAGE_BASIC:$,STAGE_ADVANCED:j}=R(6267);class RemoveEmptyChunksPlugin{apply(v){v.hooks.compilation.tap("RemoveEmptyChunksPlugin",(v=>{const handler=E=>{const R=v.chunkGraph;for(const $ of E){if(R.getNumberOfChunkModules($)===0&&!$.hasRuntime()&&R.getNumberOfEntryModules($)===0){v.chunkGraph.disconnectChunk($);v.chunks.delete($)}}};v.hooks.optimizeChunks.tap({name:"RemoveEmptyChunksPlugin",stage:$},handler);v.hooks.optimizeChunks.tap({name:"RemoveEmptyChunksPlugin",stage:j},handler)}))}}v.exports=RemoveEmptyChunksPlugin},19906:function(v,E,R){"use strict";const{STAGE_BASIC:$}=R(6267);const j=R(83690);const{intersect:N}=R(73268);class RemoveParentModulesPlugin{apply(v){v.hooks.compilation.tap("RemoveParentModulesPlugin",(v=>{const handler=(E,R)=>{const $=v.chunkGraph;const q=new j;const G=new WeakMap;for(const E of v.entrypoints.values()){G.set(E,new Set);for(const v of E.childrenIterable){q.enqueue(v)}}for(const E of v.asyncEntrypoints){G.set(E,new Set);for(const v of E.childrenIterable){q.enqueue(v)}}while(q.length>0){const v=q.dequeue();let E=G.get(v);let R=false;for(const j of v.parentsIterable){const N=G.get(j);if(N!==undefined){if(E===undefined){E=new Set(N);for(const v of j.chunks){for(const R of $.getChunkModulesIterable(v)){E.add(R)}}G.set(v,E);R=true}else{for(const v of E){if(!$.isModuleInChunkGroup(v,j)&&!N.has(v)){E.delete(v);R=true}}}}}if(R){for(const E of v.childrenIterable){q.enqueue(E)}}}for(const v of E){const E=Array.from(v.groupsIterable,(v=>G.get(v)));if(E.some((v=>v===undefined)))continue;const R=E.length===1?E[0]:N(E);const j=$.getNumberOfChunkModules(v);const q=new Set;if(j`runtime~${v.name}`,...v}}apply(v){v.hooks.thisCompilation.tap("RuntimeChunkPlugin",(v=>{v.hooks.addEntry.tap("RuntimeChunkPlugin",((E,{name:R})=>{if(R===undefined)return;const $=v.entries.get(R);if($.options.runtime===undefined&&!$.options.dependOn){let v=this.options.name;if(typeof v==="function"){v=v({name:R})}$.options.runtime=v}}))}))}}v.exports=RuntimeChunkPlugin},94281:function(v,E,R){"use strict";const $=R(72544);const{STAGE_DEFAULT:j}=R(6267);const N=R(96577);const q=R(577);const G=R(24014);const ie=new WeakMap;const globToRegexp=(v,E)=>{const R=E.get(v);if(R!==undefined)return R;if(!v.includes("/")){v=`**/${v}`}const j=$(v,{globstar:true,extended:true});const N=j.source;const q=new RegExp("^(\\./)?"+N.slice(1));E.set(v,q);return q};class SideEffectsFlagPlugin{constructor(v=true){this._analyseSource=v}apply(v){let E=ie.get(v.root);if(E===undefined){E=new Map;ie.set(v.root,E)}v.hooks.compilation.tap("SideEffectsFlagPlugin",((v,{normalModuleFactory:R})=>{const $=v.moduleGraph;R.hooks.module.tap("SideEffectsFlagPlugin",((v,R)=>{const $=R.resourceResolveData;if($&&$.descriptionFileData&&$.relativePath){const R=$.descriptionFileData.sideEffects;if(R!==undefined){if(v.factoryMeta===undefined){v.factoryMeta={}}const j=SideEffectsFlagPlugin.moduleHasSideEffects($.relativePath,R,E);v.factoryMeta.sideEffectFree=!j}}return v}));R.hooks.module.tap("SideEffectsFlagPlugin",((v,E)=>{if(typeof E.settings.sideEffects==="boolean"){if(v.factoryMeta===undefined){v.factoryMeta={}}v.factoryMeta.sideEffectFree=!E.settings.sideEffects}return v}));if(this._analyseSource){const parserHandler=v=>{let E;v.hooks.program.tap("SideEffectsFlagPlugin",(()=>{E=undefined}));v.hooks.statement.tap({name:"SideEffectsFlagPlugin",stage:-100},(R=>{if(E)return;if(v.scope.topLevelScope!==true)return;switch(R.type){case"ExpressionStatement":if(!v.isPure(R.expression,R.range[0])){E=R}break;case"IfStatement":case"WhileStatement":case"DoWhileStatement":if(!v.isPure(R.test,R.range[0])){E=R}break;case"ForStatement":if(!v.isPure(R.init,R.range[0])||!v.isPure(R.test,R.init?R.init.range[1]:R.range[0])||!v.isPure(R.update,R.test?R.test.range[1]:R.init?R.init.range[1]:R.range[0])){E=R}break;case"SwitchStatement":if(!v.isPure(R.discriminant,R.range[0])){E=R}break;case"VariableDeclaration":case"ClassDeclaration":case"FunctionDeclaration":if(!v.isPure(R,R.range[0])){E=R}break;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":if(!v.isPure(R.declaration,R.range[0])){E=R}break;case"LabeledStatement":case"BlockStatement":break;case"EmptyStatement":break;case"ExportAllDeclaration":case"ImportDeclaration":break;default:E=R;break}}));v.hooks.finish.tap("SideEffectsFlagPlugin",(()=>{if(E===undefined){v.state.module.buildMeta.sideEffectFree=true}else{const{loc:R,type:j}=E;$.getOptimizationBailout(v.state.module).push((()=>`Statement (${j}) with side effects in source code at ${G(R)}`))}}))};for(const v of["javascript/auto","javascript/esm","javascript/dynamic"]){R.hooks.parser.for(v).tap("SideEffectsFlagPlugin",parserHandler)}}v.hooks.optimizeDependencies.tap({name:"SideEffectsFlagPlugin",stage:j},(E=>{const R=v.getLogger("webpack.SideEffectsFlagPlugin");R.time("update dependencies");for(const v of E){if(v.getSideEffectsConnectionState($)===false){const E=$.getExportsInfo(v);for(const R of $.getIncomingConnections(v)){const v=R.dependency;let j;if((j=v instanceof N)||v instanceof q&&!v.namespaceObjectAsContext){if(j&&v.name){const E=$.getExportInfo(R.originModule,v.name);E.moveTarget($,(({module:v})=>v.getSideEffectsConnectionState($)===false),(({module:E,export:R})=>{$.updateModule(v,E);$.addExplanation(v,"(skipped side-effect-free modules)");const j=v.getIds($);v.setIds($,R?[...R,...j.slice(1)]:j.slice(1));return $.getConnection(v)}));continue}const N=v.getIds($);if(N.length>0){const R=E.getExportInfo(N[0]);const j=R.getTarget($,(({module:v})=>v.getSideEffectsConnectionState($)===false));if(!j)continue;$.updateModule(v,j.module);$.addExplanation(v,"(skipped side-effect-free modules)");v.setIds($,j.export?[...j.export,...N.slice(1)]:N.slice(1))}}}}}R.timeEnd("update dependencies")}))}))}static moduleHasSideEffects(v,E,R){switch(typeof E){case"undefined":return true;case"boolean":return E;case"string":return globToRegexp(E,R).test(v);case"object":return E.some((E=>SideEffectsFlagPlugin.moduleHasSideEffects(v,E,R)))}}}v.exports=SideEffectsFlagPlugin},61167:function(v,E,R){"use strict";const $=R(84891);const{STAGE_ADVANCED:j}=R(6267);const N=R(27154);const{requestToId:q}=R(76283);const{isSubset:G}=R(73268);const ie=R(87122);const{compareModulesByIdentifier:ae,compareIterables:ce}=R(58792);const le=R(85205);const me=R(75843);const{makePathsRelative:_e}=R(20162);const Ie=R(61374);const Me=R(45337);const defaultGetName=()=>{};const Oe=me;const Te=new WeakMap;const hashFilename=(v,E)=>{const R=le(E.hashFunction).update(v).digest(E.hashDigest);return R.slice(0,8)};const getRequests=v=>{let E=0;for(const R of v.groupsIterable){E=Math.max(E,R.chunks.length)}return E};const mapObject=(v,E)=>{const R=Object.create(null);for(const $ of Object.keys(v)){R[$]=E(v[$],$)}return R};const isOverlap=(v,E)=>{for(const R of v){if(E.has(R))return true}return false};const Ne=ce(ae);const compareEntries=(v,E)=>{const R=v.cacheGroup.priority-E.cacheGroup.priority;if(R)return R;const $=v.chunks.size-E.chunks.size;if($)return $;const j=totalSize(v.sizes)*(v.chunks.size-1);const N=totalSize(E.sizes)*(E.chunks.size-1);const q=j-N;if(q)return q;const G=E.cacheGroupIndex-v.cacheGroupIndex;if(G)return G;const ie=v.modules;const ae=E.modules;const ce=ie.size-ae.size;if(ce)return ce;ie.sort();ae.sort();return Ne(ie,ae)};const INITIAL_CHUNK_FILTER=v=>v.canBeInitial();const ASYNC_CHUNK_FILTER=v=>!v.canBeInitial();const ALL_CHUNK_FILTER=v=>true;const normalizeSizes=(v,E)=>{if(typeof v==="number"){const R={};for(const $ of E)R[$]=v;return R}else if(typeof v==="object"&&v!==null){return{...v}}else{return{}}};const mergeSizes=(...v)=>{let E={};for(let R=v.length-1;R>=0;R--){E=Object.assign(E,v[R])}return E};const hasNonZeroSizes=v=>{for(const E of Object.keys(v)){if(v[E]>0)return true}return false};const combineSizes=(v,E,R)=>{const $=new Set(Object.keys(v));const j=new Set(Object.keys(E));const N={};for(const q of $){if(j.has(q)){N[q]=R(v[q],E[q])}else{N[q]=v[q]}}for(const v of j){if(!$.has(v)){N[v]=E[v]}}return N};const checkMinSize=(v,E)=>{for(const R of Object.keys(E)){const $=v[R];if($===undefined||$===0)continue;if(${for(const $ of Object.keys(E)){const j=v[$];if(j===undefined||j===0)continue;if(j*R{let R;for(const $ of Object.keys(E)){const j=v[$];if(j===undefined||j===0)continue;if(j{let E=0;for(const R of Object.keys(v)){E+=v[R]}return E};const normalizeName=v=>{if(typeof v==="string"){return()=>v}if(typeof v==="function"){return v}};const normalizeChunksFilter=v=>{if(v==="initial"){return INITIAL_CHUNK_FILTER}if(v==="async"){return ASYNC_CHUNK_FILTER}if(v==="all"){return ALL_CHUNK_FILTER}if(typeof v==="function"){return v}};const normalizeCacheGroups=(v,E)=>{if(typeof v==="function"){return v}if(typeof v==="object"&&v!==null){const R=[];for(const $ of Object.keys(v)){const j=v[$];if(j===false){continue}if(typeof j==="string"||j instanceof RegExp){const v=createCacheGroupSource({},$,E);R.push(((E,R,$)=>{if(checkTest(j,E,R)){$.push(v)}}))}else if(typeof j==="function"){const v=new WeakMap;R.push(((R,N,q)=>{const G=j(R);if(G){const R=Array.isArray(G)?G:[G];for(const j of R){const R=v.get(j);if(R!==undefined){q.push(R)}else{const R=createCacheGroupSource(j,$,E);v.set(j,R);q.push(R)}}}}))}else{const v=createCacheGroupSource(j,$,E);R.push(((E,R,$)=>{if(checkTest(j.test,E,R)&&checkModuleType(j.type,E)&&checkModuleLayer(j.layer,E)){$.push(v)}}))}}const fn=(v,E)=>{let $=[];for(const j of R){j(v,E,$)}return $};return fn}return()=>null};const checkTest=(v,E,R)=>{if(v===undefined)return true;if(typeof v==="function"){return v(E,R)}if(typeof v==="boolean")return v;if(typeof v==="string"){const R=E.nameForCondition();return R&&R.startsWith(v)}if(v instanceof RegExp){const R=E.nameForCondition();return R&&v.test(R)}return false};const checkModuleType=(v,E)=>{if(v===undefined)return true;if(typeof v==="function"){return v(E.type)}if(typeof v==="string"){const R=E.type;return v===R}if(v instanceof RegExp){const R=E.type;return v.test(R)}return false};const checkModuleLayer=(v,E)=>{if(v===undefined)return true;if(typeof v==="function"){return v(E.layer)}if(typeof v==="string"){const R=E.layer;return v===""?!R:R&&R.startsWith(v)}if(v instanceof RegExp){const R=E.layer;return v.test(R)}return false};const createCacheGroupSource=(v,E,R)=>{const $=normalizeSizes(v.minSize,R);const j=normalizeSizes(v.minSizeReduction,R);const N=normalizeSizes(v.maxSize,R);return{key:E,priority:v.priority,getName:normalizeName(v.name),chunksFilter:normalizeChunksFilter(v.chunks),enforce:v.enforce,minSize:$,minSizeReduction:j,minRemainingSize:mergeSizes(normalizeSizes(v.minRemainingSize,R),$),enforceSizeThreshold:normalizeSizes(v.enforceSizeThreshold,R),maxAsyncSize:mergeSizes(normalizeSizes(v.maxAsyncSize,R),N),maxInitialSize:mergeSizes(normalizeSizes(v.maxInitialSize,R),N),minChunks:v.minChunks,maxAsyncRequests:v.maxAsyncRequests,maxInitialRequests:v.maxInitialRequests,filename:v.filename,idHint:v.idHint,automaticNameDelimiter:v.automaticNameDelimiter,reuseExistingChunk:v.reuseExistingChunk,usedExports:v.usedExports}};v.exports=class SplitChunksPlugin{constructor(v={}){const E=v.defaultSizeTypes||["javascript","unknown"];const R=v.fallbackCacheGroup||{};const $=normalizeSizes(v.minSize,E);const j=normalizeSizes(v.minSizeReduction,E);const N=normalizeSizes(v.maxSize,E);this.options={chunksFilter:normalizeChunksFilter(v.chunks||"all"),defaultSizeTypes:E,minSize:$,minSizeReduction:j,minRemainingSize:mergeSizes(normalizeSizes(v.minRemainingSize,E),$),enforceSizeThreshold:normalizeSizes(v.enforceSizeThreshold,E),maxAsyncSize:mergeSizes(normalizeSizes(v.maxAsyncSize,E),N),maxInitialSize:mergeSizes(normalizeSizes(v.maxInitialSize,E),N),minChunks:v.minChunks||1,maxAsyncRequests:v.maxAsyncRequests||1,maxInitialRequests:v.maxInitialRequests||1,hidePathInfo:v.hidePathInfo||false,filename:v.filename||undefined,getCacheGroups:normalizeCacheGroups(v.cacheGroups,E),getName:v.name?normalizeName(v.name):defaultGetName,automaticNameDelimiter:v.automaticNameDelimiter,usedExports:v.usedExports,fallbackCacheGroup:{chunksFilter:normalizeChunksFilter(R.chunks||v.chunks||"all"),minSize:mergeSizes(normalizeSizes(R.minSize,E),$),maxAsyncSize:mergeSizes(normalizeSizes(R.maxAsyncSize,E),normalizeSizes(R.maxSize,E),normalizeSizes(v.maxAsyncSize,E),normalizeSizes(v.maxSize,E)),maxInitialSize:mergeSizes(normalizeSizes(R.maxInitialSize,E),normalizeSizes(R.maxSize,E),normalizeSizes(v.maxInitialSize,E),normalizeSizes(v.maxSize,E)),automaticNameDelimiter:R.automaticNameDelimiter||v.automaticNameDelimiter||"~"}};this._cacheGroupCache=new WeakMap}_getCacheGroup(v){const E=this._cacheGroupCache.get(v);if(E!==undefined)return E;const R=mergeSizes(v.minSize,v.enforce?undefined:this.options.minSize);const $=mergeSizes(v.minSizeReduction,v.enforce?undefined:this.options.minSizeReduction);const j=mergeSizes(v.minRemainingSize,v.enforce?undefined:this.options.minRemainingSize);const N=mergeSizes(v.enforceSizeThreshold,v.enforce?undefined:this.options.enforceSizeThreshold);const q={key:v.key,priority:v.priority||0,chunksFilter:v.chunksFilter||this.options.chunksFilter,minSize:R,minSizeReduction:$,minRemainingSize:j,enforceSizeThreshold:N,maxAsyncSize:mergeSizes(v.maxAsyncSize,v.enforce?undefined:this.options.maxAsyncSize),maxInitialSize:mergeSizes(v.maxInitialSize,v.enforce?undefined:this.options.maxInitialSize),minChunks:v.minChunks!==undefined?v.minChunks:v.enforce?1:this.options.minChunks,maxAsyncRequests:v.maxAsyncRequests!==undefined?v.maxAsyncRequests:v.enforce?Infinity:this.options.maxAsyncRequests,maxInitialRequests:v.maxInitialRequests!==undefined?v.maxInitialRequests:v.enforce?Infinity:this.options.maxInitialRequests,getName:v.getName!==undefined?v.getName:this.options.getName,usedExports:v.usedExports!==undefined?v.usedExports:this.options.usedExports,filename:v.filename!==undefined?v.filename:this.options.filename,automaticNameDelimiter:v.automaticNameDelimiter!==undefined?v.automaticNameDelimiter:this.options.automaticNameDelimiter,idHint:v.idHint!==undefined?v.idHint:v.key,reuseExistingChunk:v.reuseExistingChunk||false,_validateSize:hasNonZeroSizes(R),_validateRemainingSize:hasNonZeroSizes(j),_minSizeForMaxSize:mergeSizes(v.minSize,this.options.minSize),_conditionalEnforce:hasNonZeroSizes(N)};this._cacheGroupCache.set(v,q);return q}apply(v){const E=_e.bindContextCache(v.context,v.root);v.hooks.thisCompilation.tap("SplitChunksPlugin",(v=>{const R=v.getLogger("webpack.SplitChunksPlugin");let ce=false;v.hooks.unseal.tap("SplitChunksPlugin",(()=>{ce=false}));v.hooks.optimizeChunks.tap({name:"SplitChunksPlugin",stage:j},(j=>{if(ce)return;ce=true;R.time("prepare");const le=v.chunkGraph;const me=v.moduleGraph;const _e=new Map;const Ne=BigInt("0");const Be=BigInt("1");const Le=Be<{const E=v[Symbol.iterator]();let R=E.next();if(R.done)return Ne;const $=R.value;R=E.next();if(R.done)return $;let j=_e.get($)|_e.get(R.value);while(!(R=E.next()).done){const v=_e.get(R.value);j=j^v}return j};const keyToString=v=>{if(typeof v==="bigint")return v.toString(16);return _e.get(v).toString(16)};const Ue=Ie((()=>{const E=new Map;const R=new Set;for(const $ of v.modules){const v=le.getModuleChunksIterable($);const j=getKey(v);if(typeof j==="bigint"){if(!E.has(j)){E.set(j,new Set(v))}}else{R.add(j)}}return{chunkSetsInGraph:E,singleChunkSets:R}}));const groupChunksByExports=v=>{const E=me.getExportsInfo(v);const R=new Map;for(const $ of le.getModuleChunksIterable(v)){const v=E.getUsageKey($.runtime);const j=R.get(v);if(j!==undefined){j.push($)}else{R.set(v,[$])}}return R.values()};const Ge=new Map;const He=Ie((()=>{const E=new Map;const R=new Set;for(const $ of v.modules){const v=Array.from(groupChunksByExports($));Ge.set($,v);for(const $ of v){if($.length===1){R.add($[0])}else{const v=getKey($);if(!E.has(v)){E.set(v,new Set($))}}}}return{chunkSetsInGraph:E,singleChunkSets:R}}));const groupChunkSetsByCount=v=>{const E=new Map;for(const R of v){const v=R.size;let $=E.get(v);if($===undefined){$=[];E.set(v,$)}$.push(R)}return E};const We=Ie((()=>groupChunkSetsByCount(Ue().chunkSetsInGraph.values())));const Qe=Ie((()=>groupChunkSetsByCount(He().chunkSetsInGraph.values())));const createGetCombinations=(v,E,R)=>{const j=new Map;return N=>{const q=j.get(N);if(q!==undefined)return q;if(N instanceof $){const v=[N];j.set(N,v);return v}const ie=v.get(N);const ae=[ie];for(const[v,E]of R){if(v{const{chunkSetsInGraph:v,singleChunkSets:E}=Ue();return createGetCombinations(v,E,We())}));const getCombinations=v=>Je()(v);const Ve=Ie((()=>{const{chunkSetsInGraph:v,singleChunkSets:E}=He();return createGetCombinations(v,E,Qe())}));const getExportsCombinations=v=>Ve()(v);const Ke=new WeakMap;const getSelectedChunks=(v,E)=>{let R=Ke.get(v);if(R===undefined){R=new WeakMap;Ke.set(v,R)}let j=R.get(E);if(j===undefined){const N=[];if(v instanceof $){if(E(v))N.push(v)}else{for(const R of v){if(E(R))N.push(R)}}j={chunks:N,key:getKey(N)};R.set(E,j)}return j};const Xe=new Map;const Ye=new Set;const Ze=new Map;const addModuleToChunksInfoMap=(E,R,$,j,q)=>{if($.length{const v=le.getModuleChunksIterable(E);const R=getKey(v);return getCombinations(R)}));const j=Ie((()=>{He();const v=new Set;const R=Ge.get(E);for(const E of R){const R=getKey(E);for(const E of getExportsCombinations(R))v.add(E)}return v}));let N=0;for(const q of v){const v=this._getCacheGroup(q);const G=v.usedExports?j():R();for(const R of G){const j=R instanceof $?1:R.size;if(j{for(const R of v.modules){const $=R.getSourceTypes();if(E.some((v=>$.has(v)))){v.modules.delete(R);for(const E of $){v.sizes[E]-=R.size(E)}}}};const removeMinSizeViolatingModules=v=>{if(!v.cacheGroup._validateSize)return false;const E=getViolatingMinSizes(v.sizes,v.cacheGroup.minSize);if(E===undefined)return false;removeModulesWithSourceType(v,E);return v.modules.size===0};for(const[v,E]of Ze){if(removeMinSizeViolatingModules(E)){Ze.delete(v)}else if(!checkMinSizeReduction(E.sizes,E.cacheGroup.minSizeReduction,E.chunks.size)){Ze.delete(v)}}const tt=new Map;while(Ze.size>0){let E;let R;for(const v of Ze){const $=v[0];const j=v[1];if(R===undefined||compareEntries(R,j)<0){R=j;E=$}}const $=R;Ze.delete(E);let j=$.name;let N;let q=false;let G=false;if(j){const E=v.namedChunks.get(j);if(E!==undefined){N=E;const v=$.chunks.size;$.chunks.delete(N);q=$.chunks.size!==v}}else if($.cacheGroup.reuseExistingChunk){e:for(const v of $.chunks){if(le.getNumberOfChunkModules(v)!==$.modules.size){continue}if($.chunks.size>1&&le.getNumberOfEntryModules(v)>0){continue}for(const E of $.modules){if(!le.isModuleInChunk(E,v)){continue e}}if(!N||!N.name){N=v}else if(v.name&&v.name.length=E){ae.delete(v)}}}e:for(const v of ae){for(const E of $.modules){if(le.isModuleInChunk(E,v))continue e}ae.delete(v)}if(ae.size<$.chunks.size){if(q)ae.add(N);if(ae.size>=$.cacheGroup.minChunks){const v=Array.from(ae);for(const E of $.modules){addModuleToChunksInfoMap($.cacheGroup,$.cacheGroupIndex,v,getKey(ae),E)}}continue}if(!ie&&$.cacheGroup._validateRemainingSize&&ae.size===1){const[v]=ae;let R=Object.create(null);for(const E of le.getChunkModulesIterable(v)){if(!$.modules.has(E)){for(const v of E.getSourceTypes()){R[v]=(R[v]||0)+E.size(v)}}}const j=getViolatingMinSizes(R,$.cacheGroup.minRemainingSize);if(j!==undefined){const v=$.modules.size;removeModulesWithSourceType($,j);if($.modules.size>0&&$.modules.size!==v){Ze.set(E,$)}continue}}if(N===undefined){N=v.addChunk(j)}for(const v of ae){v.split(N)}N.chunkReason=(N.chunkReason?N.chunkReason+", ":"")+(G?"reused as split chunk":"split chunk");if($.cacheGroup.key){N.chunkReason+=` (cache group: ${$.cacheGroup.key})`}if(j){N.chunkReason+=` (name: ${j})`}if($.cacheGroup.filename){N.filenameTemplate=$.cacheGroup.filename}if($.cacheGroup.idHint){N.idNameHints.add($.cacheGroup.idHint)}if(!G){for(const E of $.modules){if(!E.chunkCondition(N,v))continue;le.connectChunkAndModule(N,E);for(const v of ae){le.disconnectChunkAndModule(v,E)}}}else{for(const v of $.modules){for(const E of ae){le.disconnectChunkAndModule(E,v)}}}if(Object.keys($.cacheGroup.maxAsyncSize).length>0||Object.keys($.cacheGroup.maxInitialSize).length>0){const v=tt.get(N);tt.set(N,{minSize:v?combineSizes(v.minSize,$.cacheGroup._minSizeForMaxSize,Math.max):$.cacheGroup.minSize,maxAsyncSize:v?combineSizes(v.maxAsyncSize,$.cacheGroup.maxAsyncSize,Math.min):$.cacheGroup.maxAsyncSize,maxInitialSize:v?combineSizes(v.maxInitialSize,$.cacheGroup.maxInitialSize,Math.min):$.cacheGroup.maxInitialSize,automaticNameDelimiter:$.cacheGroup.automaticNameDelimiter,keys:v?v.keys.concat($.cacheGroup.key):[$.cacheGroup.key]})}for(const[v,E]of Ze){if(isOverlap(E.chunks,ae)){let R=false;for(const v of $.modules){if(E.modules.has(v)){E.modules.delete(v);for(const R of v.getSourceTypes()){E.sizes[R]-=v.size(R)}R=true}}if(R){if(E.modules.size===0){Ze.delete(v);continue}if(removeMinSizeViolatingModules(E)||!checkMinSizeReduction(E.sizes,E.cacheGroup.minSizeReduction,E.chunks.size)){Ze.delete(v);continue}}}}}R.timeEnd("queue");R.time("maxSize");const nt=new Set;const{outputOptions:st}=v;const{fallbackCacheGroup:rt}=this.options;for(const R of Array.from(v.chunks)){const $=tt.get(R);const{minSize:j,maxAsyncSize:N,maxInitialSize:G,automaticNameDelimiter:ie}=$||rt;if(!$&&!rt.chunksFilter(R))continue;let ae;if(R.isOnlyInitial()){ae=G}else if(R.canBeInitial()){ae=combineSizes(N,G,Math.min)}else{ae=N}if(Object.keys(ae).length===0){continue}for(const E of Object.keys(ae)){const R=ae[E];const N=j[E];if(typeof N==="number"&&N>R){const E=$&&$.keys;const j=`${E&&E.join()} ${N} ${R}`;if(!nt.has(j)){nt.add(j);v.warnings.push(new Me(E,N,R))}}}const ce=Oe({minSize:j,maxSize:mapObject(ae,((v,E)=>{const R=j[E];return typeof R==="number"?Math.max(v,R):v})),items:le.getChunkModulesIterable(R),getKey(v){const R=Te.get(v);if(R!==undefined)return R;const $=E(v.identifier());const j=v.nameForCondition&&v.nameForCondition();const N=j?E(j):$.replace(/^.*!|\?[^?!]*$/g,"");const G=N+ie+hashFilename($,st);const ae=q(G);Te.set(v,ae);return ae},getSize(v){const E=Object.create(null);for(const R of v.getSourceTypes()){E[R]=v.size(R)}return E}});if(ce.length<=1){continue}for(let E=0;E100){N=N.slice(0,100)+ie+hashFilename(N,st)}if(E!==ce.length-1){const E=v.addChunk(N);R.split(E);E.chunkReason=R.chunkReason;for(const j of $.items){if(!j.chunkCondition(E,v)){continue}le.connectChunkAndModule(E,j);le.disconnectChunkAndModule(R,j)}}else{R.name=N}}}R.timeEnd("maxSize")}))}))}}},41778:function(v,E,R){"use strict";const{formatSize:$}=R(67309);const j=R(27154);v.exports=class AssetsOverSizeLimitWarning extends j{constructor(v,E){const R=v.map((v=>`\n ${v.name} (${$(v.size)})`)).join("");super(`asset size limit: The following asset(s) exceed the recommended size limit (${$(E)}).\nThis can impact web performance.\nAssets: ${R}`);this.name="AssetsOverSizeLimitWarning";this.assets=v}}},59439:function(v,E,R){"use strict";const{formatSize:$}=R(67309);const j=R(27154);v.exports=class EntrypointsOverSizeLimitWarning extends j{constructor(v,E){const R=v.map((v=>`\n ${v.name} (${$(v.size)})\n${v.files.map((v=>` ${v}`)).join("\n")}`)).join("");super(`entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (${$(E)}). This can impact web performance.\nEntrypoints:${R}\n`);this.name="EntrypointsOverSizeLimitWarning";this.entrypoints=v}}},91208:function(v,E,R){"use strict";const $=R(27154);v.exports=class NoAsyncChunksWarning extends ${constructor(){super("webpack performance recommendations: \n"+"You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\n"+"For more info visit https://webpack.js.org/guides/code-splitting/");this.name="NoAsyncChunksWarning"}}},96740:function(v,E,R){"use strict";const{find:$}=R(73268);const j=R(41778);const N=R(59439);const q=R(91208);const G=new WeakSet;const excludeSourceMap=(v,E,R)=>!R.development;v.exports=class SizeLimitsPlugin{constructor(v){this.hints=v.hints;this.maxAssetSize=v.maxAssetSize;this.maxEntrypointSize=v.maxEntrypointSize;this.assetFilter=v.assetFilter}static isOverSizeLimit(v){return G.has(v)}apply(v){const E=this.maxEntrypointSize;const R=this.maxAssetSize;const ie=this.hints;const ae=this.assetFilter||excludeSourceMap;v.hooks.afterEmit.tap("SizeLimitsPlugin",(v=>{const ce=[];const getEntrypointSize=E=>{let R=0;for(const $ of E.getFiles()){const E=v.getAsset($);if(E&&ae(E.name,E.source,E.info)&&E.source){R+=E.info.size||E.source.size()}}return R};const le=[];for(const{name:E,source:$,info:j}of v.getAssets()){if(!ae(E,$,j)||!$){continue}const v=j.size||$.size();if(v>R){le.push({name:E,size:v});G.add($)}}const fileFilter=E=>{const R=v.getAsset(E);return R&&ae(R.name,R.source,R.info)};const me=[];for(const[R,$]of v.entrypoints){const v=getEntrypointSize($);if(v>E){me.push({name:R,size:v,files:$.getFiles().filter(fileFilter)});G.add($)}}if(ie){if(le.length>0){ce.push(new j(le,R))}if(me.length>0){ce.push(new N(me,E))}if(ce.length>0){const E=$(v.chunks,(v=>!v.canBeInitial()));if(!E){ce.push(new q)}if(ie==="error"){v.errors.push(...ce)}else{v.warnings.push(...ce)}}}}))}}},72913:function(v,E,R){"use strict";const $=R(93496);const j=R(43841);class ChunkPrefetchFunctionRuntimeModule extends ${constructor(v,E,R){super(`chunk ${v} function`);this.childType=v;this.runtimeFunction=E;this.runtimeHandlers=R}generate(){const{runtimeFunction:v,runtimeHandlers:E}=this;const{runtimeTemplate:R}=this.compilation;return j.asString([`${E} = {};`,`${v} = ${R.basicFunction("chunkId",[`Object.keys(${E}).map(${R.basicFunction("key",`${E}[key](chunkId);`)});`])}`])}}v.exports=ChunkPrefetchFunctionRuntimeModule},7006:function(v,E,R){"use strict";const $=R(39201);const j=R(72913);const N=R(80767);const q=R(38730);const G=R(89870);class ChunkPrefetchPreloadPlugin{apply(v){v.hooks.compilation.tap("ChunkPrefetchPreloadPlugin",(v=>{v.hooks.additionalChunkRuntimeRequirements.tap("ChunkPrefetchPreloadPlugin",((E,R,{chunkGraph:j})=>{if(j.getNumberOfEntryModules(E)===0)return;const q=E.getChildrenOfTypeInOrder(j,"prefetchOrder");if(q){R.add($.prefetchChunk);R.add($.onChunksLoaded);v.addRuntimeModule(E,new N(q))}}));v.hooks.additionalTreeRuntimeRequirements.tap("ChunkPrefetchPreloadPlugin",((E,R,{chunkGraph:j})=>{const N=E.getChildIdsByOrdersMap(j,false);if(N.prefetch){R.add($.prefetchChunk);v.addRuntimeModule(E,new q(N.prefetch))}if(N.preload){R.add($.preloadChunk);v.addRuntimeModule(E,new G(N.preload))}}));v.hooks.runtimeRequirementInTree.for($.prefetchChunk).tap("ChunkPrefetchPreloadPlugin",((E,R)=>{v.addRuntimeModule(E,new j("prefetch",$.prefetchChunk,$.prefetchChunkHandlers));R.add($.prefetchChunkHandlers)}));v.hooks.runtimeRequirementInTree.for($.preloadChunk).tap("ChunkPrefetchPreloadPlugin",((E,R)=>{v.addRuntimeModule(E,new j("preload",$.preloadChunk,$.preloadChunkHandlers));R.add($.preloadChunkHandlers)}))}))}}v.exports=ChunkPrefetchPreloadPlugin},80767:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class ChunkPrefetchStartupRuntimeModule extends j{constructor(v){super("startup prefetch",j.STAGE_TRIGGER);this.startupChunks=v}generate(){const{startupChunks:v,chunk:E}=this;const{runtimeTemplate:R}=this.compilation;return N.asString(v.map((({onChunks:v,chunks:j})=>`${$.onChunksLoaded}(0, ${JSON.stringify(v.filter((v=>v===E)).map((v=>v.id)))}, ${R.basicFunction("",j.size<3?Array.from(j,(v=>`${$.prefetchChunk}(${JSON.stringify(v.id)});`)):`${JSON.stringify(Array.from(j,(v=>v.id)))}.map(${$.prefetchChunk});`)}, 5);`)))}}v.exports=ChunkPrefetchStartupRuntimeModule},38730:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class ChunkPrefetchTriggerRuntimeModule extends j{constructor(v){super(`chunk prefetch trigger`,j.STAGE_TRIGGER);this.chunkMap=v}generate(){const{chunkMap:v}=this;const{runtimeTemplate:E}=this.compilation;const R=["var chunks = chunkToChildrenMap[chunkId];",`Array.isArray(chunks) && chunks.map(${$.prefetchChunk});`];return N.asString([N.asString([`var chunkToChildrenMap = ${JSON.stringify(v,null,"\t")};`,`${$.ensureChunkHandlers}.prefetch = ${E.expressionFunction(`Promise.all(promises).then(${E.basicFunction("",R)})`,"chunkId, promises")};`])])}}v.exports=ChunkPrefetchTriggerRuntimeModule},89870:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class ChunkPreloadTriggerRuntimeModule extends j{constructor(v){super(`chunk preload trigger`,j.STAGE_TRIGGER);this.chunkMap=v}generate(){const{chunkMap:v}=this;const{runtimeTemplate:E}=this.compilation;const R=["var chunks = chunkToChildrenMap[chunkId];",`Array.isArray(chunks) && chunks.map(${$.preloadChunk});`];return N.asString([N.asString([`var chunkToChildrenMap = ${JSON.stringify(v,null,"\t")};`,`${$.ensureChunkHandlers}.preload = ${E.basicFunction("chunkId",R)};`])])}}v.exports=ChunkPreloadTriggerRuntimeModule},19110:function(v){"use strict";class BasicEffectRulePlugin{constructor(v,E){this.ruleProperty=v;this.effectType=E||v}apply(v){v.hooks.rule.tap("BasicEffectRulePlugin",((v,E,R,$,j)=>{if(R.has(this.ruleProperty)){R.delete(this.ruleProperty);const v=E[this.ruleProperty];$.effects.push({type:this.effectType,value:v})}}))}}v.exports=BasicEffectRulePlugin},85732:function(v){"use strict";class BasicMatcherRulePlugin{constructor(v,E,R){this.ruleProperty=v;this.dataProperty=E||v;this.invert=R||false}apply(v){v.hooks.rule.tap("BasicMatcherRulePlugin",((E,R,$,j)=>{if($.has(this.ruleProperty)){$.delete(this.ruleProperty);const N=R[this.ruleProperty];const q=v.compileCondition(`${E}.${this.ruleProperty}`,N);const G=q.fn;j.conditions.push({property:this.dataProperty,matchWhenEmpty:this.invert?!q.matchWhenEmpty:q.matchWhenEmpty,fn:this.invert?v=>!G(v):G})}}))}}v.exports=BasicMatcherRulePlugin},75802:function(v){"use strict";class ObjectMatcherRulePlugin{constructor(v,E){this.ruleProperty=v;this.dataProperty=E||v}apply(v){const{ruleProperty:E,dataProperty:R}=this;v.hooks.rule.tap("ObjectMatcherRulePlugin",(($,j,N,q)=>{if(N.has(E)){N.delete(E);const G=j[E];for(const j of Object.keys(G)){const N=j.split(".");const ie=v.compileCondition(`${$}.${E}.${j}`,G[j]);q.conditions.push({property:[R,...N],matchWhenEmpty:ie.matchWhenEmpty,fn:ie.fn})}}}))}}v.exports=ObjectMatcherRulePlugin},53059:function(v,E,R){"use strict";const{SyncHook:$}=R(44217);class RuleSetCompiler{constructor(v){this.hooks=Object.freeze({rule:new $(["path","rule","unhandledProperties","compiledRule","references"])});if(v){for(const E of v){E.apply(this)}}}compile(v){const E=new Map;const R=this.compileRules("ruleSet",v,E);const execRule=(v,E,R)=>{for(const R of E.conditions){const E=R.property;if(Array.isArray(E)){let $=v;for(const v of E){if($&&typeof $==="object"&&Object.prototype.hasOwnProperty.call($,v)){$=$[v]}else{$=undefined;break}}if($!==undefined){if(!R.fn($))return false;continue}}else if(E in v){const $=v[E];if($!==undefined){if(!R.fn($))return false;continue}}if(!R.matchWhenEmpty){return false}}for(const $ of E.effects){if(typeof $==="function"){const E=$(v);for(const v of E){R.push(v)}}else{R.push($)}}if(E.rules){for(const $ of E.rules){execRule(v,$,R)}}if(E.oneOf){for(const $ of E.oneOf){if(execRule(v,$,R)){break}}}return true};return{references:E,exec:v=>{const E=[];for(const $ of R){execRule(v,$,E)}return E}}}compileRules(v,E,R){return E.map(((E,$)=>this.compileRule(`${v}[${$}]`,E,R)))}compileRule(v,E,R){const $=new Set(Object.keys(E).filter((v=>E[v]!==undefined)));const j={conditions:[],effects:[],rules:undefined,oneOf:undefined};this.hooks.rule.call(v,E,$,j,R);if($.has("rules")){$.delete("rules");const N=E.rules;if(!Array.isArray(N))throw this.error(v,N,"Rule.rules must be an array of rules");j.rules=this.compileRules(`${v}.rules`,N,R)}if($.has("oneOf")){$.delete("oneOf");const N=E.oneOf;if(!Array.isArray(N))throw this.error(v,N,"Rule.oneOf must be an array of rules");j.oneOf=this.compileRules(`${v}.oneOf`,N,R)}if($.size>0){throw this.error(v,E,`Properties ${Array.from($).join(", ")} are unknown`)}return j}compileCondition(v,E){if(E===""){return{matchWhenEmpty:true,fn:v=>v===""}}if(!E){throw this.error(v,E,"Expected condition but got falsy value")}if(typeof E==="string"){return{matchWhenEmpty:E.length===0,fn:v=>typeof v==="string"&&v.startsWith(E)}}if(typeof E==="function"){try{return{matchWhenEmpty:E(""),fn:E}}catch(R){throw this.error(v,E,"Evaluation of condition function threw error")}}if(E instanceof RegExp){return{matchWhenEmpty:E.test(""),fn:v=>typeof v==="string"&&E.test(v)}}if(Array.isArray(E)){const R=E.map(((E,R)=>this.compileCondition(`${v}[${R}]`,E)));return this.combineConditionsOr(R)}if(typeof E!=="object"){throw this.error(v,E,`Unexpected ${typeof E} when condition was expected`)}const R=[];for(const $ of Object.keys(E)){const j=E[$];switch($){case"or":if(j){if(!Array.isArray(j)){throw this.error(`${v}.or`,E.and,"Expected array of conditions")}R.push(this.compileCondition(`${v}.or`,j))}break;case"and":if(j){if(!Array.isArray(j)){throw this.error(`${v}.and`,E.and,"Expected array of conditions")}let $=0;for(const E of j){R.push(this.compileCondition(`${v}.and[${$}]`,E));$++}}break;case"not":if(j){const E=this.compileCondition(`${v}.not`,j);const $=E.fn;R.push({matchWhenEmpty:!E.matchWhenEmpty,fn:v=>!$(v)})}break;default:throw this.error(`${v}.${$}`,E[$],`Unexpected property ${$} in condition`)}}if(R.length===0){throw this.error(v,E,"Expected condition, but got empty thing")}return this.combineConditionsAnd(R)}combineConditionsOr(v){if(v.length===0){return{matchWhenEmpty:false,fn:()=>false}}else if(v.length===1){return v[0]}else{return{matchWhenEmpty:v.some((v=>v.matchWhenEmpty)),fn:E=>v.some((v=>v.fn(E)))}}}combineConditionsAnd(v){if(v.length===0){return{matchWhenEmpty:false,fn:()=>false}}else if(v.length===1){return v[0]}else{return{matchWhenEmpty:v.every((v=>v.matchWhenEmpty)),fn:E=>v.every((v=>v.fn(E)))}}}error(v,E,R){return new Error(`Compiling RuleSet failed: ${R} (at ${v}: ${E})`)}}v.exports=RuleSetCompiler},67859:function(v,E,R){"use strict";const $=R(73837);class UseEffectRulePlugin{apply(v){v.hooks.rule.tap("UseEffectRulePlugin",((E,R,j,N,q)=>{const conflictWith=($,N)=>{if(j.has($)){throw v.error(`${E}.${$}`,R[$],`A Rule must not have a '${$}' property when it has a '${N}' property`)}};if(j.has("use")){j.delete("use");j.delete("enforce");conflictWith("loader","use");conflictWith("options","use");const v=R.use;const G=R.enforce;const ie=G?`use-${G}`:"use";const useToEffect=(v,E,R)=>{if(typeof R==="function"){return E=>useToEffectsWithoutIdent(v,R(E))}else{return useToEffectRaw(v,E,R)}};const useToEffectRaw=(v,E,R)=>{if(typeof R==="string"){return{type:ie,value:{loader:R,options:undefined,ident:undefined}}}else{const j=R.loader;const N=R.options;let ie=R.ident;if(N&&typeof N==="object"){if(!ie)ie=E;q.set(ie,N)}if(typeof N==="string"){$.deprecate((()=>{}),`Using a string as loader options is deprecated (${v}.options)`,"DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING")()}return{type:G?`use-${G}`:"use",value:{loader:j,options:N,ident:ie}}}};const useToEffectsWithoutIdent=(v,E)=>{if(Array.isArray(E)){return E.map(((E,R)=>useToEffectRaw(`${v}[${R}]`,"[[missing ident]]",E)))}return[useToEffectRaw(v,"[[missing ident]]",E)]};const useToEffects=(v,E)=>{if(Array.isArray(E)){return E.map(((E,R)=>{const $=`${v}[${R}]`;return useToEffect($,$,E)}))}return[useToEffect(v,v,E)]};if(typeof v==="function"){N.effects.push((R=>useToEffectsWithoutIdent(`${E}.use`,v(R))))}else{for(const R of useToEffects(`${E}.use`,v)){N.effects.push(R)}}}if(j.has("loader")){j.delete("loader");j.delete("options");j.delete("enforce");const G=R.loader;const ie=R.options;const ae=R.enforce;if(G.includes("!")){throw v.error(`${E}.loader`,G,"Exclamation mark separated loader lists has been removed in favor of the 'use' property with arrays")}if(G.includes("?")){throw v.error(`${E}.loader`,G,"Query arguments on 'loader' has been removed in favor of the 'options' property")}if(typeof ie==="string"){$.deprecate((()=>{}),`Using a string as loader options is deprecated (${E}.options)`,"DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING")()}const ce=ie&&typeof ie==="object"?E:undefined;q.set(ce,ie);N.effects.push({type:ae?`use-${ae}`:"use",value:{loader:G,options:ie,ident:ce}})}}))}useItemToEffects(v,E){}}v.exports=UseEffectRulePlugin},57969:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class AsyncModuleRuntimeModule extends N{constructor(){super("async module")}generate(){const{runtimeTemplate:v}=this.compilation;const E=$.asyncModule;return j.asString(['var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";','var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";','var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";',`var resolveQueue = ${v.basicFunction("queue",["if(queue && !queue.d) {",j.indent(["queue.d = 1;",`queue.forEach(${v.expressionFunction("fn.r--","fn")});`,`queue.forEach(${v.expressionFunction("fn.r-- ? fn.r++ : fn()","fn")});`]),"}"])}`,`var wrapDeps = ${v.returningFunction(`deps.map(${v.basicFunction("dep",['if(dep !== null && typeof dep === "object") {',j.indent(["if(dep[webpackQueues]) return dep;","if(dep.then) {",j.indent(["var queue = [];","queue.d = 0;",`dep.then(${v.basicFunction("r",["obj[webpackExports] = r;","resolveQueue(queue);"])}, ${v.basicFunction("e",["obj[webpackError] = e;","resolveQueue(queue);"])});`,"var obj = {};",`obj[webpackQueues] = ${v.expressionFunction(`fn(queue)`,"fn")};`,"return obj;"]),"}"]),"}","var ret = {};",`ret[webpackQueues] = ${v.emptyFunction()};`,"ret[webpackExports] = dep;","return ret;"])})`,"deps")};`,`${E} = ${v.basicFunction("module, body, hasAwait",["var queue;","hasAwait && ((queue = []).d = 1);","var depQueues = new Set();","var exports = module.exports;","var currentDeps;","var outerResolve;","var reject;",`var promise = new Promise(${v.basicFunction("resolve, rej",["reject = rej;","outerResolve = resolve;"])});`,"promise[webpackExports] = exports;",`promise[webpackQueues] = ${v.expressionFunction(`queue && fn(queue), depQueues.forEach(fn), promise["catch"](${v.emptyFunction()})`,"fn")};`,"module.exports = promise;",`body(${v.basicFunction("deps",["currentDeps = wrapDeps(deps);","var fn;",`var getResult = ${v.returningFunction(`currentDeps.map(${v.basicFunction("d",["if(d[webpackError]) throw d[webpackError];","return d[webpackExports];"])})`)}`,`var promise = new Promise(${v.basicFunction("resolve",[`fn = ${v.expressionFunction("resolve(getResult)","")};`,"fn.r = 0;",`var fnQueue = ${v.expressionFunction("q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))","q")};`,`currentDeps.map(${v.expressionFunction("dep[webpackQueues](fnQueue)","dep")});`])});`,"return fn.r ? promise : getResult();"])}, ${v.expressionFunction("(err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)","err")});`,"queue && (queue.d = 0);"])};`])}}v.exports=AsyncModuleRuntimeModule},48178:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const q=R(36109);const{getUndoPath:G}=R(20162);class AutoPublicPathRuntimeModule extends j{constructor(){super("publicPath",j.STAGE_BASIC)}generate(){const{compilation:v}=this;const{scriptType:E,importMetaName:R,path:j}=v.outputOptions;const ie=v.getPath(q.getChunkFilenameTemplate(this.chunk,v.outputOptions),{chunk:this.chunk,contentHashType:"javascript"});const ae=G(ie,j,false);return N.asString(["var scriptUrl;",E==="module"?`if (typeof ${R}.url === "string") scriptUrl = ${R}.url`:N.asString([`if (${$.global}.importScripts) scriptUrl = ${$.global}.location + "";`,`var document = ${$.global}.document;`,"if (!scriptUrl && document) {",N.indent([`if (document.currentScript)`,N.indent(`scriptUrl = document.currentScript.src`),"if (!scriptUrl) {",N.indent(['var scripts = document.getElementsByTagName("script");',"if(scripts.length) scriptUrl = scripts[scripts.length - 1].src"]),"}"]),"}"]),"// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration",'// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.','if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");','scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/");',!ae?`${$.publicPath} = scriptUrl;`:`${$.publicPath} = scriptUrl + ${JSON.stringify(ae)};`])}}v.exports=AutoPublicPathRuntimeModule},60758:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class BaseUriRuntimeModule extends j{constructor(){super("base uri",j.STAGE_ATTACH)}generate(){const{chunk:v}=this;const E=v.getEntryOptions();return`${$.baseURI} = ${E.baseUri===undefined?"undefined":JSON.stringify(E.baseUri)};`}}v.exports=BaseUriRuntimeModule},83162:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class ChunkNameRuntimeModule extends j{constructor(v){super("chunkName");this.chunkName=v}generate(){return`${$.chunkName} = ${JSON.stringify(this.chunkName)};`}}v.exports=ChunkNameRuntimeModule},75410:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class CompatGetDefaultExportRuntimeModule extends N{constructor(){super("compat get default export")}generate(){const{runtimeTemplate:v}=this.compilation;const E=$.compatGetDefaultExport;return j.asString(["// getDefaultExport function for compatibility with non-harmony modules",`${E} = ${v.basicFunction("module",["var getter = module && module.__esModule ?",j.indent([`${v.returningFunction("module['default']")} :`,`${v.returningFunction("module")};`]),`${$.definePropertyGetters}(getter, { a: getter });`,"return getter;"])};`])}}v.exports=CompatGetDefaultExportRuntimeModule},28349:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class CompatRuntimeModule extends j{constructor(){super("compat",j.STAGE_ATTACH);this.fullHash=true}generate(){const{chunkGraph:v,chunk:E,compilation:R}=this;const{runtimeTemplate:j,mainTemplate:N,moduleTemplates:q,dependencyTemplates:G}=R;const ie=N.hooks.bootstrap.call("",E,R.hash||"XXXX",q.javascript,G);const ae=N.hooks.localVars.call("",E,R.hash||"XXXX");const ce=N.hooks.requireExtensions.call("",E,R.hash||"XXXX");const le=v.getTreeRuntimeRequirements(E);let me="";if(le.has($.ensureChunk)){const v=N.hooks.requireEnsure.call("",E,R.hash||"XXXX","chunkId");if(v){me=`${$.ensureChunkHandlers}.compat = ${j.basicFunction("chunkId, promises",v)};`}}return[ie,ae,me,ce].filter(Boolean).join("\n")}shouldIsolate(){return false}}v.exports=CompatRuntimeModule},82865:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class CreateFakeNamespaceObjectRuntimeModule extends N{constructor(){super("create fake namespace object")}generate(){const{runtimeTemplate:v}=this.compilation;const E=$.createFakeNamespaceObject;return j.asString([`var getProto = Object.getPrototypeOf ? ${v.returningFunction("Object.getPrototypeOf(obj)","obj")} : ${v.returningFunction("obj.__proto__","obj")};`,"var leafPrototypes;","// create a fake namespace object","// mode & 1: value is a module id, require it","// mode & 2: merge all properties of value into the ns","// mode & 4: return value when already ns object","// mode & 16: return value when it's Promise-like","// mode & 8|1: behave like require",`${E} = function(value, mode) {`,j.indent([`if(mode & 1) value = this(value);`,`if(mode & 8) return value;`,"if(typeof value === 'object' && value) {",j.indent(["if((mode & 4) && value.__esModule) return value;","if((mode & 16) && typeof value.then === 'function') return value;"]),"}","var ns = Object.create(null);",`${$.makeNamespaceObject}(ns);`,"var def = {};","leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];","for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {",j.indent([`Object.getOwnPropertyNames(current).forEach(${v.expressionFunction(`def[key] = ${v.returningFunction("value[key]","")}`,"key")});`]),"}",`def['default'] = ${v.returningFunction("value","")};`,`${$.definePropertyGetters}(ns, def);`,"return ns;"]),"};"])}}v.exports=CreateFakeNamespaceObjectRuntimeModule},44263:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class CreateScriptRuntimeModule extends N{constructor(){super("trusted types script")}generate(){const{compilation:v}=this;const{runtimeTemplate:E,outputOptions:R}=v;const{trustedTypes:N}=R;const q=$.createScript;return j.asString(`${q} = ${E.returningFunction(N?`${$.getTrustedTypesPolicy}().createScript(script)`:"script","script")};`)}}v.exports=CreateScriptRuntimeModule},71822:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class CreateScriptUrlRuntimeModule extends N{constructor(){super("trusted types script url")}generate(){const{compilation:v}=this;const{runtimeTemplate:E,outputOptions:R}=v;const{trustedTypes:N}=R;const q=$.createScriptUrl;return j.asString(`${q} = ${E.returningFunction(N?`${$.getTrustedTypesPolicy}().createScriptURL(url)`:"url","url")};`)}}v.exports=CreateScriptUrlRuntimeModule},62277:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class DefinePropertyGettersRuntimeModule extends N{constructor(){super("define property getters")}generate(){const{runtimeTemplate:v}=this.compilation;const E=$.definePropertyGetters;return j.asString(["// define getter functions for harmony exports",`${E} = ${v.basicFunction("exports, definition",[`for(var key in definition) {`,j.indent([`if(${$.hasOwnProperty}(definition, key) && !${$.hasOwnProperty}(exports, key)) {`,j.indent(["Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });"]),"}"]),"}"])};`])}}v.exports=DefinePropertyGettersRuntimeModule},5079:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class EnsureChunkRuntimeModule extends j{constructor(v){super("ensure chunk");this.runtimeRequirements=v}generate(){const{runtimeTemplate:v}=this.compilation;if(this.runtimeRequirements.has($.ensureChunkHandlers)){const E=$.ensureChunkHandlers;return N.asString([`${E} = {};`,"// This file contains only the entry chunk.","// The chunk loading function for additional chunks",`${$.ensureChunk} = ${v.basicFunction("chunkId",[`return Promise.all(Object.keys(${E}).reduce(${v.basicFunction("promises, key",[`${E}[key](chunkId, promises);`,"return promises;"])}, []));`])};`])}else{return N.asString(["// The chunk loading function for additional chunks","// Since all referenced chunks are already included","// in this file, this function is empty here.",`${$.ensureChunk} = ${v.returningFunction("Promise.resolve()")};`])}}}v.exports=EnsureChunkRuntimeModule},44033:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{first:q}=R(73268);class GetChunkFilenameRuntimeModule extends j{constructor(v,E,R,$,j){super(`get ${E} chunk filename`);this.contentType=v;this.global=R;this.getFilenameForChunk=$;this.allChunks=j;this.dependentHash=true}generate(){const{global:v,chunk:E,chunkGraph:R,contentType:j,getFilenameForChunk:G,allChunks:ie,compilation:ae}=this;const{runtimeTemplate:ce}=ae;const le=new Map;let me=0;let _e;const addChunk=v=>{const E=G(v);if(E){let R=le.get(E);if(R===undefined){le.set(E,R=new Set)}R.add(v);if(typeof E==="string"){if(R.size{const unquotedStringify=E=>{const R=`${E}`;if(R.length>=5&&R===`${v.id}`){return'" + chunkId + "'}const $=JSON.stringify(R);return $.slice(1,$.length-1)};const unquotedStringifyWithLength=v=>E=>unquotedStringify(`${v}`.slice(0,E));const R=typeof E==="function"?JSON.stringify(E({chunk:v,contentHashType:j})):JSON.stringify(E);const N=ae.getPath(R,{hash:`" + ${$.getFullHash}() + "`,hashWithLength:v=>`" + ${$.getFullHash}().slice(0, ${v}) + "`,chunk:{id:unquotedStringify(v.id),hash:unquotedStringify(v.renderedHash),hashWithLength:unquotedStringifyWithLength(v.renderedHash),name:unquotedStringify(v.name||v.id),contentHash:{[j]:unquotedStringify(v.contentHash[j])},contentHashWithLength:{[j]:unquotedStringifyWithLength(v.contentHash[j])}},contentHashType:j});let q=Me.get(N);if(q===undefined){Me.set(N,q=new Set)}q.add(v.id)};for(const[v,E]of le){if(v!==_e){for(const R of E)addStaticUrl(R,v)}else{for(const v of E)Oe.add(v)}}const createMap=v=>{const E={};let R=false;let $;let j=0;for(const N of Oe){const q=v(N);if(q===N.id){R=true}else{E[N.id]=q;$=N.id;j++}}if(j===0)return"chunkId";if(j===1){return R?`(chunkId === ${JSON.stringify($)} ? ${JSON.stringify(E[$])} : chunkId)`:JSON.stringify(E[$])}return R?`(${JSON.stringify(E)}[chunkId] || chunkId)`:`${JSON.stringify(E)}[chunkId]`};const mapExpr=v=>`" + ${createMap(v)} + "`;const mapExprWithLength=v=>E=>`" + ${createMap((R=>`${v(R)}`.slice(0,E)))} + "`;const Te=_e&&ae.getPath(JSON.stringify(_e),{hash:`" + ${$.getFullHash}() + "`,hashWithLength:v=>`" + ${$.getFullHash}().slice(0, ${v}) + "`,chunk:{id:`" + chunkId + "`,hash:mapExpr((v=>v.renderedHash)),hashWithLength:mapExprWithLength((v=>v.renderedHash)),name:mapExpr((v=>v.name||v.id)),contentHash:{[j]:mapExpr((v=>v.contentHash[j]))},contentHashWithLength:{[j]:mapExprWithLength((v=>v.contentHash[j]))}},contentHashType:j});return N.asString([`// This function allow to reference ${Ie.join(" and ")}`,`${v} = ${ce.basicFunction("chunkId",Me.size>0?["// return url for filenames not based on template",N.asString(Array.from(Me,(([v,E])=>{const R=E.size===1?`chunkId === ${JSON.stringify(q(E))}`:`{${Array.from(E,(v=>`${JSON.stringify(v)}:1`)).join(",")}}[chunkId]`;return`if (${R}) return ${v};`}))),"// return url for filenames based on template",`return ${Te};`]:["// return url for filenames based on template",`return ${Te};`])};`])}}v.exports=GetChunkFilenameRuntimeModule},61126:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class GetFullHashRuntimeModule extends j{constructor(){super("getFullHash");this.fullHash=true}generate(){const{runtimeTemplate:v}=this.compilation;return`${$.getFullHash} = ${v.returningFunction(JSON.stringify(this.compilation.hash||"XXXX"))}`}}v.exports=GetFullHashRuntimeModule},69496:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class GetMainFilenameRuntimeModule extends j{constructor(v,E,R){super(`get ${v} filename`);this.global=E;this.filename=R}generate(){const{global:v,filename:E,compilation:R,chunk:j}=this;const{runtimeTemplate:q}=R;const G=R.getPath(JSON.stringify(E),{hash:`" + ${$.getFullHash}() + "`,hashWithLength:v=>`" + ${$.getFullHash}().slice(0, ${v}) + "`,chunk:j,runtime:j.runtime});return N.asString([`${v} = ${q.returningFunction(G)};`])}}v.exports=GetMainFilenameRuntimeModule},36011:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class GetTrustedTypesPolicyRuntimeModule extends N{constructor(v){super("trusted types policy");this.runtimeRequirements=v}generate(){const{compilation:v}=this;const{runtimeTemplate:E,outputOptions:R}=v;const{trustedTypes:N}=R;const q=$.getTrustedTypesPolicy;return j.asString(["var policy;",`${q} = ${E.basicFunction("",["// Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.","if (policy === undefined) {",j.indent(["policy = {",j.indent([...this.runtimeRequirements.has($.createScript)?[`createScript: ${E.returningFunction("script","script")}`]:[],...this.runtimeRequirements.has($.createScriptUrl)?[`createScriptURL: ${E.returningFunction("url","url")}`]:[]].join(",\n")),"};",...N?['if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {',j.indent([`policy = trustedTypes.createPolicy(${JSON.stringify(N.policyName)}, policy);`]),"}"]:[]]),"}","return policy;"])};`])}}v.exports=GetTrustedTypesPolicyRuntimeModule},91164:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class GlobalRuntimeModule extends j{constructor(){super("global")}generate(){return N.asString([`${$.global} = (function() {`,N.indent(["if (typeof globalThis === 'object') return globalThis;","try {",N.indent("return this || new Function('return this')();"),"} catch (e) {",N.indent("if (typeof window === 'object') return window;"),"}"]),"})();"])}}v.exports=GlobalRuntimeModule},9698:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class HasOwnPropertyRuntimeModule extends j{constructor(){super("hasOwnProperty shorthand")}generate(){const{runtimeTemplate:v}=this.compilation;return N.asString([`${$.hasOwnProperty} = ${v.returningFunction("Object.prototype.hasOwnProperty.call(obj, prop)","obj, prop")}`])}}v.exports=HasOwnPropertyRuntimeModule},17163:function(v,E,R){"use strict";const $=R(93496);class HelperRuntimeModule extends ${constructor(v){super(v)}}v.exports=HelperRuntimeModule},46750:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73002);const N=R(39201);const q=R(43841);const G=R(17163);const ie=new WeakMap;class LoadScriptRuntimeModule extends G{static getCompilationHooks(v){if(!(v instanceof j)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=ie.get(v);if(E===undefined){E={createScript:new $(["source","chunk"])};ie.set(v,E)}return E}constructor(v){super("load script");this._withCreateScriptUrl=v}generate(){const{compilation:v}=this;const{runtimeTemplate:E,outputOptions:R}=v;const{scriptType:$,chunkLoadTimeout:j,crossOriginLoading:G,uniqueName:ie,charset:ae}=R;const ce=N.loadScript;const{createScript:le}=LoadScriptRuntimeModule.getCompilationHooks(v);const me=q.asString(["script = document.createElement('script');",$?`script.type = ${JSON.stringify($)};`:"",ae?"script.charset = 'utf-8';":"",`script.timeout = ${j/1e3};`,`if (${N.scriptNonce}) {`,q.indent(`script.setAttribute("nonce", ${N.scriptNonce});`),"}",ie?'script.setAttribute("data-webpack", dataWebpackPrefix + key);':"",`script.src = ${this._withCreateScriptUrl?`${N.createScriptUrl}(url)`:"url"};`,G?G==="use-credentials"?'script.crossOrigin = "use-credentials";':q.asString(["if (script.src.indexOf(window.location.origin + '/') !== 0) {",q.indent(`script.crossOrigin = ${JSON.stringify(G)};`),"}"]):""]);return q.asString(["var inProgress = {};",ie?`var dataWebpackPrefix = ${JSON.stringify(ie+":")};`:"// data-webpack is not used as build has no uniqueName","// loadScript function to load a script via script tag",`${ce} = ${E.basicFunction("url, done, key, chunkId",["if(inProgress[url]) { inProgress[url].push(done); return; }","var script, needAttach;","if(key !== undefined) {",q.indent(['var scripts = document.getElementsByTagName("script");',"for(var i = 0; i < scripts.length; i++) {",q.indent(["var s = scripts[i];",`if(s.getAttribute("src") == url${ie?' || s.getAttribute("data-webpack") == dataWebpackPrefix + key':""}) { script = s; break; }`]),"}"]),"}","if(!script) {",q.indent(["needAttach = true;",le.call(me,this.chunk)]),"}","inProgress[url] = [done];","var onScriptComplete = "+E.basicFunction("prev, event",q.asString(["// avoid mem leaks in IE.","script.onerror = script.onload = null;","clearTimeout(timeout);","var doneFns = inProgress[url];","delete inProgress[url];","script.parentNode && script.parentNode.removeChild(script);",`doneFns && doneFns.forEach(${E.returningFunction("fn(event)","fn")});`,"if(prev) return prev(event);"])),";",`var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), ${j});`,"script.onerror = onScriptComplete.bind(null, script.onerror);","script.onload = onScriptComplete.bind(null, script.onload);","needAttach && document.head.appendChild(script);"])};`])}}v.exports=LoadScriptRuntimeModule},77159:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class MakeNamespaceObjectRuntimeModule extends N{constructor(){super("make namespace object")}generate(){const{runtimeTemplate:v}=this.compilation;const E=$.makeNamespaceObject;return j.asString(["// define __esModule on exports",`${E} = ${v.basicFunction("exports",["if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {",j.indent(["Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });"]),"}","Object.defineProperty(exports, '__esModule', { value: true });"])};`])}}v.exports=MakeNamespaceObjectRuntimeModule},85856:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class NonceRuntimeModule extends j{constructor(){super("nonce",j.STAGE_ATTACH)}generate(){return`${$.scriptNonce} = undefined;`}}v.exports=NonceRuntimeModule},94800:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class OnChunksLoadedRuntimeModule extends j{constructor(){super("chunk loaded")}generate(){const{compilation:v}=this;const{runtimeTemplate:E}=v;return N.asString(["var deferred = [];",`${$.onChunksLoaded} = ${E.basicFunction("result, chunkIds, fn, priority",["if(chunkIds) {",N.indent(["priority = priority || 0;","for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];","deferred[i] = [chunkIds, fn, priority];","return;"]),"}","var notFulfilled = Infinity;","for (var i = 0; i < deferred.length; i++) {",N.indent([E.destructureArray(["chunkIds","fn","priority"],"deferred[i]"),"var fulfilled = true;","for (var j = 0; j < chunkIds.length; j++) {",N.indent([`if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(${$.onChunksLoaded}).every(${E.returningFunction(`${$.onChunksLoaded}[key](chunkIds[j])`,"key")})) {`,N.indent(["chunkIds.splice(j--, 1);"]),"} else {",N.indent(["fulfilled = false;","if(priority < notFulfilled) notFulfilled = priority;"]),"}"]),"}","if(fulfilled) {",N.indent(["deferred.splice(i--, 1)","var r = fn();","if (r !== undefined) result = r;"]),"}"]),"}","return result;"])};`])}}v.exports=OnChunksLoadedRuntimeModule},86747:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class PublicPathRuntimeModule extends j{constructor(v){super("publicPath",j.STAGE_BASIC);this.publicPath=v}generate(){const{compilation:v,publicPath:E}=this;return`${$.publicPath} = ${JSON.stringify(v.getPath(E||"",{hash:v.hash||"XXXX"}))};`}}v.exports=PublicPathRuntimeModule},89926:function(v,E,R){"use strict";const $=R(39201);const j=R(43841);const N=R(17163);class RelativeUrlRuntimeModule extends N{constructor(){super("relative url")}generate(){const{runtimeTemplate:v}=this.compilation;return j.asString([`${$.relativeUrl} = function RelativeURL(url) {`,j.indent(['var realUrl = new URL(url, "x:/");',"var values = {};","for (var key in realUrl) values[key] = realUrl[key];","values.href = url;",'values.pathname = url.replace(/[?#].*/, "");','values.origin = values.protocol = "";',`values.toString = values.toJSON = ${v.returningFunction("url")};`,"for (var key in values) Object.defineProperty(this, key, { enumerable: true, configurable: true, value: values[key] });"]),"};",`${$.relativeUrl}.prototype = URL.prototype;`])}}v.exports=RelativeUrlRuntimeModule},86841:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class RuntimeIdRuntimeModule extends j{constructor(){super("runtimeId")}generate(){const{chunkGraph:v,chunk:E}=this;const R=E.runtime;if(typeof R!=="string")throw new Error("RuntimeIdRuntimeModule must be in a single runtime");const j=v.getRuntimeId(R);return`${$.runtimeId} = ${JSON.stringify(j)};`}}v.exports=RuntimeIdRuntimeModule},61411:function(v,E,R){"use strict";const $=R(39201);const j=R(56586);const N=R(99213);class StartupChunkDependenciesPlugin{constructor(v){this.chunkLoading=v.chunkLoading;this.asyncChunkLoading=typeof v.asyncChunkLoading==="boolean"?v.asyncChunkLoading:true}apply(v){v.hooks.thisCompilation.tap("StartupChunkDependenciesPlugin",(v=>{const E=v.outputOptions.chunkLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.chunkLoading!==undefined?R.chunkLoading:E;return $===this.chunkLoading};v.hooks.additionalTreeRuntimeRequirements.tap("StartupChunkDependenciesPlugin",((E,R,{chunkGraph:N})=>{if(!isEnabledForChunk(E))return;if(N.hasChunkEntryDependentChunks(E)){R.add($.startup);R.add($.ensureChunk);R.add($.ensureChunkIncludeEntries);v.addRuntimeModule(E,new j(this.asyncChunkLoading))}}));v.hooks.runtimeRequirementInTree.for($.startupEntrypoint).tap("StartupChunkDependenciesPlugin",((E,R)=>{if(!isEnabledForChunk(E))return;R.add($.require);R.add($.ensureChunk);R.add($.ensureChunkIncludeEntries);v.addRuntimeModule(E,new N(this.asyncChunkLoading))}))}))}}v.exports=StartupChunkDependenciesPlugin},56586:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class StartupChunkDependenciesRuntimeModule extends j{constructor(v){super("startup chunk dependencies",j.STAGE_TRIGGER);this.asyncChunkLoading=v}generate(){const{chunkGraph:v,chunk:E,compilation:R}=this;const{runtimeTemplate:j}=R;const q=Array.from(v.getChunkEntryDependentChunksIterable(E)).map((v=>v.id));return N.asString([`var next = ${$.startup};`,`${$.startup} = ${j.basicFunction("",!this.asyncChunkLoading?q.map((v=>`${$.ensureChunk}(${JSON.stringify(v)});`)).concat("return next();"):q.length===1?`return ${$.ensureChunk}(${JSON.stringify(q[0])}).then(next);`:q.length>2?[`return Promise.all(${JSON.stringify(q)}.map(${$.ensureChunk}, __webpack_require__)).then(next);`]:["return Promise.all([",N.indent(q.map((v=>`${$.ensureChunk}(${JSON.stringify(v)})`)).join(",\n")),"]).then(next);"])};`])}}v.exports=StartupChunkDependenciesRuntimeModule},99213:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class StartupEntrypointRuntimeModule extends j{constructor(v){super("startup entrypoint");this.asyncChunkLoading=v}generate(){const{compilation:v}=this;const{runtimeTemplate:E}=v;return`${$.startupEntrypoint} = ${E.basicFunction("result, chunkIds, fn",["// arguments: chunkIds, moduleId are deprecated","var moduleId = chunkIds;",`if(!fn) chunkIds = result, fn = ${E.returningFunction(`__webpack_require__(${$.entryModuleId} = moduleId)`)};`,...this.asyncChunkLoading?[`return Promise.all(chunkIds.map(${$.ensureChunk}, __webpack_require__)).then(${E.basicFunction("",["var r = fn();","return r === undefined ? result : r;"])})`]:[`chunkIds.map(${$.ensureChunk}, __webpack_require__)`,"var r = fn();","return r === undefined ? result : r;"]])}`}}v.exports=StartupEntrypointRuntimeModule},63135:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);class SystemContextRuntimeModule extends j{constructor(){super("__system_context__")}generate(){return`${$.systemContext} = __system_context__;`}}v.exports=SystemContextRuntimeModule},36435:function(v,E,R){"use strict";const $=R(89417);const j=/^data:([^;,]+)?((?:;[^;,]+)*?)(?:;(base64))?,(.*)$/i;const decodeDataURI=v=>{const E=j.exec(v);if(!E)return null;const R=E[3];const $=E[4];return R?Buffer.from($,"base64"):Buffer.from(decodeURIComponent($),"ascii")};class DataUriPlugin{apply(v){v.hooks.compilation.tap("DataUriPlugin",((v,{normalModuleFactory:E})=>{E.hooks.resolveForScheme.for("data").tap("DataUriPlugin",(v=>{const E=j.exec(v.resource);if(E){v.data.mimetype=E[1]||"";v.data.parameters=E[2]||"";v.data.encoding=E[3]||false;v.data.encodedContent=E[4]||""}}));$.getCompilationHooks(v).readResourceForScheme.for("data").tap("DataUriPlugin",(v=>decodeDataURI(v)))}))}}v.exports=DataUriPlugin},17613:function(v,E,R){"use strict";const{URL:$,fileURLToPath:j}=R(57310);const{NormalModule:N}=R(13733);class FileUriPlugin{apply(v){v.hooks.compilation.tap("FileUriPlugin",((v,{normalModuleFactory:E})=>{E.hooks.resolveForScheme.for("file").tap("FileUriPlugin",(v=>{const E=new $(v.resource);const R=j(E);const N=E.search;const q=E.hash;v.path=R;v.query=N;v.fragment=q;v.resource=R+N+q;return true}));const R=N.getCompilationHooks(v);R.readResource.for(undefined).tapAsync("FileUriPlugin",((v,E)=>{const{resourcePath:R}=v;v.addDependency(R);v.fs.readFile(R,E)}))}))}}v.exports=FileUriPlugin},89674:function(v,E,R){"use strict";const $=R(82361);const{extname:j,basename:N}=R(71017);const{URL:q}=R(57310);const{createGunzip:G,createBrotliDecompress:ie,createInflate:ae}=R(59796);const ce=R(89417);const le=R(89699);const me=R(85205);const{mkdirp:_e,dirname:Ie,join:Me}=R(47077);const Oe=R(61374);const Te=Oe((()=>R(13685)));const Ne=Oe((()=>R(95687)));const proxyFetch=(v,E)=>(R,j,N)=>{const G=new $;const doRequest=E=>v.get(R,{...j,...E&&{socket:E}},N).on("error",G.emit.bind(G,"error"));if(E){const{hostname:v,port:$}=new q(E);Te().request({host:v,port:$,method:"CONNECT",path:R.host}).on("connect",((v,E)=>{if(v.statusCode===200){doRequest(E)}})).on("error",(v=>{G.emit("error",new Error(`Failed to connect to proxy server "${E}": ${v.message}`))})).end()}else{doRequest()}return G};let Be=undefined;const Le=le(R(29911),(()=>R(92693)),{name:"Http Uri Plugin",baseDataPath:"options"});const toSafePath=v=>v.replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g,"").replace(/[^a-zA-Z0-9._-]+/g,"_");const computeIntegrity=v=>{const E=me("sha512");E.update(v);const R="sha512-"+E.digest("base64");return R};const verifyIntegrity=(v,E)=>{if(E==="ignore")return true;return computeIntegrity(v)===E};const parseKeyValuePairs=v=>{const E={};for(const R of v.split(",")){const v=R.indexOf("=");if(v>=0){const $=R.slice(0,v).trim();const j=R.slice(v+1).trim();E[$]=j}else{const v=R.trim();if(!v)continue;E[v]=v}}return E};const parseCacheControl=(v,E)=>{let R=true;let $=true;let j=0;if(v){const N=parseKeyValuePairs(v);if(N["no-cache"])R=$=false;if(N["max-age"]&&!isNaN(+N["max-age"])){j=E+ +N["max-age"]*1e3}if(N["must-revalidate"])j=0}return{storeLock:$,storeCache:R,validUntil:j}};const areLockfileEntriesEqual=(v,E)=>v.resolved===E.resolved&&v.integrity===E.integrity&&v.contentType===E.contentType;const entryToString=v=>`resolved: ${v.resolved}, integrity: ${v.integrity}, contentType: ${v.contentType}`;class Lockfile{constructor(){this.version=1;this.entries=new Map}static parse(v){const E=JSON.parse(v);if(E.version!==1)throw new Error(`Unsupported lockfile version ${E.version}`);const R=new Lockfile;for(const v of Object.keys(E)){if(v==="version")continue;const $=E[v];R.entries.set(v,typeof $==="string"?$:{resolved:v,...$})}return R}toString(){let v="{\n";const E=Array.from(this.entries).sort((([v],[E])=>v{let E=false;let R=undefined;let $=undefined;let j=undefined;return N=>{if(E){if($!==undefined)return N(null,$);if(R!==undefined)return N(R);if(j===undefined)j=[N];else j.push(N);return}E=true;v(((v,E)=>{if(v)R=v;else $=E;const q=j;j=undefined;N(v,E);if(q!==undefined)for(const R of q)R(v,E)}))}};const cachedWithKey=(v,E=v)=>{const R=new Map;const resultFn=(E,$)=>{const j=R.get(E);if(j!==undefined){if(j.result!==undefined)return $(null,j.result);if(j.error!==undefined)return $(j.error);if(j.callbacks===undefined)j.callbacks=[$];else j.callbacks.push($);return}const N={result:undefined,error:undefined,callbacks:undefined};R.set(E,N);v(E,((v,E)=>{if(v)N.error=v;else N.result=E;const R=N.callbacks;N.callbacks=undefined;$(v,E);if(R!==undefined)for(const $ of R)$(v,E)}))};resultFn.force=(v,$)=>{const j=R.get(v);if(j!==undefined&&j.force){if(j.result!==undefined)return $(null,j.result);if(j.error!==undefined)return $(j.error);if(j.callbacks===undefined)j.callbacks=[$];else j.callbacks.push($);return}const N={result:undefined,error:undefined,callbacks:undefined,force:true};R.set(v,N);E(v,((v,E)=>{if(v)N.error=v;else N.result=E;const R=N.callbacks;N.callbacks=undefined;$(v,E);if(R!==undefined)for(const $ of R)$(v,E)}))};return resultFn};class HttpUriPlugin{constructor(v){Le(v);this._lockfileLocation=v.lockfileLocation;this._cacheLocation=v.cacheLocation;this._upgrade=v.upgrade;this._frozen=v.frozen;this._allowedUris=v.allowedUris;this._proxy=v.proxy}apply(v){const E=this._proxy||process.env["http_proxy"]||process.env["HTTP_PROXY"];const R=[{scheme:"http",fetch:proxyFetch(Te(),E)},{scheme:"https",fetch:proxyFetch(Ne(),E)}];let $;v.hooks.compilation.tap("HttpUriPlugin",((E,{normalModuleFactory:le})=>{const Oe=v.intermediateFileSystem;const Te=E.inputFileSystem;const Ne=E.getCache("webpack.HttpUriPlugin");const Le=E.getLogger("webpack.HttpUriPlugin");const qe=this._lockfileLocation||Me(Oe,v.context,v.name?`${toSafePath(v.name)}.webpack.lock`:"webpack.lock");const Ue=this._cacheLocation!==undefined?this._cacheLocation:qe+".data";const Ge=this._upgrade||false;const He=this._frozen||false;const We="sha512";const Qe="hex";const Je=20;const Ve=this._allowedUris;let Ke=false;const Xe=new Map;const getCacheKey=v=>{const E=Xe.get(v);if(E!==undefined)return E;const R=_getCacheKey(v);Xe.set(v,R);return R};const _getCacheKey=v=>{const E=new q(v);const R=toSafePath(E.origin);const $=toSafePath(E.pathname);const N=toSafePath(E.search);let G=j($);if(G.length>20)G="";const ie=G?$.slice(0,-G.length):$;const ae=me(We);ae.update(v);const ce=ae.digest(Qe).slice(0,Je);return`${R.slice(-50)}/${`${ie}${N?`_${N}`:""}`.slice(0,150)}_${ce}${G}`};const Ye=cachedWithoutKey((R=>{const readLockfile=()=>{Oe.readFile(qe,((j,N)=>{if(j&&j.code!=="ENOENT"){E.missingDependencies.add(qe);return R(j)}E.fileDependencies.add(qe);E.fileSystemInfo.createSnapshot(v.fsStartTime,N?[qe]:[],[],N?[]:[qe],{timestamp:true},((v,E)=>{if(v)return R(v);const j=N?Lockfile.parse(N.toString("utf-8")):new Lockfile;$={lockfile:j,snapshot:E};R(null,j)}))}))};if($){E.fileSystemInfo.checkSnapshotValid($.snapshot,((v,E)=>{if(v)return R(v);if(!E)return readLockfile();R(null,$.lockfile)}))}else{readLockfile()}}));let Ze=undefined;const storeLockEntry=(v,E,R)=>{const $=v.entries.get(E);if(Ze===undefined)Ze=new Map;Ze.set(E,R);v.entries.set(E,R);if(!$){Le.log(`${E} added to lockfile`)}else if(typeof $==="string"){if(typeof R==="string"){Le.log(`${E} updated in lockfile: ${$} -> ${R}`)}else{Le.log(`${E} updated in lockfile: ${$} -> ${R.resolved}`)}}else if(typeof R==="string"){Le.log(`${E} updated in lockfile: ${$.resolved} -> ${R}`)}else if($.resolved!==R.resolved){Le.log(`${E} updated in lockfile: ${$.resolved} -> ${R.resolved}`)}else if($.integrity!==R.integrity){Le.log(`${E} updated in lockfile: content changed`)}else if($.contentType!==R.contentType){Le.log(`${E} updated in lockfile: ${$.contentType} -> ${R.contentType}`)}else{Le.log(`${E} updated in lockfile`)}};const storeResult=(v,E,R,$)=>{if(R.storeLock){storeLockEntry(v,E,R.entry);if(!Ue||!R.content)return $(null,R);const j=getCacheKey(R.entry.resolved);const N=Me(Oe,Ue,j);_e(Oe,Ie(Oe,N),(v=>{if(v)return $(v);Oe.writeFile(N,R.content,(v=>{if(v)return $(v);$(null,R)}))}))}else{storeLockEntry(v,E,"no-cache");$(null,R)}};for(const{scheme:v,fetch:$}of R){const resolveContent=(v,E,$)=>{const handleResult=(j,N)=>{if(j)return $(j);if("location"in N){return resolveContent(N.location,E,((v,E)=>{if(v)return $(v);$(null,{entry:E.entry,content:E.content,storeLock:E.storeLock&&N.storeLock})}))}else{if(!N.fresh&&E&&N.entry.integrity!==E&&!verifyIntegrity(N.content,E)){return R.force(v,handleResult)}return $(null,{entry:N.entry,content:N.content,storeLock:N.storeLock})}};R(v,handleResult)};const fetchContentRaw=(v,E,R)=>{const j=Date.now();$(new q(v),{headers:{"accept-encoding":"gzip, deflate, br","user-agent":"webpack","if-none-match":E?E.etag||null:null}},($=>{const N=$.headers["etag"];const ce=$.headers["location"];const le=$.headers["cache-control"];const{storeLock:me,storeCache:_e,validUntil:Ie}=parseCacheControl(le,j);const finishWith=E=>{if("location"in E){Le.debug(`GET ${v} [${$.statusCode}] -> ${E.location}`)}else{Le.debug(`GET ${v} [${$.statusCode}] ${Math.ceil(E.content.length/1024)} kB${!me?" no-cache":""}`)}const j={...E,fresh:true,storeLock:me,storeCache:_e,validUntil:Ie,etag:N};if(!_e){Le.log(`${v} can't be stored in cache, due to Cache-Control header: ${le}`);return R(null,j)}Ne.store(v,null,{...j,fresh:false},(E=>{if(E){Le.warn(`${v} can't be stored in cache: ${E.message}`);Le.debug(E.stack)}R(null,j)}))};if($.statusCode===304){if(E.validUntil=301&&$.statusCode<=308){const j={location:new q(ce,v).href};if(!E||!("location"in E)||E.location!==j.location||E.validUntil{Oe.push(v)}));Be.on("end",(()=>{if(!$.complete){Le.log(`GET ${v} [${$.statusCode}] (terminated)`);return R(new Error(`${v} request was terminated`))}const E=Buffer.concat(Oe);if($.statusCode!==200){Le.log(`GET ${v} [${$.statusCode}]`);return R(new Error(`${v} request status code = ${$.statusCode}\n${E.toString("utf-8")}`))}const j=computeIntegrity(E);const N={resolved:v,integrity:j,contentType:Me};finishWith({entry:N,content:E})}))})).on("error",(E=>{Le.log(`GET ${v} (error)`);E.message+=`\nwhile fetching ${v}`;R(E)}))};const R=cachedWithKey(((v,E)=>{Ne.get(v,null,((R,$)=>{if(R)return E(R);if($){const v=$.validUntil>=Date.now();if(v)return E(null,$)}fetchContentRaw(v,$,E)}))}),((v,E)=>fetchContentRaw(v,undefined,E)));const isAllowed=v=>{for(const E of Ve){if(typeof E==="string"){if(v.startsWith(E))return true}else if(typeof E==="function"){if(E(v))return true}else{if(E.test(v))return true}}return false};const j=cachedWithKey(((v,E)=>{if(!isAllowed(v)){return E(new Error(`${v} doesn't match the allowedUris policy. These URIs are allowed:\n${Ve.map((v=>` - ${v}`)).join("\n")}`))}Ye(((R,$)=>{if(R)return E(R);const j=$.entries.get(v);if(!j){if(He){return E(new Error(`${v} has no lockfile entry and lockfile is frozen`))}resolveContent(v,null,((R,j)=>{if(R)return E(R);storeResult($,v,j,E)}));return}if(typeof j==="string"){const R=j;resolveContent(v,null,((j,N)=>{if(j)return E(j);if(!N.storeLock||R==="ignore")return E(null,N);if(He){return E(new Error(`${v} used to have ${R} lockfile entry and has content now, but lockfile is frozen`))}if(!Ge){return E(new Error(`${v} used to have ${R} lockfile entry and has content now.\nThis should be reflected in the lockfile, so this lockfile entry must be upgraded, but upgrading is not enabled.\nRemove this line from the lockfile to force upgrading.`))}storeResult($,v,N,E)}));return}let N=j;const doFetch=R=>{resolveContent(v,N.integrity,((j,q)=>{if(j){if(R){Le.warn(`Upgrade request to ${v} failed: ${j.message}`);Le.debug(j.stack);return E(null,{entry:N,content:R})}return E(j)}if(!q.storeLock){if(He){return E(new Error(`${v} has a lockfile entry and is no-cache now, but lockfile is frozen\nLockfile: ${entryToString(N)}`))}storeResult($,v,q,E);return}if(!areLockfileEntriesEqual(q.entry,N)){if(He){return E(new Error(`${v} has an outdated lockfile entry, but lockfile is frozen\nLockfile: ${entryToString(N)}\nExpected: ${entryToString(q.entry)}`))}storeResult($,v,q,E);return}if(!R&&Ue){if(He){return E(new Error(`${v} is missing content in the lockfile cache, but lockfile is frozen\nLockfile: ${entryToString(N)}`))}storeResult($,v,q,E);return}return E(null,q)}))};if(Ue){const R=getCacheKey(N.resolved);const j=Me(Oe,Ue,R);Te.readFile(j,((R,q)=>{const G=q;if(R){if(R.code==="ENOENT")return doFetch();return E(R)}const continueWithCachedContent=v=>{if(!Ge){return E(null,{entry:N,content:G})}return doFetch(G)};if(!verifyIntegrity(G,N.integrity)){let R;let q=false;try{R=Buffer.from(G.toString("utf-8").replace(/\r\n/g,"\n"));q=verifyIntegrity(R,N.integrity)}catch(v){}if(q){if(!Ke){const v=`Incorrect end of line sequence was detected in the lockfile cache.\nThe lockfile cache is protected by integrity checks, so any external modification will lead to a corrupted lockfile cache.\nWhen using git make sure to configure .gitattributes correctly for the lockfile cache:\n **/*webpack.lock.data/** -text\nThis will avoid that the end of line sequence is changed by git on Windows.`;if(He){Le.error(v)}else{Le.warn(v);Le.info("Lockfile cache will be automatically fixed now, but when lockfile is frozen this would result in an error.")}Ke=true}if(!He){Le.log(`${j} fixed end of line sequence (\\r\\n instead of \\n).`);Oe.writeFile(j,R,(v=>{if(v)return E(v);continueWithCachedContent(R)}));return}}if(He){return E(new Error(`${N.resolved} integrity mismatch, expected content with integrity ${N.integrity} but got ${computeIntegrity(G)}.\nLockfile corrupted (${q?"end of line sequence was unexpectedly changed":"incorrectly merged? changed by other tools?"}).\nRun build with un-frozen lockfile to automatically fix lockfile.`))}else{N={...N,integrity:computeIntegrity(G)};storeLockEntry($,v,N)}}continueWithCachedContent(q)}))}else{doFetch()}}))}));const respondWithUrlModule=(v,E,R)=>{j(v.href,(($,j)=>{if($)return R($);E.resource=v.href;E.path=v.origin+v.pathname;E.query=v.search;E.fragment=v.hash;E.context=new q(".",j.entry.resolved).href.slice(0,-1);E.data.mimetype=j.entry.contentType;R(null,true)}))};le.hooks.resolveForScheme.for(v).tapAsync("HttpUriPlugin",((v,E,R)=>{respondWithUrlModule(new q(v.resource),v,R)}));le.hooks.resolveInScheme.for(v).tapAsync("HttpUriPlugin",((v,E,R)=>{if(E.dependencyType!=="url"&&!/^\.{0,2}\//.test(v.resource)){return R()}respondWithUrlModule(new q(v.resource,E.context+"/"),v,R)}));const N=ce.getCompilationHooks(E);N.readResourceForScheme.for(v).tapAsync("HttpUriPlugin",((v,E,R)=>j(v,((v,$)=>{if(v)return R(v);E.buildInfo.resourceIntegrity=$.entry.integrity;R(null,$.content)}))));N.needBuild.tapAsync("HttpUriPlugin",((E,R,$)=>{if(E.resource&&E.resource.startsWith(`${v}://`)){j(E.resource,((v,R)=>{if(v)return $(v);if(R.entry.integrity!==E.buildInfo.resourceIntegrity){return $(null,true)}$()}))}else{return $()}}))}E.hooks.finishModules.tapAsync("HttpUriPlugin",((v,E)=>{if(!Ze)return E();const R=j(qe);const $=Me(Oe,Ie(Oe,qe),`.${N(qe,R)}.${Math.random()*1e4|0}${R}`);const writeDone=()=>{const v=Be.shift();if(v){v()}else{Be=undefined}};const runWrite=()=>{Oe.readFile(qe,((v,R)=>{if(v&&v.code!=="ENOENT"){writeDone();return E(v)}const j=R?Lockfile.parse(R.toString("utf-8")):new Lockfile;for(const[v,E]of Ze){j.entries.set(v,E)}Oe.writeFile($,j.toString(),(v=>{if(v){writeDone();return Oe.unlink($,(()=>E(v)))}Oe.rename($,qe,(v=>{if(v){writeDone();return Oe.unlink($,(()=>E(v)))}writeDone();E()}))}))}))};if(Be){Be.push(runWrite)}else{Be=[];runWrite()}}))}))}}v.exports=HttpUriPlugin},86424:function(v){"use strict";class ArraySerializer{serialize(v,{write:E}){E(v.length);for(const R of v)E(R)}deserialize({read:v}){const E=v();const R=[];for(let $=0;${if(v===(v|0)){if(v<=127&&v>=-128)return 0;if(v<=2147483647&&v>=-2147483648)return 1}return 2};class BinaryMiddleware extends j{serialize(v,E){return this._serialize(v,E)}_serializeLazy(v,E){return j.serializeLazy(v,(v=>this._serialize(v,E)))}_serialize(v,E,R={allocationSize:1024,increaseCounter:0,leftOverBuffer:null}){let $=null;let He=[];let We=R?R.leftOverBuffer:null;R.leftOverBuffer=null;let Qe=0;if(We===null){We=Buffer.allocUnsafe(R.allocationSize)}const allocate=v=>{if(We!==null){if(We.length-Qe>=v)return;flush()}if($&&$.length>=v){We=$;$=null}else{We=Buffer.allocUnsafe(Math.max(v,R.allocationSize));if(!(R.increaseCounter=(R.increaseCounter+1)%4)&&R.allocationSize<16777216){R.allocationSize=R.allocationSize<<1}}};const flush=()=>{if(We!==null){if(Qe>0){He.push(Buffer.from(We.buffer,We.byteOffset,Qe))}if(!$||$.length{We.writeUInt8(v,Qe++)};const writeU32=v=>{We.writeUInt32LE(v,Qe);Qe+=4};const et=[];const measureStart=()=>{et.push(He.length,Qe)};const measureEnd=()=>{const v=et.pop();const E=et.pop();let R=Qe-v;for(let v=E;v0&&(v=q[q.length-1])!==0){const R=4294967295-v;if(R>=E.length){q[q.length-1]+=E.length}else{q.push(E.length-R);q[q.length-2]=4294967295}}else{q.push(E.length)}}allocate(5+q.length*4);writeU8(N);writeU32(q.length);for(const v of q){writeU32(v)}flush();for(const E of v){He.push(E)}break}case"string":{const v=Buffer.byteLength(tt);if(v>=128||v!==tt.length){allocate(v+Je+Ke);writeU8(Ne);writeU32(v);We.write(tt,Qe);Qe+=v}else if(v>=70){allocate(v+Je);writeU8(Ge|v);We.write(tt,Qe,"latin1");Qe+=v}else{allocate(v+Je);writeU8(Ge|v);for(let E=0;E=0&&tt<=10){allocate(Ve);writeU8(tt);break}let R=1;for(;R<32&&et+R0){We.writeInt8(v[et],Qe);Qe+=Ve;R--;et++}break;case 1:allocate(Je+Ke*R);writeU8(qe|R-1);while(R>0){We.writeInt32LE(v[et],Qe);Qe+=Ke;R--;et++}break;case 2:allocate(Je+Xe*R);writeU8(Ue|R-1);while(R>0){We.writeDoubleLE(v[et],Qe);Qe+=Xe;R--;et++}break}et--;break}case"boolean":{let E=tt===true?1:0;const R=[];let $=1;let j;for(j=1;j<4294967295&&et+jthis._deserialize(v,E))),this,undefined,v)}_deserializeLazy(v,E){return j.deserializeLazy(v,(v=>this._deserialize(v,E)))}_deserialize(v,E){let R=0;let $=v[0];let j=Buffer.isBuffer($);let Je=0;const Ye=E.retainedBuffer||(v=>v);const checkOverflow=()=>{if(Je>=$.length){Je=0;R++;$=Rj&&v+Je<=$.length;const ensureBuffer=()=>{if(!j){throw new Error($===null?"Unexpected end of stream":"Unexpected lazy element in stream")}};const read=E=>{ensureBuffer();const N=$.length-Je;if(N{ensureBuffer();const E=$.length-Je;if(E{ensureBuffer();const v=$.readUInt8(Je);Je+=Ve;checkOverflow();return v};const readU32=()=>read(Ke).readUInt32LE(0);const readBits=(v,E)=>{let R=1;while(E!==0){et.push((v&R)!==0);R=R<<1;E--}};const Ze=Array.from({length:256}).map(((Ze,tt)=>{switch(tt){case N:return()=>{const N=readU32();const q=Array.from({length:N}).map((()=>readU32()));const G=[];for(let E of q){if(E===0){if(typeof $!=="function"){throw new Error("Unexpected non-lazy element in stream")}G.push($);R++;$=R0)}}et.push(this._createLazyDeserialized(G,E))};case Be:return()=>{const v=readU32();et.push(Ye(read(v)))};case q:return()=>et.push(true);case G:return()=>et.push(false);case le:return()=>et.push(null,null,null);case ce:return()=>et.push(null,null);case ae:return()=>et.push(null);case Oe:return()=>et.push(null,true);case Te:return()=>et.push(null,false);case Ie:return()=>{if(j){et.push(null,$.readInt8(Je));Je+=Ve;checkOverflow()}else{et.push(null,read(Ve).readInt8(0))}};case Me:return()=>{et.push(null);if(isInCurrentBuffer(Ke)){et.push($.readInt32LE(Je));Je+=Ke;checkOverflow()}else{et.push(read(Ke).readInt32LE(0))}};case me:return()=>{const v=readU8()+4;for(let E=0;E{const v=readU32()+260;for(let E=0;E{const v=readU8();if((v&240)===0){readBits(v,3)}else if((v&224)===0){readBits(v,4)}else if((v&192)===0){readBits(v,5)}else if((v&128)===0){readBits(v,6)}else if(v!==255){let E=(v&127)+7;while(E>8){readBits(readU8(),8);E-=8}readBits(readU8(),E)}else{let v=readU32();while(v>8){readBits(readU8(),8);v-=8}readBits(readU8(),v)}};case Ne:return()=>{const v=readU32();if(isInCurrentBuffer(v)&&Je+v<2147483647){et.push($.toString(undefined,Je,Je+v));Je+=v;checkOverflow()}else{et.push(read(v).toString())}};case Ge:return()=>et.push("");case Ge|1:return()=>{if(j&&Je<2147483646){et.push($.toString("latin1",Je,Je+1));Je++;checkOverflow()}else{et.push(read(1).toString("latin1"))}};case Le:return()=>{if(j){et.push($.readInt8(Je));Je++;checkOverflow()}else{et.push(read(1).readInt8(0))}};default:if(tt<=10){return()=>et.push(tt)}else if((tt&Ge)===Ge){const v=tt&Qe;return()=>{if(isInCurrentBuffer(v)&&Je+v<2147483647){et.push($.toString("latin1",Je,Je+v));Je+=v;checkOverflow()}else{et.push(read(v).toString("latin1"))}}}else if((tt&He)===Ue){const v=(tt&We)+1;return()=>{const E=Xe*v;if(isInCurrentBuffer(E)){for(let E=0;E{const E=Ke*v;if(isInCurrentBuffer(E)){for(let E=0;E{const E=Ve*v;if(isInCurrentBuffer(E)){for(let E=0;E{throw new Error(`Unexpected header byte 0x${tt.toString(16)}`)}}}}));let et=[];while($!==null){if(typeof $==="function"){et.push(this._deserializeLazy($,E));R++;$=R{const R=ce(E);for(const E of v)R.update(E);return R.digest("hex")};const Be=100*1024*1024;const Le=100*1024*1024;const qe=Buffer.prototype.writeBigUInt64LE?(v,E,R)=>{v.writeBigUInt64LE(BigInt(E),R)}:(v,E,R)=>{const $=E%4294967296;const j=(E-$)/4294967296;v.writeUInt32LE($,R);v.writeUInt32LE(j,R+4)};const Ue=Buffer.prototype.readBigUInt64LE?(v,E)=>Number(v.readBigUInt64LE(E)):(v,E)=>{const R=v.readUInt32LE(E);const $=v.readUInt32LE(E+4);return $*4294967296+R};const serialize=async(v,E,R,$,j="md4")=>{const N=[];const q=new WeakMap;let G=undefined;for(const R of await E){if(typeof R==="function"){if(!Me.isLazy(R))throw new Error("Unexpected function");if(!Me.isLazy(R,v)){throw new Error("Unexpected lazy value with non-this target (can't pass through lazy values)")}G=undefined;const E=Me.getLazySerializedValue(R);if(E){if(typeof E==="function"){throw new Error("Unexpected lazy value with non-this target (can't pass through lazy values)")}else{N.push(E)}}else{const E=R();if(E){const G=Me.getLazyOptions(R);N.push(serialize(v,E,G&&G.name||true,$,j).then((v=>{R.options.size=v.size;q.set(v,R);return v})))}else{throw new Error("Unexpected falsy value returned by lazy value function")}}}else if(R){if(G){G.push(R)}else{G=[R];N.push(G)}}else{throw new Error("Unexpected falsy value in items array")}}const ie=[];const ae=(await Promise.all(N)).map((v=>{if(Array.isArray(v)||Buffer.isBuffer(v))return v;ie.push(v.backgroundJob);const E=v.name;const R=Buffer.from(E);const $=Buffer.allocUnsafe(8+R.length);qe($,v.size,0);R.copy($,8,0);const j=q.get(v);Me.setLazySerializedValue(j,$);return $}));const ce=[];for(const v of ae){if(Array.isArray(v)){let E=0;for(const R of v)E+=R.length;while(E>2147483647){ce.push(2147483647);E-=2147483647}ce.push(E)}else if(v){ce.push(-v.length)}else{throw new Error("Unexpected falsy value in resolved data "+v)}}const le=Buffer.allocUnsafe(8+ce.length*4);le.writeUInt32LE(Oe,0);le.writeUInt32LE(ce.length,4);for(let v=0;v{const $=await R(E);if($.length===0)throw new Error("Empty file "+E);let j=0;let N=$[0];let q=N.length;let G=0;if(q===0)throw new Error("Empty file "+E);const nextContent=()=>{j++;N=$[j];q=N.length;G=0};const ensureData=v=>{if(G===q){nextContent()}while(q-GR){ie.push($[v].slice(0,R));$[v]=$[v].slice(R);R=0;break}else{ie.push($[v]);j=v;R-=E}}if(R>0)throw new Error("Unexpected end of data");N=Buffer.concat(ie,v);q=v;G=0}};const readUInt32LE=()=>{ensureData(4);const v=N.readUInt32LE(G);G+=4;return v};const readInt32LE=()=>{ensureData(4);const v=N.readInt32LE(G);G+=4;return v};const readSlice=v=>{ensureData(v);if(G===0&&q===v){const E=N;if(j+1<$.length){nextContent()}else{G=v}return E}const E=N.slice(G,G+v);G+=v;return v*2=0;if(le&&E){ce[ce.length-1]+=v}else{ce.push(v);le=E}}const me=[];for(let E of ce){if(E<0){const $=readSlice(-E);const j=Number(Ue($,0));const N=$.slice(8);const q=N.toString();me.push(Me.createLazy(Ie((()=>deserialize(v,q,R))),v,{name:q,size:j},$))}else{if(G===q){nextContent()}else if(G!==0){if(E<=q-G){me.push(Buffer.from(N.buffer,N.byteOffset+G,E));G+=E;E=0}else{const v=q-G;me.push(Buffer.from(N.buffer,N.byteOffset+G,v));E-=v;G=q}}else{if(E>=q){me.push(N);E-=q;G=q}else{me.push(Buffer.from(N.buffer,N.byteOffset,E));G+=E;E=0}}while(E>0){nextContent();if(E>=q){me.push(N);E-=q;G=q}else{me.push(Buffer.from(N.buffer,N.byteOffset,E));G+=E;E=0}}}}return me};class FileMiddleware extends Me{constructor(v,E="md4"){super();this.fs=v;this._hashFunction=E}serialize(v,E){const{filename:R,extension:$=""}=E;return new Promise(((E,q)=>{_e(this.fs,le(this.fs,R),(ie=>{if(ie)return q(ie);const ce=new Set;const writeFile=async(v,E,q)=>{const ie=v?me(this.fs,R,`../${v}${$}`):R;await new Promise(((v,R)=>{let $=this.fs.createWriteStream(ie+"_");let ce;if(ie.endsWith(".gz")){ce=G({chunkSize:Be,level:ae.Z_BEST_SPEED})}else if(ie.endsWith(".br")){ce=N({chunkSize:Be,params:{[ae.BROTLI_PARAM_MODE]:ae.BROTLI_MODE_TEXT,[ae.BROTLI_PARAM_QUALITY]:2,[ae.BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING]:true,[ae.BROTLI_PARAM_SIZE_HINT]:q}})}if(ce){j(ce,$,R);$=ce;$.on("finish",(()=>v()))}else{$.on("error",(v=>R(v)));$.on("finish",(()=>v()))}const le=[];for(const v of E){if(v.length{if(v)return;if(_e===me){$.end();return}let E=_e;let R=le[E++].length;while(ETe)break;E++}while(_e{await v;await new Promise((v=>this.fs.rename(R,R+".old",(E=>{v()}))));await Promise.all(Array.from(ce,(v=>new Promise(((E,R)=>{this.fs.rename(v+"_",v,(v=>{if(v)return R(v);E()}))})))));await new Promise((v=>{this.fs.rename(R+"_",R,(E=>{if(E)return q(E);v()}))}));return true})))}))}))}deserialize(v,E){const{filename:R,extension:j=""}=E;const readFile=v=>new Promise(((E,N)=>{const G=v?me(this.fs,R,`../${v}${j}`):R;this.fs.stat(G,((v,R)=>{if(v){N(v);return}let j=R.size;let ae;let ce;const le=[];let me;if(G.endsWith(".gz")){me=ie({chunkSize:Le})}else if(G.endsWith(".br")){me=q({chunkSize:Le})}if(me){let v,R;E(Promise.all([new Promise(((E,$)=>{v=E;R=$})),new Promise(((v,E)=>{me.on("data",(v=>le.push(v)));me.on("end",(()=>v()));me.on("error",(v=>E(v)))}))]).then((()=>le)));E=v;N=R}this.fs.open(G,"r",((v,R)=>{if(v){N(v);return}const read=()=>{if(ae===undefined){ae=Buffer.allocUnsafeSlow(Math.min($.MAX_LENGTH,j,me?Le:Infinity));ce=0}let v=ae;let q=ce;let G=ae.length-ce;if(q>2147483647){v=ae.slice(q);q=0}if(G>2147483647){G=2147483647}this.fs.read(R,v,q,G,null,((v,$)=>{if(v){this.fs.close(R,(()=>{N(v)}));return}ce+=$;j-=$;if(ce===ae.length){if(me){me.write(ae)}else{le.push(ae)}ae=undefined;if(j===0){if(me){me.end()}this.fs.close(R,(v=>{if(v){N(v);return}E(le)}));return}}read()}))};read()}))}))}));return deserialize(this,false,readFile)}}v.exports=FileMiddleware},86393:function(v){"use strict";class MapObjectSerializer{serialize(v,{write:E}){E(v.size);for(const R of v.keys()){E(R)}for(const R of v.values()){E(R)}}deserialize({read:v}){let E=v();const R=new Map;const $=[];for(let R=0;R{let R=0;for(const $ of v){if(R++>=E){v.delete($)}}};const setMapSize=(v,E)=>{let R=0;for(const $ of v.keys()){if(R++>=E){v.delete($)}}};const toHash=(v,E)=>{const R=$(E);R.update(v);return R.digest("latin1")};const _e=null;const Ie=null;const Me=true;const Oe=false;const Te=2;const Ne=new Map;const Be=new Map;const Le=new Set;const qe={};const Ue=new Map;Ue.set(Object,new ae);Ue.set(Array,new j);Ue.set(null,new ie);Ue.set(Map,new G);Ue.set(Set,new me);Ue.set(Date,new N);Ue.set(RegExp,new ce);Ue.set(Error,new q(Error));Ue.set(EvalError,new q(EvalError));Ue.set(RangeError,new q(RangeError));Ue.set(ReferenceError,new q(ReferenceError));Ue.set(SyntaxError,new q(SyntaxError));Ue.set(TypeError,new q(TypeError));if(E.constructor!==Object){const v=E.constructor;const R=v.constructor;for(const[v,E]of Array.from(Ue)){if(v){const $=new R(`return ${v.name};`)();Ue.set($,E)}}}{let v=1;for(const[E,R]of Ue){Ne.set(E,{request:"",name:v++,serializer:R})}}for(const{request:v,name:E,serializer:R}of Ne.values()){Be.set(`${v}/${E}`,R)}const Ge=new Map;class ObjectMiddleware extends le{constructor(v,E="md4"){super();this.extendContext=v;this._hashFunction=E}static registerLoader(v,E){Ge.set(v,E)}static register(v,E,R,$){const j=E+"/"+R;if(Ne.has(v)){throw new Error(`ObjectMiddleware.register: serializer for ${v.name} is already registered`)}if(Be.has(j)){throw new Error(`ObjectMiddleware.register: serializer for ${j} is already registered`)}Ne.set(v,{request:E,name:R,serializer:$});Be.set(j,$)}static registerNotSerializable(v){if(Ne.has(v)){throw new Error(`ObjectMiddleware.registerNotSerializable: serializer for ${v.name} is already registered`)}Ne.set(v,qe)}static getSerializerFor(v){const E=Object.getPrototypeOf(v);let R;if(E===null){R=null}else{R=E.constructor;if(!R){throw new Error("Serialization of objects with prototype without valid constructor property not possible")}}const $=Ne.get(R);if(!$)throw new Error(`No serializer registered for ${R.name}`);if($===qe)throw qe;return $}static getDeserializerFor(v,E){const R=v+"/"+E;const $=Be.get(R);if($===undefined){throw new Error(`No deserializer registered for ${R}`)}return $}static _getDeserializerForWithoutError(v,E){const R=v+"/"+E;const $=Be.get(R);return $}serialize(v,E){let R=[Te];let $=0;let j=new Map;const addReferenceable=v=>{j.set(v,$++)};let N=new Map;const dedupeBuffer=v=>{const E=v.length;const R=N.get(E);if(R===undefined){N.set(E,v);return v}if(Buffer.isBuffer(R)){if(E<32){if(v.equals(R)){return R}N.set(E,[R,v]);return v}else{const $=toHash(R,this._hashFunction);const j=new Map;j.set($,R);N.set(E,j);const q=toHash(v,this._hashFunction);if($===q){return R}return v}}else if(Array.isArray(R)){if(R.length<16){for(const E of R){if(v.equals(E)){return E}}R.push(v);return v}else{const $=new Map;const j=toHash(v,this._hashFunction);let q;for(const v of R){const E=toHash(v,this._hashFunction);$.set(E,v);if(q===undefined&&E===j)q=v}N.set(E,$);if(q===undefined){$.set(j,v);return v}else{return q}}}else{const E=toHash(v,this._hashFunction);const $=R.get(E);if($!==undefined){return $}R.set(E,v);return v}};let q=0;let G=new Map;const ie=new Set;const stackToString=v=>{const E=Array.from(ie);E.push(v);return E.map((v=>{if(typeof v==="string"){if(v.length>100){return`String ${JSON.stringify(v.slice(0,100)).slice(0,-1)}..."`}return`String ${JSON.stringify(v)}`}try{const{request:E,name:R}=ObjectMiddleware.getSerializerFor(v);if(E){return`${E}${R?`.${R}`:""}`}}catch(v){}if(typeof v==="object"&&v!==null){if(v.constructor){if(v.constructor===Object)return`Object { ${Object.keys(v).join(", ")} }`;if(v.constructor===Map)return`Map { ${v.size} items }`;if(v.constructor===Array)return`Array { ${v.length} items }`;if(v.constructor===Set)return`Set { ${v.size} items }`;if(v.constructor===RegExp)return v.toString();return`${v.constructor.name}`}return`Object [null prototype] { ${Object.keys(v).join(", ")} }`}try{return`${v}`}catch(v){return`(${v.message})`}})).join(" -> ")};let ae;let ce={write(v,E){try{process(v)}catch(E){if(E!==qe){if(ae===undefined)ae=new WeakSet;if(!ae.has(E)){E.message+=`\nwhile serializing ${stackToString(v)}`;ae.add(E)}}throw E}},setCircularReference(v){addReferenceable(v)},snapshot(){return{length:R.length,cycleStackSize:ie.size,referenceableSize:j.size,currentPos:$,objectTypeLookupSize:G.size,currentPosTypeLookup:q}},rollback(v){R.length=v.length;setSetSize(ie,v.cycleStackSize);setMapSize(j,v.referenceableSize);$=v.currentPos;setMapSize(G,v.objectTypeLookupSize);q=v.currentPosTypeLookup},...E};this.extendContext(ce);const process=v=>{if(Buffer.isBuffer(v)){const E=j.get(v);if(E!==undefined){R.push(_e,E-$);return}const N=dedupeBuffer(v);if(N!==v){const E=j.get(N);if(E!==undefined){j.set(v,E);R.push(_e,E-$);return}v=N}addReferenceable(v);R.push(v)}else if(v===_e){R.push(_e,Ie)}else if(typeof v==="object"){const E=j.get(v);if(E!==undefined){R.push(_e,E-$);return}if(ie.has(v)){throw new Error(`This is a circular references. To serialize circular references use 'setCircularReference' somewhere in the circle during serialize and deserialize.`)}const{request:N,name:ae,serializer:le}=ObjectMiddleware.getSerializerFor(v);const me=`${N}/${ae}`;const Ie=G.get(me);if(Ie===undefined){G.set(me,q++);R.push(_e,N,ae)}else{R.push(_e,q-Ie)}ie.add(v);try{le.serialize(v,ce)}finally{ie.delete(v)}R.push(_e,Me);addReferenceable(v)}else if(typeof v==="string"){if(v.length>1){const E=j.get(v);if(E!==undefined){R.push(_e,E-$);return}addReferenceable(v)}if(v.length>102400&&E.logger){E.logger.warn(`Serializing big strings (${Math.round(v.length/1024)}kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)`)}R.push(v)}else if(typeof v==="function"){if(!le.isLazy(v))throw new Error("Unexpected function "+v);const $=le.getLazySerializedValue(v);if($!==undefined){if(typeof $==="function"){R.push($)}else{throw new Error("Not implemented")}}else if(le.isLazy(v,this)){throw new Error("Not implemented")}else{const $=le.serializeLazy(v,(v=>this.serialize([v],E)));le.setLazySerializedValue(v,$);R.push($)}}else if(v===undefined){R.push(_e,Oe)}else{R.push(v)}};try{for(const E of v){process(E)}return R}catch(v){if(v===qe)return null;throw v}finally{v=R=j=N=G=ce=undefined}}deserialize(v,E){let R=0;const read=()=>{if(R>=v.length)throw new Error("Unexpected end of stream");return v[R++]};if(read()!==Te)throw new Error("Version mismatch, serializer changed");let $=0;let j=[];const addReferenceable=v=>{j.push(v);$++};let N=0;let q=[];let G=[];let ie={read(){return decodeValue()},setCircularReference(v){addReferenceable(v)},...E};this.extendContext(ie);const decodeValue=()=>{const v=read();if(v===_e){const v=read();if(v===Ie){return _e}else if(v===Oe){return undefined}else if(v===Me){throw new Error(`Unexpected end of object at position ${R-1}`)}else{const E=v;let G;if(typeof E==="number"){if(E<0){return j[$+E]}G=q[N-E]}else{if(typeof E!=="string"){throw new Error(`Unexpected type (${typeof E}) of request `+`at position ${R-1}`)}const v=read();G=ObjectMiddleware._getDeserializerForWithoutError(E,v);if(G===undefined){if(E&&!Le.has(E)){let v=false;for(const[R,$]of Ge){if(R.test(E)){if($(E)){v=true;break}}}if(!v){require(E)}Le.add(E)}G=ObjectMiddleware.getDeserializerFor(E,v)}q.push(G);N++}try{const v=G.deserialize(ie);const E=read();if(E!==_e){throw new Error("Expected end of object")}const R=read();if(R!==Me){throw new Error("Expected end of object")}addReferenceable(v);return v}catch(v){let E;for(const v of Ne){if(v[1].serializer===G){E=v;break}}const R=!E?"unknown":!E[1].request?E[0].name:E[1].name?`${E[1].request} ${E[1].name}`:E[1].request;v.message+=`\n(during deserialization of ${R})`;throw v}}}else if(typeof v==="string"){if(v.length>1){addReferenceable(v)}return v}else if(Buffer.isBuffer(v)){addReferenceable(v);return v}else if(typeof v==="function"){return le.deserializeLazy(v,(v=>this.deserialize(v,E)[0]))}else{return v}};try{while(R{let $=E.get(R);if($===undefined){$=new ObjectStructure;E.set(R,$)}let j=$;for(const E of v){j=j.key(E)}return j.getKeys(v)};class PlainObjectSerializer{serialize(v,{write:E}){const R=Object.keys(v);if(R.length>128){E(R);for(const $ of R){E(v[$])}}else if(R.length>1){E(getCachedKeys(R,E));for(const $ of R){E(v[$])}}else if(R.length===1){const $=R[0];E($);E(v[$])}else{E(null)}}deserialize({read:v}){const E=v();const R={};if(Array.isArray(E)){for(const $ of E){R[$]=v()}}else if(E!==null){R[E]=v()}return R}}v.exports=PlainObjectSerializer},71500:function(v){"use strict";class RegExpObjectSerializer{serialize(v,{write:E}){E(v.source);E(v.flags)}deserialize({read:v}){return new RegExp(v(),v())}}v.exports=RegExpObjectSerializer},25347:function(v){"use strict";class Serializer{constructor(v,E){this.serializeMiddlewares=v.slice();this.deserializeMiddlewares=v.slice().reverse();this.context=E}serialize(v,E){const R={...E,...this.context};let $=v;for(const v of this.serializeMiddlewares){if($&&typeof $.then==="function"){$=$.then((E=>E&&v.serialize(E,R)))}else if($){try{$=v.serialize($,R)}catch(v){$=Promise.reject(v)}}else break}return $}deserialize(v,E){const R={...E,...this.context};let $=v;for(const v of this.deserializeMiddlewares){if($&&typeof $.then==="function"){$=$.then((E=>v.deserialize(E,R)))}else{$=v.deserialize($,R)}}return $}}v.exports=Serializer},51947:function(v,E,R){"use strict";const $=R(61374);const j=Symbol("lazy serialization target");const N=Symbol("lazy serialization data");class SerializerMiddleware{serialize(v,E){const $=R(73846);throw new $}deserialize(v,E){const $=R(73846);throw new $}static createLazy(v,E,R={},$){if(SerializerMiddleware.isLazy(v,E))return v;const q=typeof v==="function"?v:()=>v;q[j]=E;q.options=R;q[N]=$;return q}static isLazy(v,E){if(typeof v!=="function")return false;const R=v[j];return E?R===E:!!R}static getLazyOptions(v){if(typeof v!=="function")return undefined;return v.options}static getLazySerializedValue(v){if(typeof v!=="function")return undefined;return v[N]}static setLazySerializedValue(v,E){v[N]=E}static serializeLazy(v,E){const R=$((()=>{const R=v();if(R&&typeof R.then==="function"){return R.then((v=>v&&E(v)))}return E(R)}));R[j]=v[j];R.options=v.options;v[N]=R;return R}static deserializeLazy(v,E){const R=$((()=>{const R=v();if(R&&typeof R.then==="function"){return R.then((v=>E(v)))}return E(R)}));R[j]=v[j];R.options=v.options;R[N]=v;return R}static unMemoizeLazy(v){if(!SerializerMiddleware.isLazy(v))return v;const fn=()=>{throw new Error("A lazy value that has been unmemorized can't be called again")};fn[N]=SerializerMiddleware.unMemoizeLazy(v[N]);fn[j]=v[j];fn.options=v.options;return fn}}v.exports=SerializerMiddleware},50435:function(v){"use strict";class SetObjectSerializer{serialize(v,{write:E}){E(v.size);for(const R of v){E(R)}}deserialize({read:v}){let E=v();const R=new Set;for(let $=0;$R(33231)),{name:"Consume Shared Plugin",baseDataPath:"options"});const Be={dependencyType:"esm"};const Le="ConsumeSharedPlugin";class ConsumeSharedPlugin{constructor(v){if(typeof v!=="string"){Ne(v)}this._consumes=q(v.consumes,((E,R)=>{if(Array.isArray(E))throw new Error("Unexpected array in options");let $=E===R||!Me(E)?{import:R,shareScope:v.shareScope||"default",shareKey:R,requiredVersion:undefined,packageName:undefined,strictVersion:false,singleton:false,eager:false}:{import:R,shareScope:v.shareScope||"default",shareKey:R,requiredVersion:ae(E),strictVersion:true,packageName:undefined,singleton:false,eager:false};return $}),((E,R)=>({import:E.import===false?undefined:E.import||R,shareScope:E.shareScope||v.shareScope||"default",shareKey:E.shareKey||R,requiredVersion:typeof E.requiredVersion==="string"?ae(E.requiredVersion):E.requiredVersion,strictVersion:typeof E.strictVersion==="boolean"?E.strictVersion:E.import!==false&&!E.singleton,packageName:E.packageName,singleton:!!E.singleton,eager:!!E.eager})))}apply(v){v.hooks.thisCompilation.tap(Le,((E,{normalModuleFactory:R})=>{E.dependencyFactories.set(ce,R);let q,ie,Me;const Ne=Ie(E,this._consumes).then((({resolved:v,unresolved:E,prefixed:R})=>{ie=v;q=E;Me=R}));const qe=E.resolverFactory.get("normal",Be);const createConsumeSharedModule=(R,j,q)=>{const requiredVersionWarning=v=>{const R=new N(`No required version specified and unable to automatically determine one. ${v}`);R.file=`shared module ${j}`;E.warnings.push(R)};const ie=q.import&&/^(\.\.?(\/|$)|\/|[A-Za-z]:|\\\\)/.test(q.import);return Promise.all([new Promise((N=>{if(!q.import)return N();const ae={fileDependencies:new G,contextDependencies:new G,missingDependencies:new G};qe.resolve({},ie?v.context:R,q.import,ae,((v,R)=>{E.contextDependencies.addAll(ae.contextDependencies);E.fileDependencies.addAll(ae.fileDependencies);E.missingDependencies.addAll(ae.missingDependencies);if(v){E.errors.push(new $(null,v,{name:`resolving fallback for shared module ${j}`}));return N()}N(R)}))})),new Promise((v=>{if(q.requiredVersion!==undefined)return v(q.requiredVersion);let $=q.packageName;if($===undefined){if(/^(\/|[A-Za-z]:|\\\\)/.test(j)){return v()}const E=/^((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(j);if(!E){requiredVersionWarning("Unable to extract the package name from request.");return v()}$=E[0]}Oe(E.inputFileSystem,R,["package.json"],((E,j)=>{if(E){requiredVersionWarning(`Unable to read description file: ${E}`);return v()}const{data:N,path:q}=j;if(!N){requiredVersionWarning(`Unable to find description file in ${R}.`);return v()}const G=Te(N,$);if(typeof G!=="string"){requiredVersionWarning(`Unable to find required version for "${$}" in description file (${q}). It need to be in dependencies, devDependencies or peerDependencies.`);return v()}v(ae(G))}))}))]).then((([E,$])=>new le(ie?v.context:R,{...q,importResolved:E,import:E?q.import:undefined,requiredVersion:$})))};R.hooks.factorize.tapPromise(Le,(({context:v,request:E,dependencies:R})=>Ne.then((()=>{if(R[0]instanceof ce||R[0]instanceof _e){return}const $=q.get(E);if($!==undefined){return createConsumeSharedModule(v,E,$)}for(const[R,$]of Me){if(E.startsWith(R)){const j=E.slice(R.length);return createConsumeSharedModule(v,E,{...$,import:$.import?$.import+j:undefined,shareKey:$.shareKey+j})}}}))));R.hooks.createModule.tapPromise(Le,(({resource:v},{context:E,dependencies:R})=>{if(R[0]instanceof ce||R[0]instanceof _e){return Promise.resolve()}const $=ie.get(v);if($!==undefined){return createConsumeSharedModule(E,v,$)}return Promise.resolve()}));E.hooks.additionalTreeRuntimeRequirements.tap(Le,((v,R)=>{R.add(j.module);R.add(j.moduleCache);R.add(j.moduleFactoriesAddOnly);R.add(j.shareScopeMap);R.add(j.initializeSharing);R.add(j.hasOwnProperty);E.addRuntimeModule(v,new me(R))}))}))}}v.exports=ConsumeSharedPlugin},15147:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{parseVersionRuntimeCode:q,versionLtRuntimeCode:G,rangeToStringRuntimeCode:ie,satisfyRuntimeCode:ae}=R(27773);class ConsumeSharedRuntimeModule extends j{constructor(v){super("consumes",j.STAGE_ATTACH);this._runtimeRequirements=v}generate(){const{compilation:v,chunkGraph:E}=this;const{runtimeTemplate:R,codeGenerationResults:j}=v;const ce={};const le=new Map;const me=[];const addModules=(v,R,$)=>{for(const N of v){const v=N;const q=E.getModuleId(v);$.push(q);le.set(q,j.getSource(v,R.runtime,"consume-shared"))}};for(const v of this.chunk.getAllAsyncChunks()){const R=E.getChunkModulesIterableBySourceType(v,"consume-shared");if(!R)continue;addModules(R,v,ce[v.id]=[])}for(const v of this.chunk.getAllInitialChunks()){const R=E.getChunkModulesIterableBySourceType(v,"consume-shared");if(!R)continue;addModules(R,v,me)}if(le.size===0)return null;return N.asString([q(R),G(R),ie(R),ae(R),`var ensureExistence = ${R.basicFunction("scopeName, key",[`var scope = ${$.shareScopeMap}[scopeName];`,`if(!scope || !${$.hasOwnProperty}(scope, key)) throw new Error("Shared module " + key + " doesn't exist in shared scope " + scopeName);`,"return scope;"])};`,`var findVersion = ${R.basicFunction("scope, key",["var versions = scope[key];",`var key = Object.keys(versions).reduce(${R.basicFunction("a, b",["return !a || versionLt(a, b) ? b : a;"])}, 0);`,"return key && versions[key]"])};`,`var findSingletonVersionKey = ${R.basicFunction("scope, key",["var versions = scope[key];",`return Object.keys(versions).reduce(${R.basicFunction("a, b",["return !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;"])}, 0);`])};`,`var getInvalidSingletonVersionMessage = ${R.basicFunction("scope, key, version, requiredVersion",[`return "Unsatisfied version " + version + " from " + (version && scope[key][version].from) + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"`])};`,`var getSingleton = ${R.basicFunction("scope, scopeName, key, requiredVersion",["var version = findSingletonVersionKey(scope, key);","return get(scope[key][version]);"])};`,`var getSingletonVersion = ${R.basicFunction("scope, scopeName, key, requiredVersion",["var version = findSingletonVersionKey(scope, key);","if (!satisfy(requiredVersion, version)) "+'typeof console !== "undefined" && console.warn && console.warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));',"return get(scope[key][version]);"])};`,`var getStrictSingletonVersion = ${R.basicFunction("scope, scopeName, key, requiredVersion",["var version = findSingletonVersionKey(scope, key);","if (!satisfy(requiredVersion, version)) "+"throw new Error(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));","return get(scope[key][version]);"])};`,`var findValidVersion = ${R.basicFunction("scope, key, requiredVersion",["var versions = scope[key];",`var key = Object.keys(versions).reduce(${R.basicFunction("a, b",["if (!satisfy(requiredVersion, b)) return a;","return !a || versionLt(a, b) ? b : a;"])}, 0);`,"return key && versions[key]"])};`,`var getInvalidVersionMessage = ${R.basicFunction("scope, scopeName, key, requiredVersion",["var versions = scope[key];",'return "No satisfying version (" + rangeToString(requiredVersion) + ") of shared module " + key + " found in shared scope " + scopeName + ".\\n" +',`\t"Available versions: " + Object.keys(versions).map(${R.basicFunction("key",['return key + " from " + versions[key].from;'])}).join(", ");`])};`,`var getValidVersion = ${R.basicFunction("scope, scopeName, key, requiredVersion",["var entry = findValidVersion(scope, key, requiredVersion);","if(entry) return get(entry);","throw new Error(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));"])};`,`var warnInvalidVersion = ${R.basicFunction("scope, scopeName, key, requiredVersion",['typeof console !== "undefined" && console.warn && console.warn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));'])};`,`var get = ${R.basicFunction("entry",["entry.loaded = 1;","return entry.get()"])};`,`var init = ${R.returningFunction(N.asString(["function(scopeName, a, b, c) {",N.indent([`var promise = ${$.initializeSharing}(scopeName);`,`if (promise && promise.then) return promise.then(fn.bind(fn, scopeName, ${$.shareScopeMap}[scopeName], a, b, c));`,`return fn(scopeName, ${$.shareScopeMap}[scopeName], a, b, c);`]),"}"]),"fn")};`,"",`var load = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key",["ensureExistence(scopeName, key);","return get(findVersion(scope, key));"])});`,`var loadFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, fallback",[`return scope && ${$.hasOwnProperty}(scope, key) ? get(findVersion(scope, key)) : fallback();`])});`,`var loadVersionCheck = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version",["ensureExistence(scopeName, key);","return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));"])});`,`var loadSingleton = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key",["ensureExistence(scopeName, key);","return getSingleton(scope, scopeName, key);"])});`,`var loadSingletonVersionCheck = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version",["ensureExistence(scopeName, key);","return getSingletonVersion(scope, scopeName, key, version);"])});`,`var loadStrictVersionCheck = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version",["ensureExistence(scopeName, key);","return getValidVersion(scope, scopeName, key, version);"])});`,`var loadStrictSingletonVersionCheck = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version",["ensureExistence(scopeName, key);","return getStrictSingletonVersion(scope, scopeName, key, version);"])});`,`var loadVersionCheckFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version, fallback",[`if(!scope || !${$.hasOwnProperty}(scope, key)) return fallback();`,"return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));"])});`,`var loadSingletonFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, fallback",[`if(!scope || !${$.hasOwnProperty}(scope, key)) return fallback();`,"return getSingleton(scope, scopeName, key);"])});`,`var loadSingletonVersionCheckFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version, fallback",[`if(!scope || !${$.hasOwnProperty}(scope, key)) return fallback();`,"return getSingletonVersion(scope, scopeName, key, version);"])});`,`var loadStrictVersionCheckFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version, fallback",[`var entry = scope && ${$.hasOwnProperty}(scope, key) && findValidVersion(scope, key, version);`,`return entry ? get(entry) : fallback();`])});`,`var loadStrictSingletonVersionCheckFallback = /*#__PURE__*/ init(${R.basicFunction("scopeName, scope, key, version, fallback",[`if(!scope || !${$.hasOwnProperty}(scope, key)) return fallback();`,"return getStrictSingletonVersion(scope, scopeName, key, version);"])});`,"var installedModules = {};","var moduleToHandlerMapping = {",N.indent(Array.from(le,(([v,E])=>`${JSON.stringify(v)}: ${E.source()}`)).join(",\n")),"};",me.length>0?N.asString([`var initialConsumes = ${JSON.stringify(me)};`,`initialConsumes.forEach(${R.basicFunction("id",[`${$.moduleFactories}[id] = ${R.basicFunction("module",["// Handle case when module is used sync","installedModules[id] = 0;",`delete ${$.moduleCache}[id];`,"var factory = moduleToHandlerMapping[id]();",'if(typeof factory !== "function") throw new Error("Shared module is not available for eager consumption: " + id);',`module.exports = factory();`])}`])});`]):"// no consumes in initial chunks",this._runtimeRequirements.has($.ensureChunkHandlers)?N.asString([`var chunkMapping = ${JSON.stringify(ce,null,"\t")};`,`${$.ensureChunkHandlers}.consumes = ${R.basicFunction("chunkId, promises",[`if(${$.hasOwnProperty}(chunkMapping, chunkId)) {`,N.indent([`chunkMapping[chunkId].forEach(${R.basicFunction("id",[`if(${$.hasOwnProperty}(installedModules, id)) return promises.push(installedModules[id]);`,`var onFactory = ${R.basicFunction("factory",["installedModules[id] = 0;",`${$.moduleFactories}[id] = ${R.basicFunction("module",[`delete ${$.moduleCache}[id];`,"module.exports = factory();"])}`])};`,`var onError = ${R.basicFunction("error",["delete installedModules[id];",`${$.moduleFactories}[id] = ${R.basicFunction("module",[`delete ${$.moduleCache}[id];`,"throw error;"])}`])};`,"try {",N.indent(["var promise = moduleToHandlerMapping[id]();","if(promise.then) {",N.indent("promises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));"),"} else onFactory(promise);"]),"} catch(e) { onError(e); }"])});`]),"}"])}`]):"// no chunk loading of consumes"])}}v.exports=ConsumeSharedRuntimeModule},98425:function(v,E,R){"use strict";const $=R(99809);const j=R(65764);class ProvideForSharedDependency extends ${constructor(v){super(v)}get type(){return"provide module for shared"}get category(){return"esm"}}j(ProvideForSharedDependency,"webpack/lib/sharing/ProvideForSharedDependency");v.exports=ProvideForSharedDependency},94140:function(v,E,R){"use strict";const $=R(87056);const j=R(65764);class ProvideSharedDependency extends ${constructor(v,E,R,$,j){super();this.shareScope=v;this.name=E;this.version=R;this.request=$;this.eager=j}get type(){return"provide shared module"}getResourceIdentifier(){return`provide module (${this.shareScope}) ${this.request} as ${this.name} @ ${this.version}${this.eager?" (eager)":""}`}serialize(v){v.write(this.shareScope);v.write(this.name);v.write(this.request);v.write(this.version);v.write(this.eager);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new ProvideSharedDependency(E(),E(),E(),E(),E());this.shareScope=v.read();R.deserialize(v);return R}}j(ProvideSharedDependency,"webpack/lib/sharing/ProvideSharedDependency");v.exports=ProvideSharedDependency},95148:function(v,E,R){"use strict";const $=R(42290);const j=R(53840);const N=R(39201);const q=R(65764);const G=R(98425);const ie=new Set(["share-init"]);class ProvideSharedModule extends j{constructor(v,E,R,$,j){super("provide-module");this._shareScope=v;this._name=E;this._version=R;this._request=$;this._eager=j}identifier(){return`provide module (${this._shareScope}) ${this._name}@${this._version} = ${this._request}`}readableIdentifier(v){return`provide shared module (${this._shareScope}) ${this._name}@${this._version} = ${v.shorten(this._request)}`}libIdent(v){return`${this.layer?`(${this.layer})/`:""}webpack/sharing/provide/${this._shareScope}/${this._name}`}needBuild(v,E){E(null,!this.buildInfo)}build(v,E,R,j,N){this.buildMeta={};this.buildInfo={strict:true};this.clearDependenciesAndBlocks();const q=new G(this._request);if(this._eager){this.addDependency(q)}else{const v=new $({});v.addDependency(q);this.addBlock(v)}N()}size(v){return 42}getSourceTypes(){return ie}codeGeneration({runtimeTemplate:v,moduleGraph:E,chunkGraph:R}){const $=new Set([N.initializeSharing]);const j=`register(${JSON.stringify(this._name)}, ${JSON.stringify(this._version||"0")}, ${this._eager?v.syncModuleFactory({dependency:this.dependencies[0],chunkGraph:R,request:this._request,runtimeRequirements:$}):v.asyncModuleFactory({block:this.blocks[0],chunkGraph:R,request:this._request,runtimeRequirements:$})}${this._eager?", 1":""});`;const q=new Map;const G=new Map;G.set("share-init",[{shareScope:this._shareScope,initStage:10,init:j}]);return{sources:q,data:G,runtimeRequirements:$}}serialize(v){const{write:E}=v;E(this._shareScope);E(this._name);E(this._version);E(this._request);E(this._eager);super.serialize(v)}static deserialize(v){const{read:E}=v;const R=new ProvideSharedModule(E(),E(),E(),E(),E());R.deserialize(v);return R}}q(ProvideSharedModule,"webpack/lib/sharing/ProvideSharedModule");v.exports=ProvideSharedModule},91397:function(v,E,R){"use strict";const $=R(39744);const j=R(95148);class ProvideSharedModuleFactory extends ${create(v,E){const R=v.dependencies[0];E(null,{module:new j(R.shareScope,R.name,R.version,R.request,R.eager)})}}v.exports=ProvideSharedModuleFactory},90432:function(v,E,R){"use strict";const $=R(27154);const{parseOptions:j}=R(58491);const N=R(89699);const q=R(98425);const G=R(94140);const ie=R(91397);const ae=N(R(80557),(()=>R(11720)),{name:"Provide Shared Plugin",baseDataPath:"options"});class ProvideSharedPlugin{constructor(v){ae(v);this._provides=j(v.provides,(E=>{if(Array.isArray(E))throw new Error("Unexpected array of provides");const R={shareKey:E,version:undefined,shareScope:v.shareScope||"default",eager:false};return R}),(E=>({shareKey:E.shareKey,version:E.version,shareScope:E.shareScope||v.shareScope||"default",eager:!!E.eager})));this._provides.sort((([v],[E])=>{if(v{const j=new Map;const N=new Map;const q=new Map;for(const[v,E]of this._provides){if(/^(\/|[A-Za-z]:\\|\\\\|\.\.?(\/|$))/.test(v)){j.set(v,{config:E,version:E.version})}else if(/^(\/|[A-Za-z]:\\|\\\\)/.test(v)){j.set(v,{config:E,version:E.version})}else if(v.endsWith("/")){q.set(v,E)}else{N.set(v,E)}}E.set(v,j);const provideSharedModule=(E,R,N,q)=>{let G=R.version;if(G===undefined){let R="";if(!q){R=`No resolve data provided from resolver.`}else{const v=q.descriptionFileData;if(!v){R="No description file (usually package.json) found. Add description file with name and version, or manually specify version in shared config."}else if(!v.version){R=`No version in description file (usually package.json). Add version to description file ${q.descriptionFilePath}, or manually specify version in shared config.`}else{G=v.version}}if(!G){const j=new $(`No version specified and unable to automatically determine one. ${R}`);j.file=`shared module ${E} -> ${N}`;v.warnings.push(j)}}j.set(N,{config:R,version:G})};R.hooks.module.tap("ProvideSharedPlugin",((v,{resource:E,resourceResolveData:R},$)=>{if(j.has(E)){return v}const{request:G}=$;{const v=N.get(G);if(v!==undefined){provideSharedModule(G,v,E,R);$.cacheable=false}}for(const[v,j]of q){if(G.startsWith(v)){const N=G.slice(v.length);provideSharedModule(E,{...j,shareKey:j.shareKey+N},E,R);$.cacheable=false}}return v}))}));v.hooks.finishMake.tapPromise("ProvideSharedPlugin",(R=>{const $=E.get(R);if(!$)return Promise.resolve();return Promise.all(Array.from($,(([E,{config:$,version:j}])=>new Promise(((N,q)=>{R.addInclude(v.context,new G($.shareScope,$.shareKey,j||false,E,$.eager),{name:undefined},(v=>{if(v)return q(v);N()}))}))))).then((()=>{}))}));v.hooks.compilation.tap("ProvideSharedPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(q,E);v.dependencyFactories.set(G,new ie)}))}}v.exports=ProvideSharedPlugin},77443:function(v,E,R){"use strict";const{parseOptions:$}=R(58491);const j=R(40724);const N=R(90432);const{isRequiredVersion:q}=R(539);class SharePlugin{constructor(v){const E=$(v.shared,((v,E)=>{if(typeof v!=="string")throw new Error("Unexpected array in shared");const R=v===E||!q(v)?{import:v}:{import:E,requiredVersion:v};return R}),(v=>v));const R=E.map((([v,E])=>({[v]:{import:E.import,shareKey:E.shareKey||v,shareScope:E.shareScope,requiredVersion:E.requiredVersion,strictVersion:E.strictVersion,singleton:E.singleton,packageName:E.packageName,eager:E.eager}})));const j=E.filter((([,v])=>v.import!==false)).map((([v,E])=>({[E.import||v]:{shareKey:E.shareKey||v,shareScope:E.shareScope,version:E.version,eager:E.eager}})));this._shareScope=v.shareScope;this._consumes=R;this._provides=j}apply(v){new j({shareScope:this._shareScope,consumes:this._consumes}).apply(v);new N({shareScope:this._shareScope,provides:this._provides}).apply(v)}}v.exports=SharePlugin},59694:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{compareModulesByIdentifier:q,compareStrings:G}=R(58792);class ShareRuntimeModule extends j{constructor(){super("sharing")}generate(){const{compilation:v,chunkGraph:E}=this;const{runtimeTemplate:R,codeGenerationResults:j,outputOptions:{uniqueName:ie}}=v;const ae=new Map;for(const v of this.chunk.getAllReferencedChunks()){const R=E.getOrderedChunkModulesIterableBySourceType(v,"share-init",q);if(!R)continue;for(const E of R){const R=j.getData(E,v.runtime,"share-init");if(!R)continue;for(const v of R){const{shareScope:E,initStage:R,init:$}=v;let j=ae.get(E);if(j===undefined){ae.set(E,j=new Map)}let N=j.get(R||0);if(N===undefined){j.set(R||0,N=new Set)}N.add($)}}}return N.asString([`${$.shareScopeMap} = {};`,"var initPromises = {};","var initTokens = {};",`${$.initializeSharing} = ${R.basicFunction("name, initScope",["if(!initScope) initScope = [];","// handling circular init calls","var initToken = initTokens[name];","if(!initToken) initToken = initTokens[name] = {};","if(initScope.indexOf(initToken) >= 0) return;","initScope.push(initToken);","// only runs once","if(initPromises[name]) return initPromises[name];","// creates a new share scope if needed",`if(!${$.hasOwnProperty}(${$.shareScopeMap}, name)) ${$.shareScopeMap}[name] = {};`,"// runs all init snippets from all modules reachable",`var scope = ${$.shareScopeMap}[name];`,`var warn = ${R.returningFunction('typeof console !== "undefined" && console.warn && console.warn(msg)',"msg")};`,`var uniqueName = ${JSON.stringify(ie||undefined)};`,`var register = ${R.basicFunction("name, version, factory, eager",["var versions = scope[name] = scope[name] || {};","var activeVersion = versions[version];","if(!activeVersion || (!activeVersion.loaded && (!eager != !activeVersion.eager ? eager : uniqueName > activeVersion.from))) versions[version] = { get: factory, from: uniqueName, eager: !!eager };"])};`,`var initExternal = ${R.basicFunction("id",[`var handleError = ${R.expressionFunction('warn("Initialization of sharing external failed: " + err)',"err")};`,"try {",N.indent(["var module = __webpack_require__(id);","if(!module) return;",`var initFn = ${R.returningFunction(`module && module.init && module.init(${$.shareScopeMap}[name], initScope)`,"module")}`,"if(module.then) return promises.push(module.then(initFn, handleError));","var initResult = initFn(module);","if(initResult && initResult.then) return promises.push(initResult['catch'](handleError));"]),"} catch(err) { handleError(err); }"])}`,"var promises = [];","switch(name) {",...Array.from(ae).sort((([v],[E])=>G(v,E))).map((([v,E])=>N.indent([`case ${JSON.stringify(v)}: {`,N.indent(Array.from(E).sort((([v],[E])=>v-E)).map((([,v])=>N.asString(Array.from(v))))),"}","break;"]))),"}","if(!promises.length) return initPromises[name] = 1;",`return initPromises[name] = Promise.all(promises).then(${R.returningFunction("initPromises[name] = 1")});`])};`])}}v.exports=ShareRuntimeModule},303:function(v,E,R){"use strict";const $=R(16554);const j=R(96522);const N={dependencyType:"esm"};E.resolveMatchedConfigs=(v,E)=>{const R=new Map;const q=new Map;const G=new Map;const ie={fileDependencies:new j,contextDependencies:new j,missingDependencies:new j};const ae=v.resolverFactory.get("normal",N);const ce=v.compiler.context;return Promise.all(E.map((([E,j])=>{if(/^\.\.?(\/|$)/.test(E)){return new Promise((N=>{ae.resolve({},ce,E,ie,((q,G)=>{if(q||G===false){q=q||new Error(`Can't resolve ${E}`);v.errors.push(new $(null,q,{name:`shared module ${E}`}));return N()}R.set(G,j);N()}))}))}else if(/^(\/|[A-Za-z]:\\|\\\\)/.test(E)){R.set(E,j)}else if(E.endsWith("/")){G.set(E,j)}else{q.set(E,j)}}))).then((()=>{v.contextDependencies.addAll(ie.contextDependencies);v.fileDependencies.addAll(ie.fileDependencies);v.missingDependencies.addAll(ie.missingDependencies);return{resolved:R,unresolved:q,prefixed:G}}))}},539:function(v,E,R){"use strict";const{join:$,dirname:j,readJson:N}=R(47077);E.isRequiredVersion=v=>/^([\d^=v<>~]|[*xX]$)/.test(v);const getDescriptionFile=(v,E,R,q)=>{let G=0;const tryLoadCurrent=()=>{if(G>=R.length){const $=j(v,E);if(!$||$===E)return q();return getDescriptionFile(v,$,R,q)}const ie=$(v,E,R[G]);N(v,ie,((v,E)=>{if(v){if("code"in v&&v.code==="ENOENT"){G++;return tryLoadCurrent()}return q(v)}if(!E||typeof E!=="object"||Array.isArray(E)){return q(new Error(`Description file ${ie} is not an object`))}q(null,{data:E,path:ie})}))};tryLoadCurrent()};E.getDescriptionFile=getDescriptionFile;E.getRequiredVersionFromDescriptionFile=(v,E)=>{if(v.optionalDependencies&&typeof v.optionalDependencies==="object"&&E in v.optionalDependencies){return v.optionalDependencies[E]}if(v.dependencies&&typeof v.dependencies==="object"&&E in v.dependencies){return v.dependencies[E]}if(v.peerDependencies&&typeof v.peerDependencies==="object"&&E in v.peerDependencies){return v.peerDependencies[E]}if(v.devDependencies&&typeof v.devDependencies==="object"&&E in v.devDependencies){return v.devDependencies[E]}}},11285:function(v,E,R){"use strict";const $=R(73837);const j=R(99809);const N=R(24014);const{LogType:q}=R(33594);const G=R(97239);const ie=R(96740);const{countIterable:ae}=R(30922);const{compareLocations:ce,compareChunksById:le,compareNumbers:me,compareIds:_e,concatComparators:Ie,compareSelect:Me,compareModulesByIdentifier:Oe}=R(58792);const{makePathsRelative:Te,parseResource:Ne}=R(20162);const uniqueArray=(v,E)=>{const R=new Set;for(const $ of v){for(const v of E($)){R.add(v)}}return Array.from(R)};const uniqueOrderedArray=(v,E,R)=>uniqueArray(v,E).sort(R);const mapObject=(v,E)=>{const R=Object.create(null);for(const $ of Object.keys(v)){R[$]=E(v[$],$)}return R};const countWithChildren=(v,E)=>{let R=E(v,"").length;for(const $ of v.children){R+=countWithChildren($,((v,R)=>E(v,`.children[].compilation${R}`)))}return R};const Be={_:(v,E,R,{requestShortener:$})=>{if(typeof E==="string"){v.message=E}else{if(E.chunk){v.chunkName=E.chunk.name;v.chunkEntry=E.chunk.hasRuntime();v.chunkInitial=E.chunk.canBeInitial()}if(E.file){v.file=E.file}if(E.module){v.moduleIdentifier=E.module.identifier();v.moduleName=E.module.readableIdentifier($)}if(E.loc){v.loc=N(E.loc)}v.message=E.message}},ids:(v,E,{compilation:{chunkGraph:R}})=>{if(typeof E!=="string"){if(E.chunk){v.chunkId=E.chunk.id}if(E.module){v.moduleId=R.getModuleId(E.module)}}},moduleTrace:(v,E,R,$,j)=>{if(typeof E!=="string"&&E.module){const{type:$,compilation:{moduleGraph:N}}=R;const q=new Set;const G=[];let ie=E.module;while(ie){if(q.has(ie))break;q.add(ie);const v=N.getIssuer(ie);if(!v)break;G.push({origin:v,module:ie});ie=v}v.moduleTrace=j.create(`${$}.moduleTrace`,G,R)}},errorDetails:(v,E,{type:R,compilation:$,cachedGetErrors:j,cachedGetWarnings:N},{errorDetails:q})=>{if(typeof E!=="string"&&(q===true||R.endsWith(".error")&&j($).length<3)){v.details=E.details}},errorStack:(v,E)=>{if(typeof E!=="string"){v.stack=E.stack}}};const Le={compilation:{_:(v,E,$,j)=>{if(!$.makePathsRelative){$.makePathsRelative=Te.bindContextCache(E.compiler.context,E.compiler.root)}if(!$.cachedGetErrors){const v=new WeakMap;$.cachedGetErrors=E=>v.get(E)||(R=>(v.set(E,R),R))(E.getErrors())}if(!$.cachedGetWarnings){const v=new WeakMap;$.cachedGetWarnings=E=>v.get(E)||(R=>(v.set(E,R),R))(E.getWarnings())}if(E.name){v.name=E.name}if(E.needAdditionalPass){v.needAdditionalPass=true}const{logging:N,loggingDebug:G,loggingTrace:ie}=j;if(N||G&&G.length>0){const $=R(73837);v.logging={};let ae;let ce=false;switch(N){default:ae=new Set;break;case"error":ae=new Set([q.error]);break;case"warn":ae=new Set([q.error,q.warn]);break;case"info":ae=new Set([q.error,q.warn,q.info]);break;case"log":ae=new Set([q.error,q.warn,q.info,q.log,q.group,q.groupEnd,q.groupCollapsed,q.clear]);break;case"verbose":ae=new Set([q.error,q.warn,q.info,q.log,q.group,q.groupEnd,q.groupCollapsed,q.profile,q.profileEnd,q.time,q.status,q.clear]);ce=true;break}const le=Te.bindContextCache(j.context,E.compiler.root);let me=0;for(const[R,j]of E.logging){const E=G.some((v=>v(R)));if(N===false&&!E)continue;const _e=[];const Ie=[];let Me=Ie;let Oe=0;for(const v of j){let R=v.type;if(!E&&!ae.has(R))continue;if(R===q.groupCollapsed&&(E||ce))R=q.group;if(me===0){Oe++}if(R===q.groupEnd){_e.pop();if(_e.length>0){Me=_e[_e.length-1].children}else{Me=Ie}if(me>0)me--;continue}let j=undefined;if(v.type===q.time){j=`${v.args[0]}: ${v.args[1]*1e3+v.args[2]/1e6} ms`}else if(v.args&&v.args.length>0){j=$.format(v.args[0],...v.args.slice(1))}const N={...v,type:R,message:j,trace:ie?v.trace:undefined,children:R===q.group||R===q.groupCollapsed?[]:undefined};Me.push(N);if(N.children){_e.push(N);Me=N.children;if(me>0){me++}else if(R===q.groupCollapsed){me=1}}}let Te=le(R).replace(/\|/g," ");if(Te in v.logging){let E=1;while(`${Te}#${E}`in v.logging){E++}Te=`${Te}#${E}`}v.logging[Te]={entries:Ie,filteredEntries:j.length-Oe,debug:E}}}},hash:(v,E)=>{v.hash=E.hash},version:v=>{v.version=R(27012).i8},env:(v,E,R,{_env:$})=>{v.env=$},timings:(v,E)=>{v.time=E.endTime-E.startTime},builtAt:(v,E)=>{v.builtAt=E.endTime},publicPath:(v,E)=>{v.publicPath=E.getPath(E.outputOptions.publicPath)},outputPath:(v,E)=>{v.outputPath=E.outputOptions.path},assets:(v,E,R,$,j)=>{const{type:N}=R;const q=new Map;const G=new Map;for(const v of E.chunks){for(const E of v.files){let R=q.get(E);if(R===undefined){R=[];q.set(E,R)}R.push(v)}for(const E of v.auxiliaryFiles){let R=G.get(E);if(R===undefined){R=[];G.set(E,R)}R.push(v)}}const ie=new Map;const ae=new Set;for(const v of E.getAssets()){const E={...v,type:"asset",related:undefined};ae.add(E);ie.set(v.name,E)}for(const v of ie.values()){const E=v.info.related;if(!E)continue;for(const R of Object.keys(E)){const $=E[R];const j=Array.isArray($)?$:[$];for(const E of j){const $=ie.get(E);if(!$)continue;ae.delete($);$.type=R;v.related=v.related||[];v.related.push($)}}}v.assetsByChunkName={};for(const[E,R]of q){for(const $ of R){const R=$.name;if(!R)continue;if(!Object.prototype.hasOwnProperty.call(v.assetsByChunkName,R)){v.assetsByChunkName[R]=[]}v.assetsByChunkName[R].push(E)}}const ce=j.create(`${N}.assets`,Array.from(ae),{...R,compilationFileToChunks:q,compilationAuxiliaryFileToChunks:G});const le=spaceLimited(ce,$.assetsSpace);v.assets=le.children;v.filteredAssets=le.filteredChildren},chunks:(v,E,R,$,j)=>{const{type:N}=R;v.chunks=j.create(`${N}.chunks`,Array.from(E.chunks),R)},modules:(v,E,R,$,j)=>{const{type:N}=R;const q=Array.from(E.modules);const G=j.create(`${N}.modules`,q,R);const ie=spaceLimited(G,$.modulesSpace);v.modules=ie.children;v.filteredModules=ie.filteredChildren},entrypoints:(v,E,R,{entrypoints:$,chunkGroups:j,chunkGroupAuxiliary:N,chunkGroupChildren:q},G)=>{const{type:ie}=R;const ae=Array.from(E.entrypoints,(([v,E])=>({name:v,chunkGroup:E})));if($==="auto"&&!j){if(ae.length>5)return;if(!q&&ae.every((({chunkGroup:v})=>{if(v.chunks.length!==1)return false;const E=v.chunks[0];return E.files.size===1&&(!N||E.auxiliaryFiles.size===0)}))){return}}v.entrypoints=G.create(`${ie}.entrypoints`,ae,R)},chunkGroups:(v,E,R,$,j)=>{const{type:N}=R;const q=Array.from(E.namedChunkGroups,(([v,E])=>({name:v,chunkGroup:E})));v.namedChunkGroups=j.create(`${N}.namedChunkGroups`,q,R)},errors:(v,E,R,$,j)=>{const{type:N,cachedGetErrors:q}=R;v.errors=j.create(`${N}.errors`,q(E),R)},errorsCount:(v,E,{cachedGetErrors:R})=>{v.errorsCount=countWithChildren(E,(v=>R(v)))},warnings:(v,E,R,$,j)=>{const{type:N,cachedGetWarnings:q}=R;v.warnings=j.create(`${N}.warnings`,q(E),R)},warningsCount:(v,E,R,{warningsFilter:$},j)=>{const{type:N,cachedGetWarnings:q}=R;v.warningsCount=countWithChildren(E,((v,E)=>{if(!$&&$.length===0)return q(v);return j.create(`${N}${E}.warnings`,q(v),R).filter((v=>{const E=Object.keys(v).map((E=>`${v[E]}`)).join("\n");return!$.some((R=>R(v,E)))}))}))},errorDetails:(v,E,{cachedGetErrors:R,cachedGetWarnings:$},{errorDetails:j,errors:N,warnings:q})=>{if(j==="auto"){if(q){const R=$(E);v.filteredWarningDetailsCount=R.map((v=>typeof v!=="string"&&v.details)).filter(Boolean).length}if(N){const $=R(E);if($.length>=3){v.filteredErrorDetailsCount=$.map((v=>typeof v!=="string"&&v.details)).filter(Boolean).length}}}},children:(v,E,R,$,j)=>{const{type:N}=R;v.children=j.create(`${N}.children`,E.children,R)}},asset:{_:(v,E,R,$,j)=>{const{compilation:N}=R;v.type=E.type;v.name=E.name;v.size=E.source.size();v.emitted=N.emittedAssets.has(E.name);v.comparedForEmit=N.comparedForEmitAssets.has(E.name);const q=!v.emitted&&!v.comparedForEmit;v.cached=q;v.info=E.info;if(!q||$.cachedAssets){Object.assign(v,j.create(`${R.type}$visible`,E,R))}}},asset$visible:{_:(v,E,{compilation:R,compilationFileToChunks:$,compilationAuxiliaryFileToChunks:j})=>{const N=$.get(E.name)||[];const q=j.get(E.name)||[];v.chunkNames=uniqueOrderedArray(N,(v=>v.name?[v.name]:[]),_e);v.chunkIdHints=uniqueOrderedArray(N,(v=>Array.from(v.idNameHints)),_e);v.auxiliaryChunkNames=uniqueOrderedArray(q,(v=>v.name?[v.name]:[]),_e);v.auxiliaryChunkIdHints=uniqueOrderedArray(q,(v=>Array.from(v.idNameHints)),_e);v.filteredRelated=E.related?E.related.length:undefined},relatedAssets:(v,E,R,$,j)=>{const{type:N}=R;v.related=j.create(`${N.slice(0,-8)}.related`,E.related,R);v.filteredRelated=E.related?E.related.length-v.related.length:undefined},ids:(v,E,{compilationFileToChunks:R,compilationAuxiliaryFileToChunks:$})=>{const j=R.get(E.name)||[];const N=$.get(E.name)||[];v.chunks=uniqueOrderedArray(j,(v=>v.ids),_e);v.auxiliaryChunks=uniqueOrderedArray(N,(v=>v.ids),_e)},performance:(v,E)=>{v.isOverSizeLimit=ie.isOverSizeLimit(E.source)}},chunkGroup:{_:(v,{name:E,chunkGroup:R},{compilation:$,compilation:{moduleGraph:j,chunkGraph:N}},{ids:q,chunkGroupAuxiliary:G,chunkGroupChildren:ie,chunkGroupMaxAssets:ae})=>{const ce=ie&&R.getChildrenByOrders(j,N);const toAsset=v=>{const E=$.getAsset(v);return{name:v,size:E?E.info.size:-1}};const sizeReducer=(v,{size:E})=>v+E;const le=uniqueArray(R.chunks,(v=>v.files)).map(toAsset);const me=uniqueOrderedArray(R.chunks,(v=>v.auxiliaryFiles),_e).map(toAsset);const Ie=le.reduce(sizeReducer,0);const Me=me.reduce(sizeReducer,0);const Oe={name:E,chunks:q?R.chunks.map((v=>v.id)):undefined,assets:le.length<=ae?le:undefined,filteredAssets:le.length<=ae?0:le.length,assetsSize:Ie,auxiliaryAssets:G&&me.length<=ae?me:undefined,filteredAuxiliaryAssets:G&&me.length<=ae?0:me.length,auxiliaryAssetsSize:Me,children:ce?mapObject(ce,(v=>v.map((v=>{const E=uniqueArray(v.chunks,(v=>v.files)).map(toAsset);const R=uniqueOrderedArray(v.chunks,(v=>v.auxiliaryFiles),_e).map(toAsset);const $={name:v.name,chunks:q?v.chunks.map((v=>v.id)):undefined,assets:E.length<=ae?E:undefined,filteredAssets:E.length<=ae?0:E.length,auxiliaryAssets:G&&R.length<=ae?R:undefined,filteredAuxiliaryAssets:G&&R.length<=ae?0:R.length};return $})))):undefined,childAssets:ce?mapObject(ce,(v=>{const E=new Set;for(const R of v){for(const v of R.chunks){for(const R of v.files){E.add(R)}}}return Array.from(E)})):undefined};Object.assign(v,Oe)},performance:(v,{chunkGroup:E})=>{v.isOverSizeLimit=ie.isOverSizeLimit(E)}},module:{_:(v,E,R,$,j)=>{const{compilation:N,type:q}=R;const G=N.builtModules.has(E);const ie=N.codeGeneratedModules.has(E);const ae=N.buildTimeExecutedModules.has(E);const ce={};for(const v of E.getSourceTypes()){ce[v]=E.size(v)}const le={type:"module",moduleType:E.type,layer:E.layer,size:E.size(),sizes:ce,built:G,codeGenerated:ie,buildTimeExecuted:ae,cached:!G&&!ie};Object.assign(v,le);if(G||ie||$.cachedModules){Object.assign(v,j.create(`${q}$visible`,E,R))}}},module$visible:{_:(v,E,R,{requestShortener:$},j)=>{const{compilation:N,type:q,rootModules:G}=R;const{moduleGraph:ie}=N;const ce=[];const le=ie.getIssuer(E);let me=le;while(me){ce.push(me);me=ie.getIssuer(me)}ce.reverse();const _e=ie.getProfile(E);const Ie=E.getErrors();const Me=Ie!==undefined?ae(Ie):0;const Oe=E.getWarnings();const Te=Oe!==undefined?ae(Oe):0;const Ne={};for(const v of E.getSourceTypes()){Ne[v]=E.size(v)}const Be={identifier:E.identifier(),name:E.readableIdentifier($),nameForCondition:E.nameForCondition(),index:ie.getPreOrderIndex(E),preOrderIndex:ie.getPreOrderIndex(E),index2:ie.getPostOrderIndex(E),postOrderIndex:ie.getPostOrderIndex(E),cacheable:E.buildInfo.cacheable,optional:E.isOptional(ie),orphan:!q.endsWith("module.modules[].module$visible")&&N.chunkGraph.getNumberOfModuleChunks(E)===0,dependent:G?!G.has(E):undefined,issuer:le&&le.identifier(),issuerName:le&&le.readableIdentifier($),issuerPath:le&&j.create(`${q.slice(0,-8)}.issuerPath`,ce,R),failed:Me>0,errors:Me,warnings:Te};Object.assign(v,Be);if(_e){v.profile=j.create(`${q.slice(0,-8)}.profile`,_e,R)}},ids:(v,E,{compilation:{chunkGraph:R,moduleGraph:$}})=>{v.id=R.getModuleId(E);const j=$.getIssuer(E);v.issuerId=j&&R.getModuleId(j);v.chunks=Array.from(R.getOrderedModuleChunksIterable(E,le),(v=>v.id))},moduleAssets:(v,E)=>{v.assets=E.buildInfo.assets?Object.keys(E.buildInfo.assets):[]},reasons:(v,E,R,$,j)=>{const{type:N,compilation:{moduleGraph:q}}=R;const G=j.create(`${N.slice(0,-8)}.reasons`,Array.from(q.getIncomingConnections(E)),R);const ie=spaceLimited(G,$.reasonsSpace);v.reasons=ie.children;v.filteredReasons=ie.filteredChildren},usedExports:(v,E,{runtime:R,compilation:{moduleGraph:$}})=>{const j=$.getUsedExports(E,R);if(j===null){v.usedExports=null}else if(typeof j==="boolean"){v.usedExports=j}else{v.usedExports=Array.from(j)}},providedExports:(v,E,{compilation:{moduleGraph:R}})=>{const $=R.getProvidedExports(E);v.providedExports=Array.isArray($)?$:null},optimizationBailout:(v,E,{compilation:{moduleGraph:R}},{requestShortener:$})=>{v.optimizationBailout=R.getOptimizationBailout(E).map((v=>{if(typeof v==="function")return v($);return v}))},depth:(v,E,{compilation:{moduleGraph:R}})=>{v.depth=R.getDepth(E)},nestedModules:(v,E,R,$,j)=>{const{type:N}=R;const q=E.modules;if(Array.isArray(q)){const E=j.create(`${N.slice(0,-8)}.modules`,q,R);const G=spaceLimited(E,$.nestedModulesSpace);v.modules=G.children;v.filteredModules=G.filteredChildren}},source:(v,E)=>{const R=E.originalSource();if(R){v.source=R.source()}}},profile:{_:(v,E)=>{const R={total:E.factory+E.restoring+E.integration+E.building+E.storing,resolving:E.factory,restoring:E.restoring,building:E.building,integration:E.integration,storing:E.storing,additionalResolving:E.additionalFactories,additionalIntegration:E.additionalIntegration,factory:E.factory,dependencies:E.additionalFactories};Object.assign(v,R)}},moduleIssuer:{_:(v,E,R,{requestShortener:$},j)=>{const{compilation:N,type:q}=R;const{moduleGraph:G}=N;const ie=G.getProfile(E);const ae={identifier:E.identifier(),name:E.readableIdentifier($)};Object.assign(v,ae);if(ie){v.profile=j.create(`${q}.profile`,ie,R)}},ids:(v,E,{compilation:{chunkGraph:R}})=>{v.id=R.getModuleId(E)}},moduleReason:{_:(v,E,{runtime:R},{requestShortener:$})=>{const q=E.dependency;const G=q&&q instanceof j?q:undefined;const ie={moduleIdentifier:E.originModule?E.originModule.identifier():null,module:E.originModule?E.originModule.readableIdentifier($):null,moduleName:E.originModule?E.originModule.readableIdentifier($):null,resolvedModuleIdentifier:E.resolvedOriginModule?E.resolvedOriginModule.identifier():null,resolvedModule:E.resolvedOriginModule?E.resolvedOriginModule.readableIdentifier($):null,type:E.dependency?E.dependency.type:null,active:E.isActive(R),explanation:E.explanation,userRequest:G&&G.userRequest||null};Object.assign(v,ie);if(E.dependency){const R=N(E.dependency.loc);if(R){v.loc=R}}},ids:(v,E,{compilation:{chunkGraph:R}})=>{v.moduleId=E.originModule?R.getModuleId(E.originModule):null;v.resolvedModuleId=E.resolvedOriginModule?R.getModuleId(E.resolvedOriginModule):null}},chunk:{_:(v,E,{makePathsRelative:R,compilation:{chunkGraph:$}})=>{const j=E.getChildIdsByOrders($);const N={rendered:E.rendered,initial:E.canBeInitial(),entry:E.hasRuntime(),recorded:G.wasChunkRecorded(E),reason:E.chunkReason,size:$.getChunkModulesSize(E),sizes:$.getChunkModulesSizes(E),names:E.name?[E.name]:[],idHints:Array.from(E.idNameHints),runtime:E.runtime===undefined?undefined:typeof E.runtime==="string"?[R(E.runtime)]:Array.from(E.runtime.sort(),R),files:Array.from(E.files),auxiliaryFiles:Array.from(E.auxiliaryFiles).sort(_e),hash:E.renderedHash,childrenByOrder:j};Object.assign(v,N)},ids:(v,E)=>{v.id=E.id},chunkRelations:(v,E,{compilation:{chunkGraph:R}})=>{const $=new Set;const j=new Set;const N=new Set;for(const v of E.groupsIterable){for(const E of v.parentsIterable){for(const v of E.chunks){$.add(v.id)}}for(const E of v.childrenIterable){for(const v of E.chunks){j.add(v.id)}}for(const R of v.chunks){if(R!==E)N.add(R.id)}}v.siblings=Array.from(N).sort(_e);v.parents=Array.from($).sort(_e);v.children=Array.from(j).sort(_e)},chunkModules:(v,E,R,$,j)=>{const{type:N,compilation:{chunkGraph:q}}=R;const G=q.getChunkModules(E);const ie=j.create(`${N}.modules`,G,{...R,runtime:E.runtime,rootModules:new Set(q.getChunkRootModules(E))});const ae=spaceLimited(ie,$.chunkModulesSpace);v.modules=ae.children;v.filteredModules=ae.filteredChildren},chunkOrigins:(v,E,R,$,j)=>{const{type:q,compilation:{chunkGraph:G}}=R;const ie=new Set;const ae=[];for(const v of E.groupsIterable){ae.push(...v.origins)}const ce=ae.filter((v=>{const E=[v.module?G.getModuleId(v.module):undefined,N(v.loc),v.request].join();if(ie.has(E))return false;ie.add(E);return true}));v.origins=j.create(`${q}.origins`,ce,R)}},chunkOrigin:{_:(v,E,R,{requestShortener:$})=>{const j={module:E.module?E.module.identifier():"",moduleIdentifier:E.module?E.module.identifier():"",moduleName:E.module?E.module.readableIdentifier($):"",loc:N(E.loc),request:E.request};Object.assign(v,j)},ids:(v,E,{compilation:{chunkGraph:R}})=>{v.moduleId=E.module?R.getModuleId(E.module):undefined}},error:Be,warning:Be,moduleTraceItem:{_:(v,{origin:E,module:R},$,{requestShortener:j},N)=>{const{type:q,compilation:{moduleGraph:G}}=$;v.originIdentifier=E.identifier();v.originName=E.readableIdentifier(j);v.moduleIdentifier=R.identifier();v.moduleName=R.readableIdentifier(j);const ie=Array.from(G.getIncomingConnections(R)).filter((v=>v.resolvedOriginModule===E&&v.dependency)).map((v=>v.dependency));v.dependencies=N.create(`${q}.dependencies`,Array.from(new Set(ie)),$)},ids:(v,{origin:E,module:R},{compilation:{chunkGraph:$}})=>{v.originId=$.getModuleId(E);v.moduleId=$.getModuleId(R)}},moduleTraceDependency:{_:(v,E)=>{v.loc=N(E.loc)}}};const qe={"module.reasons":{"!orphanModules":(v,{compilation:{chunkGraph:E}})=>{if(v.originModule&&E.getNumberOfModuleChunks(v.originModule)===0){return false}}}};const Ue={"compilation.warnings":{warningsFilter:$.deprecate(((v,E,{warningsFilter:R})=>{const $=Object.keys(v).map((E=>`${v[E]}`)).join("\n");return!R.some((E=>E(v,$)))}),"config.stats.warningsFilter is deprecated in favor of config.ignoreWarnings","DEP_WEBPACK_STATS_WARNINGS_FILTER")}};const Ge={_:(v,{compilation:{moduleGraph:E}})=>{v.push(Me((v=>E.getDepth(v)),me),Me((v=>E.getPreOrderIndex(v)),me),Me((v=>v.identifier()),_e))}};const He={"compilation.chunks":{_:v=>{v.push(Me((v=>v.id),_e))}},"compilation.modules":Ge,"chunk.rootModules":Ge,"chunk.modules":Ge,"module.modules":Ge,"module.reasons":{_:(v,{compilation:{chunkGraph:E}})=>{v.push(Me((v=>v.originModule),Oe));v.push(Me((v=>v.resolvedOriginModule),Oe));v.push(Me((v=>v.dependency),Ie(Me((v=>v.loc),ce),Me((v=>v.type),_e))))}},"chunk.origins":{_:(v,{compilation:{chunkGraph:E}})=>{v.push(Me((v=>v.module?E.getModuleId(v.module):undefined),_e),Me((v=>N(v.loc)),_e),Me((v=>v.request),_e))}}};const getItemSize=v=>!v.children?1:v.filteredChildren?2+getTotalSize(v.children):1+getTotalSize(v.children);const getTotalSize=v=>{let E=0;for(const R of v){E+=getItemSize(R)}return E};const getTotalItems=v=>{let E=0;for(const R of v){if(!R.children&&!R.filteredChildren){E++}else{if(R.children)E+=getTotalItems(R.children);if(R.filteredChildren)E+=R.filteredChildren}}return E};const collapse=v=>{const E=[];for(const R of v){if(R.children){let v=R.filteredChildren||0;v+=getTotalItems(R.children);E.push({...R,children:undefined,filteredChildren:v})}else{E.push(R)}}return E};const spaceLimited=(v,E,R=false)=>{if(E<1){return{children:undefined,filteredChildren:getTotalItems(v)}}let $=undefined;let j=undefined;const N=[];const q=[];const G=[];let ie=0;for(const E of v){if(!E.children&&!E.filteredChildren){G.push(E)}else{N.push(E);const v=getItemSize(E);q.push(v);ie+=v}}if(ie+G.length<=E){$=N.length>0?N.concat(G):G}else if(N.length===0){const v=E-(R?0:1);j=G.length-v;G.length=v;$=G}else{const ae=N.length+(R||G.length===0?0:1);if(ae0){const E=Math.max(...q);if(E{let R=0;for(const E of v){R+=E.size}return{size:R}};const moduleGroup=(v,E)=>{let R=0;const $={};for(const E of v){R+=E.size;for(const v of Object.keys(E.sizes)){$[v]=($[v]||0)+E.sizes[v]}}return{size:R,sizes:$}};const reasonGroup=(v,E)=>{let R=false;for(const E of v){R=R||E.active}return{active:R}};const We=/(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/;const Qe=/(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;const Je={_:(v,E,R)=>{const groupByFlag=(E,R)=>{v.push({getKeys:v=>v[E]?["1"]:undefined,getOptions:()=>({groupChildren:!R,force:R}),createGroup:(v,$,j)=>R?{type:"assets by status",[E]:!!v,filteredChildren:j.length,...assetGroup($,j)}:{type:"assets by status",[E]:!!v,children:$,...assetGroup($,j)}})};const{groupAssetsByEmitStatus:$,groupAssetsByPath:j,groupAssetsByExtension:N}=R;if($){groupByFlag("emitted");groupByFlag("comparedForEmit");groupByFlag("isOverSizeLimit")}if($||!R.cachedAssets){groupByFlag("cached",!R.cachedAssets)}if(j||N){v.push({getKeys:v=>{const E=N&&We.exec(v.name);const R=E?E[1]:"";const $=j&&Qe.exec(v.name);const q=$?$[1].split(/[/\\]/):[];const G=[];if(j){G.push(".");if(R)G.push(q.length?`${q.join("/")}/*${R}`:`*${R}`);while(q.length>0){G.push(q.join("/")+"/");q.pop()}}else{if(R)G.push(`*${R}`)}return G},createGroup:(v,E,R)=>({type:j?"assets by path":"assets by extension",name:v,children:E,...assetGroup(E,R)})})}},groupAssetsByInfo:(v,E,R)=>{const groupByAssetInfoFlag=E=>{v.push({getKeys:v=>v.info&&v.info[E]?["1"]:undefined,createGroup:(v,R,$)=>({type:"assets by info",info:{[E]:!!v},children:R,...assetGroup(R,$)})})};groupByAssetInfoFlag("immutable");groupByAssetInfoFlag("development");groupByAssetInfoFlag("hotModuleReplacement")},groupAssetsByChunk:(v,E,R)=>{const groupByNames=E=>{v.push({getKeys:v=>v[E],createGroup:(v,R,$)=>({type:"assets by chunk",[E]:[v],children:R,...assetGroup(R,$)})})};groupByNames("chunkNames");groupByNames("auxiliaryChunkNames");groupByNames("chunkIdHints");groupByNames("auxiliaryChunkIdHints")},excludeAssets:(v,E,{excludeAssets:R})=>{v.push({getKeys:v=>{const E=v.name;const $=R.some((R=>R(E,v)));if($)return["excluded"]},getOptions:()=>({groupChildren:false,force:true}),createGroup:(v,E,R)=>({type:"hidden assets",filteredChildren:R.length,...assetGroup(E,R)})})}};const MODULES_GROUPERS=v=>({_:(v,E,R)=>{const groupByFlag=(E,R,$)=>{v.push({getKeys:v=>v[E]?["1"]:undefined,getOptions:()=>({groupChildren:!$,force:$}),createGroup:(v,j,N)=>({type:R,[E]:!!v,...$?{filteredChildren:N.length}:{children:j},...moduleGroup(j,N)})})};const{groupModulesByCacheStatus:$,groupModulesByLayer:j,groupModulesByAttributes:N,groupModulesByType:q,groupModulesByPath:G,groupModulesByExtension:ie}=R;if(N){groupByFlag("errors","modules with errors");groupByFlag("warnings","modules with warnings");groupByFlag("assets","modules with assets");groupByFlag("optional","optional modules")}if($){groupByFlag("cacheable","cacheable modules");groupByFlag("built","built modules");groupByFlag("codeGenerated","code generated modules")}if($||!R.cachedModules){groupByFlag("cached","cached modules",!R.cachedModules)}if(N||!R.orphanModules){groupByFlag("orphan","orphan modules",!R.orphanModules)}if(N||!R.dependentModules){groupByFlag("dependent","dependent modules",!R.dependentModules)}if(q||!R.runtimeModules){v.push({getKeys:v=>{if(!v.moduleType)return;if(q){return[v.moduleType.split("/",1)[0]]}else if(v.moduleType==="runtime"){return["runtime"]}},getOptions:v=>{const E=v==="runtime"&&!R.runtimeModules;return{groupChildren:!E,force:E}},createGroup:(v,E,$)=>{const j=v==="runtime"&&!R.runtimeModules;return{type:`${v} modules`,moduleType:v,...j?{filteredChildren:$.length}:{children:E},...moduleGroup(E,$)}}})}if(j){v.push({getKeys:v=>[v.layer],createGroup:(v,E,R)=>({type:"modules by layer",layer:v,children:E,...moduleGroup(E,R)})})}if(G||ie){v.push({getKeys:v=>{if(!v.name)return;const E=Ne(v.name.split("!").pop()).path;const R=/^data:[^,;]+/.exec(E);if(R)return[R[0]];const $=ie&&We.exec(E);const j=$?$[1]:"";const N=G&&Qe.exec(E);const q=N?N[1].split(/[/\\]/):[];const ae=[];if(G){if(j)ae.push(q.length?`${q.join("/")}/*${j}`:`*${j}`);while(q.length>0){ae.push(q.join("/")+"/");q.pop()}}else{if(j)ae.push(`*${j}`)}return ae},createGroup:(v,E,R)=>{const $=v.startsWith("data:");return{type:$?"modules by mime type":G?"modules by path":"modules by extension",name:$?v.slice(5):v,children:E,...moduleGroup(E,R)}}})}},excludeModules:(E,R,{excludeModules:$})=>{E.push({getKeys:E=>{const R=E.name;if(R){const j=$.some(($=>$(R,E,v)));if(j)return["1"]}},getOptions:()=>({groupChildren:false,force:true}),createGroup:(v,E,R)=>({type:"hidden modules",filteredChildren:E.length,...moduleGroup(E,R)})})}});const Ve={"compilation.assets":Je,"asset.related":Je,"compilation.modules":MODULES_GROUPERS("module"),"chunk.modules":MODULES_GROUPERS("chunk"),"chunk.rootModules":MODULES_GROUPERS("root-of-chunk"),"module.modules":MODULES_GROUPERS("nested"),"module.reasons":{groupReasonsByOrigin:v=>{v.push({getKeys:v=>[v.module],createGroup:(v,E,R)=>({type:"from origin",module:v,children:E,...reasonGroup(E,R)})})}}};const normalizeFieldKey=v=>{if(v[0]==="!"){return v.slice(1)}return v};const sortOrderRegular=v=>{if(v[0]==="!"){return false}return true};const sortByField=v=>{if(!v){const noSort=(v,E)=>0;return noSort}const E=normalizeFieldKey(v);let R=Me((v=>v[E]),_e);const $=sortOrderRegular(v);if(!$){const v=R;R=(E,R)=>v(R,E)}return R};const Ke={assetsSort:(v,E,{assetsSort:R})=>{v.push(sortByField(R))},_:v=>{v.push(Me((v=>v.name),_e))}};const Xe={"compilation.chunks":{chunksSort:(v,E,{chunksSort:R})=>{v.push(sortByField(R))}},"compilation.modules":{modulesSort:(v,E,{modulesSort:R})=>{v.push(sortByField(R))}},"chunk.modules":{chunkModulesSort:(v,E,{chunkModulesSort:R})=>{v.push(sortByField(R))}},"module.modules":{nestedModulesSort:(v,E,{nestedModulesSort:R})=>{v.push(sortByField(R))}},"compilation.assets":Ke,"asset.related":Ke};const iterateConfig=(v,E,R)=>{for(const $ of Object.keys(v)){const j=v[$];for(const v of Object.keys(j)){if(v!=="_"){if(v.startsWith("!")){if(E[v.slice(1)])continue}else{const R=E[v];if(R===false||R===undefined||Array.isArray(R)&&R.length===0)continue}}R($,j[v])}}};const Ye={"compilation.children[]":"compilation","compilation.modules[]":"module","compilation.entrypoints[]":"chunkGroup","compilation.namedChunkGroups[]":"chunkGroup","compilation.errors[]":"error","compilation.warnings[]":"warning","chunk.modules[]":"module","chunk.rootModules[]":"module","chunk.origins[]":"chunkOrigin","compilation.chunks[]":"chunk","compilation.assets[]":"asset","asset.related[]":"asset","module.issuerPath[]":"moduleIssuer","module.reasons[]":"moduleReason","module.modules[]":"module","module.children[]":"module","moduleTrace[]":"moduleTraceItem","moduleTraceItem.dependencies[]":"moduleTraceDependency"};const mergeToObject=v=>{const E=Object.create(null);for(const R of v){E[R.name]=R}return E};const Ze={"compilation.entrypoints":mergeToObject,"compilation.namedChunkGroups":mergeToObject};class DefaultStatsFactoryPlugin{apply(v){v.hooks.compilation.tap("DefaultStatsFactoryPlugin",(v=>{v.hooks.statsFactory.tap("DefaultStatsFactoryPlugin",((E,R,$)=>{iterateConfig(Le,R,((v,$)=>{E.hooks.extract.for(v).tap("DefaultStatsFactoryPlugin",((v,j,N)=>$(v,j,N,R,E)))}));iterateConfig(qe,R,((v,$)=>{E.hooks.filter.for(v).tap("DefaultStatsFactoryPlugin",((v,E,j,N)=>$(v,E,R,j,N)))}));iterateConfig(Ue,R,((v,$)=>{E.hooks.filterResults.for(v).tap("DefaultStatsFactoryPlugin",((v,E,j,N)=>$(v,E,R,j,N)))}));iterateConfig(He,R,((v,$)=>{E.hooks.sort.for(v).tap("DefaultStatsFactoryPlugin",((v,E)=>$(v,E,R)))}));iterateConfig(Xe,R,((v,$)=>{E.hooks.sortResults.for(v).tap("DefaultStatsFactoryPlugin",((v,E)=>$(v,E,R)))}));iterateConfig(Ve,R,((v,$)=>{E.hooks.groupResults.for(v).tap("DefaultStatsFactoryPlugin",((v,E)=>$(v,E,R)))}));for(const v of Object.keys(Ye)){const R=Ye[v];E.hooks.getItemName.for(v).tap("DefaultStatsFactoryPlugin",(()=>R))}for(const v of Object.keys(Ze)){const R=Ze[v];E.hooks.merge.for(v).tap("DefaultStatsFactoryPlugin",R)}if(R.children){if(Array.isArray(R.children)){E.hooks.getItemFactory.for("compilation.children[].compilation").tap("DefaultStatsFactoryPlugin",((E,{_index:j})=>{if(jj))}}}))}))}}v.exports=DefaultStatsFactoryPlugin},16478:function(v,E,R){"use strict";const $=R(41483);const applyDefaults=(v,E)=>{for(const R of Object.keys(E)){if(typeof v[R]==="undefined"){v[R]=E[R]}}};const j={verbose:{hash:true,builtAt:true,relatedAssets:true,entrypoints:true,chunkGroups:true,ids:true,modules:false,chunks:true,chunkRelations:true,chunkModules:true,dependentModules:true,chunkOrigins:true,depth:true,env:true,reasons:true,usedExports:true,providedExports:true,optimizationBailout:true,errorDetails:true,errorStack:true,publicPath:true,logging:"verbose",orphanModules:true,runtimeModules:true,exclude:false,modulesSpace:Infinity,chunkModulesSpace:Infinity,assetsSpace:Infinity,reasonsSpace:Infinity,children:true},detailed:{hash:true,builtAt:true,relatedAssets:true,entrypoints:true,chunkGroups:true,ids:true,chunks:true,chunkRelations:true,chunkModules:false,chunkOrigins:true,depth:true,usedExports:true,providedExports:true,optimizationBailout:true,errorDetails:true,publicPath:true,logging:true,runtimeModules:true,exclude:false,modulesSpace:1e3,assetsSpace:1e3,reasonsSpace:1e3},minimal:{all:false,version:true,timings:true,modules:true,modulesSpace:0,assets:true,assetsSpace:0,errors:true,errorsCount:true,warnings:true,warningsCount:true,logging:"warn"},"errors-only":{all:false,errors:true,errorsCount:true,moduleTrace:true,logging:"error"},"errors-warnings":{all:false,errors:true,errorsCount:true,warnings:true,warningsCount:true,logging:"warn"},summary:{all:false,version:true,errorsCount:true,warningsCount:true},none:{all:false}};const NORMAL_ON=({all:v})=>v!==false;const NORMAL_OFF=({all:v})=>v===true;const ON_FOR_TO_STRING=({all:v},{forToString:E})=>E?v!==false:v===true;const OFF_FOR_TO_STRING=({all:v},{forToString:E})=>E?v===true:v!==false;const AUTO_FOR_TO_STRING=({all:v},{forToString:E})=>{if(v===false)return false;if(v===true)return true;if(E)return"auto";return true};const N={context:(v,E,R)=>R.compiler.context,requestShortener:(v,E,R)=>R.compiler.context===v.context?R.requestShortener:new $(v.context,R.compiler.root),performance:NORMAL_ON,hash:OFF_FOR_TO_STRING,env:NORMAL_OFF,version:NORMAL_ON,timings:NORMAL_ON,builtAt:OFF_FOR_TO_STRING,assets:NORMAL_ON,entrypoints:AUTO_FOR_TO_STRING,chunkGroups:OFF_FOR_TO_STRING,chunkGroupAuxiliary:OFF_FOR_TO_STRING,chunkGroupChildren:OFF_FOR_TO_STRING,chunkGroupMaxAssets:(v,{forToString:E})=>E?5:Infinity,chunks:OFF_FOR_TO_STRING,chunkRelations:OFF_FOR_TO_STRING,chunkModules:({all:v,modules:E})=>{if(v===false)return false;if(v===true)return true;if(E)return false;return true},dependentModules:OFF_FOR_TO_STRING,chunkOrigins:OFF_FOR_TO_STRING,ids:OFF_FOR_TO_STRING,modules:({all:v,chunks:E,chunkModules:R},{forToString:$})=>{if(v===false)return false;if(v===true)return true;if($&&E&&R)return false;return true},nestedModules:OFF_FOR_TO_STRING,groupModulesByType:ON_FOR_TO_STRING,groupModulesByCacheStatus:ON_FOR_TO_STRING,groupModulesByLayer:ON_FOR_TO_STRING,groupModulesByAttributes:ON_FOR_TO_STRING,groupModulesByPath:ON_FOR_TO_STRING,groupModulesByExtension:ON_FOR_TO_STRING,modulesSpace:(v,{forToString:E})=>E?15:Infinity,chunkModulesSpace:(v,{forToString:E})=>E?10:Infinity,nestedModulesSpace:(v,{forToString:E})=>E?10:Infinity,relatedAssets:OFF_FOR_TO_STRING,groupAssetsByEmitStatus:ON_FOR_TO_STRING,groupAssetsByInfo:ON_FOR_TO_STRING,groupAssetsByPath:ON_FOR_TO_STRING,groupAssetsByExtension:ON_FOR_TO_STRING,groupAssetsByChunk:ON_FOR_TO_STRING,assetsSpace:(v,{forToString:E})=>E?15:Infinity,orphanModules:OFF_FOR_TO_STRING,runtimeModules:({all:v,runtime:E},{forToString:R})=>E!==undefined?E:R?v===true:v!==false,cachedModules:({all:v,cached:E},{forToString:R})=>E!==undefined?E:R?v===true:v!==false,moduleAssets:OFF_FOR_TO_STRING,depth:OFF_FOR_TO_STRING,cachedAssets:OFF_FOR_TO_STRING,reasons:OFF_FOR_TO_STRING,reasonsSpace:(v,{forToString:E})=>E?15:Infinity,groupReasonsByOrigin:ON_FOR_TO_STRING,usedExports:OFF_FOR_TO_STRING,providedExports:OFF_FOR_TO_STRING,optimizationBailout:OFF_FOR_TO_STRING,children:OFF_FOR_TO_STRING,source:NORMAL_OFF,moduleTrace:NORMAL_ON,errors:NORMAL_ON,errorsCount:NORMAL_ON,errorDetails:AUTO_FOR_TO_STRING,errorStack:OFF_FOR_TO_STRING,warnings:NORMAL_ON,warningsCount:NORMAL_ON,publicPath:OFF_FOR_TO_STRING,logging:({all:v},{forToString:E})=>E&&v!==false?"info":false,loggingDebug:()=>[],loggingTrace:OFF_FOR_TO_STRING,excludeModules:()=>[],excludeAssets:()=>[],modulesSort:()=>"depth",chunkModulesSort:()=>"name",nestedModulesSort:()=>false,chunksSort:()=>false,assetsSort:()=>"!size",outputPath:OFF_FOR_TO_STRING,colors:()=>false};const normalizeFilter=v=>{if(typeof v==="string"){const E=new RegExp(`[\\\\/]${v.replace(/[-[\]{}()*+?.\\^$|]/g,"\\$&")}([\\\\/]|$|!|\\?)`);return v=>E.test(v)}if(v&&typeof v==="object"&&typeof v.test==="function"){return E=>v.test(E)}if(typeof v==="function"){return v}if(typeof v==="boolean"){return()=>v}};const q={excludeModules:v=>{if(!Array.isArray(v)){v=v?[v]:[]}return v.map(normalizeFilter)},excludeAssets:v=>{if(!Array.isArray(v)){v=v?[v]:[]}return v.map(normalizeFilter)},warningsFilter:v=>{if(!Array.isArray(v)){v=v?[v]:[]}return v.map((v=>{if(typeof v==="string"){return(E,R)=>R.includes(v)}if(v instanceof RegExp){return(E,R)=>v.test(R)}if(typeof v==="function"){return v}throw new Error(`Can only filter warnings with Strings or RegExps. (Given: ${v})`)}))},logging:v=>{if(v===true)v="log";return v},loggingDebug:v=>{if(!Array.isArray(v)){v=v?[v]:[]}return v.map(normalizeFilter)}};class DefaultStatsPresetPlugin{apply(v){v.hooks.compilation.tap("DefaultStatsPresetPlugin",(v=>{for(const E of Object.keys(j)){const R=j[E];v.hooks.statsPreset.for(E).tap("DefaultStatsPresetPlugin",((v,E)=>{applyDefaults(v,R)}))}v.hooks.statsNormalize.tap("DefaultStatsPresetPlugin",((E,R)=>{for(const $ of Object.keys(N)){if(E[$]===undefined)E[$]=N[$](E,R,v)}for(const v of Object.keys(q)){E[v]=q[v](E[v])}}))}))}}v.exports=DefaultStatsPresetPlugin},7058:function(v,E,R){"use strict";const $=16;const plural=(v,E,R)=>v===1?E:R;const printSizes=(v,{formatSize:E=(v=>`${v}`)})=>{const R=Object.keys(v);if(R.length>1){return R.map((R=>`${E(v[R])} (${R})`)).join(" ")}else if(R.length===1){return E(v[R[0]])}};const getResourceName=v=>{const E=/^data:[^,]+,/.exec(v);if(!E)return v;const R=E[0].length+$;if(v.length{const[,E,R]=/^(.*!)?([^!]*)$/.exec(v);return[E,getResourceName(R)]};const mapLines=(v,E)=>v.split("\n").map(E).join("\n");const twoDigit=v=>v>=10?`${v}`:`0${v}`;const isValidId=v=>typeof v==="number"||v;const moreCount=(v,E)=>v&&v.length>0?`+ ${E}`:`${E}`;const j={"compilation.summary!":(v,{type:E,bold:R,green:$,red:j,yellow:N,formatDateTime:q,formatTime:G,compilation:{name:ie,hash:ae,version:ce,time:le,builtAt:me,errorsCount:_e,warningsCount:Ie}})=>{const Me=E==="compilation.summary!";const Oe=Ie>0?N(`${Ie} ${plural(Ie,"warning","warnings")}`):"";const Te=_e>0?j(`${_e} ${plural(_e,"error","errors")}`):"";const Ne=Me&&le?` in ${G(le)}`:"";const Be=ae?` (${ae})`:"";const Le=Me&&me?`${q(me)}: `:"";const qe=Me&&ce?`webpack ${ce}`:"";const Ue=Me&&ie?R(ie):ie?`Child ${R(ie)}`:Me?"":"Child";const Ge=Ue&&qe?`${Ue} (${qe})`:qe||Ue||"webpack";let He;if(Te&&Oe){He=`compiled with ${Te} and ${Oe}`}else if(Te){He=`compiled with ${Te}`}else if(Oe){He=`compiled with ${Oe}`}else if(_e===0&&Ie===0){He=`compiled ${$("successfully")}`}else{He=`compiled`}if(Le||qe||Te||Oe||_e===0&&Ie===0||Ne||Be)return`${Le}${Ge} ${He}${Ne}${Be}`},"compilation.filteredWarningDetailsCount":v=>v?`${v} ${plural(v,"warning has","warnings have")} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.`:undefined,"compilation.filteredErrorDetailsCount":(v,{yellow:E})=>v?E(`${v} ${plural(v,"error has","errors have")} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.`):undefined,"compilation.env":(v,{bold:E})=>v?`Environment (--env): ${E(JSON.stringify(v,null,2))}`:undefined,"compilation.publicPath":(v,{bold:E})=>`PublicPath: ${E(v||"(none)")}`,"compilation.entrypoints":(v,E,R)=>Array.isArray(v)?undefined:R.print(E.type,Object.values(v),{...E,chunkGroupKind:"Entrypoint"}),"compilation.namedChunkGroups":(v,E,R)=>{if(!Array.isArray(v)){const{compilation:{entrypoints:$}}=E;let j=Object.values(v);if($){j=j.filter((v=>!Object.prototype.hasOwnProperty.call($,v.name)))}return R.print(E.type,j,{...E,chunkGroupKind:"Chunk Group"})}},"compilation.assetsByChunkName":()=>"","compilation.filteredModules":(v,{compilation:{modules:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"module","modules")}`:undefined,"compilation.filteredAssets":(v,{compilation:{assets:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"asset","assets")}`:undefined,"compilation.logging":(v,E,R)=>Array.isArray(v)?undefined:R.print(E.type,Object.entries(v).map((([v,E])=>({...E,name:v}))),E),"compilation.warningsInChildren!":(v,{yellow:E,compilation:R})=>{if(!R.children&&R.warningsCount>0&&R.warnings){const v=R.warningsCount-R.warnings.length;if(v>0){return E(`${v} ${plural(v,"WARNING","WARNINGS")} in child compilations${R.children?"":" (Use 'stats.children: true' resp. '--stats-children' for more details)"}`)}}},"compilation.errorsInChildren!":(v,{red:E,compilation:R})=>{if(!R.children&&R.errorsCount>0&&R.errors){const v=R.errorsCount-R.errors.length;if(v>0){return E(`${v} ${plural(v,"ERROR","ERRORS")} in child compilations${R.children?"":" (Use 'stats.children: true' resp. '--stats-children' for more details)"}`)}}},"asset.type":v=>v,"asset.name":(v,{formatFilename:E,asset:{isOverSizeLimit:R}})=>E(v,R),"asset.size":(v,{asset:{isOverSizeLimit:E},yellow:R,green:$,formatSize:j})=>E?R(j(v)):j(v),"asset.emitted":(v,{green:E,formatFlag:R})=>v?E(R("emitted")):undefined,"asset.comparedForEmit":(v,{yellow:E,formatFlag:R})=>v?E(R("compared for emit")):undefined,"asset.cached":(v,{green:E,formatFlag:R})=>v?E(R("cached")):undefined,"asset.isOverSizeLimit":(v,{yellow:E,formatFlag:R})=>v?E(R("big")):undefined,"asset.info.immutable":(v,{green:E,formatFlag:R})=>v?E(R("immutable")):undefined,"asset.info.javascriptModule":(v,{formatFlag:E})=>v?E("javascript module"):undefined,"asset.info.sourceFilename":(v,{formatFlag:E})=>v?E(v===true?"from source file":`from: ${v}`):undefined,"asset.info.development":(v,{green:E,formatFlag:R})=>v?E(R("dev")):undefined,"asset.info.hotModuleReplacement":(v,{green:E,formatFlag:R})=>v?E(R("hmr")):undefined,"asset.separator!":()=>"\n","asset.filteredRelated":(v,{asset:{related:E}})=>v>0?`${moreCount(E,v)} related ${plural(v,"asset","assets")}`:undefined,"asset.filteredChildren":(v,{asset:{children:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"asset","assets")}`:undefined,assetChunk:(v,{formatChunkId:E})=>E(v),assetChunkName:v=>v,assetChunkIdHint:v=>v,"module.type":v=>v!=="module"?v:undefined,"module.id":(v,{formatModuleId:E})=>isValidId(v)?E(v):undefined,"module.name":(v,{bold:E})=>{const[R,$]=getModuleName(v);return`${R||""}${E($||"")}`},"module.identifier":v=>undefined,"module.layer":(v,{formatLayer:E})=>v?E(v):undefined,"module.sizes":printSizes,"module.chunks[]":(v,{formatChunkId:E})=>E(v),"module.depth":(v,{formatFlag:E})=>v!==null?E(`depth ${v}`):undefined,"module.cacheable":(v,{formatFlag:E,red:R})=>v===false?R(E("not cacheable")):undefined,"module.orphan":(v,{formatFlag:E,yellow:R})=>v?R(E("orphan")):undefined,"module.runtime":(v,{formatFlag:E,yellow:R})=>v?R(E("runtime")):undefined,"module.optional":(v,{formatFlag:E,yellow:R})=>v?R(E("optional")):undefined,"module.dependent":(v,{formatFlag:E,cyan:R})=>v?R(E("dependent")):undefined,"module.built":(v,{formatFlag:E,yellow:R})=>v?R(E("built")):undefined,"module.codeGenerated":(v,{formatFlag:E,yellow:R})=>v?R(E("code generated")):undefined,"module.buildTimeExecuted":(v,{formatFlag:E,green:R})=>v?R(E("build time executed")):undefined,"module.cached":(v,{formatFlag:E,green:R})=>v?R(E("cached")):undefined,"module.assets":(v,{formatFlag:E,magenta:R})=>v&&v.length?R(E(`${v.length} ${plural(v.length,"asset","assets")}`)):undefined,"module.warnings":(v,{formatFlag:E,yellow:R})=>v===true?R(E("warnings")):v?R(E(`${v} ${plural(v,"warning","warnings")}`)):undefined,"module.errors":(v,{formatFlag:E,red:R})=>v===true?R(E("errors")):v?R(E(`${v} ${plural(v,"error","errors")}`)):undefined,"module.providedExports":(v,{formatFlag:E,cyan:R})=>{if(Array.isArray(v)){if(v.length===0)return R(E("no exports"));return R(E(`exports: ${v.join(", ")}`))}},"module.usedExports":(v,{formatFlag:E,cyan:R,module:$})=>{if(v!==true){if(v===null)return R(E("used exports unknown"));if(v===false)return R(E("module unused"));if(Array.isArray(v)){if(v.length===0)return R(E("no exports used"));const j=Array.isArray($.providedExports)?$.providedExports.length:null;if(j!==null&&j===v.length){return R(E("all exports used"))}else{return R(E(`only some exports used: ${v.join(", ")}`))}}}},"module.optimizationBailout[]":(v,{yellow:E})=>E(v),"module.issuerPath":(v,{module:E})=>E.profile?undefined:"","module.profile":v=>undefined,"module.filteredModules":(v,{module:{modules:E}})=>v>0?`${moreCount(E,v)} nested ${plural(v,"module","modules")}`:undefined,"module.filteredReasons":(v,{module:{reasons:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"reason","reasons")}`:undefined,"module.filteredChildren":(v,{module:{children:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"module","modules")}`:undefined,"module.separator!":()=>"\n","moduleIssuer.id":(v,{formatModuleId:E})=>E(v),"moduleIssuer.profile.total":(v,{formatTime:E})=>E(v),"moduleReason.type":v=>v,"moduleReason.userRequest":(v,{cyan:E})=>E(getResourceName(v)),"moduleReason.moduleId":(v,{formatModuleId:E})=>isValidId(v)?E(v):undefined,"moduleReason.module":(v,{magenta:E})=>E(v),"moduleReason.loc":v=>v,"moduleReason.explanation":(v,{cyan:E})=>E(v),"moduleReason.active":(v,{formatFlag:E})=>v?undefined:E("inactive"),"moduleReason.resolvedModule":(v,{magenta:E})=>E(v),"moduleReason.filteredChildren":(v,{moduleReason:{children:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"reason","reasons")}`:undefined,"module.profile.total":(v,{formatTime:E})=>E(v),"module.profile.resolving":(v,{formatTime:E})=>`resolving: ${E(v)}`,"module.profile.restoring":(v,{formatTime:E})=>`restoring: ${E(v)}`,"module.profile.integration":(v,{formatTime:E})=>`integration: ${E(v)}`,"module.profile.building":(v,{formatTime:E})=>`building: ${E(v)}`,"module.profile.storing":(v,{formatTime:E})=>`storing: ${E(v)}`,"module.profile.additionalResolving":(v,{formatTime:E})=>v?`additional resolving: ${E(v)}`:undefined,"module.profile.additionalIntegration":(v,{formatTime:E})=>v?`additional integration: ${E(v)}`:undefined,"chunkGroup.kind!":(v,{chunkGroupKind:E})=>E,"chunkGroup.separator!":()=>"\n","chunkGroup.name":(v,{bold:E})=>E(v),"chunkGroup.isOverSizeLimit":(v,{formatFlag:E,yellow:R})=>v?R(E("big")):undefined,"chunkGroup.assetsSize":(v,{formatSize:E})=>v?E(v):undefined,"chunkGroup.auxiliaryAssetsSize":(v,{formatSize:E})=>v?`(${E(v)})`:undefined,"chunkGroup.filteredAssets":(v,{chunkGroup:{assets:E}})=>v>0?`${moreCount(E,v)} ${plural(v,"asset","assets")}`:undefined,"chunkGroup.filteredAuxiliaryAssets":(v,{chunkGroup:{auxiliaryAssets:E}})=>v>0?`${moreCount(E,v)} auxiliary ${plural(v,"asset","assets")}`:undefined,"chunkGroup.is!":()=>"=","chunkGroupAsset.name":(v,{green:E})=>E(v),"chunkGroupAsset.size":(v,{formatSize:E,chunkGroup:R})=>R.assets.length>1||R.auxiliaryAssets&&R.auxiliaryAssets.length>0?E(v):undefined,"chunkGroup.children":(v,E,R)=>Array.isArray(v)?undefined:R.print(E.type,Object.keys(v).map((E=>({type:E,children:v[E]}))),E),"chunkGroupChildGroup.type":v=>`${v}:`,"chunkGroupChild.assets[]":(v,{formatFilename:E})=>E(v),"chunkGroupChild.chunks[]":(v,{formatChunkId:E})=>E(v),"chunkGroupChild.name":v=>v?`(name: ${v})`:undefined,"chunk.id":(v,{formatChunkId:E})=>E(v),"chunk.files[]":(v,{formatFilename:E})=>E(v),"chunk.names[]":v=>v,"chunk.idHints[]":v=>v,"chunk.runtime[]":v=>v,"chunk.sizes":(v,E)=>printSizes(v,E),"chunk.parents[]":(v,E)=>E.formatChunkId(v,"parent"),"chunk.siblings[]":(v,E)=>E.formatChunkId(v,"sibling"),"chunk.children[]":(v,E)=>E.formatChunkId(v,"child"),"chunk.childrenByOrder":(v,E,R)=>Array.isArray(v)?undefined:R.print(E.type,Object.keys(v).map((E=>({type:E,children:v[E]}))),E),"chunk.childrenByOrder[].type":v=>`${v}:`,"chunk.childrenByOrder[].children[]":(v,{formatChunkId:E})=>isValidId(v)?E(v):undefined,"chunk.entry":(v,{formatFlag:E,yellow:R})=>v?R(E("entry")):undefined,"chunk.initial":(v,{formatFlag:E,yellow:R})=>v?R(E("initial")):undefined,"chunk.rendered":(v,{formatFlag:E,green:R})=>v?R(E("rendered")):undefined,"chunk.recorded":(v,{formatFlag:E,green:R})=>v?R(E("recorded")):undefined,"chunk.reason":(v,{yellow:E})=>v?E(v):undefined,"chunk.filteredModules":(v,{chunk:{modules:E}})=>v>0?`${moreCount(E,v)} chunk ${plural(v,"module","modules")}`:undefined,"chunk.separator!":()=>"\n","chunkOrigin.request":v=>v,"chunkOrigin.moduleId":(v,{formatModuleId:E})=>isValidId(v)?E(v):undefined,"chunkOrigin.moduleName":(v,{bold:E})=>E(v),"chunkOrigin.loc":v=>v,"error.compilerPath":(v,{bold:E})=>v?E(`(${v})`):undefined,"error.chunkId":(v,{formatChunkId:E})=>isValidId(v)?E(v):undefined,"error.chunkEntry":(v,{formatFlag:E})=>v?E("entry"):undefined,"error.chunkInitial":(v,{formatFlag:E})=>v?E("initial"):undefined,"error.file":(v,{bold:E})=>E(v),"error.moduleName":(v,{bold:E})=>v.includes("!")?`${E(v.replace(/^(\s|\S)*!/,""))} (${v})`:`${E(v)}`,"error.loc":(v,{green:E})=>E(v),"error.message":(v,{bold:E,formatError:R})=>v.includes("[")?v:E(R(v)),"error.details":(v,{formatError:E})=>E(v),"error.stack":v=>v,"error.moduleTrace":v=>undefined,"error.separator!":()=>"\n","loggingEntry(error).loggingEntry.message":(v,{red:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(warn).loggingEntry.message":(v,{yellow:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(info).loggingEntry.message":(v,{green:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(log).loggingEntry.message":(v,{bold:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(debug).loggingEntry.message":v=>mapLines(v,(v=>` ${v}`)),"loggingEntry(trace).loggingEntry.message":v=>mapLines(v,(v=>` ${v}`)),"loggingEntry(status).loggingEntry.message":(v,{magenta:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(profile).loggingEntry.message":(v,{magenta:E})=>mapLines(v,(v=>`

${E(v)}`)),"loggingEntry(profileEnd).loggingEntry.message":(v,{magenta:E})=>mapLines(v,(v=>`

${E(v)}`)),"loggingEntry(time).loggingEntry.message":(v,{magenta:E})=>mapLines(v,(v=>` ${E(v)}`)),"loggingEntry(group).loggingEntry.message":(v,{cyan:E})=>mapLines(v,(v=>`<-> ${E(v)}`)),"loggingEntry(groupCollapsed).loggingEntry.message":(v,{cyan:E})=>mapLines(v,(v=>`<+> ${E(v)}`)),"loggingEntry(clear).loggingEntry":()=>" -------","loggingEntry(groupCollapsed).loggingEntry.children":()=>"","loggingEntry.trace[]":v=>v?mapLines(v,(v=>`| ${v}`)):undefined,"moduleTraceItem.originName":v=>v,loggingGroup:v=>v.entries.length===0?"":undefined,"loggingGroup.debug":(v,{red:E})=>v?E("DEBUG"):undefined,"loggingGroup.name":(v,{bold:E})=>E(`LOG from ${v}`),"loggingGroup.separator!":()=>"\n","loggingGroup.filteredEntries":v=>v>0?`+ ${v} hidden lines`:undefined,"moduleTraceDependency.loc":v=>v};const N={"compilation.assets[]":"asset","compilation.modules[]":"module","compilation.chunks[]":"chunk","compilation.entrypoints[]":"chunkGroup","compilation.namedChunkGroups[]":"chunkGroup","compilation.errors[]":"error","compilation.warnings[]":"error","compilation.logging[]":"loggingGroup","compilation.children[]":"compilation","asset.related[]":"asset","asset.children[]":"asset","asset.chunks[]":"assetChunk","asset.auxiliaryChunks[]":"assetChunk","asset.chunkNames[]":"assetChunkName","asset.chunkIdHints[]":"assetChunkIdHint","asset.auxiliaryChunkNames[]":"assetChunkName","asset.auxiliaryChunkIdHints[]":"assetChunkIdHint","chunkGroup.assets[]":"chunkGroupAsset","chunkGroup.auxiliaryAssets[]":"chunkGroupAsset","chunkGroupChild.assets[]":"chunkGroupAsset","chunkGroupChild.auxiliaryAssets[]":"chunkGroupAsset","chunkGroup.children[]":"chunkGroupChildGroup","chunkGroupChildGroup.children[]":"chunkGroupChild","module.modules[]":"module","module.children[]":"module","module.reasons[]":"moduleReason","moduleReason.children[]":"moduleReason","module.issuerPath[]":"moduleIssuer","chunk.origins[]":"chunkOrigin","chunk.modules[]":"module","loggingGroup.entries[]":v=>`loggingEntry(${v.type}).loggingEntry`,"loggingEntry.children[]":v=>`loggingEntry(${v.type}).loggingEntry`,"error.moduleTrace[]":"moduleTraceItem","moduleTraceItem.dependencies[]":"moduleTraceDependency"};const q=["compilerPath","chunkId","chunkEntry","chunkInitial","file","separator!","moduleName","loc","separator!","message","separator!","details","separator!","stack","separator!","missing","separator!","moduleTrace"];const G={compilation:["name","hash","version","time","builtAt","env","publicPath","assets","filteredAssets","entrypoints","namedChunkGroups","chunks","modules","filteredModules","children","logging","warnings","warningsInChildren!","filteredWarningDetailsCount","errors","errorsInChildren!","filteredErrorDetailsCount","summary!","needAdditionalPass"],asset:["type","name","size","chunks","auxiliaryChunks","emitted","comparedForEmit","cached","info","isOverSizeLimit","chunkNames","auxiliaryChunkNames","chunkIdHints","auxiliaryChunkIdHints","related","filteredRelated","children","filteredChildren"],"asset.info":["immutable","sourceFilename","javascriptModule","development","hotModuleReplacement"],chunkGroup:["kind!","name","isOverSizeLimit","assetsSize","auxiliaryAssetsSize","is!","assets","filteredAssets","auxiliaryAssets","filteredAuxiliaryAssets","separator!","children"],chunkGroupAsset:["name","size"],chunkGroupChildGroup:["type","children"],chunkGroupChild:["assets","chunks","name"],module:["type","name","identifier","id","layer","sizes","chunks","depth","cacheable","orphan","runtime","optional","dependent","built","codeGenerated","cached","assets","failed","warnings","errors","children","filteredChildren","providedExports","usedExports","optimizationBailout","reasons","filteredReasons","issuerPath","profile","modules","filteredModules"],moduleReason:["active","type","userRequest","moduleId","module","resolvedModule","loc","explanation","children","filteredChildren"],"module.profile":["total","separator!","resolving","restoring","integration","building","storing","additionalResolving","additionalIntegration"],chunk:["id","runtime","files","names","idHints","sizes","parents","siblings","children","childrenByOrder","entry","initial","rendered","recorded","reason","separator!","origins","separator!","modules","separator!","filteredModules"],chunkOrigin:["request","moduleId","moduleName","loc"],error:q,warning:q,"chunk.childrenByOrder[]":["type","children"],loggingGroup:["debug","name","separator!","entries","separator!","filteredEntries"],loggingEntry:["message","trace","children"]};const itemsJoinOneLine=v=>v.filter(Boolean).join(" ");const itemsJoinOneLineBrackets=v=>v.length>0?`(${v.filter(Boolean).join(" ")})`:undefined;const itemsJoinMoreSpacing=v=>v.filter(Boolean).join("\n\n");const itemsJoinComma=v=>v.filter(Boolean).join(", ");const itemsJoinCommaBrackets=v=>v.length>0?`(${v.filter(Boolean).join(", ")})`:undefined;const itemsJoinCommaBracketsWithName=v=>E=>E.length>0?`(${v}: ${E.filter(Boolean).join(", ")})`:undefined;const ie={"chunk.parents":itemsJoinOneLine,"chunk.siblings":itemsJoinOneLine,"chunk.children":itemsJoinOneLine,"chunk.names":itemsJoinCommaBrackets,"chunk.idHints":itemsJoinCommaBracketsWithName("id hint"),"chunk.runtime":itemsJoinCommaBracketsWithName("runtime"),"chunk.files":itemsJoinComma,"chunk.childrenByOrder":itemsJoinOneLine,"chunk.childrenByOrder[].children":itemsJoinOneLine,"chunkGroup.assets":itemsJoinOneLine,"chunkGroup.auxiliaryAssets":itemsJoinOneLineBrackets,"chunkGroupChildGroup.children":itemsJoinComma,"chunkGroupChild.assets":itemsJoinOneLine,"chunkGroupChild.auxiliaryAssets":itemsJoinOneLineBrackets,"asset.chunks":itemsJoinComma,"asset.auxiliaryChunks":itemsJoinCommaBrackets,"asset.chunkNames":itemsJoinCommaBracketsWithName("name"),"asset.auxiliaryChunkNames":itemsJoinCommaBracketsWithName("auxiliary name"),"asset.chunkIdHints":itemsJoinCommaBracketsWithName("id hint"),"asset.auxiliaryChunkIdHints":itemsJoinCommaBracketsWithName("auxiliary id hint"),"module.chunks":itemsJoinOneLine,"module.issuerPath":v=>v.filter(Boolean).map((v=>`${v} ->`)).join(" "),"compilation.errors":itemsJoinMoreSpacing,"compilation.warnings":itemsJoinMoreSpacing,"compilation.logging":itemsJoinMoreSpacing,"compilation.children":v=>indent(itemsJoinMoreSpacing(v)," "),"moduleTraceItem.dependencies":itemsJoinOneLine,"loggingEntry.children":v=>indent(v.filter(Boolean).join("\n")," ",false)};const joinOneLine=v=>v.map((v=>v.content)).filter(Boolean).join(" ");const joinInBrackets=v=>{const E=[];let R=0;for(const $ of v){if($.element==="separator!"){switch(R){case 0:case 1:R+=2;break;case 4:E.push(")");R=3;break}}if(!$.content)continue;switch(R){case 0:R=1;break;case 1:E.push(" ");break;case 2:E.push("(");R=4;break;case 3:E.push(" (");R=4;break;case 4:E.push(", ");break}E.push($.content)}if(R===4)E.push(")");return E.join("")};const indent=(v,E,R)=>{const $=v.replace(/\n([^\n])/g,"\n"+E+"$1");if(R)return $;const j=v[0]==="\n"?"":E;return j+$};const joinExplicitNewLine=(v,E)=>{let R=true;let $=true;return v.map((v=>{if(!v||!v.content)return;let j=indent(v.content,$?"":E,!R);if(R){j=j.replace(/^\n+/,"")}if(!j)return;$=false;const N=R||j.startsWith("\n");R=j.endsWith("\n");return N?j:" "+j})).filter(Boolean).join("").trim()};const joinError=v=>(E,{red:R,yellow:$})=>`${v?R("ERROR"):$("WARNING")} in ${joinExplicitNewLine(E,"")}`;const ae={compilation:v=>{const E=[];let R=false;for(const $ of v){if(!$.content)continue;const v=$.element==="warnings"||$.element==="filteredWarningDetailsCount"||$.element==="errors"||$.element==="filteredErrorDetailsCount"||$.element==="logging";if(E.length!==0){E.push(v||R?"\n\n":"\n")}E.push($.content);R=v}if(R)E.push("\n");return E.join("")},asset:v=>joinExplicitNewLine(v.map((v=>{if((v.element==="related"||v.element==="children")&&v.content){return{...v,content:`\n${v.content}\n`}}return v}))," "),"asset.info":joinOneLine,module:(v,{module:E})=>{let R=false;return joinExplicitNewLine(v.map((v=>{switch(v.element){case"id":if(E.id===E.name){if(R)return false;if(v.content)R=true}break;case"name":if(R)return false;if(v.content)R=true;break;case"providedExports":case"usedExports":case"optimizationBailout":case"reasons":case"issuerPath":case"profile":case"children":case"modules":if(v.content){return{...v,content:`\n${v.content}\n`}}break}return v}))," ")},chunk:v=>{let E=false;return"chunk "+joinExplicitNewLine(v.filter((v=>{switch(v.element){case"entry":if(v.content)E=true;break;case"initial":if(E)return false;break}return true}))," ")},"chunk.childrenByOrder[]":v=>`(${joinOneLine(v)})`,chunkGroup:v=>joinExplicitNewLine(v," "),chunkGroupAsset:joinOneLine,chunkGroupChildGroup:joinOneLine,chunkGroupChild:joinOneLine,moduleReason:(v,{moduleReason:E})=>{let R=false;return joinExplicitNewLine(v.map((v=>{switch(v.element){case"moduleId":if(E.moduleId===E.module&&v.content)R=true;break;case"module":if(R)return false;break;case"resolvedModule":if(E.module===E.resolvedModule)return false;break;case"children":if(v.content){return{...v,content:`\n${v.content}\n`}}break}return v}))," ")},"module.profile":joinInBrackets,moduleIssuer:joinOneLine,chunkOrigin:v=>"> "+joinOneLine(v),"errors[].error":joinError(true),"warnings[].error":joinError(false),loggingGroup:v=>joinExplicitNewLine(v,"").trimRight(),moduleTraceItem:v=>" @ "+joinOneLine(v),moduleTraceDependency:joinOneLine};const ce={bold:"",yellow:"",red:"",green:"",cyan:"",magenta:""};const le={formatChunkId:(v,{yellow:E},R)=>{switch(R){case"parent":return`<{${E(v)}}>`;case"sibling":return`={${E(v)}}=`;case"child":return`>{${E(v)}}<`;default:return`{${E(v)}}`}},formatModuleId:v=>`[${v}]`,formatFilename:(v,{green:E,yellow:R},$)=>($?R:E)(v),formatFlag:v=>`[${v}]`,formatLayer:v=>`(in ${v})`,formatSize:R(67309).formatSize,formatDateTime:(v,{bold:E})=>{const R=new Date(v);const $=twoDigit;const j=`${R.getFullYear()}-${$(R.getMonth()+1)}-${$(R.getDate())}`;const N=`${$(R.getHours())}:${$(R.getMinutes())}:${$(R.getSeconds())}`;return`${j} ${E(N)}`},formatTime:(v,{timeReference:E,bold:R,green:$,yellow:j,red:N},q)=>{const G=" ms";if(E&&v!==E){const q=[E/2,E/4,E/8,E/16];if(v{if(v.includes("["))return v;const j=[{regExp:/(Did you mean .+)/g,format:E},{regExp:/(Set 'mode' option to 'development' or 'production')/g,format:E},{regExp:/(\(module has no exports\))/g,format:$},{regExp:/\(possible exports: (.+)\)/g,format:E},{regExp:/(?:^|\n)(.* doesn't exist)/g,format:$},{regExp:/('\w+' option has not been set)/g,format:$},{regExp:/(Emitted value instead of an instance of Error)/g,format:R},{regExp:/(Used? .+ instead)/gi,format:R},{regExp:/\b(deprecated|must|required)\b/g,format:R},{regExp:/\b(BREAKING CHANGE)\b/gi,format:$},{regExp:/\b(error|failed|unexpected|invalid|not found|not supported|not available|not possible|not implemented|doesn't support|conflict|conflicting|not existing|duplicate)\b/gi,format:$}];for(const{regExp:E,format:R}of j){v=v.replace(E,((v,E)=>v.replace(E,R(E))))}return v}};const me={"module.modules":v=>indent(v,"| ")};const createOrder=(v,E)=>{const R=v.slice();const $=new Set(v);const j=new Set;v.length=0;for(const R of E){if(R.endsWith("!")||$.has(R)){v.push(R);j.add(R)}}for(const E of R){if(!j.has(E)){v.push(E)}}return v};class DefaultStatsPrinterPlugin{apply(v){v.hooks.compilation.tap("DefaultStatsPrinterPlugin",(v=>{v.hooks.statsPrinter.tap("DefaultStatsPrinterPlugin",((v,E,R)=>{v.hooks.print.for("compilation").tap("DefaultStatsPrinterPlugin",((v,R)=>{for(const v of Object.keys(ce)){let $;if(E.colors){if(typeof E.colors==="object"&&typeof E.colors[v]==="string"){$=E.colors[v]}else{$=ce[v]}}if($){R[v]=v=>`${$}${typeof v==="string"?v.replace(/((\u001b\[39m|\u001b\[22m|\u001b\[0m)+)/g,`$1${$}`):v}`}else{R[v]=v=>v}}for(const v of Object.keys(le)){R[v]=(E,...$)=>le[v](E,R,...$)}R.timeReference=v.time}));for(const E of Object.keys(j)){v.hooks.print.for(E).tap("DefaultStatsPrinterPlugin",((R,$)=>j[E](R,$,v)))}for(const E of Object.keys(G)){const R=G[E];v.hooks.sortElements.for(E).tap("DefaultStatsPrinterPlugin",((v,E)=>{createOrder(v,R)}))}for(const E of Object.keys(N)){const R=N[E];v.hooks.getItemName.for(E).tap("DefaultStatsPrinterPlugin",typeof R==="string"?()=>R:R)}for(const E of Object.keys(ie)){const R=ie[E];v.hooks.printItems.for(E).tap("DefaultStatsPrinterPlugin",R)}for(const E of Object.keys(ae)){const R=ae[E];v.hooks.printElements.for(E).tap("DefaultStatsPrinterPlugin",R)}for(const E of Object.keys(me)){const R=me[E];v.hooks.result.for(E).tap("DefaultStatsPrinterPlugin",R)}}))}))}}v.exports=DefaultStatsPrinterPlugin},70900:function(v,E,R){"use strict";const{HookMap:$,SyncBailHook:j,SyncWaterfallHook:N}=R(44217);const{concatComparators:q,keepOriginalOrder:G}=R(58792);const ie=R(64726);class StatsFactory{constructor(){this.hooks=Object.freeze({extract:new $((()=>new j(["object","data","context"]))),filter:new $((()=>new j(["item","context","index","unfilteredIndex"]))),sort:new $((()=>new j(["comparators","context"]))),filterSorted:new $((()=>new j(["item","context","index","unfilteredIndex"]))),groupResults:new $((()=>new j(["groupConfigs","context"]))),sortResults:new $((()=>new j(["comparators","context"]))),filterResults:new $((()=>new j(["item","context","index","unfilteredIndex"]))),merge:new $((()=>new j(["items","context"]))),result:new $((()=>new N(["result","context"]))),getItemName:new $((()=>new j(["item","context"]))),getItemFactory:new $((()=>new j(["item","context"])))});const v=this.hooks;this._caches={};for(const E of Object.keys(v)){this._caches[E]=new Map}this._inCreate=false}_getAllLevelHooks(v,E,R){const $=E.get(R);if($!==undefined){return $}const j=[];const N=R.split(".");for(let E=0;E{for(const R of q){const $=j(R,v,E,G);if($!==undefined){if($)G++;return $}}G++;return true}))}create(v,E,R){if(this._inCreate){return this._create(v,E,R)}else{try{this._inCreate=true;return this._create(v,E,R)}finally{for(const v of Object.keys(this._caches))this._caches[v].clear();this._inCreate=false}}}_create(v,E,R){const $={...R,type:v,[v]:E};if(Array.isArray(E)){const R=this._forEachLevelFilter(this.hooks.filter,this._caches.filter,v,E,((v,E,R,j)=>v.call(E,$,R,j)),true);const j=[];this._forEachLevel(this.hooks.sort,this._caches.sort,v,(v=>v.call(j,$)));if(j.length>0){R.sort(q(...j,G(R)))}const N=this._forEachLevelFilter(this.hooks.filterSorted,this._caches.filterSorted,v,R,((v,E,R,j)=>v.call(E,$,R,j)),false);let ae=N.map(((E,R)=>{const j={...$,_index:R};const N=this._forEachLevel(this.hooks.getItemName,this._caches.getItemName,`${v}[]`,(v=>v.call(E,j)));if(N)j[N]=E;const q=N?`${v}[].${N}`:`${v}[]`;const G=this._forEachLevel(this.hooks.getItemFactory,this._caches.getItemFactory,q,(v=>v.call(E,j)))||this;return G.create(q,E,j)}));const ce=[];this._forEachLevel(this.hooks.sortResults,this._caches.sortResults,v,(v=>v.call(ce,$)));if(ce.length>0){ae.sort(q(...ce,G(ae)))}const le=[];this._forEachLevel(this.hooks.groupResults,this._caches.groupResults,v,(v=>v.call(le,$)));if(le.length>0){ae=ie(ae,le)}const me=this._forEachLevelFilter(this.hooks.filterResults,this._caches.filterResults,v,ae,((v,E,R,j)=>v.call(E,$,R,j)),false);let _e=this._forEachLevel(this.hooks.merge,this._caches.merge,v,(v=>v.call(me,$)));if(_e===undefined)_e=me;return this._forEachLevelWaterfall(this.hooks.result,this._caches.result,v,_e,((v,E)=>v.call(E,$)))}else{const R={};this._forEachLevel(this.hooks.extract,this._caches.extract,v,(v=>v.call(R,E,$)));return this._forEachLevelWaterfall(this.hooks.result,this._caches.result,v,R,((v,E)=>v.call(E,$)))}}}v.exports=StatsFactory},67793:function(v,E,R){"use strict";const{HookMap:$,SyncWaterfallHook:j,SyncBailHook:N}=R(44217);class StatsPrinter{constructor(){this.hooks=Object.freeze({sortElements:new $((()=>new N(["elements","context"]))),printElements:new $((()=>new N(["printedElements","context"]))),sortItems:new $((()=>new N(["items","context"]))),getItemName:new $((()=>new N(["item","context"]))),printItems:new $((()=>new N(["printedItems","context"]))),print:new $((()=>new N(["object","context"]))),result:new $((()=>new j(["result","context"])))});this._levelHookCache=new Map;this._inPrint=false}_getAllLevelHooks(v,E){let R=this._levelHookCache.get(v);if(R===undefined){R=new Map;this._levelHookCache.set(v,R)}const $=R.get(E);if($!==undefined){return $}const j=[];const N=E.split(".");for(let E=0;Ev.call(E,$)));if(j===undefined){if(Array.isArray(E)){const R=E.slice();this._forEachLevel(this.hooks.sortItems,v,(v=>v.call(R,$)));const N=R.map(((E,R)=>{const j={...$,_index:R};const N=this._forEachLevel(this.hooks.getItemName,`${v}[]`,(v=>v.call(E,j)));if(N)j[N]=E;return this.print(N?`${v}[].${N}`:`${v}[]`,E,j)}));j=this._forEachLevel(this.hooks.printItems,v,(v=>v.call(N,$)));if(j===undefined){const v=N.filter(Boolean);if(v.length>0)j=v.join("\n")}}else if(E!==null&&typeof E==="object"){const R=Object.keys(E).filter((v=>E[v]!==undefined));this._forEachLevel(this.hooks.sortElements,v,(v=>v.call(R,$)));const N=R.map((R=>{const j=this.print(`${v}.${R}`,E[R],{...$,_parent:E,_element:R,[R]:E[R]});return{element:R,content:j}}));j=this._forEachLevel(this.hooks.printElements,v,(v=>v.call(N,$)));if(j===undefined){const v=N.map((v=>v.content)).filter(Boolean);if(v.length>0)j=v.join("\n")}}}return this._forEachLevelWaterfall(this.hooks.result,v,j,((v,E)=>v.call(E,$)))}}v.exports=StatsPrinter},28087:function(v,E){"use strict";E.equals=(v,E)=>{if(v.length!==E.length)return false;for(let R=0;Rv.reduce(((v,R)=>{v[E(R)?0:1].push(R);return v}),[[],[]])},52074:function(v){"use strict";class ArrayQueue{constructor(v){this._list=v?Array.from(v):[];this._listReversed=[]}get length(){return this._list.length+this._listReversed.length}clear(){this._list.length=0;this._listReversed.length=0}enqueue(v){this._list.push(v)}dequeue(){if(this._listReversed.length===0){if(this._list.length===0)return undefined;if(this._list.length===1)return this._list.pop();if(this._list.length<16)return this._list.shift();const v=this._listReversed;this._listReversed=this._list;this._listReversed.reverse();this._list=v}return this._listReversed.pop()}delete(v){const E=this._list.indexOf(v);if(E>=0){this._list.splice(E,1)}else{const E=this._listReversed.indexOf(v);if(E>=0)this._listReversed.splice(E,1)}}[Symbol.iterator](){let v=-1;let E=false;return{next:()=>{if(!E){v++;if(vv);this._entries=new Map;this._queued=new G;this._children=undefined;this._activeTasks=0;this._willEnsureProcessing=false;this._needProcessing=false;this._stopped=false;this._root=R?R._root:this;if(R){if(this._root._children===undefined){this._root._children=[this]}else{this._root._children.push(this)}}this.hooks={beforeAdd:new j(["item"]),added:new $(["item"]),beforeStart:new j(["item"]),started:new $(["item"]),result:new $(["item","error","result"])};this._ensureProcessing=this._ensureProcessing.bind(this)}add(v,E){if(this._stopped)return E(new q("Queue was stopped"));this.hooks.beforeAdd.callAsync(v,(R=>{if(R){E(N(R,`AsyncQueue(${this._name}).hooks.beforeAdd`));return}const $=this._getKey(v);const j=this._entries.get($);if(j!==undefined){if(j.state===ce){if(le++>3){process.nextTick((()=>E(j.error,j.result)))}else{E(j.error,j.result)}le--}else if(j.callbacks===undefined){j.callbacks=[E]}else{j.callbacks.push(E)}return}const G=new AsyncQueueEntry(v,E);if(this._stopped){this.hooks.added.call(v);this._root._activeTasks++;process.nextTick((()=>this._handleResult(G,new q("Queue was stopped"))))}else{this._entries.set($,G);this._queued.enqueue(G);const E=this._root;E._needProcessing=true;if(E._willEnsureProcessing===false){E._willEnsureProcessing=true;setImmediate(E._ensureProcessing)}this.hooks.added.call(v)}}))}invalidate(v){const E=this._getKey(v);const R=this._entries.get(E);this._entries.delete(E);if(R.state===ie){this._queued.delete(R)}}waitFor(v,E){const R=this._getKey(v);const $=this._entries.get(R);if($===undefined){return E(new q("waitFor can only be called for an already started item"))}if($.state===ce){process.nextTick((()=>E($.error,$.result)))}else if($.callbacks===undefined){$.callbacks=[E]}else{$.callbacks.push(E)}}stop(){this._stopped=true;const v=this._queued;this._queued=new G;const E=this._root;for(const R of v){this._entries.delete(this._getKey(R.item));E._activeTasks++;this._handleResult(R,new q("Queue was stopped"))}}increaseParallelism(){const v=this._root;v._parallelism++;if(v._willEnsureProcessing===false&&v._needProcessing){v._willEnsureProcessing=true;setImmediate(v._ensureProcessing)}}decreaseParallelism(){const v=this._root;v._parallelism--}isProcessing(v){const E=this._getKey(v);const R=this._entries.get(E);return R!==undefined&&R.state===ae}isQueued(v){const E=this._getKey(v);const R=this._entries.get(E);return R!==undefined&&R.state===ie}isDone(v){const E=this._getKey(v);const R=this._entries.get(E);return R!==undefined&&R.state===ce}_ensureProcessing(){while(this._activeTasks0)return;if(this._children!==undefined){for(const v of this._children){while(this._activeTasks0)return}}if(!this._willEnsureProcessing)this._needProcessing=false}_startProcessing(v){this.hooks.beforeStart.callAsync(v.item,(E=>{if(E){this._handleResult(v,N(E,`AsyncQueue(${this._name}).hooks.beforeStart`));return}let R=false;try{this._processor(v.item,((E,$)=>{R=true;this._handleResult(v,E,$)}))}catch(E){if(R)throw E;this._handleResult(v,E,null)}this.hooks.started.call(v.item)}))}_handleResult(v,E,R){this.hooks.result.callAsync(v.item,E,R,($=>{const j=$?N($,`AsyncQueue(${this._name}).hooks.result`):E;const q=v.callback;const G=v.callbacks;v.state=ce;v.callback=undefined;v.callbacks=undefined;v.result=R;v.error=j;const ie=this._root;ie._activeTasks--;if(ie._willEnsureProcessing===false&&ie._needProcessing){ie._willEnsureProcessing=true;setImmediate(ie._ensureProcessing)}if(le++>3){process.nextTick((()=>{q(j,R);if(G!==undefined){for(const v of G){v(j,R)}}}))}else{q(j,R);if(G!==undefined){for(const v of G){v(j,R)}}}le--}))}clear(){this._entries.clear();this._queued.clear();this._activeTasks=0;this._willEnsureProcessing=false;this._needProcessing=false;this._stopped=false}}v.exports=AsyncQueue},14577:function(v,E,R){"use strict";class Hash{update(v,E){const $=R(73846);throw new $}digest(v){const E=R(73846);throw new E}}v.exports=Hash},30922:function(v,E){"use strict";const last=v=>{let E;for(const R of v)E=R;return E};const someInIterable=(v,E)=>{for(const R of v){if(E(R))return true}return false};const countIterable=v=>{let E=0;for(const R of v)E++;return E};E.last=last;E.someInIterable=someInIterable;E.countIterable=countIterable},57126:function(v,E,R){"use strict";const{first:$}=R(73268);const j=R(87122);class LazyBucketSortedSet{constructor(v,E,...R){this._getKey=v;this._innerArgs=R;this._leaf=R.length<=1;this._keys=new j(undefined,E);this._map=new Map;this._unsortedItems=new Set;this.size=0}add(v){this.size++;this._unsortedItems.add(v)}_addInternal(v,E){let R=this._map.get(v);if(R===undefined){R=this._leaf?new j(undefined,this._innerArgs[0]):new LazyBucketSortedSet(...this._innerArgs);this._keys.add(v);this._map.set(v,R)}R.add(E)}delete(v){this.size--;if(this._unsortedItems.has(v)){this._unsortedItems.delete(v);return}const E=this._getKey(v);const R=this._map.get(E);R.delete(v);if(R.size===0){this._deleteKey(E)}}_deleteKey(v){this._keys.delete(v);this._map.delete(v)}popFirst(){if(this.size===0)return undefined;this.size--;if(this._unsortedItems.size>0){for(const v of this._unsortedItems){const E=this._getKey(v);this._addInternal(E,v)}this._unsortedItems.clear()}this._keys.sort();const v=$(this._keys);const E=this._map.get(v);if(this._leaf){const R=E;R.sort();const j=$(R);R.delete(j);if(R.size===0){this._deleteKey(v)}return j}else{const R=E;const $=R.popFirst();if(R.size===0){this._deleteKey(v)}return $}}startUpdate(v){if(this._unsortedItems.has(v)){return E=>{if(E){this._unsortedItems.delete(v);this.size--;return}}}const E=this._getKey(v);if(this._leaf){const R=this._map.get(E);return $=>{if($){this.size--;R.delete(v);if(R.size===0){this._deleteKey(E)}return}const j=this._getKey(v);if(E===j){R.add(v)}else{R.delete(v);if(R.size===0){this._deleteKey(E)}this._addInternal(j,v)}}}else{const R=this._map.get(E);const $=R.startUpdate(v);return j=>{if(j){this.size--;$(true);if(R.size===0){this._deleteKey(E)}return}const N=this._getKey(v);if(E===N){$()}else{$(true);if(R.size===0){this._deleteKey(E)}this._addInternal(N,v)}}}}_appendIterators(v){if(this._unsortedItems.size>0)v.push(this._unsortedItems[Symbol.iterator]());for(const E of this._keys){const R=this._map.get(E);if(this._leaf){const E=R;const $=E[Symbol.iterator]();v.push($)}else{const E=R;E._appendIterators(v)}}}[Symbol.iterator](){const v=[];this._appendIterators(v);v.reverse();let E=v.pop();return{next:()=>{const R=E.next();if(R.done){if(v.length===0)return R;E=v.pop();return E.next()}return R}}}}v.exports=LazyBucketSortedSet},96522:function(v,E,R){"use strict";const $=R(65764);const merge=(v,E)=>{for(const R of E){for(const E of R){v.add(E)}}};const flatten=(v,E)=>{for(const R of E){if(R._set.size>0)v.add(R._set);if(R._needMerge){for(const E of R._toMerge){v.add(E)}flatten(v,R._toDeepMerge)}}};class LazySet{constructor(v){this._set=new Set(v);this._toMerge=new Set;this._toDeepMerge=[];this._needMerge=false;this._deopt=false}_flatten(){flatten(this._toMerge,this._toDeepMerge);this._toDeepMerge.length=0}_merge(){this._flatten();merge(this._set,this._toMerge);this._toMerge.clear();this._needMerge=false}_isEmpty(){return this._set.size===0&&this._toMerge.size===0&&this._toDeepMerge.length===0}get size(){if(this._needMerge)this._merge();return this._set.size}add(v){this._set.add(v);return this}addAll(v){if(this._deopt){const E=this._set;for(const R of v){E.add(R)}}else{if(v instanceof LazySet){if(v._isEmpty())return this;this._toDeepMerge.push(v);this._needMerge=true;if(this._toDeepMerge.length>1e5){this._flatten()}}else{this._toMerge.add(v);this._needMerge=true}if(this._toMerge.size>1e5)this._merge()}return this}clear(){this._set.clear();this._toMerge.clear();this._toDeepMerge.length=0;this._needMerge=false;this._deopt=false}delete(v){if(this._needMerge)this._merge();return this._set.delete(v)}entries(){this._deopt=true;if(this._needMerge)this._merge();return this._set.entries()}forEach(v,E){this._deopt=true;if(this._needMerge)this._merge();this._set.forEach(v,E)}has(v){if(this._needMerge)this._merge();return this._set.has(v)}keys(){this._deopt=true;if(this._needMerge)this._merge();return this._set.keys()}values(){this._deopt=true;if(this._needMerge)this._merge();return this._set.values()}[Symbol.iterator](){this._deopt=true;if(this._needMerge)this._merge();return this._set[Symbol.iterator]()}get[Symbol.toStringTag](){return"LazySet"}serialize({write:v}){if(this._needMerge)this._merge();v(this._set.size);for(const E of this._set)v(E)}static deserialize({read:v}){const E=v();const R=[];for(let $=0;${const $=v.get(E);if($!==undefined)return $;const j=R();v.set(E,j);return j}},15924:function(v,E,R){"use strict";const $=R(12076);class ParallelismFactorCalculator{constructor(){this._rangePoints=[];this._rangeCallbacks=[]}range(v,E,R){if(v===E)return R(1);this._rangePoints.push(v);this._rangePoints.push(E);this._rangeCallbacks.push(R)}calculate(){const v=Array.from(new Set(this._rangePoints)).sort(((v,E)=>v0));const R=[];for(let j=0;j{if(v.length===0)return new Set;if(v.length===1)return new Set(v[0]);let E=Infinity;let R=-1;for(let $=0;${if(v.size{for(const R of v){if(E(R))return R}};const first=v=>{const E=v.values().next();return E.done?undefined:E.value};const combine=(v,E)=>{if(E.size===0)return v;if(v.size===0)return E;const R=new Set(v);for(const v of E)R.add(v);return R};E.intersect=intersect;E.isSubset=isSubset;E.find=find;E.first=first;E.combine=combine},87122:function(v){"use strict";const E=Symbol("not sorted");class SortableSet extends Set{constructor(v,R){super(v);this._sortFn=R;this._lastActiveSortFn=E;this._cache=undefined;this._cacheOrderIndependent=undefined}add(v){this._lastActiveSortFn=E;this._invalidateCache();this._invalidateOrderedCache();super.add(v);return this}delete(v){this._invalidateCache();this._invalidateOrderedCache();return super.delete(v)}clear(){this._invalidateCache();this._invalidateOrderedCache();return super.clear()}sortWith(v){if(this.size<=1||v===this._lastActiveSortFn){return}const E=Array.from(this).sort(v);super.clear();for(let v=0;v0;E--){const R=this.stack[E-1];if(R.size>=v.size)break;this.stack[E]=R;this.stack[E-1]=v}}else{for(const[E,R]of v){this.map.set(E,R)}}}set(v,E){this.map.set(v,E)}delete(v){throw new Error("Items can't be deleted from a StackedCacheMap")}has(v){throw new Error("Checking StackedCacheMap.has before reading is inefficient, use StackedCacheMap.get and check for undefined")}get(v){for(const E of this.stack){const R=E.get(v);if(R!==undefined)return R}return this.map.get(v)}clear(){this.stack.length=0;this.map.clear()}get size(){let v=this.map.size;for(const E of this.stack){v+=E.size}return v}[Symbol.iterator](){const v=this.stack.map((v=>v[Symbol.iterator]()));let E=this.map[Symbol.iterator]();return{next(){let R=E.next();while(R.done&&v.length>0){E=v.pop();R=E.next()}return R}}}}v.exports=StackedCacheMap},53214:function(v){"use strict";const E=Symbol("tombstone");const R=Symbol("undefined");const extractPair=v=>{const $=v[0];const j=v[1];if(j===R||j===E){return[$,undefined]}else{return v}};class StackedMap{constructor(v){this.map=new Map;this.stack=v===undefined?[]:v.slice();this.stack.push(this.map)}set(v,E){this.map.set(v,E===undefined?R:E)}delete(v){if(this.stack.length>1){this.map.set(v,E)}else{this.map.delete(v)}}has(v){const R=this.map.get(v);if(R!==undefined){return R!==E}if(this.stack.length>1){for(let R=this.stack.length-2;R>=0;R--){const $=this.stack[R].get(v);if($!==undefined){this.map.set(v,$);return $!==E}}this.map.set(v,E)}return false}get(v){const $=this.map.get(v);if($!==undefined){return $===E||$===R?undefined:$}if(this.stack.length>1){for(let $=this.stack.length-2;$>=0;$--){const j=this.stack[$].get(v);if(j!==undefined){this.map.set(v,j);return j===E||j===R?undefined:j}}this.map.set(v,E)}return undefined}_compress(){if(this.stack.length===1)return;this.map=new Map;for(const v of this.stack){for(const R of v){if(R[1]===E){this.map.delete(R[0])}else{this.map.set(R[0],R[1])}}}this.stack=[this.map]}asArray(){this._compress();return Array.from(this.map.keys())}asSet(){this._compress();return new Set(this.map.keys())}asPairArray(){this._compress();return Array.from(this.map.entries(),extractPair)}asMap(){return new Map(this.asPairArray())}get size(){this._compress();return this.map.size}createChild(){return new StackedMap(this.stack)}}v.exports=StackedMap},8382:function(v){"use strict";class StringXor{constructor(){this._value=undefined}add(v){const E=v.length;const R=this._value;if(R===undefined){const R=this._value=Buffer.allocUnsafe(E);for(let $=0;$0){this._iterator=this._set[Symbol.iterator]();const v=this._iterator.next().value;this._set.delete(...v);return v}return undefined}this._set.delete(...v.value);return v.value}}v.exports=TupleQueue},12178:function(v){"use strict";class TupleSet{constructor(v){this._map=new Map;this.size=0;if(v){for(const E of v){this.add(...E)}}}add(...v){let E=this._map;for(let R=0;R{const j=$.next();if(j.done){if(v.length===0)return false;E.pop();return next(v.pop())}const[N,q]=j.value;v.push($);E.push(N);if(q instanceof Set){R=q[Symbol.iterator]();return true}else{return next(q[Symbol.iterator]())}};next(this._map[Symbol.iterator]());return{next(){while(R){const $=R.next();if($.done){E.pop();if(!next(v.pop())){R=undefined}}else{return{done:false,value:E.concat($.value)}}}return{done:true,value:undefined}}}}}v.exports=TupleSet},99716:function(v,E){"use strict";const R="\\".charCodeAt(0);const $="/".charCodeAt(0);const j="a".charCodeAt(0);const N="z".charCodeAt(0);const q="A".charCodeAt(0);const G="Z".charCodeAt(0);const ie="0".charCodeAt(0);const ae="9".charCodeAt(0);const ce="+".charCodeAt(0);const le="-".charCodeAt(0);const me=":".charCodeAt(0);const _e="#".charCodeAt(0);const Ie="?".charCodeAt(0);function getScheme(v){const E=v.charCodeAt(0);if((EN)&&(EG)){return undefined}let Me=1;let Oe=v.charCodeAt(Me);while(Oe>=j&&Oe<=N||Oe>=q&&Oe<=G||Oe>=ie&&Oe<=ae||Oe===ce||Oe===le){if(++Me===v.length)return undefined;Oe=v.charCodeAt(Me)}if(Oe!==me)return undefined;if(Me===1){const E=Me+1typeof v==="object"&&v!==null;class WeakTupleMap{constructor(){this.f=0;this.v=undefined;this.m=undefined;this.w=undefined}set(...v){let E=this;for(let R=0;R{const N=["function ",v,"(a,l,h,",$.join(","),"){",j?"":"var i=",R?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];if(j){if(E.indexOf("c")<0){N.push(";if(x===y){return m}else if(x<=y){")}else{N.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){")}}else{N.push(";if(",E,"){i=m;")}if(R){N.push("l=m+1}else{h=m-1}")}else{N.push("h=m-1}else{l=m+1}")}N.push("}");if(j){N.push("return -1};")}else{N.push("return i};")}return N.join("")};const compileBoundsSearch=(v,E,R,$)=>{const j=compileSearch("A","x"+v+"y",E,["y"],$);const N=compileSearch("P","c(x,y)"+v+"0",E,["y","c"],$);const q="function dispatchBinarySearch";const G="(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBinarySearch";const ie=[j,N,q,R,G,R];const ae=ie.join("");const ce=new Function(ae);return ce()};v.exports={ge:compileBoundsSearch(">=",false,"GE"),gt:compileBoundsSearch(">",false,"GT"),lt:compileBoundsSearch("<",true,"LT"),le:compileBoundsSearch("<=",true,"LE"),eq:compileBoundsSearch("-",true,"EQ",true)}},22093:function(v,E){"use strict";const R=new WeakMap;const $=new WeakMap;const j=Symbol("DELETE");const N=Symbol("cleverMerge dynamic info");const cachedCleverMerge=(v,E)=>{if(E===undefined)return v;if(v===undefined)return E;if(typeof E!=="object"||E===null)return E;if(typeof v!=="object"||v===null)return v;let $=R.get(v);if($===undefined){$=new WeakMap;R.set(v,$)}const j=$.get(E);if(j!==undefined)return j;const N=_cleverMerge(v,E,true);$.set(E,N);return N};const cachedSetProperty=(v,E,R)=>{let j=$.get(v);if(j===undefined){j=new Map;$.set(v,j)}let N=j.get(E);if(N===undefined){N=new Map;j.set(E,N)}let q=N.get(R);if(q)return q;q={...v,[E]:R};N.set(R,q);return q};const q=new WeakMap;const cachedParseObject=v=>{const E=q.get(v);if(E!==undefined)return E;const R=parseObject(v);q.set(v,R);return R};const parseObject=v=>{const E=new Map;let R;const getInfo=v=>{const R=E.get(v);if(R!==undefined)return R;const $={base:undefined,byProperty:undefined,byValues:undefined};E.set(v,$);return $};for(const E of Object.keys(v)){if(E.startsWith("by")){const $=E;const j=v[$];if(typeof j==="object"){for(const v of Object.keys(j)){const E=j[v];for(const R of Object.keys(E)){const N=getInfo(R);if(N.byProperty===undefined){N.byProperty=$;N.byValues=new Map}else if(N.byProperty!==$){throw new Error(`${$} and ${N.byProperty} for a single property is not supported`)}N.byValues.set(v,E[R]);if(v==="default"){for(const v of Object.keys(j)){if(!N.byValues.has(v))N.byValues.set(v,undefined)}}}}}else if(typeof j==="function"){if(R===undefined){R={byProperty:E,fn:j}}else{throw new Error(`${E} and ${R.byProperty} when both are functions is not supported`)}}else{const R=getInfo(E);R.base=v[E]}}else{const R=getInfo(E);R.base=v[E]}}return{static:E,dynamic:R}};const serializeObject=(v,E)=>{const R={};for(const E of v.values()){if(E.byProperty!==undefined){const v=R[E.byProperty]=R[E.byProperty]||{};for(const R of E.byValues.keys()){v[R]=v[R]||{}}}}for(const[E,$]of v){if($.base!==undefined){R[E]=$.base}if($.byProperty!==undefined){const v=R[$.byProperty]=R[$.byProperty]||{};for(const R of Object.keys(v)){const j=getFromByValues($.byValues,R);if(j!==undefined)v[R][E]=j}}}if(E!==undefined){R[E.byProperty]=E.fn}return R};const G=0;const ie=1;const ae=2;const ce=3;const le=4;const getValueType=v=>{if(v===undefined){return G}else if(v===j){return le}else if(Array.isArray(v)){if(v.lastIndexOf("...")!==-1)return ae;return ie}else if(typeof v==="object"&&v!==null&&(!v.constructor||v.constructor===Object)){return ce}return ie};const cleverMerge=(v,E)=>{if(E===undefined)return v;if(v===undefined)return E;if(typeof E!=="object"||E===null)return E;if(typeof v!=="object"||v===null)return v;return _cleverMerge(v,E,false)};const _cleverMerge=(v,E,R=false)=>{const $=R?cachedParseObject(v):parseObject(v);const{static:j,dynamic:q}=$;if(q!==undefined){let{byProperty:v,fn:j}=q;const G=j[N];if(G){E=R?cachedCleverMerge(G[1],E):cleverMerge(G[1],E);j=G[0]}const newFn=(...v)=>{const $=j(...v);return R?cachedCleverMerge($,E):cleverMerge($,E)};newFn[N]=[j,E];return serializeObject($.static,{byProperty:v,fn:newFn})}const G=R?cachedParseObject(E):parseObject(E);const{static:ie,dynamic:ae}=G;const ce=new Map;for(const[v,E]of j){const $=ie.get(v);const j=$!==undefined?mergeEntries(E,$,R):E;ce.set(v,j)}for(const[v,E]of ie){if(!j.has(v)){ce.set(v,E)}}return serializeObject(ce,ae)};const mergeEntries=(v,E,R)=>{switch(getValueType(E.base)){case ie:case le:return E;case G:if(!v.byProperty){return{base:v.base,byProperty:E.byProperty,byValues:E.byValues}}else if(v.byProperty!==E.byProperty){throw new Error(`${v.byProperty} and ${E.byProperty} for a single property is not supported`)}else{const $=new Map(v.byValues);for(const[j,N]of E.byValues){const E=getFromByValues(v.byValues,j);$.set(j,mergeSingleValue(E,N,R))}return{base:v.base,byProperty:v.byProperty,byValues:$}}default:{if(!v.byProperty){return{base:mergeSingleValue(v.base,E.base,R),byProperty:E.byProperty,byValues:E.byValues}}let $;const j=new Map(v.byValues);for(const[v,$]of j){j.set(v,mergeSingleValue($,E.base,R))}if(Array.from(v.byValues.values()).every((v=>{const E=getValueType(v);return E===ie||E===le}))){$=mergeSingleValue(v.base,E.base,R)}else{$=v.base;if(!j.has("default"))j.set("default",E.base)}if(!E.byProperty){return{base:$,byProperty:v.byProperty,byValues:j}}else if(v.byProperty!==E.byProperty){throw new Error(`${v.byProperty} and ${E.byProperty} for a single property is not supported`)}const N=new Map(j);for(const[v,$]of E.byValues){const E=getFromByValues(j,v);N.set(v,mergeSingleValue(E,$,R))}return{base:$,byProperty:v.byProperty,byValues:N}}}};const getFromByValues=(v,E)=>{if(E!=="default"&&v.has(E)){return v.get(E)}return v.get("default")};const mergeSingleValue=(v,E,R)=>{const $=getValueType(E);const j=getValueType(v);switch($){case le:case ie:return E;case ce:{return j!==ce?E:R?cachedCleverMerge(v,E):cleverMerge(v,E)}case G:return v;case ae:switch(j!==ie?j:Array.isArray(v)?ae:ce){case G:return E;case le:return E.filter((v=>v!=="..."));case ae:{const R=[];for(const $ of E){if($==="..."){for(const E of v){R.push(E)}}else{R.push($)}}return R}case ce:return E.map((E=>E==="..."?v:E));default:throw new Error("Not implemented")}default:throw new Error("Not implemented")}};const removeOperations=v=>{const E={};for(const R of Object.keys(v)){const $=v[R];const j=getValueType($);switch(j){case G:case le:break;case ce:E[R]=removeOperations($);break;case ae:E[R]=$.filter((v=>v!=="..."));break;default:E[R]=$;break}}return E};const resolveByProperty=(v,E,...R)=>{if(typeof v!=="object"||v===null||!(E in v)){return v}const{[E]:$,...j}=v;const N=j;const q=$;if(typeof q==="object"){const v=R[0];if(v in q){return cachedCleverMerge(N,q[v])}else if("default"in q){return cachedCleverMerge(N,q.default)}else{return N}}else if(typeof q==="function"){const v=q.apply(null,R);return cachedCleverMerge(N,resolveByProperty(v,E,...R))}};E.cachedSetProperty=cachedSetProperty;E.cachedCleverMerge=cachedCleverMerge;E.cleverMerge=cleverMerge;E.resolveByProperty=resolveByProperty;E.removeOperations=removeOperations;E.DELETE=j},58792:function(v,E,R){"use strict";const{compareRuntime:$}=R(47462);const createCachedParameterizedComparator=v=>{const E=new WeakMap;return R=>{const $=E.get(R);if($!==undefined)return $;const j=v.bind(null,R);E.set(R,j);return j}};E.compareChunksById=(v,E)=>compareIds(v.id,E.id);E.compareModulesByIdentifier=(v,E)=>compareIds(v.identifier(),E.identifier());const compareModulesById=(v,E,R)=>compareIds(v.getModuleId(E),v.getModuleId(R));E.compareModulesById=createCachedParameterizedComparator(compareModulesById);const compareNumbers=(v,E)=>{if(typeof v!==typeof E){return typeof vE)return 1;return 0};E.compareNumbers=compareNumbers;const compareStringsNumeric=(v,E)=>{const R=v.split(/(\d+)/);const $=E.split(/(\d+)/);const j=Math.min(R.length,$.length);for(let v=0;vj.length){if(E.slice(0,j.length)>j)return 1;return-1}else if(j.length>E.length){if(j.slice(0,E.length)>E)return-1;return 1}else{if(Ej)return 1}}else{const v=+E;const R=+j;if(vR)return 1}}if($.lengthR.length)return-1;return 0};E.compareStringsNumeric=compareStringsNumeric;const compareModulesByPostOrderIndexOrIdentifier=(v,E,R)=>{const $=compareNumbers(v.getPostOrderIndex(E),v.getPostOrderIndex(R));if($!==0)return $;return compareIds(E.identifier(),R.identifier())};E.compareModulesByPostOrderIndexOrIdentifier=createCachedParameterizedComparator(compareModulesByPostOrderIndexOrIdentifier);const compareModulesByPreOrderIndexOrIdentifier=(v,E,R)=>{const $=compareNumbers(v.getPreOrderIndex(E),v.getPreOrderIndex(R));if($!==0)return $;return compareIds(E.identifier(),R.identifier())};E.compareModulesByPreOrderIndexOrIdentifier=createCachedParameterizedComparator(compareModulesByPreOrderIndexOrIdentifier);const compareModulesByIdOrIdentifier=(v,E,R)=>{const $=compareIds(v.getModuleId(E),v.getModuleId(R));if($!==0)return $;return compareIds(E.identifier(),R.identifier())};E.compareModulesByIdOrIdentifier=createCachedParameterizedComparator(compareModulesByIdOrIdentifier);const compareChunks=(v,E,R)=>v.compareChunks(E,R);E.compareChunks=createCachedParameterizedComparator(compareChunks);const compareIds=(v,E)=>{if(typeof v!==typeof E){return typeof vE)return 1;return 0};E.compareIds=compareIds;const compareStrings=(v,E)=>{if(vE)return 1;return 0};E.compareStrings=compareStrings;const compareChunkGroupsByIndex=(v,E)=>v.index{if(R.length>0){const[$,...j]=R;return concatComparators(v,concatComparators(E,$,...j))}const $=j.get(v,E);if($!==undefined)return $;const result=(R,$)=>{const j=v(R,$);if(j!==0)return j;return E(R,$)};j.set(v,E,result);return result};E.concatComparators=concatComparators;const N=new TwoKeyWeakMap;const compareSelect=(v,E)=>{const R=N.get(v,E);if(R!==undefined)return R;const result=(R,$)=>{const j=v(R);const N=v($);if(j!==undefined&&j!==null){if(N!==undefined&&N!==null){return E(j,N)}return-1}else{if(N!==undefined&&N!==null){return 1}return 0}};N.set(v,E,result);return result};E.compareSelect=compareSelect;const q=new WeakMap;const compareIterables=v=>{const E=q.get(v);if(E!==undefined)return E;const result=(E,R)=>{const $=E[Symbol.iterator]();const j=R[Symbol.iterator]();while(true){const E=$.next();const R=j.next();if(E.done){return R.done?0:-1}else if(R.done){return 1}const N=v(E.value,R.value);if(N!==0)return N}};q.set(v,result);return result};E.compareIterables=compareIterables;E.keepOriginalOrder=v=>{const E=new Map;let R=0;for(const $ of v){E.set($,R++)}return(v,R)=>compareNumbers(E.get(v),E.get(R))};E.compareChunksNatural=v=>{const R=E.compareModulesById(v);const j=compareIterables(R);return concatComparators(compareSelect((v=>v.name),compareIds),compareSelect((v=>v.runtime),$),compareSelect((E=>v.getOrderedChunkModulesIterable(E,R)),j))};E.compareLocations=(v,E)=>{let R=typeof v==="object"&&v!==null;let $=typeof E==="object"&&E!==null;if(!R||!$){if(R)return 1;if($)return-1;return 0}if("start"in v){if("start"in E){const R=v.start;const $=E.start;if(R.line<$.line)return-1;if(R.line>$.line)return 1;if(R.column<$.column)return-1;if(R.column>$.column)return 1}else return-1}else if("start"in E)return 1;if("name"in v){if("name"in E){if(v.nameE.name)return 1}else return-1}else if("name"in E)return 1;if("index"in v){if("index"in E){if(v.indexE.index)return 1}else return-1}else if("index"in E)return 1;return 0}},73897:function(v){"use strict";const quoteMeta=v=>v.replace(/[-[\]\\/{}()*+?.^$|]/g,"\\$&");const toSimpleString=v=>{if(`${+v}`===v){return v}return JSON.stringify(v)};const compileBooleanMatcher=v=>{const E=Object.keys(v).filter((E=>v[E]));const R=Object.keys(v).filter((E=>!v[E]));if(E.length===0)return false;if(R.length===0)return true;return compileBooleanMatcherFromLists(E,R)};const compileBooleanMatcherFromLists=(v,E)=>{if(v.length===0)return()=>"false";if(E.length===0)return()=>"true";if(v.length===1)return E=>`${toSimpleString(v[0])} == ${E}`;if(E.length===1)return v=>`${toSimpleString(E[0])} != ${v}`;const R=itemsToRegexp(v);const $=itemsToRegexp(E);if(R.length<=$.length){return v=>`/^${R}$/.test(${v})`}else{return v=>`!/^${$}$/.test(${v})`}};const popCommonItems=(v,E,R)=>{const $=new Map;for(const R of v){const v=E(R);if(v){let E=$.get(v);if(E===undefined){E=[];$.set(v,E)}E.push(R)}}const j=[];for(const E of $.values()){if(R(E)){for(const R of E){v.delete(R)}j.push(E)}}return j};const getCommonPrefix=v=>{let E=v[0];for(let R=1;R{let E=v[0];for(let R=1;R=0;v--,R--){if($[v]!==E[R]){E=E.slice(R+1);break}}}return E};const itemsToRegexp=v=>{if(v.length===1){return quoteMeta(v[0])}const E=[];let R=0;for(const E of v){if(E.length===1){R++}}if(R===v.length){return`[${quoteMeta(v.sort().join(""))}]`}const $=new Set(v.sort());if(R>2){let v="";for(const E of $){if(E.length===1){v+=E;$.delete(E)}}E.push(`[${quoteMeta(v)}]`)}if(E.length===0&&$.size===2){const E=getCommonPrefix(v);const R=getCommonSuffix(v.map((v=>v.slice(E.length))));if(E.length>0||R.length>0){return`${quoteMeta(E)}${itemsToRegexp(v.map((v=>v.slice(E.length,-R.length||undefined))))}${quoteMeta(R)}`}}if(E.length===0&&$.size===2){const v=$[Symbol.iterator]();const E=v.next().value;const R=v.next().value;if(E.length>0&&R.length>0&&E.slice(-1)===R.slice(-1)){return`${itemsToRegexp([E.slice(0,-1),R.slice(0,-1)])}${quoteMeta(E.slice(-1))}`}}const j=popCommonItems($,(v=>v.length>=1?v[0]:false),(v=>{if(v.length>=3)return true;if(v.length<=1)return false;return v[0][1]===v[1][1]}));for(const v of j){const R=getCommonPrefix(v);E.push(`${quoteMeta(R)}${itemsToRegexp(v.map((v=>v.slice(R.length))))}`)}const N=popCommonItems($,(v=>v.length>=1?v.slice(-1):false),(v=>{if(v.length>=3)return true;if(v.length<=1)return false;return v[0].slice(-2)===v[1].slice(-2)}));for(const v of N){const R=getCommonSuffix(v);E.push(`${itemsToRegexp(v.map((v=>v.slice(0,-R.length))))}${quoteMeta(R)}`)}const q=E.concat(Array.from($,quoteMeta));if(q.length===1)return q[0];return`(${q.join("|")})`};compileBooleanMatcher.fromLists=compileBooleanMatcherFromLists;compileBooleanMatcher.itemsToRegexp=itemsToRegexp;v.exports=compileBooleanMatcher},89699:function(v,E,R){"use strict";const $=R(61374);const j=$((()=>R(38476).validate));const createSchemaValidation=(v,E,N)=>{E=$(E);return $=>{if(v&&!v($)){j()(E(),$,N);if(v){R(73837).deprecate((()=>{}),"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.","DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID")()}}}};v.exports=createSchemaValidation},85205:function(v,E,R){"use strict";const $=R(14577);const j=2e3;const N={};class BulkUpdateDecorator extends ${constructor(v,E){super();this.hashKey=E;if(typeof v==="function"){this.hashFactory=v;this.hash=undefined}else{this.hashFactory=undefined;this.hash=v}this.buffer=""}update(v,E){if(E!==undefined||typeof v!=="string"||v.length>j){if(this.hash===undefined)this.hash=this.hashFactory();if(this.buffer.length>0){this.hash.update(this.buffer);this.buffer=""}this.hash.update(v,E)}else{this.buffer+=v;if(this.buffer.length>j){if(this.hash===undefined)this.hash=this.hashFactory();this.hash.update(this.buffer);this.buffer=""}}return this}digest(v){let E;const R=this.buffer;if(this.hash===undefined){const $=`${this.hashKey}-${v}`;E=N[$];if(E===undefined){E=N[$]=new Map}const j=E.get(R);if(j!==undefined)return j;this.hash=this.hashFactory()}if(R.length>0){this.hash.update(R)}const $=this.hash.digest(v);const j=typeof $==="string"?$:$.toString();if(E!==undefined){E.set(R,j)}return j}}class DebugHash extends ${constructor(){super();this.string=""}update(v,E){if(typeof v!=="string")v=v.toString("utf-8");if(v.startsWith("debug-digest-")){v=Buffer.from(v.slice("debug-digest-".length),"hex").toString()}this.string+=`[${v}](${(new Error).stack.split("\n",3)[2]})\n`;return this}digest(v){return"debug-digest-"+Buffer.from(this.string).toString("hex")}}let q=undefined;let G=undefined;let ie=undefined;let ae=undefined;v.exports=v=>{if(typeof v==="function"){return new BulkUpdateDecorator((()=>new v))}switch(v){case"debug":return new DebugHash;case"xxhash64":if(G===undefined){G=R(29518);if(ae===undefined){ae=R(86406)}}return new ae(G());case"md4":if(ie===undefined){ie=R(44829);if(ae===undefined){ae=R(86406)}}return new ae(ie());case"native-md4":if(q===undefined)q=R(6113);return new BulkUpdateDecorator((()=>q.createHash("md4")),"md4");default:if(q===undefined)q=R(6113);return new BulkUpdateDecorator((()=>q.createHash(v)),v)}}},99321:function(v,E,R){"use strict";const $=R(73837);const j=new Map;const createDeprecation=(v,E)=>{const R=j.get(v);if(R!==undefined)return R;const N=$.deprecate((()=>{}),v,"DEP_WEBPACK_DEPRECATION_"+E);j.set(v,N);return N};const N=["concat","entry","filter","find","findIndex","includes","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"];const q=["copyWithin","entries","fill","keys","pop","reverse","shift","splice","sort","unshift"];E.arrayToSetDeprecation=(v,E)=>{for(const R of N){if(v[R])continue;const $=createDeprecation(`${E} was changed from Array to Set (using Array method '${R}' is deprecated)`,"ARRAY_TO_SET");v[R]=function(){$();const v=Array.from(this);return Array.prototype[R].apply(v,arguments)}}const R=createDeprecation(`${E} was changed from Array to Set (using Array method 'push' is deprecated)`,"ARRAY_TO_SET_PUSH");const $=createDeprecation(`${E} was changed from Array to Set (using Array property 'length' is deprecated)`,"ARRAY_TO_SET_LENGTH");const j=createDeprecation(`${E} was changed from Array to Set (indexing Array is deprecated)`,"ARRAY_TO_SET_INDEXER");v.push=function(){R();for(const v of Array.from(arguments)){this.add(v)}return this.size};for(const R of q){if(v[R])continue;v[R]=()=>{throw new Error(`${E} was changed from Array to Set (using Array method '${R}' is not possible)`)}}const createIndexGetter=v=>{const fn=function(){j();let E=0;for(const R of this){if(E++===v)return R}return undefined};return fn};const defineIndexGetter=R=>{Object.defineProperty(v,R,{get:createIndexGetter(R),set(v){throw new Error(`${E} was changed from Array to Set (indexing Array with write is not possible)`)}})};defineIndexGetter(0);let G=1;Object.defineProperty(v,"length",{get(){$();const v=this.size;for(G;G{let R=false;class SetDeprecatedArray extends Set{constructor($){super($);if(!R){R=true;E.arrayToSetDeprecation(SetDeprecatedArray.prototype,v)}}}return SetDeprecatedArray};E.soonFrozenObjectDeprecation=(v,E,R,j="")=>{const N=`${E} will be frozen in future, all modifications are deprecated.${j&&`\n${j}`}`;return new Proxy(v,{set:$.deprecate(((v,E,R,$)=>Reflect.set(v,E,R,$)),N,R),defineProperty:$.deprecate(((v,E,R)=>Reflect.defineProperty(v,E,R)),N,R),deleteProperty:$.deprecate(((v,E)=>Reflect.deleteProperty(v,E)),N,R),setPrototypeOf:$.deprecate(((v,E)=>Reflect.setPrototypeOf(v,E)),N,R)})};const deprecateAllProperties=(v,E,R)=>{const j={};const N=Object.getOwnPropertyDescriptors(v);for(const v of Object.keys(N)){const q=N[v];if(typeof q.value==="function"){Object.defineProperty(j,v,{...q,value:$.deprecate(q.value,E,R)})}else if(q.get||q.set){Object.defineProperty(j,v,{...q,get:q.get&&$.deprecate(q.get,E,R),set:q.set&&$.deprecate(q.set,E,R)})}else{let N=q.value;Object.defineProperty(j,v,{configurable:q.configurable,enumerable:q.enumerable,get:$.deprecate((()=>N),E,R),set:q.writable?$.deprecate((v=>N=v),E,R):undefined})}}return j};E.deprecateAllProperties=deprecateAllProperties;E.createFakeHook=(v,E,R)=>{if(E&&R){v=deprecateAllProperties(v,E,R)}return Object.freeze(Object.assign(v,{_fakeHook:true}))}},75843:function(v){"use strict";const similarity=(v,E)=>{const R=Math.min(v.length,E.length);let $=0;for(let j=0;j{const $=Math.min(v.length,E.length);let j=0;while(j<$){if(v.charCodeAt(j)!==E.charCodeAt(j)){j++;break}j++}while(j<$){const E=v.slice(0,j);const $=E.toLowerCase();if(!R.has($)){R.add($);return E}j++}return v};const addSizeTo=(v,E)=>{for(const R of Object.keys(E)){v[R]=(v[R]||0)+E[R]}};const subtractSizeFrom=(v,E)=>{for(const R of Object.keys(E)){v[R]-=E[R]}};const sumSize=v=>{const E=Object.create(null);for(const R of v){addSizeTo(E,R.size)}return E};const isTooBig=(v,E)=>{for(const R of Object.keys(v)){const $=v[R];if($===0)continue;const j=E[R];if(typeof j==="number"){if($>j)return true}}return false};const isTooSmall=(v,E)=>{for(const R of Object.keys(v)){const $=v[R];if($===0)continue;const j=E[R];if(typeof j==="number"){if(${const R=new Set;for(const $ of Object.keys(v)){const j=v[$];if(j===0)continue;const N=E[$];if(typeof N==="number"){if(j{let R=0;for(const $ of Object.keys(v)){if(v[$]!==0&&E.has($))R++}return R};const selectiveSizeSum=(v,E)=>{let R=0;for(const $ of Object.keys(v)){if(v[$]!==0&&E.has($))R+=v[$]}return R};class Node{constructor(v,E,R){this.item=v;this.key=E;this.size=R}}class Group{constructor(v,E,R){this.nodes=v;this.similarities=E;this.size=R||sumSize(v);this.key=undefined}popNodes(v){const E=[];const R=[];const $=[];let j;for(let N=0;N0){R.push(j===this.nodes[N-1]?this.similarities[N-1]:similarity(j.key,q.key))}E.push(q);j=q}}if($.length===this.nodes.length)return undefined;this.nodes=E;this.similarities=R;this.size=sumSize(E);return $}}const getSimilarities=v=>{const E=[];let R=undefined;for(const $ of v){if(R!==undefined){E.push(similarity(R.key,$.key))}R=$}return E};v.exports=({maxSize:v,minSize:E,items:R,getSize:$,getKey:j})=>{const N=[];const q=Array.from(R,(v=>new Node(v,j(v),$(v))));const G=[];q.sort(((v,E)=>{if(v.keyE.key)return 1;return 0}));for(const R of q){if(isTooBig(R.size,v)&&!isTooSmall(R.size,E)){N.push(new Group([R],[]))}else{G.push(R)}}if(G.length>0){const R=new Group(G,getSimilarities(G));const removeProblematicNodes=(v,R=v.size)=>{const $=getTooSmallTypes(R,E);if($.size>0){const E=v.popNodes((v=>getNumberOfMatchingSizeTypes(v.size,$)>0));if(E===undefined)return false;const R=N.filter((v=>getNumberOfMatchingSizeTypes(v.size,$)>0));if(R.length>0){const v=R.reduce(((v,E)=>{const R=getNumberOfMatchingSizeTypes(v,$);const j=getNumberOfMatchingSizeTypes(E,$);if(R!==j)return RselectiveSizeSum(E.size,$))return E;return v}));for(const R of E)v.nodes.push(R);v.nodes.sort(((v,E)=>{if(v.keyE.key)return 1;return 0}))}else{N.push(new Group(E,null))}return true}else{return false}};if(R.nodes.length>0){const $=[R];while($.length){const R=$.pop();if(!isTooBig(R.size,v)){N.push(R);continue}if(removeProblematicNodes(R)){$.push(R);continue}let j=1;let q=Object.create(null);addSizeTo(q,R.nodes[0].size);while(j=0&&isTooSmall(ie,E)){addSizeTo(ie,R.nodes[G].size);G--}if(j-1>G){let v;if(G{if(v.nodes[0].keyE.nodes[0].key)return 1;return 0}));const ie=new Set;for(let v=0;v({key:v.key,items:v.nodes.map((v=>v.item)),size:v.size})))}},45045:function(v){"use strict";v.exports=function extractUrlAndGlobal(v){const E=v.indexOf("@");if(E<=0||E===v.length-1){throw new Error(`Invalid request "${v}"`)}return[v.substring(E+1),v.substring(0,E)]}},30584:function(v){"use strict";const E=0;const R=1;const $=2;const j=3;const N=4;class Node{constructor(v){this.item=v;this.dependencies=new Set;this.marker=E;this.cycle=undefined;this.incoming=0}}class Cycle{constructor(){this.nodes=new Set}}v.exports=(v,q)=>{const G=new Map;for(const E of v){const v=new Node(E);G.set(E,v)}if(G.size<=1)return v;for(const v of G.values()){for(const E of q(v.item)){const R=G.get(E);if(R!==undefined){v.dependencies.add(R)}}}const ie=new Set;const ae=new Set;for(const v of G.values()){if(v.marker===E){v.marker=R;const q=[{node:v,openEdges:Array.from(v.dependencies)}];while(q.length>0){const v=q[q.length-1];if(v.openEdges.length>0){const G=v.openEdges.pop();switch(G.marker){case E:q.push({node:G,openEdges:Array.from(G.dependencies)});G.marker=R;break;case R:{let v=G.cycle;if(!v){v=new Cycle;v.nodes.add(G);G.cycle=v}for(let E=q.length-1;q[E].node!==G;E--){const R=q[E].node;if(R.cycle){if(R.cycle!==v){for(const E of R.cycle.nodes){E.cycle=v;v.nodes.add(E)}}}else{R.cycle=v;v.nodes.add(R)}}break}case N:G.marker=$;ie.delete(G);break;case j:ae.delete(G.cycle);G.marker=$;break}}else{q.pop();v.node.marker=$}}const G=v.cycle;if(G){for(const v of G.nodes){v.marker=j}ae.add(G)}else{v.marker=N;ie.add(v)}}}for(const v of ae){let E=0;const R=new Set;const $=v.nodes;for(const v of $){for(const j of v.dependencies){if($.has(j)){j.incoming++;if(j.incomingE){R.clear();E=j.incoming}R.add(j)}}}for(const v of R){ie.add(v)}}if(ie.size>0){return Array.from(ie,(v=>v.item))}else{throw new Error("Implementation of findGraphRoots is broken")}}},47077:function(v,E,R){"use strict";const $=R(71017);const relative=(v,E,R)=>{if(v&&v.relative){return v.relative(E,R)}else if($.posix.isAbsolute(E)){return $.posix.relative(E,R)}else if($.win32.isAbsolute(E)){return $.win32.relative(E,R)}else{throw new Error(`${E} is neither a posix nor a windows path, and there is no 'relative' method defined in the file system`)}};E.relative=relative;const join=(v,E,R)=>{if(v&&v.join){return v.join(E,R)}else if($.posix.isAbsolute(E)){return $.posix.join(E,R)}else if($.win32.isAbsolute(E)){return $.win32.join(E,R)}else{throw new Error(`${E} is neither a posix nor a windows path, and there is no 'join' method defined in the file system`)}};E.join=join;const dirname=(v,E)=>{if(v&&v.dirname){return v.dirname(E)}else if($.posix.isAbsolute(E)){return $.posix.dirname(E)}else if($.win32.isAbsolute(E)){return $.win32.dirname(E)}else{throw new Error(`${E} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system`)}};E.dirname=dirname;const mkdirp=(v,E,R)=>{v.mkdir(E,($=>{if($){if($.code==="ENOENT"){const j=dirname(v,E);if(j===E){R($);return}mkdirp(v,j,($=>{if($){R($);return}v.mkdir(E,(v=>{if(v){if(v.code==="EEXIST"){R();return}R(v);return}R()}))}));return}else if($.code==="EEXIST"){R();return}R($);return}R()}))};E.mkdirp=mkdirp;const mkdirpSync=(v,E)=>{try{v.mkdirSync(E)}catch(R){if(R){if(R.code==="ENOENT"){const $=dirname(v,E);if($===E){throw R}mkdirpSync(v,$);v.mkdirSync(E);return}else if(R.code==="EEXIST"){return}throw R}}};E.mkdirpSync=mkdirpSync;const readJson=(v,E,R)=>{if("readJson"in v)return v.readJson(E,R);v.readFile(E,((v,E)=>{if(v)return R(v);let $;try{$=JSON.parse(E.toString("utf-8"))}catch(v){return R(v)}return R(null,$)}))};E.readJson=readJson;const lstatReadlinkAbsolute=(v,E,R)=>{let $=3;const doReadLink=()=>{v.readlink(E,((j,N)=>{if(j&&--$>0){return doStat()}if(j||!N)return doStat();const q=N.toString();R(null,join(v,dirname(v,E),q))}))};const doStat=()=>{if("lstat"in v){return v.lstat(E,((v,E)=>{if(v)return R(v);if(E.isSymbolicLink()){return doReadLink()}R(null,E)}))}else{return v.stat(E,R)}};if("lstat"in v)return doStat();doReadLink()};E.lstatReadlinkAbsolute=lstatReadlinkAbsolute},86406:function(v,E,R){"use strict";const $=R(14577);const j=R(726).MAX_SHORT_STRING;class BatchedHash extends ${constructor(v){super();this.string=undefined;this.encoding=undefined;this.hash=v}update(v,E){if(this.string!==undefined){if(typeof v==="string"&&E===this.encoding&&this.string.length+v.lengthE){this._updateWithShortString(v.slice(0,E),R);v=v.slice(E)}this._updateWithShortString(v,R);return this}this._updateWithBuffer(v);return this}_updateWithShortString(v,E){const{exports:R,buffered:$,mem:j,chunkSize:N}=this;let q;if(v.length<70){if(!E||E==="utf-8"||E==="utf8"){q=$;for(let R=0;R>6|192;j[q+1]=$&63|128;q+=2}else{q+=j.write(v.slice(R),q,E);break}}}else if(E==="latin1"){q=$;for(let E=0;E0)j.copyWithin(0,v,q)}}_updateWithBuffer(v){const{exports:E,buffered:R,mem:$}=this;const j=v.length;if(R+j65536){let j=65536-R;v.copy($,R,0,j);E.update(65536);const q=N-R-65536;while(j0)v.copy($,0,j-q,j)}}digest(v){const{exports:E,buffered:R,mem:$,digestSize:j}=this;E.final(R);this.instancesPool.push(this);const N=$.toString("latin1",0,j);if(v==="hex")return N;if(v==="binary"||!v)return Buffer.from(N,"hex");return Buffer.from(N,"hex").toString(v)}}const create=(v,E,R,$)=>{if(E.length>0){const v=E.pop();v.reset();return v}else{return new WasmHash(new WebAssembly.Instance(v),E,R,$)}};v.exports=create;v.exports.MAX_SHORT_STRING=E},29518:function(v,E,R){"use strict";const $=R(726);const j=new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrIIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqAYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEAgAiABNQIAQoeVr6+Ytt6bnn9+hUIXiULP1tO+0ser2UJ+Qvnz3fGZ9pmrFnwhAiABQQRqIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAkIdiCAChUL5893xmfaZqxZ+IgJCIIggAoUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL","base64"));v.exports=$.bind(null,j,[],32,16)},20162:function(v,E,R){"use strict";const $=R(71017);const j=/^[a-zA-Z]:[\\/]/;const N=/([|!])/;const q=/\\/g;const relativePathToRequest=v=>{if(v==="")return"./.";if(v==="..")return"../.";if(v.startsWith("../"))return v;return`./${v}`};const absoluteToRequest=(v,E)=>{if(E[0]==="/"){if(E.length>1&&E[E.length-1]==="/"){return E}const R=E.indexOf("?");let j=R===-1?E:E.slice(0,R);j=relativePathToRequest($.posix.relative(v,j));return R===-1?j:j+E.slice(R)}if(j.test(E)){const R=E.indexOf("?");let N=R===-1?E:E.slice(0,R);N=$.win32.relative(v,N);if(!j.test(N)){N=relativePathToRequest(N.replace(q,"/"))}return R===-1?N:N+E.slice(R)}return E};const requestToAbsolute=(v,E)=>{if(E.startsWith("./")||E.startsWith("../"))return $.join(v,E);return E};const makeCacheable=v=>{const E=new WeakMap;const getCache=v=>{const R=E.get(v);if(R!==undefined)return R;const $=new Map;E.set(v,$);return $};const fn=(E,R)=>{if(!R)return v(E);const $=getCache(R);const j=$.get(E);if(j!==undefined)return j;const N=v(E);$.set(E,N);return N};fn.bindCache=E=>{const R=getCache(E);return E=>{const $=R.get(E);if($!==undefined)return $;const j=v(E);R.set(E,j);return j}};return fn};const makeCacheableWithContext=v=>{const E=new WeakMap;const cachedFn=(R,$,j)=>{if(!j)return v(R,$);let N=E.get(j);if(N===undefined){N=new Map;E.set(j,N)}let q;let G=N.get(R);if(G===undefined){N.set(R,G=new Map)}else{q=G.get($)}if(q!==undefined){return q}else{const E=v(R,$);G.set($,E);return E}};cachedFn.bindCache=R=>{let $;if(R){$=E.get(R);if($===undefined){$=new Map;E.set(R,$)}}else{$=new Map}const boundFn=(E,R)=>{let j;let N=$.get(E);if(N===undefined){$.set(E,N=new Map)}else{j=N.get(R)}if(j!==undefined){return j}else{const $=v(E,R);N.set(R,$);return $}};return boundFn};cachedFn.bindContextCache=(R,$)=>{let j;if($){let v=E.get($);if(v===undefined){v=new Map;E.set($,v)}j=v.get(R);if(j===undefined){v.set(R,j=new Map)}}else{j=new Map}const boundFn=E=>{const $=j.get(E);if($!==undefined){return $}else{const $=v(R,E);j.set(E,$);return $}};return boundFn};return cachedFn};const _makePathsRelative=(v,E)=>E.split(N).map((E=>absoluteToRequest(v,E))).join("");E.makePathsRelative=makeCacheableWithContext(_makePathsRelative);const _makePathsAbsolute=(v,E)=>E.split(N).map((E=>requestToAbsolute(v,E))).join("");E.makePathsAbsolute=makeCacheableWithContext(_makePathsAbsolute);const _contextify=(v,E)=>E.split("!").map((E=>absoluteToRequest(v,E))).join("!");const G=makeCacheableWithContext(_contextify);E.contextify=G;const _absolutify=(v,E)=>E.split("!").map((E=>requestToAbsolute(v,E))).join("!");const ie=makeCacheableWithContext(_absolutify);E.absolutify=ie;const ae=/^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;const ce=/^((?:\0.|[^?\0])*)(\?.*)?$/;const _parseResource=v=>{const E=ae.exec(v);return{resource:v,path:E[1].replace(/\0(.)/g,"$1"),query:E[2]?E[2].replace(/\0(.)/g,"$1"):"",fragment:E[3]||""}};E.parseResource=makeCacheable(_parseResource);const _parseResourceWithoutFragment=v=>{const E=ce.exec(v);return{resource:v,path:E[1].replace(/\0(.)/g,"$1"),query:E[2]?E[2].replace(/\0(.)/g,"$1"):""}};E.parseResourceWithoutFragment=makeCacheable(_parseResourceWithoutFragment);E.getUndoPath=(v,E,R)=>{let $=-1;let j="";E=E.replace(/[\\/]$/,"");for(const R of v.split(/[/\\]+/)){if(R===".."){if($>-1){$--}else{const v=E.lastIndexOf("/");const R=E.lastIndexOf("\\");const $=v<0?R:R<0?v:Math.max(v,R);if($<0)return E+"/";j=E.slice($+1)+"/"+j;E=E.slice(0,$)}}else if(R!=="."){$++}}return $>0?`${"../".repeat($)}${j}`:R?`./${j}`:j}},6280:function(v,E,R){"use strict";v.exports={AsyncDependenciesBlock:()=>R(42290),CommentCompilationWarning:()=>R(54437),ContextModule:()=>R(49994),"cache/PackFileCacheStrategy":()=>R(26174),"cache/ResolverCachePlugin":()=>R(94834),"container/ContainerEntryDependency":()=>R(77033),"container/ContainerEntryModule":()=>R(17438),"container/ContainerExposedDependency":()=>R(91571),"container/FallbackDependency":()=>R(65917),"container/FallbackItemDependency":()=>R(25742),"container/FallbackModule":()=>R(39387),"container/RemoteModule":()=>R(40452),"container/RemoteToExternalDependency":()=>R(21290),"dependencies/AMDDefineDependency":()=>R(80463),"dependencies/AMDRequireArrayDependency":()=>R(73090),"dependencies/AMDRequireContextDependency":()=>R(39985),"dependencies/AMDRequireDependenciesBlock":()=>R(93897),"dependencies/AMDRequireDependency":()=>R(45137),"dependencies/AMDRequireItemDependency":()=>R(61261),"dependencies/CachedConstDependency":()=>R(83106),"dependencies/CreateScriptUrlDependency":()=>R(37857),"dependencies/CommonJsRequireContextDependency":()=>R(85190),"dependencies/CommonJsExportRequireDependency":()=>R(70241),"dependencies/CommonJsExportsDependency":()=>R(65086),"dependencies/CommonJsFullRequireDependency":()=>R(96107),"dependencies/CommonJsRequireDependency":()=>R(90345),"dependencies/CommonJsSelfReferenceDependency":()=>R(27647),"dependencies/ConstDependency":()=>R(14367),"dependencies/ContextDependency":()=>R(22429),"dependencies/ContextElementDependency":()=>R(34192),"dependencies/CriticalDependencyWarning":()=>R(34219),"dependencies/CssImportDependency":()=>R(2951),"dependencies/CssLocalIdentifierDependency":()=>R(75689),"dependencies/CssSelfLocalIdentifierDependency":()=>R(24769),"dependencies/CssExportDependency":()=>R(12778),"dependencies/CssUrlDependency":()=>R(75178),"dependencies/DelegatedSourceDependency":()=>R(70688),"dependencies/DllEntryDependency":()=>R(21467),"dependencies/EntryDependency":()=>R(17380),"dependencies/ExportsInfoDependency":()=>R(36853),"dependencies/HarmonyAcceptDependency":()=>R(98702),"dependencies/HarmonyAcceptImportDependency":()=>R(13345),"dependencies/HarmonyCompatibilityDependency":()=>R(48180),"dependencies/HarmonyExportExpressionDependency":()=>R(61404),"dependencies/HarmonyExportHeaderDependency":()=>R(31623),"dependencies/HarmonyExportImportedSpecifierDependency":()=>R(96577),"dependencies/HarmonyExportSpecifierDependency":()=>R(22437),"dependencies/HarmonyImportSideEffectDependency":()=>R(95913),"dependencies/HarmonyImportSpecifierDependency":()=>R(577),"dependencies/HarmonyEvaluatedImportSpecifierDependency":()=>R(87799),"dependencies/ImportContextDependency":()=>R(28801),"dependencies/ImportDependency":()=>R(36074),"dependencies/ImportEagerDependency":()=>R(29646),"dependencies/ImportWeakDependency":()=>R(97001),"dependencies/JsonExportsDependency":()=>R(67762),"dependencies/LocalModule":()=>R(71195),"dependencies/LocalModuleDependency":()=>R(81600),"dependencies/ModuleDecoratorDependency":()=>R(1569),"dependencies/ModuleHotAcceptDependency":()=>R(72674),"dependencies/ModuleHotDeclineDependency":()=>R(40213),"dependencies/ImportMetaHotAcceptDependency":()=>R(94717),"dependencies/ImportMetaHotDeclineDependency":()=>R(15491),"dependencies/ImportMetaContextDependency":()=>R(14894),"dependencies/ProvidedDependency":()=>R(13996),"dependencies/PureExpressionDependency":()=>R(72926),"dependencies/RequireContextDependency":()=>R(30174),"dependencies/RequireEnsureDependenciesBlock":()=>R(45375),"dependencies/RequireEnsureDependency":()=>R(87182),"dependencies/RequireEnsureItemDependency":()=>R(33154),"dependencies/RequireHeaderDependency":()=>R(61820),"dependencies/RequireIncludeDependency":()=>R(90040),"dependencies/RequireIncludeDependencyParserPlugin":()=>R(98034),"dependencies/RequireResolveContextDependency":()=>R(99703),"dependencies/RequireResolveDependency":()=>R(57485),"dependencies/RequireResolveHeaderDependency":()=>R(2254),"dependencies/RuntimeRequirementsDependency":()=>R(12446),"dependencies/StaticExportsDependency":()=>R(19383),"dependencies/SystemPlugin":()=>R(90020),"dependencies/UnsupportedDependency":()=>R(42809),"dependencies/URLDependency":()=>R(71278),"dependencies/WebAssemblyExportImportedDependency":()=>R(76598),"dependencies/WebAssemblyImportDependency":()=>R(60718),"dependencies/WebpackIsIncludedDependency":()=>R(64111),"dependencies/WorkerDependency":()=>R(30598),"json/JsonData":()=>R(67927),"optimize/ConcatenatedModule":()=>R(4272),DelegatedModule:()=>R(18481),DependenciesBlock:()=>R(82618),DllModule:()=>R(28526),ExternalModule:()=>R(73096),FileSystemInfo:()=>R(67469),InitFragment:()=>R(64768),InvalidDependenciesModuleWarning:()=>R(7787),Module:()=>R(53840),ModuleBuildError:()=>R(12530),ModuleDependencyWarning:()=>R(76218),ModuleError:()=>R(74938),ModuleGraph:()=>R(13487),ModuleParseError:()=>R(30417),ModuleWarning:()=>R(49537),NormalModule:()=>R(89417),RawDataUrlModule:()=>R(66788),RawModule:()=>R(71133),"sharing/ConsumeSharedModule":()=>R(89683),"sharing/ConsumeSharedFallbackDependency":()=>R(64519),"sharing/ProvideSharedModule":()=>R(95148),"sharing/ProvideSharedDependency":()=>R(94140),"sharing/ProvideForSharedDependency":()=>R(98425),UnsupportedFeatureWarning:()=>R(17623),"util/LazySet":()=>R(96522),UnhandledSchemeError:()=>R(69898),NodeStuffInWebError:()=>R(75199),WebpackError:()=>R(27154),"util/registerExternalSerializer":()=>{}}},65764:function(v,E,R){"use strict";const{register:$}=R(7591);class ClassSerializer{constructor(v){this.Constructor=v}serialize(v,E){v.serialize(E)}deserialize(v){if(typeof this.Constructor.deserialize==="function"){return this.Constructor.deserialize(v)}const E=new this.Constructor;E.deserialize(v);return E}}v.exports=(v,E,R=null)=>{$(v,E,R,new ClassSerializer(v))}},61374:function(v){"use strict";const memoize=v=>{let E=false;let R=undefined;return()=>{if(E){return R}else{R=v();E=true;v=undefined;return R}}};v.exports=memoize},46849:function(v){"use strict";const E="a".charCodeAt(0);v.exports=(v,R)=>{if(R<1)return"";const $=v.slice(0,R);if($.match(/[^\d]/))return $;return`${String.fromCharCode(E+parseInt(v[0],10)%6)}${$.slice(1)}`}},49167:function(v){"use strict";const E=2147483648;const R=E-1;const $=4;const j=[0,0,0,0,0];const N=[3,7,17,19];v.exports=(v,q)=>{j.fill(0);for(let E=0;E>1}}if(q<=R){let v=0;for(let E=0;E<$;E++){v=(v+j[E])%q}return v}else{let v=0;let N=0;const G=Math.floor(q/E);for(let E=0;E<$;E+=2){v=v+j[E]&R}for(let v=1;v<$;v+=2){N=(N+j[v])%G}return(N*E+v)%q}}},64102:function(v){"use strict";const processAsyncTree=(v,E,R,$)=>{const j=Array.from(v);if(j.length===0)return $();let N=0;let q=false;let G=true;const push=v=>{j.push(v);if(!G&&N{N--;if(v&&!q){q=true;$(v);return}if(!G){G=true;process.nextTick(processQueue)}};const processQueue=()=>{if(q)return;while(N0){N++;const v=j.pop();R(v,push,processorCallback)}G=false;if(j.length===0&&N===0&&!q){q=true;$()}};processQueue()};v.exports=processAsyncTree},67603:function(v){"use strict";const E=/^[_a-zA-Z$][_a-zA-Z$0-9]*$/;const R=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","enum","implements","interface","let","package","private","protected","public","static","yield","yield","await","null","true","false"]);const propertyAccess=(v,$=0)=>{let j="";for(let N=$;N{let $;let j;if(R){({dependOn:$,runtime:j}=R)}else{const R=v.entries.get(E);if(!R)return E;({dependOn:$,runtime:j}=R.options)}if($){let R=undefined;const j=new Set($);for(const E of j){const $=v.entries.get(E);if(!$)continue;const{dependOn:N,runtime:q}=$.options;if(N){for(const v of N){j.add(v)}}else{R=mergeRuntimeOwned(R,q||E)}}return R||E}else{return j||E}};E.forEachRuntime=(v,E,R=false)=>{if(v===undefined){E(undefined)}else if(typeof v==="string"){E(v)}else{if(R)v.sort();for(const R of v){E(R)}}};const getRuntimesKey=v=>{v.sort();return Array.from(v).join("\n")};const getRuntimeKey=v=>{if(v===undefined)return"*";if(typeof v==="string")return v;return v.getFromUnorderedCache(getRuntimesKey)};E.getRuntimeKey=getRuntimeKey;const keyToRuntime=v=>{if(v==="*")return undefined;const E=v.split("\n");if(E.length===1)return E[0];return new $(E)};E.keyToRuntime=keyToRuntime;const getRuntimesString=v=>{v.sort();return Array.from(v).join("+")};const runtimeToString=v=>{if(v===undefined)return"*";if(typeof v==="string")return v;return v.getFromUnorderedCache(getRuntimesString)};E.runtimeToString=runtimeToString;E.runtimeConditionToString=v=>{if(v===true)return"true";if(v===false)return"false";return runtimeToString(v)};const runtimeEqual=(v,E)=>{if(v===E){return true}else if(v===undefined||E===undefined||typeof v==="string"||typeof E==="string"){return false}else if(v.size!==E.size){return false}else{v.sort();E.sort();const R=v[Symbol.iterator]();const $=E[Symbol.iterator]();for(;;){const v=R.next();if(v.done)return true;const E=$.next();if(v.value!==E.value)return false}}};E.runtimeEqual=runtimeEqual;E.compareRuntime=(v,E)=>{if(v===E){return 0}else if(v===undefined){return-1}else if(E===undefined){return 1}else{const R=getRuntimeKey(v);const $=getRuntimeKey(E);if(R<$)return-1;if(R>$)return 1;return 0}};const mergeRuntime=(v,E)=>{if(v===undefined){return E}else if(E===undefined){return v}else if(v===E){return v}else if(typeof v==="string"){if(typeof E==="string"){const R=new $;R.add(v);R.add(E);return R}else if(E.has(v)){return E}else{const R=new $(E);R.add(v);return R}}else{if(typeof E==="string"){if(v.has(E))return v;const R=new $(v);R.add(E);return R}else{const R=new $(v);for(const v of E)R.add(v);if(R.size===v.size)return v;return R}}};E.mergeRuntime=mergeRuntime;E.mergeRuntimeCondition=(v,E,R)=>{if(v===false)return E;if(E===false)return v;if(v===true||E===true)return true;const $=mergeRuntime(v,E);if($===undefined)return undefined;if(typeof $==="string"){if(typeof R==="string"&&$===R)return true;return $}if(typeof R==="string"||R===undefined)return $;if($.size===R.size)return true;return $};E.mergeRuntimeConditionNonFalse=(v,E,R)=>{if(v===true||E===true)return true;const $=mergeRuntime(v,E);if($===undefined)return undefined;if(typeof $==="string"){if(typeof R==="string"&&$===R)return true;return $}if(typeof R==="string"||R===undefined)return $;if($.size===R.size)return true;return $};const mergeRuntimeOwned=(v,E)=>{if(E===undefined){return v}else if(v===E){return v}else if(v===undefined){if(typeof E==="string"){return E}else{return new $(E)}}else if(typeof v==="string"){if(typeof E==="string"){const R=new $;R.add(v);R.add(E);return R}else{const R=new $(E);R.add(v);return R}}else{if(typeof E==="string"){v.add(E);return v}else{for(const R of E)v.add(R);return v}}};E.mergeRuntimeOwned=mergeRuntimeOwned;E.intersectRuntime=(v,E)=>{if(v===undefined){return E}else if(E===undefined){return v}else if(v===E){return v}else if(typeof v==="string"){if(typeof E==="string"){return undefined}else if(E.has(v)){return v}else{return undefined}}else{if(typeof E==="string"){if(v.has(E))return E;return undefined}else{const R=new $;for(const $ of E){if(v.has($))R.add($)}if(R.size===0)return undefined;if(R.size===1)for(const v of R)return v;return R}}};const subtractRuntime=(v,E)=>{if(v===undefined){return undefined}else if(E===undefined){return v}else if(v===E){return undefined}else if(typeof v==="string"){if(typeof E==="string"){return v}else if(E.has(v)){return undefined}else{return v}}else{if(typeof E==="string"){if(!v.has(E))return v;if(v.size===2){for(const R of v){if(R!==E)return R}}const R=new $(v);R.delete(E)}else{const R=new $;for(const $ of v){if(!E.has($))R.add($)}if(R.size===0)return undefined;if(R.size===1)for(const v of R)return v;return R}}};E.subtractRuntime=subtractRuntime;E.subtractRuntimeCondition=(v,E,R)=>{if(E===true)return false;if(E===false)return v;if(v===false)return false;const $=subtractRuntime(v===true?R:v,E);return $===undefined?false:$};E.filterRuntime=(v,E)=>{if(v===undefined)return E(undefined);if(typeof v==="string")return E(v);let R=false;let $=true;let j=undefined;for(const N of v){const v=E(N);if(v){R=true;j=mergeRuntimeOwned(j,N)}else{$=false}}if(!R)return false;if($)return true;return j};class RuntimeSpecMap{constructor(v){this._mode=v?v._mode:0;this._singleRuntime=v?v._singleRuntime:undefined;this._singleValue=v?v._singleValue:undefined;this._map=v&&v._map?new Map(v._map):undefined}get(v){switch(this._mode){case 0:return undefined;case 1:return runtimeEqual(this._singleRuntime,v)?this._singleValue:undefined;default:return this._map.get(getRuntimeKey(v))}}has(v){switch(this._mode){case 0:return false;case 1:return runtimeEqual(this._singleRuntime,v);default:return this._map.has(getRuntimeKey(v))}}set(v,E){switch(this._mode){case 0:this._mode=1;this._singleRuntime=v;this._singleValue=E;break;case 1:if(runtimeEqual(this._singleRuntime,v)){this._singleValue=E;break}this._mode=2;this._map=new Map;this._map.set(getRuntimeKey(this._singleRuntime),this._singleValue);this._singleRuntime=undefined;this._singleValue=undefined;default:this._map.set(getRuntimeKey(v),E)}}provide(v,E){switch(this._mode){case 0:this._mode=1;this._singleRuntime=v;return this._singleValue=E();case 1:{if(runtimeEqual(this._singleRuntime,v)){return this._singleValue}this._mode=2;this._map=new Map;this._map.set(getRuntimeKey(this._singleRuntime),this._singleValue);this._singleRuntime=undefined;this._singleValue=undefined;const R=E();this._map.set(getRuntimeKey(v),R);return R}default:{const R=getRuntimeKey(v);const $=this._map.get(R);if($!==undefined)return $;const j=E();this._map.set(R,j);return j}}}delete(v){switch(this._mode){case 0:return;case 1:if(runtimeEqual(this._singleRuntime,v)){this._mode=0;this._singleRuntime=undefined;this._singleValue=undefined}return;default:this._map.delete(getRuntimeKey(v))}}update(v,E){switch(this._mode){case 0:throw new Error("runtime passed to update must exist");case 1:{if(runtimeEqual(this._singleRuntime,v)){this._singleValue=E(this._singleValue);break}const R=E(undefined);if(R!==undefined){this._mode=2;this._map=new Map;this._map.set(getRuntimeKey(this._singleRuntime),this._singleValue);this._singleRuntime=undefined;this._singleValue=undefined;this._map.set(getRuntimeKey(v),R)}break}default:{const R=getRuntimeKey(v);const $=this._map.get(R);const j=E($);if(j!==$)this._map.set(R,j)}}}keys(){switch(this._mode){case 0:return[];case 1:return[this._singleRuntime];default:return Array.from(this._map.keys(),keyToRuntime)}}values(){switch(this._mode){case 0:return[][Symbol.iterator]();case 1:return[this._singleValue][Symbol.iterator]();default:return this._map.values()}}get size(){if(this._mode<=1)return this._mode;return this._map.size}}E.RuntimeSpecMap=RuntimeSpecMap;class RuntimeSpecSet{constructor(v){this._map=new Map;if(v){for(const E of v){this.add(E)}}}add(v){this._map.set(getRuntimeKey(v),v)}has(v){return this._map.has(getRuntimeKey(v))}[Symbol.iterator](){return this._map.values()}get size(){return this._map.size}}E.RuntimeSpecSet=RuntimeSpecSet},27773:function(v,E){"use strict";const parseVersion=v=>{var splitAndConvert=function(v){return v.split(".").map((function(v){return+v==v?+v:v}))};var E=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(v);var R=E[1]?splitAndConvert(E[1]):[];if(E[2]){R.length++;R.push.apply(R,splitAndConvert(E[2]))}if(E[3]){R.push([]);R.push.apply(R,splitAndConvert(E[3]))}return R};E.parseVersion=parseVersion;const versionLt=(v,E)=>{v=parseVersion(v);E=parseVersion(E);var R=0;for(;;){if(R>=v.length)return R=E.length)return j=="u";var N=E[R];var q=(typeof N)[0];if(j==q){if(j!="o"&&j!="u"&&$!=N){return ${const splitAndConvert=v=>v.split(".").map((v=>v!=="NaN"&&`${+v}`===v?+v:v));const parsePartial=v=>{const E=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(v);const R=E[1]?[0,...splitAndConvert(E[1])]:[0];if(E[2]){R.length++;R.push.apply(R,splitAndConvert(E[2]))}let $=R[R.length-1];while(R.length&&($===undefined||/^[*xX]$/.test($))){R.pop();$=R[R.length-1]}return R};const toFixed=v=>{if(v.length===1){return[0]}else if(v.length===2){return[1,...v.slice(1)]}else if(v.length===3){return[2,...v.slice(1)]}else{return[v.length,...v.slice(1)]}};const negate=v=>[-v[0]-1,...v.slice(1)];const parseSimple=v=>{const E=/^(\^|~|<=|<|>=|>|=|v|!)/.exec(v);const R=E?E[0]:"";const $=parsePartial(R.length?v.slice(R.length).trim():v.trim());switch(R){case"^":if($.length>1&&$[1]===0){if($.length>2&&$[2]===0){return[3,...$.slice(1)]}return[2,...$.slice(1)]}return[1,...$.slice(1)];case"~":return[2,...$.slice(1)];case">=":return $;case"=":case"v":case"":return toFixed($);case"<":return negate($);case">":{const v=toFixed($);return[,v,0,$,2]}case"<=":return[,toFixed($),negate($),1];case"!":{const v=toFixed($);return[,v,0]}default:throw new Error("Unexpected start value")}};const combine=(v,E)=>{if(v.length===1)return v[0];const R=[];for(const E of v.slice().reverse()){if(0 in E){R.push(E)}else{R.push(...E.slice(1))}}return[,...R,...v.slice(1).map((()=>E))]};const parseRange=v=>{const E=v.split(/\s+-\s+/);if(E.length===1){const E=v.trim().split(/(?<=[-0-9A-Za-z])\s+/g).map(parseSimple);return combine(E,2)}const R=parsePartial(E[0]);const $=parsePartial(E[1]);return[,toFixed($),negate($),1,R,2]};const parseLogicalOr=v=>{const E=v.split(/\s*\|\|\s*/).map(parseRange);return combine(E,1)};return parseLogicalOr(v)};const rangeToString=v=>{var E=v[0];var R="";if(v.length===1){return"*"}else if(E+.5){R+=E==0?">=":E==-1?"<":E==1?"^":E==2?"~":E>0?"=":"!=";var $=1;for(var j=1;j0?".":"")+($=2,N)}return R}else{var G=[];for(var j=1;j{if(0 in v){E=parseVersion(E);var R=v[0];var $=R<0;if($)R=-R-1;for(var j=0,N=1,q=true;;N++,j++){var G=N=E.length||(ie=E[j],(ae=(typeof ie)[0])=="o")){if(!q)return true;if(G=="u")return N>R&&!$;return G==""!=$}if(ae=="u"){if(!q||G!="u"){return false}}else if(q){if(G==ae){if(N<=R){if(ie!=v[N]){return false}}else{if($?ie>v[N]:ie{switch(typeof v){case"undefined":return"";case"object":if(Array.isArray(v)){let E="[";for(let R=0;R`var parseVersion = ${v.basicFunction("str",["// see webpack/lib/util/semver.js for original code",`var p=${v.supportsArrowFunction()?"p=>":"function(p)"}{return p.split(".").map((${v.supportsArrowFunction()?"p=>":"function(p)"}{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;`])}`;E.versionLtRuntimeCode=v=>`var versionLt = ${v.basicFunction("a, b",["// see webpack/lib/util/semver.js for original code",'a=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r=b.length)return"u"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return"o"==n&&"n"==f||("s"==f||"u"==n);if("o"!=n&&"u"!=n&&e!=t)return e`var rangeToString = ${v.basicFunction("range",["// see webpack/lib/util/semver.js for original code",'var r=range[0],n="";if(1===range.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var e=1,a=1;a0?".":"")+(e=2,t)}return n}var g=[];for(a=1;a`var satisfy = ${v.basicFunction("range, version",["// see webpack/lib/util/semver.js for original code",'if(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i=version.length||"o"==(s=(typeof(f=version[n]))[0]))return!a||("u"==g?i>e&&!r:""==g!=r);if("u"==s){if(!a||"u"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:fR(32490)));const N=$((()=>R(19066)));const q=$((()=>R(11625)));const G=$((()=>R(25347)));const ie=$((()=>R(51947)));const ae=$((()=>new(j())));const ce=$((()=>{R(35804);const v=R(6280);N().registerLoader(/^webpack\/lib\//,(E=>{const R=v[E.slice("webpack/lib/".length)];if(R){R()}else{console.warn(`${E} not found in internalSerializables`)}return true}))}));let le;v.exports={get register(){return N().register},get registerLoader(){return N().registerLoader},get registerNotSerializable(){return N().registerNotSerializable},get NOT_SERIALIZABLE(){return N().NOT_SERIALIZABLE},get MEASURE_START_OPERATION(){return j().MEASURE_START_OPERATION},get MEASURE_END_OPERATION(){return j().MEASURE_END_OPERATION},get buffersSerializer(){if(le!==undefined)return le;ce();const v=G();const E=ae();const R=ie();const $=q();return le=new v([new $,new(N())((v=>{if(v.write){v.writeLazy=$=>{v.write(R.createLazy($,E))}}}),"md4"),E])},createFileSerializer:(v,E)=>{ce();const $=G();const j=R(42404);const le=new j(v,E);const me=ae();const _e=ie();const Ie=q();return new $([new Ie,new(N())((v=>{if(v.write){v.writeLazy=E=>{v.write(_e.createLazy(E,me))};v.writeSeparate=(E,R)=>{const $=_e.createLazy(E,le,R);v.write($);return $}}}),E),me,le])}}},64726:function(v){"use strict";const smartGrouping=(v,E)=>{const R=new Set;const $=new Map;for(const j of v){const v=new Set;for(let R=0;R{const E=v.size;for(const E of v){for(const v of E.groups){if(v.alreadyGrouped)continue;const R=v.items;if(R===undefined){v.items=new Set([E])}else{R.add(E)}}}const R=new Map;for(const v of $.values()){if(v.items){const E=v.items;v.items=undefined;R.set(v,{items:E,options:undefined,used:false})}}const j=[];for(;;){let $=undefined;let N=-1;let q=undefined;let G=undefined;for(const[j,ie]of R){const{items:R,used:ae}=ie;let ce=ie.options;if(ce===undefined){const v=j.config;ie.options=ce=v.getOptions&&v.getOptions(j.name,Array.from(R,(({item:v})=>v)))||false}const le=ce&&ce.force;if(!le){if(G&&G.force)continue;if(ae)continue;if(R.size<=1||E-R.size<=1){continue}}const me=ce&&ce.targetGroupCount||4;let _e=le?R.size:Math.min(R.size,E*2/me+v.size-R.size);if(_e>N||le&&(!G||!G.force)){$=j;N=_e;q=R;G=ce}}if($===undefined){break}const ie=new Set(q);const ae=G;const ce=!ae||ae.groupChildren!==false;for(const E of ie){v.delete(E);for(const v of E.groups){const $=R.get(v);if($!==undefined){$.items.delete(E);if($.items.size===0){R.delete(v)}else{$.options=undefined;if(ce){$.used=true}}}}}R.delete($);const le=$.name;const me=$.config;const _e=Array.from(ie,(({item:v})=>v));$.alreadyGrouped=true;const Ie=ce?runGrouping(ie):_e;$.alreadyGrouped=false;j.push(me.createGroup(le,Ie,_e))}for(const{item:E}of v){j.push(E)}return j};return runGrouping(R)};v.exports=smartGrouping},22307:function(v,E){"use strict";const R=new WeakMap;const _isSourceEqual=(v,E)=>{let R=typeof v.buffer==="function"?v.buffer():v.source();let $=typeof E.buffer==="function"?E.buffer():E.source();if(R===$)return true;if(typeof R==="string"&&typeof $==="string")return false;if(!Buffer.isBuffer(R))R=Buffer.from(R,"utf-8");if(!Buffer.isBuffer($))$=Buffer.from($,"utf-8");return R.equals($)};const isSourceEqual=(v,E)=>{if(v===E)return true;const $=R.get(v);if($!==undefined){const v=$.get(E);if(v!==undefined)return v}const j=_isSourceEqual(v,E);if($!==undefined){$.set(E,j)}else{const $=new WeakMap;$.set(E,j);R.set(v,$)}const N=R.get(E);if(N!==undefined){N.set(v,j)}else{const $=new WeakMap;$.set(v,j);R.set(E,$)}return j};E.isSourceEqual=isSourceEqual},71732:function(v,E,R){"use strict";const{validate:$}=R(38476);const j={rules:"module.rules",loaders:"module.rules or module.rules.*.use",query:"module.rules.*.options (BREAKING CHANGE since webpack 5)",noParse:"module.noParse",filename:"output.filename or module.rules.*.generator.filename",file:"output.filename",chunkFilename:"output.chunkFilename",chunkfilename:"output.chunkFilename",ecmaVersion:"output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)",ecmaversion:"output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)",ecma:"output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)",path:"output.path",pathinfo:"output.pathinfo",pathInfo:"output.pathinfo",jsonpFunction:"output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)",chunkCallbackName:"output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)",jsonpScriptType:"output.scriptType (BREAKING CHANGE since webpack 5)",hotUpdateFunction:"output.hotUpdateGlobal (BREAKING CHANGE since webpack 5)",splitChunks:"optimization.splitChunks",immutablePaths:"snapshot.immutablePaths",managedPaths:"snapshot.managedPaths",maxModules:"stats.modulesSpace (BREAKING CHANGE since webpack 5)",hashedModuleIds:'optimization.moduleIds: "hashed" (BREAKING CHANGE since webpack 5)',namedChunks:'optimization.chunkIds: "named" (BREAKING CHANGE since webpack 5)',namedModules:'optimization.moduleIds: "named" (BREAKING CHANGE since webpack 5)',occurrenceOrder:'optimization.chunkIds: "size" and optimization.moduleIds: "size" (BREAKING CHANGE since webpack 5)',automaticNamePrefix:"optimization.splitChunks.[cacheGroups.*].idHint (BREAKING CHANGE since webpack 5)",noEmitOnErrors:"optimization.emitOnErrors (BREAKING CHANGE since webpack 5: logic is inverted to avoid negative flags)",Buffer:"to use the ProvidePlugin to process the Buffer variable to modules as polyfill\n"+"BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n"+"Note: if you are using 'node.Buffer: false', you can just remove that as this is the default behavior now.\n"+"To provide a polyfill to modules use:\n"+'new ProvidePlugin({ Buffer: ["buffer", "Buffer"] }) and npm install buffer.',process:"to use the ProvidePlugin to process the process variable to modules as polyfill\n"+"BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n"+"Note: if you are using 'node.process: false', you can just remove that as this is the default behavior now.\n"+"To provide a polyfill to modules use:\n"+'new ProvidePlugin({ process: "process" }) and npm install buffer.'};const N={concord:"BREAKING CHANGE: resolve.concord has been removed and is no longer available.",devtoolLineToLine:"BREAKING CHANGE: output.devtoolLineToLine has been removed and is no longer available."};const validateSchema=(v,E,R)=>{$(v,E,R||{name:"Webpack",postFormatter:(v,E)=>{const R=E.children;if(R&&R.some((v=>v.keyword==="absolutePath"&&v.dataPath===".output.filename"))){return`${v}\nPlease use output.path to specify absolute path and output.filename for the file name.`}if(R&&R.some((v=>v.keyword==="pattern"&&v.dataPath===".devtool"))){return`${v}\n`+"BREAKING CHANGE since webpack 5: The devtool option is more strict.\n"+"Please strictly follow the order of the keywords in the pattern."}if(E.keyword==="additionalProperties"){const R=E.params;if(Object.prototype.hasOwnProperty.call(j,R.additionalProperty)){return`${v}\nDid you mean ${j[R.additionalProperty]}?`}if(Object.prototype.hasOwnProperty.call(N,R.additionalProperty)){return`${v}\n${N[R.additionalProperty]}?`}if(!E.dataPath){if(R.additionalProperty==="debug"){return`${v}\n`+"The 'debug' property was removed in webpack 2.0.0.\n"+"Loaders should be updated to allow passing this option via loader options in module.rules.\n"+"Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n"+"plugins: [\n"+" new webpack.LoaderOptionsPlugin({\n"+" debug: true\n"+" })\n"+"]"}if(R.additionalProperty){return`${v}\n`+"For typos: please correct them.\n"+"For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.\n"+" Loaders should be updated to allow passing options via loader options in module.rules.\n"+" Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n"+" plugins: [\n"+" new webpack.LoaderOptionsPlugin({\n"+" // test: /\\.xxx$/, // may apply this only for some modules\n"+" options: {\n"+` ${R.additionalProperty}: …\n`+" }\n"+" })\n"+" ]"}}}return v}})};v.exports=validateSchema},12501:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);class AsyncWasmLoadingRuntimeModule extends j{constructor({generateLoadBinaryCode:v,supportsStreaming:E}){super("wasm loading",j.STAGE_NORMAL);this.generateLoadBinaryCode=v;this.supportsStreaming=E}generate(){const{compilation:v,chunk:E}=this;const{outputOptions:R,runtimeTemplate:j}=v;const q=$.instantiateWasm;const G=v.getPath(JSON.stringify(R.webassemblyModuleFilename),{hash:`" + ${$.getFullHash}() + "`,hashWithLength:v=>`" + ${$.getFullHash}}().slice(0, ${v}) + "`,module:{id:'" + wasmModuleId + "',hash:`" + wasmModuleHash + "`,hashWithLength(v){return`" + wasmModuleHash.slice(0, ${v}) + "`}},runtime:E.runtime});return`${q} = ${j.basicFunction("exports, wasmModuleId, wasmModuleHash, importsObj",[`var req = ${this.generateLoadBinaryCode(G)};`,this.supportsStreaming?N.asString(["if (typeof WebAssembly.instantiateStreaming === 'function') {",N.indent(["return WebAssembly.instantiateStreaming(req, importsObj)",N.indent([`.then(${j.returningFunction("Object.assign(exports, res.instance.exports)","res")});`])]),"}"]):"// no support for streaming compilation","return req",N.indent([`.then(${j.returningFunction("x.arrayBuffer()","x")})`,`.then(${j.returningFunction("WebAssembly.instantiate(bytes, importsObj)","bytes")})`,`.then(${j.returningFunction("Object.assign(exports, res.instance.exports)","res")});`])])};`}}v.exports=AsyncWasmLoadingRuntimeModule},75903:function(v,E,R){"use strict";const $=R(97152);const j=new Set(["webassembly"]);class AsyncWebAssemblyGenerator extends ${constructor(v){super();this.options=v}getTypes(v){return j}getSize(v,E){const R=v.originalSource();if(!R){return 0}return R.size()}generate(v,E){return v.originalSource()}}v.exports=AsyncWebAssemblyGenerator},55554:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(97152);const N=R(64768);const q=R(39201);const G=R(43841);const ie=R(60718);const ae=new Set(["webassembly"]);class AsyncWebAssemblyJavascriptGenerator extends j{constructor(v){super();this.filenameTemplate=v}getTypes(v){return ae}getSize(v,E){return 40+v.dependencies.length*10}generate(v,E){const{runtimeTemplate:R,chunkGraph:j,moduleGraph:ae,runtimeRequirements:ce,runtime:le}=E;ce.add(q.module);ce.add(q.moduleId);ce.add(q.exports);ce.add(q.instantiateWasm);const me=[];const _e=new Map;const Ie=new Map;for(const E of v.dependencies){if(E instanceof ie){const v=ae.getModule(E);if(!_e.has(v)){_e.set(v,{request:E.request,importVar:`WEBPACK_IMPORTED_MODULE_${_e.size}`})}let R=Ie.get(E.request);if(R===undefined){R=[];Ie.set(E.request,R)}R.push(E)}}const Me=[];const Oe=Array.from(_e,(([E,{request:$,importVar:N}])=>{if(ae.isAsync(E)){Me.push(N)}return R.importStatement({update:false,module:E,chunkGraph:j,request:$,originModule:v,importVar:N,runtimeRequirements:ce})}));const Te=Oe.map((([v])=>v)).join("");const Ne=Oe.map((([v,E])=>E)).join("");const Be=Array.from(Ie,(([E,$])=>{const j=$.map(($=>{const j=ae.getModule($);const N=_e.get(j).importVar;return`${JSON.stringify($.name)}: ${R.exportFromImport({moduleGraph:ae,module:j,request:E,exportName:$.name,originModule:v,asiSafe:true,isCall:false,callContext:false,defaultInterop:true,importVar:N,initFragments:me,runtime:le,runtimeRequirements:ce})}`}));return G.asString([`${JSON.stringify(E)}: {`,G.indent(j.join(",\n")),"}"])}));const Le=Be.length>0?G.asString(["{",G.indent(Be.join(",\n")),"}"]):undefined;const qe=`${q.instantiateWasm}(${v.exportsArgument}, ${v.moduleArgument}.id, ${JSON.stringify(j.getRenderedModuleHash(v,le))}`+(Le?`, ${Le})`:`)`);if(Me.length>0)ce.add(q.asyncModule);const Ue=new $(Me.length>0?G.asString([`var __webpack_instantiate__ = ${R.basicFunction(`[${Me.join(", ")}]`,`${Ne}return ${qe};`)}`,`${q.asyncModule}(${v.moduleArgument}, async ${R.basicFunction("__webpack_handle_async_dependencies__, __webpack_async_result__",["try {",Te,`var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([${Me.join(", ")}]);`,`var [${Me.join(", ")}] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__;`,`${Ne}await ${qe};`,"__webpack_async_result__();","} catch(e) { __webpack_async_result__(e); }"])}, 1);`]):`${Te}${Ne}module.exports = ${qe};`);return N.addToSource(Ue,me,E)}}v.exports=AsyncWebAssemblyJavascriptGenerator},24979:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73002);const N=R(97152);const{tryRunOrWebpackError:q}=R(35230);const G=R(60718);const{compareModulesByIdentifier:ie}=R(58792);const ae=R(61374);const ce=ae((()=>R(75903)));const le=ae((()=>R(55554)));const me=ae((()=>R(15336)));const _e=new WeakMap;class AsyncWebAssemblyModulesPlugin{static getCompilationHooks(v){if(!(v instanceof j)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=_e.get(v);if(E===undefined){E={renderModuleContent:new $(["source","module","renderContext"])};_e.set(v,E)}return E}constructor(v){this.options=v}apply(v){v.hooks.compilation.tap("AsyncWebAssemblyModulesPlugin",((v,{normalModuleFactory:E})=>{const R=AsyncWebAssemblyModulesPlugin.getCompilationHooks(v);v.dependencyFactories.set(G,E);E.hooks.createParser.for("webassembly/async").tap("AsyncWebAssemblyModulesPlugin",(()=>{const v=me();return new v}));E.hooks.createGenerator.for("webassembly/async").tap("AsyncWebAssemblyModulesPlugin",(()=>{const E=le();const R=ce();return N.byType({javascript:new E(v.outputOptions.webassemblyModuleFilename),webassembly:new R(this.options)})}));v.hooks.renderManifest.tap("WebAssemblyModulesPlugin",((E,$)=>{const{moduleGraph:j,chunkGraph:N,runtimeTemplate:q}=v;const{chunk:G,outputOptions:ae,dependencyTemplates:ce,codeGenerationResults:le}=$;for(const v of N.getOrderedChunkModulesIterable(G,ie)){if(v.type==="webassembly/async"){const $=ae.webassemblyModuleFilename;E.push({render:()=>this.renderModule(v,{chunk:G,dependencyTemplates:ce,runtimeTemplate:q,moduleGraph:j,chunkGraph:N,codeGenerationResults:le},R),filenameTemplate:$,pathOptions:{module:v,runtime:G.runtime,chunkGraph:N},auxiliary:true,identifier:`webassemblyAsyncModule${N.getModuleId(v)}`,hash:N.getModuleHash(v,G.runtime)})}}return E}))}))}renderModule(v,E,R){const{codeGenerationResults:$,chunk:j}=E;try{const N=$.getSource(v,j.runtime,"webassembly");return q((()=>R.renderModuleContent.call(N,v,E)),"AsyncWebAssemblyModulesPlugin.getCompilationHooks().renderModuleContent")}catch(E){E.module=v;throw E}}}v.exports=AsyncWebAssemblyModulesPlugin},15336:function(v,E,R){"use strict";const $=R(44977);const{decode:j}=R(41786);const N=R(68646);const q=R(19383);const G=R(60718);const ie={ignoreCodeSection:true,ignoreDataSection:true,ignoreCustomNameSection:true};class WebAssemblyParser extends N{constructor(v){super();this.hooks=Object.freeze({});this.options=v}parse(v,E){if(!Buffer.isBuffer(v)){throw new Error("WebAssemblyParser input must be a Buffer")}E.module.buildInfo.strict=true;E.module.buildMeta.exportsType="namespace";E.module.buildMeta.async=true;const R=j(v,ie);const N=R.body[0];const ae=[];$.traverse(N,{ModuleExport({node:v}){ae.push(v.name)},ModuleImport({node:v}){const R=new G(v.module,v.name,v.descr,false);E.module.addDependency(R)}});E.module.addDependency(new q(ae,false));return E}}v.exports=WebAssemblyParser},69889:function(v,E,R){"use strict";const $=R(27154);v.exports=class UnsupportedWebAssemblyFeatureError extends ${constructor(v){super(v);this.name="UnsupportedWebAssemblyFeatureError";this.hideStack=true}}},16671:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{compareModulesByIdentifier:q}=R(58792);const G=R(92050);const getAllWasmModules=(v,E,R)=>{const $=R.getAllAsyncChunks();const j=[];for(const v of $){for(const R of E.getOrderedChunkModulesIterable(v,q)){if(R.type.startsWith("webassembly")){j.push(R)}}}return j};const generateImportObject=(v,E,R,j,q)=>{const ie=v.moduleGraph;const ae=new Map;const ce=[];const le=G.getUsedDependencies(ie,E,R);for(const E of le){const R=E.dependency;const G=ie.getModule(R);const le=R.name;const me=G&&ie.getExportsInfo(G).getUsedName(le,q);const _e=R.description;const Ie=R.onlyDirectImport;const Me=E.module;const Oe=E.name;if(Ie){const E=`m${ae.size}`;ae.set(E,v.getModuleId(G));ce.push({module:Me,name:Oe,value:`${E}[${JSON.stringify(me)}]`})}else{const E=_e.signature.params.map(((v,E)=>"p"+E+v.valtype));const R=`${$.moduleCache}[${JSON.stringify(v.getModuleId(G))}]`;const q=`${R}.exports`;const ie=`wasmImportedFuncCache${j.length}`;j.push(`var ${ie};`);ce.push({module:Me,name:Oe,value:N.asString([(G.type.startsWith("webassembly")?`${R} ? ${q}[${JSON.stringify(me)}] : `:"")+`function(${E}) {`,N.indent([`if(${ie} === undefined) ${ie} = ${q};`,`return ${ie}[${JSON.stringify(me)}](${E});`]),"}"])})}}let me;if(R){me=["return {",N.indent([ce.map((v=>`${JSON.stringify(v.name)}: ${v.value}`)).join(",\n")]),"};"]}else{const v=new Map;for(const E of ce){let R=v.get(E.module);if(R===undefined){v.set(E.module,R=[])}R.push(E)}me=["return {",N.indent([Array.from(v,(([v,E])=>N.asString([`${JSON.stringify(v)}: {`,N.indent([E.map((v=>`${JSON.stringify(v.name)}: ${v.value}`)).join(",\n")]),"}"]))).join(",\n")]),"};"]}const _e=JSON.stringify(v.getModuleId(E));if(ae.size===1){const v=Array.from(ae.values())[0];const E=`installedWasmModules[${JSON.stringify(v)}]`;const R=Array.from(ae.keys())[0];return N.asString([`${_e}: function() {`,N.indent([`return promiseResolve().then(function() { return ${E}; }).then(function(${R}) {`,N.indent(me),"});"]),"},"])}else if(ae.size>0){const v=Array.from(ae.values(),(v=>`installedWasmModules[${JSON.stringify(v)}]`)).join(", ");const E=Array.from(ae.keys(),((v,E)=>`${v} = array[${E}]`)).join(", ");return N.asString([`${_e}: function() {`,N.indent([`return promiseResolve().then(function() { return Promise.all([${v}]); }).then(function(array) {`,N.indent([`var ${E};`,...me]),"});"]),"},"])}else{return N.asString([`${_e}: function() {`,N.indent(me),"},"])}};class WasmChunkLoadingRuntimeModule extends j{constructor({generateLoadBinaryCode:v,supportsStreaming:E,mangleImports:R,runtimeRequirements:$}){super("wasm chunk loading",j.STAGE_ATTACH);this.generateLoadBinaryCode=v;this.supportsStreaming=E;this.mangleImports=R;this._runtimeRequirements=$}generate(){const{chunkGraph:v,compilation:E,chunk:R,mangleImports:j}=this;const{moduleGraph:q,outputOptions:ie}=E;const ae=$.ensureChunkHandlers;const ce=this._runtimeRequirements.has($.hmrDownloadUpdateHandlers);const le=getAllWasmModules(q,v,R);const me=[];const _e=le.map((E=>generateImportObject(v,E,this.mangleImports,me,R.runtime)));const Ie=v.getChunkModuleIdMap(R,(v=>v.type.startsWith("webassembly")));const createImportObject=v=>j?`{ ${JSON.stringify(G.MANGLED_MODULE)}: ${v} }`:v;const Me=E.getPath(JSON.stringify(ie.webassemblyModuleFilename),{hash:`" + ${$.getFullHash}() + "`,hashWithLength:v=>`" + ${$.getFullHash}}().slice(0, ${v}) + "`,module:{id:'" + wasmModuleId + "',hash:`" + ${JSON.stringify(v.getChunkModuleRenderedHashMap(R,(v=>v.type.startsWith("webassembly"))))}[chunkId][wasmModuleId] + "`,hashWithLength(E){return`" + ${JSON.stringify(v.getChunkModuleRenderedHashMap(R,(v=>v.type.startsWith("webassembly")),E))}[chunkId][wasmModuleId] + "`}},runtime:R.runtime});const Oe=ce?`${$.hmrRuntimeStatePrefix}_wasm`:undefined;return N.asString(["// object to store loaded and loading wasm modules",`var installedWasmModules = ${Oe?`${Oe} = ${Oe} || `:""}{};`,"","function promiseResolve() { return Promise.resolve(); }","",N.asString(me),"var wasmImportObjects = {",N.indent(_e),"};","",`var wasmModuleMap = ${JSON.stringify(Ie,undefined,"\t")};`,"","// object with all WebAssembly.instance exports",`${$.wasmInstances} = {};`,"","// Fetch + compile chunk loading for webassembly",`${ae}.wasm = function(chunkId, promises) {`,N.indent(["",`var wasmModules = wasmModuleMap[chunkId] || [];`,"","wasmModules.forEach(function(wasmModuleId, idx) {",N.indent(["var installedWasmModuleData = installedWasmModules[wasmModuleId];","",'// a Promise means "currently loading" or "already loaded".',"if(installedWasmModuleData)",N.indent(["promises.push(installedWasmModuleData);"]),"else {",N.indent([`var importObject = wasmImportObjects[wasmModuleId]();`,`var req = ${this.generateLoadBinaryCode(Me)};`,"var promise;",this.supportsStreaming?N.asString(["if(importObject && typeof importObject.then === 'function' && typeof WebAssembly.compileStreaming === 'function') {",N.indent(["promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {",N.indent([`return WebAssembly.instantiate(items[0], ${createImportObject("items[1]")});`]),"});"]),"} else if(typeof WebAssembly.instantiateStreaming === 'function') {",N.indent([`promise = WebAssembly.instantiateStreaming(req, ${createImportObject("importObject")});`])]):N.asString(["if(importObject && typeof importObject.then === 'function') {",N.indent(["var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });","promise = Promise.all([",N.indent(["bytesPromise.then(function(bytes) { return WebAssembly.compile(bytes); }),","importObject"]),"]).then(function(items) {",N.indent([`return WebAssembly.instantiate(items[0], ${createImportObject("items[1]")});`]),"});"])]),"} else {",N.indent(["var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });","promise = bytesPromise.then(function(bytes) {",N.indent([`return WebAssembly.instantiate(bytes, ${createImportObject("importObject")});`]),"});"]),"}","promises.push(installedWasmModules[wasmModuleId] = promise.then(function(res) {",N.indent([`return ${$.wasmInstances}[wasmModuleId] = (res.instance || res).exports;`]),"}));"]),"}"]),"});"]),"};"])}}v.exports=WasmChunkLoadingRuntimeModule},15578:function(v,E,R){"use strict";const $=R(24014);const j=R(69889);class WasmFinalizeExportsPlugin{apply(v){v.hooks.compilation.tap("WasmFinalizeExportsPlugin",(v=>{v.hooks.finishModules.tap("WasmFinalizeExportsPlugin",(E=>{for(const R of E){if(R.type.startsWith("webassembly")===true){const E=R.buildMeta.jsIncompatibleExports;if(E===undefined){continue}for(const N of v.moduleGraph.getIncomingConnections(R)){if(N.isTargetActive(undefined)&&N.originModule.type.startsWith("webassembly")===false){const q=v.getDependencyReferencedExports(N.dependency,undefined);for(const G of q){const q=Array.isArray(G)?G:G.name;if(q.length===0)continue;const ie=q[0];if(typeof ie==="object")continue;if(Object.prototype.hasOwnProperty.call(E,ie)){const q=new j(`Export "${ie}" with ${E[ie]} can only be used for direct wasm to wasm dependencies\n`+`It's used from ${N.originModule.readableIdentifier(v.requestShortener)} at ${$(N.dependency.loc)}.`);q.module=R;v.errors.push(q)}}}}}}}))}))}}v.exports=WasmFinalizeExportsPlugin},16415:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const j=R(97152);const N=R(92050);const q=R(44977);const{moduleContextFromModuleAST:G}=R(44977);const{editWithAST:ie,addWithAST:ae}=R(17696);const{decode:ce}=R(41786);const le=R(76598);const compose=(...v)=>v.reduce(((v,E)=>R=>E(v(R))),(v=>v));const removeStartFunc=v=>E=>ie(v.ast,E,{Start(v){v.remove()}});const getImportedGlobals=v=>{const E=[];q.traverse(v,{ModuleImport({node:v}){if(q.isGlobalType(v.descr)){E.push(v)}}});return E};const getCountImportedFunc=v=>{let E=0;q.traverse(v,{ModuleImport({node:v}){if(q.isFuncImportDescr(v.descr)){E++}}});return E};const getNextTypeIndex=v=>{const E=q.getSectionMetadata(v,"type");if(E===undefined){return q.indexLiteral(0)}return q.indexLiteral(E.vectorOfSize.value)};const getNextFuncIndex=(v,E)=>{const R=q.getSectionMetadata(v,"func");if(R===undefined){return q.indexLiteral(0+E)}const $=R.vectorOfSize.value;return q.indexLiteral($+E)};const createDefaultInitForGlobal=v=>{if(v.valtype[0]==="i"){return q.objectInstruction("const",v.valtype,[q.numberLiteralFromRaw(66)])}else if(v.valtype[0]==="f"){return q.objectInstruction("const",v.valtype,[q.floatLiteral(66,false,false,"66")])}else{throw new Error("unknown type: "+v.valtype)}};const rewriteImportedGlobals=v=>E=>{const R=v.additionalInitCode;const $=[];E=ie(v.ast,E,{ModuleImport(v){if(q.isGlobalType(v.node.descr)){const E=v.node.descr;E.mutability="var";const R=[createDefaultInitForGlobal(E),q.instruction("end")];$.push(q.global(E,R));v.remove()}},Global(v){const{node:E}=v;const[j]=E.init;if(j.id==="get_global"){E.globalType.mutability="var";const v=j.args[0];E.init=[createDefaultInitForGlobal(E.globalType),q.instruction("end")];R.push(q.instruction("get_local",[v]),q.instruction("set_global",[q.indexLiteral($.length)]))}$.push(E);v.remove()}});return ae(v.ast,E,$)};const rewriteExportNames=({ast:v,moduleGraph:E,module:R,externalExports:$,runtime:j})=>N=>ie(v,N,{ModuleExport(v){const N=$.has(v.node.name);if(N){v.remove();return}const q=E.getExportsInfo(R).getUsedName(v.node.name,j);if(!q){v.remove();return}v.node.name=q}});const rewriteImports=({ast:v,usedDependencyMap:E})=>R=>ie(v,R,{ModuleImport(v){const R=E.get(v.node.module+":"+v.node.name);if(R!==undefined){v.node.module=R.module;v.node.name=R.name}}});const addInitFunction=({ast:v,initFuncId:E,startAtFuncOffset:R,importedGlobals:$,additionalInitCode:j,nextFuncIndex:N,nextTypeIndex:G})=>ie=>{const ce=$.map((v=>{const E=q.identifier(`${v.module}.${v.name}`);return q.funcParam(v.descr.valtype,E)}));const le=[];$.forEach(((v,E)=>{const R=[q.indexLiteral(E)];const $=[q.instruction("get_local",R),q.instruction("set_global",R)];le.push(...$)}));if(typeof R==="number"){le.push(q.callInstruction(q.numberLiteralFromRaw(R)))}for(const v of j){le.push(v)}le.push(q.instruction("end"));const me=[];const _e=q.signature(ce,me);const Ie=q.func(E,_e,le);const Me=q.typeInstruction(undefined,_e);const Oe=q.indexInFuncSection(G);const Te=q.moduleExport(E.value,q.moduleExportDescr("Func",N));return ae(v,ie,[Ie,Te,Oe,Me])};const getUsedDependencyMap=(v,E,R)=>{const $=new Map;for(const j of N.getUsedDependencies(v,E,R)){const v=j.dependency;const E=v.request;const R=v.name;$.set(E+":"+R,j)}return $};const me=new Set(["webassembly"]);class WebAssemblyGenerator extends j{constructor(v){super();this.options=v}getTypes(v){return me}getSize(v,E){const R=v.originalSource();if(!R){return 0}return R.size()}generate(v,{moduleGraph:E,runtime:R}){const j=v.originalSource().source();const N=q.identifier("");const ie=ce(j,{ignoreDataSection:true,ignoreCodeSection:true,ignoreCustomNameSection:true});const ae=G(ie.body[0]);const me=getImportedGlobals(ie);const _e=getCountImportedFunc(ie);const Ie=ae.getStart();const Me=getNextFuncIndex(ie,_e);const Oe=getNextTypeIndex(ie);const Te=getUsedDependencyMap(E,v,this.options.mangleImports);const Ne=new Set(v.dependencies.filter((v=>v instanceof le)).map((v=>{const E=v;return E.exportName})));const Be=[];const Le=compose(rewriteExportNames({ast:ie,moduleGraph:E,module:v,externalExports:Ne,runtime:R}),removeStartFunc({ast:ie}),rewriteImportedGlobals({ast:ie,additionalInitCode:Be}),rewriteImports({ast:ie,usedDependencyMap:Te}),addInitFunction({ast:ie,initFuncId:N,importedGlobals:me,additionalInitCode:Be,startAtFuncOffset:Ie,nextFuncIndex:Me,nextTypeIndex:Oe}));const qe=Le(j);const Ue=Buffer.from(qe);return new $(Ue)}}v.exports=WebAssemblyGenerator},57650:function(v,E,R){"use strict";const $=R(27154);const getInitialModuleChains=(v,E,R,$)=>{const j=[{head:v,message:v.readableIdentifier($)}];const N=new Set;const q=new Set;const G=new Set;for(const v of j){const{head:ie,message:ae}=v;let ce=true;const le=new Set;for(const v of E.getIncomingConnections(ie)){const E=v.originModule;if(E){if(!R.getModuleChunks(E).some((v=>v.canBeInitial())))continue;ce=false;if(le.has(E))continue;le.add(E);const N=E.readableIdentifier($);const ie=v.explanation?` (${v.explanation})`:"";const me=`${N}${ie} --\x3e ${ae}`;if(G.has(E)){q.add(`... --\x3e ${me}`);continue}G.add(E);j.push({head:E,message:me})}else{ce=false;const E=v.explanation?`(${v.explanation}) --\x3e ${ae}`:ae;N.add(E)}}if(ce){N.add(ae)}}for(const v of q){N.add(v)}return Array.from(N)};v.exports=class WebAssemblyInInitialChunkError extends ${constructor(v,E,R,$){const j=getInitialModuleChains(v,E,R,$);const N=`WebAssembly module is included in initial chunk.\nThis is not allowed, because WebAssembly download and compilation must happen asynchronous.\nAdd an async split point (i. e. import()) somewhere between your entrypoint and the WebAssembly module:\n${j.map((v=>`* ${v}`)).join("\n")}`;super(N);this.name="WebAssemblyInInitialChunkError";this.hideStack=true;this.module=v}}},30640:function(v,E,R){"use strict";const{RawSource:$}=R(51255);const{UsageState:j}=R(13168);const N=R(97152);const q=R(64768);const G=R(39201);const ie=R(43841);const ae=R(99809);const ce=R(76598);const le=R(60718);const me=new Set(["webassembly"]);class WebAssemblyJavascriptGenerator extends N{getTypes(v){return me}getSize(v,E){return 95+v.dependencies.length*5}generate(v,E){const{runtimeTemplate:R,moduleGraph:N,chunkGraph:me,runtimeRequirements:_e,runtime:Ie}=E;const Me=[];const Oe=N.getExportsInfo(v);let Te=false;const Ne=new Map;const Be=[];let Le=0;for(const E of v.dependencies){const $=E&&E instanceof ae?E:undefined;if(N.getModule(E)){let j=Ne.get(N.getModule(E));if(j===undefined){Ne.set(N.getModule(E),j={importVar:`m${Le}`,index:Le,request:$&&$.userRequest||undefined,names:new Set,reexports:[]});Le++}if(E instanceof le){j.names.add(E.name);if(E.description.type==="GlobalType"){const $=E.name;const q=N.getModule(E);if(q){const G=N.getExportsInfo(q).getUsedName($,Ie);if(G){Be.push(R.exportFromImport({moduleGraph:N,module:q,request:E.request,importVar:j.importVar,originModule:v,exportName:E.name,asiSafe:true,isCall:false,callContext:null,defaultInterop:true,initFragments:Me,runtime:Ie,runtimeRequirements:_e}))}}}}if(E instanceof ce){j.names.add(E.name);const $=N.getExportsInfo(v).getUsedName(E.exportName,Ie);if($){_e.add(G.exports);const q=`${v.exportsArgument}[${JSON.stringify($)}]`;const ae=ie.asString([`${q} = ${R.exportFromImport({moduleGraph:N,module:N.getModule(E),request:E.request,importVar:j.importVar,originModule:v,exportName:E.name,asiSafe:true,isCall:false,callContext:null,defaultInterop:true,initFragments:Me,runtime:Ie,runtimeRequirements:_e})};`,`if(WebAssembly.Global) ${q} = `+`new WebAssembly.Global({ value: ${JSON.stringify(E.valueType)} }, ${q});`]);j.reexports.push(ae);Te=true}}}}const qe=ie.asString(Array.from(Ne,(([v,{importVar:E,request:$,reexports:j}])=>{const N=R.importStatement({module:v,chunkGraph:me,request:$,importVar:E,originModule:v,runtimeRequirements:_e});return N[0]+N[1]+j.join("\n")})));const Ue=Oe.otherExportsInfo.getUsed(Ie)===j.Unused&&!Te;_e.add(G.module);_e.add(G.moduleId);_e.add(G.wasmInstances);if(Oe.otherExportsInfo.getUsed(Ie)!==j.Unused){_e.add(G.makeNamespaceObject);_e.add(G.exports)}if(!Ue){_e.add(G.exports)}const Ge=new $(['"use strict";',"// Instantiate WebAssembly module",`var wasmExports = ${G.wasmInstances}[${v.moduleArgument}.id];`,Oe.otherExportsInfo.getUsed(Ie)!==j.Unused?`${G.makeNamespaceObject}(${v.exportsArgument});`:"","// export exports from WebAssembly module",Ue?`${v.moduleArgument}.exports = wasmExports;`:"for(var name in wasmExports) "+`if(name) `+`${v.exportsArgument}[name] = wasmExports[name];`,"// exec imports from WebAssembly module (for esm order)",qe,"","// exec wasm module",`wasmExports[""](${Be.join(", ")})`].join("\n"));return q.addToSource(Ge,Me,E)}}v.exports=WebAssemblyJavascriptGenerator},38372:function(v,E,R){"use strict";const $=R(97152);const j=R(76598);const N=R(60718);const{compareModulesByIdentifier:q}=R(58792);const G=R(61374);const ie=R(57650);const ae=G((()=>R(16415)));const ce=G((()=>R(30640)));const le=G((()=>R(93347)));class WebAssemblyModulesPlugin{constructor(v){this.options=v}apply(v){v.hooks.compilation.tap("WebAssemblyModulesPlugin",((v,{normalModuleFactory:E})=>{v.dependencyFactories.set(N,E);v.dependencyFactories.set(j,E);E.hooks.createParser.for("webassembly/sync").tap("WebAssemblyModulesPlugin",(()=>{const v=le();return new v}));E.hooks.createGenerator.for("webassembly/sync").tap("WebAssemblyModulesPlugin",(()=>{const v=ce();const E=ae();return $.byType({javascript:new v,webassembly:new E(this.options)})}));v.hooks.renderManifest.tap("WebAssemblyModulesPlugin",((E,R)=>{const{chunkGraph:$}=v;const{chunk:j,outputOptions:N,codeGenerationResults:G}=R;for(const v of $.getOrderedChunkModulesIterable(j,q)){if(v.type==="webassembly/sync"){const R=N.webassemblyModuleFilename;E.push({render:()=>G.getSource(v,j.runtime,"webassembly"),filenameTemplate:R,pathOptions:{module:v,runtime:j.runtime,chunkGraph:$},auxiliary:true,identifier:`webassemblyModule${$.getModuleId(v)}`,hash:$.getModuleHash(v,j.runtime)})}}return E}));v.hooks.afterChunks.tap("WebAssemblyModulesPlugin",(()=>{const E=v.chunkGraph;const R=new Set;for(const $ of v.chunks){if($.canBeInitial()){for(const v of E.getChunkModulesIterable($)){if(v.type==="webassembly/sync"){R.add(v)}}}}for(const E of R){v.errors.push(new ie(E,v.moduleGraph,v.chunkGraph,v.requestShortener))}}))}))}}v.exports=WebAssemblyModulesPlugin},93347:function(v,E,R){"use strict";const $=R(44977);const{moduleContextFromModuleAST:j}=R(44977);const{decode:N}=R(41786);const q=R(68646);const G=R(19383);const ie=R(76598);const ae=R(60718);const ce=new Set(["i32","f32","f64"]);const getJsIncompatibleType=v=>{for(const E of v.params){if(!ce.has(E.valtype)){return`${E.valtype} as parameter`}}for(const E of v.results){if(!ce.has(E))return`${E} as result`}return null};const getJsIncompatibleTypeOfFuncSignature=v=>{for(const E of v.args){if(!ce.has(E)){return`${E} as parameter`}}for(const E of v.result){if(!ce.has(E))return`${E} as result`}return null};const le={ignoreCodeSection:true,ignoreDataSection:true,ignoreCustomNameSection:true};class WebAssemblyParser extends q{constructor(v){super();this.hooks=Object.freeze({});this.options=v}parse(v,E){if(!Buffer.isBuffer(v)){throw new Error("WebAssemblyParser input must be a Buffer")}E.module.buildInfo.strict=true;E.module.buildMeta.exportsType="namespace";const R=N(v,le);const q=R.body[0];const me=j(q);const _e=[];let Ie=E.module.buildMeta.jsIncompatibleExports=undefined;const Me=[];$.traverse(q,{ModuleExport({node:v}){const R=v.descr;if(R.exportType==="Func"){const $=R.id.value;const j=me.getFunction($);const N=getJsIncompatibleTypeOfFuncSignature(j);if(N){if(Ie===undefined){Ie=E.module.buildMeta.jsIncompatibleExports={}}Ie[v.name]=N}}_e.push(v.name);if(v.descr&&v.descr.exportType==="Global"){const R=Me[v.descr.id.value];if(R){const $=new ie(v.name,R.module,R.name,R.descr.valtype);E.module.addDependency($)}}},Global({node:v}){const E=v.init[0];let R=null;if(E.id==="get_global"){const v=E.args[0].value;if(v{const q=[];let G=0;for(const ie of E.dependencies){if(ie instanceof j){if(ie.description.type==="GlobalType"||v.getModule(ie)===null){continue}const E=ie.name;if(R){q.push({dependency:ie,name:$.numberToIdentifier(G++),module:N})}else{q.push({dependency:ie,name:E,module:ie.request})}}}return q};E.getUsedDependencies=getUsedDependencies;E.MANGLED_MODULE=N},90115:function(v,E,R){"use strict";const $=new WeakMap;const getEnabledTypes=v=>{let E=$.get(v);if(E===undefined){E=new Set;$.set(v,E)}return E};class EnableWasmLoadingPlugin{constructor(v){this.type=v}static setEnabled(v,E){getEnabledTypes(v).add(E)}static checkEnabled(v,E){if(!getEnabledTypes(v).has(E)){throw new Error(`Library type "${E}" is not enabled. `+"EnableWasmLoadingPlugin need to be used to enable this type of wasm loading. "+'This usually happens through the "output.enabledWasmLoadingTypes" option. '+'If you are using a function as entry which sets "wasmLoading", you need to add all potential library types to "output.enabledWasmLoadingTypes". '+"These types are enabled: "+Array.from(getEnabledTypes(v)).join(", "))}}apply(v){const{type:E}=this;const $=getEnabledTypes(v);if($.has(E))return;$.add(E);if(typeof E==="string"){switch(E){case"fetch":{const E=R(70390);const $=R(90692);new E({mangleImports:v.options.optimization.mangleWasmImports}).apply(v);(new $).apply(v);break}case"async-node":{const $=R(29023);const j=R(63582);new $({mangleImports:v.options.optimization.mangleWasmImports}).apply(v);new j({type:E}).apply(v);break}case"async-node-module":{const $=R(63582);new $({type:E,import:true}).apply(v);break}case"universal":throw new Error("Universal WebAssembly Loading is not implemented yet");default:throw new Error(`Unsupported wasm loading type ${E}.\nPlugins which provide custom wasm loading types must call EnableWasmLoadingPlugin.setEnabled(compiler, type) to disable this error.`)}}else{}}}v.exports=EnableWasmLoadingPlugin},90692:function(v,E,R){"use strict";const $=R(39201);const j=R(12501);class FetchCompileAsyncWasmPlugin{apply(v){v.hooks.thisCompilation.tap("FetchCompileAsyncWasmPlugin",(v=>{const E=v.outputOptions.wasmLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.wasmLoading!==undefined?R.wasmLoading:E;return $==="fetch"};const generateLoadBinaryCode=v=>`fetch(${$.publicPath} + ${v})`;v.hooks.runtimeRequirementInTree.for($.instantiateWasm).tap("FetchCompileAsyncWasmPlugin",((E,R)=>{if(!isEnabledForChunk(E))return;const N=v.chunkGraph;if(!N.hasModuleInGraph(E,(v=>v.type==="webassembly/async"))){return}R.add($.publicPath);v.addRuntimeModule(E,new j({generateLoadBinaryCode:generateLoadBinaryCode,supportsStreaming:true}))}))}))}}v.exports=FetchCompileAsyncWasmPlugin},70390:function(v,E,R){"use strict";const $=R(39201);const j=R(16671);class FetchCompileWasmPlugin{constructor(v){this.options=v||{}}apply(v){v.hooks.thisCompilation.tap("FetchCompileWasmPlugin",(v=>{const E=v.outputOptions.wasmLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.wasmLoading!==undefined?R.wasmLoading:E;return $==="fetch"};const generateLoadBinaryCode=v=>`fetch(${$.publicPath} + ${v})`;v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("FetchCompileWasmPlugin",((E,R)=>{if(!isEnabledForChunk(E))return;const N=v.chunkGraph;if(!N.hasModuleInGraph(E,(v=>v.type==="webassembly/sync"))){return}R.add($.moduleCache);R.add($.publicPath);v.addRuntimeModule(E,new j({generateLoadBinaryCode:generateLoadBinaryCode,supportsStreaming:true,mangleImports:this.options.mangleImports,runtimeRequirements:R}))}))}))}}v.exports=FetchCompileWasmPlugin},21631:function(v,E,R){"use strict";const $=R(39201);const j=R(6594);class JsonpChunkLoadingPlugin{apply(v){v.hooks.thisCompilation.tap("JsonpChunkLoadingPlugin",(v=>{const E=v.outputOptions.chunkLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.chunkLoading!==undefined?R.chunkLoading:E;return $==="jsonp"};const R=new WeakSet;const handler=(E,N)=>{if(R.has(E))return;R.add(E);if(!isEnabledForChunk(E))return;N.add($.moduleFactoriesAddOnly);N.add($.hasOwnProperty);v.addRuntimeModule(E,new j(N))};v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("JsonpChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("JsonpChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("JsonpChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.baseURI).tap("JsonpChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.onChunksLoaded).tap("JsonpChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("JsonpChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.loadScript);E.add($.getChunkScriptFilename)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("JsonpChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.loadScript);E.add($.getChunkUpdateScriptFilename);E.add($.moduleCache);E.add($.hmrModuleData);E.add($.moduleFactoriesAddOnly)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("JsonpChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.getUpdateManifestFilename)}))}))}}v.exports=JsonpChunkLoadingPlugin},6594:function(v,E,R){"use strict";const{SyncWaterfallHook:$}=R(44217);const j=R(73002);const N=R(39201);const q=R(93496);const G=R(43841);const ie=R(36109).chunkHasJs;const{getInitialChunkIds:ae}=R(82695);const ce=R(73897);const le=new WeakMap;class JsonpChunkLoadingRuntimeModule extends q{static getCompilationHooks(v){if(!(v instanceof j)){throw new TypeError("The 'compilation' argument must be an instance of Compilation")}let E=le.get(v);if(E===undefined){E={linkPreload:new $(["source","chunk"]),linkPrefetch:new $(["source","chunk"])};le.set(v,E)}return E}constructor(v){super("jsonp chunk loading",q.STAGE_ATTACH);this._runtimeRequirements=v}_generateBaseUri(v){const E=v.getEntryOptions();if(E&&E.baseUri){return`${N.baseURI} = ${JSON.stringify(E.baseUri)};`}else{return`${N.baseURI} = document.baseURI || self.location.href;`}}generate(){const{chunkGraph:v,compilation:E,chunk:R}=this;const{runtimeTemplate:$,outputOptions:{chunkLoadingGlobal:j,hotUpdateGlobal:q,crossOriginLoading:le,scriptType:me}}=E;const _e=$.globalObject;const{linkPreload:Ie,linkPrefetch:Me}=JsonpChunkLoadingRuntimeModule.getCompilationHooks(E);const Oe=N.ensureChunkHandlers;const Te=this._runtimeRequirements.has(N.baseURI);const Ne=this._runtimeRequirements.has(N.ensureChunkHandlers);const Be=this._runtimeRequirements.has(N.chunkCallback);const Le=this._runtimeRequirements.has(N.onChunksLoaded);const qe=this._runtimeRequirements.has(N.hmrDownloadUpdateHandlers);const Ue=this._runtimeRequirements.has(N.hmrDownloadManifest);const Ge=this._runtimeRequirements.has(N.prefetchChunkHandlers);const He=this._runtimeRequirements.has(N.preloadChunkHandlers);const We=`${_e}[${JSON.stringify(j)}]`;const Qe=v.getChunkConditionMap(R,ie);const Je=ce(Qe);const Ve=ae(R,v,ie);const Ke=qe?`${N.hmrRuntimeStatePrefix}_jsonp`:undefined;return G.asString([Te?this._generateBaseUri(R):"// no baseURI","","// object to store loaded and loading chunks","// undefined = chunk not loaded, null = chunk preloaded/prefetched","// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded",`var installedChunks = ${Ke?`${Ke} = ${Ke} || `:""}{`,G.indent(Array.from(Ve,(v=>`${JSON.stringify(v)}: 0`)).join(",\n")),"};","",Ne?G.asString([`${Oe}.j = ${$.basicFunction("chunkId, promises",Je!==false?G.indent(["// JSONP chunk loading for javascript",`var installedChunkData = ${N.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,'if(installedChunkData !== 0) { // 0 means "already installed".',G.indent(["",'// a Promise means "currently loading".',"if(installedChunkData) {",G.indent(["promises.push(installedChunkData[2]);"]),"} else {",G.indent([Je===true?"if(true) { // all chunks have JS":`if(${Je("chunkId")}) {`,G.indent(["// setup Promise in chunk cache",`var promise = new Promise(${$.expressionFunction(`installedChunkData = installedChunks[chunkId] = [resolve, reject]`,"resolve, reject")});`,"promises.push(installedChunkData[2] = promise);","","// start chunk loading",`var url = ${N.publicPath} + ${N.getChunkScriptFilename}(chunkId);`,"// create error before stack unwound to get useful stacktrace later","var error = new Error();",`var loadingEnded = ${$.basicFunction("event",[`if(${N.hasOwnProperty}(installedChunks, chunkId)) {`,G.indent(["installedChunkData = installedChunks[chunkId];","if(installedChunkData !== 0) installedChunks[chunkId] = undefined;","if(installedChunkData) {",G.indent(["var errorType = event && (event.type === 'load' ? 'missing' : event.type);","var realSrc = event && event.target && event.target.src;","error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';","error.name = 'ChunkLoadError';","error.type = errorType;","error.request = realSrc;","installedChunkData[1](error);"]),"}"]),"}"])};`,`${N.loadScript}(url, loadingEnded, "chunk-" + chunkId, chunkId);`]),"} else installedChunks[chunkId] = 0;"]),"}"]),"}"]):G.indent(["installedChunks[chunkId] = 0;"]))};`]):"// no chunk on demand loading","",Ge&&Je!==false?`${N.prefetchChunkHandlers}.j = ${$.basicFunction("chunkId",[`if((!${N.hasOwnProperty}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${Je===true?"true":Je("chunkId")}) {`,G.indent(["installedChunks[chunkId] = null;",Me.call(G.asString(["var link = document.createElement('link');",le?`link.crossOrigin = ${JSON.stringify(le)};`:"",`if (${N.scriptNonce}) {`,G.indent(`link.setAttribute("nonce", ${N.scriptNonce});`),"}",'link.rel = "prefetch";','link.as = "script";',`link.href = ${N.publicPath} + ${N.getChunkScriptFilename}(chunkId);`]),R),"document.head.appendChild(link);"]),"}"])};`:"// no prefetching","",He&&Je!==false?`${N.preloadChunkHandlers}.j = ${$.basicFunction("chunkId",[`if((!${N.hasOwnProperty}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${Je===true?"true":Je("chunkId")}) {`,G.indent(["installedChunks[chunkId] = null;",Ie.call(G.asString(["var link = document.createElement('link');",me?`link.type = ${JSON.stringify(me)};`:"","link.charset = 'utf-8';",`if (${N.scriptNonce}) {`,G.indent(`link.setAttribute("nonce", ${N.scriptNonce});`),"}",'link.rel = "preload";','link.as = "script";',`link.href = ${N.publicPath} + ${N.getChunkScriptFilename}(chunkId);`,le?le==="use-credentials"?'link.crossOrigin = "use-credentials";':G.asString(["if (link.href.indexOf(window.location.origin + '/') !== 0) {",G.indent(`link.crossOrigin = ${JSON.stringify(le)};`),"}"]):""]),R),"document.head.appendChild(link);"]),"}"])};`:"// no preloaded","",qe?G.asString(["var currentUpdatedModulesList;","var waitingUpdateResolves = {};","function loadUpdateChunk(chunkId, updatedModulesList) {",G.indent(["currentUpdatedModulesList = updatedModulesList;",`return new Promise(${$.basicFunction("resolve, reject",["waitingUpdateResolves[chunkId] = resolve;","// start update chunk loading",`var url = ${N.publicPath} + ${N.getChunkUpdateScriptFilename}(chunkId);`,"// create error before stack unwound to get useful stacktrace later","var error = new Error();",`var loadingEnded = ${$.basicFunction("event",["if(waitingUpdateResolves[chunkId]) {",G.indent(["waitingUpdateResolves[chunkId] = undefined","var errorType = event && (event.type === 'load' ? 'missing' : event.type);","var realSrc = event && event.target && event.target.src;","error.message = 'Loading hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';","error.name = 'ChunkLoadError';","error.type = errorType;","error.request = realSrc;","reject(error);"]),"}"])};`,`${N.loadScript}(url, loadingEnded);`])});`]),"}","",`${_e}[${JSON.stringify(q)}] = ${$.basicFunction("chunkId, moreModules, runtime",["for(var moduleId in moreModules) {",G.indent([`if(${N.hasOwnProperty}(moreModules, moduleId)) {`,G.indent(["currentUpdate[moduleId] = moreModules[moduleId];","if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);"]),"}"]),"}","if(runtime) currentUpdateRuntime.push(runtime);","if(waitingUpdateResolves[chunkId]) {",G.indent(["waitingUpdateResolves[chunkId]();","waitingUpdateResolves[chunkId] = undefined;"]),"}"])};`,"",G.getFunctionContent(require("./JavascriptHotModuleReplacement.runtime.js")).replace(/\$key\$/g,"jsonp").replace(/\$installedChunks\$/g,"installedChunks").replace(/\$loadUpdateChunk\$/g,"loadUpdateChunk").replace(/\$moduleCache\$/g,N.moduleCache).replace(/\$moduleFactories\$/g,N.moduleFactories).replace(/\$ensureChunkHandlers\$/g,N.ensureChunkHandlers).replace(/\$hasOwnProperty\$/g,N.hasOwnProperty).replace(/\$hmrModuleData\$/g,N.hmrModuleData).replace(/\$hmrDownloadUpdateHandlers\$/g,N.hmrDownloadUpdateHandlers).replace(/\$hmrInvalidateModuleHandlers\$/g,N.hmrInvalidateModuleHandlers)]):"// no HMR","",Ue?G.asString([`${N.hmrDownloadManifest} = ${$.basicFunction("",['if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");',`return fetch(${N.publicPath} + ${N.getUpdateManifestFilename}()).then(${$.basicFunction("response",["if(response.status === 404) return; // no update available",'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);',"return response.json();"])});`])};`]):"// no HMR manifest","",Le?`${N.onChunksLoaded}.j = ${$.returningFunction("installedChunks[chunkId] === 0","chunkId")};`:"// no on chunks loaded","",Be||Ne?G.asString(["// install a JSONP callback for chunk loading",`var webpackJsonpCallback = ${$.basicFunction("parentChunkLoadingFunction, data",[$.destructureArray(["chunkIds","moreModules","runtime"],"data"),'// add "moreModules" to the modules object,','// then flag all "chunkIds" as loaded and fire callback',"var moduleId, chunkId, i = 0;",`if(chunkIds.some(${$.returningFunction("installedChunks[id] !== 0","id")})) {`,G.indent(["for(moduleId in moreModules) {",G.indent([`if(${N.hasOwnProperty}(moreModules, moduleId)) {`,G.indent(`${N.moduleFactories}[moduleId] = moreModules[moduleId];`),"}"]),"}","if(runtime) var result = runtime(__webpack_require__);"]),"}","if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);","for(;i < chunkIds.length; i++) {",G.indent(["chunkId = chunkIds[i];",`if(${N.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`,G.indent("installedChunks[chunkId][0]();"),"}","installedChunks[chunkId] = 0;"]),"}",Le?`return ${N.onChunksLoaded}(result);`:""])}`,"",`var chunkLoadingGlobal = ${We} = ${We} || [];`,"chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));","chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"]):"// no jsonp function"])}}v.exports=JsonpChunkLoadingRuntimeModule},44896:function(v,E,R){"use strict";const $=R(54433);const j=R(49548);const N=R(6594);class JsonpTemplatePlugin{static getCompilationHooks(v){return N.getCompilationHooks(v)}apply(v){v.options.output.chunkLoading="jsonp";(new $).apply(v);new j("jsonp").apply(v)}}v.exports=JsonpTemplatePlugin},20761:function(v,E,R){"use strict";const $=R(73837);const j=R(62136);const N=R(13954);const q=R(37912);const G=R(39601);const ie=R(73305);const{applyWebpackOptionsDefaults:ae,applyWebpackOptionsBaseDefaults:ce}=R(64395);const{getNormalizedWebpackOptions:le}=R(80593);const me=R(27381);const _e=R(61374);const Ie=_e((()=>R(71732)));const createMultiCompiler=(v,E)=>{const R=v.map((v=>createCompiler(v)));const $=new G(R,E);for(const v of R){if(v.options.dependencies){$.setDependencies(v,v.options.dependencies)}}return $};const createCompiler=v=>{const E=le(v);ce(E);const R=new q(E.context,E);new me({infrastructureLogging:E.infrastructureLogging}).apply(R);if(Array.isArray(E.plugins)){for(const v of E.plugins){if(typeof v==="function"){v.call(R,R)}else{v.apply(R)}}}ae(E);R.hooks.environment.call();R.hooks.afterEnvironment.call();(new ie).process(E,R);R.hooks.initialize.call();return R};const asArray=v=>Array.isArray(v)?Array.from(v):[v];const webpack=(v,E)=>{const create=()=>{if(!asArray(v).every(j)){Ie()(N,v);$.deprecate((()=>{}),"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.","DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID")()}let E;let R=false;let q;if(Array.isArray(v)){E=createMultiCompiler(v,v);R=v.some((v=>v.watch));q=v.map((v=>v.watchOptions||{}))}else{const $=v;E=createCompiler($);R=$.watch;q=$.watchOptions||{}}return{compiler:E,watch:R,watchOptions:q}};if(E){try{const{compiler:v,watch:R,watchOptions:$}=create();if(R){v.watch($,E)}else{v.run(((R,$)=>{v.close((v=>{E(R||v,$)}))}))}return v}catch(v){process.nextTick((()=>E(v)));return null}}else{const{compiler:v,watch:E}=create();if(E){$.deprecate((()=>{}),"A 'callback' argument needs to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.","DEP_WEBPACK_WATCH_WITHOUT_CALLBACK")()}return v}};v.exports=webpack},22188:function(v,E,R){"use strict";const $=R(39201);const j=R(61411);const N=R(98698);class ImportScriptsChunkLoadingPlugin{apply(v){new j({chunkLoading:"import-scripts",asyncChunkLoading:true}).apply(v);v.hooks.thisCompilation.tap("ImportScriptsChunkLoadingPlugin",(v=>{const E=v.outputOptions.chunkLoading;const isEnabledForChunk=v=>{const R=v.getEntryOptions();const $=R&&R.chunkLoading!==undefined?R.chunkLoading:E;return $==="import-scripts"};const R=new WeakSet;const handler=(E,j)=>{if(R.has(E))return;R.add(E);if(!isEnabledForChunk(E))return;const q=!!v.outputOptions.trustedTypes;j.add($.moduleFactoriesAddOnly);j.add($.hasOwnProperty);if(q){j.add($.createScriptUrl)}v.addRuntimeModule(E,new N(j,q))};v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("ImportScriptsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("ImportScriptsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("ImportScriptsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.baseURI).tap("ImportScriptsChunkLoadingPlugin",handler);v.hooks.runtimeRequirementInTree.for($.ensureChunkHandlers).tap("ImportScriptsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.getChunkScriptFilename)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadUpdateHandlers).tap("ImportScriptsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.getChunkUpdateScriptFilename);E.add($.moduleCache);E.add($.hmrModuleData);E.add($.moduleFactoriesAddOnly)}));v.hooks.runtimeRequirementInTree.for($.hmrDownloadManifest).tap("ImportScriptsChunkLoadingPlugin",((v,E)=>{if(!isEnabledForChunk(v))return;E.add($.publicPath);E.add($.getUpdateManifestFilename)}))}))}}v.exports=ImportScriptsChunkLoadingPlugin},98698:function(v,E,R){"use strict";const $=R(39201);const j=R(93496);const N=R(43841);const{getChunkFilenameTemplate:q,chunkHasJs:G}=R(36109);const{getInitialChunkIds:ie}=R(82695);const ae=R(73897);const{getUndoPath:ce}=R(20162);class ImportScriptsChunkLoadingRuntimeModule extends j{constructor(v,E){super("importScripts chunk loading",j.STAGE_ATTACH);this.runtimeRequirements=v;this._withCreateScriptUrl=E}_generateBaseUri(v){const E=v.getEntryOptions();if(E&&E.baseUri){return`${$.baseURI} = ${JSON.stringify(E.baseUri)};`}const R=this.compilation.getPath(q(v,this.compilation.outputOptions),{chunk:v,contentHashType:"javascript"});const j=ce(R,this.compilation.outputOptions.path,false);return`${$.baseURI} = self.location + ${JSON.stringify(j?"/../"+j:"")};`}generate(){const{chunk:v,chunkGraph:E,compilation:{runtimeTemplate:R,outputOptions:{chunkLoadingGlobal:j,hotUpdateGlobal:q}},_withCreateScriptUrl:ce}=this;const le=R.globalObject;const me=$.ensureChunkHandlers;const _e=this.runtimeRequirements.has($.baseURI);const Ie=this.runtimeRequirements.has($.ensureChunkHandlers);const Me=this.runtimeRequirements.has($.hmrDownloadUpdateHandlers);const Oe=this.runtimeRequirements.has($.hmrDownloadManifest);const Te=`${le}[${JSON.stringify(j)}]`;const Ne=ae(E.getChunkConditionMap(v,G));const Be=ie(v,E,G);const Le=Me?`${$.hmrRuntimeStatePrefix}_importScripts`:undefined;return N.asString([_e?this._generateBaseUri(v):"// no baseURI","","// object to store loaded chunks",'// "1" means "already loaded"',`var installedChunks = ${Le?`${Le} = ${Le} || `:""}{`,N.indent(Array.from(Be,(v=>`${JSON.stringify(v)}: 1`)).join(",\n")),"};","",Ie?N.asString(["// importScripts chunk loading",`var installChunk = ${R.basicFunction("data",[R.destructureArray(["chunkIds","moreModules","runtime"],"data"),"for(var moduleId in moreModules) {",N.indent([`if(${$.hasOwnProperty}(moreModules, moduleId)) {`,N.indent(`${$.moduleFactories}[moduleId] = moreModules[moduleId];`),"}"]),"}","if(runtime) runtime(__webpack_require__);","while(chunkIds.length)",N.indent("installedChunks[chunkIds.pop()] = 1;"),"parentChunkLoadingFunction(data);"])};`]):"// no chunk install function needed",Ie?N.asString([`${me}.i = ${R.basicFunction("chunkId, promises",Ne!==false?['// "1" is the signal for "already loaded"',"if(!installedChunks[chunkId]) {",N.indent([Ne===true?"if(true) { // all chunks have JS":`if(${Ne("chunkId")}) {`,N.indent(`importScripts(${ce?`${$.createScriptUrl}(${$.publicPath} + ${$.getChunkScriptFilename}(chunkId))`:`${$.publicPath} + ${$.getChunkScriptFilename}(chunkId)`});`),"}"]),"}"]:"installedChunks[chunkId] = 1;")};`,"",`var chunkLoadingGlobal = ${Te} = ${Te} || [];`,"var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);","chunkLoadingGlobal.push = installChunk;"]):"// no chunk loading","",Me?N.asString(["function loadUpdateChunk(chunkId, updatedModulesList) {",N.indent(["var success = false;",`${le}[${JSON.stringify(q)}] = ${R.basicFunction("_, moreModules, runtime",["for(var moduleId in moreModules) {",N.indent([`if(${$.hasOwnProperty}(moreModules, moduleId)) {`,N.indent(["currentUpdate[moduleId] = moreModules[moduleId];","if(updatedModulesList) updatedModulesList.push(moduleId);"]),"}"]),"}","if(runtime) currentUpdateRuntime.push(runtime);","success = true;"])};`,"// start update chunk loading",`importScripts(${ce?`${$.createScriptUrl}(${$.publicPath} + ${$.getChunkUpdateScriptFilename}(chunkId))`:`${$.publicPath} + ${$.getChunkUpdateScriptFilename}(chunkId)`});`,'if(!success) throw new Error("Loading update chunk failed for unknown reason");']),"}","",N.getFunctionContent(require("./JavascriptHotModuleReplacement.runtime.js")).replace(/\$key\$/g,"importScrips").replace(/\$installedChunks\$/g,"installedChunks").replace(/\$loadUpdateChunk\$/g,"loadUpdateChunk").replace(/\$moduleCache\$/g,$.moduleCache).replace(/\$moduleFactories\$/g,$.moduleFactories).replace(/\$ensureChunkHandlers\$/g,$.ensureChunkHandlers).replace(/\$hasOwnProperty\$/g,$.hasOwnProperty).replace(/\$hmrModuleData\$/g,$.hmrModuleData).replace(/\$hmrDownloadUpdateHandlers\$/g,$.hmrDownloadUpdateHandlers).replace(/\$hmrInvalidateModuleHandlers\$/g,$.hmrInvalidateModuleHandlers)]):"// no HMR","",Oe?N.asString([`${$.hmrDownloadManifest} = ${R.basicFunction("",['if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");',`return fetch(${$.publicPath} + ${$.getUpdateManifestFilename}()).then(${R.basicFunction("response",["if(response.status === 404) return; // no update available",'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);',"return response.json();"])});`])};`]):"// no HMR manifest"])}}v.exports=ImportScriptsChunkLoadingRuntimeModule},29649:function(v,E,R){"use strict";const $=R(54433);const j=R(49548);class WebWorkerTemplatePlugin{apply(v){v.options.output.chunkLoading="import-scripts";(new $).apply(v);new j("import-scripts").apply(v)}}v.exports=WebWorkerTemplatePlugin},62136:function(v){const E=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;v.exports=we,v.exports["default"]=we;const R={amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptions"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/Entry"},experiments:{$ref:"#/definitions/Experiments"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarnings"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptions"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/Optimization"},output:{$ref:"#/definitions/Output"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/Plugins"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},recordsPath:{$ref:"#/definitions/RecordsPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}},$=Object.prototype.hasOwnProperty,j={allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},compression:{enum:[!1,"gzip","brotli"]},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutAfterLargeChanges:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},memoryCacheUnaffected:{type:"boolean"},name:{type:"string"},profile:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}};function s(v,{instancePath:R="",parentData:N,parentDataProperty:q,rootData:G=v}={}){let ie=null,ae=0;const ce=ae;let le=!1;const me=ae;if(!1!==v){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}var _e=me===ae;if(le=le||_e,!le){const R=ae;if(ae==ae)if(v&&"object"==typeof v&&!Array.isArray(v)){let E;if(void 0===v.type&&(E="type")){const v={params:{missingProperty:E}};null===ie?ie=[v]:ie.push(v),ae++}else{const E=ae;for(const E in v)if("cacheUnaffected"!==E&&"maxGenerations"!==E&&"type"!==E){const v={params:{additionalProperty:E}};null===ie?ie=[v]:ie.push(v),ae++;break}if(E===ae){if(void 0!==v.cacheUnaffected){const E=ae;if("boolean"!=typeof v.cacheUnaffected){const v={params:{type:"boolean"}};null===ie?ie=[v]:ie.push(v),ae++}var Ie=E===ae}else Ie=!0;if(Ie){if(void 0!==v.maxGenerations){let E=v.maxGenerations;const R=ae;if(ae===R)if("number"==typeof E){if(E<1||isNaN(E)){const v={params:{comparison:">=",limit:1}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Ie=R===ae}else Ie=!0;if(Ie)if(void 0!==v.type){const E=ae;if("memory"!==v.type){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}Ie=E===ae}else Ie=!0}}}}else{const v={params:{type:"object"}};null===ie?ie=[v]:ie.push(v),ae++}if(_e=R===ae,le=le||_e,!le){const R=ae;if(ae==ae)if(v&&"object"==typeof v&&!Array.isArray(v)){let R;if(void 0===v.type&&(R="type")){const v={params:{missingProperty:R}};null===ie?ie=[v]:ie.push(v),ae++}else{const R=ae;for(const E in v)if(!$.call(j,E)){const v={params:{additionalProperty:E}};null===ie?ie=[v]:ie.push(v),ae++;break}if(R===ae){if(void 0!==v.allowCollectingMemory){const E=ae;if("boolean"!=typeof v.allowCollectingMemory){const v={params:{type:"boolean"}};null===ie?ie=[v]:ie.push(v),ae++}var Me=E===ae}else Me=!0;if(Me){if(void 0!==v.buildDependencies){let E=v.buildDependencies;const R=ae;if(ae===R)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){let R=E[v];const $=ae;if(ae===$)if(Array.isArray(R)){const v=R.length;for(let E=0;E=",limit:0}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Me=R===ae}else Me=!0;if(Me){if(void 0!==v.idleTimeoutAfterLargeChanges){let E=v.idleTimeoutAfterLargeChanges;const R=ae;if(ae===R)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Me=R===ae}else Me=!0;if(Me){if(void 0!==v.idleTimeoutForInitialStore){let E=v.idleTimeoutForInitialStore;const R=ae;if(ae===R)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Me=R===ae}else Me=!0;if(Me){if(void 0!==v.immutablePaths){let R=v.immutablePaths;const $=ae;if(ae===$)if(Array.isArray(R)){const v=R.length;for(let $=0;$=",limit:0}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Me=R===ae}else Me=!0;if(Me){if(void 0!==v.maxMemoryGenerations){let E=v.maxMemoryGenerations;const R=ae;if(ae===R)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"number"}};null===ie?ie=[v]:ie.push(v),ae++}Me=R===ae}else Me=!0;if(Me){if(void 0!==v.memoryCacheUnaffected){const E=ae;if("boolean"!=typeof v.memoryCacheUnaffected){const v={params:{type:"boolean"}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0;if(Me){if(void 0!==v.name){const E=ae;if("string"!=typeof v.name){const v={params:{type:"string"}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0;if(Me){if(void 0!==v.profile){const E=ae;if("boolean"!=typeof v.profile){const v={params:{type:"boolean"}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0;if(Me){if(void 0!==v.store){const E=ae;if("pack"!==v.store){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0;if(Me){if(void 0!==v.type){const E=ae;if("filesystem"!==v.type){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0;if(Me)if(void 0!==v.version){const E=ae;if("string"!=typeof v.version){const v={params:{type:"string"}};null===ie?ie=[v]:ie.push(v),ae++}Me=E===ae}else Me=!0}}}}}}}}}}}}}}}}}}}}else{const v={params:{type:"object"}};null===ie?ie=[v]:ie.push(v),ae++}_e=R===ae,le=le||_e}}if(!le){const v={params:{}};return null===ie?ie=[v]:ie.push(v),ae++,s.errors=ie,!1}return ae=ce,null!==ie&&(ce?ie.length=ce:ie=null),s.errors=ie,0===ae}function o(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(!0!==v){const v={params:{}};null===N?N=[v]:N.push(v),q++}var ce=ae===q;if(ie=ie||ce,!ie){const G=q;s(v,{instancePath:E,parentData:R,parentDataProperty:$,rootData:j})||(N=null===N?s.errors:N.concat(s.errors),q=N.length),ce=G===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,o.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),o.errors=N,0===q}const N={asyncChunks:{type:"boolean"},baseUri:{type:"string"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(!1!==v){const v={params:{}};null===N?N=[v]:N.push(v),q++}var ce=ae===q;if(ie=ie||ce,!ie){const E=q,R=q;let $=!1;const j=q;if("jsonp"!==v&&"import-scripts"!==v&&"require"!==v&&"async-node"!==v&&"import"!==v){const v={params:{}};null===N?N=[v]:N.push(v),q++}var le=j===q;if($=$||le,!$){const E=q;if("string"!=typeof v){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}le=E===q,$=$||le}if($)q=R,null!==N&&(R?N.length=R:N=null);else{const v={params:{}};null===N?N=[v]:N.push(v),q++}ce=E===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,i.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),i.errors=N,0===q}function l(v,{instancePath:R="",parentData:$,parentDataProperty:j,rootData:N=v}={}){let q=null,G=0;const ie=G;let ae=!1,ce=null;const le=G,me=G;let _e=!1;const Ie=G;if(G===Ie)if("string"==typeof v){if(v.includes("!")||!1!==E.test(v)){const v={params:{}};null===q?q=[v]:q.push(v),G++}else if(v.length<1){const v={params:{}};null===q?q=[v]:q.push(v),G++}}else{const v={params:{type:"string"}};null===q?q=[v]:q.push(v),G++}var Me=Ie===G;if(_e=_e||Me,!_e){const E=G;if(!(v instanceof Function)){const v={params:{}};null===q?q=[v]:q.push(v),G++}Me=E===G,_e=_e||Me}if(_e)G=me,null!==q&&(me?q.length=me:q=null);else{const v={params:{}};null===q?q=[v]:q.push(v),G++}if(le===G&&(ae=!0,ce=0),!ae){const v={params:{passingSchemas:ce}};return null===q?q=[v]:q.push(v),G++,l.errors=q,!1}return G=ie,null!==q&&(ie?q.length=ie:q=null),l.errors=q,0===G}function p(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if("string"!=typeof v){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}var ce=ae===q;if(ie=ie||ce,!ie){const E=q;if(q==q)if(v&&"object"==typeof v&&!Array.isArray(v)){const E=q;for(const E in v)if("amd"!==E&&"commonjs"!==E&&"commonjs2"!==E&&"root"!==E){const v={params:{additionalProperty:E}};null===N?N=[v]:N.push(v),q++;break}if(E===q){if(void 0!==v.amd){const E=q;if("string"!=typeof v.amd){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}var le=E===q}else le=!0;if(le){if(void 0!==v.commonjs){const E=q;if("string"!=typeof v.commonjs){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}le=E===q}else le=!0;if(le){if(void 0!==v.commonjs2){const E=q;if("string"!=typeof v.commonjs2){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}le=E===q}else le=!0;if(le)if(void 0!==v.root){const E=q;if("string"!=typeof v.root){const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}le=E===q}else le=!0}}}}else{const v={params:{type:"object"}};null===N?N=[v]:N.push(v),q++}ce=E===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,p.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),p.errors=N,0===q}function u(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(q===ae)if(Array.isArray(v))if(v.length<1){const v={params:{limit:1}};null===N?N=[v]:N.push(v),q++}else{const E=v.length;for(let R=0;R1){const $={};for(;R--;){let j=E[R];if("string"==typeof j){if("number"==typeof $[j]){v=$[j];const E={params:{i:R,j:v}};null===G?G=[E]:G.push(E),ie++;break}$[j]=R}}}}}else{const v={params:{type:"array"}};null===G?G=[v]:G.push(v),ie++}var le=N===ie;if(j=j||le,!j){const v=ie;if(ie===v)if("string"==typeof E){if(E.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}le=v===ie,j=j||le}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,y.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.filename){const R=ie;l(v.filename,{instancePath:E+"/filename",parentData:v,parentDataProperty:"filename",rootData:q})||(G=null===G?l.errors:G.concat(l.errors),ie=G.length),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.import){let E=v.import;const R=ie,$=ie;let j=!1;const N=ie;if(ie===N)if(Array.isArray(E))if(E.length<1){const v={params:{limit:1}};null===G?G=[v]:G.push(v),ie++}else{var me=!0;const v=E.length;for(let R=0;R1){const $={};for(;R--;){let j=E[R];if("string"==typeof j){if("number"==typeof $[j]){v=$[j];const E={params:{i:R,j:v}};null===G?G=[E]:G.push(E),ie++;break}$[j]=R}}}}}else{const v={params:{type:"array"}};null===G?G=[v]:G.push(v),ie++}var _e=N===ie;if(j=j||_e,!j){const v=ie;if(ie===v)if("string"==typeof E){if(E.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}_e=v===ie,j=j||_e}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,y.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.layer){let E=v.layer;const R=ie,$=ie;let j=!1;const N=ie;if(null!==E){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Ie=N===ie;if(j=j||Ie,!j){const v=ie;if(ie===v)if("string"==typeof E){if(E.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}Ie=v===ie,j=j||Ie}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,y.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.library){const R=ie;f(v.library,{instancePath:E+"/library",parentData:v,parentDataProperty:"library",rootData:q})||(G=null===G?f.errors:G.concat(f.errors),ie=G.length),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.publicPath){const R=ie;c(v.publicPath,{instancePath:E+"/publicPath",parentData:v,parentDataProperty:"publicPath",rootData:q})||(G=null===G?c.errors:G.concat(c.errors),ie=G.length),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.runtime){let E=v.runtime;const R=ie,$=ie;let j=!1;const N=ie;if(!1!==E){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Me=N===ie;if(j=j||Me,!j){const v=ie;if(ie===v)if("string"==typeof E){if(E.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}Me=v===ie,j=j||Me}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,y.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae)if(void 0!==v.wasmLoading){const R=ie;m(v.wasmLoading,{instancePath:E+"/wasmLoading",parentData:v,parentDataProperty:"wasmLoading",rootData:q})||(G=null===G?m.errors:G.concat(m.errors),ie=G.length),ae=R===ie}else ae=!0}}}}}}}}}}}}}return y.errors=G,0===ie}function h(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;if(0===q){if(!v||"object"!=typeof v||Array.isArray(v))return h.errors=[{params:{type:"object"}}],!1;for(const R in v){let $=v[R];const ce=q,le=q;let me=!1;const _e=q,Ie=q;let Me=!1;const Oe=q;if(q===Oe)if(Array.isArray($))if($.length<1){const v={params:{limit:1}};null===N?N=[v]:N.push(v),q++}else{var G=!0;const v=$.length;for(let E=0;E1){const R={};for(;E--;){let j=$[E];if("string"==typeof j){if("number"==typeof R[j]){v=R[j];const $={params:{i:E,j:v}};null===N?N=[$]:N.push($),q++;break}R[j]=E}}}}}else{const v={params:{type:"array"}};null===N?N=[v]:N.push(v),q++}var ie=Oe===q;if(Me=Me||ie,!Me){const v=q;if(q===v)if("string"==typeof $){if($.length<1){const v={params:{}};null===N?N=[v]:N.push(v),q++}}else{const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}ie=v===q,Me=Me||ie}if(Me)q=Ie,null!==N&&(Ie?N.length=Ie:N=null);else{const v={params:{}};null===N?N=[v]:N.push(v),q++}var ae=_e===q;if(me=me||ae,!me){const G=q;y($,{instancePath:E+"/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:v,parentDataProperty:R,rootData:j})||(N=null===N?y.errors:N.concat(y.errors),q=N.length),ae=G===q,me=me||ae}if(!me){const v={params:{}};return null===N?N=[v]:N.push(v),q++,h.errors=N,!1}if(q=le,null!==N&&(le?N.length=le:N=null),ce!==q)break}}return h.errors=N,0===q}function d(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1,ae=null;const ce=q,le=q;let me=!1;const _e=q;if(q===_e)if(Array.isArray(v))if(v.length<1){const v={params:{limit:1}};null===N?N=[v]:N.push(v),q++}else{var Ie=!0;const E=v.length;for(let R=0;R1){const $={};for(;R--;){let j=v[R];if("string"==typeof j){if("number"==typeof $[j]){E=$[j];const v={params:{i:R,j:E}};null===N?N=[v]:N.push(v),q++;break}$[j]=R}}}}}else{const v={params:{type:"array"}};null===N?N=[v]:N.push(v),q++}var Me=_e===q;if(me=me||Me,!me){const E=q;if(q===E)if("string"==typeof v){if(v.length<1){const v={params:{}};null===N?N=[v]:N.push(v),q++}}else{const v={params:{type:"string"}};null===N?N=[v]:N.push(v),q++}Me=E===q,me=me||Me}if(me)q=le,null!==N&&(le?N.length=le:N=null);else{const v={params:{}};null===N?N=[v]:N.push(v),q++}if(ce===q&&(ie=!0,ae=0),!ie){const v={params:{passingSchemas:ae}};return null===N?N=[v]:N.push(v),q++,d.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),d.errors=N,0===q}function g(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;h(v,{instancePath:E,parentData:R,parentDataProperty:$,rootData:j})||(N=null===N?h.errors:N.concat(h.errors),q=N.length);var ce=ae===q;if(ie=ie||ce,!ie){const G=q;d(v,{instancePath:E,parentData:R,parentDataProperty:$,rootData:j})||(N=null===N?d.errors:N.concat(d.errors),q=N.length),ce=G===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,g.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),g.errors=N,0===q}function b(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(!(v instanceof Function)){const v={params:{}};null===N?N=[v]:N.push(v),q++}var ce=ae===q;if(ie=ie||ce,!ie){const G=q;g(v,{instancePath:E,parentData:R,parentDataProperty:$,rootData:j})||(N=null===N?g.errors:N.concat(g.errors),q=N.length),ce=G===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,b.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),b.errors=N,0===q}const q={asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{anyOf:[{$ref:"#/definitions/HttpUriAllowedUris"},{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},css:{anyOf:[{type:"boolean"},{$ref:"#/definitions/CssExperimentOptions"}]},futureDefaults:{type:"boolean"},layers:{type:"boolean"},lazyCompilation:{anyOf:[{type:"boolean"},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"},topLevelAwait:{type:"boolean"}},G=new RegExp("^https?://","u");function P(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const ie=q;let ae=!1,ce=null;const le=q;if(q==q)if(Array.isArray(v)){const E=v.length;for(let R=0;R=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var le=_e===ie;if(me=me||le,!me){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}le=v===ie,me=me||le}if(me)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.filename){let R=v.filename;const $=ie,j=ie;let N=!1;const q=ie;if(ie===q)if("string"==typeof R){if(R.includes("!")||!1!==E.test(R)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}else if(R.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}var me=q===ie;if(N=N||me,!N){const v=ie;if(!(R instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}me=v===ie,N=N||me}if(!N){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=j,null!==G&&(j?G.length=j:G=null),ae=$===ie}else ae=!0;if(ae){if(void 0!==v.idHint){const E=ie;if("string"!=typeof v.idHint)return pe.errors=[{params:{type:"string"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.layer){let E=v.layer;const R=ie,$=ie;let j=!1;const N=ie;if(!(E instanceof RegExp)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var _e=N===ie;if(j=j||_e,!j){const v=ie;if("string"!=typeof E){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(_e=v===ie,j=j||_e,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}_e=v===ie,j=j||_e}}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxAsyncRequests){let E=v.maxAsyncRequests;const R=ie;if(ie===R){if("number"!=typeof E)return pe.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxAsyncSize){let E=v.maxAsyncSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Ie=me===ie;if(le=le||Ie,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Ie=v===ie,le=le||Ie}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxInitialRequests){let E=v.maxInitialRequests;const R=ie;if(ie===R){if("number"!=typeof E)return pe.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxInitialSize){let E=v.maxInitialSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Me=me===ie;if(le=le||Me,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Me=v===ie,le=le||Me}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxSize){let E=v.maxSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Oe=me===ie;if(le=le||Oe,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Oe=v===ie,le=le||Oe}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minChunks){let E=v.minChunks;const R=ie;if(ie===R){if("number"!=typeof E)return pe.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minRemainingSize){let E=v.minRemainingSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Te=me===ie;if(le=le||Te,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Te=v===ie,le=le||Te}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minSize){let E=v.minSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Be=me===ie;if(le=le||Be,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Be=v===ie,le=le||Be}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minSizeReduction){let E=v.minSizeReduction;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Le=me===ie;if(le=le||Le,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Le=v===ie,le=le||Le}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.name){let E=v.name;const R=ie,$=ie;let j=!1;const N=ie;if(!1!==E){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var qe=N===ie;if(j=j||qe,!j){const v=ie;if("string"!=typeof E){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(qe=v===ie,j=j||qe,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}qe=v===ie,j=j||qe}}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.priority){const E=ie;if("number"!=typeof v.priority)return pe.errors=[{params:{type:"number"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.reuseExistingChunk){const E=ie;if("boolean"!=typeof v.reuseExistingChunk)return pe.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.test){let E=v.test;const R=ie,$=ie;let j=!1;const N=ie;if(!(E instanceof RegExp)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Ue=N===ie;if(j=j||Ue,!j){const v=ie;if("string"!=typeof E){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(Ue=v===ie,j=j||Ue,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Ue=v===ie,j=j||Ue}}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.type){let E=v.type;const R=ie,$=ie;let j=!1;const N=ie;if(!(E instanceof RegExp)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Ge=N===ie;if(j=j||Ge,!j){const v=ie;if("string"!=typeof E){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(Ge=v===ie,j=j||Ge,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Ge=v===ie,j=j||Ge}}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,pe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae)if(void 0!==v.usedExports){const E=ie;if("boolean"!=typeof v.usedExports)return pe.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0}}}}}}}}}}}}}}}}}}}}}}}return pe.errors=G,0===ie}function ue(v,{instancePath:R="",parentData:j,parentDataProperty:N,rootData:q=v}={}){let G=null,ie=0;if(0===ie){if(!v||"object"!=typeof v||Array.isArray(v))return ue.errors=[{params:{type:"object"}}],!1;{const j=ie;for(const E in v)if(!$.call(Te,E))return ue.errors=[{params:{additionalProperty:E}}],!1;if(j===ie){if(void 0!==v.automaticNameDelimiter){let E=v.automaticNameDelimiter;const R=ie;if(ie===R){if("string"!=typeof E)return ue.errors=[{params:{type:"string"}}],!1;if(E.length<1)return ue.errors=[{params:{}}],!1}var ae=R===ie}else ae=!0;if(ae){if(void 0!==v.cacheGroups){let E=v.cacheGroups;const $=ie,j=ie,N=ie;if(ie===N)if(E&&"object"==typeof E&&!Array.isArray(E)){let v;if(void 0===E.test&&(v="test")){const v={};null===G?G=[v]:G.push(v),ie++}else if(void 0!==E.test){let v=E.test;const R=ie;let $=!1;const j=ie;if(!(v instanceof RegExp)){const v={};null===G?G=[v]:G.push(v),ie++}var ce=j===ie;if($=$||ce,!$){const E=ie;if("string"!=typeof v){const v={};null===G?G=[v]:G.push(v),ie++}if(ce=E===ie,$=$||ce,!$){const E=ie;if(!(v instanceof Function)){const v={};null===G?G=[v]:G.push(v),ie++}ce=E===ie,$=$||ce}}if($)ie=R,null!==G&&(R?G.length=R:G=null);else{const v={};null===G?G=[v]:G.push(v),ie++}}}else{const v={};null===G?G=[v]:G.push(v),ie++}if(N===ie)return ue.errors=[{params:{}}],!1;if(ie=j,null!==G&&(j?G.length=j:G=null),ie===$){if(!E||"object"!=typeof E||Array.isArray(E))return ue.errors=[{params:{type:"object"}}],!1;for(const v in E){let $=E[v];const j=ie,N=ie;let ae=!1;const ce=ie;if(!1!==$){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var le=ce===ie;if(ae=ae||le,!ae){const j=ie;if(!($ instanceof RegExp)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(le=j===ie,ae=ae||le,!ae){const j=ie;if("string"!=typeof $){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(le=j===ie,ae=ae||le,!ae){const j=ie;if(!($ instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(le=j===ie,ae=ae||le,!ae){const j=ie;pe($,{instancePath:R+"/cacheGroups/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:E,parentDataProperty:v,rootData:q})||(G=null===G?pe.errors:G.concat(pe.errors),ie=G.length),le=j===ie,ae=ae||le}}}}if(!ae){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}if(ie=N,null!==G&&(N?G.length=N:G=null),j!==ie)break}}ae=$===ie}else ae=!0;if(ae){if(void 0!==v.chunks){let E=v.chunks;const R=ie,$=ie;let j=!1;const N=ie;if("initial"!==E&&"async"!==E&&"all"!==E){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var me=N===ie;if(j=j||me,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}me=v===ie,j=j||me}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.defaultSizeTypes){let E=v.defaultSizeTypes;const R=ie;if(ie===R){if(!Array.isArray(E))return ue.errors=[{params:{type:"array"}}],!1;if(E.length<1)return ue.errors=[{params:{limit:1}}],!1;{const v=E.length;for(let R=0;R=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var _e=me===ie;if(le=le||_e,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}_e=v===ie,le=le||_e}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.fallbackCacheGroup){let E=v.fallbackCacheGroup;const R=ie;if(ie===R){if(!E||"object"!=typeof E||Array.isArray(E))return ue.errors=[{params:{type:"object"}}],!1;{const v=ie;for(const v in E)if("automaticNameDelimiter"!==v&&"chunks"!==v&&"maxAsyncSize"!==v&&"maxInitialSize"!==v&&"maxSize"!==v&&"minSize"!==v&&"minSizeReduction"!==v)return ue.errors=[{params:{additionalProperty:v}}],!1;if(v===ie){if(void 0!==E.automaticNameDelimiter){let v=E.automaticNameDelimiter;const R=ie;if(ie===R){if("string"!=typeof v)return ue.errors=[{params:{type:"string"}}],!1;if(v.length<1)return ue.errors=[{params:{}}],!1}var Ie=R===ie}else Ie=!0;if(Ie){if(void 0!==E.chunks){let v=E.chunks;const R=ie,$=ie;let j=!1;const N=ie;if("initial"!==v&&"async"!==v&&"all"!==v){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Me=N===ie;if(j=j||Me,!j){const E=ie;if(!(v instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Me=E===ie,j=j||Me}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0;if(Ie){if(void 0!==E.maxAsyncSize){let v=E.maxAsyncSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let ce=!1;const le=ie;if(ie===le)if("number"==typeof v){if(v<0||isNaN(v)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Oe=le===ie;if(ce=ce||Oe,!ce){const E=ie;if(ie===E)if(v&&"object"==typeof v&&!Array.isArray(v))for(const E in v){const R=ie;if("number"!=typeof v[E]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Oe=E===ie,ce=ce||Oe}if(ce)ie=ae,null!==G&&(ae?G.length=ae:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0;if(Ie){if(void 0!==E.maxInitialSize){let v=E.maxInitialSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let ce=!1;const le=ie;if(ie===le)if("number"==typeof v){if(v<0||isNaN(v)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Ne=le===ie;if(ce=ce||Ne,!ce){const E=ie;if(ie===E)if(v&&"object"==typeof v&&!Array.isArray(v))for(const E in v){const R=ie;if("number"!=typeof v[E]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Ne=E===ie,ce=ce||Ne}if(ce)ie=ae,null!==G&&(ae?G.length=ae:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0;if(Ie){if(void 0!==E.maxSize){let v=E.maxSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let ce=!1;const le=ie;if(ie===le)if("number"==typeof v){if(v<0||isNaN(v)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Be=le===ie;if(ce=ce||Be,!ce){const E=ie;if(ie===E)if(v&&"object"==typeof v&&!Array.isArray(v))for(const E in v){const R=ie;if("number"!=typeof v[E]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Be=E===ie,ce=ce||Be}if(ce)ie=ae,null!==G&&(ae?G.length=ae:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0;if(Ie){if(void 0!==E.minSize){let v=E.minSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let ce=!1;const le=ie;if(ie===le)if("number"==typeof v){if(v<0||isNaN(v)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Le=le===ie;if(ce=ce||Le,!ce){const E=ie;if(ie===E)if(v&&"object"==typeof v&&!Array.isArray(v))for(const E in v){const R=ie;if("number"!=typeof v[E]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Le=E===ie,ce=ce||Le}if(ce)ie=ae,null!==G&&(ae?G.length=ae:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0;if(Ie)if(void 0!==E.minSizeReduction){let v=E.minSizeReduction;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let ce=!1;const le=ie;if(ie===le)if("number"==typeof v){if(v<0||isNaN(v)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var qe=le===ie;if(ce=ce||qe,!ce){const E=ie;if(ie===E)if(v&&"object"==typeof v&&!Array.isArray(v))for(const E in v){const R=ie;if("number"!=typeof v[E]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}qe=E===ie,ce=ce||qe}if(ce)ie=ae,null!==G&&(ae?G.length=ae:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),Ie=R===ie}else Ie=!0}}}}}}}}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.filename){let R=v.filename;const $=ie,j=ie;let N=!1;const q=ie;if(ie===q)if("string"==typeof R){if(R.includes("!")||!1!==E.test(R)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}else if(R.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}var Ue=q===ie;if(N=N||Ue,!N){const v=ie;if(!(R instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Ue=v===ie,N=N||Ue}if(!N){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=j,null!==G&&(j?G.length=j:G=null),ae=$===ie}else ae=!0;if(ae){if(void 0!==v.hidePathInfo){const E=ie;if("boolean"!=typeof v.hidePathInfo)return ue.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.maxAsyncRequests){let E=v.maxAsyncRequests;const R=ie;if(ie===R){if("number"!=typeof E)return ue.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxAsyncSize){let E=v.maxAsyncSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Ge=me===ie;if(le=le||Ge,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Ge=v===ie,le=le||Ge}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxInitialRequests){let E=v.maxInitialRequests;const R=ie;if(ie===R){if("number"!=typeof E)return ue.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxInitialSize){let E=v.maxInitialSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var He=me===ie;if(le=le||He,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}He=v===ie,le=le||He}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.maxSize){let E=v.maxSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var We=me===ie;if(le=le||We,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}We=v===ie,le=le||We}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minChunks){let E=v.minChunks;const R=ie;if(ie===R){if("number"!=typeof E)return ue.errors=[{params:{type:"number"}}],!1;if(E<1||isNaN(E))return ue.errors=[{params:{comparison:">=",limit:1}}],!1}ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minRemainingSize){let E=v.minRemainingSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Qe=me===ie;if(le=le||Qe,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Qe=v===ie,le=le||Qe}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minSize){let E=v.minSize;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Je=me===ie;if(le=le||Je,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Je=v===ie,le=le||Je}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.minSizeReduction){let E=v.minSizeReduction;const R=ie,$=ie;let j=!1,N=null;const q=ie,ce=ie;let le=!1;const me=ie;if(ie===me)if("number"==typeof E){if(E<0||isNaN(E)){const v={params:{comparison:">=",limit:0}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}var Ve=me===ie;if(le=le||Ve,!le){const v=ie;if(ie===v)if(E&&"object"==typeof E&&!Array.isArray(E))for(const v in E){const R=ie;if("number"!=typeof E[v]){const v={params:{type:"number"}};null===G?G=[v]:G.push(v),ie++}if(R!==ie)break}else{const v={params:{type:"object"}};null===G?G=[v]:G.push(v),ie++}Ve=v===ie,le=le||Ve}if(le)ie=ce,null!==G&&(ce?G.length=ce:G=null);else{const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(q===ie&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae){if(void 0!==v.name){let E=v.name;const R=ie,$=ie;let j=!1;const N=ie;if(!1!==E){const v={params:{}};null===G?G=[v]:G.push(v),ie++}var Ke=N===ie;if(j=j||Ke,!j){const v=ie;if("string"!=typeof E){const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}if(Ke=v===ie,j=j||Ke,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Ke=v===ie,j=j||Ke}}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,ue.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ae=R===ie}else ae=!0;if(ae)if(void 0!==v.usedExports){const E=ie;if("boolean"!=typeof v.usedExports)return ue.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0}}}}}}}}}}}}}}}}}}}}return ue.errors=G,0===ie}function fe(v,{instancePath:E="",parentData:R,parentDataProperty:j,rootData:N=v}={}){let q=null,G=0;if(0===G){if(!v||"object"!=typeof v||Array.isArray(v))return fe.errors=[{params:{type:"object"}}],!1;{const R=G;for(const E in v)if(!$.call(Oe,E))return fe.errors=[{params:{additionalProperty:E}}],!1;if(R===G){if(void 0!==v.checkWasmTypes){const E=G;if("boolean"!=typeof v.checkWasmTypes)return fe.errors=[{params:{type:"boolean"}}],!1;var ie=E===G}else ie=!0;if(ie){if(void 0!==v.chunkIds){let E=v.chunkIds;const R=G;if("natural"!==E&&"named"!==E&&"deterministic"!==E&&"size"!==E&&"total-size"!==E&&!1!==E)return fe.errors=[{params:{}}],!1;ie=R===G}else ie=!0;if(ie){if(void 0!==v.concatenateModules){const E=G;if("boolean"!=typeof v.concatenateModules)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.emitOnErrors){const E=G;if("boolean"!=typeof v.emitOnErrors)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.flagIncludedChunks){const E=G;if("boolean"!=typeof v.flagIncludedChunks)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.innerGraph){const E=G;if("boolean"!=typeof v.innerGraph)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.mangleExports){let E=v.mangleExports;const R=G,$=G;let j=!1;const N=G;if("size"!==E&&"deterministic"!==E){const v={params:{}};null===q?q=[v]:q.push(v),G++}var ae=N===G;if(j=j||ae,!j){const v=G;if("boolean"!=typeof E){const v={params:{type:"boolean"}};null===q?q=[v]:q.push(v),G++}ae=v===G,j=j||ae}if(!j){const v={params:{}};return null===q?q=[v]:q.push(v),G++,fe.errors=q,!1}G=$,null!==q&&($?q.length=$:q=null),ie=R===G}else ie=!0;if(ie){if(void 0!==v.mangleWasmImports){const E=G;if("boolean"!=typeof v.mangleWasmImports)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.mergeDuplicateChunks){const E=G;if("boolean"!=typeof v.mergeDuplicateChunks)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.minimize){const E=G;if("boolean"!=typeof v.minimize)return fe.errors=[{params:{type:"boolean"}}],!1;ie=E===G}else ie=!0;if(ie){if(void 0!==v.minimizer){let E=v.minimizer;const R=G;if(G===R){if(!Array.isArray(E))return fe.errors=[{params:{type:"array"}}],!1;{const v=E.length;for(let R=0;R=",limit:1}}],!1}ce=R===ie}else ce=!0;if(ce){if(void 0!==v.hashFunction){let E=v.hashFunction;const R=ie,$=ie;let j=!1;const N=ie;if(ie===N)if("string"==typeof E){if(E.length<1){const v={params:{}};null===G?G=[v]:G.push(v),ie++}}else{const v={params:{type:"string"}};null===G?G=[v]:G.push(v),ie++}var Me=N===ie;if(j=j||Me,!j){const v=ie;if(!(E instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}Me=v===ie,j=j||Me}if(!j){const v={params:{}};return null===G?G=[v]:G.push(v),ie++,xe.errors=G,!1}ie=$,null!==G&&($?G.length=$:G=null),ce=R===ie}else ce=!0;if(ce){if(void 0!==v.hashSalt){let E=v.hashSalt;const R=ie;if(ie==ie){if("string"!=typeof E)return xe.errors=[{params:{type:"string"}}],!1;if(E.length<1)return xe.errors=[{params:{}}],!1}ce=R===ie}else ce=!0;if(ce){if(void 0!==v.hotUpdateChunkFilename){let R=v.hotUpdateChunkFilename;const $=ie;if(ie==ie){if("string"!=typeof R)return xe.errors=[{params:{type:"string"}}],!1;if(R.includes("!")||!1!==E.test(R))return xe.errors=[{params:{}}],!1}ce=$===ie}else ce=!0;if(ce){if(void 0!==v.hotUpdateGlobal){const E=ie;if("string"!=typeof v.hotUpdateGlobal)return xe.errors=[{params:{type:"string"}}],!1;ce=E===ie}else ce=!0;if(ce){if(void 0!==v.hotUpdateMainFilename){let R=v.hotUpdateMainFilename;const $=ie;if(ie==ie){if("string"!=typeof R)return xe.errors=[{params:{type:"string"}}],!1;if(R.includes("!")||!1!==E.test(R))return xe.errors=[{params:{}}],!1}ce=$===ie}else ce=!0;if(ce){if(void 0!==v.iife){const E=ie;if("boolean"!=typeof v.iife)return xe.errors=[{params:{type:"boolean"}}],!1;ce=E===ie}else ce=!0;if(ce){if(void 0!==v.importFunctionName){const E=ie;if("string"!=typeof v.importFunctionName)return xe.errors=[{params:{type:"string"}}],!1;ce=E===ie}else ce=!0;if(ce){if(void 0!==v.importMetaName){const E=ie;if("string"!=typeof v.importMetaName)return xe.errors=[{params:{type:"string"}}],!1;ce=E===ie}else ce=!0;if(ce){if(void 0!==v.library){const E=ie;Ae(v.library,{instancePath:R+"/library",parentData:v,parentDataProperty:"library",rootData:q})||(G=null===G?Ae.errors:G.concat(Ae.errors),ie=G.length),ce=E===ie}else ce=!0;if(ce){if(void 0!==v.libraryExport){let E=v.libraryExport;const R=ie,$=ie;let j=!1,N=null;const q=ie,ae=ie;let le=!1;const me=ie;if(ie===me)if(Array.isArray(E)){const v=E.length;for(let R=0;R=",limit:1}}],!1}le=R===ae}else le=!0;if(le){if(void 0!==v.performance){const E=ae;ke(v.performance,{instancePath:j+"/performance",parentData:v,parentDataProperty:"performance",rootData:G})||(ie=null===ie?ke.errors:ie.concat(ke.errors),ae=ie.length),le=E===ae}else le=!0;if(le){if(void 0!==v.plugins){const E=ae;je(v.plugins,{instancePath:j+"/plugins",parentData:v,parentDataProperty:"plugins",rootData:G})||(ie=null===ie?je.errors:ie.concat(je.errors),ae=ie.length),le=E===ae}else le=!0;if(le){if(void 0!==v.profile){const E=ae;if("boolean"!=typeof v.profile)return we.errors=[{params:{type:"boolean"}}],!1;le=E===ae}else le=!0;if(le){if(void 0!==v.recordsInputPath){let R=v.recordsInputPath;const $=ae,j=ae;let N=!1;const q=ae;if(!1!==R){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}var Oe=q===ae;if(N=N||Oe,!N){const v=ae;if(ae===v)if("string"==typeof R){if(R.includes("!")||!0!==E.test(R)){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"string"}};null===ie?ie=[v]:ie.push(v),ae++}Oe=v===ae,N=N||Oe}if(!N){const v={params:{}};return null===ie?ie=[v]:ie.push(v),ae++,we.errors=ie,!1}ae=j,null!==ie&&(j?ie.length=j:ie=null),le=$===ae}else le=!0;if(le){if(void 0!==v.recordsOutputPath){let R=v.recordsOutputPath;const $=ae,j=ae;let N=!1;const q=ae;if(!1!==R){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}var Te=q===ae;if(N=N||Te,!N){const v=ae;if(ae===v)if("string"==typeof R){if(R.includes("!")||!0!==E.test(R)){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"string"}};null===ie?ie=[v]:ie.push(v),ae++}Te=v===ae,N=N||Te}if(!N){const v={params:{}};return null===ie?ie=[v]:ie.push(v),ae++,we.errors=ie,!1}ae=j,null!==ie&&(j?ie.length=j:ie=null),le=$===ae}else le=!0;if(le){if(void 0!==v.recordsPath){let R=v.recordsPath;const $=ae,j=ae;let N=!1;const q=ae;if(!1!==R){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}var Ne=q===ae;if(N=N||Ne,!N){const v=ae;if(ae===v)if("string"==typeof R){if(R.includes("!")||!0!==E.test(R)){const v={params:{}};null===ie?ie=[v]:ie.push(v),ae++}}else{const v={params:{type:"string"}};null===ie?ie=[v]:ie.push(v),ae++}Ne=v===ae,N=N||Ne}if(!N){const v={params:{}};return null===ie?ie=[v]:ie.push(v),ae++,we.errors=ie,!1}ae=j,null!==ie&&(j?ie.length=j:ie=null),le=$===ae}else le=!0;if(le){if(void 0!==v.resolve){const E=ae;Se(v.resolve,{instancePath:j+"/resolve",parentData:v,parentDataProperty:"resolve",rootData:G})||(ie=null===ie?Se.errors:ie.concat(Se.errors),ae=ie.length),le=E===ae}else le=!0;if(le){if(void 0!==v.resolveLoader){const E=ae;Ce(v.resolveLoader,{instancePath:j+"/resolveLoader",parentData:v,parentDataProperty:"resolveLoader",rootData:G})||(ie=null===ie?Ce.errors:ie.concat(Ce.errors),ae=ie.length),le=E===ae}else le=!0;if(le){if(void 0!==v.snapshot){let R=v.snapshot;const $=ae;if(ae==ae){if(!R||"object"!=typeof R||Array.isArray(R))return we.errors=[{params:{type:"object"}}],!1;{const v=ae;for(const v in R)if("buildDependencies"!==v&&"immutablePaths"!==v&&"managedPaths"!==v&&"module"!==v&&"resolve"!==v&&"resolveBuildDependencies"!==v)return we.errors=[{params:{additionalProperty:v}}],!1;if(v===ae){if(void 0!==R.buildDependencies){let v=R.buildDependencies;const E=ae;if(ae===E){if(!v||"object"!=typeof v||Array.isArray(v))return we.errors=[{params:{type:"object"}}],!1;{const E=ae;for(const E in v)if("hash"!==E&&"timestamp"!==E)return we.errors=[{params:{additionalProperty:E}}],!1;if(E===ae){if(void 0!==v.hash){const E=ae;if("boolean"!=typeof v.hash)return we.errors=[{params:{type:"boolean"}}],!1;var Be=E===ae}else Be=!0;if(Be)if(void 0!==v.timestamp){const E=ae;if("boolean"!=typeof v.timestamp)return we.errors=[{params:{type:"boolean"}}],!1;Be=E===ae}else Be=!0}}}var Le=E===ae}else Le=!0;if(Le){if(void 0!==R.immutablePaths){let v=R.immutablePaths;const $=ae;if(ae===$){if(!Array.isArray(v))return we.errors=[{params:{type:"array"}}],!1;{const R=v.length;for(let $=0;$=",limit:1}}],!1}ie=R===G}else ie=!0;if(ie)if(void 0!==v.hashFunction){let E=v.hashFunction;const R=G,$=G;let j=!1,N=null;const ce=G,le=G;let me=!1;const _e=G;if(G===_e)if("string"==typeof E){if(E.length<1){const v={params:{}};null===q?q=[v]:q.push(v),G++}}else{const v={params:{type:"string"}};null===q?q=[v]:q.push(v),G++}var ae=_e===G;if(me=me||ae,!me){const v=G;if(!(E instanceof Function)){const v={params:{}};null===q?q=[v]:q.push(v),G++}ae=v===G,me=me||ae}if(me)G=le,null!==q&&(le?q.length=le:q=null);else{const v={params:{}};null===q?q=[v]:q.push(v),G++}if(ce===G&&(j=!0,N=0),!j){const v={params:{passingSchemas:N}};return null===q?q=[v]:q.push(v),G++,e.errors=q,!1}G=$,null!==q&&($?q.length=$:q=null),ie=R===G}else ie=!0}}}}}return e.errors=q,0===G}v.exports=e,v.exports["default"]=e},89849:function(v){"use strict";function e(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(q===ae)if(v&&"object"==typeof v&&!Array.isArray(v)){let E;if(void 0===v.resourceRegExp&&(E="resourceRegExp")){const v={params:{missingProperty:E}};null===N?N=[v]:N.push(v),q++}else{const E=q;for(const E in v)if("contextRegExp"!==E&&"resourceRegExp"!==E){const v={params:{additionalProperty:E}};null===N?N=[v]:N.push(v),q++;break}if(E===q){if(void 0!==v.contextRegExp){const E=q;if(!(v.contextRegExp instanceof RegExp)){const v={params:{}};null===N?N=[v]:N.push(v),q++}var ce=E===q}else ce=!0;if(ce)if(void 0!==v.resourceRegExp){const E=q;if(!(v.resourceRegExp instanceof RegExp)){const v={params:{}};null===N?N=[v]:N.push(v),q++}ce=E===q}else ce=!0}}}else{const v={params:{type:"object"}};null===N?N=[v]:N.push(v),q++}var le=ae===q;if(ie=ie||le,!ie){const E=q;if(q===E)if(v&&"object"==typeof v&&!Array.isArray(v)){let E;if(void 0===v.checkResource&&(E="checkResource")){const v={params:{missingProperty:E}};null===N?N=[v]:N.push(v),q++}else{const E=q;for(const E in v)if("checkResource"!==E){const v={params:{additionalProperty:E}};null===N?N=[v]:N.push(v),q++;break}if(E===q&&void 0!==v.checkResource&&!(v.checkResource instanceof Function)){const v={params:{}};null===N?N=[v]:N.push(v),q++}}}else{const v={params:{type:"object"}};null===N?N=[v]:N.push(v),q++}le=E===q,ie=ie||le}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,e.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),e.errors=N,0===q}v.exports=e,v.exports["default"]=e},79327:function(v){"use strict";function r(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){if(!v||"object"!=typeof v||Array.isArray(v))return r.errors=[{params:{type:"object"}}],!1;{const E=0;for(const E in v)if("parse"!==E)return r.errors=[{params:{additionalProperty:E}}],!1;if(0===E&&void 0!==v.parse&&!(v.parse instanceof Function))return r.errors=[{params:{}}],!1}return r.errors=null,!0}v.exports=r,v.exports["default"]=r},67892:function(v){const E=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function e(v,{instancePath:R="",parentData:$,parentDataProperty:j,rootData:N=v}={}){if(!v||"object"!=typeof v||Array.isArray(v))return e.errors=[{params:{type:"object"}}],!1;if(void 0!==v.debug){const E=0;if("boolean"!=typeof v.debug)return e.errors=[{params:{type:"boolean"}}],!1;var q=0===E}else q=!0;if(q){if(void 0!==v.minimize){const E=0;if("boolean"!=typeof v.minimize)return e.errors=[{params:{type:"boolean"}}],!1;q=0===E}else q=!0;if(q)if(void 0!==v.options){let R=v.options;const $=0;if(0===$){if(!R||"object"!=typeof R||Array.isArray(R))return e.errors=[{params:{type:"object"}}],!1;if(void 0!==R.context){let v=R.context;if("string"!=typeof v)return e.errors=[{params:{type:"string"}}],!1;if(v.includes("!")||!0!==E.test(v))return e.errors=[{params:{}}],!1}}q=0===$}else q=!0}return e.errors=null,!0}v.exports=e,v.exports["default"]=e},49196:function(v){"use strict";v.exports=t,v.exports["default"]=t;const E={activeModules:{type:"boolean"},dependencies:{type:"boolean"},dependenciesCount:{type:"number"},entries:{type:"boolean"},handler:{oneOf:[{$ref:"#/definitions/HandlerFunction"}]},modules:{type:"boolean"},modulesCount:{type:"number"},percentBy:{enum:["entries","modules","dependencies",null]},profile:{enum:[!0,!1,null]}},R=Object.prototype.hasOwnProperty;function n(v,{instancePath:$="",parentData:j,parentDataProperty:N,rootData:q=v}={}){let G=null,ie=0;if(0===ie){if(!v||"object"!=typeof v||Array.isArray(v))return n.errors=[{params:{type:"object"}}],!1;{const $=ie;for(const $ in v)if(!R.call(E,$))return n.errors=[{params:{additionalProperty:$}}],!1;if($===ie){if(void 0!==v.activeModules){const E=ie;if("boolean"!=typeof v.activeModules)return n.errors=[{params:{type:"boolean"}}],!1;var ae=E===ie}else ae=!0;if(ae){if(void 0!==v.dependencies){const E=ie;if("boolean"!=typeof v.dependencies)return n.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.dependenciesCount){const E=ie;if("number"!=typeof v.dependenciesCount)return n.errors=[{params:{type:"number"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.entries){const E=ie;if("boolean"!=typeof v.entries)return n.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.handler){const E=ie,R=ie;let $=!1,j=null;const N=ie;if(!(v.handler instanceof Function)){const v={params:{}};null===G?G=[v]:G.push(v),ie++}if(N===ie&&($=!0,j=0),!$){const v={params:{passingSchemas:j}};return null===G?G=[v]:G.push(v),ie++,n.errors=G,!1}ie=R,null!==G&&(R?G.length=R:G=null),ae=E===ie}else ae=!0;if(ae){if(void 0!==v.modules){const E=ie;if("boolean"!=typeof v.modules)return n.errors=[{params:{type:"boolean"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.modulesCount){const E=ie;if("number"!=typeof v.modulesCount)return n.errors=[{params:{type:"number"}}],!1;ae=E===ie}else ae=!0;if(ae){if(void 0!==v.percentBy){let E=v.percentBy;const R=ie;if("entries"!==E&&"modules"!==E&&"dependencies"!==E&&null!==E)return n.errors=[{params:{}}],!1;ae=R===ie}else ae=!0;if(ae)if(void 0!==v.profile){let E=v.profile;const R=ie;if(!0!==E&&!1!==E&&null!==E)return n.errors=[{params:{}}],!1;ae=R===ie}else ae=!0}}}}}}}}}}return n.errors=G,0===ie}function t(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;n(v,{instancePath:E,parentData:R,parentDataProperty:$,rootData:j})||(N=null===N?n.errors:N.concat(n.errors),q=N.length);var ce=ae===q;if(ie=ie||ce,!ie){const E=q;if(!(v instanceof Function)){const v={params:{}};null===N?N=[v]:N.push(v),q++}ce=E===q,ie=ie||ce}if(!ie){const v={params:{}};return null===N?N=[v]:N.push(v),q++,t.errors=N,!1}return q=G,null!==N&&(G?N.length=G:N=null),t.errors=N,0===q}},74633:function(v){const E=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;v.exports=l,v.exports["default"]=l;const R={append:{anyOf:[{enum:[!1,null]},{type:"string",minLength:1}]},columns:{type:"boolean"},exclude:{oneOf:[{$ref:"#/definitions/rules"}]},fallbackModuleFilenameTemplate:{anyOf:[{type:"string",minLength:1},{instanceof:"Function"}]},fileContext:{type:"string"},filename:{anyOf:[{enum:[!1,null]},{type:"string",absolutePath:!1,minLength:1}]},include:{oneOf:[{$ref:"#/definitions/rules"}]},module:{type:"boolean"},moduleFilenameTemplate:{anyOf:[{type:"string",minLength:1},{instanceof:"Function"}]},namespace:{type:"string"},noSources:{type:"boolean"},publicPath:{type:"string"},sourceRoot:{type:"string"},test:{$ref:"#/definitions/rules"}},$=Object.prototype.hasOwnProperty;function s(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){let N=null,q=0;const G=q;let ie=!1;const ae=q;if(q===ae)if(Array.isArray(v)){const E=v.length;for(let R=0;R=",limit:1}}],!1}N=0===R}else N=!0}}}}return r.errors=null,!0}v.exports=r,v.exports["default"]=r},927:function(v){"use strict";function r(v,{instancePath:E="",parentData:R,parentDataProperty:$,rootData:j=v}={}){if(!v||"object"!=typeof v||Array.isArray(v))return r.errors=[{params:{type:"object"}}],!1;{let E;if(void 0===v.minChunkSize&&(E="minChunkSize"))return r.errors=[{params:{missingProperty:E}}],!1;{const E=0;for(const E in v)if("chunkOverhead"!==E&&"entryChunkMultiplicator"!==E&&"minChunkSize"!==E)return r.errors=[{params:{additionalProperty:E}}],!1;if(0===E){if(void 0!==v.chunkOverhead){const E=0;if("number"!=typeof v.chunkOverhead)return r.errors=[{params:{type:"number"}}],!1;var N=0===E}else N=!0;if(N){if(void 0!==v.entryChunkMultiplicator){const E=0;if("number"!=typeof v.entryChunkMultiplicator)return r.errors=[{params:{type:"number"}}],!1;N=0===E}else N=!0;if(N)if(void 0!==v.minChunkSize){const E=0;if("number"!=typeof v.minChunkSize)return r.errors=[{params:{type:"number"}}],!1;N=0===E}else N=!0}}}}return r.errors=null,!0}v.exports=r,v.exports["default"]=r},29911:function(v){const E=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;v.exports=n,v.exports["default"]=n;const R=new RegExp("^https?://","u");function e(v,{instancePath:$="",parentData:j,parentDataProperty:N,rootData:q=v}={}){let G=null,ie=0;if(0===ie){if(!v||"object"!=typeof v||Array.isArray(v))return e.errors=[{params:{type:"object"}}],!1;{let $;if(void 0===v.allowedUris&&($="allowedUris"))return e.errors=[{params:{missingProperty:$}}],!1;{const $=ie;for(const E in v)if("allowedUris"!==E&&"cacheLocation"!==E&&"frozen"!==E&&"lockfileLocation"!==E&&"proxy"!==E&&"upgrade"!==E)return e.errors=[{params:{additionalProperty:E}}],!1;if($===ie){if(void 0!==v.allowedUris){let E=v.allowedUris;const $=ie;if(ie==ie){if(!Array.isArray(E))return e.errors=[{params:{type:"array"}}],!1;{const v=E.length;for(let $=0;$parse(v)));const N=v.length+1,q=($.__heap_base.value||$.__heap_base)+4*N-$.memory.buffer.byteLength;q>0&&$.memory.grow(Math.ceil(q/65536));const G=$.sa(N-1);if((R?C:Q)(v,new Uint16Array($.memory.buffer,G,N)),!$.parse())throw Object.assign(new Error(`Parse error ${E}:${v.slice(0,$.e()).split("\n").length}:${$.e()-v.lastIndexOf("\n",$.e()-1)}`),{idx:$.e()});const ie=[],ae=[];for(;$.ri();){const E=$.is(),R=$.ie(),j=$.ai(),N=$.id(),q=$.ss(),G=$.se();let ae;$.ip()&&(ae=o(v.slice(-1===N?E-1:E,-1===N?R+1:R))),ie.push({n:ae,s:E,e:R,ss:q,se:G,d:N,a:j})}for(;$.re();)ae.push(v.slice($.es(),$.ee()));function o(v){try{return(0,eval)(v)}catch(v){}}return[ie,ae,!!$.f()]}function Q(v,E){const R=v.length;let $=0;for(;$>>8}}function C(v,E){const R=v.length;let $=0;for(;$v.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:v})=>{$=v}));var N;E.init=j},13348:function(v){"use strict";v.exports={i8:"5.1.1"}},14730:function(v){"use strict";v.exports={version:"4.3.0"}},61752:function(v){"use strict";v.exports={i8:"4.3.0"}},66282:function(v){"use strict";v.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},27012:function(v){"use strict";v.exports={i8:"5.74.0"}},13954:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"Amd":{"description":"Set the value of `require.amd` and `define.amd`. Or disable AMD support.","anyOf":[{"description":"You can pass `false` to disable AMD support.","enum":[false]},{"description":"You can pass an object to set the value of `require.amd` and `define.amd`.","type":"object"}]},"AssetFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((name: string, asset: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsAsset) => boolean)"}]},"AssetFilterTypes":{"description":"Filtering modules.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/AssetFilterItemTypes"}]}},{"$ref":"#/definitions/AssetFilterItemTypes"}]},"AssetGeneratorDataUrl":{"description":"The options for data url generator.","anyOf":[{"$ref":"#/definitions/AssetGeneratorDataUrlOptions"},{"$ref":"#/definitions/AssetGeneratorDataUrlFunction"}]},"AssetGeneratorDataUrlFunction":{"description":"Function that executes for module and should return an DataUrl string. It can have a string as \'ident\' property which contributes to the module hash.","instanceof":"Function","tsType":"((source: string | Buffer, context: { filename: string, module: import(\'../lib/Module\') }) => string)"},"AssetGeneratorDataUrlOptions":{"description":"Options object for data url generation.","type":"object","additionalProperties":false,"properties":{"encoding":{"description":"Asset encoding (defaults to base64).","enum":[false,"base64"]},"mimetype":{"description":"Asset mimetype (getting from file extension by default).","type":"string"}}},"AssetGeneratorOptions":{"description":"Generator options for asset modules.","type":"object","implements":["#/definitions/AssetInlineGeneratorOptions","#/definitions/AssetResourceGeneratorOptions"],"additionalProperties":false,"properties":{"dataUrl":{"$ref":"#/definitions/AssetGeneratorDataUrl"},"emit":{"description":"Emit an output asset from this asset module. This can be set to \'false\' to omit emitting e. g. for SSR.","type":"boolean"},"filename":{"$ref":"#/definitions/FilenameTemplate"},"outputPath":{"$ref":"#/definitions/AssetModuleOutputPath"},"publicPath":{"$ref":"#/definitions/RawPublicPath"}}},"AssetInlineGeneratorOptions":{"description":"Generator options for asset/inline modules.","type":"object","additionalProperties":false,"properties":{"dataUrl":{"$ref":"#/definitions/AssetGeneratorDataUrl"}}},"AssetModuleFilename":{"description":"The filename of asset modules as relative path inside the \'output.path\' directory.","anyOf":[{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"AssetModuleOutputPath":{"description":"Emit the asset in the specified folder relative to \'output.path\'. This should only be needed when custom \'publicPath\' is specified to match the folder structure there.","anyOf":[{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"AssetParserDataUrlFunction":{"description":"Function that executes for module and should return whenever asset should be inlined as DataUrl.","instanceof":"Function","tsType":"((source: string | Buffer, context: { filename: string, module: import(\'../lib/Module\') }) => boolean)"},"AssetParserDataUrlOptions":{"description":"Options object for DataUrl condition.","type":"object","additionalProperties":false,"properties":{"maxSize":{"description":"Maximum size of asset that should be inline as modules. Default: 8kb.","type":"number"}}},"AssetParserOptions":{"description":"Parser options for asset modules.","type":"object","additionalProperties":false,"properties":{"dataUrlCondition":{"description":"The condition for inlining the asset as DataUrl.","anyOf":[{"$ref":"#/definitions/AssetParserDataUrlOptions"},{"$ref":"#/definitions/AssetParserDataUrlFunction"}]}}},"AssetResourceGeneratorOptions":{"description":"Generator options for asset/resource modules.","type":"object","additionalProperties":false,"properties":{"emit":{"description":"Emit an output asset from this asset module. This can be set to \'false\' to omit emitting e. g. for SSR.","type":"boolean"},"filename":{"$ref":"#/definitions/FilenameTemplate"},"outputPath":{"$ref":"#/definitions/AssetModuleOutputPath"},"publicPath":{"$ref":"#/definitions/RawPublicPath"}}},"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"Bail":{"description":"Report the first error as a hard error instead of tolerating it.","type":"boolean"},"CacheOptions":{"description":"Cache generated modules and chunks to improve performance for multiple incremental builds.","anyOf":[{"description":"Enable in memory caching.","enum":[true]},{"$ref":"#/definitions/CacheOptionsNormalized"}]},"CacheOptionsNormalized":{"description":"Cache generated modules and chunks to improve performance for multiple incremental builds.","anyOf":[{"description":"Disable caching.","enum":[false]},{"$ref":"#/definitions/MemoryCacheOptions"},{"$ref":"#/definitions/FileCacheOptions"}]},"Charset":{"description":"Add charset attribute for script tag.","type":"boolean"},"ChunkFilename":{"description":"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"ChunkFormat":{"description":"The format of chunks (formats included by default are \'array-push\' (web/WebWorker), \'commonjs\' (node.js), \'module\' (ESM), but others might be added by plugins).","anyOf":[{"enum":["array-push","commonjs","module",false]},{"type":"string"}]},"ChunkLoadTimeout":{"description":"Number of milliseconds before chunk request expires.","type":"number"},"ChunkLoading":{"description":"The method of loading chunks (methods included by default are \'jsonp\' (web), \'import\' (ESM), \'importScripts\' (WebWorker), \'require\' (sync node.js), \'async-node\' (async node.js), but others might be added by plugins).","anyOf":[{"enum":[false]},{"$ref":"#/definitions/ChunkLoadingType"}]},"ChunkLoadingGlobal":{"description":"The global variable used by webpack for loading of chunks.","type":"string"},"ChunkLoadingType":{"description":"The method of loading chunks (methods included by default are \'jsonp\' (web), \'import\' (ESM), \'importScripts\' (WebWorker), \'require\' (sync node.js), \'async-node\' (async node.js), but others might be added by plugins).","anyOf":[{"enum":["jsonp","import-scripts","require","async-node","import"]},{"type":"string"}]},"Clean":{"description":"Clean the output directory before emit.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/CleanOptions"}]},"CleanOptions":{"description":"Advanced options for cleaning assets.","type":"object","additionalProperties":false,"properties":{"dry":{"description":"Log the assets that should be removed instead of deleting them.","type":"boolean"},"keep":{"description":"Keep these assets.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((filename: string) => boolean)"}]}}},"CompareBeforeEmit":{"description":"Check if to be emitted file already exists and have the same content before writing to output filesystem.","type":"boolean"},"Context":{"description":"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.","type":"string","absolutePath":true},"CrossOriginLoading":{"description":"This option enables cross-origin loading of chunks.","enum":[false,"anonymous","use-credentials"]},"CssChunkFilename":{"description":"Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"CssExperimentOptions":{"description":"Options for css handling.","type":"object","additionalProperties":false,"properties":{"exportsOnly":{"description":"Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.","type":"boolean"}}},"CssFilename":{"description":"Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"CssGeneratorOptions":{"description":"Generator options for css modules.","type":"object","additionalProperties":false,"properties":{}},"CssParserOptions":{"description":"Parser options for css modules.","type":"object","additionalProperties":false,"properties":{}},"Dependencies":{"description":"References to other configurations to depend on.","type":"array","items":{"description":"References to another configuration to depend on.","type":"string"}},"DevServer":{"description":"Options for the webpack-dev-server.","type":"object"},"DevTool":{"description":"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).","anyOf":[{"enum":[false,"eval"]},{"type":"string","pattern":"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$"}]},"DevtoolFallbackModuleFilenameTemplate":{"description":"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"DevtoolModuleFilenameTemplate":{"description":"Filename template string of function for the sources array in a generated SourceMap.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"DevtoolNamespace":{"description":"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It\'s useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.","type":"string"},"EmptyGeneratorOptions":{"description":"No generator options are supported for this module type.","type":"object","additionalProperties":false},"EmptyParserOptions":{"description":"No parser options are supported for this module type.","type":"object","additionalProperties":false},"EnabledChunkLoadingTypes":{"description":"List of chunk loading types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/ChunkLoadingType"}},"EnabledLibraryTypes":{"description":"List of library types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/LibraryType"}},"EnabledWasmLoadingTypes":{"description":"List of wasm loading types enabled for use by entry points.","type":"array","items":{"$ref":"#/definitions/WasmLoadingType"}},"Entry":{"description":"The entry point(s) of the compilation.","anyOf":[{"$ref":"#/definitions/EntryDynamic"},{"$ref":"#/definitions/EntryStatic"}]},"EntryDescription":{"description":"An object with entry point description.","type":"object","additionalProperties":false,"properties":{"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"baseUri":{"description":"Base uri for this entry.","type":"string"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"dependOn":{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","anyOf":[{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","type":"array","items":{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1}]},"filename":{"$ref":"#/definitions/EntryFilename"},"import":{"$ref":"#/definitions/EntryItem"},"layer":{"$ref":"#/definitions/Layer"},"library":{"$ref":"#/definitions/LibraryOptions"},"publicPath":{"$ref":"#/definitions/PublicPath"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"}},"required":["import"]},"EntryDescriptionNormalized":{"description":"An object with entry point description.","type":"object","additionalProperties":false,"properties":{"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"baseUri":{"description":"Base uri for this entry.","type":"string"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"dependOn":{"description":"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.","type":"array","items":{"description":"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},"filename":{"$ref":"#/definitions/Filename"},"import":{"description":"Module(s) that are loaded upon startup. The last one is exported.","type":"array","items":{"description":"Module that is loaded upon startup. Only the last one is exported.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},"layer":{"$ref":"#/definitions/Layer"},"library":{"$ref":"#/definitions/LibraryOptions"},"publicPath":{"$ref":"#/definitions/PublicPath"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"EntryDynamic":{"description":"A Function returning an entry object, an entry string, an entry array or a promise to these things.","instanceof":"Function","tsType":"(() => EntryStatic | Promise)"},"EntryDynamicNormalized":{"description":"A Function returning a Promise resolving to a normalized entry.","instanceof":"Function","tsType":"(() => Promise)"},"EntryFilename":{"description":"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"EntryItem":{"description":"Module(s) that are loaded upon startup.","anyOf":[{"description":"All modules are loaded upon startup. The last one is exported.","type":"array","items":{"description":"A module that is loaded upon startup. Only the last one is exported.","type":"string","minLength":1},"minItems":1,"uniqueItems":true},{"description":"The string is resolved to a module which is loaded upon startup.","type":"string","minLength":1}]},"EntryNormalized":{"description":"The entry point(s) of the compilation.","anyOf":[{"$ref":"#/definitions/EntryDynamicNormalized"},{"$ref":"#/definitions/EntryStaticNormalized"}]},"EntryObject":{"description":"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.","type":"object","additionalProperties":{"description":"An entry point with name.","anyOf":[{"$ref":"#/definitions/EntryItem"},{"$ref":"#/definitions/EntryDescription"}]}},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"EntryStatic":{"description":"A static entry description.","anyOf":[{"$ref":"#/definitions/EntryObject"},{"$ref":"#/definitions/EntryUnnamed"}]},"EntryStaticNormalized":{"description":"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.","type":"object","additionalProperties":{"description":"An object with entry point description.","oneOf":[{"$ref":"#/definitions/EntryDescriptionNormalized"}]}},"EntryUnnamed":{"description":"An entry point without name.","oneOf":[{"$ref":"#/definitions/EntryItem"}]},"Environment":{"description":"The abilities of the environment where the webpack generated code should run.","type":"object","additionalProperties":false,"properties":{"arrowFunction":{"description":"The environment supports arrow functions (\'() => { ... }\').","type":"boolean"},"bigIntLiteral":{"description":"The environment supports BigInt as literal (123n).","type":"boolean"},"const":{"description":"The environment supports const and let for variable declarations.","type":"boolean"},"destructuring":{"description":"The environment supports destructuring (\'{ a, b } = obj\').","type":"boolean"},"dynamicImport":{"description":"The environment supports an async import() function to import EcmaScript modules.","type":"boolean"},"forOf":{"description":"The environment supports \'for of\' iteration (\'for (const x of array) { ... }\').","type":"boolean"},"module":{"description":"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from \'...\').","type":"boolean"},"optionalChaining":{"description":"The environment supports optional chaining (\'obj?.a\' or \'obj?.()\').","type":"boolean"},"templateLiteral":{"description":"The environment supports template literals.","type":"boolean"}}},"Experiments":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","implements":["#/definitions/ExperimentsCommon"],"additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"buildHttp":{"description":"Build http(s): urls using a lockfile and resource content cache.","anyOf":[{"$ref":"#/definitions/HttpUriAllowedUris"},{"$ref":"#/definitions/HttpUriOptions"}]},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"css":{"description":"Enable css support.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/CssExperimentOptions"}]},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"lazyCompilation":{"description":"Compile entrypoints and import()s only when they are accessed.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/LazyCompilationOptions"}]},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExperimentsCommon":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExperimentsNormalized":{"description":"Enables/Disables experiments (experimental features with relax SemVer compatibility).","type":"object","implements":["#/definitions/ExperimentsCommon"],"additionalProperties":false,"properties":{"asyncWebAssembly":{"description":"Support WebAssembly as asynchronous EcmaScript Module.","type":"boolean"},"backCompat":{"description":"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.","type":"boolean"},"buildHttp":{"description":"Build http(s): urls using a lockfile and resource content cache.","oneOf":[{"$ref":"#/definitions/HttpUriOptions"}]},"cacheUnaffected":{"description":"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"css":{"description":"Enable css support.","oneOf":[{"$ref":"#/definitions/CssExperimentOptions"}]},"futureDefaults":{"description":"Apply defaults of next major version.","type":"boolean"},"layers":{"description":"Enable module layers.","type":"boolean"},"lazyCompilation":{"description":"Compile entrypoints and import()s only when they are accessed.","oneOf":[{"$ref":"#/definitions/LazyCompilationOptions"}]},"outputModule":{"description":"Allow output javascript files as module source type.","type":"boolean"},"syncWebAssembly":{"description":"Support WebAssembly as synchronous EcmaScript Module (outdated).","type":"boolean"},"topLevelAwait":{"description":"Allow using top-level-await in EcmaScript Modules.","type":"boolean"}}},"ExternalItem":{"description":"Specify dependency that shouldn\'t be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.","anyOf":[{"description":"Every matched dependency becomes external.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An exact matched dependency becomes external. The same string is used as external dependency.","type":"string"},{"description":"If an dependency matches exactly a property of the object, the property value is used as dependency.","type":"object","additionalProperties":{"$ref":"#/definitions/ExternalItemValue"},"properties":{"byLayer":{"description":"Specify externals depending on the layer.","anyOf":[{"type":"object","additionalProperties":{"$ref":"#/definitions/ExternalItem"}},{"instanceof":"Function","tsType":"((layer: string | null) => ExternalItem)"}]}}},{"description":"The function is called on each dependency (`function(context, request, callback(err, result))`).","instanceof":"Function","tsType":"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))"}]},"ExternalItemFunctionData":{"description":"Data object passed as argument when a function is set for \'externals\'.","type":"object","additionalProperties":false,"properties":{"context":{"description":"The directory in which the request is placed.","type":"string"},"contextInfo":{"description":"Contextual information.","type":"object","tsType":"import(\'../lib/ModuleFactory\').ModuleFactoryCreateDataContextInfo"},"dependencyType":{"description":"The category of the referencing dependencies.","type":"string"},"getResolve":{"description":"Get a resolve function with the current resolver options.","instanceof":"Function","tsType":"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))"},"request":{"description":"The request as written by the user in the require/import expression/statement.","type":"string"}}},"ExternalItemValue":{"description":"The dependency used for the external.","anyOf":[{"type":"array","items":{"description":"A part of the target of the external.","type":"string","minLength":1}},{"description":"`true`: The dependency name is used as target of the external.","type":"boolean"},{"description":"The target of the external.","type":"string"},{"type":"object"}]},"Externals":{"description":"Specify dependencies that shouldn\'t be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.","anyOf":[{"type":"array","items":{"$ref":"#/definitions/ExternalItem"}},{"$ref":"#/definitions/ExternalItem"}]},"ExternalsPresets":{"description":"Enable presets of externals for specific targets.","type":"object","additionalProperties":false,"properties":{"electron":{"description":"Treat common electron built-in modules in main and preload context like \'electron\', \'ipc\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronMain":{"description":"Treat electron built-in modules in the main context like \'app\', \'ipc-main\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronPreload":{"description":"Treat electron built-in modules in the preload context like \'web-frame\', \'ipc-renderer\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"electronRenderer":{"description":"Treat electron built-in modules in the renderer context like \'web-frame\', \'ipc-renderer\' or \'shell\' as external and load them via require() when used.","type":"boolean"},"node":{"description":"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.","type":"boolean"},"nwjs":{"description":"Treat NW.js legacy nw.gui module as external and load it via require() when used.","type":"boolean"},"web":{"description":"Treat references to \'http(s)://...\' and \'std:...\' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).","type":"boolean"},"webAsync":{"description":"Treat references to \'http(s)://...\' and \'std:...\' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).","type":"boolean"}}},"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"FileCacheOptions":{"description":"Options object for persistent file-based caching.","type":"object","additionalProperties":false,"properties":{"allowCollectingMemory":{"description":"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.","type":"boolean"},"buildDependencies":{"description":"Dependencies the build depends on (in multiple categories, default categories: \'defaultWebpack\').","type":"object","additionalProperties":{"description":"List of dependencies the build depends on.","type":"array","items":{"description":"Request to a dependency (resolved as directory relative to the context directory).","type":"string","minLength":1}}},"cacheDirectory":{"description":"Base directory for the cache (defaults to node_modules/.cache/webpack).","type":"string","absolutePath":true},"cacheLocation":{"description":"Locations for the cache (defaults to cacheDirectory / name).","type":"string","absolutePath":true},"compression":{"description":"Compression type used for the cache files.","enum":[false,"gzip","brotli"]},"hashAlgorithm":{"description":"Algorithm used for generation the hash (see node.js crypto package).","type":"string"},"idleTimeout":{"description":"Time in ms after which idle period the cache storing should happen.","type":"number","minimum":0},"idleTimeoutAfterLargeChanges":{"description":"Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).","type":"number","minimum":0},"idleTimeoutForInitialStore":{"description":"Time in ms after which idle period the initial cache storing should happen.","type":"number","minimum":0},"immutablePaths":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","type":"array","items":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","anyOf":[{"description":"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to an immutable directory (usually a package manager cache directory).","type":"string","absolutePath":true,"minLength":1}]}},"managedPaths":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","type":"array","items":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","anyOf":[{"description":"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to a managed directory (usually a node_modules directory).","type":"string","absolutePath":true,"minLength":1}]}},"maxAge":{"description":"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).","type":"number","minimum":0},"maxMemoryGenerations":{"description":"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.","type":"number","minimum":0},"memoryCacheUnaffected":{"description":"Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.","type":"boolean"},"name":{"description":"Name for the cache. Different names will lead to different coexisting caches.","type":"string"},"profile":{"description":"Track and log detailed timing information for individual cache items.","type":"boolean"},"store":{"description":"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).","enum":["pack"]},"type":{"description":"Filesystem caching.","enum":["filesystem"]},"version":{"description":"Version of the cache data. Different versions won\'t allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn\'t allow to reuse cache. This will invalidate the cache.","type":"string"}},"required":["type"]},"Filename":{"description":"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","oneOf":[{"$ref":"#/definitions/FilenameTemplate"}]},"FilenameTemplate":{"description":"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by \'/\'! The specified path is joined with the value of the \'output.path\' option to determine the location on disk.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"FilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((value: string) => boolean)"}]},"FilterTypes":{"description":"Filtering values.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/FilterItemTypes"}]}},{"$ref":"#/definitions/FilterItemTypes"}]},"GeneratorOptionsByModuleType":{"description":"Specify options for each generator.","type":"object","additionalProperties":{"description":"Options for generating.","type":"object","additionalProperties":true},"properties":{"asset":{"$ref":"#/definitions/AssetGeneratorOptions"},"asset/inline":{"$ref":"#/definitions/AssetInlineGeneratorOptions"},"asset/resource":{"$ref":"#/definitions/AssetResourceGeneratorOptions"},"javascript":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/auto":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/dynamic":{"$ref":"#/definitions/EmptyGeneratorOptions"},"javascript/esm":{"$ref":"#/definitions/EmptyGeneratorOptions"}}},"GlobalObject":{"description":"An expression which is used to address the global object/scope in runtime code.","type":"string","minLength":1},"HashDigest":{"description":"Digest type used for the hash.","type":"string"},"HashDigestLength":{"description":"Number of chars which are used for the hash.","type":"number","minimum":1},"HashFunction":{"description":"Algorithm used for generation the hash (see node.js crypto package).","anyOf":[{"type":"string","minLength":1},{"instanceof":"Function","tsType":"typeof import(\'../lib/util/Hash\')"}]},"HashSalt":{"description":"Any string which is added to the hash to salt it.","type":"string","minLength":1},"HotUpdateChunkFilename":{"description":"The filename of the Hot Update Chunks. They are inside the output.path directory.","type":"string","absolutePath":false},"HotUpdateGlobal":{"description":"The global variable used by webpack for loading of hot update chunks.","type":"string"},"HotUpdateMainFilename":{"description":"The filename of the Hot Update Main File. It is inside the \'output.path\' directory.","type":"string","absolutePath":false},"HttpUriAllowedUris":{"description":"List of allowed URIs for building http resources.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/HttpUriOptionsAllowedUris"}]},"HttpUriOptions":{"description":"Options for building http resources.","type":"object","additionalProperties":false,"properties":{"allowedUris":{"$ref":"#/definitions/HttpUriOptionsAllowedUris"},"cacheLocation":{"description":"Location where resource content is stored for lockfile entries. It\'s also possible to disable storing by passing false.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"frozen":{"description":"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.","type":"boolean"},"lockfileLocation":{"description":"Location of the lockfile.","type":"string","absolutePath":true},"proxy":{"description":"Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.","type":"string"},"upgrade":{"description":"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.","type":"boolean"}},"required":["allowedUris"]},"HttpUriOptionsAllowedUris":{"description":"List of allowed URIs (resp. the beginning of them).","type":"array","items":{"description":"List of allowed URIs (resp. the beginning of them).","anyOf":[{"description":"Allowed URI pattern.","instanceof":"RegExp","tsType":"RegExp"},{"description":"Allowed URI (resp. the beginning of it).","type":"string","pattern":"^https?://"},{"description":"Allowed URI filter function.","instanceof":"Function","tsType":"((uri: string) => boolean)"}]}},"IgnoreWarnings":{"description":"Ignore specific warnings.","type":"array","items":{"description":"Ignore specific warnings.","anyOf":[{"description":"A RegExp to select the warning message.","instanceof":"RegExp","tsType":"RegExp"},{"type":"object","additionalProperties":false,"properties":{"file":{"description":"A RegExp to select the origin file for the warning.","instanceof":"RegExp","tsType":"RegExp"},"message":{"description":"A RegExp to select the warning message.","instanceof":"RegExp","tsType":"RegExp"},"module":{"description":"A RegExp to select the origin module for the warning.","instanceof":"RegExp","tsType":"RegExp"}}},{"description":"A custom function to select warnings based on the raw warning instance.","instanceof":"Function","tsType":"((warning: import(\'../lib/WebpackError\'), compilation: import(\'../lib/Compilation\')) => boolean)"}]}},"IgnoreWarningsNormalized":{"description":"Ignore specific warnings.","type":"array","items":{"description":"A function to select warnings based on the raw warning instance.","instanceof":"Function","tsType":"((warning: import(\'../lib/WebpackError\'), compilation: import(\'../lib/Compilation\')) => boolean)"}},"Iife":{"description":"Wrap javascript code into IIFE\'s to avoid leaking into global scope.","type":"boolean"},"ImportFunctionName":{"description":"The name of the native import() function (can be exchanged for a polyfill).","type":"string"},"ImportMetaName":{"description":"The name of the native import.meta object (can be exchanged for a polyfill).","type":"string"},"InfrastructureLogging":{"description":"Options for infrastructure level logging.","type":"object","additionalProperties":false,"properties":{"appendOnly":{"description":"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.","type":"boolean"},"colors":{"description":"Enables/Disables colorful output. This option is only used when no custom console is provided.","type":"boolean"},"console":{"description":"Custom console used for logging.","tsType":"Console"},"debug":{"description":"Enable debug logging for specific loggers.","anyOf":[{"description":"Enable/Disable debug logging for all loggers.","type":"boolean"},{"$ref":"#/definitions/FilterTypes"}]},"level":{"description":"Log level.","enum":["none","error","warn","info","log","verbose"]},"stream":{"description":"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.","tsType":"NodeJS.WritableStream"}}},"JavascriptParserOptions":{"description":"Parser options for javascript modules.","type":"object","additionalProperties":true,"properties":{"amd":{"$ref":"#/definitions/Amd"},"browserify":{"description":"Enable/disable special handling for browserify bundles.","type":"boolean"},"commonjs":{"description":"Enable/disable parsing of CommonJs syntax.","type":"boolean"},"commonjsMagicComments":{"description":"Enable/disable parsing of magic comments in CommonJs syntax.","type":"boolean"},"createRequire":{"description":"Enable/disable parsing \\"import { createRequire } from \\"module\\"\\" and evaluating createRequire().","anyOf":[{"type":"boolean"},{"type":"string"}]},"dynamicImportMode":{"description":"Specifies global mode for dynamic import.","enum":["eager","weak","lazy","lazy-once"]},"dynamicImportPrefetch":{"description":"Specifies global prefetch for dynamic import.","anyOf":[{"type":"number"},{"type":"boolean"}]},"dynamicImportPreload":{"description":"Specifies global preload for dynamic import.","anyOf":[{"type":"number"},{"type":"boolean"}]},"exportsPresence":{"description":"Specifies the behavior of invalid export names in \\"import ... from ...\\" and \\"export ... from ...\\".","enum":["error","warn","auto",false]},"exprContextCritical":{"description":"Enable warnings for full dynamic dependencies.","type":"boolean"},"exprContextRecursive":{"description":"Enable recursive directory lookup for full dynamic dependencies.","type":"boolean"},"exprContextRegExp":{"description":"Sets the default regular expression for full dynamic dependencies.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"exprContextRequest":{"description":"Set the default request for full dynamic dependencies.","type":"string"},"harmony":{"description":"Enable/disable parsing of EcmaScript Modules syntax.","type":"boolean"},"import":{"description":"Enable/disable parsing of import() syntax.","type":"boolean"},"importExportsPresence":{"description":"Specifies the behavior of invalid export names in \\"import ... from ...\\".","enum":["error","warn","auto",false]},"importMeta":{"description":"Enable/disable evaluating import.meta.","type":"boolean"},"importMetaContext":{"description":"Enable/disable evaluating import.meta.webpackContext.","type":"boolean"},"node":{"$ref":"#/definitions/Node"},"reexportExportsPresence":{"description":"Specifies the behavior of invalid export names in \\"export ... from ...\\". This might be useful to disable during the migration from \\"export ... from ...\\" to \\"export type ... from ...\\" when reexporting types in TypeScript.","enum":["error","warn","auto",false]},"requireContext":{"description":"Enable/disable parsing of require.context syntax.","type":"boolean"},"requireEnsure":{"description":"Enable/disable parsing of require.ensure syntax.","type":"boolean"},"requireInclude":{"description":"Enable/disable parsing of require.include syntax.","type":"boolean"},"requireJs":{"description":"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.","type":"boolean"},"strictExportPresence":{"description":"Deprecated in favor of \\"exportsPresence\\". Emit errors instead of warnings when imported names don\'t exist in imported module.","type":"boolean"},"strictThisContextOnImports":{"description":"Handle the this context correctly according to the spec for namespace objects.","type":"boolean"},"system":{"description":"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.","type":"boolean"},"unknownContextCritical":{"description":"Enable warnings when using the require function in a not statically analyse-able way.","type":"boolean"},"unknownContextRecursive":{"description":"Enable recursive directory lookup when using the require function in a not statically analyse-able way.","type":"boolean"},"unknownContextRegExp":{"description":"Sets the regular expression when using the require function in a not statically analyse-able way.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"unknownContextRequest":{"description":"Sets the request when using the require function in a not statically analyse-able way.","type":"string"},"url":{"description":"Enable/disable parsing of new URL() syntax.","anyOf":[{"enum":["relative"]},{"type":"boolean"}]},"worker":{"description":"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().","anyOf":[{"type":"array","items":{"description":"Specify a syntax that should be parsed as WebWorker reference. \'Abc\' handles \'new Abc()\', \'Abc from xyz\' handles \'import { Abc } from \\"xyz\\"; new Abc()\', \'abc()\' handles \'abc()\', and combinations are also possible.","type":"string","minLength":1}},{"type":"boolean"}]},"wrappedContextCritical":{"description":"Enable warnings for partial dynamic dependencies.","type":"boolean"},"wrappedContextRecursive":{"description":"Enable recursive directory lookup for partial dynamic dependencies.","type":"boolean"},"wrappedContextRegExp":{"description":"Set the inner regular expression for partial dynamic dependencies.","instanceof":"RegExp","tsType":"RegExp"}}},"Layer":{"description":"Specifies the layer in which modules of this entrypoint are placed.","anyOf":[{"enum":[null]},{"type":"string","minLength":1}]},"LazyCompilationDefaultBackendOptions":{"description":"Options for the default backend.","type":"object","additionalProperties":false,"properties":{"client":{"description":"A custom client.","type":"string"},"listen":{"description":"Specifies where to listen to from the server.","anyOf":[{"description":"A port.","type":"number"},{"description":"Listen options.","type":"object","additionalProperties":true,"properties":{"host":{"description":"A host.","type":"string"},"port":{"description":"A port.","type":"number"}},"tsType":"import(\\"net\\").ListenOptions"},{"description":"A custom listen function.","instanceof":"Function","tsType":"((server: import(\\"net\\").Server) => void)"}]},"protocol":{"description":"Specifies the protocol the client should use to connect to the server.","enum":["http","https"]},"server":{"description":"Specifies how to create the server handling the EventSource requests.","anyOf":[{"description":"ServerOptions for the http or https createServer call.","type":"object","additionalProperties":true,"properties":{},"tsType":"(import(\\"https\\").ServerOptions | import(\\"http\\").ServerOptions)"},{"description":"A custom create server function.","instanceof":"Function","tsType":"(() => import(\\"net\\").Server)"}]}}},"LazyCompilationOptions":{"description":"Options for compiling entrypoints and import()s only when they are accessed.","type":"object","additionalProperties":false,"properties":{"backend":{"description":"Specifies the backend that should be used for handling client keep alive.","anyOf":[{"description":"A custom backend.","instanceof":"Function","tsType":"(((compiler: import(\'../lib/Compiler\'), callback: (err?: Error, api?: import(\\"../lib/hmr/LazyCompilationPlugin\\").BackendApi) => void) => void) | ((compiler: import(\'../lib/Compiler\')) => Promise))"},{"$ref":"#/definitions/LazyCompilationDefaultBackendOptions"}]},"entries":{"description":"Enable/disable lazy compilation for entries.","type":"boolean"},"imports":{"description":"Enable/disable lazy compilation for import() modules.","type":"boolean"},"test":{"description":"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"((module: import(\'../lib/Module\')) => boolean)"}]}}},"Library":{"description":"Make the output files a library, exporting the exports of the entry point.","anyOf":[{"$ref":"#/definitions/LibraryName"},{"$ref":"#/definitions/LibraryOptions"}]},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"Loader":{"description":"Custom values available in the loader context.","type":"object"},"MemoryCacheOptions":{"description":"Options object for in-memory caching.","type":"object","additionalProperties":false,"properties":{"cacheUnaffected":{"description":"Additionally cache computation of modules that are unchanged and reference only unchanged modules.","type":"boolean"},"maxGenerations":{"description":"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).","type":"number","minimum":1},"type":{"description":"In memory caching.","enum":["memory"]}},"required":["type"]},"Mode":{"description":"Enable production optimizations or development hints.","enum":["development","production","none"]},"ModuleFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((name: string, module: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsModule, type: \'module\' | \'chunk\' | \'root-of-chunk\' | \'nested\') => boolean)"}]},"ModuleFilterTypes":{"description":"Filtering modules.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/ModuleFilterItemTypes"}]}},{"$ref":"#/definitions/ModuleFilterItemTypes"}]},"ModuleOptions":{"description":"Options affecting the normal modules (`NormalModuleFactory`).","type":"object","additionalProperties":false,"properties":{"defaultRules":{"description":"An array of rules applied by default for modules.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"exprContextCritical":{"description":"Enable warnings for full dynamic dependencies.","type":"boolean"},"exprContextRecursive":{"description":"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRecursive\'.","type":"boolean"},"exprContextRegExp":{"description":"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRegExp\'.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"exprContextRequest":{"description":"Set the default request for full dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.exprContextRequest\'.","type":"string"},"generator":{"$ref":"#/definitions/GeneratorOptionsByModuleType"},"noParse":{"$ref":"#/definitions/NoParse"},"parser":{"$ref":"#/definitions/ParserOptionsByModuleType"},"rules":{"description":"An array of rules applied for modules.","oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"strictExportPresence":{"description":"Emit errors instead of warnings when imported names don\'t exist in imported module. Deprecated: This option has moved to \'module.parser.javascript.strictExportPresence\'.","type":"boolean"},"strictThisContextOnImports":{"description":"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to \'module.parser.javascript.strictThisContextOnImports\'.","type":"boolean"},"unknownContextCritical":{"description":"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextCritical\'.","type":"boolean"},"unknownContextRecursive":{"description":"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRecursive\'.","type":"boolean"},"unknownContextRegExp":{"description":"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRegExp\'.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"boolean"}]},"unknownContextRequest":{"description":"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to \'module.parser.javascript.unknownContextRequest\'.","type":"string"},"unsafeCache":{"description":"Cache the resolving of module requests.","anyOf":[{"type":"boolean"},{"instanceof":"Function","tsType":"Function"}]},"wrappedContextCritical":{"description":"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextCritical\'.","type":"boolean"},"wrappedContextRecursive":{"description":"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextRecursive\'.","type":"boolean"},"wrappedContextRegExp":{"description":"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to \'module.parser.javascript.wrappedContextRegExp\'.","instanceof":"RegExp","tsType":"RegExp"}}},"ModuleOptionsNormalized":{"description":"Options affecting the normal modules (`NormalModuleFactory`).","type":"object","additionalProperties":false,"properties":{"defaultRules":{"description":"An array of rules applied by default for modules.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"generator":{"$ref":"#/definitions/GeneratorOptionsByModuleType"},"noParse":{"$ref":"#/definitions/NoParse"},"parser":{"$ref":"#/definitions/ParserOptionsByModuleType"},"rules":{"description":"An array of rules applied for modules.","oneOf":[{"$ref":"#/definitions/RuleSetRules"}]},"unsafeCache":{"description":"Cache the resolving of module requests.","anyOf":[{"type":"boolean"},{"instanceof":"Function","tsType":"Function"}]}},"required":["defaultRules","generator","parser","rules"]},"Name":{"description":"Name of the configuration. Used when loading multiple configurations.","type":"string"},"NoParse":{"description":"Don\'t parse files matching. It\'s matched against the full resolved request.","anyOf":[{"type":"array","items":{"description":"Don\'t parse files matching. It\'s matched against the full resolved request.","anyOf":[{"description":"A regular expression, when matched the module is not parsed.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An absolute path, when the module starts with this path it is not parsed.","type":"string","absolutePath":true},{"instanceof":"Function","tsType":"Function"}]},"minItems":1},{"description":"A regular expression, when matched the module is not parsed.","instanceof":"RegExp","tsType":"RegExp"},{"description":"An absolute path, when the module starts with this path it is not parsed.","type":"string","absolutePath":true},{"instanceof":"Function","tsType":"Function"}]},"Node":{"description":"Include polyfills or mocks for various node stuff.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/NodeOptions"}]},"NodeOptions":{"description":"Options object for node compatibility features.","type":"object","additionalProperties":false,"properties":{"__dirname":{"description":"Include a polyfill for the \'__dirname\' variable.","enum":[false,true,"warn-mock","mock","eval-only"]},"__filename":{"description":"Include a polyfill for the \'__filename\' variable.","enum":[false,true,"warn-mock","mock","eval-only"]},"global":{"description":"Include a polyfill for the \'global\' variable.","enum":[false,true,"warn"]}}},"Optimization":{"description":"Enables/Disables integrated optimizations.","type":"object","additionalProperties":false,"properties":{"checkWasmTypes":{"description":"Check for incompatible wasm types when importing/exporting from/to ESM.","type":"boolean"},"chunkIds":{"description":"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).","enum":["natural","named","deterministic","size","total-size",false]},"concatenateModules":{"description":"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.","type":"boolean"},"emitOnErrors":{"description":"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.","type":"boolean"},"flagIncludedChunks":{"description":"Also flag chunks as loaded which contain a subset of the modules.","type":"boolean"},"innerGraph":{"description":"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.","type":"boolean"},"mangleExports":{"description":"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\"deterministic\\": generate short deterministic names optimized for caching, \\"size\\": generate the shortest possible names).","anyOf":[{"enum":["size","deterministic"]},{"type":"boolean"}]},"mangleWasmImports":{"description":"Reduce size of WASM by changing imports to shorter strings.","type":"boolean"},"mergeDuplicateChunks":{"description":"Merge chunks which contain the same modules.","type":"boolean"},"minimize":{"description":"Enable minimizing the output. Uses optimization.minimizer.","type":"boolean"},"minimizer":{"description":"Minimizer(s) to use for minimizing the output.","type":"array","cli":{"exclude":true},"items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"enum":["..."]},{"$ref":"#/definitions/WebpackPluginInstance"},{"$ref":"#/definitions/WebpackPluginFunction"}]}},"moduleIds":{"description":"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).","enum":["natural","named","hashed","deterministic","size",false]},"noEmitOnErrors":{"description":"Avoid emitting assets when errors occur (deprecated: use \'emitOnErrors\' instead).","type":"boolean","cli":{"exclude":true}},"nodeEnv":{"description":"Set process.env.NODE_ENV to a specific value.","anyOf":[{"enum":[false]},{"type":"string"}]},"portableRecords":{"description":"Generate records with relative paths to be able to move the context folder.","type":"boolean"},"providedExports":{"description":"Figure out which exports are provided by modules to generate more efficient code.","type":"boolean"},"realContentHash":{"description":"Use real [contenthash] based on final content of the assets.","type":"boolean"},"removeAvailableModules":{"description":"Removes modules from chunks when these modules are already included in all parents.","type":"boolean"},"removeEmptyChunks":{"description":"Remove chunks which are empty.","type":"boolean"},"runtimeChunk":{"$ref":"#/definitions/OptimizationRuntimeChunk"},"sideEffects":{"description":"Skip over modules which contain no side effects when exports are not used (false: disabled, \'flag\': only use manually placed side effects flag, true: also analyse source code for side effects).","anyOf":[{"enum":["flag"]},{"type":"boolean"}]},"splitChunks":{"description":"Optimize duplication and caching by splitting chunks by shared modules and cache group.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/OptimizationSplitChunksOptions"}]},"usedExports":{"description":"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\"global\\": analyse exports globally for all runtimes combined).","anyOf":[{"enum":["global"]},{"type":"boolean"}]}}},"OptimizationRuntimeChunk":{"description":"Create an additional chunk which contains only the webpack runtime and chunk hash maps.","anyOf":[{"enum":["single","multiple"]},{"type":"boolean"},{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name or name factory for the runtime chunks.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"Function"}]}}}]},"OptimizationRuntimeChunkNormalized":{"description":"Create an additional chunk which contains only the webpack runtime and chunk hash maps.","anyOf":[{"enum":[false]},{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name factory for the runtime chunks.","instanceof":"Function","tsType":"Function"}}}]},"OptimizationSplitChunksCacheGroup":{"description":"Options object for describing behavior of a cache group selecting modules that should be cached together.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"chunks":{"description":"Select chunks for determining cache group content (defaults to \\"initial\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"enforce":{"description":"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.","type":"boolean"},"enforceSizeThreshold":{"description":"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"filename":{"description":"Sets the template for the filename for created chunks.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"idHint":{"description":"Sets the hint for chunk id.","type":"string"},"layer":{"description":"Assign modules to a cache group by module layer.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"maxAsyncRequests":{"description":"Maximum number of requests which are accepted for on-demand loading.","type":"number","minimum":1},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialRequests":{"description":"Maximum number of initial chunks which are accepted for an entry point.","type":"number","minimum":1},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minChunks":{"description":"Minimum number of times a module has to be duplicated until it\'s considered for splitting.","type":"number","minimum":1},"minRemainingSize":{"description":"Minimal size for the chunks the stay after moving the modules to a new chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"name":{"description":"Give chunks for this cache group a name (chunks with equal name are merged).","anyOf":[{"enum":[false]},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"priority":{"description":"Priority of this cache group.","type":"number"},"reuseExistingChunk":{"description":"Try to reuse existing chunk (with name) when it has matching modules.","type":"boolean"},"test":{"description":"Assign modules to a cache group by module name.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"type":{"description":"Assign modules to a cache group by module type.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"usedExports":{"description":"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.","type":"boolean"}}},"OptimizationSplitChunksGetCacheGroups":{"description":"A function returning cache groups.","instanceof":"Function","tsType":"((module: import(\'../lib/Module\')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)"},"OptimizationSplitChunksOptions":{"description":"Options object for splitting chunks into smaller chunks.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"cacheGroups":{"description":"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: \'default\', \'defaultVendors\').","type":"object","additionalProperties":{"description":"Configuration for a cache group.","anyOf":[{"enum":[false]},{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"},{"$ref":"#/definitions/OptimizationSplitChunksCacheGroup"}]},"not":{"description":"Using the cacheGroup shorthand syntax with a cache group named \'test\' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.","type":"object","additionalProperties":true,"properties":{"test":{"description":"The test property is a cache group name, but using the test option of the cache group could be intended instead.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]}},"required":["test"]}},"chunks":{"description":"Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"defaultSizeTypes":{"description":"Sets the size types which are used when a number is used for sizes.","type":"array","items":{"description":"Size type, like \'javascript\', \'webassembly\'.","type":"string"},"minItems":1},"enforceSizeThreshold":{"description":"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"fallbackCacheGroup":{"description":"Options for modules not selected by any other cache group.","type":"object","additionalProperties":false,"properties":{"automaticNameDelimiter":{"description":"Sets the name delimiter for created chunks.","type":"string","minLength":1},"chunks":{"description":"Select chunks for determining shared modules (defaults to \\"async\\", \\"initial\\" and \\"all\\" requires adding these chunks to the HTML).","anyOf":[{"enum":["initial","async","all"]},{"instanceof":"Function","tsType":"((chunk: import(\'../lib/Chunk\')) => boolean)"}]},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]}}},"filename":{"description":"Sets the template for the filename for created chunks.","anyOf":[{"type":"string","absolutePath":false,"minLength":1},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"hidePathInfo":{"description":"Prevents exposing path info when creating names for parts splitted by maxSize.","type":"boolean"},"maxAsyncRequests":{"description":"Maximum number of requests which are accepted for on-demand loading.","type":"number","minimum":1},"maxAsyncSize":{"description":"Maximal size hint for the on-demand chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxInitialRequests":{"description":"Maximum number of initial chunks which are accepted for an entry point.","type":"number","minimum":1},"maxInitialSize":{"description":"Maximal size hint for the initial chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"maxSize":{"description":"Maximal size hint for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minChunks":{"description":"Minimum number of times a module has to be duplicated until it\'s considered for splitting.","type":"number","minimum":1},"minRemainingSize":{"description":"Minimal size for the chunks the stay after moving the modules to a new chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSize":{"description":"Minimal size for the created chunks.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"minSizeReduction":{"description":"Minimum size reduction due to the created chunk.","oneOf":[{"$ref":"#/definitions/OptimizationSplitChunksSizes"}]},"name":{"description":"Give chunks created a name (chunks with equal name are merged).","anyOf":[{"enum":[false]},{"type":"string"},{"instanceof":"Function","tsType":"Function"}]},"usedExports":{"description":"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.","type":"boolean"}}},"OptimizationSplitChunksSizes":{"description":"Size description for limits.","anyOf":[{"description":"Size of the javascript part of the chunk.","type":"number","minimum":0},{"description":"Specify size limits per size type.","type":"object","additionalProperties":{"description":"Size of the part of the chunk with the type of the key.","type":"number"}}]},"Output":{"description":"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.","type":"object","additionalProperties":false,"properties":{"assetModuleFilename":{"$ref":"#/definitions/AssetModuleFilename"},"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"auxiliaryComment":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/AuxiliaryComment"}]},"charset":{"$ref":"#/definitions/Charset"},"chunkFilename":{"$ref":"#/definitions/ChunkFilename"},"chunkFormat":{"$ref":"#/definitions/ChunkFormat"},"chunkLoadTimeout":{"$ref":"#/definitions/ChunkLoadTimeout"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"chunkLoadingGlobal":{"$ref":"#/definitions/ChunkLoadingGlobal"},"clean":{"$ref":"#/definitions/Clean"},"compareBeforeEmit":{"$ref":"#/definitions/CompareBeforeEmit"},"crossOriginLoading":{"$ref":"#/definitions/CrossOriginLoading"},"cssChunkFilename":{"$ref":"#/definitions/CssChunkFilename"},"cssFilename":{"$ref":"#/definitions/CssFilename"},"devtoolFallbackModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolFallbackModuleFilenameTemplate"},"devtoolModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolModuleFilenameTemplate"},"devtoolNamespace":{"$ref":"#/definitions/DevtoolNamespace"},"enabledChunkLoadingTypes":{"$ref":"#/definitions/EnabledChunkLoadingTypes"},"enabledLibraryTypes":{"$ref":"#/definitions/EnabledLibraryTypes"},"enabledWasmLoadingTypes":{"$ref":"#/definitions/EnabledWasmLoadingTypes"},"environment":{"$ref":"#/definitions/Environment"},"filename":{"$ref":"#/definitions/Filename"},"globalObject":{"$ref":"#/definitions/GlobalObject"},"hashDigest":{"$ref":"#/definitions/HashDigest"},"hashDigestLength":{"$ref":"#/definitions/HashDigestLength"},"hashFunction":{"$ref":"#/definitions/HashFunction"},"hashSalt":{"$ref":"#/definitions/HashSalt"},"hotUpdateChunkFilename":{"$ref":"#/definitions/HotUpdateChunkFilename"},"hotUpdateGlobal":{"$ref":"#/definitions/HotUpdateGlobal"},"hotUpdateMainFilename":{"$ref":"#/definitions/HotUpdateMainFilename"},"iife":{"$ref":"#/definitions/Iife"},"importFunctionName":{"$ref":"#/definitions/ImportFunctionName"},"importMetaName":{"$ref":"#/definitions/ImportMetaName"},"library":{"$ref":"#/definitions/Library"},"libraryExport":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/LibraryExport"}]},"libraryTarget":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/LibraryType"}]},"module":{"$ref":"#/definitions/OutputModule"},"path":{"$ref":"#/definitions/Path"},"pathinfo":{"$ref":"#/definitions/Pathinfo"},"publicPath":{"$ref":"#/definitions/PublicPath"},"scriptType":{"$ref":"#/definitions/ScriptType"},"sourceMapFilename":{"$ref":"#/definitions/SourceMapFilename"},"sourcePrefix":{"$ref":"#/definitions/SourcePrefix"},"strictModuleErrorHandling":{"$ref":"#/definitions/StrictModuleErrorHandling"},"strictModuleExceptionHandling":{"$ref":"#/definitions/StrictModuleExceptionHandling"},"trustedTypes":{"description":"Use a Trusted Types policy to create urls for chunks. \'output.uniqueName\' is used a default policy name. Passing a string sets a custom policy name.","anyOf":[{"enum":[true]},{"description":"The name of the Trusted Types policy created by webpack to serve bundle chunks.","type":"string","minLength":1},{"$ref":"#/definitions/TrustedTypes"}]},"umdNamedDefine":{"cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/UmdNamedDefine"}]},"uniqueName":{"$ref":"#/definitions/UniqueName"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"},"webassemblyModuleFilename":{"$ref":"#/definitions/WebassemblyModuleFilename"},"workerChunkLoading":{"$ref":"#/definitions/ChunkLoading"},"workerWasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"OutputModule":{"description":"Output javascript files as module source type.","type":"boolean"},"OutputNormalized":{"description":"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.","type":"object","additionalProperties":false,"properties":{"assetModuleFilename":{"$ref":"#/definitions/AssetModuleFilename"},"asyncChunks":{"description":"Enable/disable creating async chunks that are loaded on demand.","type":"boolean"},"charset":{"$ref":"#/definitions/Charset"},"chunkFilename":{"$ref":"#/definitions/ChunkFilename"},"chunkFormat":{"$ref":"#/definitions/ChunkFormat"},"chunkLoadTimeout":{"$ref":"#/definitions/ChunkLoadTimeout"},"chunkLoading":{"$ref":"#/definitions/ChunkLoading"},"chunkLoadingGlobal":{"$ref":"#/definitions/ChunkLoadingGlobal"},"clean":{"$ref":"#/definitions/Clean"},"compareBeforeEmit":{"$ref":"#/definitions/CompareBeforeEmit"},"crossOriginLoading":{"$ref":"#/definitions/CrossOriginLoading"},"cssChunkFilename":{"$ref":"#/definitions/CssChunkFilename"},"cssFilename":{"$ref":"#/definitions/CssFilename"},"devtoolFallbackModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolFallbackModuleFilenameTemplate"},"devtoolModuleFilenameTemplate":{"$ref":"#/definitions/DevtoolModuleFilenameTemplate"},"devtoolNamespace":{"$ref":"#/definitions/DevtoolNamespace"},"enabledChunkLoadingTypes":{"$ref":"#/definitions/EnabledChunkLoadingTypes"},"enabledLibraryTypes":{"$ref":"#/definitions/EnabledLibraryTypes"},"enabledWasmLoadingTypes":{"$ref":"#/definitions/EnabledWasmLoadingTypes"},"environment":{"$ref":"#/definitions/Environment"},"filename":{"$ref":"#/definitions/Filename"},"globalObject":{"$ref":"#/definitions/GlobalObject"},"hashDigest":{"$ref":"#/definitions/HashDigest"},"hashDigestLength":{"$ref":"#/definitions/HashDigestLength"},"hashFunction":{"$ref":"#/definitions/HashFunction"},"hashSalt":{"$ref":"#/definitions/HashSalt"},"hotUpdateChunkFilename":{"$ref":"#/definitions/HotUpdateChunkFilename"},"hotUpdateGlobal":{"$ref":"#/definitions/HotUpdateGlobal"},"hotUpdateMainFilename":{"$ref":"#/definitions/HotUpdateMainFilename"},"iife":{"$ref":"#/definitions/Iife"},"importFunctionName":{"$ref":"#/definitions/ImportFunctionName"},"importMetaName":{"$ref":"#/definitions/ImportMetaName"},"library":{"$ref":"#/definitions/LibraryOptions"},"module":{"$ref":"#/definitions/OutputModule"},"path":{"$ref":"#/definitions/Path"},"pathinfo":{"$ref":"#/definitions/Pathinfo"},"publicPath":{"$ref":"#/definitions/PublicPath"},"scriptType":{"$ref":"#/definitions/ScriptType"},"sourceMapFilename":{"$ref":"#/definitions/SourceMapFilename"},"sourcePrefix":{"$ref":"#/definitions/SourcePrefix"},"strictModuleErrorHandling":{"$ref":"#/definitions/StrictModuleErrorHandling"},"strictModuleExceptionHandling":{"$ref":"#/definitions/StrictModuleExceptionHandling"},"trustedTypes":{"$ref":"#/definitions/TrustedTypes"},"uniqueName":{"$ref":"#/definitions/UniqueName"},"wasmLoading":{"$ref":"#/definitions/WasmLoading"},"webassemblyModuleFilename":{"$ref":"#/definitions/WebassemblyModuleFilename"},"workerChunkLoading":{"$ref":"#/definitions/ChunkLoading"},"workerWasmLoading":{"$ref":"#/definitions/WasmLoading"}}},"Parallelism":{"description":"The number of parallel processed modules in the compilation.","type":"number","minimum":1},"ParserOptionsByModuleType":{"description":"Specify options for each parser.","type":"object","additionalProperties":{"description":"Options for parsing.","type":"object","additionalProperties":true},"properties":{"asset":{"$ref":"#/definitions/AssetParserOptions"},"asset/inline":{"$ref":"#/definitions/EmptyParserOptions"},"asset/resource":{"$ref":"#/definitions/EmptyParserOptions"},"asset/source":{"$ref":"#/definitions/EmptyParserOptions"},"javascript":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/auto":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/dynamic":{"$ref":"#/definitions/JavascriptParserOptions"},"javascript/esm":{"$ref":"#/definitions/JavascriptParserOptions"}}},"Path":{"description":"The output directory as **absolute path** (required).","type":"string","absolutePath":true},"Pathinfo":{"description":"Include comments with information about the modules.","anyOf":[{"enum":["verbose"]},{"type":"boolean"}]},"Performance":{"description":"Configuration for web performance recommendations.","anyOf":[{"enum":[false]},{"$ref":"#/definitions/PerformanceOptions"}]},"PerformanceOptions":{"description":"Configuration object for web performance recommendations.","type":"object","additionalProperties":false,"properties":{"assetFilter":{"description":"Filter function to select assets that are checked.","instanceof":"Function","tsType":"Function"},"hints":{"description":"Sets the format of the hints: warnings, errors or nothing at all.","enum":[false,"warning","error"]},"maxAssetSize":{"description":"File size limit (in bytes) when exceeded, that webpack will provide performance hints.","type":"number"},"maxEntrypointSize":{"description":"Total size of an entry point (in bytes).","type":"number"}}},"Plugins":{"description":"Add additional plugins to the compiler.","type":"array","items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"$ref":"#/definitions/WebpackPluginInstance"},{"$ref":"#/definitions/WebpackPluginFunction"}]}},"Profile":{"description":"Capture timing information for each module.","type":"boolean"},"PublicPath":{"description":"The \'publicPath\' specifies the public URL address of the output files when referenced in a browser.","anyOf":[{"enum":["auto"]},{"$ref":"#/definitions/RawPublicPath"}]},"RawPublicPath":{"description":"The \'publicPath\' specifies the public URL address of the output files when referenced in a browser.","anyOf":[{"type":"string"},{"instanceof":"Function","tsType":"((pathData: import(\\"../lib/Compilation\\").PathData, assetInfo?: import(\\"../lib/Compilation\\").AssetInfo) => string)"}]},"RecordsInputPath":{"description":"Store compiler state to a json file.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"RecordsOutputPath":{"description":"Load compiler state from a json file.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"RecordsPath":{"description":"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"Resolve":{"description":"Options for the resolver.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"ResolveAlias":{"description":"Redirect module requests.","anyOf":[{"type":"array","items":{"description":"Alias configuration.","type":"object","additionalProperties":false,"properties":{"alias":{"description":"New request.","anyOf":[{"description":"Multiple alternative requests.","type":"array","items":{"description":"One choice of request.","type":"string","minLength":1}},{"description":"Ignore request (replace with empty module).","enum":[false]},{"description":"New request.","type":"string","minLength":1}]},"name":{"description":"Request to be redirected.","type":"string"},"onlyModule":{"description":"Redirect only exact matching request.","type":"boolean"}},"required":["alias","name"]}},{"type":"object","additionalProperties":{"description":"New request.","anyOf":[{"description":"Multiple alternative requests.","type":"array","items":{"description":"One choice of request.","type":"string","minLength":1}},{"description":"Ignore request (replace with empty module).","enum":[false]},{"description":"New request.","type":"string","minLength":1}]}}]},"ResolveLoader":{"description":"Options for the resolver when resolving loaders.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"ResolveOptions":{"description":"Options object for resolving requests.","type":"object","additionalProperties":false,"properties":{"alias":{"$ref":"#/definitions/ResolveAlias"},"aliasFields":{"description":"Fields in the description file (usually package.json) which are used to redirect requests inside the module.","type":"array","items":{"description":"Field in the description file (usually package.json) which are used to redirect requests inside the module.","anyOf":[{"type":"array","items":{"description":"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.","type":"string","minLength":1}},{"type":"string","minLength":1}]}},"byDependency":{"description":"Extra resolve options per dependency category. Typical categories are \\"commonjs\\", \\"amd\\", \\"esm\\".","type":"object","additionalProperties":{"description":"Options object for resolving requests.","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]}},"cache":{"description":"Enable caching of successfully resolved requests (cache entries are revalidated).","type":"boolean"},"cachePredicate":{"description":"Predicate function to decide which requests should be cached.","instanceof":"Function","tsType":"((request: import(\'enhanced-resolve\').ResolveRequest) => boolean)"},"cacheWithContext":{"description":"Include the context information in the cache identifier when caching.","type":"boolean"},"conditionNames":{"description":"Condition names for exports field entry point.","type":"array","items":{"description":"Condition names for exports field entry point.","type":"string"}},"descriptionFiles":{"description":"Filenames used to find a description file (like a package.json).","type":"array","items":{"description":"Filename used to find a description file (like a package.json).","type":"string","minLength":1}},"enforceExtension":{"description":"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).","type":"boolean"},"exportsFields":{"description":"Field names from the description file (usually package.json) which are used to provide entry points of a package.","type":"array","items":{"description":"Field name from the description file (usually package.json) which is used to provide entry points of a package.","type":"string"}},"extensionAlias":{"description":"An object which maps extension to extension aliases.","type":"object","additionalProperties":{"description":"Extension alias.","anyOf":[{"description":"Multiple extensions.","type":"array","items":{"description":"Aliased extension.","type":"string","minLength":1}},{"description":"Aliased extension.","type":"string","minLength":1}]}},"extensions":{"description":"Extensions added to the request when trying to find the file.","type":"array","items":{"description":"Extension added to the request when trying to find the file.","type":"string"}},"fallback":{"description":"Redirect module requests when normal resolving fails.","oneOf":[{"$ref":"#/definitions/ResolveAlias"}]},"fileSystem":{"description":"Filesystem for the resolver.","tsType":"(import(\'../lib/util/fs\').InputFileSystem)"},"fullySpecified":{"description":"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn\'t affect requests from mainFields, aliasFields or aliases).","type":"boolean"},"importsFields":{"description":"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).","type":"array","items":{"description":"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).","type":"string"}},"mainFields":{"description":"Field names from the description file (package.json) which are used to find the default entry point.","type":"array","items":{"description":"Field name from the description file (package.json) which are used to find the default entry point.","anyOf":[{"type":"array","items":{"description":"Part of the field path from the description file (package.json) which are used to find the default entry point.","type":"string","minLength":1}},{"type":"string","minLength":1}]}},"mainFiles":{"description":"Filenames used to find the default entry point if there is no description file or main field.","type":"array","items":{"description":"Filename used to find the default entry point if there is no description file or main field.","type":"string","minLength":1}},"modules":{"description":"Folder names or directory paths where to find modules.","type":"array","items":{"description":"Folder name or directory path where to find modules.","type":"string","minLength":1}},"plugins":{"description":"Plugins for the resolver.","type":"array","cli":{"exclude":true},"items":{"description":"Plugin of type object or instanceof Function.","anyOf":[{"enum":["..."]},{"$ref":"#/definitions/ResolvePluginInstance"}]}},"preferAbsolute":{"description":"Prefer to resolve server-relative URLs (starting with \'/\') as absolute paths before falling back to resolve in \'resolve.roots\'.","type":"boolean"},"preferRelative":{"description":"Prefer to resolve module requests as relative request and fallback to resolving as module.","type":"boolean"},"resolver":{"description":"Custom resolver.","tsType":"(import(\'enhanced-resolve\').Resolver)"},"restrictions":{"description":"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.","type":"array","items":{"description":"Resolve restriction. Resolve result must fulfill this restriction.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":true,"minLength":1}]}},"roots":{"description":"A list of directories in which requests that are server-relative URLs (starting with \'/\') are resolved.","type":"array","items":{"description":"Directory in which requests that are server-relative URLs (starting with \'/\') are resolved.","type":"string"}},"symlinks":{"description":"Enable resolving symlinks to the original location.","type":"boolean"},"unsafeCache":{"description":"Enable caching of successfully resolved requests (cache entries are not revalidated).","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":true}]},"useSyncFileSystemCalls":{"description":"Use synchronous filesystem calls for the resolver.","type":"boolean"}}},"ResolvePluginInstance":{"description":"Plugin instance.","type":"object","additionalProperties":true,"properties":{"apply":{"description":"The run point of the plugin, required method.","instanceof":"Function","tsType":"(resolver: import(\'enhanced-resolve\').Resolver) => void"}},"required":["apply"]},"RuleSetCondition":{"description":"A condition matcher.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"},{"instanceof":"Function","tsType":"((value: string) => boolean)"},{"$ref":"#/definitions/RuleSetLogicalConditions"},{"$ref":"#/definitions/RuleSetConditions"}]},"RuleSetConditionAbsolute":{"description":"A condition matcher matching an absolute path.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":true},{"instanceof":"Function","tsType":"((value: string) => boolean)"},{"$ref":"#/definitions/RuleSetLogicalConditionsAbsolute"},{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"RuleSetConditionOrConditions":{"description":"One or multiple rule conditions.","cli":{"helper":true},"anyOf":[{"$ref":"#/definitions/RuleSetCondition"},{"$ref":"#/definitions/RuleSetConditions"}]},"RuleSetConditionOrConditionsAbsolute":{"description":"One or multiple rule conditions matching an absolute path.","cli":{"helper":true},"anyOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"},{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"RuleSetConditions":{"description":"A list of rule conditions.","type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/RuleSetCondition"}]}},"RuleSetConditionsAbsolute":{"description":"A list of rule conditions matching an absolute path.","type":"array","items":{"description":"A rule condition matching an absolute path.","oneOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"}]}},"RuleSetLoader":{"description":"A loader request.","type":"string","minLength":1},"RuleSetLoaderOptions":{"description":"Options passed to a loader.","anyOf":[{"type":"string"},{"type":"object"}]},"RuleSetLogicalConditions":{"description":"Logic operators used in a condition matcher.","type":"object","additionalProperties":false,"properties":{"and":{"description":"Logical AND.","oneOf":[{"$ref":"#/definitions/RuleSetConditions"}]},"not":{"description":"Logical NOT.","oneOf":[{"$ref":"#/definitions/RuleSetCondition"}]},"or":{"description":"Logical OR.","oneOf":[{"$ref":"#/definitions/RuleSetConditions"}]}}},"RuleSetLogicalConditionsAbsolute":{"description":"Logic operators used in a condition matcher.","type":"object","additionalProperties":false,"properties":{"and":{"description":"Logical AND.","oneOf":[{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]},"not":{"description":"Logical NOT.","oneOf":[{"$ref":"#/definitions/RuleSetConditionAbsolute"}]},"or":{"description":"Logical OR.","oneOf":[{"$ref":"#/definitions/RuleSetConditionsAbsolute"}]}}},"RuleSetRule":{"description":"A rule description with conditions and effects for modules.","type":"object","additionalProperties":false,"properties":{"assert":{"description":"Match on import assertions of the dependency.","type":"object","additionalProperties":{"$ref":"#/definitions/RuleSetConditionOrConditions"}},"compiler":{"description":"Match the child compiler name.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"dependency":{"description":"Match dependency type.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"descriptionData":{"description":"Match values of properties in the description file (usually package.json).","type":"object","additionalProperties":{"$ref":"#/definitions/RuleSetConditionOrConditions"}},"enforce":{"description":"Enforce this rule as pre or post step.","enum":["pre","post"]},"exclude":{"description":"Shortcut for resource.exclude.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"generator":{"description":"The options for the module generator.","type":"object"},"include":{"description":"Shortcut for resource.include.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"issuer":{"description":"Match the issuer of the module (The module pointing to this module).","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"issuerLayer":{"description":"Match layer of the issuer of this module (The module pointing to this module).","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"layer":{"description":"Specifies the layer in which the module should be placed in.","type":"string"},"loader":{"description":"Shortcut for use.loader.","oneOf":[{"$ref":"#/definitions/RuleSetLoader"}]},"mimetype":{"description":"Match module mimetype when load from Data URI.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"oneOf":{"description":"Only execute the first matching rule in this array.","type":"array","items":{"description":"A rule.","oneOf":[{"$ref":"#/definitions/RuleSetRule"}]}},"options":{"description":"Shortcut for use.options.","cli":{"exclude":true},"oneOf":[{"$ref":"#/definitions/RuleSetLoaderOptions"}]},"parser":{"description":"Options for parsing.","type":"object","additionalProperties":true},"realResource":{"description":"Match the real resource path of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"resolve":{"description":"Options for the resolver.","type":"object","oneOf":[{"$ref":"#/definitions/ResolveOptions"}]},"resource":{"description":"Match the resource path of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"resourceFragment":{"description":"Match the resource fragment of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"resourceQuery":{"description":"Match the resource query of the module.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"rules":{"description":"Match and execute these rules when this rule is matched.","type":"array","items":{"description":"A rule.","oneOf":[{"$ref":"#/definitions/RuleSetRule"}]}},"scheme":{"description":"Match module scheme.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditions"}]},"sideEffects":{"description":"Flags a module as with or without side effects.","type":"boolean"},"test":{"description":"Shortcut for resource.test.","oneOf":[{"$ref":"#/definitions/RuleSetConditionOrConditionsAbsolute"}]},"type":{"description":"Module type to use for the module.","type":"string"},"use":{"description":"Modifiers applied to the module when rule is matched.","oneOf":[{"$ref":"#/definitions/RuleSetUse"}]}}},"RuleSetRules":{"description":"A list of rules.","type":"array","items":{"description":"A rule.","anyOf":[{"cli":{"exclude":true},"enum":["..."]},{"$ref":"#/definitions/RuleSetRule"}]}},"RuleSetUse":{"description":"A list of descriptions of loaders applied.","anyOf":[{"type":"array","items":{"description":"An use item.","oneOf":[{"$ref":"#/definitions/RuleSetUseItem"}]}},{"instanceof":"Function","tsType":"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])"},{"$ref":"#/definitions/RuleSetUseItem"}]},"RuleSetUseItem":{"description":"A description of an applied loader.","anyOf":[{"type":"object","additionalProperties":false,"properties":{"ident":{"description":"Unique loader options identifier.","type":"string"},"loader":{"description":"Loader name.","oneOf":[{"$ref":"#/definitions/RuleSetLoader"}]},"options":{"description":"Loader options.","oneOf":[{"$ref":"#/definitions/RuleSetLoaderOptions"}]}}},{"instanceof":"Function","tsType":"((data: object) => RuleSetUseItem|RuleSetUseItem[])"},{"$ref":"#/definitions/RuleSetLoader"}]},"ScriptType":{"description":"This option enables loading async chunks via a custom script type, such as script type=\\"module\\".","enum":[false,"text/javascript","module"]},"SnapshotOptions":{"description":"Options affecting how file system snapshots are created and validated.","type":"object","additionalProperties":false,"properties":{"buildDependencies":{"description":"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"immutablePaths":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","type":"array","items":{"description":"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.","anyOf":[{"description":"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to an immutable directory (usually a package manager cache directory).","type":"string","absolutePath":true,"minLength":1}]}},"managedPaths":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","type":"array","items":{"description":"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.","anyOf":[{"description":"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)","instanceof":"RegExp","tsType":"RegExp"},{"description":"A path to a managed directory (usually a node_modules directory).","type":"string","absolutePath":true,"minLength":1}]}},"module":{"description":"Options for snapshotting dependencies of modules to determine if they need to be built again.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"resolve":{"description":"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}},"resolveBuildDependencies":{"description":"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.","type":"object","additionalProperties":false,"properties":{"hash":{"description":"Use hashes of the content of the files/directories to determine invalidation.","type":"boolean"},"timestamp":{"description":"Use timestamps of the files/directories to determine invalidation.","type":"boolean"}}}}},"SourceMapFilename":{"description":"The filename of the SourceMaps for the JavaScript files. They are inside the \'output.path\' directory.","type":"string","absolutePath":false},"SourcePrefix":{"description":"Prefixes every line of the source in the bundle with this string.","type":"string"},"StatsOptions":{"description":"Stats options object.","type":"object","additionalProperties":false,"properties":{"all":{"description":"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).","type":"boolean"},"assets":{"description":"Add assets information.","type":"boolean"},"assetsSort":{"description":"Sort the assets by that field.","type":"string"},"assetsSpace":{"description":"Space to display assets (groups will be collapsed to fit this space).","type":"number"},"builtAt":{"description":"Add built at time information.","type":"boolean"},"cached":{"description":"Add information about cached (not built) modules (deprecated: use \'cachedModules\' instead).","type":"boolean"},"cachedAssets":{"description":"Show cached assets (setting this to `false` only shows emitted files).","type":"boolean"},"cachedModules":{"description":"Add information about cached (not built) modules.","type":"boolean"},"children":{"description":"Add children information.","type":"boolean"},"chunkGroupAuxiliary":{"description":"Display auxiliary assets in chunk groups.","type":"boolean"},"chunkGroupChildren":{"description":"Display children of chunk groups.","type":"boolean"},"chunkGroupMaxAssets":{"description":"Limit of assets displayed in chunk groups.","type":"number"},"chunkGroups":{"description":"Display all chunk groups with the corresponding bundles.","type":"boolean"},"chunkModules":{"description":"Add built modules information to chunk information.","type":"boolean"},"chunkModulesSpace":{"description":"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).","type":"number"},"chunkOrigins":{"description":"Add the origins of chunks and chunk merging info.","type":"boolean"},"chunkRelations":{"description":"Add information about parent, children and sibling chunks to chunk information.","type":"boolean"},"chunks":{"description":"Add chunk information.","type":"boolean"},"chunksSort":{"description":"Sort the chunks by that field.","type":"string"},"colors":{"description":"Enables/Disables colorful output.","anyOf":[{"description":"Enables/Disables colorful output.","type":"boolean"},{"type":"object","additionalProperties":false,"properties":{"bold":{"description":"Custom color for bold text.","type":"string"},"cyan":{"description":"Custom color for cyan text.","type":"string"},"green":{"description":"Custom color for green text.","type":"string"},"magenta":{"description":"Custom color for magenta text.","type":"string"},"red":{"description":"Custom color for red text.","type":"string"},"yellow":{"description":"Custom color for yellow text.","type":"string"}}}]},"context":{"description":"Context directory for request shortening.","type":"string","absolutePath":true},"dependentModules":{"description":"Show chunk modules that are dependencies of other modules of the chunk.","type":"boolean"},"depth":{"description":"Add module depth in module graph.","type":"boolean"},"entrypoints":{"description":"Display the entry points with the corresponding bundles.","anyOf":[{"enum":["auto"]},{"type":"boolean"}]},"env":{"description":"Add --env information.","type":"boolean"},"errorDetails":{"description":"Add details to errors (like resolving log).","anyOf":[{"enum":["auto"]},{"type":"boolean"}]},"errorStack":{"description":"Add internal stack trace to errors.","type":"boolean"},"errors":{"description":"Add errors.","type":"boolean"},"errorsCount":{"description":"Add errors count.","type":"boolean"},"exclude":{"description":"Please use excludeModules instead.","cli":{"exclude":true},"anyOf":[{"type":"boolean"},{"$ref":"#/definitions/ModuleFilterTypes"}]},"excludeAssets":{"description":"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.","oneOf":[{"$ref":"#/definitions/AssetFilterTypes"}]},"excludeModules":{"description":"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.","anyOf":[{"type":"boolean"},{"$ref":"#/definitions/ModuleFilterTypes"}]},"groupAssetsByChunk":{"description":"Group assets by how their are related to chunks.","type":"boolean"},"groupAssetsByEmitStatus":{"description":"Group assets by their status (emitted, compared for emit or cached).","type":"boolean"},"groupAssetsByExtension":{"description":"Group assets by their extension.","type":"boolean"},"groupAssetsByInfo":{"description":"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).","type":"boolean"},"groupAssetsByPath":{"description":"Group assets by their path.","type":"boolean"},"groupModulesByAttributes":{"description":"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).","type":"boolean"},"groupModulesByCacheStatus":{"description":"Group modules by their status (cached or built and cacheable).","type":"boolean"},"groupModulesByExtension":{"description":"Group modules by their extension.","type":"boolean"},"groupModulesByLayer":{"description":"Group modules by their layer.","type":"boolean"},"groupModulesByPath":{"description":"Group modules by their path.","type":"boolean"},"groupModulesByType":{"description":"Group modules by their type.","type":"boolean"},"groupReasonsByOrigin":{"description":"Group reasons by their origin module.","type":"boolean"},"hash":{"description":"Add the hash of the compilation.","type":"boolean"},"ids":{"description":"Add ids.","type":"boolean"},"logging":{"description":"Add logging output.","anyOf":[{"description":"Specify log level of logging output.","enum":["none","error","warn","info","log","verbose"]},{"description":"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).","type":"boolean"}]},"loggingDebug":{"description":"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.","anyOf":[{"description":"Enable/Disable debug logging for all loggers.","type":"boolean"},{"$ref":"#/definitions/FilterTypes"}]},"loggingTrace":{"description":"Add stack traces to logging output.","type":"boolean"},"moduleAssets":{"description":"Add information about assets inside modules.","type":"boolean"},"moduleTrace":{"description":"Add dependencies and origin of warnings/errors.","type":"boolean"},"modules":{"description":"Add built modules information.","type":"boolean"},"modulesSort":{"description":"Sort the modules by that field.","type":"string"},"modulesSpace":{"description":"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).","type":"number"},"nestedModules":{"description":"Add information about modules nested in other modules (like with module concatenation).","type":"boolean"},"nestedModulesSpace":{"description":"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).","type":"number"},"optimizationBailout":{"description":"Show reasons why optimization bailed out for modules.","type":"boolean"},"orphanModules":{"description":"Add information about orphan modules.","type":"boolean"},"outputPath":{"description":"Add output path information.","type":"boolean"},"performance":{"description":"Add performance hint flags.","type":"boolean"},"preset":{"description":"Preset for the default values.","anyOf":[{"type":"boolean"},{"type":"string"}]},"providedExports":{"description":"Show exports provided by modules.","type":"boolean"},"publicPath":{"description":"Add public path information.","type":"boolean"},"reasons":{"description":"Add information about the reasons why modules are included.","type":"boolean"},"reasonsSpace":{"description":"Space to display reasons (groups will be collapsed to fit this space).","type":"number"},"relatedAssets":{"description":"Add information about assets that are related to other assets (like SourceMaps for assets).","type":"boolean"},"runtime":{"description":"Add information about runtime modules (deprecated: use \'runtimeModules\' instead).","type":"boolean"},"runtimeModules":{"description":"Add information about runtime modules.","type":"boolean"},"source":{"description":"Add the source code of modules.","type":"boolean"},"timings":{"description":"Add timing information.","type":"boolean"},"usedExports":{"description":"Show exports used by modules.","type":"boolean"},"version":{"description":"Add webpack version information.","type":"boolean"},"warnings":{"description":"Add warnings.","type":"boolean"},"warningsCount":{"description":"Add warnings count.","type":"boolean"},"warningsFilter":{"description":"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.","oneOf":[{"$ref":"#/definitions/WarningFilterTypes"}]}}},"StatsValue":{"description":"Stats options object or preset name.","anyOf":[{"enum":["none","summary","errors-only","errors-warnings","minimal","normal","detailed","verbose"]},{"type":"boolean"},{"$ref":"#/definitions/StatsOptions"}]},"StrictModuleErrorHandling":{"description":"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.","type":"boolean"},"StrictModuleExceptionHandling":{"description":"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.","type":"boolean"},"Target":{"description":"Environment to build for. An array of environments to build for all of them when possible.","anyOf":[{"type":"array","items":{"description":"Environment to build for.","type":"string","minLength":1},"minItems":1},{"enum":[false]},{"type":"string","minLength":1}]},"TrustedTypes":{"description":"Use a Trusted Types policy to create urls for chunks.","type":"object","additionalProperties":false,"properties":{"policyName":{"description":"The name of the Trusted Types policy created by webpack to serve bundle chunks.","type":"string","minLength":1}}},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"},"UniqueName":{"description":"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.","type":"string","minLength":1},"WarningFilterItemTypes":{"description":"Filtering value, regexp or function.","cli":{"helper":true},"anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","absolutePath":false},{"instanceof":"Function","tsType":"((warning: import(\'../lib/stats/DefaultStatsFactoryPlugin\').StatsError, value: string) => boolean)"}]},"WarningFilterTypes":{"description":"Filtering warnings.","cli":{"helper":true},"anyOf":[{"type":"array","items":{"description":"Rule to filter.","cli":{"helper":true},"oneOf":[{"$ref":"#/definitions/WarningFilterItemTypes"}]}},{"$ref":"#/definitions/WarningFilterItemTypes"}]},"WasmLoading":{"description":"The method of loading WebAssembly Modules (methods included by default are \'fetch\' (web/WebWorker), \'async-node\' (node.js), but others might be added by plugins).","anyOf":[{"enum":[false]},{"$ref":"#/definitions/WasmLoadingType"}]},"WasmLoadingType":{"description":"The method of loading WebAssembly Modules (methods included by default are \'fetch\' (web/WebWorker), \'async-node\' (node.js), but others might be added by plugins).","anyOf":[{"enum":["fetch-streaming","fetch","async-node"]},{"type":"string"}]},"Watch":{"description":"Enter watch mode, which rebuilds on file change.","type":"boolean"},"WatchOptions":{"description":"Options for the watcher.","type":"object","additionalProperties":false,"properties":{"aggregateTimeout":{"description":"Delay the rebuilt after the first change. Value is a time in ms.","type":"number"},"followSymlinks":{"description":"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks (\'resolve.symlinks\').","type":"boolean"},"ignored":{"description":"Ignore some files from watching (glob pattern or regexp).","anyOf":[{"type":"array","items":{"description":"A glob pattern for files that should be ignored from watching.","type":"string","minLength":1}},{"instanceof":"RegExp","tsType":"RegExp"},{"description":"A single glob pattern for files that should be ignored from watching.","type":"string","minLength":1}]},"poll":{"description":"Enable polling mode for watching.","anyOf":[{"description":"`number`: use polling with specified interval.","type":"number"},{"description":"`true`: use polling.","type":"boolean"}]},"stdin":{"description":"Stop watching when stdin stream has ended.","type":"boolean"}}},"WebassemblyModuleFilename":{"description":"The filename of WebAssembly modules as relative path inside the \'output.path\' directory.","type":"string","absolutePath":false},"WebpackOptionsNormalized":{"description":"Normalized webpack options object.","type":"object","additionalProperties":false,"properties":{"amd":{"$ref":"#/definitions/Amd"},"bail":{"$ref":"#/definitions/Bail"},"cache":{"$ref":"#/definitions/CacheOptionsNormalized"},"context":{"$ref":"#/definitions/Context"},"dependencies":{"$ref":"#/definitions/Dependencies"},"devServer":{"$ref":"#/definitions/DevServer"},"devtool":{"$ref":"#/definitions/DevTool"},"entry":{"$ref":"#/definitions/EntryNormalized"},"experiments":{"$ref":"#/definitions/ExperimentsNormalized"},"externals":{"$ref":"#/definitions/Externals"},"externalsPresets":{"$ref":"#/definitions/ExternalsPresets"},"externalsType":{"$ref":"#/definitions/ExternalsType"},"ignoreWarnings":{"$ref":"#/definitions/IgnoreWarningsNormalized"},"infrastructureLogging":{"$ref":"#/definitions/InfrastructureLogging"},"loader":{"$ref":"#/definitions/Loader"},"mode":{"$ref":"#/definitions/Mode"},"module":{"$ref":"#/definitions/ModuleOptionsNormalized"},"name":{"$ref":"#/definitions/Name"},"node":{"$ref":"#/definitions/Node"},"optimization":{"$ref":"#/definitions/Optimization"},"output":{"$ref":"#/definitions/OutputNormalized"},"parallelism":{"$ref":"#/definitions/Parallelism"},"performance":{"$ref":"#/definitions/Performance"},"plugins":{"$ref":"#/definitions/Plugins"},"profile":{"$ref":"#/definitions/Profile"},"recordsInputPath":{"$ref":"#/definitions/RecordsInputPath"},"recordsOutputPath":{"$ref":"#/definitions/RecordsOutputPath"},"resolve":{"$ref":"#/definitions/Resolve"},"resolveLoader":{"$ref":"#/definitions/ResolveLoader"},"snapshot":{"$ref":"#/definitions/SnapshotOptions"},"stats":{"$ref":"#/definitions/StatsValue"},"target":{"$ref":"#/definitions/Target"},"watch":{"$ref":"#/definitions/Watch"},"watchOptions":{"$ref":"#/definitions/WatchOptions"}},"required":["cache","snapshot","entry","experiments","externals","externalsPresets","infrastructureLogging","module","node","optimization","output","plugins","resolve","resolveLoader","stats","watchOptions"]},"WebpackPluginFunction":{"description":"Function acting as plugin.","instanceof":"Function","tsType":"(this: import(\'../lib/Compiler\'), compiler: import(\'../lib/Compiler\')) => void"},"WebpackPluginInstance":{"description":"Plugin instance.","type":"object","additionalProperties":true,"properties":{"apply":{"description":"The run point of the plugin, required method.","instanceof":"Function","tsType":"(compiler: import(\'../lib/Compiler\')) => void"}},"required":["apply"]}},"title":"WebpackOptions","description":"Options object as provided by the user.","type":"object","additionalProperties":false,"properties":{"amd":{"$ref":"#/definitions/Amd"},"bail":{"$ref":"#/definitions/Bail"},"cache":{"$ref":"#/definitions/CacheOptions"},"context":{"$ref":"#/definitions/Context"},"dependencies":{"$ref":"#/definitions/Dependencies"},"devServer":{"$ref":"#/definitions/DevServer"},"devtool":{"$ref":"#/definitions/DevTool"},"entry":{"$ref":"#/definitions/Entry"},"experiments":{"$ref":"#/definitions/Experiments"},"externals":{"$ref":"#/definitions/Externals"},"externalsPresets":{"$ref":"#/definitions/ExternalsPresets"},"externalsType":{"$ref":"#/definitions/ExternalsType"},"ignoreWarnings":{"$ref":"#/definitions/IgnoreWarnings"},"infrastructureLogging":{"$ref":"#/definitions/InfrastructureLogging"},"loader":{"$ref":"#/definitions/Loader"},"mode":{"$ref":"#/definitions/Mode"},"module":{"$ref":"#/definitions/ModuleOptions"},"name":{"$ref":"#/definitions/Name"},"node":{"$ref":"#/definitions/Node"},"optimization":{"$ref":"#/definitions/Optimization"},"output":{"$ref":"#/definitions/Output"},"parallelism":{"$ref":"#/definitions/Parallelism"},"performance":{"$ref":"#/definitions/Performance"},"plugins":{"$ref":"#/definitions/Plugins"},"profile":{"$ref":"#/definitions/Profile"},"recordsInputPath":{"$ref":"#/definitions/RecordsInputPath"},"recordsOutputPath":{"$ref":"#/definitions/RecordsOutputPath"},"recordsPath":{"$ref":"#/definitions/RecordsPath"},"resolve":{"$ref":"#/definitions/Resolve"},"resolveLoader":{"$ref":"#/definitions/ResolveLoader"},"snapshot":{"$ref":"#/definitions/SnapshotOptions"},"stats":{"$ref":"#/definitions/StatsValue"},"target":{"$ref":"#/definitions/Target"},"watch":{"$ref":"#/definitions/Watch"},"watchOptions":{"$ref":"#/definitions/WatchOptions"}}}')},72245:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"BannerFunction":{"description":"The banner as function, it will be wrapped in a comment.","instanceof":"Function","tsType":"(data: { hash: string, chunk: import(\'../../lib/Chunk\'), filename: string }) => string"},"Rule":{"description":"Filtering rule as regex or string.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","minLength":1}]},"Rules":{"description":"Filtering rules.","anyOf":[{"type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/Rule"}]}},{"$ref":"#/definitions/Rule"}]}},"title":"BannerPluginArgument","anyOf":[{"description":"The banner as string, it will be wrapped in a comment.","type":"string","minLength":1},{"title":"BannerPluginOptions","type":"object","additionalProperties":false,"properties":{"banner":{"description":"Specifies the banner.","anyOf":[{"type":"string"},{"$ref":"#/definitions/BannerFunction"}]},"entryOnly":{"description":"If true, the banner will only be added to the entry chunks.","type":"boolean"},"exclude":{"description":"Exclude all modules matching any of these conditions.","oneOf":[{"$ref":"#/definitions/Rules"}]},"footer":{"description":"If true, banner will be placed at the end of the output.","type":"boolean"},"include":{"description":"Include all modules matching any of these conditions.","oneOf":[{"$ref":"#/definitions/Rules"}]},"raw":{"description":"If true, banner will not be wrapped in a comment.","type":"boolean"},"test":{"description":"Include all modules that pass test assertion.","oneOf":[{"$ref":"#/definitions/Rules"}]}},"required":["banner"]},{"$ref":"#/definitions/BannerFunction"}]}')},81419:function(v){"use strict";v.exports=JSON.parse('{"title":"DllPluginOptions","type":"object","additionalProperties":false,"properties":{"context":{"description":"Context of requests in the manifest file (defaults to the webpack context).","type":"string","minLength":1},"entryOnly":{"description":"If true, only entry points will be exposed (default: true).","type":"boolean"},"format":{"description":"If true, manifest json file (output) will be formatted.","type":"boolean"},"name":{"description":"Name of the exposed dll function (external name, use value of \'output.library\').","type":"string","minLength":1},"path":{"description":"Absolute path to the manifest json file (output).","type":"string","minLength":1},"type":{"description":"Type of the dll bundle (external type, use value of \'output.libraryTarget\').","type":"string","minLength":1}},"required":["path"]}')},53858:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"DllReferencePluginOptionsContent":{"description":"The mappings from request to module info.","type":"object","additionalProperties":{"description":"Module info.","type":"object","additionalProperties":false,"properties":{"buildMeta":{"description":"Meta information about the module.","type":"object"},"exports":{"description":"Information about the provided exports of the module.","anyOf":[{"description":"List of provided exports of the module.","type":"array","items":{"description":"Name of the export.","type":"string","minLength":1}},{"description":"Exports unknown/dynamic.","enum":[true]}]},"id":{"description":"Module ID.","anyOf":[{"type":"number"},{"type":"string","minLength":1}]}},"required":["id"]},"minProperties":1},"DllReferencePluginOptionsManifest":{"description":"An object containing content, name and type.","type":"object","additionalProperties":false,"properties":{"content":{"description":"The mappings from request to module info.","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsContent"}]},"name":{"description":"The name where the dll is exposed (external name).","type":"string","minLength":1},"type":{"description":"The type how the dll is exposed (external type).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]}},"required":["content"]},"DllReferencePluginOptionsSourceType":{"description":"The type how the dll is exposed (external type).","enum":["var","assign","this","window","global","commonjs","commonjs2","commonjs-module","amd","amd-require","umd","umd2","jsonp","system"]}},"title":"DllReferencePluginOptions","anyOf":[{"type":"object","additionalProperties":false,"properties":{"context":{"description":"Context of requests in the manifest (or content property) as absolute path.","type":"string","absolutePath":true},"extensions":{"description":"Extensions used to resolve modules in the dll bundle (only used when using \'scope\').","type":"array","items":{"description":"An extension.","type":"string"}},"manifest":{"description":"An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation.","anyOf":[{"type":"string","absolutePath":true},{"$ref":"#/definitions/DllReferencePluginOptionsManifest"}]},"name":{"description":"The name where the dll is exposed (external name, defaults to manifest.name).","type":"string","minLength":1},"scope":{"description":"Prefix which is used for accessing the content of the dll.","type":"string","minLength":1},"sourceType":{"description":"How the dll is exposed (libraryTarget, defaults to manifest.type).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]},"type":{"description":"The way how the export of the dll bundle is used.","enum":["require","object"]}},"required":["manifest"]},{"type":"object","additionalProperties":false,"properties":{"content":{"description":"The mappings from request to module info.","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsContent"}]},"context":{"description":"Context of requests in the manifest (or content property) as absolute path.","type":"string","absolutePath":true},"extensions":{"description":"Extensions used to resolve modules in the dll bundle (only used when using \'scope\').","type":"array","items":{"description":"An extension.","type":"string"}},"name":{"description":"The name where the dll is exposed (external name).","type":"string","minLength":1},"scope":{"description":"Prefix which is used for accessing the content of the dll.","type":"string","minLength":1},"sourceType":{"description":"How the dll is exposed (libraryTarget).","oneOf":[{"$ref":"#/definitions/DllReferencePluginOptionsSourceType"}]},"type":{"description":"The way how the export of the dll bundle is used.","enum":["require","object"]}},"required":["content","name"]}]}')},99422:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"HashFunction":{"description":"Algorithm used for generation the hash (see node.js crypto package).","anyOf":[{"type":"string","minLength":1},{"instanceof":"Function","tsType":"typeof import(\'../../lib/util/Hash\')"}]}},"title":"HashedModuleIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"context":{"description":"The context directory for creating names.","type":"string","absolutePath":true},"hashDigest":{"description":"The encoding to use when generating the hash, defaults to \'base64\'. All encodings from Node.JS\' hash.digest are supported.","enum":["hex","latin1","base64"]},"hashDigestLength":{"description":"The prefix length of the hash digest to use, defaults to 4.","type":"number","minimum":1},"hashFunction":{"description":"The hashing algorithm to use, defaults to \'md4\'. All functions from Node.JS\' crypto.createHash are supported.","oneOf":[{"$ref":"#/definitions/HashFunction"}]}}}')},70229:function(v){"use strict";v.exports=JSON.parse('{"title":"IgnorePluginOptions","anyOf":[{"type":"object","additionalProperties":false,"properties":{"contextRegExp":{"description":"A RegExp to test the context (directory) against.","instanceof":"RegExp","tsType":"RegExp"},"resourceRegExp":{"description":"A RegExp to test the request against.","instanceof":"RegExp","tsType":"RegExp"}},"required":["resourceRegExp"]},{"type":"object","additionalProperties":false,"properties":{"checkResource":{"description":"A filter function for resource and context.","instanceof":"Function","tsType":"((resource: string, context: string) => boolean)"}},"required":["checkResource"]}]}')},54206:function(v){"use strict";v.exports=JSON.parse('{"title":"JsonModulesPluginParserOptions","type":"object","additionalProperties":false,"properties":{"parse":{"description":"Function that executes for a module source string and should return json-compatible data.","instanceof":"Function","tsType":"((input: string) => any)"}}}')},46425:function(v){"use strict";v.exports=JSON.parse('{"title":"LoaderOptionsPluginOptions","type":"object","additionalProperties":true,"properties":{"debug":{"description":"Whether loaders should be in debug mode or not. debug will be removed as of webpack 3.","type":"boolean"},"minimize":{"description":"Where loaders can be switched to minimize mode.","type":"boolean"},"options":{"description":"A configuration object that can be used to configure older loaders.","type":"object","additionalProperties":true,"properties":{"context":{"description":"The context that can be used to configure older loaders.","type":"string","absolutePath":true}}}}}')},18273:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"HandlerFunction":{"description":"Function that executes for every progress step.","instanceof":"Function","tsType":"((percentage: number, msg: string, ...args: string[]) => void)"},"ProgressPluginOptions":{"description":"Options object for the ProgressPlugin.","type":"object","additionalProperties":false,"properties":{"activeModules":{"description":"Show active modules count and one active module in progress message.","type":"boolean"},"dependencies":{"description":"Show dependencies count in progress message.","type":"boolean"},"dependenciesCount":{"description":"Minimum dependencies count to start with. For better progress calculation. Default: 10000.","type":"number"},"entries":{"description":"Show entries count in progress message.","type":"boolean"},"handler":{"description":"Function that executes for every progress step.","oneOf":[{"$ref":"#/definitions/HandlerFunction"}]},"modules":{"description":"Show modules count in progress message.","type":"boolean"},"modulesCount":{"description":"Minimum modules count to start with. For better progress calculation. Default: 5000.","type":"number"},"percentBy":{"description":"Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.","enum":["entries","modules","dependencies",null]},"profile":{"description":"Collect profile data for progress steps. Default: false.","enum":[true,false,null]}}}},"title":"ProgressPluginArgument","anyOf":[{"$ref":"#/definitions/ProgressPluginOptions"},{"$ref":"#/definitions/HandlerFunction"}]}')},52816:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"rule":{"description":"Include source maps for modules based on their extension (defaults to .js and .css).","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string","minLength":1}]},"rules":{"description":"Include source maps for modules based on their extension (defaults to .js and .css).","anyOf":[{"type":"array","items":{"description":"A rule condition.","oneOf":[{"$ref":"#/definitions/rule"}]}},{"$ref":"#/definitions/rule"}]}},"title":"SourceMapDevToolPluginOptions","type":"object","additionalProperties":false,"properties":{"append":{"description":"Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.","anyOf":[{"description":"Append no SourceMap comment to the bundle, but still generate SourceMaps.","enum":[false,null]},{"type":"string","minLength":1}]},"columns":{"description":"Indicates whether column mappings should be used (defaults to true).","type":"boolean"},"exclude":{"description":"Exclude modules that match the given value from source map generation.","oneOf":[{"$ref":"#/definitions/rules"}]},"fallbackModuleFilenameTemplate":{"description":"Generator string or function to create identifiers of modules for the \'sources\' array in the SourceMap used only if \'moduleFilenameTemplate\' would result in a conflict.","anyOf":[{"type":"string","minLength":1},{"description":"Custom function generating the identifier.","instanceof":"Function","tsType":"Function"}]},"fileContext":{"description":"Path prefix to which the [file] placeholder is relative to.","type":"string"},"filename":{"description":"Defines the output filename of the SourceMap (will be inlined if no value is provided).","anyOf":[{"description":"Disable separate SourceMap file and inline SourceMap as DataUrl.","enum":[false,null]},{"type":"string","absolutePath":false,"minLength":1}]},"include":{"description":"Include source maps for module paths that match the given value.","oneOf":[{"$ref":"#/definitions/rules"}]},"module":{"description":"Indicates whether SourceMaps from loaders should be used (defaults to true).","type":"boolean"},"moduleFilenameTemplate":{"description":"Generator string or function to create identifiers of modules for the \'sources\' array in the SourceMap.","anyOf":[{"type":"string","minLength":1},{"description":"Custom function generating the identifier.","instanceof":"Function","tsType":"Function"}]},"namespace":{"description":"Namespace prefix to allow multiple webpack roots in the devtools.","type":"string"},"noSources":{"description":"Omit the \'sourceContents\' array from the SourceMap.","type":"boolean"},"publicPath":{"description":"Provide a custom public path for the SourceMapping comment.","type":"string"},"sourceRoot":{"description":"Provide a custom value for the \'sourceRoot\' property in the SourceMap.","type":"string"},"test":{"$ref":"#/definitions/rules"}}}')},14814:function(v){"use strict";v.exports=JSON.parse('{"title":"WatchIgnorePluginOptions","type":"object","additionalProperties":false,"properties":{"paths":{"description":"A list of RegExps or absolute paths to directories or files that should be ignored.","type":"array","items":{"description":"RegExp or absolute path to directories or files that should be ignored.","anyOf":[{"instanceof":"RegExp","tsType":"RegExp"},{"type":"string"}]},"minItems":1}},"required":["paths"]}')},57030:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"Exposes":{"description":"Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.","anyOf":[{"type":"array","items":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesObject"}]}},{"$ref":"#/definitions/ExposesObject"}]},"ExposesConfig":{"description":"Advanced configuration for modules that should be exposed by this container.","type":"object","additionalProperties":false,"properties":{"import":{"description":"Request to a module that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]},"name":{"description":"Custom chunk name for the exposed module.","type":"string"}},"required":["import"]},"ExposesItem":{"description":"Module that should be exposed by this container.","type":"string","minLength":1},"ExposesItems":{"description":"Modules that should be exposed by this container.","type":"array","items":{"$ref":"#/definitions/ExposesItem"}},"ExposesObject":{"description":"Modules that should be exposed by this container. Property names are used as public paths.","type":"object","additionalProperties":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesConfig"},{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]}},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"}},"title":"ContainerPluginOptions","type":"object","additionalProperties":false,"properties":{"exposes":{"$ref":"#/definitions/Exposes"},"filename":{"description":"The filename for this container relative path inside the `output.path` directory.","type":"string","absolutePath":false,"minLength":1},"library":{"$ref":"#/definitions/LibraryOptions"},"name":{"description":"The name for this container.","type":"string","minLength":1},"runtime":{"$ref":"#/definitions/EntryRuntime"},"shareScope":{"description":"The name of the share scope which is shared with the host (defaults to \'default\').","type":"string","minLength":1}},"required":["name","exposes"]}')},34290:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"Remotes":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.","anyOf":[{"type":"array","items":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesObject"}]}},{"$ref":"#/definitions/RemotesObject"}]},"RemotesConfig":{"description":"Advanced configuration for container locations from which modules should be resolved and loaded at runtime.","type":"object","additionalProperties":false,"properties":{"external":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]},"shareScope":{"description":"The name of the share scope shared with this remote.","type":"string","minLength":1}},"required":["external"]},"RemotesItem":{"description":"Container location from which modules should be resolved and loaded at runtime.","type":"string","minLength":1},"RemotesItems":{"description":"Container locations from which modules should be resolved and loaded at runtime.","type":"array","items":{"$ref":"#/definitions/RemotesItem"}},"RemotesObject":{"description":"Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.","type":"object","additionalProperties":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesConfig"},{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]}}},"title":"ContainerReferencePluginOptions","type":"object","additionalProperties":false,"properties":{"remoteType":{"description":"The external type of the remote containers.","oneOf":[{"$ref":"#/definitions/ExternalsType"}]},"remotes":{"$ref":"#/definitions/Remotes"},"shareScope":{"description":"The name of the share scope shared with all remotes (defaults to \'default\').","type":"string","minLength":1}},"required":["remoteType","remotes"]}')},46413:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"AuxiliaryComment":{"description":"Add a comment in the UMD wrapper.","anyOf":[{"description":"Append the same comment above each import style.","type":"string"},{"$ref":"#/definitions/LibraryCustomUmdCommentObject"}]},"EntryRuntime":{"description":"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.","anyOf":[{"enum":[false]},{"type":"string","minLength":1}]},"Exposes":{"description":"Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.","anyOf":[{"type":"array","items":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesObject"}]}},{"$ref":"#/definitions/ExposesObject"}]},"ExposesConfig":{"description":"Advanced configuration for modules that should be exposed by this container.","type":"object","additionalProperties":false,"properties":{"import":{"description":"Request to a module that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]},"name":{"description":"Custom chunk name for the exposed module.","type":"string"}},"required":["import"]},"ExposesItem":{"description":"Module that should be exposed by this container.","type":"string","minLength":1},"ExposesItems":{"description":"Modules that should be exposed by this container.","type":"array","items":{"$ref":"#/definitions/ExposesItem"}},"ExposesObject":{"description":"Modules that should be exposed by this container. Property names are used as public paths.","type":"object","additionalProperties":{"description":"Modules that should be exposed by this container.","anyOf":[{"$ref":"#/definitions/ExposesConfig"},{"$ref":"#/definitions/ExposesItem"},{"$ref":"#/definitions/ExposesItems"}]}},"ExternalsType":{"description":"Specifies the default type of externals (\'amd*\', \'umd*\', \'system\' and \'jsonp\' depend on output.libraryTarget set to the same value).","enum":["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","script","node-commonjs"]},"LibraryCustomUmdCommentObject":{"description":"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Set comment for `amd` section in UMD.","type":"string"},"commonjs":{"description":"Set comment for `commonjs` (exports) section in UMD.","type":"string"},"commonjs2":{"description":"Set comment for `commonjs2` (module.exports) section in UMD.","type":"string"},"root":{"description":"Set comment for `root` (global variable) section in UMD.","type":"string"}}},"LibraryCustomUmdObject":{"description":"Description object for all UMD variants of the library name.","type":"object","additionalProperties":false,"properties":{"amd":{"description":"Name of the exposed AMD library in the UMD.","type":"string","minLength":1},"commonjs":{"description":"Name of the exposed commonjs export in the UMD.","type":"string","minLength":1},"root":{"description":"Name of the property exposed globally by a UMD library.","anyOf":[{"type":"array","items":{"description":"Part of the name of the property exposed globally by a UMD library.","type":"string","minLength":1}},{"type":"string","minLength":1}]}}},"LibraryExport":{"description":"Specify which export should be exposed as library.","anyOf":[{"type":"array","items":{"description":"Part of the export that should be exposed as library.","type":"string","minLength":1}},{"type":"string","minLength":1}]},"LibraryName":{"description":"The name of the library (some types allow unnamed libraries too).","anyOf":[{"type":"array","items":{"description":"A part of the library name.","type":"string","minLength":1},"minItems":1},{"type":"string","minLength":1},{"$ref":"#/definitions/LibraryCustomUmdObject"}]},"LibraryOptions":{"description":"Options for library.","type":"object","additionalProperties":false,"properties":{"auxiliaryComment":{"$ref":"#/definitions/AuxiliaryComment"},"export":{"$ref":"#/definitions/LibraryExport"},"name":{"$ref":"#/definitions/LibraryName"},"type":{"$ref":"#/definitions/LibraryType"},"umdNamedDefine":{"$ref":"#/definitions/UmdNamedDefine"}},"required":["type"]},"LibraryType":{"description":"Type of library (types included by default are \'var\', \'module\', \'assign\', \'assign-properties\', \'this\', \'window\', \'self\', \'global\', \'commonjs\', \'commonjs2\', \'commonjs-module\', \'commonjs-static\', \'amd\', \'amd-require\', \'umd\', \'umd2\', \'jsonp\', \'system\', but others might be added by plugins).","anyOf":[{"enum":["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{"type":"string"}]},"Remotes":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.","anyOf":[{"type":"array","items":{"description":"Container locations and request scopes from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesObject"}]}},{"$ref":"#/definitions/RemotesObject"}]},"RemotesConfig":{"description":"Advanced configuration for container locations from which modules should be resolved and loaded at runtime.","type":"object","additionalProperties":false,"properties":{"external":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]},"shareScope":{"description":"The name of the share scope shared with this remote.","type":"string","minLength":1}},"required":["external"]},"RemotesItem":{"description":"Container location from which modules should be resolved and loaded at runtime.","type":"string","minLength":1},"RemotesItems":{"description":"Container locations from which modules should be resolved and loaded at runtime.","type":"array","items":{"$ref":"#/definitions/RemotesItem"}},"RemotesObject":{"description":"Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.","type":"object","additionalProperties":{"description":"Container locations from which modules should be resolved and loaded at runtime.","anyOf":[{"$ref":"#/definitions/RemotesConfig"},{"$ref":"#/definitions/RemotesItem"},{"$ref":"#/definitions/RemotesItems"}]}},"Shared":{"description":"Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.","anyOf":[{"type":"array","items":{"description":"Modules that should be shared in the share scope.","anyOf":[{"$ref":"#/definitions/SharedItem"},{"$ref":"#/definitions/SharedObject"}]}},{"$ref":"#/definitions/SharedObject"}]},"SharedConfig":{"description":"Advanced configuration for modules that should be shared in the share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"import":{"description":"Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn\'t valid. Defaults to the property name.","anyOf":[{"description":"No provided or fallback module.","enum":[false]},{"$ref":"#/definitions/SharedItem"}]},"packageName":{"description":"Package name to determine required version from description file. This is only needed when package name can\'t be automatically determined from request.","type":"string","minLength":1},"requiredVersion":{"description":"Version requirement from module in share scope.","anyOf":[{"description":"No version requirement check.","enum":[false]},{"description":"Version as string. Can be prefixed with \'^\' or \'~\' for minimum matches. Each part of the version should be separated by a dot \'.\'.","type":"string"}]},"shareKey":{"description":"Module is looked up under this key from the share scope.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"singleton":{"description":"Allow only a single version of the shared module in share scope (disabled by default).","type":"boolean"},"strictVersion":{"description":"Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).","type":"boolean"},"version":{"description":"Version of the provided module. Will replace lower matching versions, but not higher.","anyOf":[{"description":"Don\'t provide a version.","enum":[false]},{"description":"Version as string. Each part of the version should be separated by a dot \'.\'.","type":"string"}]}}},"SharedItem":{"description":"A module that should be shared in the share scope.","type":"string","minLength":1},"SharedObject":{"description":"Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.","type":"object","additionalProperties":{"description":"Modules that should be shared in the share scope.","anyOf":[{"$ref":"#/definitions/SharedConfig"},{"$ref":"#/definitions/SharedItem"}]}},"UmdNamedDefine":{"description":"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.","type":"boolean"}},"title":"ModuleFederationPluginOptions","type":"object","additionalProperties":false,"properties":{"exposes":{"$ref":"#/definitions/Exposes"},"filename":{"description":"The filename of the container as relative path inside the `output.path` directory.","type":"string","absolutePath":false},"library":{"$ref":"#/definitions/LibraryOptions"},"name":{"description":"The name of the container.","type":"string"},"remoteType":{"description":"The external type of the remote containers.","oneOf":[{"$ref":"#/definitions/ExternalsType"}]},"remotes":{"$ref":"#/definitions/Remotes"},"runtime":{"$ref":"#/definitions/EntryRuntime"},"shareScope":{"description":"Share scope name used for all shared modules (defaults to \'default\').","type":"string","minLength":1},"shared":{"$ref":"#/definitions/Shared"}}}')},95725:function(v){"use strict";v.exports=JSON.parse('{"title":"ProfilingPluginOptions","type":"object","additionalProperties":false,"properties":{"outputPath":{"description":"Path to the output file e.g. `path.resolve(__dirname, \'profiling/events.json\')`. Defaults to `events.json`.","type":"string","absolutePath":true}}}')},92738:function(v){"use strict";v.exports=JSON.parse('{"title":"OccurrenceChunkIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"prioritiseInitial":{"description":"Prioritise initial size over total size.","type":"boolean"}}}')},2710:function(v){"use strict";v.exports=JSON.parse('{"title":"OccurrenceModuleIdsPluginOptions","type":"object","additionalProperties":false,"properties":{"prioritiseInitial":{"description":"Prioritise initial size over total size.","type":"boolean"}}}')},71013:function(v){"use strict";v.exports=JSON.parse('{"title":"AggressiveSplittingPluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Extra cost for each chunk (Default: 9.8kiB).","type":"number"},"entryChunkMultiplicator":{"description":"Extra cost multiplicator for entry chunks (Default: 10).","type":"number"},"maxSize":{"description":"Byte, max size of per file (Default: 50kiB).","type":"number"},"minSize":{"description":"Byte, split point. (Default: 30kiB).","type":"number"}}}')},35041:function(v){"use strict";v.exports=JSON.parse('{"title":"LimitChunkCountPluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Constant overhead for a chunk.","type":"number"},"entryChunkMultiplicator":{"description":"Multiplicator for initial chunks.","type":"number"},"maxChunks":{"description":"Limit the maximum number of chunks using a value greater greater than or equal to 1.","type":"number","minimum":1}},"required":["maxChunks"]}')},72649:function(v){"use strict";v.exports=JSON.parse('{"title":"MinChunkSizePluginOptions","type":"object","additionalProperties":false,"properties":{"chunkOverhead":{"description":"Constant overhead for a chunk.","type":"number"},"entryChunkMultiplicator":{"description":"Multiplicator for initial chunks.","type":"number"},"minChunkSize":{"description":"Minimum number of characters.","type":"number"}},"required":["minChunkSize"]}')},92693:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"HttpUriOptions":{"description":"Options for building http resources.","type":"object","additionalProperties":false,"properties":{"allowedUris":{"$ref":"#/definitions/HttpUriOptionsAllowedUris"},"cacheLocation":{"description":"Location where resource content is stored for lockfile entries. It\'s also possible to disable storing by passing false.","anyOf":[{"enum":[false]},{"type":"string","absolutePath":true}]},"frozen":{"description":"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.","type":"boolean"},"lockfileLocation":{"description":"Location of the lockfile.","type":"string","absolutePath":true},"proxy":{"description":"Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.","type":"string"},"upgrade":{"description":"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.","type":"boolean"}},"required":["allowedUris"]},"HttpUriOptionsAllowedUris":{"description":"List of allowed URIs (resp. the beginning of them).","type":"array","items":{"description":"List of allowed URIs (resp. the beginning of them).","anyOf":[{"description":"Allowed URI pattern.","instanceof":"RegExp","tsType":"RegExp"},{"description":"Allowed URI (resp. the beginning of it).","type":"string","pattern":"^https?://"},{"description":"Allowed URI filter function.","instanceof":"Function","tsType":"((uri: string) => boolean)"}]}}},"title":"HttpUriPluginOptions","oneOf":[{"$ref":"#/definitions/HttpUriOptions"}]}')},33231:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"Consumes":{"description":"Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.","anyOf":[{"type":"array","items":{"description":"Modules that should be consumed from share scope.","anyOf":[{"$ref":"#/definitions/ConsumesItem"},{"$ref":"#/definitions/ConsumesObject"}]}},{"$ref":"#/definitions/ConsumesObject"}]},"ConsumesConfig":{"description":"Advanced configuration for modules that should be consumed from share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"import":{"description":"Fallback module if no shared module is found in share scope. Defaults to the property name.","anyOf":[{"description":"No fallback module.","enum":[false]},{"$ref":"#/definitions/ConsumesItem"}]},"packageName":{"description":"Package name to determine required version from description file. This is only needed when package name can\'t be automatically determined from request.","type":"string","minLength":1},"requiredVersion":{"description":"Version requirement from module in share scope.","anyOf":[{"description":"No version requirement check.","enum":[false]},{"description":"Version as string. Can be prefixed with \'^\' or \'~\' for minimum matches. Each part of the version should be separated by a dot \'.\'.","type":"string"}]},"shareKey":{"description":"Module is looked up under this key from the share scope.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"singleton":{"description":"Allow only a single version of the shared module in share scope (disabled by default).","type":"boolean"},"strictVersion":{"description":"Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).","type":"boolean"}}},"ConsumesItem":{"description":"A module that should be consumed from share scope.","type":"string","minLength":1},"ConsumesObject":{"description":"Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.","type":"object","additionalProperties":{"description":"Modules that should be consumed from share scope.","anyOf":[{"$ref":"#/definitions/ConsumesConfig"},{"$ref":"#/definitions/ConsumesItem"}]}}},"title":"ConsumeSharedPluginOptions","description":"Options for consuming shared modules.","type":"object","additionalProperties":false,"properties":{"consumes":{"$ref":"#/definitions/Consumes"},"shareScope":{"description":"Share scope name used for all consumed modules (defaults to \'default\').","type":"string","minLength":1}},"required":["consumes"]}')},11720:function(v){"use strict";v.exports=JSON.parse('{"definitions":{"Provides":{"description":"Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.","anyOf":[{"type":"array","items":{"description":"Modules that should be provided as shared modules to the share scope.","anyOf":[{"$ref":"#/definitions/ProvidesItem"},{"$ref":"#/definitions/ProvidesObject"}]}},{"$ref":"#/definitions/ProvidesObject"}]},"ProvidesConfig":{"description":"Advanced configuration for modules that should be provided as shared modules to the share scope.","type":"object","additionalProperties":false,"properties":{"eager":{"description":"Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.","type":"boolean"},"shareKey":{"description":"Key in the share scope under which the shared modules should be stored.","type":"string","minLength":1},"shareScope":{"description":"Share scope name.","type":"string","minLength":1},"version":{"description":"Version of the provided module. Will replace lower matching versions, but not higher.","anyOf":[{"description":"Don\'t provide a version.","enum":[false]},{"description":"Version as string. Each part of the version should be separated by a dot \'.\'.","type":"string"}]}}},"ProvidesItem":{"description":"Request to a module that should be provided as shared module to the share scope (will be resolved when relative).","type":"string","minLength":1},"ProvidesObject":{"description":"Modules that should be provided as shared modules to the share scope. Property names are used as share keys.","type":"object","additionalProperties":{"description":"Modules that should be provided as shared modules to the share scope.","anyOf":[{"$ref":"#/definitions/ProvidesConfig"},{"$ref":"#/definitions/ProvidesItem"}]}}},"title":"ProvideSharedPluginOptions","type":"object","additionalProperties":false,"properties":{"provides":{"$ref":"#/definitions/Provides"},"shareScope":{"description":"Share scope name used for all provided modules (defaults to \'default\').","type":"string","minLength":1}},"required":["provides"]}')}};var __webpack_module_cache__={};function __webpack_require__(v){var E=__webpack_module_cache__[v];if(E!==undefined){return E.exports}var R=__webpack_module_cache__[v]={exports:{}};var $=true;try{__webpack_modules__[v].call(R.exports,R,R.exports,__webpack_require__);$=false}finally{if($)delete __webpack_module_cache__[v]}return R.exports}if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var __webpack_exports__=__webpack_require__(40721);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 005637e4f018736..5565b0d11cc9bd9 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -1739,7 +1739,6 @@ export async function ncc_webpack_bundle5(task, opts) { if (path.endsWith('.runtime.js')) return `'./${basename(path)}'` }, externals: bundleExternals, - minify: false, target: 'es5', }) .target('compiled/webpack')