Config.js 23.9 KB
module.exports=(()=>{var e={466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.arrayToString=((e,t,s)=>{const n=e.map(function(e,n){const i=s(e,n);if(i===undefined)return String(i);return t+i.split("\n").join(`\n${t}`)}).join(t?",\n":",");const i=t&&n?"\n":"";return`[${i}${n}${i}]`})},711:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=s(121);const i={" "(){}}[" "].toString().charAt(0)==='"';const r={Function:"function ",GeneratorFunction:"function* ",AsyncFunction:"async function ",AsyncGeneratorFunction:"async function* "};const o={Function:"",GeneratorFunction:"*",AsyncFunction:"async ",AsyncGeneratorFunction:"async *"};const u=new Set(("case delete else in instanceof new return throw typeof void "+", ; : + - ! ~ & | ^ * / % < > ? =").split(" "));t.USED_METHOD_KEY=new WeakSet;t.functionToString=((e,s,n,i)=>{const r=typeof i==="string"?i:undefined;if(r!==undefined)t.USED_METHOD_KEY.add(e);return new FunctionParser(e,s,n,r).stringify()});function dedentFunction(e){let t;for(const s of e.split("\n").slice(1)){const n=/^[\s\t]+/.exec(s);if(!n)return e;const[i]=n;if(t===undefined)t=i;else if(i.length<t.length)t=i}return t?e.split(`\n${t}`).join("\n"):e}t.dedentFunction=dedentFunction;class FunctionParser{constructor(e,t,s,i){this.fn=e;this.indent=t;this.next=s;this.key=i;this.pos=0;this.hadKeyword=false;this.fnString=Function.prototype.toString.call(e);this.fnType=e.constructor.name;this.keyQuote=i===undefined?"":n.quoteKey(i,s);this.keyPrefix=i===undefined?"":`${this.keyQuote}:${t?" ":""}`;this.isMethodCandidate=i===undefined?false:this.fn.name===""||this.fn.name===i}stringify(){const e=this.tryParse();if(!e){return`${this.keyPrefix}void ${this.next(this.fnString)}`}return dedentFunction(e)}getPrefix(){if(this.isMethodCandidate&&!this.hadKeyword){return o[this.fnType]+this.keyQuote}return this.keyPrefix+r[this.fnType]}tryParse(){if(this.fnString[this.fnString.length-1]!=="}"){return this.keyPrefix+this.fnString}if(this.fn.name){const e=this.tryStrippingName();if(e)return e}const e=this.pos;if(this.consumeSyntax()==="class")return this.fnString;this.pos=e;if(this.tryParsePrefixTokens()){const e=this.tryStrippingName();if(e)return e;let t=this.pos;switch(this.consumeSyntax("WORD_LIKE")){case"WORD_LIKE":if(this.isMethodCandidate&&!this.hadKeyword){t=this.pos}case"()":if(this.fnString.substr(this.pos,2)==="=>"){return this.keyPrefix+this.fnString}this.pos=t;case'"':case"'":case"[]":return this.getPrefix()+this.fnString.substr(this.pos)}}}tryStrippingName(){if(i){return}let e=this.pos;const t=this.fnString.substr(this.pos,this.fn.name.length);if(t===this.fn.name){this.pos+=t.length;if(this.consumeSyntax()==="()"&&this.consumeSyntax()==="{}"&&this.pos===this.fnString.length){if(this.isMethodCandidate||!n.isValidVariableName(t)){e+=t.length}return this.getPrefix()+this.fnString.substr(e)}}this.pos=e}tryParsePrefixTokens(){let e=this.pos;this.hadKeyword=false;switch(this.fnType){case"AsyncFunction":if(this.consumeSyntax()!=="async")return false;e=this.pos;case"Function":if(this.consumeSyntax()==="function"){this.hadKeyword=true}else{this.pos=e}return true;case"AsyncGeneratorFunction":if(this.consumeSyntax()!=="async")return false;case"GeneratorFunction":let t=this.consumeSyntax();if(t==="function"){t=this.consumeSyntax();this.hadKeyword=true}return t==="*"}}consumeSyntax(e){const t=this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);if(!t)return;const[s,n]=t;this.consumeWhitespace();if(n)return e||n;switch(s){case"(":return this.consumeSyntaxUntil("(",")");case"[":return this.consumeSyntaxUntil("[","]");case"{":return this.consumeSyntaxUntil("{","}");case"`":return this.consumeTemplate();case'"':return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/,'"');case"'":return this.consumeRegExp(/^(?:[^\\']|\\.)*'/,"'")}return s}consumeSyntaxUntil(e,t){let s=true;for(;;){const n=this.consumeSyntax();if(n===t)return e+t;if(!n||n===")"||n==="]"||n==="}")return;if(n==="/"&&s&&this.consumeMatch(/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/)){s=false;this.consumeWhitespace()}else{s=u.has(n)}}}consumeMatch(e){const t=e.exec(this.fnString.substr(this.pos));if(t)this.pos+=t[0].length;return t}consumeRegExp(e,t){const s=e.exec(this.fnString.substr(this.pos));if(!s)return;this.pos+=s[0].length;this.consumeWhitespace();return t}consumeTemplate(){for(;;){this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/);if(this.fnString[this.pos]==="`"){this.pos++;this.consumeWhitespace();return"`"}if(this.fnString.substr(this.pos,2)==="${"){this.pos+=2;this.consumeWhitespace();if(this.consumeSyntaxUntil("{","}"))continue}return}}consumeWhitespace(){this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/)}}t.FunctionParser=FunctionParser},816:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=s(662);const i=s(121);const r=Symbol("root");function stringify(e,t,s,n={}){const o=typeof s==="string"?s:" ".repeat(s||0);const u=[];const a=new Set;const c=new Map;const l=new Map;let h=0;const{maxDepth:f=100,references:p=false,skipUndefinedProperties:d=false,maxValues:g=1e5}=n;const m=replacerToString(t);const y=(e,t)=>{if(++h>g)return;if(d&&e===undefined)return;if(u.length>f)return;if(t===undefined)return m(e,o,y,t);u.push(t);const s=x(e,t===r?undefined:t);u.pop();return s};const x=p?(e,t)=>{if(e!==null&&(typeof e==="object"||typeof e==="function"||typeof e==="symbol")){if(c.has(e)){l.set(u.slice(1),c.get(e));return}c.set(e,u.slice(1))}return m(e,o,y,t)}:(e,t)=>{if(a.has(e))return;a.add(e);const s=m(e,o,y,t);a.delete(e);return s};const b=y(e,r);if(l.size){const e=o?" ":"";const t=o?"\n":"";let s=`var x${e}=${e}${b};${t}`;for(const[n,r]of l.entries()){const o=i.stringifyPath(n,y);const u=i.stringifyPath(r,y);s+=`x${o}${e}=${e}x${u};${t}`}return`(function${e}()${e}{${t}${s}return x;${t}}())`}return b}t.stringify=stringify;function replacerToString(e){if(!e)return n.toString;return(t,s,i,r)=>{return e(t,s,e=>n.toString(e,s,i,r),r)}}},810:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=s(121);const i=s(711);const r=s(466);t.objectToString=((e,t,s,n)=>{if(typeof Buffer==="function"&&Buffer.isBuffer(e)){return`new Buffer(${s(e.toString())})`}const i=a[Object.prototype.toString.call(e)];return i?i(e,t,s,n):undefined});const o=(e,t,s)=>{const r=t?"\n":"";const o=t?" ":"";const u=Object.keys(e).reduce(function(r,u){const a=e[u];const c=s(a,u);if(c===undefined)return r;const l=c.split("\n").join(`\n${t}`);if(i.USED_METHOD_KEY.has(a)){r.push(`${t}${l}`);return r}r.push(`${t}${n.quoteKey(u,s)}:${o}${l}`);return r},[]).join(`,${r}`);if(u==="")return"{}";return`{${r}${u}${r}}`};const u=(e,t,s)=>{return`Function(${s("return this")})()`};const a={"[object Array]":r.arrayToString,"[object Object]":o,"[object Error]":(e,t,s)=>{return`new Error(${s(e.message)})`},"[object Date]":e=>{return`new Date(${e.getTime()})`},"[object String]":(e,t,s)=>{return`new String(${s(e.toString())})`},"[object Number]":e=>{return`new Number(${e})`},"[object Boolean]":e=>{return`new Boolean(${e})`},"[object Set]":(e,t,s)=>{return`new Set(${s(Array.from(e))})`},"[object Map]":(e,t,s)=>{return`new Map(${s(Array.from(e))})`},"[object RegExp]":String,"[object global]":u,"[object Window]":u}},121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=/[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;const n=new Map([["\b","\\b"],["\t","\\t"],["\n","\\n"],["\f","\\f"],["\r","\\r"],["'","\\'"],['"','\\"'],["\\","\\\\"]]);function escapeChar(e){return n.get(e)||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}function quoteString(e){return`'${e.replace(s,escapeChar)}'`}t.quoteString=quoteString;const i=new Set(("break else new var case finally return void catch for switch while "+"continue function this with default if throw delete in try "+"do instanceof typeof abstract enum int short boolean export "+"interface static byte extends long super char final native synchronized "+"class float package throws const goto private transient debugger "+"implements protected volatile double import public let yield").split(" "));t.IS_VALID_IDENTIFIER=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function isValidVariableName(e){return typeof e==="string"&&!i.has(e)&&t.IS_VALID_IDENTIFIER.test(e)}t.isValidVariableName=isValidVariableName;function quoteKey(e,t){return isValidVariableName(e)?e:t(e)}t.quoteKey=quoteKey;function stringifyPath(e,t){let s="";for(const n of e){if(isValidVariableName(n)){s+=`.${n}`}else{s+=`[${t(n)}]`}}return s}t.stringifyPath=stringifyPath},662:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=s(121);const i=s(810);const r=s(711);const o={string:n.quoteString,number:e=>Object.is(e,-0)?"-0":String(e),boolean:String,symbol:(e,t,s)=>{const n=Symbol.keyFor(e);if(n!==undefined)return`Symbol.for(${s(n)})`;return`Symbol(${s(e.description)})`},bigint:(e,t,s)=>{return`BigInt(${s(String(e))})`},undefined:String,object:i.objectToString,function:r.functionToString};t.toString=((e,t,s,n)=>{if(e===null)return"null";return o[typeof e](e,t,s,n)})},985:e=>{e.exports=class{constructor(e){this.parent=e}batch(e){e(this);return this}end(){return this.parent}}},797:(e,t,s)=>{const n=s(594);const i=s(985);e.exports=class extends i{constructor(e){super(e);this.store=new Map}extend(e){this.shorthands=e;e.forEach(e=>{this[e]=(t=>this.set(e,t))});return this}clear(){this.store.clear();return this}delete(e){this.store.delete(e);return this}order(){const e=[...this.store].reduce((e,[t,s])=>{e[t]=s;return e},{});const t=Object.keys(e);const s=[...t];t.forEach(t=>{if(!e[t]){return}const{__before:n,__after:i}=e[t];if(n&&s.includes(n)){s.splice(s.indexOf(t),1);s.splice(s.indexOf(n),0,t)}else if(i&&s.includes(i)){s.splice(s.indexOf(t),1);s.splice(s.indexOf(i)+1,0,t)}});return{entries:e,order:s}}entries(){const{entries:e,order:t}=this.order();if(t.length){return e}return undefined}values(){const{entries:e,order:t}=this.order();return t.map(t=>e[t])}get(e){return this.store.get(e)}getOrCompute(e,t){if(!this.has(e)){this.set(e,t())}return this.get(e)}has(e){return this.store.has(e)}set(e,t){this.store.set(e,t);return this}merge(e,t=[]){Object.keys(e).forEach(s=>{if(t.includes(s)){return}const i=e[s];if(!Array.isArray(i)&&typeof i!=="object"||i===null||!this.has(s)){this.set(s,i)}else{this.set(s,n(this.get(s),i))}});return this}clean(e){return Object.keys(e).reduce((t,s)=>{const n=e[s];if(n===undefined){return t}if(Array.isArray(n)&&!n.length){return t}if(Object.prototype.toString.call(n)==="[object Object]"&&!Object.keys(n).length){return t}t[s]=n;return t},{})}when(e,t=Function.prototype,s=Function.prototype){if(e){t(this)}else{s(this)}return this}}},734:(e,t,s)=>{const n=s(985);e.exports=class extends n{constructor(e){super(e);this.store=new Set}add(e){this.store.add(e);return this}prepend(e){this.store=new Set([e,...this.store]);return this}clear(){this.store.clear();return this}delete(e){this.store.delete(e);return this}values(){return[...this.store]}has(e){return this.store.has(e)}merge(e){this.store=new Set([...this.store,...e]);return this}when(e,t=Function.prototype,s=Function.prototype){if(e){t(this)}else{s(this)}return this}}},575:(e,t,s)=>{const n=s(797);const i=s(734);const r=s(370);const o=s(173);const u=s(848);const a=s(980);const c=s(298);const l=s(618);const h=s(216);const f=s(809);e.exports=class extends n{constructor(){super();this.devServer=new a(this);this.entryPoints=new n(this);this.module=new l(this);this.node=new n(this);this.optimization=new h(this);this.output=new u(this);this.performance=new f(this);this.plugins=new n(this);this.resolve=new r(this);this.resolveLoader=new o(this);this.extend(["amd","bail","cache","context","devtool","externals","loader","mode","name","parallelism","profile","recordsInputPath","recordsPath","recordsOutputPath","stats","target","watch","watchOptions"])}static toString(e,{verbose:t=false,configPrefix:n="config"}={}){const{stringify:i}=s(816);return i(e,(e,s,i)=>{if(e&&e.__pluginName){const t=`/* ${n}.${e.__pluginType}('${e.__pluginName}') */\n`;const s=e.__pluginPath?`(require(${i(e.__pluginPath)}))`:e.__pluginConstructorName;if(s){const n=i(e.__pluginArgs).slice(1,-1);return`${t}new ${s}(${n})`}return t+i(e.__pluginArgs&&e.__pluginArgs.length?{args:e.__pluginArgs}:{})}if(e&&e.__ruleNames){const t=e.__ruleTypes;const s=`/* ${n}.module${e.__ruleNames.map((e,s)=>`.${t?t[s]:"rule"}('${e}')`).join("")}${e.__useName?`.use('${e.__useName}')`:``} */\n`;return s+i(e)}if(e&&e.__expression){return e.__expression}if(typeof e==="function"){if(!t&&e.toString().length>100){return`function () { /* omitted long function */ }`}}return i(e)},2)}entry(e){return this.entryPoints.getOrCompute(e,()=>new i(this))}plugin(e){return this.plugins.getOrCompute(e,()=>new c(this,e))}toConfig(){const e=this.entryPoints.entries()||{};return this.clean(Object.assign(this.entries()||{},{node:this.node.entries(),output:this.output.entries(),resolve:this.resolve.toConfig(),resolveLoader:this.resolveLoader.toConfig(),devServer:this.devServer.toConfig(),module:this.module.toConfig(),optimization:this.optimization.toConfig(),plugins:this.plugins.values().map(e=>e.toConfig()),performance:this.performance.entries(),entry:Object.keys(e).reduce((t,s)=>Object.assign(t,{[s]:e[s].values()}),{})}))}toString(t){return e.exports.toString(this.toConfig(),t)}merge(e={},t=[]){const s=["node","output","resolve","resolveLoader","devServer","optimization","performance","module"];if(!t.includes("entry")&&"entry"in e){Object.keys(e.entry).forEach(t=>this.entry(t).merge([].concat(e.entry[t])))}if(!t.includes("plugin")&&"plugin"in e){Object.keys(e.plugin).forEach(t=>this.plugin(t).merge(e.plugin[t]))}s.forEach(s=>{if(!t.includes(s)&&s in e){this[s].merge(e[s])}});return super.merge(e,[...t,...s,"entry","plugin"])}}},980:(e,t,s)=>{const n=s(797);const i=s(734);e.exports=class extends n{constructor(e){super(e);this.allowedHosts=new i(this);this.extend(["after","before","bonjour","clientLogLevel","color","compress","contentBase","disableHostCheck","filename","headers","historyApiFallback","host","hot","hotOnly","http2","https","index","info","inline","lazy","mimeTypes","noInfo","open","openPage","overlay","pfx","pfxPassphrase","port","proxy","progress","public","publicPath","quiet","setup","socket","sockHost","sockPath","sockPort","staticOptions","stats","stdin","useLocalIp","watchContentBase","watchOptions","writeToDisk"])}toConfig(){return this.clean({allowedHosts:this.allowedHosts.values(),...this.entries()||{}})}merge(e,t=[]){if(!t.includes("allowedHosts")&&"allowedHosts"in e){this.allowedHosts.merge(e.allowedHosts)}return super.merge(e,["allowedHosts"])}}},618:(e,t,s)=>{const n=s(797);const i=s(658);e.exports=class extends n{constructor(e){super(e);this.rules=new n(this);this.defaultRules=new n(this);this.extend(["noParse","strictExportPresence"])}defaultRule(e){return this.defaultRules.getOrCompute(e,()=>new i(this,e,"defaultRule"))}rule(e){return this.rules.getOrCompute(e,()=>new i(this,e,"rule"))}toConfig(){return this.clean(Object.assign(this.entries()||{},{defaultRules:this.defaultRules.values().map(e=>e.toConfig()),rules:this.rules.values().map(e=>e.toConfig())}))}merge(e,t=[]){if(!t.includes("rule")&&"rule"in e){Object.keys(e.rule).forEach(t=>this.rule(t).merge(e.rule[t]))}if(!t.includes("defaultRule")&&"defaultRule"in e){Object.keys(e.defaultRule).forEach(t=>this.defaultRule(t).merge(e.defaultRule[t]))}return super.merge(e,["rule","defaultRule"])}}},216:(e,t,s)=>{const n=s(797);const i=s(298);e.exports=class extends n{constructor(e){super(e);this.minimizers=new n(this);this.extend(["concatenateModules","flagIncludedChunks","mergeDuplicateChunks","minimize","namedChunks","namedModules","nodeEnv","noEmitOnErrors","occurrenceOrder","portableRecords","providedExports","removeAvailableModules","removeEmptyChunks","runtimeChunk","sideEffects","splitChunks","usedExports"])}minimizer(e){if(Array.isArray(e)){throw new Error("optimization.minimizer() no longer supports being passed an array. "+"Either switch to the new syntax (https://github.com/neutrinojs/webpack-chain#config-optimization-minimizers-adding) or downgrade to webpack-chain 4. "+"If using Vue this likely means a Vue plugin has not yet been updated to support Vue CLI 4+.")}return this.minimizers.getOrCompute(e,()=>new i(this,e,"optimization.minimizer"))}toConfig(){return this.clean(Object.assign(this.entries()||{},{minimizer:this.minimizers.values().map(e=>e.toConfig())}))}merge(e,t=[]){if(!t.includes("minimizer")&&"minimizer"in e){Object.keys(e.minimizer).forEach(t=>this.minimizer(t).merge(e.minimizer[t]))}return super.merge(e,[...t,"minimizer"])}}},847:e=>{e.exports=(e=>(class extends e{before(e){if(this.__after){throw new Error(`Unable to set .before(${JSON.stringify(e)}) with existing value for .after()`)}this.__before=e;return this}after(e){if(this.__before){throw new Error(`Unable to set .after(${JSON.stringify(e)}) with existing value for .before()`)}this.__after=e;return this}merge(e,t=[]){if(e.before){this.before(e.before)}if(e.after){this.after(e.after)}return super.merge(e,[...t,"before","after"])}}))},848:(e,t,s)=>{const n=s(797);e.exports=class extends n{constructor(e){super(e);this.extend(["auxiliaryComment","chunkCallbackName","chunkFilename","chunkLoadTimeout","crossOriginLoading","devtoolFallbackModuleFilenameTemplate","devtoolLineToLine","devtoolModuleFilenameTemplate","devtoolNamespace","filename","futureEmitAssets","globalObject","hashDigest","hashDigestLength","hashFunction","hashSalt","hotUpdateChunkFilename","hotUpdateFunction","hotUpdateMainFilename","jsonpFunction","library","libraryExport","libraryTarget","path","pathinfo","publicPath","sourceMapFilename","sourcePrefix","strictModuleExceptionHandling","umdNamedDefine","webassemblyModuleFilename"])}}},809:(e,t,s)=>{const n=s(797);e.exports=class extends n{constructor(e){super(e);this.extend(["assetFilter","hints","maxAssetSize","maxEntrypointSize"])}}},298:(e,t,s)=>{const n=s(797);const i=s(847);e.exports=i(class extends n{constructor(e,t,s="plugin"){super(e);this.name=t;this.type=s;this.extend(["init"]);this.init((e,t=[])=>{if(typeof e==="function"){return new e(...t)}return e})}use(e,t=[]){return this.set("plugin",e).set("args",t)}tap(e){if(!this.has("plugin")){throw new Error(`Cannot call .tap() on a plugin that has not yet been defined. Call ${this.type}('${this.name}').use(<Plugin>) first.`)}this.set("args",e(this.get("args")||[]));return this}set(e,t){if(e==="args"&&!Array.isArray(t)){throw new Error("args must be an array of arguments")}return super.set(e,t)}merge(e,t=[]){if("plugin"in e){this.set("plugin",e.plugin)}if("args"in e){this.set("args",e.args)}return super.merge(e,[...t,"args","plugin"])}toConfig(){const e=this.get("init");let t=this.get("plugin");const n=this.get("args");let i=null;if(t===undefined){throw new Error(`Invalid ${this.type} configuration: ${this.type}('${this.name}').use(<Plugin>) was not called to specify the plugin`)}if(typeof t==="string"){i=t;t=s(714)(i)}const r=t.__expression?`(${t.__expression})`:t.name;const o=e(t,n);Object.defineProperties(o,{__pluginName:{value:this.name},__pluginType:{value:this.type},__pluginArgs:{value:n},__pluginConstructorName:{value:r},__pluginPath:{value:i}});return o}})},370:(e,t,s)=>{const n=s(797);const i=s(734);const r=s(298);e.exports=class extends n{constructor(e){super(e);this.alias=new n(this);this.aliasFields=new i(this);this.descriptionFiles=new i(this);this.extensions=new i(this);this.mainFields=new i(this);this.mainFiles=new i(this);this.modules=new i(this);this.plugins=new n(this);this.extend(["cachePredicate","cacheWithContext","concord","enforceExtension","enforceModuleExtension","symlinks","unsafeCache"])}plugin(e){return this.plugins.getOrCompute(e,()=>new r(this,e,"resolve.plugin"))}toConfig(){return this.clean(Object.assign(this.entries()||{},{alias:this.alias.entries(),aliasFields:this.aliasFields.values(),descriptionFiles:this.descriptionFiles.values(),extensions:this.extensions.values(),mainFields:this.mainFields.values(),mainFiles:this.mainFiles.values(),modules:this.modules.values(),plugins:this.plugins.values().map(e=>e.toConfig())}))}merge(e,t=[]){const s=["alias","aliasFields","descriptionFiles","extensions","mainFields","mainFiles","modules"];if(!t.includes("plugin")&&"plugin"in e){Object.keys(e.plugin).forEach(t=>this.plugin(t).merge(e.plugin[t]))}s.forEach(s=>{if(!t.includes(s)&&s in e){this[s].merge(e[s])}});return super.merge(e,[...t,...s,"plugin"])}}},173:(e,t,s)=>{const n=s(370);const i=s(734);e.exports=class extends n{constructor(e){super(e);this.moduleExtensions=new i(this);this.packageMains=new i(this)}toConfig(){return this.clean({moduleExtensions:this.moduleExtensions.values(),packageMains:this.packageMains.values(),...super.toConfig()})}merge(e,t=[]){const s=["moduleExtensions","packageMains"];s.forEach(s=>{if(!t.includes(s)&&s in e){this[s].merge(e[s])}});return super.merge(e,[...t,...s])}}},658:(e,t,s)=>{const n=s(797);const i=s(734);const r=s(847);const o=s(476);const u=s(370);function toArray(e){return Array.isArray(e)?e:[e]}const a=r(class extends n{constructor(e,t,s="rule"){super(e);this.name=t;this.names=[];this.ruleType=s;this.ruleTypes=[];let r=this;while(r instanceof a){this.names.unshift(r.name);this.ruleTypes.unshift(r.ruleType);r=r.parent}this.uses=new n(this);this.include=new i(this);this.exclude=new i(this);this.rules=new n(this);this.oneOfs=new n(this);this.resolve=new u(this);this.extend(["enforce","issuer","parser","resource","resourceQuery","sideEffects","test","type"])}use(e){return this.uses.getOrCompute(e,()=>new o(this,e))}rule(e){return this.rules.getOrCompute(e,()=>new a(this,e,"rule"))}oneOf(e){return this.oneOfs.getOrCompute(e,()=>new a(this,e,"oneOf"))}pre(){return this.enforce("pre")}post(){return this.enforce("post")}toConfig(){const e=this.clean(Object.assign(this.entries()||{},{include:this.include.values(),exclude:this.exclude.values(),rules:this.rules.values().map(e=>e.toConfig()),oneOf:this.oneOfs.values().map(e=>e.toConfig()),use:this.uses.values().map(e=>e.toConfig()),resolve:this.resolve.toConfig()}));Object.defineProperties(e,{__ruleNames:{value:this.names},__ruleTypes:{value:this.ruleTypes}});return e}merge(e,t=[]){if(!t.includes("include")&&"include"in e){this.include.merge(toArray(e.include))}if(!t.includes("exclude")&&"exclude"in e){this.exclude.merge(toArray(e.exclude))}if(!t.includes("use")&&"use"in e){Object.keys(e.use).forEach(t=>this.use(t).merge(e.use[t]))}if(!t.includes("rules")&&"rules"in e){Object.keys(e.rules).forEach(t=>this.rule(t).merge(e.rules[t]))}if(!t.includes("oneOf")&&"oneOf"in e){Object.keys(e.oneOf).forEach(t=>this.oneOf(t).merge(e.oneOf[t]))}if(!t.includes("resolve")&&"resolve"in e){this.resolve.merge(e.resolve)}if(!t.includes("test")&&"test"in e){this.test(e.test instanceof RegExp||typeof e.test==="function"?e.test:new RegExp(e.test))}return super.merge(e,[...t,"include","exclude","use","rules","oneOf","resolve","test"])}});e.exports=a},476:(e,t,s)=>{const n=s(594);const i=s(797);const r=s(847);e.exports=r(class extends i{constructor(e,t){super(e);this.name=t;this.extend(["loader","options"])}tap(e){this.options(e(this.get("options")));return this}merge(e,t=[]){if(!t.includes("loader")&&"loader"in e){this.loader(e.loader)}if(!t.includes("options")&&"options"in e){this.options(n(this.store.get("options")||{},e.options))}return super.merge(e,[...t,"loader","options"])}toConfig(){const e=this.clean(this.entries()||{});Object.defineProperties(e,{__useName:{value:this.name},__ruleNames:{value:this.parent&&this.parent.names},__ruleTypes:{value:this.parent&&this.parent.ruleTypes}});return e}})},714:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}webpackEmptyContext.keys=(()=>[]);webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=714;e.exports=webpackEmptyContext},594:e=>{"use strict";e.exports=require("@umijs/deps/compiled/deepmerge")}};var t={};function __nccwpck_require__(s){if(t[s]){return t[s].exports}var n=t[s]={exports:{}};var i=true;try{e[s](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[s]}return n.exports}(()=>{__nccwpck_require__.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t))})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(575)})();